From 34ab0fbfb2dee554cc9e8ee3331efa1c248b5c63 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 16 Jan 2017 18:48:34 +0100 Subject: [PATCH] Reformat with new clang-format config --- src/Common/LevelGameDef.h | 2 +- src/Common/LevelStructure.hpp | 32 +- src/Common/NvMender2003/NVMeshMender.cpp | 36 +- src/Common/NvMender2003/NVMeshMender.h | 10 +- src/Common/NvMender2003/mender_input_output.h | 6 +- src/Common/face_smoth_flags.h | 4 +- src/Common/object_type_traits.h | 2 +- src/Include/editor/engine.hpp | 6 +- src/Include/editor/ide.hpp | 6 +- src/Include/editor/interfaces.hpp | 4 +- src/Include/editor/property_holder.hpp | 40 +- src/Include/xrAPI/xrAPI.h | 4 +- src/Include/xrRender/ApplicationRender.h | 2 +- src/Include/xrRender/ConsoleRender.h | 2 +- src/Include/xrRender/DebugRender.h | 6 +- src/Include/xrRender/DebugShader.h | 2 +- src/Include/xrRender/EnvironmentRender.h | 4 +- src/Include/xrRender/FactoryPtr.h | 8 +- src/Include/xrRender/FontRender.h | 2 +- src/Include/xrRender/Kinematics.h | 4 +- src/Include/xrRender/KinematicsAnimated.h | 17 +- src/Include/xrRender/LensFlareRender.h | 2 +- src/Include/xrRender/ObjectSpaceRender.h | 4 +- src/Include/xrRender/ParticleCustom.h | 2 +- src/Include/xrRender/RainRender.h | 2 +- src/Include/xrRender/RenderDetailModel.h | 2 +- src/Include/xrRender/RenderFactory.h | 10 +- src/Include/xrRender/RenderVisual.h | 2 +- src/Include/xrRender/StatGraphRender.h | 2 +- src/Include/xrRender/ThunderboltDescRender.h | 2 +- src/Include/xrRender/ThunderboltRender.h | 2 +- src/Include/xrRender/UIRender.h | 2 +- src/Include/xrRender/UISequenceVideoItem.h | 2 +- src/Include/xrRender/UIShader.h | 2 +- src/Include/xrRender/WallMarkArray.h | 2 +- src/Include/xrRender/animation_blend.h | 14 +- src/Include/xrRender/animation_motion.h | 4 +- .../particles_systems_library_interface.hpp | 8 +- src/Layers/xrAPI/stdafx.h | 18 +- src/Layers/xrRender/AnimationKeyCalculate.h | 16 +- src/Layers/xrRender/Blender_BmmD.cpp | 20 +- src/Layers/xrRender/Blender_BmmD.h | 14 +- .../xrRender/Blender_Editor_Selection.cpp | 2 +- .../xrRender/Blender_Editor_Selection.h | 2 +- src/Layers/xrRender/Blender_Editor_Wire.cpp | 2 +- src/Layers/xrRender/Blender_Editor_Wire.h | 2 +- src/Layers/xrRender/Blender_Lm(EbB).h | 6 +- src/Layers/xrRender/Blender_Model_EbB.cpp | 12 +- src/Layers/xrRender/Blender_Model_EbB.h | 6 +- src/Layers/xrRender/Blender_Particle.cpp | 76 +-- src/Layers/xrRender/Blender_Particle.h | 2 +- src/Layers/xrRender/Blender_Recorder_R2.cpp | 12 +- .../Blender_Recorder_StandartBinding.cpp | 10 +- src/Layers/xrRender/Blender_Screen_SET.cpp | 44 +- src/Layers/xrRender/Blender_Screen_SET.h | 2 +- src/Layers/xrRender/Blender_detail_still.cpp | 8 +- src/Layers/xrRender/Blender_detail_still.h | 2 +- src/Layers/xrRender/Blender_tree.cpp | 14 +- src/Layers/xrRender/Blender_tree.h | 2 +- src/Layers/xrRender/ColorMapManager.h | 2 +- src/Layers/xrRender/D3DUtils.cpp | 14 +- src/Layers/xrRender/D3DXRenderBase.h | 20 +- .../xrRender/Debug/dxPixEventWrapper.cpp | 2 +- src/Layers/xrRender/Debug/dxPixEventWrapper.h | 6 +- src/Layers/xrRender/DetailFormat.h | 24 +- src/Layers/xrRender/DetailManager.cpp | 20 +- src/Layers/xrRender/DetailManager.h | 48 +- .../xrRender/DetailManager_Decompress.cpp | 24 +- src/Layers/xrRender/DetailManager_VS.cpp | 35 +- src/Layers/xrRender/ETextureParams.cpp | 2 +- src/Layers/xrRender/ETextureParams.h | 2 +- src/Layers/xrRender/FBasicVisual.cpp | 2 +- src/Layers/xrRender/FBasicVisual.h | 12 +- src/Layers/xrRender/FHierrarhyVisual.h | 2 +- src/Layers/xrRender/FLOD.cpp | 18 +- src/Layers/xrRender/FLOD.h | 4 +- src/Layers/xrRender/FProgressive.cpp | 4 +- src/Layers/xrRender/FProgressive.h | 2 +- src/Layers/xrRender/FSkinned.cpp | 99 ++-- src/Layers/xrRender/FSkinned.h | 4 +- src/Layers/xrRender/FTreeVisual.cpp | 24 +- src/Layers/xrRender/FTreeVisual.h | 12 +- src/Layers/xrRender/FVisual.cpp | 19 +- src/Layers/xrRender/FVisual.h | 2 +- src/Layers/xrRender/HOM.cpp | 4 +- src/Layers/xrRender/HOM.h | 2 +- src/Layers/xrRender/HW.cpp | 22 +- src/Layers/xrRender/HW.h | 46 +- src/Layers/xrRender/HWCaps.cpp | 14 +- src/Layers/xrRender/HWCaps.h | 14 +- src/Layers/xrRender/KinematicAnimatedDefs.h | 2 +- src/Layers/xrRender/LightTrack.cpp | 30 +- src/Layers/xrRender/LightTrack.h | 20 +- src/Layers/xrRender/Light_DB.cpp | 14 +- src/Layers/xrRender/Light_Package.cpp | 10 +- src/Layers/xrRender/ModelPool.cpp | 22 +- src/Layers/xrRender/ModelPool.h | 10 +- src/Layers/xrRender/NvTriStrip.cpp | 10 +- src/Layers/xrRender/NvTriStripObjects.cpp | 10 +- src/Layers/xrRender/NvTriStripObjects.h | 6 +- src/Layers/xrRender/PSLibrary.h | 2 +- src/Layers/xrRender/ParticleEffect.cpp | 42 +- src/Layers/xrRender/ParticleEffect.h | 4 +- src/Layers/xrRender/ParticleEffectDef.cpp | 6 +- src/Layers/xrRender/ParticleEffectDef.h | 14 +- src/Layers/xrRender/ParticleGroup.h | 2 +- src/Layers/xrRender/QueryHelper.h | 6 +- src/Layers/xrRender/R_Backend.cpp | 8 +- src/Layers/xrRender/R_Backend.h | 76 +-- src/Layers/xrRender/R_Backend_DBG.cpp | 30 +- src/Layers/xrRender/R_Backend_Runtime.cpp | 32 +- src/Layers/xrRender/R_Backend_Runtime.h | 8 +- src/Layers/xrRender/R_Backend_xform.h | 14 +- src/Layers/xrRender/R_DStreams.cpp | 32 +- src/Layers/xrRender/R_DStreams.h | 8 +- src/Layers/xrRender/ResourceManager.cpp | 10 +- src/Layers/xrRender/ResourceManager.h | 16 +- src/Layers/xrRender/ResourceManager_Reset.cpp | 6 +- .../xrRender/ResourceManager_Resources.cpp | 8 +- .../xrRender/ResourceManager_Scripting.cpp | 2 +- src/Layers/xrRender/SH_Atomic.cpp | 22 +- src/Layers/xrRender/SH_Atomic.h | 14 +- src/Layers/xrRender/SH_Constant.h | 2 +- src/Layers/xrRender/SH_Matrix.h | 4 +- src/Layers/xrRender/SH_RT.cpp | 4 +- src/Layers/xrRender/SH_RT.h | 4 +- src/Layers/xrRender/SH_Texture.cpp | 6 +- src/Layers/xrRender/SH_Texture.h | 18 +- src/Layers/xrRender/Shader.cpp | 4 +- src/Layers/xrRender/Shader.h | 34 +- src/Layers/xrRender/SkeletonAnimated.cpp | 12 +- src/Layers/xrRender/SkeletonAnimated.h | 10 +- src/Layers/xrRender/SkeletonCustom.cpp | 8 +- src/Layers/xrRender/SkeletonCustom.h | 32 +- src/Layers/xrRender/SkeletonRigid.cpp | 8 +- src/Layers/xrRender/SkeletonX.cpp | 46 +- src/Layers/xrRender/SkeletonX.h | 24 +- src/Layers/xrRender/SkeletonXVertRender.h | 4 +- src/Layers/xrRender/Texture.cpp | 34 +- src/Layers/xrRender/TextureDescrManager.cpp | 8 +- src/Layers/xrRender/Utils/dxHashHelper.cpp | 2 +- src/Layers/xrRender/Utils/dxHashHelper.h | 2 +- src/Layers/xrRender/WallmarksEngine.cpp | 16 +- src/Layers/xrRender/blenders/Blender.cpp | 6 +- src/Layers/xrRender/blenders/Blender.h | 2 +- .../xrRender/blenders/Blender_Recorder.cpp | 8 +- .../xrRender/blenders/Blender_Recorder.h | 14 +- .../xrRender/doug_lea_memory_allocator.c | 4 +- .../xrRender/doug_lea_memory_allocator.h | 4 +- src/Layers/xrRender/du_box.cpp | 4 +- src/Layers/xrRender/du_cylinder.cpp | 52 +- src/Layers/xrRender/du_cylinder.h | 2 +- src/Layers/xrRender/dxApplicationRender.cpp | 22 +- src/Layers/xrRender/dxApplicationRender.h | 2 +- src/Layers/xrRender/dxConsoleRender.cpp | 4 +- src/Layers/xrRender/dxConsoleRender.h | 2 +- src/Layers/xrRender/dxDebugRender.cpp | 10 +- src/Layers/xrRender/dxDebugRender.h | 6 +- src/Layers/xrRender/dxEnvironmentRender.cpp | 38 +- src/Layers/xrRender/dxEnvironmentRender.h | 10 +- src/Layers/xrRender/dxFontRender.cpp | 6 +- src/Layers/xrRender/dxFontRender.h | 2 +- src/Layers/xrRender/dxLensFlareRender.h | 2 +- src/Layers/xrRender/dxObjectSpaceRender.cpp | 2 +- src/Layers/xrRender/dxObjectSpaceRender.h | 8 +- src/Layers/xrRender/dxParticleCustom.h | 2 +- src/Layers/xrRender/dxRainRender.cpp | 10 +- src/Layers/xrRender/dxRainRender.h | 2 +- src/Layers/xrRender/dxRenderFactory.cpp | 14 +- src/Layers/xrRender/dxRenderFactory.h | 6 +- src/Layers/xrRender/dxStatGraphRender.cpp | 22 +- src/Layers/xrRender/dxStatGraphRender.h | 2 +- src/Layers/xrRender/dxThunderboltDescRender.h | 2 +- src/Layers/xrRender/dxThunderboltRender.cpp | 8 +- src/Layers/xrRender/dxThunderboltRender.h | 2 +- src/Layers/xrRender/dxUIRender.cpp | 4 +- src/Layers/xrRender/dxUIRender.h | 2 +- src/Layers/xrRender/dxUISequenceVideoItem.h | 2 +- src/Layers/xrRender/dxUIShader.h | 2 +- src/Layers/xrRender/dxWallMarkArray.h | 2 +- src/Layers/xrRender/light.cpp | 30 +- src/Layers/xrRender/light.h | 32 +- src/Layers/xrRender/occRasterizer.h | 6 +- src/Layers/xrRender/occRasterizer_core.cpp | 32 +- src/Layers/xrRender/r__dsgraph_build.cpp | 84 +-- src/Layers/xrRender/r__dsgraph_render.cpp | 32 +- .../xrRender/r__dsgraph_render_lods.cpp | 4 +- src/Layers/xrRender/r__dsgraph_types.h | 22 +- src/Layers/xrRender/r__occlusion.cpp | 2 +- src/Layers/xrRender/r__occlusion.h | 16 +- src/Layers/xrRender/r__pixel_calculator.cpp | 4 +- src/Layers/xrRender/r__screenshot.cpp | 20 +- src/Layers/xrRender/r__sector.h | 22 +- src/Layers/xrRender/r__sector_traversal.cpp | 2 +- src/Layers/xrRender/r_constants.cpp | 14 +- src/Layers/xrRender/r_constants.h | 74 +-- src/Layers/xrRender/r_constants_cache.h | 4 +- src/Layers/xrRender/r_sun_cascades.h | 2 +- src/Layers/xrRender/stats_manager.cpp | 6 +- src/Layers/xrRender/stats_manager.h | 6 +- src/Layers/xrRender/tss.h | 4 +- src/Layers/xrRender/tss_def.cpp | 6 +- src/Layers/xrRender/tss_def.h | 4 +- src/Layers/xrRender/uber_deffer.cpp | 37 +- src/Layers/xrRender/xrD3DDefs.h | 6 +- src/Layers/xrRender/xrRender_console.cpp | 170 +++--- src/Layers/xrRender/xrRender_console.h | 126 ++-- src/Layers/xrRender/xr_effgamma.cpp | 4 +- src/Layers/xrRender/xr_effgamma.h | 4 +- .../3DFluid/dx103DFluidBlenders.cpp | 70 +-- .../3DFluid/dx103DFluidBlenders.h | 2 +- .../xrRenderDX10/3DFluid/dx103DFluidData.cpp | 12 +- .../xrRenderDX10/3DFluid/dx103DFluidData.h | 6 +- .../3DFluid/dx103DFluidEmitters.h | 10 +- .../xrRenderDX10/3DFluid/dx103DFluidGrid.cpp | 8 +- .../xrRenderDX10/3DFluid/dx103DFluidGrid.h | 2 +- .../3DFluid/dx103DFluidManager.cpp | 54 +- .../xrRenderDX10/3DFluid/dx103DFluidManager.h | 14 +- .../3DFluid/dx103DFluidObstacles.cpp | 14 +- .../3DFluid/dx103DFluidObstacles.h | 2 +- .../3DFluid/dx103DFluidRenderer.cpp | 16 +- .../3DFluid/dx103DFluidRenderer.h | 2 +- .../3DFluid/dx103DFluidVolume.cpp | 2 +- .../xrRenderDX10/3DFluid/dx103DFluidVolume.h | 4 +- .../DX10 Rain/dx10RainBlender.cpp | 28 +- .../xrRenderDX10/DX10 Rain/dx10RainBlender.h | 2 +- .../xrRenderDX10/MSAA/dx10MSAABlender.h | 2 +- .../StateManager/dx10SamplerStateCache.h | 2 +- .../dx10ShaderResourceStateCache.h | 2 +- .../xrRenderDX10/StateManager/dx10State.h | 10 +- .../StateManager/dx10StateCache.cpp | 6 +- .../StateManager/dx10StateCache.h | 2 +- .../StateManager/dx10StateCacheImpl.h | 2 +- .../StateManager/dx10StateManager.cpp | 21 +- .../StateManager/dx10StateManager.h | 8 +- src/Layers/xrRenderDX10/dx10BufferUtils.cpp | 42 +- src/Layers/xrRenderDX10/dx10BufferUtils.h | 4 +- src/Layers/xrRenderDX10/dx10ConstantBuffer.h | 4 +- .../xrRenderDX10/dx10ConstantBuffer_impl.h | 2 +- .../xrRenderDX10/dx10DetailManager_VS.cpp | 12 +- src/Layers/xrRenderDX10/dx10HW.cpp | 24 +- .../xrRenderDX10/dx10R_Backend_Runtime.h | 39 +- .../dx10ResourceManager_Resources.cpp | 8 +- .../dx10ResourceManager_Scripting.cpp | 66 ++- src/Layers/xrRenderDX10/dx10SH_RT.cpp | 4 +- src/Layers/xrRenderDX10/dx10SH_Texture.cpp | 30 +- src/Layers/xrRenderDX10/dx10StateUtils.h | 2 +- src/Layers/xrRenderDX10/dx10Texture.cpp | 4 +- src/Layers/xrRenderDX10/dx10TextureUtils.cpp | 20 +- src/Layers/xrRenderDX10/dx10TextureUtils.h | 2 +- src/Layers/xrRenderDX10/dx10r_constants.cpp | 8 +- .../xrRenderDX10/dx10r_constants_cache.h | 26 +- src/Layers/xrRenderDX9/dx9R_Backend_Runtime.h | 2 +- .../xrRenderDX9/dx9r_constants_cache.cpp | 2 +- src/Layers/xrRenderDX9/dx9r_constants_cache.h | 2 +- src/Layers/xrRenderPC_R1/BlenderDefault.h | 2 +- src/Layers/xrRenderPC_R1/Blender_Blur.h | 2 +- src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp | 4 +- src/Layers/xrRenderPC_R1/Blender_LaEmB.h | 6 +- src/Layers/xrRenderPC_R1/Blender_Model.h | 2 +- .../xrRenderPC_R1/Blender_Screen_GRAY.h | 2 +- .../xrRenderPC_R1/Blender_Shadow_World.h | 2 +- src/Layers/xrRenderPC_R1/Blender_Vertex.h | 2 +- .../xrRenderPC_R1/Blender_Vertex_aref.h | 2 +- .../xrRenderPC_R1/Blender_default_aref.h | 2 +- src/Layers/xrRenderPC_R1/FStaticRender.cpp | 64 +-- src/Layers/xrRenderPC_R1/FStaticRender.h | 28 +- .../FStaticRender_DetectSector.cpp | 8 +- .../xrRenderPC_R1/FStaticRender_Loader.cpp | 2 +- .../FStaticRender_RenderTarget.cpp | 4 +- .../FStaticRender_RenderTarget.h | 6 +- src/Layers/xrRenderPC_R1/GlowManager.h | 8 +- src/Layers/xrRenderPC_R1/LightPPA.cpp | 2 +- src/Layers/xrRenderPC_R1/LightPPA.h | 2 +- src/Layers/xrRenderPC_R1/LightProjector.cpp | 18 +- src/Layers/xrRenderPC_R1/LightProjector.h | 4 +- src/Layers/xrRenderPC_R1/LightShadows.cpp | 18 +- src/Layers/xrRenderPC_R1/LightShadows.h | 2 +- .../xrRenderPC_R2/Light_Render_Direct.h | 2 +- .../Light_Render_Direct_ComputeXFS.cpp | 16 +- src/Layers/xrRenderPC_R2/SMAP_Allocator.h | 14 +- .../xrRenderPC_R2/blender_bloom_build.cpp | 10 +- src/Layers/xrRenderPC_R2/blender_combine.cpp | 14 +- .../xrRenderPC_R2/blender_deffer_aref.cpp | 8 +- .../xrRenderPC_R2/blender_deffer_flat.cpp | 6 +- .../xrRenderPC_R2/blender_deffer_model.cpp | 10 +- .../xrRenderPC_R2/blender_light_direct.cpp | 10 +- .../blender_light_direct_cascade.cpp | 8 +- .../xrRenderPC_R2/blender_light_mask.cpp | 12 +- .../xrRenderPC_R2/blender_light_occq.cpp | 4 +- .../xrRenderPC_R2/blender_light_point.cpp | 12 +- .../xrRenderPC_R2/blender_light_spot.cpp | 12 +- .../xrRenderPC_R2/blender_luminance.cpp | 6 +- src/Layers/xrRenderPC_R2/blender_ssao.cpp | 4 +- src/Layers/xrRenderPC_R2/light_GI.cpp | 2 +- src/Layers/xrRenderPC_R2/light_smapvis.cpp | 6 +- src/Layers/xrRenderPC_R2/light_smapvis.h | 4 +- src/Layers/xrRenderPC_R2/light_vis.cpp | 2 +- src/Layers/xrRenderPC_R2/r2.cpp | 22 +- src/Layers/xrRenderPC_R2/r2.h | 28 +- src/Layers/xrRenderPC_R2/r2_R_calculate.cpp | 2 +- src/Layers/xrRenderPC_R2/r2_R_lights.cpp | 6 +- src/Layers/xrRenderPC_R2/r2_R_render.cpp | 48 +- src/Layers/xrRenderPC_R2/r2_R_sun.cpp | 64 +-- src/Layers/xrRenderPC_R2/r2_loader.cpp | 2 +- src/Layers/xrRenderPC_R2/r2_rendertarget.cpp | 32 +- src/Layers/xrRenderPC_R2/r2_rendertarget.h | 48 +- .../r2_rendertarget_accum_direct.cpp | 27 +- .../r2_rendertarget_accum_omnipart_geom.cpp | 4 +- .../r2_rendertarget_accum_point.cpp | 4 +- .../r2_rendertarget_accum_point_geom.cpp | 4 +- .../r2_rendertarget_accum_reflected.cpp | 6 +- .../r2_rendertarget_accum_spot.cpp | 10 +- .../r2_rendertarget_accum_spot_geom.cpp | 8 +- .../r2_rendertarget_enable_scissor.cpp | 2 +- .../r2_rendertarget_phase_accumulator.cpp | 4 +- .../r2_rendertarget_phase_bloom.cpp | 72 +-- .../r2_rendertarget_phase_combine.cpp | 26 +- .../r2_rendertarget_phase_luminance.cpp | 28 +- .../r2_rendertarget_phase_scene.cpp | 6 +- .../r2_rendertarget_phase_smap_D.cpp | 4 +- .../r2_rendertarget_phase_ssao.cpp | 14 +- src/Layers/xrRenderPC_R2/r2_sector_detect.cpp | 8 +- src/Layers/xrRenderPC_R2/r2_types.h | 70 +-- .../xrRenderPC_R3/Light_Render_Direct.h | 2 +- .../Light_Render_Direct_ComputeXFS.cpp | 16 +- src/Layers/xrRenderPC_R3/SMAP_Allocator.h | 14 +- .../xrRenderPC_R3/blender_bloom_build.cpp | 24 +- src/Layers/xrRenderPC_R3/blender_combine.cpp | 32 +- .../xrRenderPC_R3/blender_deffer_aref.cpp | 10 +- .../xrRenderPC_R3/blender_deffer_flat.cpp | 6 +- .../xrRenderPC_R3/blender_deffer_model.cpp | 10 +- .../xrRenderPC_R3/blender_light_direct.cpp | 38 +- .../xrRenderPC_R3/blender_light_mask.cpp | 24 +- .../xrRenderPC_R3/blender_light_occq.cpp | 11 +- .../xrRenderPC_R3/blender_light_point.cpp | 20 +- .../xrRenderPC_R3/blender_light_spot.cpp | 22 +- .../xrRenderPC_R3/blender_luminance.cpp | 6 +- src/Layers/xrRenderPC_R3/blender_ssao.cpp | 10 +- src/Layers/xrRenderPC_R3/light_GI.cpp | 2 +- src/Layers/xrRenderPC_R3/light_smapvis.cpp | 6 +- src/Layers/xrRenderPC_R3/light_smapvis.h | 4 +- src/Layers/xrRenderPC_R3/light_vis.cpp | 2 +- src/Layers/xrRenderPC_R3/r2_R_calculate.cpp | 2 +- src/Layers/xrRenderPC_R3/r2_R_lights.cpp | 6 +- src/Layers/xrRenderPC_R3/r2_R_sun.cpp | 60 +- src/Layers/xrRenderPC_R3/r2_sector_detect.cpp | 8 +- src/Layers/xrRenderPC_R3/r2_types.h | 80 +-- src/Layers/xrRenderPC_R3/r3.cpp | 44 +- src/Layers/xrRenderPC_R3/r3.h | 44 +- src/Layers/xrRenderPC_R3/r3_R_rain.cpp | 4 +- src/Layers/xrRenderPC_R3/r3_R_render.cpp | 48 +- src/Layers/xrRenderPC_R3/r3_R_sun_support.h | 8 +- src/Layers/xrRenderPC_R3/r3_loader.cpp | 2 +- src/Layers/xrRenderPC_R3/r3_rendertarget.cpp | 36 +- src/Layers/xrRenderPC_R3/r3_rendertarget.h | 64 +-- .../r3_rendertarget_accum_direct.cpp | 46 +- .../r3_rendertarget_accum_omnipart_geom.cpp | 4 +- .../r3_rendertarget_accum_point.cpp | 16 +- .../r3_rendertarget_accum_point_geom.cpp | 4 +- .../r3_rendertarget_accum_reflected.cpp | 22 +- .../r3_rendertarget_accum_spot.cpp | 18 +- .../r3_rendertarget_accum_spot_geom.cpp | 8 +- .../r3_rendertarget_draw_rain.cpp | 2 +- .../r3_rendertarget_enable_scissor.cpp | 2 +- .../r3_rendertarget_phase_bloom.cpp | 72 +-- .../r3_rendertarget_phase_combine.cpp | 34 +- .../r3_rendertarget_phase_luminance.cpp | 28 +- .../r3_rendertarget_phase_scene.cpp | 6 +- src/Layers/xrRenderPC_R4/CSCompiler.cpp | 4 +- src/Layers/xrRenderPC_R4/CSCompiler.h | 4 +- src/Layers/xrRenderPC_R4/ComputeShader.h | 4 +- .../xrRenderPC_R4/Light_Render_Direct.h | 2 +- .../Light_Render_Direct_ComputeXFS.cpp | 16 +- src/Layers/xrRenderPC_R4/R_Backend_LOD.h | 2 +- src/Layers/xrRenderPC_R4/SMAP_Allocator.h | 14 +- .../xrRenderPC_R4/blender_bloom_build.cpp | 24 +- src/Layers/xrRenderPC_R4/blender_combine.cpp | 32 +- .../xrRenderPC_R4/blender_deffer_aref.cpp | 10 +- .../xrRenderPC_R4/blender_deffer_flat.cpp | 6 +- .../xrRenderPC_R4/blender_deffer_model.cpp | 10 +- .../xrRenderPC_R4/blender_light_direct.cpp | 38 +- .../xrRenderPC_R4/blender_light_mask.cpp | 24 +- .../xrRenderPC_R4/blender_light_occq.cpp | 11 +- .../xrRenderPC_R4/blender_light_point.cpp | 20 +- .../xrRenderPC_R4/blender_light_spot.cpp | 22 +- .../xrRenderPC_R4/blender_luminance.cpp | 6 +- src/Layers/xrRenderPC_R4/blender_ssao.cpp | 10 +- src/Layers/xrRenderPC_R4/light_GI.cpp | 2 +- src/Layers/xrRenderPC_R4/light_smapvis.cpp | 6 +- src/Layers/xrRenderPC_R4/light_smapvis.h | 4 +- src/Layers/xrRenderPC_R4/light_vis.cpp | 2 +- src/Layers/xrRenderPC_R4/r2_R_calculate.cpp | 2 +- src/Layers/xrRenderPC_R4/r2_R_lights.cpp | 6 +- src/Layers/xrRenderPC_R4/r2_R_sun.cpp | 60 +- src/Layers/xrRenderPC_R4/r2_sector_detect.cpp | 8 +- src/Layers/xrRenderPC_R4/r2_test_hw.cpp | 2 +- src/Layers/xrRenderPC_R4/r2_types.h | 80 +-- src/Layers/xrRenderPC_R4/r4.cpp | 32 +- src/Layers/xrRenderPC_R4/r4.h | 44 +- src/Layers/xrRenderPC_R4/r4_R_rain.cpp | 4 +- src/Layers/xrRenderPC_R4/r4_R_render.cpp | 48 +- src/Layers/xrRenderPC_R4/r4_R_sun_support.h | 8 +- src/Layers/xrRenderPC_R4/r4_loader.cpp | 2 +- src/Layers/xrRenderPC_R4/r4_rendertarget.cpp | 36 +- src/Layers/xrRenderPC_R4/r4_rendertarget.h | 64 +-- .../r4_rendertarget_accum_direct.cpp | 46 +- .../r4_rendertarget_accum_omnipart_geom.cpp | 4 +- .../r4_rendertarget_accum_point.cpp | 16 +- .../r4_rendertarget_accum_point_geom.cpp | 4 +- .../r4_rendertarget_accum_reflected.cpp | 22 +- .../r4_rendertarget_accum_spot.cpp | 18 +- .../r4_rendertarget_accum_spot_geom.cpp | 8 +- .../r4_rendertarget_draw_rain.cpp | 2 +- .../r4_rendertarget_enable_scissor.cpp | 2 +- .../r4_rendertarget_phase_bloom.cpp | 72 +-- .../r4_rendertarget_phase_combine.cpp | 34 +- .../r4_rendertarget_phase_luminance.cpp | 28 +- .../r4_rendertarget_phase_scene.cpp | 6 +- src/plugins/Max/Export/BoneDef.cpp | 4 +- src/plugins/Max/Export/EditMeshExportMAX.cpp | 2 +- src/plugins/Max/Export/ExportKeys.cpp | 4 +- src/plugins/Max/Export/FS2.H | 8 +- src/plugins/Max/Export/MeshExpPlugin.cpp | 2 +- src/plugins/Max/Export/MeshExpUtility.rc | 16 +- src/plugins/Max/Export/Stdafx.h | 2 +- src/plugins/Max/Material/DllEntry.cpp | 8 +- src/plugins/Max/Material/GameMaterial.rc | 10 +- src/plugins/Max/Material/Stdafx.h | 2 +- src/plugins/Maya/Export/ExportDefines.h | 8 +- src/plugins/Maya/Export/MayaExport.cpp | 14 +- src/plugins/Maya/Export/SmdBone.h | 4 +- src/plugins/Maya/Export/SmdMaya.cpp | 24 +- src/plugins/Maya/Export/SmdMaya.h | 26 +- src/plugins/Maya/Export/Stdafx.h | 2 +- src/plugins/Maya/Export/camera_exporter.cpp | 2 +- src/plugins/Maya/Export/camera_exporter.h | 2 +- src/plugins/Maya/Export/maTranslator.cpp | 30 +- src/plugins/Maya/Export/maTranslator.h | 4 +- .../Maya/Material/MNormalMapConverter.cpp | 4 +- .../Maya/Material/MNormalMapConverter.h | 2 +- src/plugins/Maya/Material/MTexture.cpp | 2 +- src/plugins/Maya/Material/MTexture.h | 4 +- src/plugins/Maya/Material/MTextureCache.h | 6 +- src/plugins/Maya/Material/NodeMonitor.h | 2 +- .../Maya/Material/ShadingConnection.cpp | 2 +- src/plugins/Maya/Material/ShadingConnection.h | 2 +- src/plugins/Maya/Material/crc16.cpp | 2 +- src/plugins/Maya/Material/hwUnlitShader.cpp | 10 +- src/plugins/Maya/Material/lambertShader.cpp | 14 +- src/plugins/Maya/Material/phongShader.cpp | 20 +- src/plugins/Shared/GameMaterial.cpp | 352 ++++++------ src/plugins/Shared/GameMaterial.h | 62 +- src/plugins/Shared/GameMaterial.rc | 10 +- src/plugins/Shared/TexMaps.cpp | 2 +- src/plugins/Shared/TexMaps.h | 8 +- src/plugins/lw/Export/EditObjectImport.cpp | 10 +- src/plugins/lw/Export/EditObjectImportDB.cpp | 6 +- src/plugins/lw/Export/LW_export_object.cpp | 2 +- src/plugins/lw/Export/scenscan/objectdb.h | 136 ++--- src/plugins/lw/Export/scenscan/vecmat.h | 2 +- src/plugins/lw/Export/stdafx.h | 2 +- src/plugins/lw/Shader/stdafx.h | 2 +- src/utils/CompressionTest/CompressionTest.cpp | 8 +- src/utils/ETools/ArbitraryList.h | 8 +- src/utils/ETools/DLink.h | 2 +- src/utils/ETools/ETools.cpp | 58 +- src/utils/ETools/ETools.h | 2 +- src/utils/ETools/Intersect.cpp | 2 +- src/utils/ETools/PropSlimTools.h | 10 +- src/utils/ETools/StdAfx.h | 8 +- src/utils/ETools/mesh.h | 34 +- src/utils/ETools/object.cpp | 4 +- src/utils/ETools/object.h | 20 +- src/utils/ETools/object_sliding.cpp | 12 +- src/utils/ETools/object_sliding.h | 2 +- src/utils/ETools/quad.h | 2 +- src/utils/ETools/xrXRC.h | 2 +- src/utils/LWO/StdAfx.h | 6 +- src/utils/ctool/PPMTrain.cpp | 4 +- src/utils/ctool/ctool.cpp | 4 +- src/utils/mp_balancer/iostreams_proxy.cpp | 2 +- src/utils/mp_balancer/iostreams_proxy.h | 10 +- src/utils/mp_balancer/pch.h | 2 +- .../mp_balancer/statistics_collector.hpp | 2 +- src/utils/mp_balancer/tools.hpp | 2 +- src/utils/mp_balancer/wpn_collection.hpp | 4 +- src/utils/mp_balancer/xr_ini_ex.cpp | 14 +- src/utils/mp_balancer/xr_ini_ex.h | 10 +- .../mp_configs_verifyer/configs_common.cpp | 10 +- .../mp_configs_verifyer/configs_common.h | 4 +- .../configs_dump_verifyer.cpp | 4 +- .../configs_dump_verifyer.h | 8 +- src/utils/mp_configs_verifyer/entry_point.cpp | 4 +- .../mp_config_sections.cpp | 2 +- .../mp_configs_verifyer/mp_config_sections.h | 12 +- src/utils/mp_configs_verifyer/pch.h | 2 +- .../mp_gpprof_server/atlas_stalkercoppc_v1.h | 274 ++++----- src/utils/mp_gpprof_server/gamespy_sake.h | 6 +- .../libraries/fcgi-2.4.0/install-sh | 2 +- .../libraries/fcgi-2.4.0/ltmain.sh | 214 +++---- .../libraries/gamespy/GP/gp.c | 18 +- .../libraries/gamespy/GP/gp.h | 54 +- .../libraries/gamespy/GP/gpi.c | 6 +- .../libraries/gamespy/GP/gpiBuddy.c | 8 +- .../libraries/gamespy/GP/gpiBuddy.h | 4 +- .../libraries/gamespy/GP/gpiBuffer.c | 6 +- .../libraries/gamespy/GP/gpiConnect.c | 4 +- .../libraries/gamespy/GP/gpiInfo.c | 2 +- .../libraries/gamespy/GP/gpiInfo.h | 6 +- .../libraries/gamespy/GP/gpiPS3.c | 8 +- .../libraries/gamespy/GP/gpiPS3.h | 6 +- .../libraries/gamespy/GP/gpiPeer.c | 4 +- .../libraries/gamespy/GP/gpiProfile.c | 6 +- .../libraries/gamespy/GP/gpiTransfer.c | 4 +- .../libraries/gamespy/GP/gpiTransfer.h | 2 +- .../libraries/gamespy/GP/gpiUtility.c | 12 +- .../libraries/gamespy/GP/gpiUtility.h | 2 +- .../libraries/gamespy/GP/gpstress/gpstress.c | 58 +- .../libraries/gamespy/GP/gptest/StdAfx.h | 18 +- .../libraries/gamespy/GP/gptest/gptest.h | 6 +- .../libraries/gamespy/GP/gptest/gptest.rc | 16 +- .../libraries/gamespy/GP/gptest/gptestDlg.cpp | 6 +- .../libraries/gamespy/GP/gptest/gptestDlg.h | 10 +- .../libraries/gamespy/GP/gptestc/gptestc.c | 6 +- .../libraries/gamespy/common/gsAssert.c | 6 +- .../libraries/gamespy/common/gsAssert.h | 8 +- .../libraries/gamespy/common/gsAvailable.h | 8 +- .../libraries/gamespy/common/gsCommon.h | 4 +- .../libraries/gamespy/common/gsCore.c | 4 +- .../libraries/gamespy/common/gsCore.h | 12 +- .../libraries/gamespy/common/gsCrypt.c | 70 +-- .../libraries/gamespy/common/gsCrypt.h | 14 +- .../libraries/gamespy/common/gsDebug.c | 16 +- .../libraries/gamespy/common/gsDebug.h | 44 +- .../libraries/gamespy/common/gsLargeInt.c | 186 +++--- .../libraries/gamespy/common/gsLargeInt.h | 4 +- .../libraries/gamespy/common/gsMemory.c | 94 +-- .../libraries/gamespy/common/gsMemory.h | 8 +- .../libraries/gamespy/common/gsPlatform.h | 122 ++-- .../gamespy/common/gsPlatformSocket.c | 18 +- .../gamespy/common/gsPlatformSocket.h | 36 +- .../gamespy/common/gsPlatformThread.c | 2 +- .../gamespy/common/gsPlatformThread.h | 22 +- .../libraries/gamespy/common/gsPlatformUtil.c | 74 +-- .../libraries/gamespy/common/gsPlatformUtil.h | 18 +- .../libraries/gamespy/common/gsRC4.c | 4 +- .../libraries/gamespy/common/gsRC4.h | 2 +- .../libraries/gamespy/common/gsSHA1.h | 2 +- .../libraries/gamespy/common/gsSSL.h | 70 +-- .../libraries/gamespy/common/gsSoap.c | 8 +- .../libraries/gamespy/common/gsSoap.h | 8 +- .../libraries/gamespy/common/gsStringUtil.c | 24 +- .../libraries/gamespy/common/gsStringUtil.h | 28 +- .../libraries/gamespy/common/gsUdpEngine.c | 4 +- .../libraries/gamespy/common/gsUdpEngine.h | 2 +- .../libraries/gamespy/common/gsXML.c | 154 ++--- .../libraries/gamespy/common/gsXML.h | 12 +- .../libraries/gamespy/common/nitro/font.c | 544 +++++++++--------- .../gamespy/common/nitro/gsSocketNitro.c | 2 +- .../libraries/gamespy/common/nitro/key.c | 12 +- .../libraries/gamespy/common/nitro/key.h | 8 +- .../libraries/gamespy/common/nitro/menu.h | 2 +- .../libraries/gamespy/common/nitro/screen.c | 8 +- .../libraries/gamespy/common/nitro/screen.h | 2 +- .../libraries/gamespy/common/nitro/wireless.c | 50 +- .../gamespy/common/ps2/gsSocketPs2.c | 8 +- .../gamespy/common/ps2/gsThreadPs2.c | 4 +- .../libraries/gamespy/common/ps2/ps2common.c | 6 +- .../libraries/gamespy/common/ps2/ps2pad.c | 18 +- .../SpeexSpursTaskManager/CellVectorMath.h | 6 +- .../ps3/SpeexSpursTaskManager/PS3Types.h | 2 +- .../ps3/SpeexSpursTaskManager/SPUAssert.h | 12 +- .../ps3/SpeexSpursTaskManager/SpuFakeDma.h | 4 +- .../SpuSpeexTaskOutput.h | 2 +- .../SpursSpeexCInterface.h | 2 +- .../SpursSpeexTaskManager.cpp | 8 +- .../SpursSpeexTaskManager.h | 4 +- .../spursAlignedAllocator.h | 2 +- .../spursAlignedObjectArray.h | 40 +- .../spursConfiguration.h | 2 +- .../spursPlatformDefinitions.h | 4 +- .../ps3/SpeexSpursTaskManager/spursScalar.h | 2 +- .../spursSupportInterface.cpp | 2 +- .../spursSupportInterface.h | 12 +- .../spursUtilityMacros.h | 6 +- .../spursthreadsupportinterface.h | 2 +- .../gamespy/common/ps3/gsSocketPS3.c | 2 +- .../libraries/gamespy/common/ps3/gsUtilPS3.c | 4 +- .../gamespy/common/psp/gsSocketPSP.c | 76 +-- .../libraries/gamespy/common/psp/gsUtilPSP.c | 14 +- .../libraries/gamespy/common/psp/pspcommon.c | 12 +- .../common/revolution/gsSocketRevolution.c | 2 +- .../common/revolution/revolutionCommon.c | 4 +- .../gamespy/common/win32/gsThreadWin32.c | 4 +- .../gamespy/common/x360/gsThreadX360.c | 4 +- .../libraries/gamespy/darray.c | 16 +- .../libraries/gamespy/darray.h | 4 +- .../libraries/gamespy/ghttp/ghttp.h | 288 +++++----- .../libraries/gamespy/ghttp/ghttpASCII.h | 158 ++--- .../libraries/gamespy/ghttp/ghttpBuffer.c | 26 +- .../libraries/gamespy/ghttp/ghttpBuffer.h | 76 +-- .../libraries/gamespy/ghttp/ghttpCommon.c | 20 +- .../libraries/gamespy/ghttp/ghttpCommon.h | 14 +- .../libraries/gamespy/ghttp/ghttpConnection.c | 2 +- .../libraries/gamespy/ghttp/ghttpConnection.h | 122 ++-- .../libraries/gamespy/ghttp/ghttpEncryption.c | 162 +++--- .../libraries/gamespy/ghttp/ghttpEncryption.h | 34 +- .../libraries/gamespy/ghttp/ghttpMain.c | 10 +- .../libraries/gamespy/ghttp/ghttpPost.c | 38 +- .../libraries/gamespy/ghttp/ghttpPost.h | 4 +- .../libraries/gamespy/ghttp/ghttpProcess.c | 26 +- .../libraries/gamespy/ghttp/ghttpc/ghttpc.c | 2 +- .../libraries/gamespy/ghttp/ghttpmfc/StdAfx.h | 16 +- .../gamespy/ghttp/ghttpmfc/ghttpmfc.h | 6 +- .../gamespy/ghttp/ghttpmfc/ghttpmfc.rc | 18 +- .../gamespy/ghttp/ghttpmfc/ghttpmfcDlg.cpp | 10 +- .../gamespy/ghttp/ghttpmfc/ghttpmfcDlg.h | 10 +- .../libraries/gamespy/gt2/gt2.h | 256 ++++----- .../libraries/gamespy/gt2/gt2Auth.c | 14 +- .../libraries/gamespy/gt2/gt2Encode.c | 16 +- .../libraries/gamespy/gt2/gt2Encode.h | 4 +- .../libraries/gamespy/gt2/gt2Main.h | 174 +++--- .../libraries/gamespy/gt2/gt2Message.c | 18 +- .../libraries/gamespy/gt2/gt2Socket.c | 2 +- .../libraries/gamespy/gt2/gt2Utility.c | 12 +- .../gamespy/gt2/gt2action/TGAFile.cpp | 348 +++++------ .../gamespy/gt2/gt2action/gt2aClient.c | 34 +- .../gamespy/gt2/gt2action/gt2aClient.h | 32 +- .../gamespy/gt2/gt2action/gt2aInput.c | 10 +- .../gamespy/gt2/gt2action/gt2aLogic.h | 44 +- .../gamespy/gt2/gt2action/gt2aServer.h | 28 +- .../gamespy/gt2/gt2action/gt2aSound.c | 6 +- .../gamespy/gt2/gt2hostmig/gt2hostmig.c | 2 +- .../libraries/gamespy/gt2/gt2test/StdAfx.h | 18 +- .../libraries/gamespy/gt2/gt2test/gt2test.h | 6 +- .../libraries/gamespy/gt2/gt2test/gt2test.rc | 18 +- .../gamespy/gt2/gt2test/gt2testDlg.cpp | 2 +- .../gamespy/gt2/gt2test/gt2testDlg.h | 10 +- .../libraries/gamespy/gt2/gt2testc/gt2testc.c | 30 +- .../libraries/gamespy/hashtable.c | 4 +- .../libraries/gamespy/hashtable.h | 2 +- .../libraries/gamespy/sake/sake.h | 4 +- .../libraries/gamespy/sake/sakeMain.h | 4 +- .../libraries/gamespy/sake/sakeRequest.h | 4 +- .../gamespy/sake/sakeRequestInternal.h | 4 +- .../libraries/gamespy/sake/sakeRequestRead.c | 2 +- .../gamespy/sake/saketest/saketest.c | 2 +- .../pthreads-w32-2-8-0-release/pthread.h | 4 +- .../pthread_key_delete.c | 2 +- .../pthread_win32_attach_detach_np.c | 2 +- .../ptw32_callUserDestroyRoutines.c | 2 +- .../mp_gpprof_server/profile_data_types.cpp | 66 +-- .../mp_gpprof_server/profile_data_types.h | 10 +- src/utils/mp_gpprof_server/profile_printer.h | 2 +- .../mp_gpprof_server/profile_request.cpp | 2 +- src/utils/mp_gpprof_server/profile_request.h | 4 +- src/utils/mp_gpprof_server/profiles_cache.h | 6 +- .../mp_gpprof_server/requests_processor.cpp | 4 +- .../mp_gpprof_server/requests_processor.h | 4 +- src/utils/mp_gpprof_server/sake_worker.h | 4 +- src/utils/mp_gpprof_server/threads.cpp | 2 +- src/utils/mp_gpprof_server/threads.h | 10 +- src/utils/mp_screenshots_info/entry_point.cpp | 2 +- src/utils/mp_screenshots_info/pch.h | 2 +- .../screenshots_common.cpp | 10 +- .../mp_screenshots_info/screenshots_common.h | 4 +- .../screenshots_reader.cpp | 6 +- .../mp_screenshots_info/screenshots_reader.h | 6 +- .../mp_screenshots_info/screenshots_writer.h | 6 +- src/utils/xrAI/AIMapExport.h | 8 +- src/utils/xrAI/ETextureParams.h | 2 +- src/utils/xrAI/StdAfx.h | 2 +- src/utils/xrAI/compiler.h | 36 +- src/utils/xrAI/compiler_cover.cpp | 12 +- src/utils/xrAI/game_spawn_constructor.cpp | 2 +- src/utils/xrAI/guid_generator.cpp | 4 +- src/utils/xrAI/guid_generator.h | 2 +- src/utils/xrAI/level_spawn_constructor.cpp | 12 +- src/utils/xrAI/level_spawn_constructor.h | 8 +- src/utils/xrAI/resource.rc | 10 +- src/utils/xrAI/spawn_patcher.cpp | 2 +- src/utils/xrAI/spawn_patcher.h | 2 +- src/utils/xrCompress/xrCompress.cpp | 14 +- src/utils/xrDO_Light/StdAfx.h | 2 +- src/utils/xrDXT/ETextureParams.h | 2 +- src/utils/xrDXT/Image_DXTC.cpp | 120 ++-- src/utils/xrDXT/Image_DXTC.h | 12 +- src/utils/xrDXT/NVI_Convolution.h | 8 +- src/utils/xrDXT/NVI_Image.cpp | 2 +- src/utils/xrDXT/NVI_Image.h | 18 +- src/utils/xrDXT/NormalMapGen.cpp | 34 +- src/utils/xrDXT/StdAfx.h | 2 +- src/utils/xrDXT/dds.h | 38 +- src/utils/xrDXT/dds/ConvertColor.h | 18 +- src/utils/xrDXT/dds/ddsTypes.h | 82 +-- src/utils/xrDXT/dds/nvErrorCodes.h | 4 +- src/utils/xrDXT/dds/nvdxt_options.h | 230 ++++---- src/utils/xrDXT/dds/tPixel.h | 62 +- src/utils/xrDXT/dds/tVector.h | 14 +- src/utils/xrDXT/ddsTypes.h | 48 +- src/utils/xrDXT/dxtlib.h | 20 +- src/utils/xrDXT/tPixel.h | 40 +- src/utils/xrLC/ArbitraryList.h | 8 +- src/utils/xrLC/Build.h | 6 +- src/utils/xrLC/ELight_def.h | 6 +- src/utils/xrLC/NvMender2002/NVMeshMender.cpp | 54 +- src/utils/xrLC/NvMender2002/NVMeshMender.h | 2 +- src/utils/xrLC/NvMender2002/nv_algebra.cpp | 4 +- src/utils/xrLC/NvMender2002/nv_algebra.h | 54 +- src/utils/xrLC/NvMender2002/nv_math.h | 6 +- src/utils/xrLC/NvMender2002/nv_mathdecl.h | 2 +- src/utils/xrLC/NvMeshMenderLayer.h | 2 +- src/utils/xrLC/OGF_Face.cpp | 12 +- src/utils/xrLC/OGF_Face.h | 10 +- src/utils/xrLC/OGF_Face_Save.cpp | 18 +- src/utils/xrLC/OGF_Face_Stripify.cpp | 2 +- src/utils/xrLC/Sector.cpp | 4 +- src/utils/xrLC/Sector.h | 2 +- src/utils/xrLC/StdAfx.h | 4 +- src/utils/xrLC/b_globals.h | 16 +- src/utils/xrLC/calculate_normals.h | 4 +- src/utils/xrLC/fmesh.cpp | 58 +- src/utils/xrLC/nv_library/NvTriStrip.cpp | 10 +- .../xrLC/nv_library/NvTriStripObjects.cpp | 10 +- src/utils/xrLC/nv_library/NvTriStripObjects.h | 6 +- src/utils/xrLC/vbm.h | 6 +- src/utils/xrLC/xrBuildCForm.cpp | 2 +- src/utils/xrLC/xrFlex2OGF.cpp | 8 +- src/utils/xrLC/xrLight.cpp | 2 +- src/utils/xrLC/xrMU_Model_Calc_ogf.cpp | 2 +- src/utils/xrLC/xrMU_Model_export_OGF.cpp | 2 +- src/utils/xrLC/xrMU_Model_export_geometry.cpp | 2 +- src/utils/xrLC/xrOptimizeCFORM_qslim.cpp | 4 +- src/utils/xrLC/xrPhase_AdaptiveHT.cpp | 16 +- src/utils/xrLC/xrPhase_GI.cpp | 20 +- src/utils/xrLC/xrPhase_MergeGeometry.cpp | 22 +- src/utils/xrLC/xrPhase_MergeLM.cpp | 32 +- src/utils/xrLC/xrPhase_MergeLM_Rect.h | 2 +- src/utils/xrLC/xrPhase_MergeLM_Surface.cpp | 8 +- src/utils/xrLC/xrPhase_Subdivide.cpp | 6 +- src/utils/xrLC/xrPhase_TangentBasis.cpp | 6 +- src/utils/xrLC/xrPhase_UVmap.cpp | 12 +- src/utils/xrLC/xrSaveOGF.cpp | 4 +- src/utils/xrLCUtil/resource.rc | 10 +- src/utils/xrLC_Light/ETextureParams.h | 4 +- src/utils/xrLC_Light/LightThread.cpp | 2 +- src/utils/xrLC_Light/LightThread.h | 2 +- src/utils/xrLC_Light/Lightmap.cpp | 10 +- src/utils/xrLC_Light/Lightmap.h | 2 +- src/utils/xrLC_Light/MeshStructure.h | 2 +- src/utils/xrLC_Light/R_light.h | 24 +- src/utils/xrLC_Light/base_color.h | 10 +- src/utils/xrLC_Light/base_face.h | 12 +- src/utils/xrLC_Light/base_lighting.h | 6 +- src/utils/xrLC_Light/calculate_normals.h | 4 +- .../xrLC_Light/detail_net_global_data.cpp | 2 +- src/utils/xrLC_Light/detail_net_global_data.h | 2 +- .../xrLC_Light/detail_slot_calculate.cpp | 19 +- src/utils/xrLC_Light/detail_slot_calculate.h | 2 +- src/utils/xrLC_Light/execute_statistics.h | 4 +- src/utils/xrLC_Light/gl_base_cl_data.h | 2 +- .../xrLC_Light/global_calculation_data.h | 22 +- src/utils/xrLC_Light/global_slots_data.h | 2 +- .../xrLC_Light/implicit_net_global_data.cpp | 2 +- src/utils/xrLC_Light/lm_layer.cpp | 2 +- src/utils/xrLC_Light/net_cl_data_prepare.cpp | 4 +- src/utils/xrLC_Light/net_exec_pool.cpp | 4 +- .../xrLC_Light/net_execution_detail_light.h | 4 +- .../net_execution_factory_register.cpp | 2 +- .../xrLC_Light/net_execution_globals.cpp | 2 +- src/utils/xrLC_Light/net_execution_mu_base.h | 2 +- .../xrLC_Light/net_execution_vertex_light.cpp | 4 +- .../xrLC_Light/net_execution_vertex_light.h | 4 +- src/utils/xrLC_Light/net_stream.cpp | 8 +- src/utils/xrLC_Light/net_task_manager.cpp | 2 +- src/utils/xrLC_Light/recalculation.h | 4 +- src/utils/xrLC_Light/serialize.h | 2 +- src/utils/xrLC_Light/vector_clear.h | 2 +- src/utils/xrLC_Light/xrDeflectoL_Direct.cpp | 6 +- src/utils/xrLC_Light/xrDeflector.cpp | 2 +- src/utils/xrLC_Light/xrDeflector.h | 2 +- src/utils/xrLC_Light/xrDeflectorLight.cpp | 6 +- src/utils/xrLC_Light/xrFace.cpp | 6 +- src/utils/xrLC_Light/xrFace.h | 10 +- src/utils/xrLC_Light/xrLC_GlobalData.cpp | 4 +- src/utils/xrLC_Light/xrLC_GlobalData.h | 2 +- src/utils/xrLC_Light/xrLightDoNet.h | 2 +- src/utils/xrLC_Light/xrLightVertex.cpp | 6 +- src/utils/xrLC_Light/xrLight_Implicit.cpp | 2 +- .../xrLC_Light/xrLight_ImplicitCalcGlobs.cpp | 2 +- .../xrMU_Model_export_cform_rcast.cpp | 2 +- src/utils/xrQSlim/src/MxBlock.h | 6 +- src/utils/xrQSlim/src/MxBlock2.h | 2 +- src/utils/xrQSlim/src/MxBlockModel.h | 2 +- src/utils/xrQSlim/src/MxDynBlock.h | 2 +- src/utils/xrQSlim/src/MxGeoPrims.h | 2 +- src/utils/xrQSlim/src/MxGeom3D.h | 2 +- src/utils/xrQSlim/src/MxHeap.cpp | 4 +- src/utils/xrQSlim/src/MxHeap.h | 2 +- src/utils/xrQSlim/src/MxMat2.h | 2 +- src/utils/xrQSlim/src/MxMat3.h | 2 +- src/utils/xrQSlim/src/MxMat4.h | 2 +- src/utils/xrQSlim/src/MxMatrix.h | 2 +- src/utils/xrQSlim/src/MxPropSlim.cpp | 12 +- src/utils/xrQSlim/src/MxPropSlim.h | 6 +- src/utils/xrQSlim/src/MxQMetric.cpp | 6 +- src/utils/xrQSlim/src/MxQMetric.h | 2 +- src/utils/xrQSlim/src/MxQMetric3.cpp | 6 +- src/utils/xrQSlim/src/MxQMetric3.h | 2 +- src/utils/xrQSlim/src/MxQSlim.cpp | 14 +- src/utils/xrQSlim/src/MxQSlim.h | 2 +- src/utils/xrQSlim/src/MxStdModel.cpp | 8 +- src/utils/xrQSlim/src/MxStdModel.h | 12 +- src/utils/xrQSlim/src/MxStdSlim.h | 2 +- src/utils/xrQSlim/src/MxVec3.h | 2 +- src/utils/xrQSlim/src/MxVec4.h | 2 +- src/utils/xrQSlim/src/MxVector.h | 2 +- src/utils/xrQSlim/src/mat2.h | 2 +- src/utils/xrQSlim/src/mat3.h | 2 +- src/utils/xrQSlim/src/mat4.h | 2 +- src/utils/xrQSlim/src/mixmops.h | 6 +- src/utils/xrQSlim/src/mixvops.h | 6 +- src/utils/xrQSlim/src/stdafx.h | 2 +- src/utils/xrQSlim/src/vec2.h | 2 +- src/utils/xrQSlim/src/vec3.h | 2 +- src/utils/xrQSlim/src/vec4.h | 2 +- .../properties_list_helper_script.cpp | 462 +++++++-------- .../xrSE_Factory/script_debugger_utils.h | 12 +- .../script_properties_list_helper.cpp | 9 +- .../script_properties_list_helper.h | 45 +- src/utils/xrSE_Factory/script_space.h | 2 +- src/utils/xrSE_Factory/xrSE_Factory.h | 2 +- src/utils/xrSE_Factory/xrUIXmlParser.cpp | 2 +- src/xrAICore/AISpaceBase.hpp | 2 +- .../Components/condition_state_inline.h | 2 +- src/xrAICore/Components/problem_solver.h | 4 +- .../PathManagers/path_manager_level_inline.h | 6 +- .../PatrolPath/patrol_path_params.cpp | 2 +- .../PatrolPath/patrol_path_params_script.cpp | 2 +- .../Navigation/data_storage_constructor.h | 10 +- src/xrAICore/Navigation/game_graph_script.cpp | 2 +- .../Navigation/game_level_cross_table.h | 10 +- .../game_level_cross_table_inline.h | 2 +- src/xrAICore/Navigation/graph_engine.h | 2 +- src/xrAICore/Navigation/graph_engine_inline.h | 2 +- src/xrAICore/Navigation/level_graph.h | 8 +- .../Navigation/level_graph_vertex_inline.h | 8 +- src/xrCDB/Frustum.cpp | 26 +- src/xrCDB/Frustum.h | 6 +- src/xrCDB/ISpatial.cpp | 16 +- src/xrCDB/ISpatial.h | 24 +- src/xrCDB/ISpatial_q_ray.cpp | 28 +- src/xrCDB/Intersect.hpp | 112 ++-- src/xrCDB/OPC_AABB.h | 18 +- src/xrCDB/OPC_AABBCollider.h | 18 +- src/xrCDB/OPC_AABBTree.cpp | 14 +- src/xrCDB/OPC_AABBTree.h | 20 +- src/xrCDB/OPC_BVTCache.h | 18 +- src/xrCDB/OPC_BoundingSphere.h | 6 +- src/xrCDB/OPC_BoxBoxOverlap.h | 36 +- src/xrCDB/OPC_Collider.h | 12 +- src/xrCDB/OPC_Common.h | 16 +- src/xrCDB/OPC_Container.cpp | 2 +- src/xrCDB/OPC_Container.h | 24 +- src/xrCDB/OPC_FPU.h | 4 +- src/xrCDB/OPC_Matrix3x3.cpp | 2 +- src/xrCDB/OPC_Matrix3x3.h | 6 +- src/xrCDB/OPC_Matrix4x4.cpp | 4 +- src/xrCDB/OPC_Matrix4x4.h | 32 +- src/xrCDB/OPC_MemoryMacros.h | 15 +- src/xrCDB/OPC_Model.cpp | 16 +- src/xrCDB/OPC_Model.h | 36 +- src/xrCDB/OPC_OBB.h | 10 +- src/xrCDB/OPC_OBBCollider.h | 24 +- src/xrCDB/OPC_OptimizedTree.cpp | 4 +- src/xrCDB/OPC_OptimizedTree.h | 2 +- src/xrCDB/OPC_Plane.h | 6 +- src/xrCDB/OPC_PlanesAABBOverlap.h | 26 +- src/xrCDB/OPC_PlanesCollider.h | 2 +- src/xrCDB/OPC_Point.h | 12 +- src/xrCDB/OPC_Preprocessor.h | 4 +- src/xrCDB/OPC_Ray.h | 10 +- src/xrCDB/OPC_RayAABBOverlap.h | 6 +- src/xrCDB/OPC_RayCollider.h | 38 +- src/xrCDB/OPC_Settings.h | 2 +- src/xrCDB/OPC_SphereCollider.h | 14 +- src/xrCDB/OPC_SphereTriOverlap.h | 14 +- src/xrCDB/OPC_TreeBuilders.cpp | 2 +- src/xrCDB/OPC_TreeBuilders.h | 34 +- src/xrCDB/OPC_TreeCollider.cpp | 4 +- src/xrCDB/OPC_TreeCollider.h | 52 +- src/xrCDB/OPC_TriTriOverlap.h | 8 +- src/xrCDB/OPC_Triangle.h | 2 +- src/xrCDB/OPC_Types.h | 134 ++--- src/xrCDB/OPC_VolumeCollider.h | 20 +- src/xrCDB/Opcode.h | 32 +- src/xrCDB/StdAfx.h | 6 +- src/xrCDB/xrCDB.cpp | 8 +- src/xrCDB/xrCDB.h | 28 +- src/xrCDB/xrCDB_Collector.cpp | 18 +- src/xrCDB/xrCDB_ray.cpp | 46 +- src/xrCDB/xrXRC.h | 8 +- src/xrCDB/xr_area.cpp | 4 +- src/xrCDB/xr_area.h | 8 +- src/xrCDB/xr_collide_defs.h | 10 +- src/xrCore/Animation/Bone.hpp | 56 +- src/xrCore/Animation/Envelope.hpp | 6 +- src/xrCore/Animation/SkeletonMotions.cpp | 6 +- src/xrCore/Animation/SkeletonMotions.hpp | 30 +- src/xrCore/Coder.hpp | 2 +- src/xrCore/Crypto/crypto.cpp | 2 +- src/xrCore/Crypto/crypto.h | 2 +- src/xrCore/Crypto/xr_dsa.cpp | 6 +- src/xrCore/Crypto/xr_dsa.h | 10 +- src/xrCore/Crypto/xr_dsa_signer.h | 4 +- src/xrCore/Crypto/xr_dsa_verifyer.h | 4 +- src/xrCore/Crypto/xr_sha.cpp | 2 +- src/xrCore/Crypto/xr_sha.h | 8 +- src/xrCore/Debug/MiniDump.cpp | 6 +- src/xrCore/Debug/StackTrace.cpp | 2 +- src/xrCore/Debug/SymbolEngine.h | 2 +- src/xrCore/Debug/dxerr.cpp | 27 +- src/xrCore/Debug/dxerr.h | 2 +- src/xrCore/FMesh.hpp | 46 +- src/xrCore/FS.cpp | 36 +- src/xrCore/FS.h | 24 +- src/xrCore/FS_impl.h | 24 +- src/xrCore/FTimer.h | 6 +- src/xrCore/FileSystem.cpp | 6 +- src/xrCore/FileSystem_borland.cpp | 2 +- src/xrCore/FixedMap.h | 2 +- src/xrCore/FixedSet.h | 2 +- src/xrCore/LocatorAPI.cpp | 40 +- src/xrCore/LocatorAPI.h | 16 +- src/xrCore/LocatorAPI_auth.cpp | 8 +- src/xrCore/LocatorAPI_defs.h | 4 +- src/xrCore/Math/MathUtil.cpp | 4 +- src/xrCore/Math/MathUtil.hpp | 4 +- src/xrCore/Math/PLC_SSE.cpp | 4 +- src/xrCore/Math/PLC_SSE.hpp | 4 +- src/xrCore/Math/Skin4W_MT.cpp | 4 +- src/xrCore/Math/Skin4W_MT.hpp | 4 +- src/xrCore/Math/SkinXW_SSE.cpp | 36 +- src/xrCore/Math/SkinXW_SSE.hpp | 4 +- src/xrCore/Media/Image.cpp | 2 +- src/xrCore/Model.cpp | 38 +- src/xrCore/NET_utils.cpp | 46 +- src/xrCore/PPMdType.h | 4 +- src/xrCore/PostProcess/PPInfo.cpp | 6 +- src/xrCore/PostProcess/PostProcess.cpp | 40 +- src/xrCore/Stream_Reader.h | 2 +- src/xrCore/SubAlloc.hpp | 2 +- src/xrCore/Text/MbHelpers.cpp | 18 +- src/xrCore/Threading/Lock.cpp | 6 +- src/xrCore/Threading/Lock.hpp | 2 +- src/xrCore/Threading/ttapi.cpp | 2 +- src/xrCore/XML/XMLDocument.cpp | 2 +- src/xrCore/XML/XMLDocument.hpp | 6 +- src/xrCore/XML/tinystr.cpp | 2 +- src/xrCore/XML/tinystr.h | 10 +- src/xrCore/XML/tinyxml.cpp | 8 +- src/xrCore/XML/tinyxml.h | 156 ++--- src/xrCore/XML/tinyxmlparser.cpp | 72 +-- src/xrCore/Xr_ini.cpp | 12 +- src/xrCore/_bitwise.h | 26 +- src/xrCore/_color.h | 4 +- src/xrCore/_cylinder.h | 8 +- src/xrCore/_fbox.h | 16 +- src/xrCore/_fbox2.h | 8 +- src/xrCore/_flags.h | 2 +- src/xrCore/_math.cpp | 18 +- src/xrCore/_math.h | 2 +- src/xrCore/_matrix.h | 56 +- src/xrCore/_matrix33.h | 14 +- src/xrCore/_plane.h | 14 +- src/xrCore/_plane2.h | 14 +- src/xrCore/_quaternion.h | 8 +- src/xrCore/_sphere.cpp | 12 +- src/xrCore/_std_extensions.cpp | 2 +- src/xrCore/_std_extensions.h | 10 +- src/xrCore/_stl_extensions.h | 4 +- src/xrCore/_vector3d.h | 16 +- src/xrCore/_vector3d_ext.h | 2 +- src/xrCore/buffer_vector.h | 2 +- src/xrCore/buffer_vector_inline.h | 10 +- src/xrCore/compression_ppmd_stream.h | 6 +- src/xrCore/compression_ppmd_stream_inline.h | 6 +- src/xrCore/cpuid.cpp | 10 +- src/xrCore/cpuid.h | 18 +- src/xrCore/crc32.cpp | 4 +- src/xrCore/doug_lea_allocator.h | 4 +- src/xrCore/fastdelegate.h | 104 ++-- src/xrCore/file_stream_reader.h | 2 +- src/xrCore/log.cpp | 6 +- src/xrCore/memory_allocation_stats.cpp | 4 +- src/xrCore/memory_allocator_options.h | 2 +- src/xrCore/memory_monitor.cpp | 2 +- src/xrCore/memory_monitor.h | 8 +- src/xrCore/net_utils.h | 24 +- src/xrCore/os_clipboard.cpp | 8 +- src/xrCore/os_clipboard.h | 4 +- src/xrCore/ppmd_compressor.cpp | 2 +- src/xrCore/ppmd_compressor.h | 2 +- src/xrCore/ptmalloc3/malloc-2.8.3.h | 12 +- src/xrCore/ptmalloc3/malloc-private.h | 4 +- src/xrCore/ptmalloc3/malloc.c | 40 +- src/xrCore/ptmalloc3/ptmalloc3.c | 4 +- .../ptmalloc3/sysdeps/win32/virtual_alloc.h | 8 +- src/xrCore/ptmalloc3/sysdeps/win32/win32.c | 32 +- src/xrCore/stream_reader.cpp | 4 +- src/xrCore/stream_reader_inline.h | 2 +- src/xrCore/string_concatenations.cpp | 12 +- src/xrCore/string_concatenations.h | 10 +- src/xrCore/string_concatenations_inline.h | 8 +- src/xrCore/vector.h | 2 +- src/xrCore/xrCore.cpp | 12 +- src/xrCore/xrCore.h | 22 +- src/xrCore/xrCore.rc | 14 +- src/xrCore/xrDebug.cpp | 30 +- src/xrCore/xrDebug_macros.h | 6 +- src/xrCore/xrMemory.cpp | 34 +- src/xrCore/xrMemory.h | 32 +- src/xrCore/xrMemory_POOL.h | 14 +- src/xrCore/xrMemory_debug.cpp | 4 +- src/xrCore/xrMemory_subst_msvc.cpp | 2 +- src/xrCore/xrMemory_subst_msvc.h | 2 +- src/xrCore/xr_ini.h | 10 +- src/xrCore/xr_resource.h | 2 +- src/xrCore/xrsharedmem.cpp | 2 +- src/xrCore/xrsharedmem.h | 2 +- src/xrCore/xrstring.cpp | 18 +- src/xrCore/xrstring.h | 2 +- src/xrD3D9-Null/IDirect3DDevice9_Caps.cpp | 6 +- src/xrD3D9-Null/stdafx.h | 2 +- src/xrD3D9-Null/xrD3D9-Null_OutProc.h | 4 +- src/xrEngine/CameraBase.h | 4 +- src/xrEngine/CameraManager.cpp | 4 +- src/xrEngine/Device_Initialize.cpp | 2 +- src/xrEngine/Device_create.cpp | 2 +- src/xrEngine/Device_wndproc.cpp | 10 +- src/xrEngine/Engine.cpp | 2 +- src/xrEngine/Engine.h | 4 +- src/xrEngine/EngineAPI.cpp | 14 +- src/xrEngine/EngineAPI.h | 4 +- src/xrEngine/Environment.cpp | 6 +- src/xrEngine/Environment.h | 14 +- src/xrEngine/Environment_misc.cpp | 6 +- src/xrEngine/EventAPI.h | 2 +- src/xrEngine/FDemoPlay.h | 2 +- src/xrEngine/FDemoRecord.cpp | 36 +- src/xrEngine/FDemoRecord.h | 2 +- src/xrEngine/Feel_Touch.cpp | 6 +- src/xrEngine/Feel_Vision.h | 12 +- src/xrEngine/GameFont.cpp | 12 +- src/xrEngine/GameFont.h | 4 +- src/xrEngine/GameMtlLib.h | 32 +- src/xrEngine/IGameFont.hpp | 2 +- src/xrEngine/IGame_Level.cpp | 4 +- src/xrEngine/IGame_Level.h | 10 +- src/xrEngine/IGame_Level_check_textures.cpp | 2 +- src/xrEngine/IGame_Persistent.cpp | 6 +- src/xrEngine/IGame_Persistent.h | 7 +- src/xrEngine/IObjectPhysicsCollision.h | 2 +- src/xrEngine/IPhysicsShell.h | 2 +- src/xrEngine/IRenderable.h | 2 +- src/xrEngine/ISheduled.cpp | 2 +- src/xrEngine/ISheduled.h | 6 +- src/xrEngine/LightAnimLibrary.cpp | 10 +- src/xrEngine/ObjectAnimator.h | 2 +- src/xrEngine/PS_instance.cpp | 2 +- src/xrEngine/Properties.h | 12 +- src/xrEngine/Rain.h | 2 +- src/xrEngine/Render.h | 56 +- src/xrEngine/Stats.h | 2 +- src/xrEngine/Text_Console.cpp | 10 +- src/xrEngine/Text_Console.h | 2 +- src/xrEngine/Text_Console_WndProc.cpp | 4 +- src/xrEngine/XR_IOConsole.cpp | 38 +- src/xrEngine/XR_IOConsole.h | 14 +- src/xrEngine/XR_IOConsole_callback.cpp | 22 +- src/xrEngine/Xr_input.cpp | 14 +- src/xrEngine/device.cpp | 42 +- src/xrEngine/device.h | 10 +- src/xrEngine/edit_actions.cpp | 4 +- src/xrEngine/edit_actions.h | 12 +- .../editor_environment_ambients_ambient.cpp | 2 +- .../editor_environment_ambients_ambient.hpp | 16 +- .../editor_environment_ambients_effect_id.cpp | 2 +- .../editor_environment_ambients_effect_id.hpp | 14 +- .../editor_environment_ambients_manager.cpp | 4 +- .../editor_environment_ambients_manager.hpp | 16 +- .../editor_environment_ambients_sound_id.cpp | 2 +- .../editor_environment_ambients_sound_id.hpp | 14 +- src/xrEngine/editor_environment_detail.cpp | 2 +- src/xrEngine/editor_environment_detail.hpp | 12 +- .../editor_environment_effects_effect.cpp | 2 +- .../editor_environment_effects_effect.hpp | 12 +- .../editor_environment_effects_manager.cpp | 2 +- .../editor_environment_effects_manager.hpp | 12 +- .../editor_environment_levels_manager.cpp | 2 +- .../editor_environment_levels_manager.hpp | 16 +- src/xrEngine/editor_environment_manager.cpp | 6 +- src/xrEngine/editor_environment_manager.hpp | 26 +- ...tor_environment_sound_channels_channel.cpp | 2 +- ...tor_environment_sound_channels_channel.hpp | 12 +- ...tor_environment_sound_channels_manager.cpp | 2 +- ...tor_environment_sound_channels_manager.hpp | 12 +- ...itor_environment_sound_channels_source.cpp | 2 +- ...itor_environment_sound_channels_source.hpp | 12 +- .../editor_environment_suns_blend.cpp | 2 +- .../editor_environment_suns_blend.hpp | 12 +- .../editor_environment_suns_flare.cpp | 2 +- .../editor_environment_suns_flare.hpp | 12 +- .../editor_environment_suns_flares.cpp | 8 +- .../editor_environment_suns_flares.hpp | 12 +- .../editor_environment_suns_gradient.cpp | 2 +- .../editor_environment_suns_gradient.hpp | 12 +- .../editor_environment_suns_manager.cpp | 4 +- .../editor_environment_suns_manager.hpp | 12 +- src/xrEngine/editor_environment_suns_sun.cpp | 2 +- src/xrEngine/editor_environment_suns_sun.hpp | 12 +- ...or_environment_thunderbolts_collection.cpp | 2 +- ...or_environment_thunderbolts_collection.hpp | 12 +- ...itor_environment_thunderbolts_gradient.cpp | 2 +- ...itor_environment_thunderbolts_gradient.hpp | 12 +- ...ditor_environment_thunderbolts_manager.cpp | 6 +- ...ditor_environment_thunderbolts_manager.hpp | 12 +- ...r_environment_thunderbolts_thunderbolt.cpp | 2 +- ...r_environment_thunderbolts_thunderbolt.hpp | 12 +- ...nvironment_thunderbolts_thunderbolt_id.cpp | 2 +- ...nvironment_thunderbolts_thunderbolt_id.hpp | 12 +- .../editor_environment_weathers_manager.cpp | 4 +- .../editor_environment_weathers_manager.hpp | 12 +- .../editor_environment_weathers_time.cpp | 2 +- .../editor_environment_weathers_time.hpp | 12 +- .../editor_environment_weathers_weather.cpp | 4 +- .../editor_environment_weathers_weather.hpp | 12 +- src/xrEngine/engine_impl.cpp | 2 +- src/xrEngine/engine_impl.hpp | 6 +- src/xrEngine/ide.hpp | 6 +- src/xrEngine/line_edit_control.cpp | 20 +- src/xrEngine/line_edit_control.h | 16 +- src/xrEngine/line_editor.cpp | 2 +- src/xrEngine/line_editor.h | 6 +- src/xrEngine/mailSlot.cpp | 30 +- src/xrEngine/main.cpp | 2 +- src/xrEngine/mp_logging.h | 2 +- src/xrEngine/profiler.cpp | 22 +- src/xrEngine/profiler.h | 2 +- src/xrEngine/property_collection.hpp | 4 +- src/xrEngine/property_collection_forward.hpp | 2 +- src/xrEngine/property_collection_inline.hpp | 2 +- src/xrEngine/psystem.h | 108 ++-- src/xrEngine/pure.h | 4 +- src/xrEngine/pure_relcase.h | 2 +- src/xrEngine/resource.rc | 18 +- src/xrEngine/stdafx.h | 10 +- src/xrEngine/thunderbolt.cpp | 4 +- src/xrEngine/thunderbolt.h | 6 +- src/xrEngine/tntQAVI.cpp | 14 +- src/xrEngine/tntQAVI.h | 4 +- src/xrEngine/vis_common.h | 12 +- src/xrEngine/x_ray.cpp | 6 +- src/xrEngine/x_ray.h | 2 +- src/xrEngine/xrHemisphere.cpp | 14 +- src/xrEngine/xrHemisphere.h | 2 +- src/xrEngine/xrSASH.cpp | 2 +- src/xrEngine/xrSASH.h | 4 +- src/xrEngine/xrSheduler.cpp | 42 +- src/xrEngine/xrSheduler.h | 6 +- src/xrEngine/xrTheora_Stream.cpp | 2 +- src/xrEngine/xrTheora_Stream.h | 4 +- src/xrEngine/xrTheora_Surface.cpp | 6 +- src/xrEngine/xrTheora_Surface.h | 2 +- src/xrEngine/xrTheora_Surface_mmx.cpp | 2 +- src/xrEngine/xr_collide_form.cpp | 18 +- src/xrEngine/xr_collide_form.h | 32 +- src/xrEngine/xr_efflensflare.cpp | 2 +- src/xrEngine/xr_efflensflare.h | 2 +- src/xrEngine/xr_input.h | 8 +- src/xrEngine/xr_ioc_cmd.cpp | 22 +- src/xrEngine/xr_ioc_cmd.h | 2 +- src/xrEngine/xr_object.h | 30 +- src/xrEngine/xr_object_list.cpp | 20 +- src/xrEngine/xr_object_list.h | 6 +- src/xrGame/Actor.cpp | 24 +- src/xrGame/Actor.h | 36 +- src/xrGame/ActorAnimation.cpp | 10 +- src/xrGame/ActorAnimation.h | 2 +- src/xrGame/ActorCondition.cpp | 10 +- src/xrGame/ActorCondition.h | 2 +- src/xrGame/ActorEffector.cpp | 4 +- src/xrGame/ActorEffector.h | 4 +- src/xrGame/ActorHelmet.cpp | 4 +- src/xrGame/ActorInput.cpp | 24 +- src/xrGame/ActorVehicle.cpp | 2 +- src/xrGame/Actor_Events.cpp | 34 +- src/xrGame/Actor_Feel.cpp | 10 +- src/xrGame/Actor_Movement.cpp | 28 +- src/xrGame/Actor_Network.cpp | 54 +- src/xrGame/Actor_Weapon.cpp | 16 +- src/xrGame/AdvancedDetector.cpp | 2 +- src/xrGame/Artefact.cpp | 12 +- src/xrGame/BlackGraviArtifact.cpp | 20 +- src/xrGame/BreakableObject.cpp | 2 +- src/xrGame/BreakableObject.h | 4 +- src/xrGame/CalculateTriangle.h | 2 +- src/xrGame/CameraFirstEye.h | 2 +- src/xrGame/CameraLook.cpp | 4 +- src/xrGame/CameraRecoil.h | 4 +- src/xrGame/Car.cpp | 42 +- src/xrGame/Car.h | 32 +- src/xrGame/CarDoors.cpp | 12 +- src/xrGame/CarSound.cpp | 2 +- src/xrGame/CarWeapon.cpp | 8 +- src/xrGame/CarWeapon.h | 2 +- src/xrGame/CarWheels.cpp | 10 +- src/xrGame/CdkeyDecode/base32.c | 2 +- src/xrGame/CdkeyDecode/cdkeydecode.c | 10 +- src/xrGame/CharacterPhysicsSupport.cpp | 32 +- src/xrGame/CharacterPhysicsSupport.h | 2 +- src/xrGame/ClimableObject.cpp | 6 +- src/xrGame/ClimableObject.h | 10 +- src/xrGame/ContextMenu.h | 2 +- src/xrGame/CustomDetector.h | 4 +- src/xrGame/CustomMonster.cpp | 32 +- src/xrGame/CustomMonster.h | 24 +- src/xrGame/CustomOutfit.cpp | 6 +- src/xrGame/CustomRocket.cpp | 8 +- src/xrGame/CustomRocket.h | 8 +- src/xrGame/CustomZone.cpp | 26 +- src/xrGame/CustomZone.h | 8 +- src/xrGame/DelayedActionFuse.cpp | 6 +- src/xrGame/DemoInfo.cpp | 4 +- src/xrGame/DemoInfo.h | 6 +- src/xrGame/DemoInfo_Loader.h | 4 +- src/xrGame/DemoPLay_Control.cpp | 12 +- src/xrGame/DemoPlay_Control.h | 20 +- src/xrGame/DestroyablePhysicsObject.cpp | 5 +- src/xrGame/DisablingParams.cpp | 8 +- src/xrGame/DynamicHeightMap.cpp | 2 +- src/xrGame/DynamicHeightMap.h | 22 +- src/xrGame/EffectorBobbing.h | 2 +- src/xrGame/EffectorShot.cpp | 12 +- src/xrGame/EffectorShot.h | 5 +- src/xrGame/ElevatorState.cpp | 22 +- src/xrGame/ElevatorState.h | 2 +- src/xrGame/Entity.cpp | 5 +- src/xrGame/EntityCondition.h | 10 +- src/xrGame/Explosive.cpp | 42 +- src/xrGame/Explosive.h | 2 +- src/xrGame/ExplosiveRocket.h | 8 +- src/xrGame/GameObject.cpp | 26 +- src/xrGame/GameObject.h | 32 +- src/xrGame/GamePersistent.cpp | 40 +- src/xrGame/GamePersistent.h | 6 +- src/xrGame/GametaskManager.cpp | 8 +- src/xrGame/GlobalFeelTouch.hpp | 4 +- src/xrGame/GraviZone.cpp | 14 +- src/xrGame/Grenade.cpp | 6 +- src/xrGame/Grenade.h | 4 +- src/xrGame/HUDCrosshair.cpp | 2 +- src/xrGame/HUDManager.cpp | 8 +- src/xrGame/HangingLamp.cpp | 14 +- src/xrGame/HangingLamp.h | 8 +- src/xrGame/Helicopter.cpp | 6 +- src/xrGame/Helicopter2.cpp | 12 +- src/xrGame/HelicopterMovementManager.cpp | 9 +- src/xrGame/HelicopterWeapon.cpp | 6 +- src/xrGame/Hit.cpp | 2 +- src/xrGame/HitMarker.cpp | 4 +- src/xrGame/HitMarker.h | 2 +- src/xrGame/HudItem.cpp | 4 +- src/xrGame/HudItem.h | 4 +- src/xrGame/HudSound.cpp | 2 +- src/xrGame/HudSound.h | 4 +- src/xrGame/IKFoot.cpp | 20 +- src/xrGame/IKLimbsController.cpp | 10 +- src/xrGame/InfoDocument.cpp | 6 +- src/xrGame/Inventory.cpp | 48 +- src/xrGame/Inventory.h | 6 +- src/xrGame/InventoryOwner.h | 2 +- src/xrGame/Level.cpp | 8 +- src/xrGame/Level.h | 36 +- src/xrGame/LevelFogOfWar.cpp | 10 +- src/xrGame/LevelGraphDebugRender.cpp | 14 +- src/xrGame/LevelGraphDebugRender.hpp | 2 +- src/xrGame/Level_Bullet_Manager.cpp | 36 +- src/xrGame/Level_Bullet_Manager.h | 52 +- src/xrGame/Level_GameSpy_Funcs.cpp | 2 +- src/xrGame/Level_SLS_Default.cpp | 2 +- src/xrGame/Level_SLS_Load.cpp | 2 +- src/xrGame/Level_SLS_Save.cpp | 2 +- src/xrGame/Level_bullet_manager_firetrace.cpp | 33 +- src/xrGame/Level_input.cpp | 36 +- src/xrGame/Level_load.cpp | 2 +- src/xrGame/Level_network.cpp | 32 +- src/xrGame/Level_network_Demo.cpp | 10 +- src/xrGame/Level_network_Demo.h | 6 +- src/xrGame/Level_network_digest_computer.cpp | 2 +- src/xrGame/Level_network_map_sync.cpp | 14 +- src/xrGame/Level_network_map_sync.h | 6 +- src/xrGame/Level_network_messages.cpp | 12 +- src/xrGame/Level_network_spawn.cpp | 20 +- src/xrGame/Level_network_start_client.cpp | 14 +- src/xrGame/Level_secure_messaging.cpp | 8 +- src/xrGame/Level_start.cpp | 4 +- src/xrGame/MPPlayersBag.cpp | 4 +- src/xrGame/MainMenu.cpp | 2 +- src/xrGame/MainMenu.h | 4 +- src/xrGame/MathUtils.cpp | 102 ++-- src/xrGame/MathUtils.h | 18 +- src/xrGame/Message_Filter.cpp | 6 +- src/xrGame/Message_Filter.h | 4 +- src/xrGame/Mincer.cpp | 2 +- src/xrGame/Missile.cpp | 6 +- src/xrGame/NET_Queue.h | 2 +- src/xrGame/PHCollisionDamageReceiver.cpp | 18 +- src/xrGame/PHCollisionDamageReceiver.h | 2 +- src/xrGame/PHDebug.cpp | 19 +- src/xrGame/PHDestroyable.cpp | 8 +- src/xrGame/PHMovementControl.cpp | 129 +++-- src/xrGame/PHMovementControl.h | 70 +-- src/xrGame/PHMovementDynamicActivate.cpp | 2 +- src/xrGame/PHSkeleton.cpp | 18 +- src/xrGame/PHSkeleton.h | 10 +- src/xrGame/ParticlesObject.cpp | 4 +- src/xrGame/ParticlesObject.h | 4 +- src/xrGame/ParticlesPlayer.h | 8 +- src/xrGame/PhraseDialog.cpp | 2 +- src/xrGame/PhysicObject.cpp | 14 +- src/xrGame/PhysicObject.h | 8 +- src/xrGame/PhysicsGamePars.cpp | 4 +- src/xrGame/PhysicsShellHolder.cpp | 4 +- src/xrGame/PhysicsShellHolder.h | 4 +- src/xrGame/PhysicsSkeletonObject.cpp | 2 +- src/xrGame/PhysicsSkeletonObject.h | 4 +- src/xrGame/RadioactiveZone.cpp | 4 +- src/xrGame/RadioactiveZone.h | 2 +- src/xrGame/ShootingObject.cpp | 42 +- src/xrGame/ShootingObject.h | 6 +- src/xrGame/SimpleDetector.cpp | 2 +- src/xrGame/SleepEffector.cpp | 2 +- src/xrGame/SleepEffector.h | 8 +- src/xrGame/Spectator.cpp | 16 +- src/xrGame/Spectator.h | 9 +- src/xrGame/TeleWhirlwind.cpp | 6 +- src/xrGame/Torch.cpp | 14 +- src/xrGame/Torch.h | 4 +- src/xrGame/Tracer.cpp | 12 +- src/xrGame/UIAchivementsIndicator.h | 2 +- src/xrGame/UIGameAHunt.cpp | 6 +- src/xrGame/UIGameCTA.cpp | 6 +- src/xrGame/UIGameCustom.cpp | 2 +- src/xrGame/UIGameDM.cpp | 6 +- src/xrGame/UIGameMP.cpp | 2 +- src/xrGame/UIGameMP.h | 6 +- src/xrGame/UIGameSP.cpp | 4 +- src/xrGame/UIGameTDM.cpp | 6 +- src/xrGame/UIPlayerItem.h | 2 +- src/xrGame/UIStaticItem.cpp | 8 +- src/xrGame/UITeamHeader.cpp | 2 +- src/xrGame/UITeamHeader.h | 4 +- src/xrGame/UITeamPanels.cpp | 2 +- src/xrGame/UITeamState.cpp | 10 +- src/xrGame/Weapon.cpp | 28 +- src/xrGame/Weapon.h | 44 +- src/xrGame/WeaponAutomaticShotgun.cpp | 2 +- src/xrGame/WeaponBinocularsVision.h | 2 +- src/xrGame/WeaponFN2000.h | 2 +- src/xrGame/WeaponHPSA.h | 2 +- src/xrGame/WeaponKnife.cpp | 48 +- src/xrGame/WeaponKnife.h | 6 +- src/xrGame/WeaponLR300.h | 2 +- src/xrGame/WeaponMagazined.cpp | 18 +- src/xrGame/WeaponPM.h | 2 +- src/xrGame/WeaponRG6.cpp | 2 +- src/xrGame/WeaponRPG7.h | 2 +- src/xrGame/WeaponSVD.cpp | 2 +- src/xrGame/WeaponShotgun.cpp | 2 +- src/xrGame/WeaponStatMgun.cpp | 8 +- src/xrGame/WeaponStatMgun.h | 6 +- src/xrGame/WeaponUpgrade.cpp | 7 +- src/xrGame/account_manager.cpp | 6 +- src/xrGame/account_manager.h | 8 +- src/xrGame/account_manager_console.h | 20 +- src/xrGame/accumulative_states.h | 10 +- src/xrGame/action_planner_inline.h | 7 +- src/xrGame/action_planner_script.cpp | 2 +- src/xrGame/actor_communication.cpp | 2 +- src/xrGame/actor_defs.h | 20 +- src/xrGame/actor_mp_client.h | 2 +- src/xrGame/actor_mp_client_export.cpp | 5 +- src/xrGame/actor_mp_client_import.cpp | 2 +- src/xrGame/actor_mp_server.cpp | 4 +- src/xrGame/actor_mp_server.h | 2 +- src/xrGame/actor_mp_state.cpp | 46 +- src/xrGame/actor_mp_state.h | 14 +- src/xrGame/actor_mp_state_inline.h | 2 +- src/xrGame/actor_statistic_mgr.cpp | 4 +- src/xrGame/agent_enemy_manager.cpp | 6 +- src/xrGame/agent_location_manager.cpp | 4 +- src/xrGame/agent_manager.cpp | 12 +- src/xrGame/agent_manager.h | 12 +- src/xrGame/agent_member_manager.cpp | 8 +- src/xrGame/ai/ai_monsters_misc.h | 2 +- src/xrGame/ai/crow/ai_crow.cpp | 12 +- src/xrGame/ai/monsters/ai_monster_bones.cpp | 6 +- src/xrGame/ai/monsters/ai_monster_bones.h | 10 +- src/xrGame/ai/monsters/ai_monster_defs.h | 28 +- .../ai/monsters/ai_monster_effector.cpp | 2 +- src/xrGame/ai/monsters/ai_monster_effector.h | 8 +- .../ai/monsters/ai_monster_motion_stats.h | 2 +- .../ai/monsters/ai_monster_shared_data.h | 2 +- src/xrGame/ai/monsters/ai_monster_squad.h | 14 +- .../ai/monsters/ai_monster_squad_attack.cpp | 6 +- .../ai/monsters/ai_monster_squad_rest.cpp | 8 +- src/xrGame/ai/monsters/anti_aim_ability.cpp | 12 +- src/xrGame/ai/monsters/anti_aim_ability.h | 2 +- .../ai/monsters/basemonster/base_monster.cpp | 8 +- .../ai/monsters/basemonster/base_monster.h | 12 +- .../basemonster/base_monster_debug.cpp | 2 +- .../basemonster/base_monster_feel.cpp | 57 +- .../basemonster/base_monster_startup.cpp | 6 +- .../ai/monsters/bloodsucker/bloodsucker.cpp | 16 +- .../ai/monsters/bloodsucker/bloodsucker.h | 4 +- .../bloodsucker_attack_state_hide_inline.h | 6 +- .../bloodsucker_attack_state_inline.h | 6 +- .../bloodsucker/bloodsucker_predator_inline.h | 8 +- .../bloodsucker_predator_lite_inline.h | 8 +- .../bloodsucker_state_capture_jump_inline.h | 2 +- .../bloodsucker_vampire_effector.h | 4 +- src/xrGame/ai/monsters/boar/boar.cpp | 2 +- src/xrGame/ai/monsters/burer/burer.cpp | 50 +- .../burer/burer_state_attack_inline.h | 2 +- .../burer_state_attack_run_around_inline.h | 6 +- .../burer/burer_state_attack_shield_inline.h | 2 +- .../burer/burer_state_attack_tele_inline.h | 2 +- src/xrGame/ai/monsters/chimera/chimera.cpp | 6 +- .../monsters/chimera/chimera_attack_state.h | 4 +- .../chimera/chimera_attack_state_inline.h | 10 +- src/xrGame/ai/monsters/control_animation.cpp | 4 +- .../ai/monsters/control_animation_base.cpp | 4 +- .../ai/monsters/control_animation_base.h | 18 +- .../monsters/control_animation_base_accel.cpp | 2 +- .../control_animation_base_update.cpp | 2 +- src/xrGame/ai/monsters/control_com_defs.h | 22 +- src/xrGame/ai/monsters/control_direction.h | 2 +- src/xrGame/ai/monsters/control_jump.cpp | 6 +- src/xrGame/ai/monsters/control_jump.h | 12 +- src/xrGame/ai/monsters/control_manager.cpp | 8 +- src/xrGame/ai/monsters/control_manager.h | 4 +- .../ai/monsters/control_manager_custom.cpp | 2 +- .../ai/monsters/control_manager_custom.h | 2 +- src/xrGame/ai/monsters/control_movement.cpp | 2 +- .../ai/monsters/control_path_builder.cpp | 2 +- src/xrGame/ai/monsters/control_path_builder.h | 2 +- .../ai/monsters/control_path_builder_base.h | 8 +- .../control_path_builder_base_path.cpp | 4 +- .../ai/monsters/control_rotation_jump.h | 4 +- src/xrGame/ai/monsters/control_run_attack.cpp | 2 +- .../ai/monsters/controller/controller.cpp | 4 +- .../ai/monsters/controller/controller.h | 6 +- .../controller/controller_direction.cpp | 4 +- .../controller/controller_psy_hit.cpp | 2 +- src/xrGame/ai/monsters/dog/dog.cpp | 34 +- .../ai/monsters/dog/dog_state_manager.cpp | 4 +- src/xrGame/ai/monsters/energy_holder.h | 14 +- .../group_states/group_state_attack_inline.h | 14 +- .../group_states/group_state_custom_inline.h | 2 +- .../group_state_eat_drag_inline.h | 4 +- .../group_states/group_state_eat_inline.h | 2 +- .../group_state_hear_danger_sound_inline.h | 4 +- .../group_state_home_point_attack_inline.h | 10 +- .../group_state_rest_idle_inline.h | 14 +- .../ai/monsters/group_states/state_adapter.h | 2 +- src/xrGame/ai/monsters/invisibility.h | 6 +- src/xrGame/ai/monsters/monster_aura.cpp | 8 +- src/xrGame/ai/monsters/monster_aura.h | 2 +- src/xrGame/ai/monsters/monster_home.cpp | 4 +- src/xrGame/ai/monsters/monster_sound_defs.h | 4 +- src/xrGame/ai/monsters/monster_sound_memory.h | 10 +- .../monsters/monster_state_manager_inline.h | 4 +- .../ai/monsters/poltergeist/poltergeist.h | 4 +- .../poltergeist/poltergeist_flame_thrower.cpp | 22 +- .../poltergeist/poltergeist_movement.cpp | 4 +- .../poltergeist/poltergeist_state_manager.cpp | 6 +- .../poltergeist/poltergeist_telekinesis.cpp | 4 +- .../ai/monsters/pseudodog/pseudodog.cpp | 8 +- src/xrGame/ai/monsters/pseudodog/pseudodog.h | 2 +- .../monsters/pseudogigant/pseudo_gigant.cpp | 71 ++- .../ai/monsters/pseudogigant/pseudo_gigant.h | 4 +- .../pseudo_gigant_step_effector.cpp | 2 +- src/xrGame/ai/monsters/rats/ai_rat.cpp | 8 +- src/xrGame/ai/monsters/rats/ai_rat.h | 10 +- src/xrGame/ai/monsters/rats/ai_rat_feel.cpp | 4 +- src/xrGame/ai/monsters/rats/ai_rat_fire.cpp | 24 +- src/xrGame/ai/monsters/rats/ai_rat_fsm.cpp | 16 +- .../ai/monsters/rats/ai_rat_templates.cpp | 8 +- src/xrGame/ai/monsters/state_inline.h | 2 +- .../states/monster_state_attack_camp_inline.h | 8 +- .../states/monster_state_attack_on_run.h | 4 +- .../monster_state_attack_on_run_inline.h | 20 +- .../states/monster_state_eat_drag_inline.h | 4 +- .../states/monster_state_help_sound_inline.h | 6 +- .../monster_state_home_point_danger_inline.h | 8 +- .../states/monster_state_rest_idle_inline.h | 8 +- .../monster_state_smart_terrain_task_inline.h | 6 +- src/xrGame/ai/monsters/states/state_data.h | 2 +- src/xrGame/ai/monsters/telekinesis_inline.h | 2 +- src/xrGame/ai/monsters/telekinetic_object.cpp | 2 +- src/xrGame/ai/monsters/zombie/zombie.h | 2 +- src/xrGame/ai/phantom/phantom.cpp | 22 +- src/xrGame/ai/position_prediction.h | 4 +- src/xrGame/ai/stalker/ai_stalker.cpp | 64 +-- src/xrGame/ai/stalker/ai_stalker.h | 8 +- src/xrGame/ai/stalker/ai_stalker_cover.cpp | 8 +- src/xrGame/ai/stalker/ai_stalker_debug.cpp | 30 +- src/xrGame/ai/stalker/ai_stalker_feel.cpp | 4 +- src/xrGame/ai/stalker/ai_stalker_fire.cpp | 19 +- src/xrGame/ai/stalker/ai_stalker_impl.h | 4 +- src/xrGame/ai/stalker/ai_stalker_script.cpp | 2 +- .../ai/stalker/ai_stalker_script_entity.cpp | 5 +- src/xrGame/ai/trader/ai_trader.cpp | 2 +- src/xrGame/ai/weighted_random.h | 2 +- src/xrGame/ai_debug.h | 4 +- src/xrGame/ai_debug_variables.cpp | 2 +- src/xrGame/ai_debug_variables.h | 4 +- src/xrGame/ai_obstacle.h | 2 +- src/xrGame/ai_obstacle_inline.h | 2 +- src/xrGame/ai_space.cpp | 4 +- src/xrGame/ai_space.h | 2 +- src/xrGame/aimers_base.cpp | 2 +- src/xrGame/aimers_base.h | 6 +- src/xrGame/aimers_base_inline.h | 2 +- src/xrGame/aimers_bone.h | 6 +- src/xrGame/aimers_bone_inline.h | 6 +- src/xrGame/aimers_weapon.cpp | 4 +- src/xrGame/aimers_weapon.h | 8 +- src/xrGame/aimers_weapon_inline.h | 2 +- src/xrGame/alife_anomalous_zone.cpp | 2 +- src/xrGame/alife_creature_abstract.cpp | 2 +- src/xrGame/alife_dynamic_object.cpp | 2 +- src/xrGame/alife_graph_registry.cpp | 2 +- .../alife_online_offline_group_brain.cpp | 16 +- src/xrGame/alife_registry_wrappers.h | 3 +- src/xrGame/alife_simulator.cpp | 8 +- src/xrGame/alife_simulator.h | 4 +- src/xrGame/alife_simulator_base.h | 2 +- src/xrGame/alife_simulator_script.cpp | 6 +- src/xrGame/alife_storage_manager.cpp | 4 +- src/xrGame/alife_switch_manager.cpp | 4 +- src/xrGame/alife_trader_abstract.cpp | 7 +- src/xrGame/alife_update_manager.cpp | 6 +- src/xrGame/ammunition_groups.cpp | 2 +- src/xrGame/ammunition_groups.h | 6 +- src/xrGame/animation_movement_controller.cpp | 8 +- src/xrGame/animation_script_callback.cpp | 2 +- src/xrGame/anticheat_dumpable_object.h | 2 +- src/xrGame/artefact_activation.cpp | 6 +- src/xrGame/artefact_activation.h | 4 +- src/xrGame/atlas_stalkercoppc_v1.h | 274 ++++----- src/xrGame/atlas_stalkercs_v1.h | 270 ++++----- src/xrGame/atlas_submit_queue.cpp | 2 +- src/xrGame/atlas_submit_queue.h | 6 +- src/xrGame/attachable_item.cpp | 2 +- src/xrGame/attachment_owner.cpp | 2 +- src/xrGame/awards_store.cpp | 6 +- src/xrGame/awards_store.h | 6 +- src/xrGame/battleye_system.cpp | 14 +- src/xrGame/battleye_system.h | 6 +- src/xrGame/best_scores_helper.cpp | 4 +- src/xrGame/best_scores_helper.h | 6 +- src/xrGame/best_scores_store.cpp | 6 +- src/xrGame/best_scores_store.h | 6 +- src/xrGame/black_list.cpp | 2 +- src/xrGame/black_list.h | 6 +- src/xrGame/bone_groups.cpp | 2 +- src/xrGame/bone_groups.h | 8 +- src/xrGame/car_memory.h | 2 +- src/xrGame/cdkey_ban_list.h | 6 +- src/xrGame/character_hit_animations.cpp | 10 +- src/xrGame/character_hit_animations_params.h | 2 +- src/xrGame/character_shell_control.cpp | 2 +- src/xrGame/character_shell_control.h | 2 +- src/xrGame/client_spawn_manager.cpp | 2 +- src/xrGame/client_spawn_manager.h | 2 +- src/xrGame/client_spawn_manager_inline.h | 2 +- src/xrGame/command_switch_counter.h | 6 +- src/xrGame/configs_common.cpp | 10 +- src/xrGame/configs_common.h | 4 +- src/xrGame/configs_dump_verifyer.cpp | 4 +- src/xrGame/configs_dump_verifyer.h | 8 +- src/xrGame/configs_dumper.cpp | 10 +- src/xrGame/configs_dumper.h | 6 +- src/xrGame/console_commands.cpp | 100 ++-- src/xrGame/console_commands_mp.cpp | 86 +-- src/xrGame/cover_evaluators.cpp | 4 +- src/xrGame/cover_manager.cpp | 2 +- src/xrGame/cta_game_artefact.cpp | 6 +- src/xrGame/cta_game_artefact.h | 4 +- src/xrGame/cta_game_artefact_activation.h | 4 +- src/xrGame/damage_manager.cpp | 2 +- src/xrGame/danger_manager.cpp | 18 +- src/xrGame/date_time.cpp | 8 +- src/xrGame/dbg_draw_frustum.cpp | 4 +- src/xrGame/death_anims_predicates.cpp | 20 +- src/xrGame/debug_renderer.cpp | 18 +- src/xrGame/debug_renderer.h | 2 +- src/xrGame/debug_text_tree.cpp | 12 +- src/xrGame/debug_text_tree.h | 16 +- src/xrGame/detail_path_manager.cpp | 2 +- src/xrGame/detail_path_manager.h | 8 +- src/xrGame/detail_path_manager_inline.h | 4 +- src/xrGame/detail_path_manager_smooth.cpp | 2 +- src/xrGame/doors.h | 6 +- src/xrGame/doors_actor.cpp | 16 +- src/xrGame/doors_actor.h | 10 +- src/xrGame/doors_door.cpp | 20 +- src/xrGame/doors_door.h | 8 +- src/xrGame/doors_manager.cpp | 2 +- src/xrGame/doors_manager.h | 6 +- src/xrGame/double_shot_double_kill.h | 6 +- src/xrGame/dynamic_obstacles_avoider.cpp | 2 +- src/xrGame/eatable_item_object.h | 12 +- src/xrGame/ef_base.h | 2 +- src/xrGame/ef_primary.cpp | 2 +- src/xrGame/enemy_manager.cpp | 14 +- src/xrGame/entity_alive.cpp | 8 +- src/xrGame/entity_alive.h | 8 +- src/xrGame/event_conditions_collection.cpp | 10 +- src/xrGame/event_conditions_collection.h | 24 +- src/xrGame/faster_than_bullets_time.cpp | 2 +- src/xrGame/faster_than_bullets_time.h | 6 +- src/xrGame/file_transfer.cpp | 10 +- src/xrGame/file_transfer.h | 4 +- src/xrGame/filereceiver_node.cpp | 2 +- src/xrGame/filereceiver_node.h | 10 +- src/xrGame/filetransfer_common.h | 20 +- src/xrGame/filetransfer_node.cpp | 4 +- src/xrGame/filetransfer_node.h | 20 +- src/xrGame/fire_disp_controller.cpp | 2 +- src/xrGame/fire_disp_controller.h | 4 +- src/xrGame/firedeps.h | 10 +- src/xrGame/first_bullet_controller.h | 4 +- src/xrGame/flare.cpp | 4 +- src/xrGame/game_base.cpp | 28 +- src/xrGame/game_base.h | 2 +- src/xrGame/game_base_kill_type.h | 2 +- src/xrGame/game_cl_artefacthunt.cpp | 12 +- src/xrGame/game_cl_artefacthunt.h | 6 +- src/xrGame/game_cl_base.cpp | 12 +- src/xrGame/game_cl_base.h | 2 +- .../game_cl_base_weapon_usage_statistic.cpp | 20 +- .../game_cl_base_weapon_usage_statistic.h | 6 +- src/xrGame/game_cl_capture_the_artefact.cpp | 20 +- src/xrGame/game_cl_capture_the_artefact.h | 2 +- ..._capture_the_artefact_captions_manager.cpp | 2 +- ...cl_capture_the_artefact_captions_manager.h | 4 +- .../game_cl_capturetheartefact_buywnd.cpp | 2 +- src/xrGame/game_cl_deathmatch.h | 8 +- src/xrGame/game_cl_deathmatch_buywnd.cpp | 6 +- src/xrGame/game_cl_mp.cpp | 44 +- src/xrGame/game_cl_mp.h | 8 +- src/xrGame/game_cl_mp_messages_menu.cpp | 4 +- src/xrGame/game_cl_mp_snd_messages.cpp | 2 +- src/xrGame/game_cl_mp_snd_messages.h | 2 +- src/xrGame/game_cl_teamdeathmatch.cpp | 8 +- src/xrGame/game_events_handler.h | 6 +- src/xrGame/game_state_accumulator.cpp | 6 +- src/xrGame/game_state_accumulator.h | 8 +- .../game_state_accumulator_state_register.cpp | 4 +- src/xrGame/game_sv_artefacthunt.cpp | 18 +- src/xrGame/game_sv_artefacthunt.h | 8 +- src/xrGame/game_sv_base.cpp | 46 +- src/xrGame/game_sv_base.h | 14 +- src/xrGame/game_sv_capture_the_artefact.cpp | 49 +- src/xrGame/game_sv_capture_the_artefact.h | 18 +- ...game_sv_capture_the_artefact_buy_event.cpp | 6 +- ..._sv_capture_the_artefact_process_event.cpp | 6 +- src/xrGame/game_sv_deathmatch.cpp | 30 +- src/xrGame/game_sv_deathmatch.h | 14 +- .../game_sv_deathmatch_process_event.cpp | 8 +- src/xrGame/game_sv_event_queue.cpp | 10 +- src/xrGame/game_sv_item_respawner.cpp | 20 +- src/xrGame/game_sv_item_respawner.h | 2 +- src/xrGame/game_sv_mp.cpp | 56 +- src/xrGame/game_sv_mp.h | 22 +- src/xrGame/game_sv_mp_script.cpp | 6 +- src/xrGame/game_sv_mp_script.h | 4 +- src/xrGame/game_sv_mp_team.h | 6 +- src/xrGame/game_sv_mp_vote_flags.h | 2 +- src/xrGame/game_sv_teamdeathmatch.cpp | 10 +- src/xrGame/game_sv_teamdeathmatch.h | 2 +- .../game_sv_teamdeathmatch_process_event.cpp | 2 +- src/xrGame/gamespy/GameSpy_QR2_callbacks.cpp | 84 +-- src/xrGame/group_hierarchy_holder.cpp | 6 +- src/xrGame/group_hierarchy_holder.h | 4 +- src/xrGame/group_hierarchy_holder_inline.h | 4 +- src/xrGame/gsc_dsigned_ltx.cpp | 4 +- src/xrGame/gsc_dsigned_ltx.h | 6 +- src/xrGame/harvest_time.cpp | 4 +- src/xrGame/harvest_time.h | 6 +- src/xrGame/hit_immunity.cpp | 4 +- src/xrGame/hit_memory_manager.cpp | 24 +- src/xrGame/hits_store.cpp | 2 +- src/xrGame/hits_store.h | 8 +- src/xrGame/hits_store_inline.h | 2 +- src/xrGame/holder_custom.h | 2 +- src/xrGame/hud_item_object.h | 2 +- src/xrGame/ik/Dof7control.cpp | 2 +- src/xrGame/ik/Dof7control.h | 4 +- src/xrGame/ik/IKLimb.cpp | 38 +- src/xrGame/ik/IKLimb.h | 2 +- src/xrGame/ik/eulersolver.h | 12 +- src/xrGame/ik/jtlimits.h | 18 +- src/xrGame/ik/mathTrig.cpp | 2 +- src/xrGame/ik_foot_collider.cpp | 6 +- src/xrGame/ik_limb_state.h | 2 +- src/xrGame/ik_object_shift.cpp | 2 +- src/xrGame/imotion_position.cpp | 10 +- src/xrGame/inventory_item.cpp | 22 +- src/xrGame/inventory_item.h | 30 +- src/xrGame/inventory_item_inline.h | 4 +- src/xrGame/inventory_item_object.h | 12 +- src/xrGame/inventory_item_upgrade.cpp | 10 +- src/xrGame/inventory_owner_info.cpp | 12 +- src/xrGame/inventory_quickswitch.cpp | 10 +- src/xrGame/inventory_upgrade.cpp | 14 +- src/xrGame/inventory_upgrade.h | 10 +- src/xrGame/inventory_upgrade_base.cpp | 10 +- src/xrGame/inventory_upgrade_base.h | 10 +- src/xrGame/inventory_upgrade_base_inline.h | 6 +- src/xrGame/inventory_upgrade_group.cpp | 6 +- src/xrGame/inventory_upgrade_group.h | 10 +- src/xrGame/inventory_upgrade_group_inline.h | 6 +- src/xrGame/inventory_upgrade_inline.h | 6 +- src/xrGame/inventory_upgrade_manager.cpp | 22 +- src/xrGame/inventory_upgrade_manager.h | 12 +- src/xrGame/inventory_upgrade_manager_inline.h | 6 +- src/xrGame/inventory_upgrade_property.cpp | 8 +- src/xrGame/inventory_upgrade_property.h | 8 +- .../inventory_upgrade_property_inline.h | 6 +- src/xrGame/inventory_upgrade_root.cpp | 6 +- src/xrGame/inventory_upgrade_root.h | 10 +- src/xrGame/inventory_upgrade_root_inline.h | 6 +- src/xrGame/invincible_fury.cpp | 4 +- src/xrGame/invincible_fury.h | 6 +- src/xrGame/item_manager.cpp | 2 +- src/xrGame/killer_victim_velocity_angle.cpp | 2 +- src/xrGame/killer_victim_velocity_angle.h | 6 +- src/xrGame/kills_store.cpp | 2 +- src/xrGame/kills_store.h | 8 +- src/xrGame/kills_store_inline.h | 2 +- src/xrGame/level_debug.cpp | 2 +- src/xrGame/level_script.cpp | 18 +- src/xrGame/level_sounds.cpp | 8 +- src/xrGame/login_manager.cpp | 10 +- src/xrGame/login_manager.h | 10 +- src/xrGame/magic_box3.cpp | 10 +- src/xrGame/map_location.cpp | 12 +- src/xrGame/map_location.h | 6 +- src/xrGame/map_location_defs.h | 2 +- src/xrGame/map_manager.cpp | 8 +- src/xrGame/map_manager.h | 4 +- src/xrGame/map_spot.cpp | 4 +- src/xrGame/map_spot.h | 6 +- src/xrGame/memory_manager.cpp | 6 +- src/xrGame/memory_space_impl.h | 2 +- src/xrGame/memory_space_script.cpp | 2 +- src/xrGame/min_obb.cpp | 2 +- src/xrGame/mixed_delegate.h | 4 +- src/xrGame/mixed_delegate_unique_tags.h | 6 +- src/xrGame/movement_manager.cpp | 6 +- src/xrGame/movement_manager.h | 2 +- src/xrGame/movement_manager_patrol.cpp | 4 +- src/xrGame/movement_manager_physic.cpp | 20 +- src/xrGame/moving_object.h | 2 +- src/xrGame/moving_object_inline.h | 10 +- src/xrGame/moving_objects.cpp | 4 +- src/xrGame/moving_objects.h | 4 +- src/xrGame/moving_objects_dynamic.cpp | 16 +- .../moving_objects_dynamic_collision.cpp | 4 +- src/xrGame/moving_objects_impl.h | 2 +- src/xrGame/moving_objects_inline.h | 2 +- src/xrGame/mp_config_sections.cpp | 2 +- src/xrGame/mp_config_sections.h | 12 +- src/xrGame/object_actions_inline.h | 3 +- src/xrGame/object_handler.cpp | 20 +- src/xrGame/object_handler_planner_missile.cpp | 2 +- src/xrGame/object_handler_planner_weapon.cpp | 2 +- src/xrGame/obsolete_queue.h | 2 +- src/xrGame/obsolete_queue_inline.h | 2 +- src/xrGame/obstacles_query.h | 2 +- src/xrGame/obstacles_query_inline.h | 2 +- src/xrGame/ode_redefine.h | 4 +- src/xrGame/patrol_path_manager.cpp | 10 +- src/xrGame/pda_space.h | 4 +- src/xrGame/physics_game.cpp | 6 +- src/xrGame/player_account.h | 4 +- src/xrGame/player_hud.cpp | 6 +- src/xrGame/player_hud.h | 6 +- src/xrGame/player_hud_tune.cpp | 12 +- src/xrGame/player_name_modifyer.h | 2 +- src/xrGame/player_spot_params.cpp | 4 +- src/xrGame/player_spot_params.h | 8 +- src/xrGame/player_state_achilles_heel.cpp | 2 +- src/xrGame/player_state_achilles_heel.h | 6 +- src/xrGame/player_state_ambassador.cpp | 2 +- src/xrGame/player_state_ambassador.h | 6 +- src/xrGame/player_state_ammo_elapsed.cpp | 2 +- src/xrGame/player_state_ammo_elapsed.h | 6 +- src/xrGame/player_state_avenger.cpp | 4 +- src/xrGame/player_state_avenger.h | 6 +- src/xrGame/player_state_blitzkrieg.cpp | 2 +- src/xrGame/player_state_blitzkrieg.h | 6 +- src/xrGame/player_state_cherub.cpp | 4 +- src/xrGame/player_state_cherub.h | 4 +- src/xrGame/player_state_climber.cpp | 2 +- src/xrGame/player_state_climber.h | 6 +- src/xrGame/player_state_mad.cpp | 2 +- src/xrGame/player_state_mad.h | 8 +- src/xrGame/player_state_marksman.cpp | 2 +- src/xrGame/player_state_marksman.h | 6 +- src/xrGame/player_state_multichampion.cpp | 2 +- src/xrGame/player_state_multichampion.h | 6 +- src/xrGame/player_state_opener.cpp | 2 +- src/xrGame/player_state_opener.h | 6 +- src/xrGame/player_state_param.h | 6 +- src/xrGame/player_state_params.cpp | 2 +- src/xrGame/player_state_params.h | 16 +- src/xrGame/player_state_remembrance.cpp | 2 +- src/xrGame/player_state_remembrance.h | 6 +- src/xrGame/player_state_skewer.cpp | 2 +- src/xrGame/player_state_skewer.h | 6 +- src/xrGame/player_state_toughy.h | 6 +- src/xrGame/player_team_win_score.cpp | 4 +- src/xrGame/player_team_win_score.h | 12 +- src/xrGame/pose_extrapolation.cpp | 4 +- src/xrGame/pp_effector_custom.cpp | 2 +- src/xrGame/pp_effector_distance.h | 4 +- src/xrGame/profile_data_types.cpp | 128 ++--- src/xrGame/profile_data_types.h | 10 +- src/xrGame/profile_store.cpp | 6 +- src/xrGame/profile_store.h | 6 +- src/xrGame/queued_async_method.h | 14 +- src/xrGame/rat_state_base.h | 2 +- src/xrGame/rat_state_base_inline.h | 2 +- src/xrGame/rat_state_manager.h | 2 +- src/xrGame/rat_state_manager_inline.h | 2 +- src/xrGame/rat_states.h | 2 +- src/xrGame/relation_registry.h | 14 +- src/xrGame/relation_registry_actions.cpp | 2 +- src/xrGame/restricted_object_inline.h | 2 +- src/xrGame/reward_event_generator.cpp | 2 +- src/xrGame/reward_event_generator.h | 8 +- src/xrGame/reward_event_handler.h | 6 +- src/xrGame/reward_manager.cpp | 4 +- src/xrGame/reward_manager.h | 8 +- src/xrGame/reward_snd_messages.h | 2 +- src/xrGame/rewarding_events_handlers.cpp | 2 +- src/xrGame/rewarding_events_handlers.h | 8 +- src/xrGame/rewarding_state_events.cpp | 4 +- src/xrGame/rewarding_state_events.h | 6 +- src/xrGame/screenshot_manager.cpp | 14 +- src/xrGame/screenshot_manager.h | 6 +- src/xrGame/screenshot_server.cpp | 12 +- src/xrGame/screenshot_server.h | 10 +- src/xrGame/screenshots_common.cpp | 10 +- src/xrGame/screenshots_common.h | 4 +- src/xrGame/screenshots_writer.h | 6 +- src/xrGame/script_action_wrapper.cpp | 9 +- src/xrGame/script_action_wrapper.h | 10 +- src/xrGame/script_binder.cpp | 16 +- src/xrGame/script_game_object.h | 4 +- src/xrGame/script_game_object2.cpp | 30 +- src/xrGame/script_game_object3.cpp | 10 +- src/xrGame/script_game_object_impl.h | 2 +- .../script_game_object_inventory_owner.cpp | 8 +- src/xrGame/script_game_object_script2.cpp | 4 +- src/xrGame/script_game_object_script3.cpp | 7 +- src/xrGame/script_watch_action_script.cpp | 4 +- src/xrGame/searchlight.h | 4 +- src/xrGame/secure_messaging.cpp | 4 +- src/xrGame/secure_messaging.h | 10 +- src/xrGame/sight_action.cpp | 20 +- src/xrGame/sight_action.h | 2 +- src/xrGame/sight_manager.cpp | 38 +- src/xrGame/sight_manager.h | 12 +- src/xrGame/sight_manager_space.h | 2 +- src/xrGame/sight_manager_target.cpp | 4 +- src/xrGame/silent_shots.cpp | 2 +- src/xrGame/silent_shots.h | 6 +- src/xrGame/smart_cover.cpp | 8 +- src/xrGame/smart_cover.h | 6 +- src/xrGame/smart_cover_action.h | 4 +- src/xrGame/smart_cover_action_inline.h | 4 +- src/xrGame/smart_cover_animation_planner.cpp | 4 +- src/xrGame/smart_cover_animation_planner.h | 4 +- .../smart_cover_animation_planner_inline.h | 4 +- src/xrGame/smart_cover_animation_selector.cpp | 8 +- src/xrGame/smart_cover_animation_selector.h | 4 +- .../smart_cover_animation_selector_inline.h | 4 +- .../smart_cover_default_behaviour_planner.hpp | 4 +- ...cover_default_behaviour_planner_inline.hpp | 4 +- src/xrGame/smart_cover_description.cpp | 2 +- src/xrGame/smart_cover_description.h | 4 +- src/xrGame/smart_cover_description_inline.h | 4 +- src/xrGame/smart_cover_detail.h | 6 +- src/xrGame/smart_cover_evaluators.cpp | 4 +- src/xrGame/smart_cover_evaluators.h | 6 +- src/xrGame/smart_cover_inline.h | 2 +- src/xrGame/smart_cover_loophole.cpp | 2 +- src/xrGame/smart_cover_loophole.h | 4 +- src/xrGame/smart_cover_loophole_inline.h | 4 +- .../smart_cover_loophole_planner_actions.h | 14 +- ...rt_cover_loophole_planner_actions_inline.h | 4 +- src/xrGame/smart_cover_object.cpp | 2 +- src/xrGame/smart_cover_object.h | 6 +- src/xrGame/smart_cover_object_inline.h | 2 +- src/xrGame/smart_cover_planner_actions.cpp | 4 +- src/xrGame/smart_cover_planner_actions.h | 4 +- .../smart_cover_planner_actions_inline.h | 4 +- .../smart_cover_planner_target_provider.h | 4 +- .../smart_cover_planner_target_selector.h | 4 +- ...art_cover_planner_target_selector_inline.h | 4 +- src/xrGame/smart_cover_storage.cpp | 2 +- src/xrGame/smart_cover_storage.h | 4 +- src/xrGame/smart_cover_transition.cpp | 4 +- src/xrGame/smart_cover_transition.hpp | 8 +- .../smart_cover_transition_animation.hpp | 6 +- ...mart_cover_transition_animation_inline.hpp | 6 +- src/xrGame/sound_memory_manager.cpp | 24 +- src/xrGame/space_restriction_composition.cpp | 4 +- src/xrGame/space_restriction_composition.h | 2 +- .../space_restriction_composition_inline.h | 2 +- src/xrGame/space_restriction_shape.cpp | 2 +- src/xrGame/space_restrictor.cpp | 4 +- src/xrGame/spectator_camera_first_eye.h | 4 +- src/xrGame/sprinter_stopper.cpp | 2 +- src/xrGame/sprinter_stopper.h | 6 +- src/xrGame/squad_hierarchy_holder.cpp | 2 +- src/xrGame/squad_hierarchy_holder.h | 4 +- src/xrGame/squad_hierarchy_holder_inline.h | 6 +- src/xrGame/stalker_alife_task_actions.cpp | 7 +- src/xrGame/stalker_animation_callbacks.cpp | 12 +- src/xrGame/stalker_animation_global.cpp | 4 +- src/xrGame/stalker_animation_legs.cpp | 8 +- src/xrGame/stalker_animation_manager.h | 6 +- .../stalker_animation_manager_debug.cpp | 6 +- .../stalker_animation_manager_update.cpp | 8 +- src/xrGame/stalker_animation_names.cpp | 74 +-- src/xrGame/stalker_animation_offsets.hpp | 2 +- src/xrGame/stalker_animation_pair.cpp | 10 +- src/xrGame/stalker_animation_pair.h | 14 +- src/xrGame/stalker_animation_torso.cpp | 30 +- src/xrGame/stalker_combat_action_base.cpp | 6 +- src/xrGame/stalker_combat_actions.cpp | 57 +- src/xrGame/stalker_combat_planner.cpp | 2 +- .../stalker_danger_in_direction_actions.cpp | 12 +- src/xrGame/stalker_flair.cpp | 2 +- src/xrGame/stalker_flair.h | 6 +- src/xrGame/stalker_get_distance_planner.cpp | 2 +- src/xrGame/stalker_low_cover_actions.h | 2 +- src/xrGame/stalker_low_cover_planner.h | 2 +- src/xrGame/stalker_movement_manager_base.cpp | 12 +- src/xrGame/stalker_movement_manager_base.h | 10 +- .../stalker_movement_manager_base_inline.h | 4 +- .../stalker_movement_manager_obstacles.cpp | 15 +- .../stalker_movement_manager_obstacles.h | 10 +- ...talker_movement_manager_obstacles_inline.h | 2 +- ...talker_movement_manager_obstacles_path.cpp | 18 +- .../stalker_movement_manager_smart_cover.cpp | 16 +- .../stalker_movement_manager_smart_cover.h | 8 +- ...lker_movement_manager_smart_cover_inline.h | 2 +- ...movement_manager_smart_cover_loopholes.cpp | 8 +- src/xrGame/stalker_movement_params.cpp | 2 +- src/xrGame/stalker_movement_params.h | 4 +- src/xrGame/stalker_movement_params_inline.h | 2 +- src/xrGame/stalker_property_evaluators.cpp | 4 +- src/xrGame/stalker_search_actions.cpp | 6 +- src/xrGame/stalker_search_actions.h | 2 +- src/xrGame/stalker_search_planner.h | 2 +- src/xrGame/stalker_sound_data_visitor.cpp | 4 +- src/xrGame/state_arguments_functions.cpp | 2 +- src/xrGame/state_arguments_functions.h | 14 +- src/xrGame/static_cast_checked.hpp | 12 +- src/xrGame/static_obstacles_avoider_inline.h | 2 +- src/xrGame/stats_submitter.cpp | 8 +- src/xrGame/stats_submitter.h | 6 +- src/xrGame/stats_submitter_dsa_params.cpp | 10 +- src/xrGame/steering_behaviour.cpp | 4 +- src/xrGame/steering_behaviour.h | 16 +- src/xrGame/steering_behaviour_alignment.h | 4 +- src/xrGame/steering_behaviour_base.h | 4 +- src/xrGame/steering_behaviour_base_inline.h | 2 +- src/xrGame/steering_behaviour_cohesion.h | 4 +- src/xrGame/steering_behaviour_separation.h | 4 +- src/xrGame/step_manager.cpp | 8 +- src/xrGame/step_manager_defs.h | 4 +- src/xrGame/string_table.cpp | 4 +- src/xrGame/trade.h | 2 +- src/xrGame/traffic_optimization.cpp | 2 +- src/xrGame/traffic_optimization.h | 8 +- src/xrGame/trajectories.cpp | 2 +- src/xrGame/trajectories.h | 4 +- src/xrGame/ui/ChangeWeatherDialog.cpp | 2 +- src/xrGame/ui/Restrictions.cpp | 18 +- src/xrGame/ui/ServerList.cpp | 4 +- src/xrGame/ui/ServerList.h | 2 +- src/xrGame/ui/UI3tButton.h | 4 +- src/xrGame/ui/UIActorMenu.cpp | 36 +- src/xrGame/ui/UIActorMenu.h | 8 +- src/xrGame/ui/UIActorMenuDeadBodySearch.cpp | 14 +- src/xrGame/ui/UIActorMenuInventory.cpp | 42 +- src/xrGame/ui/UIActorMenuTrade.cpp | 10 +- src/xrGame/ui/UIActorMenu_action.cpp | 8 +- src/xrGame/ui/UIActorStateInfo.cpp | 44 +- src/xrGame/ui/UIActorStateInfo.h | 12 +- src/xrGame/ui/UIAnimatedStatic.h | 2 +- src/xrGame/ui/UIBoosterInfo.h | 4 +- src/xrGame/ui/UIButton.cpp | 4 +- src/xrGame/ui/UIButton.h | 6 +- src/xrGame/ui/UIBuyWndShared.cpp | 4 +- src/xrGame/ui/UICDkey.cpp | 6 +- src/xrGame/ui/UICDkey.h | 14 +- src/xrGame/ui/UICellCustomItems.cpp | 4 +- src/xrGame/ui/UICellItem.h | 2 +- src/xrGame/ui/UIChangeMap.cpp | 2 +- src/xrGame/ui/UICharacterInfo.cpp | 4 +- src/xrGame/ui/UICheckButton.cpp | 2 +- src/xrGame/ui/UICheckButton.h | 10 +- src/xrGame/ui/UIComboBox.cpp | 4 +- src/xrGame/ui/UIComboBox.h | 12 +- src/xrGame/ui/UICustomEdit.cpp | 8 +- src/xrGame/ui/UICustomSpin.cpp | 4 +- src/xrGame/ui/UIDemoPlayControl.cpp | 6 +- src/xrGame/ui/UIDemoPlayControl.h | 8 +- src/xrGame/ui/UIDoubleProgressBar.cpp | 4 +- src/xrGame/ui/UIDoubleProgressBar.h | 8 +- src/xrGame/ui/UIDragDropListEx.cpp | 14 +- src/xrGame/ui/UIDragDropListEx.h | 12 +- src/xrGame/ui/UIEditBox.h | 10 +- src/xrGame/ui/UIEditKeyBind.cpp | 2 +- src/xrGame/ui/UIEditKeyBind.h | 10 +- src/xrGame/ui/UIFrags2.cpp | 2 +- src/xrGame/ui/UIFrameLine.h | 6 +- src/xrGame/ui/UIFrameLineWnd.cpp | 8 +- src/xrGame/ui/UIFrameLineWnd.h | 6 +- src/xrGame/ui/UIFrameWindow.cpp | 10 +- src/xrGame/ui/UIGameTutorial.h | 2 +- src/xrGame/ui/UIGameTutorialSimpleItem.cpp | 6 +- src/xrGame/ui/UIHelper.h | 4 +- src/xrGame/ui/UIHint.h | 6 +- src/xrGame/ui/UIHudStatesWnd.cpp | 14 +- src/xrGame/ui/UIHudStatesWnd.h | 2 +- src/xrGame/ui/UIInvUpgrade.cpp | 8 +- src/xrGame/ui/UIInvUpgrade.h | 4 +- src/xrGame/ui/UIInvUpgradeInfo.h | 6 +- src/xrGame/ui/UIInvUpgradeProperty.cpp | 4 +- src/xrGame/ui/UIInvUpgradeProperty.h | 8 +- src/xrGame/ui/UIInventoryUpgradeWnd.cpp | 10 +- src/xrGame/ui/UIInventoryUpgradeWnd.h | 8 +- src/xrGame/ui/UIInventoryUpgradeWnd_add.cpp | 6 +- src/xrGame/ui/UIInventoryUtilities.cpp | 6 +- src/xrGame/ui/UIItemInfo.cpp | 4 +- src/xrGame/ui/UIKickPlayer.cpp | 2 +- src/xrGame/ui/UILanimController.h | 2 +- src/xrGame/ui/UILine.cpp | 4 +- src/xrGame/ui/UILines.cpp | 4 +- src/xrGame/ui/UILines.h | 2 +- src/xrGame/ui/UIListBox.cpp | 2 +- src/xrGame/ui/UIListBoxItemMsgChain.h | 2 +- src/xrGame/ui/UIListWnd_script.cpp | 2 +- src/xrGame/ui/UILogsWnd.cpp | 4 +- src/xrGame/ui/UILogsWnd.h | 4 +- src/xrGame/ui/UIMMShniaga.cpp | 4 +- src/xrGame/ui/UIMMShniaga.h | 2 +- src/xrGame/ui/UIMainIngameWnd.cpp | 6 +- src/xrGame/ui/UIMainIngameWnd.h | 2 +- src/xrGame/ui/UIMap.cpp | 18 +- src/xrGame/ui/UIMap.h | 14 +- src/xrGame/ui/UIMapLegend.h | 10 +- src/xrGame/ui/UIMapWnd.cpp | 16 +- src/xrGame/ui/UIMapWnd.h | 2 +- src/xrGame/ui/UIMapWndActions.cpp | 8 +- src/xrGame/ui/UIMpItemsStoreWnd.cpp | 6 +- src/xrGame/ui/UIMpItemsStoreWnd.h | 2 +- src/xrGame/ui/UIMpTradeWnd.cpp | 8 +- src/xrGame/ui/UIMpTradeWnd_init.cpp | 17 +- src/xrGame/ui/UIMpTradeWnd_items.cpp | 24 +- src/xrGame/ui/UIMpTradeWnd_misc.cpp | 6 +- src/xrGame/ui/UIMpTradeWnd_trade.cpp | 16 +- src/xrGame/ui/UIMpTradeWnd_wpn.cpp | 20 +- src/xrGame/ui/UIOptionsItem.h | 10 +- src/xrGame/ui/UIOutfitInfo.cpp | 8 +- src/xrGame/ui/UIOutfitInfo.h | 8 +- src/xrGame/ui/UIPdaKillMessage.cpp | 2 +- src/xrGame/ui/UIPdaWnd.cpp | 2 +- src/xrGame/ui/UIPdaWnd.h | 2 +- src/xrGame/ui/UIProgressBar.cpp | 2 +- src/xrGame/ui/UIProgressBar.h | 4 +- src/xrGame/ui/UIPropertiesBox.cpp | 4 +- src/xrGame/ui/UIPropertiesBox.h | 4 +- src/xrGame/ui/UIRankingWnd.h | 2 +- src/xrGame/ui/UIScrollBar.cpp | 2 +- src/xrGame/ui/UIScrollBox.cpp | 2 +- src/xrGame/ui/UIScrollView.cpp | 2 +- src/xrGame/ui/UIScrollView.h | 14 +- src/xrGame/ui/UISecondTaskWnd.cpp | 4 +- src/xrGame/ui/UISecondTaskWnd.h | 10 +- src/xrGame/ui/UIServerInfo.cpp | 6 +- src/xrGame/ui/UIServerInfo.h | 4 +- src/xrGame/ui/UISkinSelector.cpp | 6 +- src/xrGame/ui/UISpinNum.cpp | 10 +- src/xrGame/ui/UISpinNum.h | 20 +- src/xrGame/ui/UISpinText.h | 10 +- src/xrGame/ui/UIStatsPlayerList.cpp | 2 +- src/xrGame/ui/UIStatsPlayerList.h | 12 +- src/xrGame/ui/UITabControl.cpp | 2 +- src/xrGame/ui/UITabControl.h | 10 +- src/xrGame/ui/UITalkDialogWnd.cpp | 2 +- src/xrGame/ui/UITalkDialogWnd.h | 2 +- src/xrGame/ui/UITalkWnd.cpp | 4 +- src/xrGame/ui/UITalkWnd.h | 2 +- src/xrGame/ui/UITaskWnd.cpp | 2 +- src/xrGame/ui/UITrackBar.cpp | 2 +- src/xrGame/ui/UITrackBar.h | 10 +- src/xrGame/ui/UIWindow.cpp | 8 +- src/xrGame/ui/UIWpnParams.h | 4 +- src/xrGame/ui/UIXmlInit.cpp | 2 +- src/xrGame/ui/ui_af_params.cpp | 40 +- src/xrGame/ui/ui_af_params.h | 4 +- src/xrGame/ui/ui_arrow.cpp | 2 +- src/xrGame/ui/ui_arrow.h | 4 +- src/xrGame/ui_base.cpp | 4 +- src/xrGame/vision_client.h | 2 +- src/xrGame/vision_client_inline.h | 2 +- src/xrGame/visual_memory_manager.cpp | 26 +- src/xrGame/wallmark_manager.cpp | 22 +- src/xrGame/xrClientsPool.cpp | 2 +- src/xrGame/xrClientsPool.h | 10 +- src/xrGame/xrGameSpyServer.cpp | 10 +- src/xrGame/xrGameSpyServer.h | 2 +- src/xrGame/xrGameSpy_GameSpyFuncs.cpp | 2 +- src/xrGame/xrServer.cpp | 34 +- src/xrGame/xrServer.h | 36 +- src/xrGame/xrServerMapSync.cpp | 4 +- src/xrGame/xrServerMapSync.h | 10 +- src/xrGame/xrServer_CL_connect.cpp | 4 +- src/xrGame/xrServer_Connect.cpp | 4 +- src/xrGame/xrServer_info.cpp | 4 +- src/xrGame/xrServer_info.h | 6 +- src/xrGame/xrServer_perform_sls_default.cpp | 2 +- src/xrGame/xrServer_process_event.cpp | 24 +- .../xrServer_process_event_activate.cpp | 4 +- src/xrGame/xrServer_process_event_destroy.cpp | 12 +- .../xrServer_process_event_ownership.cpp | 6 +- src/xrGame/xrServer_process_event_reject.cpp | 8 +- src/xrGame/xrServer_process_spawn.cpp | 10 +- src/xrGame/xrServer_process_update.cpp | 4 +- src/xrGame/xrServer_secure_messaging.cpp | 6 +- src/xrGame/xrServer_sls_clear.cpp | 2 +- src/xrGame/xrServer_updates_compressor.h | 6 +- src/xrGame/xr_Client_BattlEye.cpp | 4 +- src/xrGame/xr_Client_BattlEye.h | 6 +- src/xrGame/xr_Server_BattlEye.cpp | 16 +- src/xrGame/xr_Server_BattlEye.h | 6 +- src/xrGame/xr_level_controller.cpp | 2 +- src/xrGameSpy/GameSpy_ATLAS.h | 4 +- src/xrGameSpy/GameSpy_Browser.cpp | 40 +- src/xrGameSpy/GameSpy_GCD_Server.cpp | 2 +- src/xrGameSpy/GameSpy_GP.cpp | 2 +- src/xrGameSpy/GameSpy_GP.h | 4 +- src/xrGameSpy/GameSpy_HTTP.cpp | 38 +- src/xrGameSpy/GameSpy_QR2.cpp | 4 +- src/xrGameSpy/GameSpy_SAKE.h | 6 +- src/xrGameSpy/xrGameSpy.cpp | 30 +- src/xrGameSpy/xrGameSpy_MainDefs.h | 2 +- src/xrNetServer/NET_AuthCheck.h | 2 +- src/xrNetServer/NET_Client.cpp | 74 +-- src/xrNetServer/NET_Client.h | 10 +- src/xrNetServer/NET_Common.cpp | 4 +- src/xrNetServer/NET_Common.h | 2 +- src/xrNetServer/NET_Compressor.cpp | 50 +- src/xrNetServer/NET_Compressor.h | 6 +- src/xrNetServer/NET_Log.cpp | 26 +- src/xrNetServer/NET_Messages.h | 8 +- src/xrNetServer/NET_PlayersMonitor.h | 4 +- src/xrNetServer/NET_Server.cpp | 32 +- src/xrNetServer/NET_Server.h | 17 +- src/xrNetServer/ip_filter.cpp | 2 +- src/xrNetServer/ip_filter.h | 4 +- src/xrNetServer/stdafx.h | 2 +- src/xrParticles/particle_actions.h | 2 +- .../particle_actions_collection.cpp | 100 ++-- src/xrParticles/particle_actions_collection.h | 210 +++---- src/xrParticles/particle_core.cpp | 34 +- src/xrParticles/particle_core.h | 14 +- src/xrParticles/particle_effect.h | 14 +- src/xrParticles/particle_manager.cpp | 6 +- src/xrParticles/psystem.h | 108 ++-- src/xrParticles/stdafx.h | 2 +- src/xrPhysics/ActorCameraCollision.cpp | 4 +- src/xrPhysics/CalculateTriangle.h | 2 +- src/xrPhysics/DamageSource.h | 2 +- src/xrPhysics/DisablingParams.cpp | 8 +- src/xrPhysics/ElevatorState.cpp | 22 +- src/xrPhysics/ElevatorState.h | 2 +- src/xrPhysics/Geometry.cpp | 12 +- src/xrPhysics/Geometry.h | 20 +- src/xrPhysics/IActivationShape.cpp | 4 +- src/xrPhysics/IPHWorld.h | 6 +- src/xrPhysics/IPhysicsShellHolder.h | 2 +- src/xrPhysics/MathUtils.cpp | 102 ++-- src/xrPhysics/MathUtils.h | 8 +- src/xrPhysics/MathUtilsOde.h | 14 +- src/xrPhysics/MovementBoxDynamicActivate.cpp | 2 +- src/xrPhysics/PHAICharacter.cpp | 4 +- src/xrPhysics/PHAICharacter.h | 6 +- src/xrPhysics/PHActivationShape.cpp | 2 +- src/xrPhysics/PHActorCharacter.cpp | 6 +- src/xrPhysics/PHCaptureInit.cpp | 10 +- src/xrPhysics/PHCharacter.cpp | 8 +- src/xrPhysics/PHCharacter.h | 16 +- src/xrPhysics/PHCollideValidator.h | 4 +- src/xrPhysics/PHContactBodyEffector.cpp | 6 +- src/xrPhysics/PHContactBodyEffector.h | 2 +- src/xrPhysics/PHDisabling.cpp | 4 +- src/xrPhysics/PHDynamicData.cpp | 2 +- src/xrPhysics/PHDynamicData.h | 4 +- src/xrPhysics/PHElement.cpp | 36 +- src/xrPhysics/PHElement.h | 280 ++++----- src/xrPhysics/PHFracture.cpp | 32 +- src/xrPhysics/PHFracture.h | 18 +- src/xrPhysics/PHGeometryOwner.cpp | 4 +- src/xrPhysics/PHGeometryOwner.h | 58 +- src/xrPhysics/PHIsland.cpp | 2 +- src/xrPhysics/PHJoint.cpp | 42 +- src/xrPhysics/PHJoint.h | 22 +- src/xrPhysics/PHMoveStorage.cpp | 6 +- src/xrPhysics/PHObject.cpp | 6 +- src/xrPhysics/PHObject.h | 2 +- src/xrPhysics/PHShell.cpp | 28 +- src/xrPhysics/PHShellActivate.cpp | 2 +- src/xrPhysics/PHShellBuildJoint.h | 10 +- src/xrPhysics/PHShellSplitter.cpp | 22 +- src/xrPhysics/PHShellSplitter.h | 25 +- src/xrPhysics/PHSimpleCharacter.cpp | 64 +-- src/xrPhysics/PHSimpleCharacter.h | 2 +- src/xrPhysics/PHStaticGeomShell.cpp | 2 +- src/xrPhysics/PHWorld.cpp | 14 +- src/xrPhysics/Physics.cpp | 26 +- src/xrPhysics/PhysicsCommon.h | 2 +- src/xrPhysics/PhysicsShell.cpp | 6 +- src/xrPhysics/PhysicsShell.h | 43 +- src/xrPhysics/PhysicsShellAnimatorBoneData.h | 2 +- src/xrPhysics/ShellHit.cpp | 4 +- src/xrPhysics/collisiondamagereceiver.cpp | 2 +- src/xrPhysics/console_vars.h | 12 +- src/xrPhysics/dRayMotions.h | 2 +- src/xrPhysics/dcylinder/dCylinder.cpp | 30 +- src/xrPhysics/dcylinder/dCylinder.h | 2 +- src/xrPhysics/debug_output.cpp | 9 +- src/xrPhysics/debug_output.h | 9 +- src/xrPhysics/iclimableobject.h | 6 +- src/xrPhysics/iphysics_scripted.h | 2 +- src/xrPhysics/ode_redefine.h | 4 +- src/xrPhysics/params.cpp | 2 +- src/xrPhysics/tri-colliderknoopc/__aabb_tri.h | 12 +- .../tri-colliderknoopc/dSortTriPrimitive.h | 21 +- src/xrPhysics/tri-colliderknoopc/dTriBox.cpp | 20 +- src/xrPhysics/tri-colliderknoopc/dTriBox.h | 4 +- .../tri-colliderknoopc/dTriCylinder.cpp | 38 +- .../tri-colliderknoopc/dTriCylinder.h | 6 +- src/xrPhysics/tri-colliderknoopc/dTriList.cpp | 2 +- .../tri-colliderknoopc/dTriSphere.cpp | 4 +- .../tri-colliderknoopc/dcTriListCollider.cpp | 3 +- .../tri-colliderknoopc/dcTriListCollider.h | 6 +- src/xrPhysics/tri-colliderknoopc/dxTriList.h | 8 +- src/xrPhysics/xrPhysics.cpp | 4 +- src/xrScriptEngine/BindingsDumper.cpp | 36 +- .../LuaStudio/Backend/Backend.hpp | 4 +- .../LuaStudio/Backend/Engine.hpp | 4 +- .../LuaStudio/Backend/World.hpp | 6 +- src/xrScriptEngine/LuaStudio/Config.hpp | 16 +- src/xrScriptEngine/LuaStudio/Defines.hpp | 12 +- src/xrScriptEngine/ScriptExportMacros.hpp | 4 +- src/xrScriptEngine/mslotutils.h | 20 +- src/xrScriptEngine/script_debugger.cpp | 6 +- src/xrScriptEngine/script_debugger.hpp | 6 +- src/xrScriptEngine/script_engine.cpp | 12 +- src/xrScriptEngine/script_engine.hpp | 2 +- src/xrScriptEngine/script_lua_helper.cpp | 82 +-- src/xrScriptEngine/script_process.cpp | 4 +- src/xrScriptEngine/script_process.hpp | 2 +- src/xrScriptEngine/script_stack_tracker.cpp | 4 +- src/xrScriptEngine/xrScriptEngine.hpp | 14 +- src/xrServerEntities/PHNetState.cpp | 12 +- src/xrServerEntities/PHSynchronize.h | 2 +- src/xrServerEntities/PropertiesListTypes.h | 2 +- src/xrServerEntities/alife_human_brain.cpp | 12 +- src/xrServerEntities/alife_monster_brain.cpp | 16 +- .../alife_movement_manager_holder.h | 4 +- src/xrServerEntities/alife_space.h | 22 +- src/xrServerEntities/character_info.cpp | 6 +- src/xrServerEntities/character_info.h | 2 +- .../doug_lea_memory_allocator.c | 4 +- .../doug_lea_memory_allocator.h | 4 +- src/xrServerEntities/gametype_chooser.cpp | 4 +- src/xrServerEntities/gametype_chooser.h | 4 +- src/xrServerEntities/inventory_space.h | 22 +- src/xrServerEntities/object_factory_impl.h | 8 +- .../object_factory_register.cpp | 144 ++--- .../object_factory_script.cpp | 4 +- .../object_item_client_server.h | 2 +- .../object_item_client_server_inline.h | 2 +- src/xrServerEntities/pch_script.h | 2 +- .../script_fmatrix_script.cpp | 265 +++++---- .../script_fvector_script.cpp | 223 ++++--- src/xrServerEntities/smart_cast.cpp | 10 +- src/xrServerEntities/smart_cast.h | 4 +- src/xrServerEntities/smart_cast_impl1.h | 4 +- src/xrServerEntities/smart_cast_stats.cpp | 2 +- src/xrServerEntities/specific_character.cpp | 2 +- src/xrServerEntities/xml_str_id_loader.h | 6 +- src/xrServerEntities/xrMessages.h | 78 +-- src/xrServerEntities/xrServer_Object_Base.cpp | 52 +- src/xrServerEntities/xrServer_Object_Base.h | 14 +- src/xrServerEntities/xrServer_Objects.cpp | 10 +- src/xrServerEntities/xrServer_Objects.h | 2 +- .../xrServer_Objects_ALife.cpp | 102 ++-- src/xrServerEntities/xrServer_Objects_ALife.h | 12 +- .../xrServer_Objects_ALife_Items.cpp | 50 +- .../xrServer_Objects_ALife_Items.h | 4 +- .../xrServer_Objects_ALife_Monsters.cpp | 52 +- .../xrServer_Objects_ALife_Monsters.h | 22 +- ...rServer_Objects_ALife_Monsters_script4.cpp | 4 +- .../xrServer_Objects_Abstract.cpp | 4 +- .../xrServer_Objects_Abstract.h | 8 +- .../xrServer_Objects_Alife_Smartcovers.cpp | 22 +- .../xrServer_Objects_Alife_Smartcovers.h | 8 +- src/xrServerEntities/xrServer_Space.h | 4 +- .../xrServer_script_macroses.h | 22 +- src/xrSound/MusicStream.h | 2 +- src/xrSound/OpenALDeviceList.cpp | 2 +- src/xrSound/OpenALDeviceList.h | 2 +- src/xrSound/Sound.h | 16 +- src/xrSound/SoundRender.h | 14 +- src/xrSound/SoundRender_Cache.cpp | 6 +- src/xrSound/SoundRender_Cache.h | 40 +- src/xrSound/SoundRender_Core.cpp | 38 +- src/xrSound/SoundRender_Core.h | 8 +- src/xrSound/SoundRender_CoreA.h | 4 +- src/xrSound/SoundRender_CoreD.h | 4 +- src/xrSound/SoundRender_Core_Processor.cpp | 2 +- src/xrSound/SoundRender_Emitter.h | 8 +- src/xrSound/SoundRender_Emitter_FSM.cpp | 12 +- src/xrSound/SoundRender_Emitter_StartStop.cpp | 14 +- src/xrSound/SoundRender_Emitter_streamer.cpp | 6 +- src/xrSound/SoundRender_Environment.h | 26 +- src/xrSound/SoundRender_Source.cpp | 2 +- src/xrSound/SoundRender_Source.h | 2 +- src/xrSound/SoundRender_Source_loader.cpp | 4 +- src/xrSound/SoundRender_TargetD.h | 4 +- src/xrSound/xr_cda.h | 2 +- src/xrSound/xr_streamsnd.cpp | 8 +- src/xrSound/xr_streamsnd.h | 20 +- 2369 files changed, 16091 insertions(+), 15993 deletions(-) diff --git a/src/Common/LevelGameDef.h b/src/Common/LevelGameDef.h index 202078806f3..8269fea56cb 100644 --- a/src/Common/LevelGameDef.h +++ b/src/Common/LevelGameDef.h @@ -20,7 +20,7 @@ enum EWayType }; enum ERPpointType -{ // [0..255] +{ // [0..255] rptActorSpawn = 0, rptArtefactSpawn, rptItemSpawn, diff --git a/src/Common/LevelStructure.hpp b/src/Common/LevelStructure.hpp index 012ab09f35e..66d4138e73c 100644 --- a/src/Common/LevelStructure.hpp +++ b/src/Common/LevelStructure.hpp @@ -4,29 +4,29 @@ enum fsL_Chunks { - fsL_HEADER = 1, //* - fsL_SHADERS = 2, //* - fsL_VISUALS = 3, //* - fsL_PORTALS = 4, //* - Portal polygons - fsL_LIGHT_DYNAMIC = 6, //* - fsL_GLOWS = 7, //* - All glows inside level - fsL_SECTORS = 8, //* - All sectors on level - fsL_VB = 9, //* - Static geometry - fsL_IB = 10, //* - fsL_SWIS = 11, //* - collapse info, usually for trees + fsL_HEADER = 1, //* + fsL_SHADERS = 2, //* + fsL_VISUALS = 3, //* + fsL_PORTALS = 4, //* - Portal polygons + fsL_LIGHT_DYNAMIC = 6, //* + fsL_GLOWS = 7, //* - All glows inside level + fsL_SECTORS = 8, //* - All sectors on level + fsL_VB = 9, //* - Static geometry + fsL_IB = 10, //* + fsL_SWIS = 11, //* - collapse info, usually for trees fsL_forcedword = 0xFFFFFFFF }; enum fsESectorChunks { - fsP_Portals = 1, // - portal polygons - fsP_Root = 2, // - geometry root + fsP_Portals = 1, // - portal polygons + fsP_Root = 2, // - geometry root fsP_forcedword = u32(-1) }; enum fsSLS_Chunks { - fsSLS_Description = 1, // Name of level + fsSLS_Description = 1, // Name of level fsSLS_ServerState = 2, fsSLS_forcedword = u32(-1) }; @@ -247,7 +247,7 @@ struct NodeCompressed6 friend class CLevelGraph; friend struct CNodeCompressed; friend class CNodeRenumberer; -}; // 2+5+2+11 = 20b +}; // 2+5+2+11 = 20b #endif struct SNodePositionOld @@ -264,8 +264,8 @@ typedef SNodePositionOld NodePosition; const char LEVEL_GRAPH_NAME[] = "level.ai"; -const u32 XRCL_CURRENT_VERSION = 18; // input -const u32 XRCL_PRODUCTION_VERSION = 14; // output +const u32 XRCL_CURRENT_VERSION = 18; // input +const u32 XRCL_PRODUCTION_VERSION = 14; // output const u32 CFORM_CURRENT_VERSION = 4; const u32 MAX_NODE_BIT_COUNT = 23; const u32 XRAI_CURRENT_VERSION = 10; diff --git a/src/Common/NvMender2003/NVMeshMender.cpp b/src/Common/NvMender2003/NVMeshMender.cpp index 4ace18fd7bb..e8ad537c490 100644 --- a/src/Common/NvMender2003/NVMeshMender.cpp +++ b/src/Common/NvMender2003/NVMeshMender.cpp @@ -194,7 +194,7 @@ void MeshMender::UpdateIndices(const size_t oldIndex, const size_t newIndex, Tri void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector& theVerts, xr_vector& mappingNewToOldVert, D3DXVECTOR3 workingPosition) { - NeighborGroupList neighborGroups; // a fresh group for each pass + NeighborGroupList neighborGroups; // a fresh group for each pass // reset each triangle to prepare for smoothing group building for (u32 i = 0; i < possibleNeighbors.size(); ++i) @@ -223,7 +223,7 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector thisGroupIndices; - for (size_t t = 0; t < curGroup.size(); ++t) // for each tri + for (size_t t = 0; t < curGroup.size(); ++t) // for each tri { TriID tID = curGroup[t]; - for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri + for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri { // if it is at the positions in question if (theVerts[m_Triangles[tID].indices[indx]].pos == workingPosition) { @@ -281,7 +281,7 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector& theVerts, xr_vector& mappingNewToOldVert, D3DXVECTOR3 workingPosition) { - NeighborGroupList neighborGroups; // a fresh group for each pass + NeighborGroupList neighborGroups; // a fresh group for each pass // reset each triangle to prepare for smoothing group building for (u32 i = 0; i < possibleNeighbors.size(); ++i) @@ -306,7 +306,7 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector thisGroupIndices; - for (size_t t = 0; t < curGroup.size(); ++t) // for each tri + for (size_t t = 0; t < curGroup.size(); ++t) // for each tri { TriID tID = curGroup[t]; - for (size_t indx = 0; indx < 3; indx++) // for each vert in that tri + for (size_t indx = 0; indx < 3; indx++) // for each vert in that tri { // if it is at the positions in question if (theVerts[m_Triangles[tID].indices[indx]].pos == workingPosition) { @@ -364,7 +364,7 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector& theVerts, xr_vector& mappingNewToOldVert, D3DXVECTOR3 workingPosition) { - NeighborGroupList neighborGroups; // a fresh group for each pass + NeighborGroupList neighborGroups; // a fresh group for each pass // reset each triangle to prepare for smoothing group building for (u32 i = 0; i < possibleNeighbors.size(); ++i) @@ -389,7 +389,7 @@ void MeshMender::ProcessBinormals(TriangleList& possibleNeighbors, xr_vector thisGroupIndices; - for (size_t t = 0; t < curGroup.size(); ++t) // for each tri + for (size_t t = 0; t < curGroup.size(); ++t) // for each tri { TriID tID = curGroup[t]; - for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri + for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri { // if it is at the positions in question if (theVerts[m_Triangles[tID].indices[indx]].pos == workingPosition) { @@ -482,9 +482,9 @@ bool MeshMender::Mend(xr_vector& theVerts, xr_vector& theI return true; } -void MeshMender::BuildGroups(Triangle* tri, // the tri of interest - TriangleList& possibleNeighbors, // all tris arround a vertex - NeighborGroupList& neighborGroups, // the neighbor groups to be updated +void MeshMender::BuildGroups(Triangle* tri, // the tri of interest + TriangleList& possibleNeighbors, // all tris arround a vertex + NeighborGroupList& neighborGroups, // the neighbor groups to be updated xr_vector& theVerts, CanSmoothChecker* smoothChecker, const float& minCreaseAngle) { if ((!tri) || (tri->handled)) return; @@ -535,7 +535,7 @@ void MeshMender::FindNeighbors(Triangle* tri, TriangleList& possibleNeighbors, T { TriID tID = possibleNeighbors[n]; Triangle* possible = &(m_Triangles[tID]); - if (possible != tri) // check for myself + if (possible != tri) // check for myself { if (SharesEdge(tri, possible, theVerts)) { theNeighbors.push_back(possible); @@ -661,7 +661,7 @@ void MeshMender::SetUpData(xr_vector& theVerts, const xr_vector& theVerts) float lenTan = D3DXVec3Length(&(theVerts[i].tangent)); float lenBin = D3DXVec3Length(&(theVerts[i].binormal)); - if ((lenTan <= 0.001f) || (lenBin <= 0.001f)) // should be approx 1.0f + if ((lenTan <= 0.001f) || (lenBin <= 0.001f)) // should be approx 1.0f { // the tangent space is ill defined at this vertex // so we can generate a valid one based on the normal vector, diff --git a/src/Common/NvMender2003/NVMeshMender.h b/src/Common/NvMender2003/NVMeshMender.h index af55422eb49..1b36091d900 100644 --- a/src/Common/NvMender2003/NVMeshMender.h +++ b/src/Common/NvMender2003/NVMeshMender.h @@ -187,7 +187,7 @@ class MeshMender // respectExistingSplits - DONT_RESPECT_SPLITS means that neighboring triangles for smoothing will be determined // based on position and not on indices. // RESPECT_SPLITS means that neighboring triangles will be determined based on the indices of - //the + // the // triangle and not the positions of the vertices. // you can usually get better smoothing by not respecting existing splits // only respect them if you know they should be respected. @@ -247,7 +247,7 @@ class MeshMender NeighborhoodID group; void Reset(); - TriID myID; // a global id used to keep track of tris' + TriID myID; // a global id used to keep track of tris' }; xr_vector m_Triangles; @@ -270,9 +270,9 @@ class MeshMender // function responsible for growing the neighbor hood groups // arround a vertex - void BuildGroups(Triangle* tri, // the tri of interest - TriangleList& possibleNeighbors, // all tris arround a vertex - NeighborGroupList& neighborGroups, // the neighbor groups to be updated + void BuildGroups(Triangle* tri, // the tri of interest + TriangleList& possibleNeighbors, // all tris arround a vertex + NeighborGroupList& neighborGroups, // the neighbor groups to be updated xr_vector& theVerts, CanSmoothChecker* smoothChecker, const float& minCreaseAngle); // given 2 triangles, fill the two neighbor pointers with either diff --git a/src/Common/NvMender2003/mender_input_output.h b/src/Common/NvMender2003/mender_input_output.h index 01bde679336..2904ca2ec6c 100644 --- a/src/Common/NvMender2003/mender_input_output.h +++ b/src/Common/NvMender2003/mender_input_output.h @@ -36,15 +36,15 @@ static void fill_mender_input(const xr_vector& vertices, const xr_v } template -static void retrive_data_from_mender_otput(xr_vector& vertices, // in-out +static void retrive_data_from_mender_otput(xr_vector& vertices, // in-out xr_vector& faces, const xr_vector& theVerts, const xr_vector& theIndices, const xr_vector& mappingNewToOldVert) { xr_vector old_vertices; { old_vertices.clear(); - old_vertices = vertices; // save old vertices to retrive through mappingNewToOldVert data that missing in - // MeshMender::Vertex + old_vertices = vertices; // save old vertices to retrive through mappingNewToOldVert data that missing in + // MeshMender::Vertex // retriving data const u32 face_count = faces.size(); for (u32 i = 0; i < face_count; ++i) diff --git a/src/Common/face_smoth_flags.h b/src/Common/face_smoth_flags.h index 702abcda7ec..3620b6d29a9 100644 --- a/src/Common/face_smoth_flags.h +++ b/src/Common/face_smoth_flags.h @@ -52,9 +52,9 @@ IC bool do_connect_faces_by_faces_edge_flags( if (start_edge_back != test_edge_back) return false; bool start_edge_smooth = - is_soft_edge(start_face_flags, start_common_edge_idx); //!( start.sm_group & (1< debug_shader; -#endif // DebugShader_included \ No newline at end of file +#endif // DebugShader_included \ No newline at end of file diff --git a/src/Include/xrRender/EnvironmentRender.h b/src/Include/xrRender/EnvironmentRender.h index 9680f194875..68c46bbc690 100644 --- a/src/Include/xrRender/EnvironmentRender.h +++ b/src/Include/xrRender/EnvironmentRender.h @@ -5,7 +5,7 @@ namespace particles_systems { class library_interface; -} // namespace particle_systems +} // namespace particle_systems class CEnvironment; class CEnvDescriptor; @@ -46,4 +46,4 @@ class IEnvironmentRender virtual particles_systems::library_interface const& particles_systems_library() = 0; }; -#endif // EnvironmentRender_included \ No newline at end of file +#endif // EnvironmentRender_included \ No newline at end of file diff --git a/src/Include/xrRender/FactoryPtr.h b/src/Include/xrRender/FactoryPtr.h index f17657e1ba3..fe336d94f57 100644 --- a/src/Include/xrRender/FactoryPtr.h +++ b/src/Include/xrRender/FactoryPtr.h @@ -57,10 +57,10 @@ FACTORY_PTR_INSTANCIATE(StatGraphRender) FACTORY_PTR_INSTANCIATE(ConsoleRender) #ifdef DEBUG FACTORY_PTR_INSTANCIATE(ObjectSpaceRender) -#endif // DEBUG +#endif // DEBUG FACTORY_PTR_INSTANCIATE(ApplicationRender) FACTORY_PTR_INSTANCIATE(WallMarkArray) -#endif // _EDITOR +#endif // _EDITOR #ifndef _EDITOR FACTORY_PTR_INSTANCIATE(FlareRender) @@ -71,7 +71,7 @@ FACTORY_PTR_INSTANCIATE(RainRender) FACTORY_PTR_INSTANCIATE(EnvironmentRender) FACTORY_PTR_INSTANCIATE(EnvDescriptorRender) FACTORY_PTR_INSTANCIATE(EnvDescriptorMixerRender) -#endif // _EDITOR +#endif // _EDITOR FACTORY_PTR_INSTANCIATE(FontRender) /* void FactoryPtr::CreateObject(void) @@ -86,4 +86,4 @@ void FactoryPtr::DestroyObject(void) } */ -#endif // FactoryPtr_included \ No newline at end of file +#endif // FactoryPtr_included \ No newline at end of file diff --git a/src/Include/xrRender/FontRender.h b/src/Include/xrRender/FontRender.h index 26885e65a02..079731782e3 100644 --- a/src/Include/xrRender/FontRender.h +++ b/src/Include/xrRender/FontRender.h @@ -12,4 +12,4 @@ class IFontRender virtual void OnRender(CGameFont& owner) = 0; }; -#endif // FontRender_included \ No newline at end of file +#endif // FontRender_included \ No newline at end of file diff --git a/src/Include/xrRender/Kinematics.h b/src/Include/xrRender/Kinematics.h index 21f2d4ea420..d16bfa3bbb0 100644 --- a/src/Include/xrRender/Kinematics.h +++ b/src/Include/xrRender/Kinematics.h @@ -70,7 +70,7 @@ class IKinematics virtual void LL_SetBonesVisible(u64 mask) = 0; // Main functionality - virtual void CalculateBones(BOOL bForceExact = FALSE) = 0; // Recalculate skeleton + virtual void CalculateBones(BOOL bForceExact = FALSE) = 0; // Recalculate skeleton virtual void CalculateBones_Invalidate() = 0; virtual void Callback(UpdateCallback C, void* Param) = 0; @@ -97,4 +97,4 @@ IC IKinematics* PKinematics(IRenderVisual* V) return V ? V->dcast_PKinematics() : 0; } -#endif // Kinematics_included \ No newline at end of file +#endif // Kinematics_included \ No newline at end of file diff --git a/src/Include/xrRender/KinematicsAnimated.h b/src/Include/xrRender/KinematicsAnimated.h index 109cd6f92c5..fe2de4c2f82 100644 --- a/src/Include/xrRender/KinematicsAnimated.h +++ b/src/Include/xrRender/KinematicsAnimated.h @@ -25,9 +25,9 @@ struct IUpdateTracksCallback struct SKeyTable { - CKey keys[MAX_CHANNELS][MAX_BLENDED]; // all keys - CBlend* blends[MAX_CHANNELS][MAX_BLENDED]; // blend pointers - int chanel_blend_conts[MAX_CHANNELS]; // channel counts + CKey keys[MAX_CHANNELS][MAX_BLENDED]; // all keys + CBlend* blends[MAX_CHANNELS][MAX_BLENDED]; // blend pointers + int chanel_blend_conts[MAX_CHANNELS]; // channel counts SKeyTable() { std::fill_n(chanel_blend_conts, MAX_CHANNELS, 0); } }; @@ -72,8 +72,9 @@ class IKinematicsAnimated virtual MotionID LL_MotionID(LPCSTR B) = 0; virtual u16 LL_PartID(LPCSTR B) = 0; - // CBlend* LL_PlayFX (u16 bone, MotionID motion, float blendAccrue, float blendFalloff, float - //Speed, float Power); + // CBlend* LL_PlayFX (u16 bone, MotionID motion, float blendAccrue, float blendFalloff, + //float + // Speed, float Power); virtual CBlend* LL_PlayCycle(u16 partition, MotionID motion, BOOL bMixing, float blendAccrue, float blendFalloff, float Speed, BOOL noloop, PlayCallback Callback, LPVOID CallbackParam, u8 channel = 0) = 0; virtual CBlend* LL_PlayCycle( @@ -84,8 +85,8 @@ class IKinematicsAnimated // virtual CBlendInstance& LL_GetBlendInstance (u16 bone_id) = 0; // Main functionality - virtual void UpdateTracks() = 0; // Update motions - virtual void LL_UpdateTracks(float dt, bool b_force, bool leave_blends) = 0; // Update motions + virtual void UpdateTracks() = 0; // Update motions + virtual void LL_UpdateTracks(float dt, bool b_force, bool leave_blends) = 0; // Update motions // void DestroyCycle (CBlend &B); // cycles @@ -116,4 +117,4 @@ class IKinematicsAnimated //#endif // DEBUG }; -#endif // KinematicsAnimated_included +#endif // KinematicsAnimated_included diff --git a/src/Include/xrRender/LensFlareRender.h b/src/Include/xrRender/LensFlareRender.h index 493daad2a6d..645f502bd77 100644 --- a/src/Include/xrRender/LensFlareRender.h +++ b/src/Include/xrRender/LensFlareRender.h @@ -25,4 +25,4 @@ class ILensFlareRender virtual void OnDeviceDestroy() = 0; }; -#endif // LensFlareRender_included \ No newline at end of file +#endif // LensFlareRender_included \ No newline at end of file diff --git a/src/Include/xrRender/ObjectSpaceRender.h b/src/Include/xrRender/ObjectSpaceRender.h index f4a2ac95fc8..c9f131de859 100644 --- a/src/Include/xrRender/ObjectSpaceRender.h +++ b/src/Include/xrRender/ObjectSpaceRender.h @@ -15,6 +15,6 @@ class IObjectSpaceRender virtual void SetShader() = 0; }; -#endif // DEBUG +#endif // DEBUG -#endif // ObjectSpaceRender_included \ No newline at end of file +#endif // ObjectSpaceRender_included \ No newline at end of file diff --git a/src/Include/xrRender/ParticleCustom.h b/src/Include/xrRender/ParticleCustom.h index 174b6d2bc07..5ace6b7c62f 100644 --- a/src/Include/xrRender/ParticleCustom.h +++ b/src/Include/xrRender/ParticleCustom.h @@ -25,4 +25,4 @@ class IParticleCustom virtual BOOL GetHudMode() = 0; }; -#endif // ParticleCustom_included \ No newline at end of file +#endif // ParticleCustom_included \ No newline at end of file diff --git a/src/Include/xrRender/RainRender.h b/src/Include/xrRender/RainRender.h index 6fa69fdfe72..210df8c84b2 100644 --- a/src/Include/xrRender/RainRender.h +++ b/src/Include/xrRender/RainRender.h @@ -18,4 +18,4 @@ class IRainRender virtual const Fsphere& GetDropBounds() const = 0; }; -#endif // RainRender_included \ No newline at end of file +#endif // RainRender_included \ No newline at end of file diff --git a/src/Include/xrRender/RenderDetailModel.h b/src/Include/xrRender/RenderDetailModel.h index a4198ac443f..b69808e514c 100644 --- a/src/Include/xrRender/RenderDetailModel.h +++ b/src/Include/xrRender/RenderDetailModel.h @@ -7,4 +7,4 @@ class IRenderDetailModel public: }; -#endif // RenderDetailModel_included \ No newline at end of file +#endif // RenderDetailModel_included \ No newline at end of file diff --git a/src/Include/xrRender/RenderFactory.h b/src/Include/xrRender/RenderFactory.h index d70a6d78768..212f264707e 100644 --- a/src/Include/xrRender/RenderFactory.h +++ b/src/Include/xrRender/RenderFactory.h @@ -6,7 +6,7 @@ class IWallMarkArray; #ifdef DEBUG class IObjectSpaceRender; -#endif // DEBUG +#endif // DEBUG class IFontRender; class IApplicationRender; @@ -50,10 +50,10 @@ class IRenderFactory RENDER_FACTORY_INTERFACE(ConsoleRender) #ifdef DEBUG RENDER_FACTORY_INTERFACE(ObjectSpaceRender) -#endif // DEBUG +#endif // DEBUG RENDER_FACTORY_INTERFACE(ApplicationRender) RENDER_FACTORY_INTERFACE(WallMarkArray) -#endif // _EDITOR +#endif // _EDITOR #ifndef _EDITOR RENDER_FACTORY_INTERFACE(EnvironmentRender) @@ -64,11 +64,11 @@ class IRenderFactory RENDER_FACTORY_INTERFACE(ThunderboltRender) RENDER_FACTORY_INTERFACE(ThunderboltDescRender) RENDER_FACTORY_INTERFACE(FlareRender) -#endif // _EDITOR +#endif // _EDITOR RENDER_FACTORY_INTERFACE(FontRender) protected: // virtual IEnvDescriptorRender *CreateEnvDescriptorRender() = 0; // virtual void DestroyEnvDescriptorRender(IEnvDescriptorRender *pObject) = 0; }; -#endif // RenderFactory_included +#endif // RenderFactory_included diff --git a/src/Include/xrRender/RenderVisual.h b/src/Include/xrRender/RenderVisual.h index 29cc1abfb00..3a99d487f34 100644 --- a/src/Include/xrRender/RenderVisual.h +++ b/src/Include/xrRender/RenderVisual.h @@ -23,4 +23,4 @@ class IRenderVisual virtual IParticleCustom* dcast_ParticleCustom() { return 0; } }; -#endif // RenderVisual_included \ No newline at end of file +#endif // RenderVisual_included \ No newline at end of file diff --git a/src/Include/xrRender/StatGraphRender.h b/src/Include/xrRender/StatGraphRender.h index bbf85b500db..e52e895941f 100644 --- a/src/Include/xrRender/StatGraphRender.h +++ b/src/Include/xrRender/StatGraphRender.h @@ -16,4 +16,4 @@ class IStatGraphRender virtual void OnRender(CStatGraph& owner) = 0; }; -#endif // StatGraphRender_included \ No newline at end of file +#endif // StatGraphRender_included \ No newline at end of file diff --git a/src/Include/xrRender/ThunderboltDescRender.h b/src/Include/xrRender/ThunderboltDescRender.h index 65bbc82c9f3..6afa3c5027b 100644 --- a/src/Include/xrRender/ThunderboltDescRender.h +++ b/src/Include/xrRender/ThunderboltDescRender.h @@ -12,4 +12,4 @@ class IThunderboltDescRender virtual void DestroyModel() = 0; }; -#endif // ThunderboltDescRender_included \ No newline at end of file +#endif // ThunderboltDescRender_included \ No newline at end of file diff --git a/src/Include/xrRender/ThunderboltRender.h b/src/Include/xrRender/ThunderboltRender.h index 9a48cc468cf..b446311ec4e 100644 --- a/src/Include/xrRender/ThunderboltRender.h +++ b/src/Include/xrRender/ThunderboltRender.h @@ -13,4 +13,4 @@ class IThunderboltRender virtual void Render(CEffect_Thunderbolt& owner) = 0; }; -#endif // ThunderboltRender_included \ No newline at end of file +#endif // ThunderboltRender_included \ No newline at end of file diff --git a/src/Include/xrRender/UIRender.h b/src/Include/xrRender/UIRender.h index 58d8a27dc43..8f993275b9f 100644 --- a/src/Include/xrRender/UIRender.h +++ b/src/Include/xrRender/UIRender.h @@ -66,4 +66,4 @@ class IUIRender virtual void CacheSetCullMode(CullMode) = 0; }; -#endif // UIRender_included \ No newline at end of file +#endif // UIRender_included \ No newline at end of file diff --git a/src/Include/xrRender/UISequenceVideoItem.h b/src/Include/xrRender/UISequenceVideoItem.h index 917045f83a9..56298ecfc53 100644 --- a/src/Include/xrRender/UISequenceVideoItem.h +++ b/src/Include/xrRender/UISequenceVideoItem.h @@ -17,4 +17,4 @@ class IUISequenceVideoItem virtual void video_Stop() = 0; }; -#endif // UISequenceVideoItem_included +#endif // UISequenceVideoItem_included diff --git a/src/Include/xrRender/UIShader.h b/src/Include/xrRender/UIShader.h index 908e2bab4d9..4c6989a7451 100644 --- a/src/Include/xrRender/UIShader.h +++ b/src/Include/xrRender/UIShader.h @@ -12,4 +12,4 @@ class IUIShader virtual void destroy() = 0; }; -#endif // UIShader_included \ No newline at end of file +#endif // UIShader_included \ No newline at end of file diff --git a/src/Include/xrRender/WallMarkArray.h b/src/Include/xrRender/WallMarkArray.h index 5d91df17f46..446a7005f68 100644 --- a/src/Include/xrRender/WallMarkArray.h +++ b/src/Include/xrRender/WallMarkArray.h @@ -22,4 +22,4 @@ class IWallMarkArray virtual wm_shader GenerateWallmark() = 0; }; -#endif // WallMarkArray_included \ No newline at end of file +#endif // WallMarkArray_included \ No newline at end of file diff --git a/src/Include/xrRender/animation_blend.h b/src/Include/xrRender/animation_blend.h index 055cb30eaec..9a9d29d9a67 100644 --- a/src/Include/xrRender/animation_blend.h +++ b/src/Include/xrRender/animation_blend.h @@ -30,15 +30,15 @@ class CBlend float timeCurrent; float timeTotal; MotionID motionID; - u16 bone_or_part; // startup parameters + u16 bone_or_part; // startup parameters u8 channel; private: ECurvature blend; public: - float blendAccrue; // increasing - float blendFalloff; // decreasing + float blendAccrue; // increasing + float blendFalloff; // decreasing float blendPower; float speed; @@ -116,10 +116,10 @@ IC void CBlend::update_play(float dt, PlayCallback _Callback) clamp(blendAmount, 0.f, blendPower); - if (!update_time(dt)) // reached end + if (!update_time(dt)) // reached end return; - if (_Callback && stop_at_end_callback) _Callback(this); // callback only once + if (_Callback && stop_at_end_callback) _Callback(this); // callback only once stop_at_end_callback = FALSE; @@ -135,7 +135,7 @@ IC bool CBlend::update_time(float dt) { if (!playing) return false; float quant = dt * speed; - timeCurrent += quant; // stop@end - time is not going + timeCurrent += quant; // stop@end - time is not going bool running_fwrd = (quant > 0); float const END_EPS = SAMPLE_SPF + EPS; @@ -151,7 +151,7 @@ IC bool CBlend::update_time(float dt) if (!at_end && !at_begin) return false; if (at_end) { - timeCurrent = timeTotal - END_EPS; // stop@end - time frozen at the end + timeCurrent = timeTotal - END_EPS; // stop@end - time frozen at the end if (timeCurrent < 0.f) timeCurrent = 0.f; } else diff --git a/src/Include/xrRender/animation_motion.h b/src/Include/xrRender/animation_motion.h index 3e759371d06..132094399c7 100644 --- a/src/Include/xrRender/animation_motion.h +++ b/src/Include/xrRender/animation_motion.h @@ -10,8 +10,8 @@ struct MotionID { struct { - u16 idx : 16; // 14 - u16 slot : 16; // 2 + u16 idx : 16; // 14 + u16 slot : 16; // 2 }; //. u16 val; u32 val; diff --git a/src/Include/xrRender/particles_systems_library_interface.hpp b/src/Include/xrRender/particles_systems_library_interface.hpp index f0faf585b70..388318bb9c5 100644 --- a/src/Include/xrRender/particles_systems_library_interface.hpp +++ b/src/Include/xrRender/particles_systems_library_interface.hpp @@ -12,7 +12,7 @@ namespace PS { class CPGDef; -} // namespace PS +} // namespace PS namespace particles_systems { @@ -23,8 +23,8 @@ class library_interface virtual PS::CPGDef const* const* particles_group_end() const = 0; virtual void particles_group_next(PS::CPGDef const* const*& iterator) const = 0; virtual shared_str const& particles_group_id(PS::CPGDef const& particles_group) const = 0; -}; // class library_interface +}; // class library_interface -} // namespace particles_systems +} // namespace particles_systems -#endif // #define PARTICLES_SYSTEMS_LIBRARY_INTERFACE_HPP_INCLUDED \ No newline at end of file +#endif // #define PARTICLES_SYSTEMS_LIBRARY_INTERFACE_HPP_INCLUDED \ No newline at end of file diff --git a/src/Layers/xrAPI/stdafx.h b/src/Layers/xrAPI/stdafx.h index 202274a70c0..37b9c6b992e 100644 --- a/src/Layers/xrAPI/stdafx.h +++ b/src/Layers/xrAPI/stdafx.h @@ -7,23 +7,23 @@ // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. -#ifndef WINVER // Allow use of features specific to Windows XP or later. -#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. +#ifndef WINVER // Allow use of features specific to Windows XP or later. +#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif -#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. -#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. +#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. +#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif -#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. -#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. +#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. +#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif -#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. -#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. +#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. +#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. #endif -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include diff --git a/src/Layers/xrRender/AnimationKeyCalculate.h b/src/Layers/xrRender/AnimationKeyCalculate.h index 13a96a746a8..ff12255a150 100644 --- a/src/Layers/xrRender/AnimationKeyCalculate.h +++ b/src/Layers/xrRender/AnimationKeyCalculate.h @@ -21,7 +21,7 @@ struct ConsistantKey } }; -IC bool operator<(const ConsistantKey& A, const ConsistantKey& B) // note: inverse operator +IC bool operator<(const ConsistantKey& A, const ConsistantKey& B) // note: inverse operator { return A.w > B.w; } @@ -168,7 +168,7 @@ IC void Dequantize(CKey& K, const CBlend& BD, const CMotion& M) } */ - } // if (M.test_flag(flTKeyPresent)) + } // if (M.test_flag(flTKeyPresent)) else { D->T.set(M._initT); @@ -209,7 +209,8 @@ IC void MixInterlerp(CKey& Result, const CKey* R, const CBlend* const BA[MAX_BLE w = w1 / ws; #ifdef DEBUG //. if (fis_zero(w0+w1) || (!_valid(w))){ -//. xrDebug::Fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, w0: %f, w1: %f, ws:%f, BIS: +//. xrDebug::Fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, w0: %f, w1: %f, ws:%f, +//BIS: //%d",w0+w1,w,w0,w1,ws,BLEND_INST.Blend.size()); //. } #endif @@ -252,8 +253,9 @@ IC void MixInterlerp(CKey& Result, const CKey* R, const CBlend* const BA[MAX_BLE #ifdef DEBUG //. if ((total==0) || (!_valid(S[cnt].w/total))){ -//. xrDebug::Fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, total: %f, count: %d, real -//count: %d",total,S[cnt].w,total,count,BLEND_INST.Blend.size()); +//. xrDebug::Fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, total: %f, count: %d, +//real +// count: %d",total,S[cnt].w,total,count,BLEND_INST.Blend.size()); //. } #endif @@ -265,7 +267,7 @@ IC void MixInterlerp(CKey& Result, const CKey* R, const CBlend* const BA[MAX_BLE } } -IC void key_sub(CKey& rk, const CKey& k0, const CKey& k1) // sub right +IC void key_sub(CKey& rk, const CKey& k0, const CKey& k1) // sub right { Fquaternion q; q.inverse(k1.Q); @@ -279,7 +281,7 @@ IC void key_identity(CKey& k) k.Q.identity(); k.T.set(0, 0, 0); } -IC void key_add(CKey& res, const CKey& k0, const CKey& k1) // add right +IC void key_add(CKey& res, const CKey& k0, const CKey& k1) // add right { res.Q.set(Fquaternion().mul(k0.Q, k1.Q)); // res.Q.normalize(); diff --git a/src/Layers/xrRender/Blender_BmmD.cpp b/src/Layers/xrRender/Blender_BmmD.cpp index 890dee2bdd8..05ae9051829 100644 --- a/src/Layers/xrRender/Blender_BmmD.cpp +++ b/src/Layers/xrRender/Blender_BmmD.cpp @@ -17,10 +17,10 @@ CBlender_BmmD::CBlender_BmmD() xr_strcpy(oT2_Name, "$null"); xr_strcpy(oT2_xform, "$null"); description.version = 3; - xr_strcpy(oR_Name, "detail\\detail_grnd_grass"); //"$null"); - xr_strcpy(oG_Name, "detail\\detail_grnd_asphalt"); //"$null"); - xr_strcpy(oB_Name, "detail\\detail_grnd_earth"); //"$null"); - xr_strcpy(oA_Name, "detail\\detail_grnd_yantar"); //"$null"); + xr_strcpy(oR_Name, "detail\\detail_grnd_grass"); //"$null"); + xr_strcpy(oG_Name, "detail\\detail_grnd_asphalt"); //"$null"); + xr_strcpy(oB_Name, "detail\\detail_grnd_earth"); //"$null"); + xr_strcpy(oA_Name, "detail\\detail_grnd_yantar"); //"$null"); } CBlender_BmmD::~CBlender_BmmD() @@ -147,7 +147,7 @@ void CBlender_BmmD::Compile(CBlender_Compile& C) strconcat(sizeof(mask), mask, C.L_textures[0].c_str(), "_mask"); switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "impl", "impl", false, oT2_Name[0] ? oT2_Name : 0, true); C.r_Sampler("s_mask", mask); C.r_Sampler("s_lmap", C.L_textures[1]); @@ -168,12 +168,12 @@ void CBlender_BmmD::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "base", "impl", false, oT2_Name[0] ? oT2_Name : 0, true); C.r_Sampler("s_lmap", C.L_textures[1]); C.r_End(); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap if (RImplementation.o.HW_smap) C.r_Pass("shadow_direct_base", "dumb", FALSE, TRUE, TRUE, FALSE); else @@ -197,7 +197,7 @@ void CBlender_BmmD::Compile(CBlender_Compile& C) strconcat(sizeof(mask), mask, C.L_textures[0].c_str(), "_mask"); switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "impl", "impl", false, oT2_Name[0] ? oT2_Name : 0, true); // C.r_Sampler ("s_mask", mask); // C.r_Sampler ("s_lmap", C.L_textures[1]); @@ -237,7 +237,7 @@ void CBlender_BmmD::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "base", "impl", false, oT2_Name[0] ? oT2_Name : 0, true); // C.r_Sampler ("s_lmap", C.L_textures[1]); @@ -250,7 +250,7 @@ void CBlender_BmmD::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap // if (RImplementation.o.HW_smap) C.r_Pass ("shadow_direct_base","dumb", FALSE,TRUE,TRUE,FALSE); // else C.r_Pass ("shadow_direct_base","shadow_direct_base",FALSE); C.r_Pass("shadow_direct_base", "dumb", FALSE, TRUE, TRUE, FALSE); diff --git a/src/Layers/xrRender/Blender_BmmD.h b/src/Layers/xrRender/Blender_BmmD.h index 7b4e82b7217..239c1dc1d87 100644 --- a/src/Layers/xrRender/Blender_BmmD.h +++ b/src/Layers/xrRender/Blender_BmmD.h @@ -9,12 +9,12 @@ class CBlender_BmmD : public IBlender { public: - string64 oT2_Name; // name of secondary texture - string64 oT2_xform; // xform for secondary texture - string64 oR_Name; //. задел на будущее - string64 oG_Name; //. задел на будущее - string64 oB_Name; //. задел на будущее - string64 oA_Name; //. задел на будущее + string64 oT2_Name; // name of secondary texture + string64 oT2_xform; // xform for secondary texture + string64 oR_Name; //. задел на будущее + string64 oG_Name; //. задел на будущее + string64 oB_Name; //. задел на будущее + string64 oA_Name; //. задел на будущее public: virtual LPCSTR getComment() { return "LEVEL: Implicit**detail"; } virtual BOOL canBeDetailed() { return TRUE; } @@ -28,4 +28,4 @@ class CBlender_BmmD : public IBlender virtual ~CBlender_BmmD(); }; -#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_BmmD) +#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_BmmD) diff --git a/src/Layers/xrRender/Blender_Editor_Selection.cpp b/src/Layers/xrRender/Blender_Editor_Selection.cpp index b7bdf068551..18f0964c824 100644 --- a/src/Layers/xrRender/Blender_Editor_Selection.cpp +++ b/src/Layers/xrRender/Blender_Editor_Selection.cpp @@ -53,7 +53,7 @@ void CBlender_Editor_Selection::Compile(CBlender_Compile& C) C.PassEnd(); } else -#endif // USE_DX10 +#endif // USE_DX10 { C.r_Pass("editor", "simple_color", FALSE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_End(); diff --git a/src/Layers/xrRender/Blender_Editor_Selection.h b/src/Layers/xrRender/Blender_Editor_Selection.h index bd388774105..3821ab20b1a 100644 --- a/src/Layers/xrRender/Blender_Editor_Selection.h +++ b/src/Layers/xrRender/Blender_Editor_Selection.h @@ -18,4 +18,4 @@ class CBlender_Editor_Selection : public IBlender virtual ~CBlender_Editor_Selection(); }; -#endif // BLENDER_EDITOR_SELECTION_H +#endif // BLENDER_EDITOR_SELECTION_H diff --git a/src/Layers/xrRender/Blender_Editor_Wire.cpp b/src/Layers/xrRender/Blender_Editor_Wire.cpp index ce776f09d2a..c2d69bd872d 100644 --- a/src/Layers/xrRender/Blender_Editor_Wire.cpp +++ b/src/Layers/xrRender/Blender_Editor_Wire.cpp @@ -53,7 +53,7 @@ void CBlender_Editor_Wire::Compile(CBlender_Compile& C) C.PassEnd(); } else -#endif // USE_DX10 +#endif // USE_DX10 { C.r_Pass("editor", "simple_color", FALSE, TRUE, TRUE); C.r_End(); diff --git a/src/Layers/xrRender/Blender_Editor_Wire.h b/src/Layers/xrRender/Blender_Editor_Wire.h index 87d918736d5..fc6d8d09ee7 100644 --- a/src/Layers/xrRender/Blender_Editor_Wire.h +++ b/src/Layers/xrRender/Blender_Editor_Wire.h @@ -18,4 +18,4 @@ class CBlender_Editor_Wire : public IBlender virtual ~CBlender_Editor_Wire(); }; -#endif // BLENDER_EDITOR_WIRE_H +#endif // BLENDER_EDITOR_WIRE_H diff --git a/src/Layers/xrRender/Blender_Lm(EbB).h b/src/Layers/xrRender/Blender_Lm(EbB).h index 39c14ce8ba6..4585c254a06 100644 --- a/src/Layers/xrRender/Blender_Lm(EbB).h +++ b/src/Layers/xrRender/Blender_Lm(EbB).h @@ -9,8 +9,8 @@ class CBlender_LmEbB : public IBlender { public: - string64 oT2_Name; // name of secondary texture - string64 oT2_xform; // xform for secondary texture + string64 oT2_Name; // name of secondary texture + string64 oT2_xform; // xform for secondary texture xrP_BOOL oBlend; public: @@ -25,4 +25,4 @@ class CBlender_LmEbB : public IBlender virtual ~CBlender_LmEbB(); }; -#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_2) +#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_2) diff --git a/src/Layers/xrRender/Blender_Model_EbB.cpp b/src/Layers/xrRender/Blender_Model_EbB.cpp index d96dec04058..10bd4b96985 100644 --- a/src/Layers/xrRender/Blender_Model_EbB.cpp +++ b/src/Layers/xrRender/Blender_Model_EbB.cpp @@ -170,13 +170,13 @@ void CBlender_Model_EbB::Compile(CBlender_Compile& C) // deferred switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "model", "base", false); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "model", "base", false); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap if (RImplementation.o.HW_smap) C.r_Pass("shadow_direct_model", "dumb", FALSE, TRUE, TRUE, FALSE); else @@ -219,19 +219,19 @@ void CBlender_Model_EbB::Compile(CBlender_Compile& C) // deferred switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "model", "base", false, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); C.r_StencilRef(0x01); C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "model", "base", false, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); C.r_StencilRef(0x01); C.r_End(); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap // if (RImplementation.o.HW_smap) C.r_Pass ("shadow_direct_model","dumb", FALSE,TRUE,TRUE,FALSE); // else C.r_Pass ("shadow_direct_model","shadow_direct_base",FALSE); C.r_Pass("shadow_direct_model", "dumb", FALSE, TRUE, TRUE, FALSE); diff --git a/src/Layers/xrRender/Blender_Model_EbB.h b/src/Layers/xrRender/Blender_Model_EbB.h index 2bbf94941a4..2888493af56 100644 --- a/src/Layers/xrRender/Blender_Model_EbB.h +++ b/src/Layers/xrRender/Blender_Model_EbB.h @@ -9,8 +9,8 @@ class CBlender_Model_EbB : public IBlender { public: - string64 oT2_Name; // name of secondary texture - string64 oT2_xform; // xform for secondary texture + string64 oT2_Name; // name of secondary texture + string64 oT2_xform; // xform for secondary texture xrP_BOOL oBlend; public: @@ -25,4 +25,4 @@ class CBlender_Model_EbB : public IBlender virtual ~CBlender_Model_EbB(); }; -#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_2) +#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_2) diff --git a/src/Layers/xrRender/Blender_Particle.cpp b/src/Layers/xrRender/Blender_Particle.cpp index 294c5ed710a..38e5c341222 100644 --- a/src/Layers/xrRender/Blender_Particle.cpp +++ b/src/Layers/xrRender/Blender_Particle.cpp @@ -74,22 +74,22 @@ void CBlender_Particle::Compile(CBlender_Compile& C) { case 0: C.r_Pass("particle", "particle", TRUE, TRUE, TRUE, FALSE, D3DBLEND_ONE, D3DBLEND_ZERO, TRUE, 200); - break; // SET + break; // SET case 1: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, 0); - break; // BLEND + break; // BLEND case 2: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE, TRUE, 0); - break; // ADD + break; // ADD case 3: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // MUL + break; // MUL case 4: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_SRCCOLOR, TRUE, 0); - break; // MUL_2X + break; // MUL_2X case 5: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_ONE, TRUE, 0); - break; // ALPHA-ADD + break; // ALPHA-ADD } C.r_Sampler("s_base", C.L_textures[0], false, oClamp.value ? D3DTADDRESS_CLAMP : D3DTADDRESS_WRAP); C.r_End(); @@ -100,70 +100,70 @@ void CBlender_Particle::Compile(CBlender_Compile& C) IBlender::Compile(C); switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_LQ: // deffer switch (oBlend.IDselected) { case 0: C.r_Pass("deffer_particle", "deffer_particle", FALSE, TRUE, TRUE, FALSE, D3DBLEND_ONE, D3DBLEND_ZERO, FALSE, 200); - break; // SET + break; // SET case 1: C.r_Pass( "particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, 0); - break; // BLEND + break; // BLEND case 2: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE, TRUE, 0); - break; // ADD + break; // ADD case 3: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // MUL + break; // MUL case 4: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_SRCCOLOR, TRUE, 0); - break; // MUL_2X + break; // MUL_2X case 5: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_ONE, TRUE, 0); - break; // ALPHA-ADD + break; // ALPHA-ADD }; C.r_Sampler("s_base", C.L_textures[0], false, oClamp.value ? D3DTADDRESS_CLAMP : D3DTADDRESS_WRAP); // Igor: soft particles C.r_Sampler("s_position", "$user$position"); C.r_End(); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap // HARD or SOFT: shadow-map switch (oBlend.IDselected) { case 0: C.r_Pass("particle", "particle", FALSE, TRUE, TRUE, FALSE, D3DBLEND_ONE, D3DBLEND_ZERO, TRUE, 200); - break; // SET + break; // SET case 1: C.r_Pass("particle-clip", "particle_s-blend", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // BLEND + break; // BLEND case 2: C.r_Pass("particle-clip", "particle_s-add", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // ADD + break; // ADD case 3: C.r_Pass("particle-clip", "particle_s-mul", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // MUL + break; // MUL case 4: C.r_Pass("particle-clip", "particle_s-mul", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // MUL_2X + break; // MUL_2X case 5: C.r_Pass("particle-clip", "particle_s-aadd", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // ALPHA-ADD + break; // ALPHA-ADD }; C.r_Sampler("s_base", C.L_textures[0], false, oClamp.value ? D3DTADDRESS_CLAMP : D3DTADDRESS_WRAP); // Igor: soft particles C.r_Sampler("s_position", "$user$position"); C.r_End(); break; - case 4: // deffer-EMAP + case 4: // deffer-EMAP break; }; } @@ -174,30 +174,30 @@ void CBlender_Particle::Compile(CBlender_Compile& C) IBlender::Compile(C); switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_LQ: // deffer switch (oBlend.IDselected) { case 0: C.r_Pass("deffer_particle", "deffer_particle", FALSE, TRUE, TRUE, FALSE, D3DBLEND_ONE, D3DBLEND_ZERO, FALSE, 200); - break; // SET + break; // SET case 1: C.r_Pass( "particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, 0); - break; // BLEND + break; // BLEND case 2: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE, TRUE, 0); - break; // ADD + break; // ADD case 3: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // MUL + break; // MUL case 4: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_SRCCOLOR, TRUE, 0); - break; // MUL_2X + break; // MUL_2X case 5: C.r_Pass("particle", "particle", FALSE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_ONE, TRUE, 0); - break; // ALPHA-ADD + break; // ALPHA-ADD }; { // C.r_Sampler ("s_base", C.L_textures[0],false,oClamp.value?D3DTADDRESS_CLAMP:D3DTADDRESS_WRAP); @@ -211,34 +211,34 @@ void CBlender_Particle::Compile(CBlender_Compile& C) } C.r_End(); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap // HARD or SOFT: shadow-map switch (oBlend.IDselected) { case 0: C.r_Pass("particle", "particle", FALSE, TRUE, TRUE, FALSE, D3DBLEND_ONE, D3DBLEND_ZERO, TRUE, 200); C.r_ColorWriteEnable(false, false, false, false); - break; // SET + break; // SET case 1: C.r_Pass("particle-clip", "particle_s-blend", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // BLEND + break; // BLEND case 2: C.r_Pass("particle-clip", "particle_s-add", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // ADD + break; // ADD case 3: C.r_Pass("particle-clip", "particle_s-mul", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // MUL + break; // MUL case 4: C.r_Pass("particle-clip", "particle_s-mul", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // MUL_2X + break; // MUL_2X case 5: C.r_Pass("particle-clip", "particle_s-aadd", FALSE, TRUE, FALSE, TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, TRUE, 0); - break; // ALPHA-ADD + break; // ALPHA-ADD }; { // C.r_Sampler ("s_base", C.L_textures[0],false,oClamp.value?D3DTADDRESS_CLAMP:D3DTADDRESS_WRAP); @@ -252,7 +252,7 @@ void CBlender_Particle::Compile(CBlender_Compile& C) } C.r_End(); break; - case 4: // deffer-EMAP + case 4: // deffer-EMAP break; }; } diff --git a/src/Layers/xrRender/Blender_Particle.h b/src/Layers/xrRender/Blender_Particle.h index 69f33b994ef..dd489d1e653 100644 --- a/src/Layers/xrRender/Blender_Particle.h +++ b/src/Layers/xrRender/Blender_Particle.h @@ -24,4 +24,4 @@ class CBlender_Particle : public IBlender virtual ~CBlender_Particle(); }; -#endif // !defined(AFX_BLENDER_SCREEN_SET_H__A215FA40_D885_4D06_9032_ED934AE295E3__INCLUDED_P) +#endif // !defined(AFX_BLENDER_SCREEN_SET_H__A215FA40_D885_4D06_9032_ED934AE295E3__INCLUDED_P) diff --git a/src/Layers/xrRender/Blender_Recorder_R2.cpp b/src/Layers/xrRender/Blender_Recorder_R2.cpp index dbee0c3663b..1b99b16050c 100644 --- a/src/Layers/xrRender/Blender_Recorder_R2.cpp +++ b/src/Layers/xrRender/Blender_Recorder_R2.cpp @@ -35,7 +35,7 @@ void CBlender_Compile::r_Pass(LPCSTR _vs, LPCSTR _ps, bool bFog, BOOL bZtest, BO dest.ds = RImplementation.Resources->_CreateDS("null"); dest.cs = RImplementation.Resources->_CreateCS("null"); #endif -#endif // USE_DX10 +#endif // USE_DX10 ctable.merge(&ps->constants); ctable.merge(&vs->constants); @@ -140,10 +140,10 @@ u32 CBlender_Compile::r_Sampler( } if (0 == xr_strcmp(_name, "s_base_hud")) { - fmin = D3DTEXF_GAUSSIANQUAD; // D3DTEXF_PYRAMIDALQUAD; //D3DTEXF_ANISOTROPIC; //D3DTEXF_LINEAR; - // //D3DTEXF_POINT; //D3DTEXF_NONE - fmag = D3DTEXF_GAUSSIANQUAD; // D3DTEXF_PYRAMIDALQUAD; //D3DTEXF_ANISOTROPIC; //D3DTEXF_LINEAR; - // //D3DTEXF_POINT; //D3DTEXF_NONE; + fmin = D3DTEXF_GAUSSIANQUAD; // D3DTEXF_PYRAMIDALQUAD; //D3DTEXF_ANISOTROPIC; //D3DTEXF_LINEAR; + // //D3DTEXF_POINT; //D3DTEXF_NONE + fmag = D3DTEXF_GAUSSIANQUAD; // D3DTEXF_PYRAMIDALQUAD; //D3DTEXF_ANISOTROPIC; //D3DTEXF_LINEAR; + // //D3DTEXF_POINT; //D3DTEXF_NONE; } if ((0 == xr_strcmp(_name, "s_detail")) && (fmin == D3DTEXF_LINEAR)) { @@ -187,4 +187,4 @@ void CBlender_Compile::r_End() #endif SH->passes.push_back(RImplementation.Resources->_CreatePass(dest)); } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/Blender_Recorder_StandartBinding.cpp b/src/Layers/xrRender/Blender_Recorder_StandartBinding.cpp index da275db0a22..0b5ef0dd411 100644 --- a/src/Layers/xrRender/Blender_Recorder_StandartBinding.cpp +++ b/src/Layers/xrRender/Blender_Recorder_StandartBinding.cpp @@ -74,14 +74,14 @@ class cl_texgen : public R_constant_setup #if defined(USE_DX10) || defined(USE_DX11) Fmatrix mTexelAdjust = { 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.0f, 1.0f}; -#else // USE_DX10 +#else // USE_DX10 float _w = float(RDEVICE.dwWidth); float _h = float(RDEVICE.dwHeight); float o_w = (.5f / _w); float o_h = (.5f / _h); Fmatrix mTexelAdjust = {0.5f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f + o_w, 0.5f + o_h, 0.0f, 1.0f}; -#endif // USE_DX10 +#endif // USE_DX10 mTexgen.mul(mTexelAdjust, RCache.xforms.m_wvp); @@ -99,14 +99,14 @@ class cl_VPtexgen : public R_constant_setup #if defined(USE_DX10) || defined(USE_DX11) Fmatrix mTexelAdjust = { 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.0f, 1.0f}; -#else // USE_DX10 +#else // USE_DX10 float _w = float(RDEVICE.dwWidth); float _h = float(RDEVICE.dwHeight); float o_w = (.5f / _w); float o_h = (.5f / _h); Fmatrix mTexelAdjust = {0.5f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f + o_w, 0.5f + o_h, 0.0f, 1.0f}; -#endif // USE_DX10 +#endif // USE_DX10 mTexgen.mul(mTexelAdjust, RCache.xforms.m_vp); @@ -137,7 +137,7 @@ class cl_fog_plane : public R_constant_setup // Near/Far float A = g_pGamePersistent->Environment().CurrentEnv->fog_near; float B = 1 / (g_pGamePersistent->Environment().CurrentEnv->fog_far - A); - result.set(-plane.x * B, -plane.y * B, -plane.z * B, 1 - (plane.w - A) * B); // view-plane + result.set(-plane.x * B, -plane.y * B, -plane.z * B, 1 - (plane.w - A) * B); // view-plane } RCache.set_c(C, result); } diff --git a/src/Layers/xrRender/Blender_Screen_SET.cpp b/src/Layers/xrRender/Blender_Screen_SET.cpp index 5d5fd0e89d0..cffdf4ecfab 100644 --- a/src/Layers/xrRender/Blender_Screen_SET.cpp +++ b/src/Layers/xrRender/Blender_Screen_SET.cpp @@ -170,34 +170,34 @@ void CBlender_Screen_SET::Compile(CBlender_Compile& C) switch (oBlend.IDselected) { - case 0: // SET + case 0: // SET C.PassSET_Blend(FALSE, D3DBLEND_ONE, D3DBLEND_ZERO, FALSE, 0); break; - case 1: // BLEND + case 1: // BLEND C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); break; - case 2: // ADD + case 2: // ADD C.PassSET_Blend(TRUE, D3DBLEND_ONE, D3DBLEND_ONE, FALSE, oAREF.value); break; - case 3: // MUL + case 3: // MUL C.PassSET_Blend(TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, FALSE, oAREF.value); break; - case 4: // MUL_2X + case 4: // MUL_2X C.PassSET_Blend(TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_SRCCOLOR, FALSE, oAREF.value); break; - case 5: // ALPHA-ADD + case 5: // ALPHA-ADD C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_ONE, TRUE, oAREF.value); break; - case 6: // MUL_2X + A-test + case 6: // MUL_2X + A-test C.PassSET_Blend(TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_SRCCOLOR, FALSE, oAREF.value); break; - case 7: // SET (2r) + case 7: // SET (2r) C.PassSET_Blend(TRUE, D3DBLEND_ONE, D3DBLEND_ZERO, TRUE, 0); break; - case 8: // BLEND (2r) + case 8: // BLEND (2r) C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); break; - case 9: // BLEND (2r) + case 9: // BLEND (2r) C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); break; } @@ -206,7 +206,7 @@ void CBlender_Screen_SET::Compile(CBlender_Compile& C) C.r_End(); } -#else // USE_DX10 +#else // USE_DX10 void CBlender_Screen_SET::Compile(CBlender_Compile& C) { @@ -216,34 +216,34 @@ void CBlender_Screen_SET::Compile(CBlender_Compile& C) C.PassSET_ZB(oZTest.value, oZWrite.value); switch (oBlend.IDselected) { - case 0: // SET + case 0: // SET C.PassSET_Blend(FALSE, D3DBLEND_ONE, D3DBLEND_ZERO, FALSE, 0); break; - case 1: // BLEND + case 1: // BLEND C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); break; - case 2: // ADD + case 2: // ADD C.PassSET_Blend(TRUE, D3DBLEND_ONE, D3DBLEND_ONE, FALSE, oAREF.value); break; - case 3: // MUL + case 3: // MUL C.PassSET_Blend(TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_ZERO, FALSE, oAREF.value); break; - case 4: // MUL_2X + case 4: // MUL_2X C.PassSET_Blend(TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_SRCCOLOR, FALSE, oAREF.value); break; - case 5: // ALPHA-ADD + case 5: // ALPHA-ADD C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_ONE, TRUE, oAREF.value); break; - case 6: // MUL_2X + A-test + case 6: // MUL_2X + A-test C.PassSET_Blend(TRUE, D3DBLEND_DESTCOLOR, D3DBLEND_SRCCOLOR, FALSE, oAREF.value); break; - case 7: // SET (2r) + case 7: // SET (2r) C.PassSET_Blend(TRUE, D3DBLEND_ONE, D3DBLEND_ZERO, TRUE, 0); break; - case 8: // BLEND (2r) + case 8: // BLEND (2r) C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); break; - case 9: // BLEND (2r) + case 9: // BLEND (2r) C.PassSET_Blend(TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); break; } @@ -301,4 +301,4 @@ void CBlender_Screen_SET::Compile(CBlender_Compile& C) } C.PassEnd(); } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/Blender_Screen_SET.h b/src/Layers/xrRender/Blender_Screen_SET.h index 160ad708421..f21f9436e31 100644 --- a/src/Layers/xrRender/Blender_Screen_SET.h +++ b/src/Layers/xrRender/Blender_Screen_SET.h @@ -28,4 +28,4 @@ class CBlender_Screen_SET : public IBlender virtual ~CBlender_Screen_SET(); }; -#endif // !defined(AFX_BLENDER_SCREEN_SET_H__A215FA40_D885_4D06_9032_ED934AE295E3__INCLUDED_) +#endif // !defined(AFX_BLENDER_SCREEN_SET_H__A215FA40_D885_4D06_9032_ED934AE295E3__INCLUDED_) diff --git a/src/Layers/xrRender/Blender_detail_still.cpp b/src/Layers/xrRender/Blender_detail_still.cpp index 2cb44225935..7e1ed104ec6 100644 --- a/src/Layers/xrRender/Blender_detail_still.cpp +++ b/src/Layers/xrRender/Blender_detail_still.cpp @@ -90,10 +90,10 @@ void CBlender_Detail_Still::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer wave + case SE_R2_NORMAL_HQ: // deffer wave uber_deffer(C, false, "detail_w", "base", true); break; - case SE_R2_NORMAL_LQ: // deffer still + case SE_R2_NORMAL_LQ: // deffer still uber_deffer(C, false, "detail_s", "base", true); break; } @@ -111,7 +111,7 @@ void CBlender_Detail_Still::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer wave + case SE_R2_NORMAL_HQ: // deffer wave if (bUseATOC) { uber_deffer(C, false, "detail_w", "base_atoc", true, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -130,7 +130,7 @@ void CBlender_Detail_Still::Compile(CBlender_Compile& C) if (bUseATOC) C.RS.SetRS(D3DRS_ZFUNC, D3DCMP_EQUAL); C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer still + case SE_R2_NORMAL_LQ: // deffer still if (bUseATOC) { uber_deffer(C, false, "detail_s", "base_atoc", true, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); diff --git a/src/Layers/xrRender/Blender_detail_still.h b/src/Layers/xrRender/Blender_detail_still.h index e3ab2977176..b2e94b35807 100644 --- a/src/Layers/xrRender/Blender_detail_still.h +++ b/src/Layers/xrRender/Blender_detail_still.h @@ -23,4 +23,4 @@ class CBlender_Detail_Still : public IBlender virtual ~CBlender_Detail_Still(); }; -#endif // !defined(AFX_BLENDER_VERTEX_AREF_H__07141B30_A968_407E_86F8_D12702FE0B9B__INCLUDED_2) +#endif // !defined(AFX_BLENDER_VERTEX_AREF_H__07141B30_A968_407E_86F8_D12702FE0B9B__INCLUDED_2) diff --git a/src/Layers/xrRender/Blender_tree.cpp b/src/Layers/xrRender/Blender_tree.cpp index 0f7b2e45658..e1366822f66 100644 --- a/src/Layers/xrRender/Blender_tree.cpp +++ b/src/Layers/xrRender/Blender_tree.cpp @@ -173,14 +173,14 @@ void CBlender_Tree::Compile(CBlender_Compile& C) } switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, tvs, "base", oBlend.value); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, tvs, "base", oBlend.value); break; - case SE_R2_SHADOW: // smap-spot - // TODO: DX10: Use dumb shader for shadowmap since shadows are drawn using hardware PCF + case SE_R2_SHADOW: // smap-spot + // TODO: DX10: Use dumb shader for shadowmap since shadows are drawn using hardware PCF if (oBlend.value) C.r_Pass(tvs_s, "shadow_direct_base_aref", FALSE, TRUE, TRUE, TRUE, D3DBLEND_ZERO, D3DBLEND_ONE, TRUE, 200); else @@ -222,7 +222,7 @@ void CBlender_Tree::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer if (bUseATOC) { uber_deffer(C, true, tvs, "base_atoc", oBlend.value, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -242,7 +242,7 @@ void CBlender_Tree::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer if (bUseATOC) { uber_deffer(C, false, tvs, "base_atoc", oBlend.value, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -260,7 +260,7 @@ void CBlender_Tree::Compile(CBlender_Compile& C) if (bUseATOC) C.RS.SetRS(D3DRS_ZFUNC, D3DCMP_EQUAL); C.r_End(); break; - case SE_R2_SHADOW: // smap-spot + case SE_R2_SHADOW: // smap-spot // TODO: DX10: Use dumb shader for shadowmap since shadows are drawn using hardware PCF if (oBlend.value) C.r_Pass(tvs_s, "shadow_direct_base_aref", FALSE, TRUE, TRUE, TRUE, D3DBLEND_ZERO, D3DBLEND_ONE, TRUE, 200); diff --git a/src/Layers/xrRender/Blender_tree.h b/src/Layers/xrRender/Blender_tree.h index 1f92ddd3839..2f8b7d8eecc 100644 --- a/src/Layers/xrRender/Blender_tree.h +++ b/src/Layers/xrRender/Blender_tree.h @@ -25,4 +25,4 @@ class CBlender_Tree : public IBlender virtual ~CBlender_Tree(); }; -#endif // !defined(AFX_BLENDER_VERTEX_AREF_H__07141B30_A968_407E_86F8_D12702FE0B9B__INCLUDED_3) +#endif // !defined(AFX_BLENDER_VERTEX_AREF_H__07141B30_A968_407E_86F8_D12702FE0B9B__INCLUDED_3) diff --git a/src/Layers/xrRender/ColorMapManager.h b/src/Layers/xrRender/ColorMapManager.h index 1df31cddae0..f81ded1a11c 100644 --- a/src/Layers/xrRender/ColorMapManager.h +++ b/src/Layers/xrRender/ColorMapManager.h @@ -31,4 +31,4 @@ class ColorMapManager map_Tex m_TexCache; }; -#endif // ColorMapManager_included \ No newline at end of file +#endif // ColorMapManager_included \ No newline at end of file diff --git a/src/Layers/xrRender/D3DUtils.cpp b/src/Layers/xrRender/D3DUtils.cpp index a1f23b5d5ef..2acbe73fb40 100644 --- a/src/Layers/xrRender/D3DUtils.cpp +++ b/src/Layers/xrRender/D3DUtils.cpp @@ -18,7 +18,7 @@ CDrawUtilities DUImpl; -#define LINE_DIVISION 32 // не меньше 6!!!!! +#define LINE_DIVISION 32 // не меньше 6!!!!! // for drawing sphere static Fvector circledef1[LINE_DIVISION]; static Fvector circledef2[LINE_DIVISION]; @@ -113,7 +113,7 @@ void SPrimitiveBuffer::CreateFromData( #if defined(USE_DX10) || defined(USE_DX11) // TODO: DX10: Implement SPrimitiveBuffer::CreateFromData for DX10 // VERIFY(!"SPrimitiveBuffer::CreateFromData not implemented for dx10"); -#else // USE_DX10 +#else // USE_DX10 ID3DVertexBuffer* pVB = 0; ID3DIndexBuffer* pIB = 0; p_cnt = _p_cnt; @@ -144,7 +144,7 @@ void SPrimitiveBuffer::CreateFromData( OnRender.bind(this, &SPrimitiveBuffer::RenderDP); } pGeom.create(FVF, pVB, pIB); -#endif // USE_DX10 +#endif // USE_DX10 } void SPrimitiveBuffer::Destroy() { @@ -168,8 +168,8 @@ void CDrawUtilities::UpdateGrid(int number_of_cell, float square_size, int subdi m_GridStep.set(square_size, square_size); m_GridSubDiv[0] = subdiv; m_GridSubDiv[1] = subdiv; - m_GridCounts[0] = number_of_cell; // iFloor(size/step)*subdiv; - m_GridCounts[1] = number_of_cell; // iFloor(size/step)*subdiv; + m_GridCounts[0] = number_of_cell; // iFloor(size/step)*subdiv; + m_GridCounts[1] = number_of_cell; // iFloor(size/step)*subdiv; FVF::L left, right; left.p.y = right.p.y = 0; @@ -701,7 +701,7 @@ void CDrawUtilities::dbgDrawPlacement(const Fvector& p, int sz, u32 clr, LPCSTR Fvector c; float w = p.x * Device.mFullTransform._14 + p.y * Device.mFullTransform._24 + p.z * Device.mFullTransform._34 + Device.mFullTransform._44; - if (w < 0) return; // culling + if (w < 0) return; // culling float s = (float)sz; Device.mFullTransform.transform(c, p); @@ -1291,7 +1291,7 @@ void CDrawUtilities::DrawObjectAxis(const Fmatrix& T, float sz, BOOL sel) Fvector c, r, n, d; float w = T.c.x * Device.mFullTransform._14 + T.c.y * Device.mFullTransform._24 + T.c.z * Device.mFullTransform._34 + Device.mFullTransform._44; - if (w < 0) return; // culling + if (w < 0) return; // culling float s = w * sz; Device.mFullTransform.transform(c, T.c); diff --git a/src/Layers/xrRender/D3DXRenderBase.h b/src/Layers/xrRender/D3DXRenderBase.h index 5b1e133f9d0..71377d8f3cb 100644 --- a/src/Layers/xrRender/D3DXRenderBase.h +++ b/src/Layers/xrRender/D3DXRenderBase.h @@ -21,10 +21,10 @@ class D3DXRenderBase : public IRender, public pureFrame Fmatrix* val_pTransform; BOOL val_bHUD; BOOL val_bInvisible; - BOOL val_bRecordMP; // record nearest for multi-pass - R_feedback* val_feedback; // feedback for geometry being rendered - u32 val_feedback_breakp; // breakpoint - xr_vector>* val_recorder; // coarse structure recorder + BOOL val_bRecordMP; // record nearest for multi-pass + R_feedback* val_feedback; // feedback for geometry being rendered + u32 val_feedback_breakp; // breakpoint + xr_vector>* val_recorder; // coarse structure recorder u32 phase; u32 marker; bool pmask[2]; @@ -33,7 +33,7 @@ class D3DXRenderBase : public IRender, public pureFrame public: // Dynamic scene graph // R_dsgraph::mapNormal_T mapNormal [2] ; // 2==(priority/2) - R_dsgraph::mapNormalPasses_T mapNormalPasses[2]; // 2==(priority/2) + R_dsgraph::mapNormalPasses_T mapNormalPasses[2]; // 2==(priority/2) // R_dsgraph::mapMatrix_T mapMatrix [2] ; R_dsgraph::mapMatrixPasses_T mapMatrixPasses[2]; R_dsgraph::mapSorted_T mapSorted; @@ -42,7 +42,7 @@ class D3DXRenderBase : public IRender, public pureFrame R_dsgraph::mapSorted_T mapDistort; #if RENDER != R_R1 - R_dsgraph::mapSorted_T mapWmark; // sorted + R_dsgraph::mapSorted_T mapWmark; // sorted R_dsgraph::mapSorted_T mapEmissive; R_dsgraph::mapSorted_T mapHUDEmissive; #endif @@ -51,7 +51,7 @@ class D3DXRenderBase : public IRender, public pureFrame xr_vector> nrmVS; #if defined(USE_DX10) || defined(USE_DX11) xr_vector> nrmGS; -#endif // USE_DX10 +#endif // USE_DX10 xr_vector> nrmPS; xr_vector> nrmCS; xr_vector> nrmStates; @@ -61,7 +61,7 @@ class D3DXRenderBase : public IRender, public pureFrame xr_vector> matVS; #if defined(USE_DX10) || defined(USE_DX11) xr_vector> matGS; -#endif // USE_DX10 +#endif // USE_DX10 xr_vector> matPS; xr_vector> matCS; xr_vector> matStates; @@ -80,8 +80,8 @@ class D3DXRenderBase : public IRender, public pureFrame BOOL b_loaded; public: - friend class CSkeletonX; // Stats.Skinning - friend class CKinematics; // Stats.Animation + friend class CSkeletonX; // Stats.Skinning + friend class CKinematics; // Stats.Animation RenderStatistics BasicStats; public: diff --git a/src/Layers/xrRender/Debug/dxPixEventWrapper.cpp b/src/Layers/xrRender/Debug/dxPixEventWrapper.cpp index 821c33577eb..d9db102eb1d 100644 --- a/src/Layers/xrRender/Debug/dxPixEventWrapper.cpp +++ b/src/Layers/xrRender/Debug/dxPixEventWrapper.cpp @@ -3,4 +3,4 @@ #ifdef DEBUG -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/Layers/xrRender/Debug/dxPixEventWrapper.h b/src/Layers/xrRender/Debug/dxPixEventWrapper.h index f91961c01a6..c91470e1594 100644 --- a/src/Layers/xrRender/Debug/dxPixEventWrapper.h +++ b/src/Layers/xrRender/Debug/dxPixEventWrapper.h @@ -12,13 +12,13 @@ class dxPixEventWrapper dxPixEventWrapper(LPCWSTR wszName) { D3DPERF_BeginEvent(D3DCOLOR_RGBA(127, 0, 0, 255), wszName); } ~dxPixEventWrapper() { D3DPERF_EndEvent(); } }; -#else // DEBUG +#else // DEBUG #define PIX_EVENT(Name) \ { \ ; \ } -#endif // DEBUG +#endif // DEBUG -#endif // dxPixEventWrapper_included \ No newline at end of file +#endif // dxPixEventWrapper_included \ No newline at end of file diff --git a/src/Layers/xrRender/DetailFormat.h b/src/Layers/xrRender/DetailFormat.h index c688b19c4f6..600ca5b1896 100644 --- a/src/Layers/xrRender/DetailFormat.h +++ b/src/Layers/xrRender/DetailFormat.h @@ -122,19 +122,19 @@ struct DetailPalette u16 a2 : 4; u16 a3 : 4; }; -struct DetailSlot // was(4+4+3*4+2 = 22b), now(8+2*4=16b) +struct DetailSlot // was(4+4+3*4+2 = 22b), now(8+2*4=16b) { - u32 y_base : 12; // 11 // 1 unit = 20 cm, low = -200m, high = 4096*20cm - 200 = 619.2m - u32 y_height : 8; // 20 // 1 unit = 10 cm, low = 0, high = 256*10 ~= 25.6m - u32 id0 : 6; // 26 // 0x3F(63) = empty - u32 id1 : 6; // 32 // 0x3F(63) = empty - u32 id2 : 6; // 38 // 0x3F(63) = empty - u32 id3 : 6; // 42 // 0x3F(63) = empty - u32 c_dir : 4; // 48 // 0..1 q - u32 c_hemi : 4; // 52 // 0..1 q - u32 c_r : 4; // 56 // rgb = 4.4.4 - u32 c_g : 4; // 60 // rgb = 4.4.4 - u32 c_b : 4; // 64 // rgb = 4.4.4 + u32 y_base : 12; // 11 // 1 unit = 20 cm, low = -200m, high = 4096*20cm - 200 = 619.2m + u32 y_height : 8; // 20 // 1 unit = 10 cm, low = 0, high = 256*10 ~= 25.6m + u32 id0 : 6; // 26 // 0x3F(63) = empty + u32 id1 : 6; // 32 // 0x3F(63) = empty + u32 id2 : 6; // 38 // 0x3F(63) = empty + u32 id3 : 6; // 42 // 0x3F(63) = empty + u32 c_dir : 4; // 48 // 0..1 q + u32 c_hemi : 4; // 52 // 0..1 q + u32 c_r : 4; // 56 // rgb = 4.4.4 + u32 c_g : 4; // 60 // rgb = 4.4.4 + u32 c_b : 4; // 64 // rgb = 4.4.4 DetailPalette palette[4]; public: diff --git a/src/Layers/xrRender/DetailManager.cpp b/src/Layers/xrRender/DetailManager.cpp index 2d0afd11c76..60189f0991a 100644 --- a/src/Layers/xrRender/DetailManager.cpp +++ b/src/Layers/xrRender/DetailManager.cpp @@ -10,14 +10,14 @@ #ifdef _EDITOR #include "ESceneClassList.h" +#include "Environment.h" +#include "IGame_Persistent.h" #include "Scene.h" #include "SceneObject.h" -#include "IGame_Persistent.h" -#include "Environment.h" #else -#include "xrEngine/IGame_Persistent.h" -#include "xrEngine/Environment.h" #include +#include "xrEngine/Environment.h" +#include "xrEngine/IGame_Persistent.h" #endif const float dbgOffset = 0.f; @@ -213,7 +213,7 @@ void CDetailManager::UpdateVisibleM() u32 mask = 0xff; u32 res = View.testSAABB(MS.vis.sphere.P, MS.vis.sphere.R, MS.vis.box.data(), mask); if (fcvNone == res) { - continue; // invisible-view frustum + continue; // invisible-view frustum } // test slots @@ -237,12 +237,12 @@ void CDetailManager::UpdateVisibleM() u32 _mask = mask; u32 _res = View.testSAABB(S.vis.sphere.P, S.vis.sphere.R, S.vis.box.data(), _mask); if (fcvNone == _res) { - continue; // invisible-view frustum + continue; // invisible-view frustum } } #ifndef _EDITOR if (!RImplementation.HOM.visible(S.vis)) { - continue; // invisible-occlusion + continue; // invisible-occlusion } #endif // Add to visibility structures @@ -265,7 +265,7 @@ void CDetailManager::UpdateVisibleM() sp.r_items[2].clear_not_free(); float R = objects[sp.id]->bv_sphere.R; - float Rq_drcp = R * R * dist_sq_rcp; // reordered expression for 'ssa' calc + float Rq_drcp = R * R * dist_sq_rcp; // reordered expression for 'ssa' calc SlotItem **siIT = &(*sp.items.begin()), **siEND = &(*sp.items.end()); for (; siIT != siEND; siIT++) @@ -338,14 +338,14 @@ void CDetailManager::Render() void __stdcall CDetailManager::MT_CALC() { #ifndef _EDITOR - if (0 == RImplementation.Details) return; // possibly deleted + if (0 == RImplementation.Details) return; // possibly deleted if (0 == dtFS) return; if (!psDeviceFlags.is(rsDetails)) return; #endif MT.Enter(); if (m_frame_calc != RDEVICE.dwFrame) - if ((m_frame_rendered + 1) == RDEVICE.dwFrame) // already rendered + if ((m_frame_rendered + 1) == RDEVICE.dwFrame) // already rendered { Fvector EYE = RDEVICE.vCameraPosition_saved; diff --git a/src/Layers/xrRender/DetailManager.h b/src/Layers/xrRender/DetailManager.h index 6aff6915a2c..59265794f6d 100644 --- a/src/Layers/xrRender/DetailManager.h +++ b/src/Layers/xrRender/DetailManager.h @@ -24,9 +24,9 @@ typedef ObjectMap::iterator ObjectPairIt; #else const int dm_max_decompress = 7; #endif -const int dm_size = 24; //! -const int dm_cache1_count = 4; // -const int dm_cache1_line = dm_size * 2 / dm_cache1_count; //! dm_size*2 must be div dm_cache1_count +const int dm_size = 24; //! +const int dm_cache1_count = 4; // +const int dm_cache1_line = dm_size * 2 / dm_cache1_count; //! dm_size*2 must be div dm_cache1_count const int dm_max_objects = 64; const int dm_obj_in_slot = 4; const int dm_cache_line = dm_size + 1 + dm_size; @@ -38,11 +38,11 @@ class ECORE_API CDetailManager { public: struct SlotItem - { // один кустик + { // один кустик float scale; float scale_calculated; Fmatrix mRotY; - u32 vis_ID; // индекс в visibility списке он же тип [не качается, качается1, качается2] + u32 vis_ID; // индекс в visibility списке он же тип [не качается, качается1, качается2] float c_hemi; float c_sun; #if RENDER == R_R1 @@ -51,29 +51,29 @@ class ECORE_API CDetailManager }; DEFINE_VECTOR(SlotItem*, SlotItemVec, SlotItemVecIt); struct SlotPart - { // - u32 id; // ID модельки - SlotItemVec items; // список кустиков - SlotItemVec r_items[3]; // список кустиков for render + { // + u32 id; // ID модельки + SlotItemVec items; // список кустиков + SlotItemVec r_items[3]; // список кустиков for render }; enum SlotType { - stReady = 0, // Ready to use - stPending, // Pending for decompression + stReady = 0, // Ready to use + stPending, // Pending for decompression stFORCEDWORD = 0xffffffff }; struct Slot - { // распакованый слот размером DETAIL_SLOT_SIZE + { // распакованый слот размером DETAIL_SLOT_SIZE struct { u32 empty : 1; u32 type : 1; u32 frame : 30; }; - int sx, sz; // координаты слота X x Y - vis_data vis; // - SlotPart G[dm_obj_in_slot]; // + int sx, sz; // координаты слота X x Y + vis_data vis; // + SlotPart G[dm_obj_in_slot]; // Slot() { @@ -125,24 +125,24 @@ class ECORE_API CDetailManager public: IReader* dtFS; DetailHeader dtH; - DetailSlot* dtSlots; // note: pointer into VFS + DetailSlot* dtSlots; // note: pointer into VFS DetailSlot DS_empty; public: DetailVec objects; - vis_list m_visibles[3]; // 0=still, 1=Wave1, 2=Wave2 + vis_list m_visibles[3]; // 0=still, 1=Wave1, 2=Wave2 #ifndef _EDITOR xrXRC xrc; #endif CacheSlot1 cache_level1[dm_cache1_line][dm_cache1_line]; - Slot* cache[dm_cache_line][dm_cache_line]; // grid-cache itself - svector cache_task; // non-unpacked slots - Slot cache_pool[dm_cache_size]; // just memory for slots + Slot* cache[dm_cache_line][dm_cache_line]; // grid-cache itself + svector cache_task; // non-unpacked slots + Slot cache_pool[dm_cache_size]; // just memory for slots int cache_cx; int cache_cz; - PSS poolSI; // pool из которого выделяются SlotItem + PSS poolSI; // pool из которого выделяются SlotItem void UpdateVisibleM(); void UpdateVisibleS(); @@ -178,9 +178,9 @@ class ECORE_API CDetailManager void hw_Render(); #if defined(USE_DX10) || defined(USE_DX11) void hw_Render_dump(const Fvector4& consts, const Fvector4& wave, const Fvector4& wind, u32 var_id, u32 lod_id); -#else // USE_DX10 +#else // USE_DX10 void hw_Render_dump(ref_constant array, u32 var_id, u32 lod_id, u32 c_base); -#endif // USE_DX10 +#endif // USE_DX10 public: // get unpacked slot @@ -219,4 +219,4 @@ class ECORE_API CDetailManager virtual ~CDetailManager(); }; -#endif // DetailManagerH +#endif // DetailManagerH diff --git a/src/Layers/xrRender/DetailManager_Decompress.cpp b/src/Layers/xrRender/DetailManager_Decompress.cpp index 46f035c1c9d..da4ea4612da 100644 --- a/src/Layers/xrRender/DetailManager_Decompress.cpp +++ b/src/Layers/xrRender/DetailManager_Decompress.cpp @@ -47,14 +47,14 @@ IC bool InterpolateAndDither(float* alpha255, u32 x, u32 y, u32 sx, u32 sy, u32 static void draw_obb(const Fmatrix& matrix, const u32& color) { Fvector aabb[8]; - matrix.transform_tiny(aabb[0], Fvector().set(-1, -1, -1)); // 0 - matrix.transform_tiny(aabb[1], Fvector().set(-1, +1, -1)); // 1 - matrix.transform_tiny(aabb[2], Fvector().set(+1, +1, -1)); // 2 - matrix.transform_tiny(aabb[3], Fvector().set(+1, -1, -1)); // 3 - matrix.transform_tiny(aabb[4], Fvector().set(-1, -1, +1)); // 4 - matrix.transform_tiny(aabb[5], Fvector().set(-1, +1, +1)); // 5 - matrix.transform_tiny(aabb[6], Fvector().set(+1, +1, +1)); // 6 - matrix.transform_tiny(aabb[7], Fvector().set(+1, -1, +1)); // 7 + matrix.transform_tiny(aabb[0], Fvector().set(-1, -1, -1)); // 0 + matrix.transform_tiny(aabb[1], Fvector().set(-1, +1, -1)); // 1 + matrix.transform_tiny(aabb[2], Fvector().set(+1, +1, -1)); // 2 + matrix.transform_tiny(aabb[3], Fvector().set(+1, -1, -1)); // 3 + matrix.transform_tiny(aabb[4], Fvector().set(-1, -1, +1)); // 4 + matrix.transform_tiny(aabb[5], Fvector().set(-1, +1, +1)); // 5 + matrix.transform_tiny(aabb[6], Fvector().set(+1, +1, +1)); // 6 + matrix.transform_tiny(aabb[7], Fvector().set(+1, -1, +1)); // 7 u16 aabb_id[12 * 2] = {0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 1, 5, 2, 6, 3, 7, 0, 4}; @@ -114,7 +114,7 @@ void CDetailManager::cache_Decompress(Slot* S) u32 d_size = iCeil(dm_slot_size / density); svector selected; - u32 p_rnd = D.sx * D.sz; // нужно для того чтобы убрать полосы(ряды) + u32 p_rnd = D.sx * D.sz; // нужно для того чтобы убрать полосы(ряды) CRandom r_selection(0x12071980 ^ p_rnd); CRandom r_jitter(0x12071980 ^ p_rnd); CRandom r_yaw(0x12071980 ^ p_rnd); @@ -254,7 +254,7 @@ void CDetailManager::cache_Decompress(Slot* S) #ifndef _EDITOR #ifdef DEBUG if (det_render_debug) - draw_obb(mXform, color_rgba(255, 0, 0, 255)); // Fmatrix().mul_43( mXform, Fmatrix().scale(5,5,5) ) + draw_obb(mXform, color_rgba(255, 0, 0, 255)); // Fmatrix().mul_43( mXform, Fmatrix().scale(5,5,5) ) #endif #endif @@ -295,9 +295,9 @@ gray255[3] = 255.f*float(c_pal->a3)/15.f; else { if (::Random.randI(0, 3) == 0) - Item.vis_ID = 2; // Second wave + Item.vis_ID = 2; // Second wave else - Item.vis_ID = 1; // First wave + Item.vis_ID = 1; // First wave } } #else diff --git a/src/Layers/xrRender/DetailManager_VS.cpp b/src/Layers/xrRender/DetailManager_VS.cpp index 3e6e1c78263..d32f9a51a5f 100644 --- a/src/Layers/xrRender/DetailManager_VS.cpp +++ b/src/Layers/xrRender/DetailManager_VS.cpp @@ -14,9 +14,8 @@ const int quant = 16384; const int c_hdr = 10; const int c_size = 4; -static D3DVERTEXELEMENT9 dwDecl[] = { - {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos - {0, 12, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, // uv +static D3DVERTEXELEMENT9 dwDecl[] = {{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos + {0, 12, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, // uv D3DDECL_END()}; #pragma pack(push, 1) @@ -69,7 +68,7 @@ void CDetailManager::hw_Load_Geom() R_CHK(HW.pDevice->CreateIndexBuffer(dwIndices * 2, dwUsage, D3DFMT_INDEX16, D3DPOOL_MANAGED, &hw_IB, 0)); HW.stats_manager.increment_stats_ib(hw_IB); -#endif // USE_DX10 +#endif // USE_DX10 Msg("* [DETAILS] Batch(%d), VB(%dK), IB(%dK)", hw_BatchSize, (dwVerts * vSize) / 1024, (dwIndices * 2) / 1024); // Fill VB @@ -79,9 +78,9 @@ void CDetailManager::hw_Load_Geom() vertHW* pVOriginal; pVOriginal = xr_alloc(dwVerts); pV = pVOriginal; -#else // USE_DX10 +#else // USE_DX10 R_CHK(hw_VB->Lock(0, 0, (void**)&pV, 0)); -#endif // USE_DX10 +#endif // USE_DX10 for (u32 o = 0; o < objects.size(); o++) { const CDetail& D = *objects[o]; @@ -106,9 +105,9 @@ void CDetailManager::hw_Load_Geom() R_CHK(dx10BufferUtils::CreateVertexBuffer(&hw_VB, pVOriginal, dwVerts * vSize)); HW.stats_manager.increment_stats_vb(hw_VB); xr_free(pVOriginal); -#else // USE_DX10 +#else // USE_DX10 R_CHK(hw_VB->Unlock()); -#endif // USE_DX10 +#endif // USE_DX10 } // Fill IB @@ -118,9 +117,9 @@ void CDetailManager::hw_Load_Geom() u16* pIOriginal; pIOriginal = xr_alloc(dwIndices); pI = pIOriginal; -#else // USE_DX10 +#else // USE_DX10 R_CHK(hw_IB->Lock(0, 0, (void**)(&pI), 0)); -#endif // USE_DX10 +#endif // USE_DX10 for (u32 o = 0; o < objects.size(); o++) { const CDetail& D = *objects[o]; @@ -136,9 +135,9 @@ void CDetailManager::hw_Load_Geom() R_CHK(dx10BufferUtils::CreateIndexBuffer(&hw_IB, pIOriginal, dwIndices * 2)); HW.stats_manager.increment_stats_ib(hw_IB); xr_free(pIOriginal); -#else // USE_DX10 +#else // USE_DX10 R_CHK(hw_IB->Unlock()); -#endif // USE_DX10 +#endif // USE_DX10 } // Declare geometry @@ -202,16 +201,16 @@ void CDetailManager::hw_Render() Fvector4 wave; // wave.set (1.f/5.f, 1.f/7.f, 1.f/3.f, RDEVICE.fTimeGlobal*swing_current.speed); wave.set(1.f / 5.f, 1.f / 7.f, 1.f / 3.f, m_time_pos); - RCache.set_c(&*hwc_consts, scale, scale, ps_r__Detail_l_aniso, ps_r__Detail_l_ambient); // consts - RCache.set_c(&*hwc_wave, wave.div(PI_MUL_2)); // wave - RCache.set_c(&*hwc_wind, dir1); // wind-dir + RCache.set_c(&*hwc_consts, scale, scale, ps_r__Detail_l_aniso, ps_r__Detail_l_ambient); // consts + RCache.set_c(&*hwc_wave, wave.div(PI_MUL_2)); // wave + RCache.set_c(&*hwc_wind, dir1); // wind-dir hw_Render_dump(&*hwc_array, 1, 0, c_hdr); // Wave1 // wave.set (1.f/3.f, 1.f/7.f, 1.f/5.f, RDEVICE.fTimeGlobal*swing_current.speed); wave.set(1.f / 3.f, 1.f / 7.f, 1.f / 5.f, m_time_pos); - RCache.set_c(&*hwc_wave, wave.div(PI_MUL_2)); // wave - RCache.set_c(&*hwc_wind, dir2); // wind-dir + RCache.set_c(&*hwc_wave, wave.div(PI_MUL_2)); // wave + RCache.set_c(&*hwc_wind, dir2); // wind-dir hw_Render_dump(&*hwc_array, 2, 0, c_hdr); // Still @@ -327,4 +326,4 @@ void CDetailManager::hw_Render_dump(ref_constant x_array, u32 var_id, u32 lod_id } } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/ETextureParams.cpp b/src/Layers/xrRender/ETextureParams.cpp index 68cd7454b99..39822666ae2 100644 --- a/src/Layers/xrRender/ETextureParams.cpp +++ b/src/Layers/xrRender/ETextureParams.cpp @@ -64,7 +64,7 @@ void STextureParams::Load(IReader& F) bump_virtual_height = F.r_float(); bump_mode = (ETBumpMode)F.r_u32(); if (bump_mode < STextureParams::tbmNone) { - bump_mode = STextureParams::tbmNone; //.. временно (до полного убирания Autogen) + bump_mode = STextureParams::tbmNone; //.. временно (до полного убирания Autogen) } F.r_stringZ(bump_name); } diff --git a/src/Layers/xrRender/ETextureParams.h b/src/Layers/xrRender/ETextureParams.h index 00653256d67..4c8e5e684a3 100644 --- a/src/Layers/xrRender/ETextureParams.h +++ b/src/Layers/xrRender/ETextureParams.h @@ -143,7 +143,7 @@ struct ECORE_API STextureParams // исходная текстура содержит альфа канал return flags.is(flHasAlpha); } - IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал + IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал { switch (fmt) { diff --git a/src/Layers/xrRender/FBasicVisual.cpp b/src/Layers/xrRender/FBasicVisual.cpp index ea7759536a3..3219b724564 100644 --- a/src/Layers/xrRender/FBasicVisual.cpp +++ b/src/Layers/xrRender/FBasicVisual.cpp @@ -7,7 +7,7 @@ #ifndef _EDITOR #include "xrEngine/Render.h" -#endif // #ifndef _EDITOR +#endif // #ifndef _EDITOR #include "FBasicVisual.h" #include "xrCore/FMesh.hpp" diff --git a/src/Layers/xrRender/FBasicVisual.h b/src/Layers/xrRender/FBasicVisual.h index fb21eb63b0b..466954a140d 100644 --- a/src/Layers/xrRender/FBasicVisual.h +++ b/src/Layers/xrRender/FBasicVisual.h @@ -54,13 +54,13 @@ class ECORE_API dxRender_Visual : public IRenderVisual #endif public: // Common data for rendering - u32 Type; // visual's type - vis_data vis; // visibility-data - ref_shader shader; // pipe state, shared + u32 Type; // visual's type + vis_data vis; // visibility-data + ref_shader shader; // pipe state, shared - virtual void Render(float LOD){}; // LOD - Level Of Detail [0..1], Ignored + virtual void Render(float LOD){}; // LOD - Level Of Detail [0..1], Ignored virtual void Load(const char* N, IReader* data, u32 dwFlags); - virtual void Release(); // Shared memory release + virtual void Release(); // Shared memory release virtual void Copy(dxRender_Visual* from); virtual void Spawn(){}; virtual void Depart(){}; @@ -75,4 +75,4 @@ class ECORE_API dxRender_Visual : public IRenderVisual virtual ~dxRender_Visual(); }; -#endif // !FBasicVisualH +#endif // !FBasicVisualH diff --git a/src/Layers/xrRender/FHierrarhyVisual.h b/src/Layers/xrRender/FHierrarhyVisual.h index 2000e30eb13..3860ea52139 100644 --- a/src/Layers/xrRender/FHierrarhyVisual.h +++ b/src/Layers/xrRender/FHierrarhyVisual.h @@ -24,4 +24,4 @@ class FHierrarhyVisual : public dxRender_Visual virtual void Release(); }; -#endif // FHierrarhyVisualH +#endif // FHierrarhyVisualH diff --git a/src/Layers/xrRender/FLOD.cpp b/src/Layers/xrRender/FLOD.cpp index e21ec1c3832..8c6b8e950d6 100644 --- a/src/Layers/xrRender/FLOD.cpp +++ b/src/Layers/xrRender/FLOD.cpp @@ -15,15 +15,15 @@ struct _hw u32 rgbh1; }; static D3DVERTEXELEMENT9 dwDecl[] = { - {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos-0 - {0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 1}, // pos-1 - {0, 24, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0}, // nrm-0 - {0, 36, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 1}, // nrm-1 - {0, 48, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, // factors - {0, 52, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, // uv - {0, 60, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, // uv - {0, 68, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 2}, // rgbh-0 - {0, 72, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 3}, // rgbh-1 + {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos-0 + {0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 1}, // pos-1 + {0, 24, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0}, // nrm-0 + {0, 36, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 1}, // nrm-1 + {0, 48, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, // factors + {0, 52, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, // uv + {0, 60, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, // uv + {0, 68, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 2}, // rgbh-0 + {0, 72, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 3}, // rgbh-1 D3DDECL_END()}; void FLOD::Load(LPCSTR N, IReader* data, u32 dwFlags) diff --git a/src/Layers/xrRender/FLOD.h b/src/Layers/xrRender/FLOD.h index c5d178bd461..755981616e4 100644 --- a/src/Layers/xrRender/FLOD.h +++ b/src/Layers/xrRender/FLOD.h @@ -10,7 +10,7 @@ class FLOD : public FHierrarhyVisual { Fvector v; Fvector2 t; - u32 c_rgb_hemi; // rgb,hemi + u32 c_rgb_hemi; // rgb,hemi u8 c_sun; }; struct _face @@ -36,7 +36,7 @@ class FLOD : public FHierrarhyVisual float lod_factor; public: - virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored + virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored virtual void Load(LPCSTR N, IReader* data, u32 dwFlags); virtual void Copy(dxRender_Visual* pFrom); }; diff --git a/src/Layers/xrRender/FProgressive.cpp b/src/Layers/xrRender/FProgressive.cpp index 6da0d790d91..d53ff78703e 100644 --- a/src/Layers/xrRender/FProgressive.cpp +++ b/src/Layers/xrRender/FProgressive.cpp @@ -38,7 +38,7 @@ void FProgressive::Load(const char* N, IReader* data, u32 dwFlags) // normal SWI destructor lods(data->open_chunk(OGF_SWIDATA)); - nSWI.reserved[0] = lods().r_u32(); // reserved 16 bytes + nSWI.reserved[0] = lods().r_u32(); // reserved 16 bytes nSWI.reserved[1] = lods().r_u32(); nSWI.reserved[2] = lods().r_u32(); nSWI.reserved[3] = lods().r_u32(); @@ -54,7 +54,7 @@ void FProgressive::Load(const char* N, IReader* data, u32 dwFlags) destructor def(geomdef().open_chunk(OGF_SWIDATA)); xSWI = new FSlideWindowItem(); - xSWI->reserved[0] = def().r_u32(); // reserved 16 bytes + xSWI->reserved[0] = def().r_u32(); // reserved 16 bytes xSWI->reserved[1] = def().r_u32(); xSWI->reserved[2] = def().r_u32(); xSWI->reserved[3] = def().r_u32(); diff --git a/src/Layers/xrRender/FProgressive.h b/src/Layers/xrRender/FProgressive.h index 4e580596f6b..708ba3e8602 100644 --- a/src/Layers/xrRender/FProgressive.h +++ b/src/Layers/xrRender/FProgressive.h @@ -19,7 +19,7 @@ class FProgressive : public Fvisual public: FProgressive(); virtual ~FProgressive(); - virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], -1 = Ignored + virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], -1 = Ignored virtual void Load(const char* N, IReader* data, u32 dwFlags); virtual void Copy(dxRender_Visual* pFrom); virtual void Release(); diff --git a/src/Layers/xrRender/FSkinned.cpp b/src/Layers/xrRender/FSkinned.cpp index d887311d329..1531048a82e 100644 --- a/src/Layers/xrRender/FSkinned.cpp +++ b/src/Layers/xrRender/FSkinned.cpp @@ -50,17 +50,17 @@ float errN(Fvector3 v, u8* qv) } #endif -static D3DVERTEXELEMENT9 dwDecl_01W[] = // 24bytes +static D3DVERTEXELEMENT9 dwDecl_01W[] = // 24bytes {{0, 0, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, - 0}, // : P : 2 : -12..+12 + 0}, // : P : 2 : -12..+12 {0, 8, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, - 0}, // : N, w=index(RC, 0..1) : 1 : -1..+1 + 0}, // : N, w=index(RC, 0..1) : 1 : -1..+1 {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, - 0}, // : T : 1 : -1..+1 + 0}, // : T : 1 : -1..+1 {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, - 0}, // : B : 1 : -1..+1 + 0}, // : B : 1 : -1..+1 {0, 20, D3DDECLTYPE_SHORT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, - 0}, // : tc : 1 : -16..+16 + 0}, // : tc : 1 : -16..+16 D3DDECL_END()}; struct vertHW_1W { @@ -99,17 +99,17 @@ struct vertHW_1W } }; -static D3DVERTEXELEMENT9 dwDecl_2W[] = // 28bytes +static D3DVERTEXELEMENT9 dwDecl_2W[] = // 28bytes {{0, 0, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, - 0}, // : p : 2 : -12..+12 + 0}, // : p : 2 : -12..+12 {0, 8, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, - 0}, // : n.xyz, w = weight : 1 : -1..+1, w=0..1 + 0}, // : n.xyz, w = weight : 1 : -1..+1, w=0..1 {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, - 0}, // : T : 1 : -1..+1 + 0}, // : T : 1 : -1..+1 {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, - 0}, // : B : 1 : -1..+1 + 0}, // : B : 1 : -1..+1 {0, 20, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, - 0}, // : xy(tc), zw(indices): 2 : -16..+16, zw[0..32767] + 0}, // : xy(tc), zw(indices): 2 : -16..+16, zw[0..32767] D3DDECL_END()}; struct vertHW_2W { @@ -155,17 +155,17 @@ struct vertHW_2W p.lerp(P0, P1, get_weight()); } }; -static D3DVERTEXELEMENT9 dwDecl_3W[] = // 28bytes +static D3DVERTEXELEMENT9 dwDecl_3W[] = // 28bytes {{0, 0, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, - 0}, // : p : 2 : -12..+12 + 0}, // : p : 2 : -12..+12 {0, 8, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, - 0}, // : n.xyz, w = weight0 : 1 : -1..+1, w=0..1 + 0}, // : n.xyz, w = weight0 : 1 : -1..+1, w=0..1 {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, - 0}, // : T.xyz, w = weight1 : 1 : -1..+1, w=0..1 + 0}, // : T.xyz, w = weight1 : 1 : -1..+1, w=0..1 {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, - 0}, // : B.xyz, w = index2 : 1 : -1..+1, w=0..255 + 0}, // : B.xyz, w = index2 : 1 : -1..+1, w=0..255 {0, 20, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, - 0}, // : xy(tc), zw(indices): 2 : -16..+16, zw[0..32767] + 0}, // : xy(tc), zw(indices): 2 : -16..+16, zw[0..32767] D3DDECL_END()}; struct vertHW_3W { @@ -234,19 +234,19 @@ struct vertHW_3W } }; -static D3DVERTEXELEMENT9 dwDecl_4W[] = // 28bytes +static D3DVERTEXELEMENT9 dwDecl_4W[] = // 28bytes {{0, 0, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, - 0}, // : p : 2 : -12..+12 + 0}, // : p : 2 : -12..+12 {0, 8, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, - 0}, // : n.xyz, w = weight0 : 1 : -1..+1, w=0..1 + 0}, // : n.xyz, w = weight0 : 1 : -1..+1, w=0..1 {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, - 0}, // : T.xyz, w = weight1 : 1 : -1..+1, w=0..1 + 0}, // : T.xyz, w = weight1 : 1 : -1..+1, w=0..1 {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, - 0}, // : B.xyz, w = weight2 : 1 : -1..+1, w=0..1 + 0}, // : B.xyz, w = weight2 : 1 : -1..+1, w=0..1 {0, 20, D3DDECLTYPE_SHORT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, - 0}, // : xy(tc) : 2 : -16..+16 + 0}, // : xy(tc) : 2 : -16..+16 {0, 24, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, - 1}, // : indices : 1 : 0..255 + 1}, // : indices : 1 : 0..255 D3DDECL_END()}; struct vertHW_4W { @@ -372,7 +372,7 @@ void CSkeletonX_PM::Load(const char* N, IReader* data, u32 dwFlags) GlobalEnv.Render->shader_option_skinning(-1); #if defined(USE_DX10) || defined(USE_DX11) _DuplicateIndices(N, data); -#endif // USE_DX10 +#endif // USE_DX10 vBase = 0; _Load_hw(*this, _verts_); } @@ -384,7 +384,7 @@ void CSkeletonX_ST::Load(const char* N, IReader* data, u32 dwFlags) GlobalEnv.Render->shader_option_skinning(-1); #if defined(USE_DX10) || defined(USE_DX11) _DuplicateIndices(N, data); -#endif // USE_DX10 +#endif // USE_DX10 vBase = 0; _Load_hw(*this, _verts_); } @@ -395,8 +395,9 @@ void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) { // Create HW VB in case this is possible // BOOL bSoft = HW.Caps.geometry.bSoftware; - // u32 dwUsage = /*D3DUSAGE_WRITEONLY |*/ (bSoft?D3DUSAGE_SOFTWAREPROCESSING:0); // VB may be read by - //wallmarks code + // u32 dwUsage = /*D3DUSAGE_WRITEONLY |*/ (bSoft?D3DUSAGE_SOFTWAREPROCESSING:0); // VB may be read + //by + // wallmarks code switch (RenderMode) { case RM_SKINNING_SOFT: @@ -406,7 +407,7 @@ void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) case RM_SINGLE: case RM_SKINNING_1B: { - { // Back up vertex data since we can't read vertex buffer in DX10 + { // Back up vertex data since we can't read vertex buffer in DX10 u32 size = V.vCount * sizeof(vertBoned1W); u32 crc = crc32(_verts_, size); Vertices1W.create(crc, V.vCount, (vertBoned1W*)_verts_); @@ -452,7 +453,7 @@ void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) break; case RM_SKINNING_2B: { - { // Back up vertex data since we can't read vertex buffer in DX10 + { // Back up vertex data since we can't read vertex buffer in DX10 u32 size = V.vCount * sizeof(vertBoned2W); u32 crc = crc32(_verts_, size); Vertices2W.create(crc, V.vCount, (vertBoned2W*)_verts_); @@ -498,7 +499,7 @@ void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) break; case RM_SKINNING_3B: { - { // Back up vertex data since we can't read vertex buffer in DX10 + { // Back up vertex data since we can't read vertex buffer in DX10 u32 size = V.vCount * sizeof(vertBoned3W); u32 crc = crc32(_verts_, size); Vertices3W.create(crc, V.vCount, (vertBoned3W*)_verts_); @@ -547,7 +548,7 @@ void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) break; case RM_SKINNING_4B: { - { // Back up vertex data since we can't read vertex buffer in DX10 + { // Back up vertex data since we can't read vertex buffer in DX10 u32 size = V.vCount * sizeof(vertBoned4W); u32 crc = crc32(_verts_, size); Vertices4W.create(crc, V.vCount, (vertBoned4W*)_verts_); @@ -597,14 +598,14 @@ void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) } } -#else // USE_DX10 +#else // USE_DX10 void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) { // Create HW VB in case this is possible BOOL bSoft = HW.Caps.geometry.bSoftware; u32 dwUsage = - /*D3DUSAGE_WRITEONLY |*/ (bSoft ? D3DUSAGE_SOFTWAREPROCESSING : 0); // VB may be read by wallmarks code + /*D3DUSAGE_WRITEONLY |*/ (bSoft ? D3DUSAGE_SOFTWAREPROCESSING : 0); // VB may be read by wallmarks code switch (RenderMode) { case RM_SKINNING_SOFT: @@ -711,7 +712,7 @@ void CSkeletonX_ext::_Load_hw(Fvisual& V, void* _verts_) break; } } -#endif // USE_DX10 +#endif // USE_DX10 //----------------------------------------------------------------------------------------------------- // Wallmarks @@ -749,17 +750,17 @@ void CSkeletonX_ext::_CollectBoneFaces(Fvisual* V, u32 iBase, u32 iCount) #if defined(USE_DX10) || defined(USE_DX11) indices = *m_Indices; -#else // USE_DX10 +#else // USE_DX10 R_CHK(V->p_rm_Indices->Lock(0, V->dwPrimitives * 3, (void**)&indices, D3DLOCK_READONLY)); -#endif // USE_DX10 +#endif // USE_DX10 indices += iBase; -#if !defined(USE_DX10) && !defined(USE_DX11) // Don't use hardware buffers in DX10 since we can't read them +#if !defined(USE_DX10) && !defined(USE_DX11) // Don't use hardware buffers in DX10 since we can't read them switch (RenderMode) { case RM_SKINNING_SOFT: -#endif // USE_DX10 +#endif // USE_DX10 { if (*Vertices1W) { vertBoned1W* vertices = *Vertices1W; @@ -828,7 +829,7 @@ void CSkeletonX_ext::_CollectBoneFaces(Fvisual* V, u32 iBase, u32 iCount) R_ASSERT2(0, "not implemented yet"); } -#if !defined(USE_DX10) && !defined(USE_DX11) // Don't use hardware buffers in DX10 since we can't read them +#if !defined(USE_DX10) && !defined(USE_DX11) // Don't use hardware buffers in DX10 since we can't read them break; case RM_SINGLE: case RM_SKINNING_1B: @@ -900,7 +901,7 @@ void CSkeletonX_ext::_CollectBoneFaces(Fvisual* V, u32 iBase, u32 iCount) break; } R_CHK(V->p_rm_Indices->Unlock()); -#endif // USE_DX10 // Don't use hardware buffers in DX10 since we can't read them +#endif // USE_DX10 // Don't use hardware buffers in DX10 since we can't read them } void CSkeletonX_ST::AfterLoad(CKinematics* parent, u16 child_idx) @@ -912,7 +913,7 @@ void CSkeletonX_ST::AfterLoad(CKinematics* parent, u16 child_idx) void CSkeletonX_PM::AfterLoad(CKinematics* parent, u16 child_idx) { inherited2::AfterLoad(parent, child_idx); - FSlideWindow& SW = nSWI.sw[0]; // max LOD + FSlideWindow& SW = nSWI.sw[0]; // max LOD inherited2::_CollectBoneFaces(this, iBase + SW.offset, SW.num_tris * 3); } @@ -1058,13 +1059,13 @@ BOOL CSkeletonX_ext::_PickBone(IKinematics::pick_result& r, float dist, const Fv u16* indices = 0; #if defined(USE_DX10) || defined(USE_DX11) indices = *m_Indices; -#else // USE_DX10 +#else // USE_DX10 CHK_DX(V->p_rm_Indices->Lock(0, V->dwPrimitives * 3, (void**)&indices, D3DLOCK_READONLY)); // fill vertices switch (RenderMode) { case RM_SKINNING_SOFT: -#endif // USE_DX10 +#endif // USE_DX10 if (*Vertices1W) result = _PickBoneSoft1W(r, dist, start, dir, indices + iBase, *faces); @@ -1140,7 +1141,7 @@ void CSkeletonX_ext::_FillVerticesHW4W(const Fmatrix& view, CSkeletonWallmark& w R_ASSERT2(0, "CSkeletonX_ext::_FillVerticesHW4W not implemented"); } -#else // USE_DX10 +#else // USE_DX10 void CSkeletonX_ext::_FillVerticesHW1W(const Fmatrix& view, CSkeletonWallmark& wm, const Fvector& normal, float size, Fvisual* V, u16* indices, CBoneData::FacesVec& faces) @@ -1237,7 +1238,7 @@ void CSkeletonX_ext::_FillVerticesHW4W(const Fmatrix& view, CSkeletonWallmark& w { R_ASSERT2(0, "CSkeletonX_ext::_FillVerticesHW4W not implemented"); } -#endif // USE_DX10 +#endif // USE_DX10 void CSkeletonX_ext::_FillVertices(const Fmatrix& view, CSkeletonWallmark& wm, const Fvector& normal, float size, Fvisual* V, u16 bone_id, u32 iBase, u32 iCount) @@ -1376,7 +1377,7 @@ void CSkeletonX_ext::_EnumBoneVertices(SEnumVerticesCallback& C, Fvisual* V, u16 switch (RenderMode) { case RM_SKINNING_SOFT: -#endif // USE_DX10 +#endif // USE_DX10 if (*Vertices1W) TEnumBoneVertices(Vertices1W, indices + iBase, *faces, C); else if (*Vertices2W) @@ -1399,5 +1400,5 @@ default: NODEFAULT; } if (RenderMode != RM_SKINNING_SOFT) CHK_DX(V->p_rm_Vertices->Unlock()); CHK_DX(V->p_rm_Indices->Unlock()); -#endif // USE_DX10 +#endif // USE_DX10 } \ No newline at end of file diff --git a/src/Layers/xrRender/FSkinned.h b/src/Layers/xrRender/FSkinned.h index e8938e3607b..0a605995c62 100644 --- a/src/Layers/xrRender/FSkinned.h +++ b/src/Layers/xrRender/FSkinned.h @@ -14,7 +14,7 @@ #include "SkeletonX.h" #endif struct SEnumVerticesCallback; -class CSkeletonX_ext : public CSkeletonX // shared code for SkeletonX derivates +class CSkeletonX_ext : public CSkeletonX // shared code for SkeletonX derivates { protected: virtual void _Load_hw(Fvisual& V, void* data); @@ -96,4 +96,4 @@ class CSkeletonX_PM : public FProgressive, public CSkeletonX_ext void operator=(const CSkeletonX_PM& other); }; -#endif // FSkinnedH +#endif // FSkinnedH diff --git a/src/Layers/xrRender/FTreeVisual.cpp b/src/Layers/xrRender/FTreeVisual.cpp index f719dac2587..00c5d5e4b3f 100644 --- a/src/Layers/xrRender/FTreeVisual.cpp +++ b/src/Layers/xrRender/FTreeVisual.cpp @@ -106,12 +106,12 @@ struct FTreeVisual_setup float tm_rot = PI_MUL_2 * Device.fTimeGlobal / ps_r__Tree_w_rot; wind.set(_sin(tm_rot), 0, _cos(tm_rot), 0); wind.normalize(); - wind.mul(ps_r__Tree_w_amp); // dir1*amplitude + wind.mul(ps_r__Tree_w_amp); // dir1*amplitude scale = 1.f / float(FTreeVisual_quant); // setup constants wave.set( - ps_r__Tree_Wave.x, ps_r__Tree_Wave.y, ps_r__Tree_Wave.z, Device.fTimeGlobal * ps_r__Tree_w_speed); // wave + ps_r__Tree_Wave.x, ps_r__Tree_Wave.y, ps_r__Tree_Wave.z, Device.fTimeGlobal * ps_r__Tree_w_speed); // wave wave.div(PI_MUL_2); } }; @@ -124,24 +124,24 @@ void FTreeVisual::Render(float LOD) #if RENDER != R_R1 Fmatrix xform_v; xform_v.mul_43(RCache.get_xform_view(), xform); - RCache.tree.set_m_xform_v(xform_v); // matrix + RCache.tree.set_m_xform_v(xform_v); // matrix #endif float s = ps_r__Tree_SBC; - RCache.tree.set_m_xform(xform); // matrix - RCache.tree.set_consts(tvs.scale, tvs.scale, 0, 0); // consts/scale - RCache.tree.set_wave(tvs.wave); // wave - RCache.tree.set_wind(tvs.wind); // wind + RCache.tree.set_m_xform(xform); // matrix + RCache.tree.set_consts(tvs.scale, tvs.scale, 0, 0); // consts/scale + RCache.tree.set_wave(tvs.wave); // wave + RCache.tree.set_wind(tvs.wind); // wind #if RENDER != R_R1 s *= 1.3333f; - RCache.tree.set_c_scale(s * c_scale.rgb.x, s * c_scale.rgb.y, s * c_scale.rgb.z, s * c_scale.hemi); // scale - RCache.tree.set_c_bias(s * c_bias.rgb.x, s * c_bias.rgb.y, s * c_bias.rgb.z, s * c_bias.hemi); // bias + RCache.tree.set_c_scale(s * c_scale.rgb.x, s * c_scale.rgb.y, s * c_scale.rgb.z, s * c_scale.hemi); // scale + RCache.tree.set_c_bias(s * c_bias.rgb.x, s * c_bias.rgb.y, s * c_bias.rgb.z, s * c_bias.hemi); // bias #else CEnvDescriptor& desc = *g_pGamePersistent->Environment().CurrentEnv; - RCache.tree.set_c_scale(s * c_scale.rgb.x, s * c_scale.rgb.y, s * c_scale.rgb.z, s * c_scale.hemi); // scale + RCache.tree.set_c_scale(s * c_scale.rgb.x, s * c_scale.rgb.y, s * c_scale.rgb.z, s * c_scale.hemi); // scale RCache.tree.set_c_bias(s * c_bias.rgb.x + desc.ambient.x, s * c_bias.rgb.y + desc.ambient.y, - s * c_bias.rgb.z + desc.ambient.z, s * c_bias.hemi); // bias + s * c_bias.rgb.z + desc.ambient.z, s * c_bias.hemi); // bias #endif - RCache.tree.set_c_sun(s * c_scale.sun, s * c_bias.sun, 0, 0); // sun + RCache.tree.set_c_sun(s * c_scale.sun, s * c_bias.sun, 0, 0); // sun } #define PCOPY(a) a = pFrom->a diff --git a/src/Layers/xrRender/FTreeVisual.h b/src/Layers/xrRender/FTreeVisual.h index 1b6a7960d89..e3cda270a37 100644 --- a/src/Layers/xrRender/FTreeVisual.h +++ b/src/Layers/xrRender/FTreeVisual.h @@ -10,9 +10,9 @@ class FTreeVisual : public dxRender_Visual, public IRender_Mesh private: struct _5color { - Fvector rgb; // - all static lighting - float hemi; // - hemisphere - float sun; // - sun + Fvector rgb; // - all static lighting + float hemi; // - hemisphere + float sun; // - sun }; protected: @@ -21,7 +21,7 @@ class FTreeVisual : public dxRender_Visual, public IRender_Mesh Fmatrix xform; public: - virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored + virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored virtual void Load(LPCSTR N, IReader* data, u32 dwFlags); virtual void Copy(dxRender_Visual* pFrom); virtual void Release(); @@ -38,7 +38,7 @@ class FTreeVisual_ST : public FTreeVisual FTreeVisual_ST(void); virtual ~FTreeVisual_ST(void); - virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored + virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored virtual void Load(LPCSTR N, IReader* data, u32 dwFlags); virtual void Copy(dxRender_Visual* pFrom); virtual void Release(); @@ -60,7 +60,7 @@ class FTreeVisual_PM : public FTreeVisual FTreeVisual_PM(void); virtual ~FTreeVisual_PM(void); - virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored + virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored virtual void Load(LPCSTR N, IReader* data, u32 dwFlags); virtual void Copy(dxRender_Visual* pFrom); virtual void Release(); diff --git a/src/Layers/xrRender/FVisual.cpp b/src/Layers/xrRender/FVisual.cpp index d7a57192b16..69ff044dbc1 100644 --- a/src/Layers/xrRender/FVisual.cpp +++ b/src/Layers/xrRender/FVisual.cpp @@ -96,7 +96,7 @@ void Fvisual::Load(const char* N, IReader* data, u32 dwFlags) // geom m_fast->rm_geom.create(fmt, m_fast->p_rm_Vertices, m_fast->p_rm_Indices); } -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) } // read vertices @@ -127,7 +127,7 @@ void Fvisual::Load(const char* N, IReader* data, u32 dwFlags) VERIFY(NULL == p_rm_Vertices); R_CHK(dx10BufferUtils::CreateVertexBuffer(&p_rm_Vertices, data->pointer(), vCount * vStride)); HW.stats_manager.increment_stats_vb(p_rm_Vertices); -#else // USE_DX10 +#else // USE_DX10 BOOL bSoft = HW.Caps.geometry.bSoftware; u32 dwUsage = D3DUSAGE_WRITEONLY | (bSoft ? D3DUSAGE_SOFTWAREPROCESSING : 0); BYTE* bytes = 0; @@ -137,7 +137,7 @@ void Fvisual::Load(const char* N, IReader* data, u32 dwFlags) R_CHK(p_rm_Vertices->Lock(0, 0, (void**)&bytes, 0)); CopyMemory(bytes, data->pointer(), vCount * vStride); p_rm_Vertices->Unlock(); -#endif // USE_DX10 +#endif // USE_DX10 } } @@ -165,7 +165,8 @@ void Fvisual::Load(const char* N, IReader* data, u32 dwFlags) #if defined(USE_DX10) || defined(USE_DX11) // BOOL bSoft = HW.Caps.geometry.bSoftware || (dwFlags&VLOAD_FORCESOFTWARE); - // u32 dwUsage = /*D3DUSAGE_WRITEONLY |*/ (bSoft?D3DUSAGE_SOFTWAREPROCESSING:0); // indices are read in + // u32 dwUsage = /*D3DUSAGE_WRITEONLY |*/ (bSoft?D3DUSAGE_SOFTWAREPROCESSING:0); // indices are read + // in // model-wallmarks code // BYTE* bytes = 0; @@ -178,10 +179,10 @@ void Fvisual::Load(const char* N, IReader* data, u32 dwFlags) VERIFY(NULL == p_rm_Indices); R_CHK(dx10BufferUtils::CreateIndexBuffer(&p_rm_Indices, data->pointer(), iCount * 2)); HW.stats_manager.increment_stats_ib(p_rm_Indices); -#else // USE_DX10 +#else // USE_DX10 BOOL bSoft = HW.Caps.geometry.bSoftware; u32 dwUsage = /*D3DUSAGE_WRITEONLY |*/ ( - bSoft ? D3DUSAGE_SOFTWAREPROCESSING : 0); // indices are read in model-wallmarks code + bSoft ? D3DUSAGE_SOFTWAREPROCESSING : 0); // indices are read in model-wallmarks code BYTE* bytes = 0; VERIFY(NULL == p_rm_Indices); @@ -191,7 +192,7 @@ void Fvisual::Load(const char* N, IReader* data, u32 dwFlags) R_CHK(p_rm_Indices->Lock(0, 0, (void**)&bytes, 0)); CopyMemory(bytes, data->pointer(), iCount * 2); p_rm_Indices->Unlock(); -#endif // USE_DX10 +#endif // USE_DX10 } } @@ -215,11 +216,11 @@ void Fvisual::Render(float) RCache.Render(D3DPT_TRIANGLELIST, vBase, 0, vCount, iBase, dwPrimitives); RCache.stat.r.s_static.add(vCount); } -#else // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#else // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) RCache.set_Geometry(rm_geom); RCache.Render(D3DPT_TRIANGLELIST, vBase, 0, vCount, iBase, dwPrimitives); RCache.stat.r.s_static.add(vCount); -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) } #define PCOPY(a) a = pFrom->a diff --git a/src/Layers/xrRender/FVisual.h b/src/Layers/xrRender/FVisual.h index b9942c5e2f4..838ea6e715c 100644 --- a/src/Layers/xrRender/FVisual.h +++ b/src/Layers/xrRender/FVisual.h @@ -17,7 +17,7 @@ class Fvisual : public dxRender_Visual, public IRender_Mesh IRender_Mesh* m_fast; public: - virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored ? + virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored ? virtual void Load(LPCSTR N, IReader* data, u32 dwFlags); virtual void Copy(dxRender_Visual* pFrom); virtual void Release(); diff --git a/src/Layers/xrRender/HOM.cpp b/src/Layers/xrRender/HOM.cpp index 33cfd313caa..b60437e93d9 100644 --- a/src/Layers/xrRender/HOM.cpp +++ b/src/Layers/xrRender/HOM.cpp @@ -298,8 +298,8 @@ BOOL CHOM::visible(Fbox2& B, float depth) BOOL CHOM::visible(vis_data& vis) { - if (Device.dwFrame < vis.hom_frame) return TRUE; // not at this time :) - if (!bEnabled) return TRUE; // return - everything visible + if (Device.dwFrame < vis.hom_frame) return TRUE; // not at this time :) + if (!bEnabled) return TRUE; // return - everything visible stats.Total.Begin(); // Now, the test time comes // 0. The object was hidden, and we must prove that each frame - test | frame-old, tested-new, hom_res = diff --git a/src/Layers/xrRender/HOM.h b/src/Layers/xrRender/HOM.h index a3639c864e7..fd5d843f5e3 100644 --- a/src/Layers/xrRender/HOM.h +++ b/src/Layers/xrRender/HOM.h @@ -66,7 +66,7 @@ class CHOM BOOL visible(vis_data& vis); BOOL visible(Fbox3& B); BOOL visible(sPoly& P); - BOOL visible(Fbox2& B, float depth); // viewport-space (0..1) + BOOL visible(Fbox2& B, float depth); // viewport-space (0..1) CHOM(); ~CHOM(); diff --git a/src/Layers/xrRender/HW.cpp b/src/Layers/xrRender/HW.cpp index 16853634e78..f9e2b1de416 100644 --- a/src/Layers/xrRender/HW.cpp +++ b/src/Layers/xrRender/HW.cpp @@ -190,14 +190,14 @@ void CHW::selectResolution(u32& dwWidth, u32& dwHeight, BOOL bWindowed) dwWidth = psCurrentVidMode[0]; dwHeight = psCurrentVidMode[1]; } - else // check + else // check { #ifndef _EDITOR string64 buff; xr_sprintf(buff, sizeof(buff), "%dx%d", psCurrentVidMode[0], psCurrentVidMode[1]); - if (_ParseItem(buff, GlobalEnv.vid_mode_token) == u32(-1)) // not found - { // select safe + if (_ParseItem(buff, GlobalEnv.vid_mode_token) == u32(-1)) // not found + { // select safe xr_sprintf(buff, sizeof(buff), "vid_mode %s", GlobalEnv.vid_mode_token[0].name); Console->Execute(buff); } @@ -246,7 +246,7 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window) break; } } -#endif // MASTER_GOLD +#endif // MASTER_GOLD // Display the name of video board D3DADAPTER_IDENTIFIER9 adapterID; @@ -336,7 +336,7 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window) // Depth/stencil P.EnableAutoDepthStencil = TRUE; P.AutoDepthStencilFormat = fDepth; - P.Flags = 0; //. D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL; + P.Flags = 0; //. D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL; // Refresh rate P.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; @@ -348,12 +348,12 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window) // Create the device u32 GPU = selectGPU(); HRESULT R = HW.pD3D->CreateDevice(DevAdapter, DevT, m_hWnd, - GPU | D3DCREATE_MULTITHREADED, //. ? locks at present + GPU | D3DCREATE_MULTITHREADED, //. ? locks at present &P, &pDevice); if (FAILED(R)) { R = HW.pD3D->CreateDevice(DevAdapter, DevT, m_hWnd, - GPU | D3DCREATE_MULTITHREADED, //. ? locks at present + GPU | D3DCREATE_MULTITHREADED, //. ? locks at present &P, &pDevice); } if (D3DERR_DEVICELOST == R) { @@ -410,7 +410,7 @@ u32 CHW::selectGPU() #if RENDER == R_R1 BOOL isIntelGMA = FALSE; - if (Caps.id_vendor == 0x8086) { // Intel + if (Caps.id_vendor == 0x8086) { // Intel #define GMA_SL_SIZE 43 @@ -446,7 +446,7 @@ u32 CHW::selectGPU() Msg("* setting 'r1_software_skinning' to '0' should improve performance"); } -#endif // RENDER == R_R1 +#endif // RENDER == R_R1 if (Caps.bForceGPU_SW) return D3DCREATE_SOFTWARE_VERTEXPROCESSING; @@ -609,14 +609,14 @@ void fill_vid_mode_list(CHW* _hw) #ifdef DEBUG Msg("Available video modes[%d]:", _tmp.size()); -#endif // DEBUG +#endif // DEBUG for (i = 0; i < _tmp.size(); ++i) { GlobalEnv.vid_mode_token[i].id = i; GlobalEnv.vid_mode_token[i].name = _tmp[i]; #ifdef DEBUG Msg("[%s]", _tmp[i]); -#endif // DEBUG +#endif // DEBUG } } #endif diff --git a/src/Layers/xrRender/HW.h b/src/Layers/xrRender/HW.h index 8500f71655a..7a366386174 100644 --- a/src/Layers/xrRender/HW.h +++ b/src/Layers/xrRender/HW.h @@ -16,7 +16,7 @@ class CHW #if defined(USE_DX10) || defined(USE_DX11) : public pureAppActivate, public pureAppDeactivate -#endif // USE_DX10 +#endif // USE_DX10 { // Functions section public: @@ -42,48 +42,48 @@ class CHW #ifdef DEBUG #if defined(USE_DX10) || defined(USE_DX11) void Validate(void){}; -#else // USE_DX10 +#else // USE_DX10 void Validate(void) { VERIFY(pDevice); VERIFY(pD3D); }; -#endif // USE_DX10 +#endif // USE_DX10 #else void Validate(void){}; #endif // Variables section -#if defined(USE_DX11) // USE_DX10 +#if defined(USE_DX11) // USE_DX10 public: - IDXGIAdapter* m_pAdapter; // pD3D equivalent - ID3D11Device* pDevice; // combine with DX9 pDevice via typedef - ID3D11DeviceContext* pContext; // combine with DX9 pDevice via typedef + IDXGIAdapter* m_pAdapter; // pD3D equivalent + ID3D11Device* pDevice; // combine with DX9 pDevice via typedef + ID3D11DeviceContext* pContext; // combine with DX9 pDevice via typedef IDXGISwapChain* m_pSwapChain; - ID3D11RenderTargetView* pBaseRT; // combine with DX9 pBaseRT via typedef + ID3D11RenderTargetView* pBaseRT; // combine with DX9 pBaseRT via typedef ID3D11DepthStencilView* pBaseZB; CHWCaps Caps; - D3D_DRIVER_TYPE m_DriverType; // DevT equivalent - DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent + D3D_DRIVER_TYPE m_DriverType; // DevT equivalent + DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent bool m_bUsePerfhud; D3D_FEATURE_LEVEL FeatureLevel; #elif defined(USE_DX10) public: - IDXGIAdapter* m_pAdapter; // pD3D equivalent - ID3D10Device1* pDevice1; // combine with DX9 pDevice via typedef - ID3D10Device* pDevice; // combine with DX9 pDevice via typedef - ID3D10Device1* pContext1; // combine with DX9 pDevice via typedef - ID3D10Device* pContext; // combine with DX9 pDevice via typedef + IDXGIAdapter* m_pAdapter; // pD3D equivalent + ID3D10Device1* pDevice1; // combine with DX9 pDevice via typedef + ID3D10Device* pDevice; // combine with DX9 pDevice via typedef + ID3D10Device1* pContext1; // combine with DX9 pDevice via typedef + ID3D10Device* pContext; // combine with DX9 pDevice via typedef IDXGISwapChain* m_pSwapChain; - ID3D10RenderTargetView* pBaseRT; // combine with DX9 pBaseRT via typedef + ID3D10RenderTargetView* pBaseRT; // combine with DX9 pBaseRT via typedef ID3D10DepthStencilView* pBaseZB; CHWCaps Caps; - D3D10_DRIVER_TYPE m_DriverType; // DevT equivalent - DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent + D3D10_DRIVER_TYPE m_DriverType; // DevT equivalent + DXGI_SWAP_CHAIN_DESC m_ChainDesc; // DevPP equivalent bool m_bUsePerfhud; D3D_FEATURE_LEVEL FeatureLevel; #else @@ -91,8 +91,8 @@ class CHW HINSTANCE hD3D; public: - IDirect3D9* pD3D; // D3D - IDirect3DDevice9* pDevice; // render device + IDirect3D9* pD3D; // D3D + IDirect3DDevice9* pDevice; // render device IDirect3DSurface9* pBaseRT; IDirect3DSurface9* pBaseZB; @@ -102,7 +102,7 @@ class CHW UINT DevAdapter; D3DDEVTYPE DevT; D3DPRESENT_PARAMETERS DevPP; -#endif // USE_DX10 +#endif // USE_DX10 #ifndef _MAYA_EXPORT stats_manager stats_manager; @@ -113,7 +113,7 @@ class CHW virtual void OnAppActivate(); virtual void OnAppDeactivate(); -#endif // USE_DX10 +#endif // USE_DX10 private: bool m_move_window; @@ -121,4 +121,4 @@ class CHW extern ECORE_API CHW HW; -#endif // !defined(AFX_HW_H__0E25CF4A_FFEC_11D3_B4E3_4854E82A090D__INCLUDED_) +#endif // !defined(AFX_HW_H__0E25CF4A_FFEC_11D3_B4E3_4854E82A090D__INCLUDED_) diff --git a/src/Layers/xrRender/HWCaps.cpp b/src/Layers/xrRender/HWCaps.cpp index ab42caffd85..f9eae4fcf3e 100644 --- a/src/Layers/xrRender/HWCaps.cpp +++ b/src/Layers/xrRender/HWCaps.cpp @@ -5,8 +5,8 @@ #include "hwcaps.h" #ifndef _EDITOR -#include #include +#include #endif namespace @@ -167,13 +167,13 @@ void CHWCaps::Update() Msg("* GPU vertex cache: %s, %d", (1 == vc.OptMethod) ? "recognized" : "unrecognized", u32(geometry.dwVertexCache)); // *******1********** Compatibility : vertex shader - if (0 == raster_major) geometry_major = 0; // Disable VS if no PS + if (0 == raster_major) geometry_major = 0; // Disable VS if no PS #ifdef _EDITOR geometry_major = 0; #endif // - bTableFog = FALSE; // BOOL (caps.RasterCaps&D3DPRASTERCAPS_FOGTABLE); + bTableFog = FALSE; // BOOL (caps.RasterCaps&D3DPRASTERCAPS_FOGTABLE); // Detect if stencil available bStencil = FALSE; @@ -217,7 +217,7 @@ void CHWCaps::Update() iGPUNum = GetGpuNum(); } -#else // USE_DX10 +#else // USE_DX10 void CHWCaps::Update() { // ***************** GEOMETRY @@ -255,10 +255,10 @@ void CHWCaps::Update() Msg("* GPU vertex cache: %s, %d", "unrecognized", u32(geometry.dwVertexCache)); // *******1********** Compatibility : vertex shader - if (0 == raster_major) geometry_major = 0; // Disable VS if no PS + if (0 == raster_major) geometry_major = 0; // Disable VS if no PS // - bTableFog = FALSE; // BOOL (caps.RasterCaps&D3DPRASTERCAPS_FOGTABLE); + bTableFog = FALSE; // BOOL (caps.RasterCaps&D3DPRASTERCAPS_FOGTABLE); // Detect if stencil available bStencil = TRUE; @@ -275,4 +275,4 @@ void CHWCaps::Update() iGPUNum = GetGpuNum(); } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/HWCaps.h b/src/Layers/xrRender/HWCaps.h index c76a619bad4..b3a945913f4 100644 --- a/src/Layers/xrRender/HWCaps.h +++ b/src/Layers/xrRender/HWCaps.h @@ -19,7 +19,7 @@ class CHWCaps u32 dwInstructions : 16; u32 bSoftware : 1; u32 bPointSprites : 1; - u32 bVTF : 1; // vertex-texture-fetch + u32 bVTF : 1; // vertex-texture-fetch u32 bNPatches : 1; u32 dwClipPlanes : 4; u32 dwVertexCache : 8; @@ -28,7 +28,7 @@ class CHWCaps { u32 dwRegisters : 16; u32 dwInstructions : 16; - u32 dwStages : 4; // number of tex-stages + u32 dwStages : 4; // number of tex-stages u32 dwMRT_count : 4; u32 b_MRT_mixdepth : 1; u32 bNonPow2 : 1; @@ -60,13 +60,13 @@ class CHWCaps u32 id_vendor; u32 id_device; - BOOL bStencil; // stencil buffer present - BOOL bScissor; // scissor rect supported - BOOL bTableFog; // + BOOL bStencil; // stencil buffer present + BOOL bScissor; // scissor rect supported + BOOL bTableFog; // // some precalculated values - D3DSTENCILOP soDec, soInc; // best stencil OPs for shadows - u32 dwMaxStencilValue; // maximum value the stencil buffer can hold + D3DSTENCILOP soDec, soInc; // best stencil OPs for shadows + u32 dwMaxStencilValue; // maximum value the stencil buffer can hold void Update(void); }; diff --git a/src/Layers/xrRender/KinematicAnimatedDefs.h b/src/Layers/xrRender/KinematicAnimatedDefs.h index 68db1cec861..1c3cf8b693a 100644 --- a/src/Layers/xrRender/KinematicAnimatedDefs.h +++ b/src/Layers/xrRender/KinematicAnimatedDefs.h @@ -11,7 +11,7 @@ const u32 MAX_CHANNELS = 4; const u32 MAX_BLENDED_POOL = (MAX_BLENDED * MAX_PARTS * MAX_CHANNELS); const u32 MAX_ANIM_SLOT = 48; class CBlend; -typedef svector BlendSVec; //*MAX_CHANNELS +typedef svector BlendSVec; //*MAX_CHANNELS typedef BlendSVec::iterator BlendSVecIt; typedef BlendSVec::const_iterator BlendSVecCIt; //********************************************************************************** diff --git a/src/Layers/xrRender/LightTrack.cpp b/src/Layers/xrRender/LightTrack.cpp index 699a7f7c9d9..03639d589fc 100644 --- a/src/Layers/xrRender/LightTrack.cpp +++ b/src/Layers/xrRender/LightTrack.cpp @@ -8,11 +8,11 @@ #include "xrEngine/xr_object.h" #ifdef _EDITOR -#include "IGame_Persistent.h" #include "Environment.h" +#include "IGame_Persistent.h" #else -#include "xrEngine/IGame_Persistent.h" #include "xrEngine/Environment.h" +#include "xrEngine/IGame_Persistent.h" #endif ////////////////////////////////////////////////////////////////////// @@ -38,7 +38,7 @@ CROS_impl::CROS_impl() last_position.set(0.0f, 0.0f, 0.0f); ticks_to_update = 0; sky_rays_uptodate = 0; -#endif // RENDER!=R_R1 +#endif // RENDER!=R_R1 //#if RENDER==R_R1 MODE = IRender_ObjectSpecific::TRACE_ALL; @@ -146,17 +146,17 @@ inline void CROS_impl::accum_hemi(float* hemi_cube, Fvector3& dir, float scale) if (dir.x > 0) hemi_cube[CUBE_FACE_POS_X] += dir.x * scale; else - hemi_cube[CUBE_FACE_NEG_X] -= dir.x * scale; // dir.x <= 0 + hemi_cube[CUBE_FACE_NEG_X] -= dir.x * scale; // dir.x <= 0 if (dir.y > 0) hemi_cube[CUBE_FACE_POS_Y] += dir.y * scale; else - hemi_cube[CUBE_FACE_NEG_Y] -= dir.y * scale; // dir.y <= 0 + hemi_cube[CUBE_FACE_NEG_Y] -= dir.y * scale; // dir.y <= 0 if (dir.z > 0) hemi_cube[CUBE_FACE_POS_Z] += dir.z * scale; else - hemi_cube[CUBE_FACE_NEG_Z] -= dir.z * scale; // dir.z <= 0 + hemi_cube[CUBE_FACE_NEG_Z] -= dir.z * scale; // dir.z <= 0 } ////////////////////////////////////////////////////////////////////////// @@ -326,7 +326,7 @@ void CROS_impl::smart_update(IRenderable* O) } } -#endif // #if RENDER!=R_R1 +#endif // #if RENDER!=R_R1 extern float ps_r2_lt_smooth; @@ -338,10 +338,10 @@ void CROS_impl::update_smooth(IRenderable* O) dwFrameSmooth = Device.dwFrame; #if RENDER == R_R1 - if (O && (0 == result_count)) update(O); // First time only -#else // RENDER!=R_R1 + if (O && (0 == result_count)) update(O); // First time only +#else // RENDER!=R_R1 smart_update(O); -#endif // RENDER!=R_R1 +#endif // RENDER!=R_R1 float l_f = Device.fTimeDelta * ps_r2_lt_smooth; clamp(l_f, 0.f, 1.f); @@ -381,10 +381,10 @@ void CROS_impl::calc_sky_hemi_value(Fvector& position, IGameObject* _object) #if RENDER != R_R1 sky_rays_uptodate += ps_r2_dhemi_count; sky_rays_uptodate = _min(sky_rays_uptodate, lt_hemisamples); -#endif // RENDER!=R_R1 +#endif // RENDER!=R_R1 for (u32 it = 0; it < (u32)ps_r2_dhemi_count; it++) - { // five samples per one frame + { // five samples per one frame u32 sample = 0; if (result_count < lt_hemisamples) { sample = result_count; @@ -400,7 +400,7 @@ void CROS_impl::calc_sky_hemi_value(Fvector& position, IGameObject* _object) Fvector direction; direction.set(hdir[sample][0], hdir[sample][1], hdir[sample][2]).normalize(); //. result[sample] = - //!g_pGameLevel->ObjectSpace.RayTest(position,direction,50.f,collide::rqtBoth,&cache[sample],_object); + //! g_pGameLevel->ObjectSpace.RayTest(position,direction,50.f,collide::rqtBoth,&cache[sample],_object); result[sample] = !g_pGameLevel->ObjectSpace.RayTest( position, direction, 50.f, collide::rqtStatic, &cache[sample], _object); // Msg ("%d:-- %s",sample,result[sample]?"true":"false"); @@ -447,7 +447,7 @@ void CROS_impl::prepare_lights(Fvector& position, IRenderable* O) { ISpatial* spatial = RImplementation.lstSpatial[o_it]; light* source = (light*)(spatial->dcast_Light()); - VERIFY(source); // sanity check + VERIFY(source); // sanity check float R = radius + source->range; if (position.distance_to(source->position) < R #if RENDER != R_R1 @@ -478,7 +478,7 @@ void CROS_impl::prepare_lights(Fvector& position, IRenderable* O) light* xrL = I->source; Fvector& LP = xrL->position; #if RENDER == R_R1 - P.mad(position, P.random_dir(), traceR); // Random point inside range + P.mad(position, P.random_dir(), traceR); // Random point inside range #else P = position; #endif diff --git a/src/Layers/xrRender/LightTrack.h b/src/Layers/xrRender/LightTrack.h index f1fec94903f..05c5095428f 100644 --- a/src/Layers/xrRender/LightTrack.h +++ b/src/Layers/xrRender/LightTrack.h @@ -26,11 +26,11 @@ class CROS_impl : public IRender_ObjectSpecific struct Item { - u32 frame_touched; // to track creation & removal - light* source; // - collide::ray_cache cache; // - float test; // note range: (-1[no]..1[yes]) - float energy; // + u32 frame_touched; // to track creation & removal + light* source; // + collide::ray_cache cache; // + float test; // note range: (-1[no]..1[yes]) + float energy; // }; struct Light { @@ -46,8 +46,8 @@ class CROS_impl : public IRender_ObjectSpecific u32 dwFrameSmooth; // - xr_vector track; // everything what touches - xr_vector lights; // + xr_vector track; // everything what touches + xr_vector lights; // bool result[lt_hemisamples]; collide::ray_cache cache[lt_hemisamples]; @@ -77,7 +77,7 @@ class CROS_impl : public IRender_ObjectSpecific Fvector last_position; s32 ticks_to_update; s32 sky_rays_uptodate; -#endif // RENDER!=R_R1 +#endif // RENDER!=R_R1 public: virtual void force_mode(u32 mode) { MODE = mode; }; virtual float get_luminocity() @@ -135,7 +135,7 @@ class CROS_impl : public IRender_ObjectSpecific #if RENDER != R_R1 // Updates only if makes a desizion that update is necessary void smart_update(IRenderable* O); -#endif // RENDER!=R_R1 +#endif // RENDER!=R_R1 }; -#endif // !defined(AFX_LIGHTTRACK_H__89914D61_AC0B_4C7C_BA8C_D7D810738CE7__INCLUDED_) +#endif // !defined(AFX_LIGHTTRACK_H__89914D61_AC0B_4C7C_BA8C_D7D810738CE7__INCLUDED_) diff --git a/src/Layers/xrRender/Light_DB.cpp b/src/Layers/xrRender/Light_DB.cpp index 89da1714cdd..1ea19bbf5c3 100644 --- a/src/Layers/xrRender/Light_DB.cpp +++ b/src/Layers/xrRender/Light_DB.cpp @@ -64,8 +64,8 @@ void CLight_DB::Load(IReader* fs) else { Fvector tmp_D, tmp_R; - tmp_D.set(0, 0, -1); // forward - tmp_R.set(1, 0, 0); // right + tmp_D.set(0, 0, -1); // forward + tmp_R.set(1, 0, 0); // right // point v_static.push_back(L); @@ -108,7 +108,7 @@ void CLight_DB::LoadHemi() IReader* F = FS.r_open(fn_game); { - IReader* chunk = F->open_chunk(1); // Hemispheric light chunk + IReader* chunk = F->open_chunk(1); // Hemispheric light chunk if (chunk) { u32 size = chunk->length(); @@ -130,8 +130,8 @@ void CLight_DB::LoadHemi() L->set_type(IRender_Light::POINT); Fvector tmp_D, tmp_R; - tmp_D.set(0, 0, -1); // forward - tmp_R.set(1, 0, 0); // right + tmp_D.set(0, 0, -1); // forward + tmp_R.set(1, 0, 0); // right // point v_hemi.push_back(L); @@ -178,7 +178,7 @@ void CLight_DB::add_light(light* L) { if (Device.dwFrame == L->frame_render) return; L->frame_render = Device.dwFrame; - if (L->flags.bStatic) return; // skip static lighting, 'cause they are in lmaps + if (L->flags.bStatic) return; // skip static lighting, 'cause they are in lmaps if (ps_r1_flags.test(R1FLAG_DLIGHTS)) RImplementation.L_Dynamic->add(L); } #endif @@ -192,7 +192,7 @@ void CLight_DB::add_light(light* L) if (L->flags.bStatic && !ps_r2_ls_flags.test(R2FLAG_R1LIGHTS)) return; L->Export(package); } -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) void CLight_DB::Update() { diff --git a/src/Layers/xrRender/Light_Package.cpp b/src/Layers/xrRender/Light_Package.cpp index 670923cd142..bf1db8c68bd 100644 --- a/src/Layers/xrRender/Light_Package.cpp +++ b/src/Layers/xrRender/Light_Package.cpp @@ -13,16 +13,16 @@ IC bool pred_light_cmp(light* _1, light* _2) { if (_1->vis.pending) { if (_2->vis.pending) - return _1->vis.query_order > _2->vis.query_order; // q-order + return _1->vis.query_order > _2->vis.query_order; // q-order else - return false; // _2 should be first + return false; // _2 should be first } else { if (_2->vis.pending) - return true; // _1 should be first + return true; // _1 should be first else - return _1->range > _2->range; // sort by range + return _1->range > _2->range; // sort by range } } @@ -33,4 +33,4 @@ void light_Package::sort() std::stable_sort(v_spot.begin(), v_spot.end(), pred_light_cmp); std::stable_sort(v_shadowed.begin(), v_shadowed.end(), pred_light_cmp); } -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) \ No newline at end of file +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) \ No newline at end of file diff --git a/src/Layers/xrRender/ModelPool.cpp b/src/Layers/xrRender/ModelPool.cpp index e6605e3ad2c..b9ef2330ac1 100644 --- a/src/Layers/xrRender/ModelPool.cpp +++ b/src/Layers/xrRender/ModelPool.cpp @@ -4,27 +4,27 @@ #include "ModelPool.h" #ifndef _EDITOR -#include "xrEngine/IGame_Persistent.h" #include "FHierrarhyVisual.h" -#include "SkeletonAnimated.h" -#include "xrCore/FMesh.hpp" -#include "FVisual.h" +#include "FLOD.h" #include "FProgressive.h" #include "FSkinned.h" -#include "FLOD.h" #include "FTreeVisual.h" +#include "FVisual.h" #include "ParticleEffect.h" #include "ParticleGroup.h" +#include "SkeletonAnimated.h" +#include "xrCore/FMesh.hpp" +#include "xrEngine/IGame_Persistent.h" #else +#include "FHierrarhyVisual.h" #include "FMesh.h" #include "FProgressive.h" +#include "FSkinned.h" #include "FVisual.h" +#include "IGame_Persistent.h" #include "ParticleEffect.h" #include "ParticleGroup.h" -#include "FSkinned.h" -#include "FHierrarhyVisual.h" #include "SkeletonAnimated.h" -#include "IGame_Persistent.h" #endif dxRender_Visual* CModelPool::Instance_Create(u32 type) @@ -34,11 +34,11 @@ dxRender_Visual* CModelPool::Instance_Create(u32 type) // Check types switch (type) { - case MT_NORMAL: // our base visual + case MT_NORMAL: // our base visual V = new Fvisual(); break; case MT_HIERRARHY: V = new FHierrarhyVisual(); break; - case MT_PROGRESSIVE: // dynamic-resolution visual + case MT_PROGRESSIVE: // dynamic-resolution visual V = new FProgressive(); break; case MT_SKELETON_ANIM: V = new CKinematicsAnimated(); break; @@ -106,7 +106,7 @@ dxRender_Visual* CModelPool::Instance_Load(const char* N, BOOL allow_register) // Actual loading #ifdef DEBUG if (bLogging) Msg("- Uncached model loading: %s", fn); -#endif // DEBUG +#endif // DEBUG IReader* data = FS.r_open(fn); ogf_header H; diff --git a/src/Layers/xrRender/ModelPool.h b/src/Layers/xrRender/ModelPool.h index 715ad7e5933..9aa53265ceb 100644 --- a/src/Layers/xrRender/ModelPool.h +++ b/src/Layers/xrRender/ModelPool.h @@ -39,10 +39,10 @@ class ECORE_API CModelPool typedef REGISTRY::iterator REGISTRY_IT; private: - xr_vector Models; // Reference / Base - xr_vector ModelsToDelete; // - REGISTRY Registry; // Just pairing of pointer / Name - POOL Pool; // Unused / Inactive + xr_vector Models; // Reference / Base + xr_vector ModelsToDelete; // + REGISTRY Registry; // Just pairing of pointer / Name + POOL Pool; // Unused / Inactive BOOL bLogging; BOOL bForceDiscard; BOOL bAllowChildrenDuplicate; @@ -81,4 +81,4 @@ class ECORE_API CModelPool void RenderSingle(dxRender_Visual* m_pVisual, const Fmatrix& mTransform, float m_fLOD); #endif }; -#endif // ModelPoolH +#endif // ModelPoolH diff --git a/src/Layers/xrRender/NvTriStrip.cpp b/src/Layers/xrRender/NvTriStrip.cpp index f356a72573a..2f572ceb3bb 100644 --- a/src/Layers/xrRender/NvTriStrip.cpp +++ b/src/Layers/xrRender/NvTriStrip.cpp @@ -142,8 +142,8 @@ void GenerateStrips(const u16* in_indices, const s32 in_numIndices, xr_vector(tempFaces.size() * 3); primGroups[faceGroupLoc].numIndices = tempFaces.size() * 3; @@ -250,7 +250,7 @@ void RemapIndices( for (int j = 0; j < numIndices; j++) { int cachedIndex = indexCache[in_primGroups[i].indices[j]]; - if (cachedIndex == -1) // we haven't seen this index before + if (cachedIndex == -1) // we haven't seen this index before { // point to "last" vertex in VB remappedGroups[i].indices[j] = u16(indexCtr); diff --git a/src/Layers/xrRender/NvTriStripObjects.cpp b/src/Layers/xrRender/NvTriStripObjects.cpp index d79648b46fd..04cd96af324 100644 --- a/src/Layers/xrRender/NvTriStripObjects.cpp +++ b/src/Layers/xrRender/NvTriStripObjects.cpp @@ -368,7 +368,7 @@ IC void NvStripInfo::MarkTriangle(NvFaceInfo* faceInfo) bool NvStripInfo::Unique(NvFaceInfoVec& faceVec, NvFaceInfo* face) { - bool bv0, bv1, bv2; // bools to indicate whether a vertex is in the faceVec or not + bool bv0, bv1, bv2; // bools to indicate whether a vertex is in the faceVec or not bv0 = bv1 = bv2 = false; for (int i = 0; i < faceVec.size(); i++) @@ -604,7 +604,7 @@ bool NvStripifier::FindTraversal( startInfo.m_startEdge = edgeIter; if (edgeIter != NULL) { if (strip->SharesEdge(startInfo.m_startFace, edgeInfos)) - startInfo.m_toV1 = (edgeIter->m_v0 == v); // note! used to be m_v1 + startInfo.m_toV1 = (edgeIter->m_v0 == v); // note! used to be m_v1 else startInfo.m_toV1 = (edgeIter->m_v1 == v); } @@ -621,7 +621,7 @@ bool NvStripifier::FindTraversal( void NvStripifier::RemoveSmallStrips(NvStripInfoVec& allStrips, NvStripInfoVec& allBigStrips, NvFaceInfoVec& faceList) { faceList.clear(); - allBigStrips.clear(); // make sure these are empty + allBigStrips.clear(); // make sure these are empty NvFaceInfoVec tempFaceList; for (int i = 0; i < allStrips.size(); i++) @@ -822,7 +822,7 @@ void NvStripifier::Stripify(const WordVec& in_indices, const int in_cacheSize, c NvStripInfoVec& outStrips, NvFaceInfoVec& outFaceList) { meshJump = 0.0f; - bFirstTimeResetPoint = true; // used in FindGoodResetPoint() + bFirstTimeResetPoint = true; // used in FindGoodResetPoint() // the number of times to run the experiments int numSamples = 10; @@ -830,7 +830,7 @@ void NvStripifier::Stripify(const WordVec& in_indices, const int in_cacheSize, c // the cache size, clamped to one cacheSize = _max(1, in_cacheSize - CACHE_INEFFICIENCY); - minStripLength = in_minStripLength; // this is the strip size threshold below which we dump the strip into a list + minStripLength = in_minStripLength; // this is the strip size threshold below which we dump the strip into a list indices = in_indices; diff --git a/src/Layers/xrRender/NvTriStripObjects.h b/src/Layers/xrRender/NvTriStripObjects.h index fa30fb5d3aa..4f8f0d7c9f0 100644 --- a/src/Layers/xrRender/NvTriStripObjects.h +++ b/src/Layers/xrRender/NvTriStripObjects.h @@ -41,9 +41,9 @@ class NvFaceInfo // data members are left public int m_v0, m_v1, m_v2; - int m_stripId; // real strip Id - int m_testStripId; // strip Id in an experiment - int m_experimentId; // in what experiment was it given an experiment Id? + int m_stripId; // real strip Id + int m_testStripId; // strip Id in an experiment + int m_experimentId; // in what experiment was it given an experiment Id? }; // nice and dumb edge class that points knows its diff --git a/src/Layers/xrRender/PSLibrary.h b/src/Layers/xrRender/PSLibrary.h index d7db889abf5..722d90419be 100644 --- a/src/Layers/xrRender/PSLibrary.h +++ b/src/Layers/xrRender/PSLibrary.h @@ -13,7 +13,7 @@ DEFINE_VECTOR(CPEDef*, PEDVec, PEDIt); class CPGDef; DEFINE_VECTOR(CPGDef*, PGDVec, PGDIt); -} // namespace PS +} // namespace PS class ECORE_API CPSLibrary : public particles_systems::library_interface { diff --git a/src/Layers/xrRender/ParticleEffect.cpp b/src/Layers/xrRender/ParticleEffect.cpp index d41ac60fda7..dec0d58d37e 100644 --- a/src/Layers/xrRender/ParticleEffect.cpp +++ b/src/Layers/xrRender/ParticleEffect.cpp @@ -19,14 +19,14 @@ static void ApplyTexgen(const Fmatrix& mVP) #if defined(USE_DX10) || defined(USE_DX11) Fmatrix mTexelAdjust = { 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.0f, 1.0f}; -#else // USE_DX10 +#else // USE_DX10 float _w = float(RDEVICE.dwWidth); float _h = float(RDEVICE.dwHeight); float o_w = (.5f / _w); float o_h = (.5f / _h); Fmatrix mTexelAdjust = { 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f + o_w, 0.5f + o_h, 0.0f, 1.0f}; -#endif // USE_DX10 +#endif // USE_DX10 mTexgen.mul(mTexelAdjust, mVP); RCache.set_c("mVPTexgen", mTexgen); @@ -286,7 +286,7 @@ IC void FillSprite(FVF::LIT*& pv, const Fvector& T, const Fvector& R, const Fvec { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("FillSprite()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED __m128 Vr, Vt, _T, _R, _pos, _zz, _sa, _ca, a, b, c, d; @@ -347,7 +347,7 @@ IC void FillSprite(FVF::LIT*& pv, const Fvector& pos, const Fvector& dir, const { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("FillSpriteTransform()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED const Fvector& T = dir; Fvector R; @@ -373,15 +373,15 @@ IC void FillSprite(FVF::LIT*& pv, const Fvector& pos, const Fvector& dir, const _t1 = _mm_mul_ps(_t1, _r1); _t2 = _mm_mul_ps(_t2, _r2); - _t1 = _mm_sub_ps(_t1, _t2); // z | y | 0 | x + _t1 = _mm_sub_ps(_t1, _t2); // z | y | 0 | x // normalize_safe - _t2 = _mm_mul_ps(_t1, _t1); // zz | yy | 00 | xx - _r1 = _mm_movehl_ps(_t2, _t2); // zz | yy | zz | yy - _t2 = _mm_add_ss(_t2, _r1); // zz | yy | 00 | xx + yy - _r1 = _mm_shuffle_ps(_r1, _r1, _MM_SHUFFLE(1, 1, 1, 1)); // zz | zz | zz | zz - _t2 = _mm_add_ss(_t2, _r1); // zz | yy | 00 | xx + yy + zz + _t2 = _mm_mul_ps(_t1, _t1); // zz | yy | 00 | xx + _r1 = _mm_movehl_ps(_t2, _t2); // zz | yy | zz | yy + _t2 = _mm_add_ss(_t2, _r1); // zz | yy | 00 | xx + yy + _r1 = _mm_shuffle_ps(_r1, _r1, _MM_SHUFFLE(1, 1, 1, 1)); // zz | zz | zz | zz + _t2 = _mm_add_ss(_t2, _r1); // zz | yy | 00 | xx + yy + zz _r1 = _mm_set_ss(std::numeric_limits::min()); @@ -412,14 +412,14 @@ __forceinline void magnitude_sse(Fvector& vec, float& res) { __m128 tv, tu; - tv = _mm_load_ss((float*)&vec.x); // tv = 0 | 0 | 0 | x - tv = _mm_loadh_pi(tv, (__m64*)&vec.y); // tv = z | y | 0 | x - tv = _mm_mul_ps(tv, tv); // tv = zz | yy | 0 | xx - tu = _mm_movehl_ps(tv, tv); // tu = zz | yy | zz | yy - tv = _mm_add_ss(tv, tu); // tv = zz | yy | 0 | xx + yy - tu = _mm_shuffle_ps(tu, tu, _MM_SHUFFLE(1, 1, 1, 1)); // tu = zz | zz | zz | zz - tv = _mm_add_ss(tv, tu); // tv = zz | yy | 0 | xx + yy + zz - tv = _mm_sqrt_ss(tv); // tv = zz | yy | 0 | sqrt( xx + yy + zz ) + tv = _mm_load_ss((float*)&vec.x); // tv = 0 | 0 | 0 | x + tv = _mm_loadh_pi(tv, (__m64*)&vec.y); // tv = z | y | 0 | x + tv = _mm_mul_ps(tv, tv); // tv = zz | yy | 0 | xx + tu = _mm_movehl_ps(tv, tv); // tu = zz | yy | zz | yy + tv = _mm_add_ss(tv, tu); // tv = zz | yy | 0 | xx + yy + tu = _mm_shuffle_ps(tu, tu, _MM_SHUFFLE(1, 1, 1, 1)); // tu = zz | zz | zz | zz + tv = _mm_add_ss(tv, tu); // tv = zz | yy | 0 | xx + yy + zz + tv = _mm_sqrt_ss(tv); // tv = zz | yy | 0 | sqrt( xx + yy + zz ) _mm_store_ss((float*)&res, tv); } @@ -430,7 +430,7 @@ void ParticleRenderStream(LPVOID lpvParams) TAL_ID rtID = TAL_MakeID(1, Core.dwFrame, 0); TAL_AddRelationThis(TAL_RELATION_IS_CHILD_OF, rtID); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED float sina = 0.0f, cosa = 0.0f; DWORD angle = 0xFFFFFFFF; @@ -555,7 +555,7 @@ void CParticleEffect::Render(float) { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("CParticleEffect::Render()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED u32 dwOffset, dwCount; // Get a pointer to the particles in gp memory @@ -837,4 +837,4 @@ void CParticleEffect::Render(float) } } -#endif // _EDITOR +#endif // _EDITOR diff --git a/src/Layers/xrRender/ParticleEffect.h b/src/Layers/xrRender/ParticleEffect.h index 3005c6fc406..91b6efabb68 100644 --- a/src/Layers/xrRender/ParticleEffect.h +++ b/src/Layers/xrRender/ParticleEffect.h @@ -4,10 +4,10 @@ #ifdef _EDITOR #include "Layers/xrRender/FBasicVisual.h" #include "Layers/xrRender/dxParticleCustom.h" -#else // _EDITOR +#else // _EDITOR #include "Layers/xrRender/FBasicVisual.h" #include "Layers/xrRender/dxParticleCustom.h" -#endif // _EDITOR +#endif // _EDITOR namespace PS { diff --git a/src/Layers/xrRender/ParticleEffectDef.cpp b/src/Layers/xrRender/ParticleEffectDef.cpp index 11ab9e5c955..9ad2b175c18 100644 --- a/src/Layers/xrRender/ParticleEffectDef.cpp +++ b/src/Layers/xrRender/ParticleEffectDef.cpp @@ -4,8 +4,8 @@ #include "ParticleEffect.h" #include "ParticleEffectDef.h" #ifdef _EDITOR -#include "UI_ToolsCustom.h" #include "ParticleEffectActions.h" +#include "UI_ToolsCustom.h" #else #endif @@ -159,8 +159,8 @@ void CPEDef::ExecuteCollision( { // Compute tangential and normal components of velocity float nmag = m.vel * n; - pVector vn(n * nmag); // Normal Vn = (V.N)N - pVector vt(m.vel - vn); // Tangent Vt = V - Vn + pVector vn(n * nmag); // Normal Vn = (V.N)N + pVector vt(m.vel - vn); // Tangent Vt = V - Vn // Compute _new velocity heading out: // Don't apply friction if tangential velocity < cutoff diff --git a/src/Layers/xrRender/ParticleEffectDef.h b/src/Layers/xrRender/ParticleEffectDef.h index 9b981e44d87..ac48524f5a6 100644 --- a/src/Layers/xrRender/ParticleEffectDef.h +++ b/src/Layers/xrRender/ParticleEffectDef.h @@ -19,7 +19,7 @@ namespace PS class CParticleEffect; typedef BOOL (*CollisionCallback)( - CParticleEffect* E, PAPI::Particle& P, const Fvector& pt, const Fvector& norm); // TRUE-continue collision exec + CParticleEffect* E, PAPI::Particle& P, const Fvector& pt, const Fvector& norm); // TRUE-continue collision exec typedef void (*DestroyCallback)(CParticleEffect* E, PAPI::Particle& P); class PFunction; @@ -82,11 +82,11 @@ class ECORE_API CPEDef // compiled actions CMemoryWriter m_Actions; // def - float m_fTimeLimit; // time limit - int m_MaxParticles; // max particle count - Fvector m_VelocityScale; // velocity scale - Fvector m_APDefaultRotation; // align to path - // collision + float m_fTimeLimit; // time limit + int m_MaxParticles; // max particle count + Fvector m_VelocityScale; // velocity scale + Fvector m_APDefaultRotation; // align to path + // collision float m_fCollideOneMinusFriction; float m_fCollideResilience; float m_fCollideSqrCutoff; @@ -156,7 +156,7 @@ class ECORE_API CPEDef #define PED_CHUNK_SPRITE 0x0007 #define PED_CHUNK_TIMELIMIT 0x0008 #define PED_CHUNK_TIMELIMIT2 0x0009 -#define PED_CHUNK_SOURCETEXT_ 0x0020 // obsolete +#define PED_CHUNK_SOURCETEXT_ 0x0020 // obsolete #define PED_CHUNK_COLLISION 0x0021 #define PED_CHUNK_VEL_SCALE 0x0022 #define PED_CHUNK_EDATA 0x0024 diff --git a/src/Layers/xrRender/ParticleGroup.h b/src/Layers/xrRender/ParticleGroup.h index 24b2927d660..86ac84530f8 100644 --- a/src/Layers/xrRender/ParticleGroup.h +++ b/src/Layers/xrRender/ParticleGroup.h @@ -164,7 +164,7 @@ class ECORE_API CParticleGroup : public dxParticleCustom #define PGD_CHUNK_VERSION 0x0001 #define PGD_CHUNK_NAME 0x0002 #define PGD_CHUNK_FLAGS 0x0003 -#define PGD_CHUNK_EFFECTS 0x0004 // obsolete +#define PGD_CHUNK_EFFECTS 0x0004 // obsolete #define PGD_CHUNK_TIME_LIMIT 0x0005 #define PGD_CHUNK_EFFECTS2 0x0007 diff --git a/src/Layers/xrRender/QueryHelper.h b/src/Layers/xrRender/QueryHelper.h index 7cc88eba004..4098408f008 100644 --- a/src/Layers/xrRender/QueryHelper.h +++ b/src/Layers/xrRender/QueryHelper.h @@ -78,7 +78,7 @@ IC HRESULT EndQuery(ID3DQuery* pQuery) return S_OK; } -#else // USE_DX10 +#else // USE_DX10 IC HRESULT CreateQuery(ID3DQuery** ppQuery, D3DQUERYTYPE Type) { @@ -100,6 +100,6 @@ IC HRESULT EndQuery(ID3DQuery* pQuery) return pQuery->Issue(D3DISSUE_END); } -#endif // USE_DX10 +#endif // USE_DX10 -#endif // QueryHelper_included \ No newline at end of file +#endif // QueryHelper_included \ No newline at end of file diff --git a/src/Layers/xrRender/R_Backend.cpp b/src/Layers/xrRender/R_Backend.cpp index c550485522f..05231a05a0c 100644 --- a/src/Layers/xrRender/R_Backend.cpp +++ b/src/Layers/xrRender/R_Backend.cpp @@ -60,7 +60,7 @@ void CBackend::CreateQuadIB() HW.stats_manager.increment_stats_ib(QuadIB); } -#else // USE_DX10 +#else // USE_DX10 // Igor: is used to test bug with rain, particles corruption void CBackend::RestoreQuadIBData() @@ -117,14 +117,14 @@ void CBackend::CreateQuadIB() R_CHK(QuadIB->Unlock()); } -#endif // USE_DX10 +#endif // USE_DX10 // Device dependance void CBackend::OnDeviceCreate() { #if defined(USE_DX10) || defined(USE_DX11) // CreateConstantBuffers(); -#endif // USE_DX10 +#endif // USE_DX10 CreateQuadIB(); @@ -148,7 +148,7 @@ void CBackend::OnDeviceDestroy() #if defined(USE_DX10) || defined(USE_DX11) // DestroyConstantBuffers(); -#endif // USE_DX10 +#endif // USE_DX10 } #if defined(USE_DX10) || defined(USE_DX11) diff --git a/src/Layers/xrRender/R_Backend.h b/src/Layers/xrRender/R_Backend.h index 4aeb25e56b7..29f136e9192 100644 --- a/src/Layers/xrRender/R_Backend.h +++ b/src/Layers/xrRender/R_Backend.h @@ -74,13 +74,13 @@ class ECORE_API CBackend { MaxCBuffers = 14 }; -#else // USE_DX10 +#else // USE_DX10 enum MaxTextures { mtMaxPixelShaderTextures = 16, mtMaxVertexShaderTextures = 4, }; -#endif // USE_DX10 +#endif // USE_DX10 public: // Dynamic geometry streams @@ -107,9 +107,9 @@ class ECORE_API CBackend #endif D3D_PRIMITIVE_TOPOLOGY m_PrimitiveTopology; ID3DInputLayout* m_pInputLayout; - DWORD dummy0; // Padding to avoid warning - DWORD dummy1; // Padding to avoid warning - DWORD dummy2; // Padding to avoid warning + DWORD dummy0; // Padding to avoid warning + DWORD dummy1; // Padding to avoid warning + DWORD dummy2; // Padding to avoid warning #endif private: // Render-targets @@ -119,9 +119,9 @@ class ECORE_API CBackend // Vertices/Indices/etc #if defined(USE_DX10) || defined(USE_DX11) SDeclaration* decl; -#else // USE_DX10 +#else // USE_DX10 IDirect3DVertexDeclaration9* decl; -#endif // USE_DX10 +#endif // USE_DX10 ID3DVertexBuffer* vb; ID3DIndexBuffer* ib; u32 vb_stride; @@ -141,7 +141,7 @@ class ECORE_API CBackend ID3D11DomainShader* ds; ID3D11ComputeShader* cs; #endif -#endif // USE_DX10 +#endif // USE_DX10 #ifdef DEBUG LPCSTR ps_name; @@ -153,7 +153,7 @@ class ECORE_API CBackend LPCSTR ds_name; LPCSTR cs_name; #endif -#endif // USE_DX10 +#endif // USE_DX10 #endif u32 stencil_enable; u32 stencil_func; @@ -175,19 +175,19 @@ class ECORE_API CBackend SConstantList* C; // Lists-expanded - CTexture* textures_ps[mtMaxPixelShaderTextures]; // stages + CTexture* textures_ps[mtMaxPixelShaderTextures]; // stages // CTexture* textures_vs [5 ]; // dmap + 4 vs - CTexture* textures_vs[mtMaxVertexShaderTextures]; // 4 vs + CTexture* textures_vs[mtMaxVertexShaderTextures]; // 4 vs #if defined(USE_DX10) || defined(USE_DX11) - CTexture* textures_gs[mtMaxGeometryShaderTextures]; // 4 vs + CTexture* textures_gs[mtMaxGeometryShaderTextures]; // 4 vs #ifdef USE_DX11 - CTexture* textures_hs[mtMaxHullShaderTextures]; // 4 vs - CTexture* textures_ds[mtMaxDomainShaderTextures]; // 4 vs - CTexture* textures_cs[mtMaxComputeShaderTextures]; // 4 vs + CTexture* textures_hs[mtMaxHullShaderTextures]; // 4 vs + CTexture* textures_ds[mtMaxDomainShaderTextures]; // 4 vs + CTexture* textures_cs[mtMaxComputeShaderTextures]; // 4 vs #endif -#endif // USE_DX10 +#endif // USE_DX10 #ifdef _EDITOR - CMatrix* matrices[8]; // matrices are supported only for FFP + CMatrix* matrices[8]; // matrices are supported only for FFP #endif void Invalidate(); @@ -204,10 +204,10 @@ class ECORE_API CBackend u32 decl; u32 vb; u32 ib; - u32 states; // Number of times the shader-state changes - u32 textures; // Number of times the shader-tex changes - u32 matrices; // Number of times the shader-xform changes - u32 constants; // Number of times the shader-consts changes + u32 states; // Number of times the shader-state changes + u32 textures; // Number of times the shader-tex changes + u32 matrices; // Number of times the shader-xform changes + u32 constants; // Number of times the shader-consts changes #endif u32 xforms; u32 target_rt; @@ -240,18 +240,18 @@ class ECORE_API CBackend VERIFY(!"Invalid texture stage"); return 0; } -#else // USE_DX10 +#else // USE_DX10 VERIFY(!"Invalid texture stage"); return 0; -#endif // USE_DX10 +#endif // USE_DX10 } #if defined(USE_DX10) || defined(USE_DX11) IC void get_ConstantDirect(shared_str& n, u32 DataSize, void** pVData, void** pGData, void** pPData); -#else // USE_DX10 +#else // USE_DX10 IC R_constant_array& get_ConstantCache_Vertex() { return constants.a_vertex; } IC R_constant_array& get_ConstantCache_Pixel() { return constants.a_pixel; } -#endif // USE_DX10 +#endif // USE_DX10 // API IC void set_xform(u32 ID, const Fmatrix& M); @@ -284,9 +284,9 @@ class ECORE_API CBackend ICF void set_States(ref_state& _state) { set_States(_state->state); } #if defined(USE_DX10) || defined(USE_DX11) ICF void set_Format(SDeclaration* _decl); -#else // USE_DX10 +#else // USE_DX10 ICF void set_Format(IDirect3DVertexDeclaration9* _decl); -#endif // USE_DX10 +#endif // USE_DX10 ICF void set_PS(ID3DPixelShader* _ps, LPCSTR _n = 0); ICF void set_PS(ref_ps& _ps) { set_PS(_ps->ps, _ps->cName.c_str()); } @@ -302,7 +302,7 @@ class ECORE_API CBackend ICF void set_CS(ref_cs& _cs) { set_CS(_cs->sh, _cs->cName.c_str()); } #endif -#endif // USE_DX10 +#endif // USE_DX10 #ifdef USE_DX11 ICF bool is_TessEnabled(); @@ -314,12 +314,12 @@ class ECORE_API CBackend #if defined(USE_DX10) || defined(USE_DX11) ICF void set_VS(SVS* _vs); -protected: // In DX10 we need input shader signature which is stored in ref_vs -#endif // USE_DX10 +protected: // In DX10 we need input shader signature which is stored in ref_vs +#endif // USE_DX10 ICF void set_VS(ID3DVertexShader* _vs, LPCSTR _n = 0); #if defined(USE_DX10) || defined(USE_DX11) public: -#endif // USE_DX10 +#endif // USE_DX10 ICF void set_Vertices(ID3DVertexBuffer* _vb, u32 _vb_stride); ICF void set_Indices(ID3DIndexBuffer* _ib); @@ -389,7 +389,7 @@ class ECORE_API CBackend { if (C) constants.set(C, A); } -#endif // USE_DX10 +#endif // USE_DX10 // constants - LPCSTR (slow) ICF void set_c(LPCSTR n, const Fmatrix& A) @@ -425,7 +425,7 @@ class ECORE_API CBackend { if (ctable) set_c(&*ctable->get(n), A); } -#endif // USE_DX10 +#endif // USE_DX10 // constants - shared_str (average) ICF void set_c(shared_str& n, const Fmatrix& A) @@ -461,7 +461,7 @@ class ECORE_API CBackend { if (ctable) set_c(&*ctable->get(n), A); } -#endif // USE_DX10 +#endif // USE_DX10 ICF void Render(D3DPRIMITIVETYPE T, u32 baseV, u32 startV, u32 countV, u32 startI, u32 PC); ICF void Render(D3DPRIMITIVETYPE T, u32 startV, u32 PC); @@ -471,7 +471,7 @@ class ECORE_API CBackend #endif // Device create / destroy / frame signaling - void RestoreQuadIBData(); // Igor: is used to test bug with rain, particles corruption + void RestoreQuadIBData(); // Igor: is used to test bug with rain, particles corruption void CreateQuadIB(); void OnFrameBegin(); void OnFrameEnd(); @@ -485,13 +485,13 @@ class ECORE_API CBackend // TODO: DX10: Implement this. IC void dbg_SetRS(D3DRENDERSTATETYPE p1, u32 p2) { VERIFY(!"Not implemented"); } IC void dbg_SetSS(u32 sampler, D3DSAMPLERSTATETYPE type, u32 value) { VERIFY(!"Not implemented"); } -#else // USE_DX10 +#else // USE_DX10 IC void dbg_SetRS(D3DRENDERSTATETYPE p1, u32 p2) { CHK_DX(HW.pDevice->SetRenderState(p1, p2)); } IC void dbg_SetSS(u32 sampler, D3DSAMPLERSTATETYPE type, u32 value) { CHK_DX(HW.pDevice->SetSamplerState(sampler, type, value)); } -#endif // USE_DX10 +#endif // USE_DX10 #ifdef DEBUG void dbg_Draw(D3DPRIMITIVETYPE T, FVF::L* pVerts, int vcnt, u16* pIdx, int pcnt); void dbg_Draw(D3DPRIMITIVETYPE T, FVF::L* pVerts, int pcnt); @@ -525,7 +525,7 @@ class ECORE_API CBackend ID3DBlob* m_pInputSignature; bool m_bChangedRTorZB; -#endif // USE_DX10 +#endif // USE_DX10 }; #pragma warning(pop) diff --git a/src/Layers/xrRender/R_Backend_DBG.cpp b/src/Layers/xrRender/R_Backend_DBG.cpp index 59fa7b2c7d6..fa2db1c9628 100644 --- a/src/Layers/xrRender/R_Backend_DBG.cpp +++ b/src/Layers/xrRender/R_Backend_DBG.cpp @@ -20,22 +20,22 @@ void CBackend::dbg_Draw(D3DPRIMITIVETYPE T, FVF::L* pVerts, int vcnt, u16* pIdx, #if defined(USE_DX10) || defined(USE_DX11) // TODO: DX10: implement // VERIFY(!"CBackend::dbg_Draw not implemented."); -#else // USE_DX10 +#else // USE_DX10 OnFrameEnd(); CHK_DX(HW.pDevice->SetFVF(FVF::F_L)); CHK_DX(HW.pDevice->DrawIndexedPrimitiveUP(T, 0, vcnt, pcnt, pIdx, D3DFMT_INDEX16, pVerts, sizeof(FVF::L))); -#endif // USE_DX10 +#endif // USE_DX10 } void CBackend::dbg_Draw(D3DPRIMITIVETYPE T, FVF::L* pVerts, int pcnt) { #if defined(USE_DX10) || defined(USE_DX11) // TODO: DX10: implement // VERIFY(!"CBackend::dbg_Draw not implemented."); -#else // USE_DX10 +#else // USE_DX10 OnFrameEnd(); CHK_DX(HW.pDevice->SetFVF(FVF::F_L)); CHK_DX(HW.pDevice->DrawPrimitiveUP(T, pcnt, pVerts, sizeof(FVF::L))); -#endif // USE_DX10 +#endif // USE_DX10 } #define RGBA_GETALPHA(rgb) ((rgb) >> 24) @@ -47,14 +47,14 @@ void CBackend::dbg_DrawOBB(Fmatrix& T, Fvector& half_dim, u32 C) mL2W_Transform.mul_43(T, mScaleTransform); FVF::L aabb[8]; - aabb[0].set(-1, -1, -1, C); // 0 - aabb[1].set(-1, +1, -1, C); // 1 - aabb[2].set(+1, +1, -1, C); // 2 - aabb[3].set(+1, -1, -1, C); // 3 - aabb[4].set(-1, -1, +1, C); // 4 - aabb[5].set(-1, +1, +1, C); // 5 - aabb[6].set(+1, +1, +1, C); // 6 - aabb[7].set(+1, -1, +1, C); // 7 + aabb[0].set(-1, -1, -1, C); // 0 + aabb[1].set(-1, +1, -1, C); // 1 + aabb[2].set(+1, +1, -1, C); // 2 + aabb[3].set(+1, -1, -1, C); // 3 + aabb[4].set(-1, -1, +1, C); // 4 + aabb[5].set(-1, +1, +1, C); // 5 + aabb[6].set(+1, +1, +1, C); // 6 + aabb[7].set(+1, -1, +1, C); // 7 u16 aabb_id[12 * 2] = {0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 1, 5, 2, 6, 3, 7, 0, 4}; set_xform_world(mL2W_Transform); @@ -142,7 +142,7 @@ void CBackend::dbg_DrawEllipse(Fmatrix& T, u32 C) 96, 96, 112, 97, 96, 97, 81, 113, 98, 97, 113, 99, 98, 113, 100, 99, 113, 101, 100, 113, 102, 101, 113, 103, 102, 113, 104, 103, 113, 105, 104, 113, 106, 105, 113, 107, 106, 113, 108, 107, 113, 109, 108, 113, 110, 109, 113, 111, 110, 113, 112, 111, 113, 97, 112}; -#endif // #if defined(USE_DX10) || defined(USE_DX11) +#endif // #if defined(USE_DX10) || defined(USE_DX11) const int vcnt = sizeof(gVertices) / (sizeof(float) * 3); FVF::L verts[vcnt]; @@ -158,11 +158,11 @@ void CBackend::dbg_DrawEllipse(Fmatrix& T, u32 C) // TODO: DX10: implement // VERIFY(!"CBackend::dbg_Draw not implemented."); // dbg_Draw(D3DPT_TRIANGLELIST,verts,vcnt,gFaces,224); -#else // USE_DX10 +#else // USE_DX10 HW.pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); dbg_Draw(D3DPT_TRIANGLELIST, verts, vcnt, gFaces, 224); HW.pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); -#endif // USE_DX10 +#endif // USE_DX10 } #endif diff --git a/src/Layers/xrRender/R_Backend_Runtime.cpp b/src/Layers/xrRender/R_Backend_Runtime.cpp index 42227b9428c..9b5aedd4884 100644 --- a/src/Layers/xrRender/R_Backend_Runtime.cpp +++ b/src/Layers/xrRender/R_Backend_Runtime.cpp @@ -23,7 +23,7 @@ void CBackend::OnFrameEnd() #if defined(USE_DX10) || defined(USE_DX11) HW.pContext->ClearState(); Invalidate(); -#else // USE_DX10 +#else // USE_DX10 for (u32 stage = 0; stage < HW.Caps.raster.dwStages; stage++) CHK_DX(HW.pDevice->SetTexture(0, 0)); @@ -32,7 +32,7 @@ void CBackend::OnFrameEnd() CHK_DX(HW.pDevice->SetVertexShader(0)); CHK_DX(HW.pDevice->SetPixelShader(0)); Invalidate(); -#endif // USE_DX10 +#endif // USE_DX10 } //#endif } @@ -51,7 +51,7 @@ void CBackend::OnFrameBegin() RImplementation.rmNormal(); set_RT(HW.pBaseRT); set_ZB(HW.pBaseZB); -#endif // USE_DX10 +#endif // USE_DX10 memset(&stat, 0, sizeof(stat)); Vertex.Flush(); Index.Flush(); @@ -139,7 +139,7 @@ void CBackend::Invalidate() for (u32 cs_it = 0; cs_it < mtMaxComputeShaderTextures;) textures_cs[cs_it++] = 0; #endif -#endif // USE_DX10 +#endif // USE_DX10 for (u32 ps_it = 0; ps_it < mtMaxPixelShaderTextures;) textures_ps[ps_it++] = 0; @@ -158,7 +158,7 @@ void CBackend::set_ClipPlanes(u32 _enable, Fplane* _planes /*=NULL */, u32 count // Use this to set up location, were shader setup code will get data // VERIFY(!"CBackend::set_ClipPlanes not implemented!"); return; -#else // USE_DX10 +#else // USE_DX10 if (0 == HW.Caps.geometry.dwClipPlanes) return; if (!_enable) { CHK_DX(HW.pDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, FALSE)); @@ -184,7 +184,7 @@ void CBackend::set_ClipPlanes(u32 _enable, Fplane* _planes /*=NULL */, u32 count // Enable them u32 e_mask = (1 << count) - 1; CHK_DX(HW.pDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, e_mask)); -#endif // USE_DX10 +#endif // USE_DX10 } #ifndef DEDICATED_SREVER @@ -196,9 +196,9 @@ void CBackend::set_ClipPlanes(u32 _enable, Fmatrix* _xform /*=NULL */, u32 fmask // TODO: DX10: Implement in the corresponding vertex shaders // Use this to set up location, were shader setup code will get data // VERIFY(!"CBackend::set_ClipPlanes not implemented!"); -#else // USE_DX10 +#else // USE_DX10 CHK_DX(HW.pDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, FALSE)); -#endif // USE_DX10 +#endif // USE_DX10 return; } VERIFY(_xform && fmask); @@ -221,7 +221,7 @@ void CBackend::set_Textures(STextureList* _T) int _last_ds = -1; int _last_cs = -1; #endif -#endif // USE_DX10 +#endif // USE_DX10 STextureList::iterator _it = _T->begin(); STextureList::iterator _end = _T->end(); @@ -251,7 +251,7 @@ void CBackend::set_Textures(STextureList* _T) else #if defined(USE_DX10) || defined(USE_DX11) if (load_id < CTexture::rstGeometry) -#endif // UDE_DX10 +#endif // UDE_DX10 { // Set up pixel shader resources VERIFY(load_id < CTexture::rstVertex + mtMaxVertexShaderTextures); @@ -356,7 +356,7 @@ void CBackend::set_Textures(STextureList* _T) #endif else VERIFY("Invalid enum"); -#endif // UDE_DX10 +#endif // UDE_DX10 } // clear remaining stages (PS) @@ -370,9 +370,9 @@ void CBackend::set_Textures(STextureList* _T) ID3DShaderResourceView* pRes = 0; // HW.pDevice->PSSetShaderResources(_last_ps, 1, &pRes); SRVSManager.SetPSResource(_last_ps, pRes); -#else // USE_DX10 +#else // USE_DX10 CHK_DX(HW.pDevice->SetTexture(_last_ps, NULL)); -#endif // USE_DX10 +#endif // USE_DX10 } // clear remaining stages (VS) for (++_last_vs; _last_vs < mtMaxVertexShaderTextures; _last_vs++) @@ -385,9 +385,9 @@ void CBackend::set_Textures(STextureList* _T) ID3DShaderResourceView* pRes = 0; // HW.pDevice->VSSetShaderResources(_last_vs, 1, &pRes); SRVSManager.SetVSResource(_last_vs, pRes); -#else // USE_DX10 +#else // USE_DX10 CHK_DX(HW.pDevice->SetTexture(_last_vs + CTexture::rstVertex, NULL)); -#endif // USE_DX10 +#endif // USE_DX10 } #if defined(USE_DX10) || defined(USE_DX11) @@ -435,7 +435,7 @@ void CBackend::set_Textures(STextureList* _T) SRVSManager.SetCSResource(_last_cs, pRes); } #endif -#endif // USE_DX10 +#endif // USE_DX10 } #else diff --git a/src/Layers/xrRender/R_Backend_Runtime.h b/src/Layers/xrRender/R_Backend_Runtime.h index ee94016c11a..56c8d0d0410 100644 --- a/src/Layers/xrRender/R_Backend_Runtime.h +++ b/src/Layers/xrRender/R_Backend_Runtime.h @@ -10,9 +10,9 @@ #if defined(USE_DX10) || defined(USE_DX11) #include "Layers/xrRenderDX10/StateManager/dx10State.h" #include "Layers/xrRenderDX10/dx10R_Backend_Runtime.h" -#else // USE_DX10 +#else // USE_DX10 #include "Layers/xrRenderDX9/dx9R_Backend_Runtime.h" -#endif // USE_DX10 +#endif // USE_DX10 IC void R_xforms::set_c_w(R_constant* C) { @@ -92,7 +92,7 @@ ICF void CBackend::set_States(ID3DState* _state) // DX10 Manages states using it's own algorithm. Don't mess with it. #if !defined(USE_DX10) && !defined(USE_DX11) if (state != _state) -#endif // USE_DX10 +#endif // USE_DX10 { PGO(Msg("PGO:state_block")); #ifdef DEBUG @@ -137,7 +137,7 @@ IC void CBackend::set_Element(ShaderElement* S, u32 pass) set_DS(P.ds); set_CS(P.cs); #endif -#endif // USE_DX10 +#endif // USE_DX10 set_Constants(P.constants); set_Textures(P.T); #ifdef _EDITOR diff --git a/src/Layers/xrRender/R_Backend_xform.h b/src/Layers/xrRender/R_Backend_xform.h index a0a6e73c778..4f2b5431f72 100644 --- a/src/Layers/xrRender/R_Backend_xform.h +++ b/src/Layers/xrRender/R_Backend_xform.h @@ -5,13 +5,13 @@ class ECORE_API R_xforms { public: - Fmatrix m_w; // Basic - world - Fmatrix m_invw; // derived - world2local, cached - Fmatrix m_v; // Basic - view - Fmatrix m_p; // Basic - projection - Fmatrix m_wv; // Derived - world2view - Fmatrix m_vp; // Derived - view2projection - Fmatrix m_wvp; // Derived - world2view2projection + Fmatrix m_w; // Basic - world + Fmatrix m_invw; // derived - world2local, cached + Fmatrix m_v; // Basic - view + Fmatrix m_p; // Basic - projection + Fmatrix m_wv; // Derived - world2view + Fmatrix m_vp; // Derived - view2projection + Fmatrix m_wvp; // Derived - world2view2projection R_constant* c_w; R_constant* c_invw; diff --git a/src/Layers/xrRender/R_DStreams.cpp b/src/Layers/xrRender/R_DStreams.cpp index 628f88844d0..421f1b5935f 100644 --- a/src/Layers/xrRender/R_DStreams.cpp +++ b/src/Layers/xrRender/R_DStreams.cpp @@ -24,10 +24,10 @@ void _VertexStream::Create() R_CHK(HW.pDevice->CreateBuffer(&bufferDesc, 0, &pVB)); HW.stats_manager.increment_stats_vb(pVB); -#else // USE_DX10 +#else // USE_DX10 R_CHK(HW.pDevice->CreateVertexBuffer(mSize, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, 0, D3DPOOL_DEFAULT, &pVB, NULL)); HW.stats_manager.increment_stats_vb(pVB); -#endif // USE_DX10 +#endif // USE_DX10 R_ASSERT(pVB); @@ -80,14 +80,14 @@ void* _VertexStream::Lock(u32 vl_Count, u32 Stride, u32& vOffset) #elif defined(USE_DX10) pVB->Map(D3D_MAP_WRITE_DISCARD, 0, (void**)&pData); pData += vOffset; -#else // USE_DX10 +#else // USE_DX10 HRESULT res = pVB->Lock(mPosition, bytes_need, (void**)&pData, LOCKFLAGS_FLUSH); if (res != D3D_OK) Msg(" pVB->Lock - failed: res = %d,mPosition = %d, bytes_need = %d, &pData = %x, LOCKFLAGS_FLUSH", res, mPosition, bytes_need, (void**)&pData); -#endif // USE_DX10 +#endif // USE_DX10 } else { @@ -102,14 +102,14 @@ void* _VertexStream::Lock(u32 vl_Count, u32 Stride, u32& vOffset) #elif defined(USE_DX10) pVB->Map(D3D_MAP_WRITE_NO_OVERWRITE, 0, (void**)&pData); pData += vOffset * Stride; -#else // USE_DX10 +#else // USE_DX10 HRESULT res = pVB->Lock(mPosition, bytes_need, (void**)&pData, LOCKFLAGS_APPEND); if (res != D3D_OK) Msg(" pVB->Lock - failed: res = %d,mPosition = %d, bytes_need = %d, &pData = %x, LOCKFLAGS_APPEND", res, mPosition, bytes_need, (void**)&pData); -#endif // USE_DX10 +#endif // USE_DX10 } VERIFY(pData); @@ -131,9 +131,9 @@ void _VertexStream::Unlock(u32 Count, u32 Stride) HW.pContext->Unmap(pVB, 0); #elif defined(USE_DX10) pVB->Unmap(); -#else // USE_DX10 +#else // USE_DX10 pVB->Unlock(); -#endif // USE_DX10 +#endif // USE_DX10 } void _VertexStream::reset_begin() @@ -181,11 +181,11 @@ void _IndexStream::Create() R_CHK(HW.pDevice->CreateBuffer(&bufferDesc, 0, &pIB)); HW.stats_manager.increment_stats_ib(pIB); -#else // USE_DX10 +#else // USE_DX10 R_CHK(HW.pDevice->CreateIndexBuffer( mSize, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFMT_INDEX16, D3DPOOL_DEFAULT, &pIB, NULL)); HW.stats_manager.increment_stats_ib(pIB); -#endif // USE_DX10 +#endif // USE_DX10 R_ASSERT(pIB); mPosition = 0; @@ -218,8 +218,8 @@ u16* _IndexStream::Lock(u32 Count, u32& vOffset) // then flush the buffer contents u32 dwFlags = LOCKFLAGS_APPEND; if (2 * (Count + mPosition) >= mSize) { - mPosition = 0; // clear position - dwFlags = LOCKFLAGS_FLUSH; // discard it's contens + mPosition = 0; // clear position + dwFlags = LOCKFLAGS_FLUSH; // discard it's contens mDiscardID++; } #if defined(USE_DX11) @@ -232,9 +232,9 @@ u16* _IndexStream::Lock(u32 Count, u32& vOffset) pIB->Map(MapMode, 0, (void**)&pLockedData); pLockedData += mPosition * 2; -#else // USE_DX10 +#else // USE_DX10 pIB->Lock(mPosition * 2, Count * 2, (void**)&pLockedData, dwFlags); -#endif // USE_DX10 +#endif // USE_DX10 VERIFY(pLockedData); vOffset = mPosition; @@ -251,9 +251,9 @@ void _IndexStream::Unlock(u32 RealCount) HW.pContext->Unmap(pIB, 0); #elif defined(USE_DX10) pIB->Unmap(); -#else // USE_DX10 +#else // USE_DX10 pIB->Unlock(); -#endif // USE_DX10 +#endif // USE_DX10 } void _IndexStream::reset_begin() diff --git a/src/Layers/xrRender/R_DStreams.h b/src/Layers/xrRender/R_DStreams.h index ab9dcf21ca1..8787459dde5 100644 --- a/src/Layers/xrRender/R_DStreams.h +++ b/src/Layers/xrRender/R_DStreams.h @@ -12,9 +12,9 @@ class ECORE_API _VertexStream { private: ID3DVertexBuffer* pVB; - u32 mSize; // size in bytes - u32 mPosition; // position in bytes - u32 mDiscardID; // ID of discard - usually for caching + u32 mSize; // size in bytes + u32 mPosition; // position in bytes + u32 mDiscardID; // ID of discard - usually for caching public: ID3DVertexBuffer* old_pVB; #ifdef DEBUG @@ -43,7 +43,7 @@ class ECORE_API _IndexStream { private: ID3DIndexBuffer* pIB; - u32 mSize; // real size (usually mCount, aligned on 512b boundary) + u32 mSize; // real size (usually mCount, aligned on 512b boundary) u32 mPosition; u32 mDiscardID; diff --git a/src/Layers/xrRender/ResourceManager.cpp b/src/Layers/xrRender/ResourceManager.cpp index 337b78c277c..ba70e833e5a 100644 --- a/src/Layers/xrRender/ResourceManager.cpp +++ b/src/Layers/xrRender/ResourceManager.cpp @@ -224,7 +224,7 @@ Shader* CResourceManager::_cpp_Create( // Compile element { C.iElement = 4; - C.bDetail = TRUE; //.$$$ HACK :) + C.bDetail = TRUE; //.$$$ HACK :) ShaderElement E; C._cpp_Compile(&E); S.E[4] = _CreateElement(E); @@ -264,7 +264,7 @@ Shader* CResourceManager::_cpp_Create(LPCSTR s_shader, LPCSTR s_textures, LPCSTR return _cpp_Create(pBlender, s_shader, s_textures, s_constants, s_matrices); #else // USE_DX10 return _cpp_Create(_GetBlender(s_shader ? s_shader : "null"), s_shader, s_textures, s_constants, s_matrices); -#endif // USE_DX10 +#endif // USE_DX10 //#else } #ifndef _EDITOR @@ -322,14 +322,14 @@ Shader* CResourceManager::Create(LPCSTR s_shader, LPCSTR s_textures, LPCSTR s_co } } } -#else // USE_DX10 +#else // USE_DX10 #ifndef _EDITOR if (_lua_HasShader(s_shader)) return _lua_Create(s_shader, s_textures); else #endif return _cpp_Create(s_shader, s_textures, s_constants, s_matrices); -#endif // USE_DX10 +#endif // USE_DX10 } //#else #ifndef _EDITOR @@ -436,7 +436,7 @@ void CResourceManager::Evict() // TODO: DX10: check if we really need this method #if !defined(USE_DX10) && !defined(USE_DX11) CHK_DX(HW.pDevice->EvictManagedResources()); -#endif // USE_DX10 +#endif // USE_DX10 } /* BOOL CResourceManager::_GetDetailTexture(LPCSTR Name,LPCSTR& T, R_constant_setup* &CS) diff --git a/src/Layers/xrRender/ResourceManager.h b/src/Layers/xrRender/ResourceManager.h index 520fb63c5c5..14692068b83 100644 --- a/src/Layers/xrRender/ResourceManager.h +++ b/src/Layers/xrRender/ResourceManager.h @@ -39,7 +39,7 @@ class ECORE_API CResourceManager DEFINE_MAP_PRED(const char*, SVS*, map_VS, map_VSIt, str_pred); #if defined(USE_DX10) || defined(USE_DX11) DEFINE_MAP_PRED(const char*, SGS*, map_GS, map_GSIt, str_pred); -#endif // USE_DX10 +#endif // USE_DX10 #ifdef USE_DX11 DEFINE_MAP_PRED(const char*, SHS*, map_HS, map_HSIt, str_pred); DEFINE_MAP_PRED(const char*, SDS*, map_DS, map_DSIt, str_pred); @@ -61,7 +61,7 @@ class ECORE_API CResourceManager map_PS m_ps; #if defined(USE_DX10) || defined(USE_DX11) map_GS m_gs; -#endif // USE_DX10 +#endif // USE_DX10 map_TD m_td; xr_vector v_states; @@ -72,7 +72,7 @@ class ECORE_API CResourceManager #if defined(USE_DX10) || defined(USE_DX11) xr_vector v_constant_buffer; xr_vector v_input_signature; -#endif // USE_DX10 +#endif // USE_DX10 // lists xr_vector lst_textures; @@ -138,7 +138,7 @@ class ECORE_API CResourceManager SInputSignature* _CreateInputSignature(ID3DBlob* pBlob); void _DeleteInputSignature(const SInputSignature* pSignature); -#endif // USE_DX10 +#endif // USE_DX10 #ifdef USE_DX11 CRT* _CreateRT(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount = 1, bool useUAV = false); @@ -152,7 +152,7 @@ class ECORE_API CResourceManager #if defined(USE_DX10) || defined(USE_DX11) SGS* _CreateGS(LPCSTR Name); void _DeleteGS(const SGS* GS); -#endif // USE_DX10 +#endif // USE_DX10 #ifdef USE_DX11 SHS* _CreateHS(LPCSTR Name); @@ -163,7 +163,7 @@ class ECORE_API CResourceManager SCS* _CreateCS(LPCSTR Name); void _DeleteCS(const SCS* CS); -#endif // USE_DX10 +#endif // USE_DX10 SPS* _CreatePS(LPCSTR Name); void _DeletePS(const SPS* PS); @@ -245,7 +245,7 @@ class ECORE_API CResourceManager template void DestroyShader(const T* sh); -#endif // USE_DX10 +#endif // USE_DX10 }; -#endif // ResourceManagerH +#endif // ResourceManagerH diff --git a/src/Layers/xrRender/ResourceManager_Reset.cpp b/src/Layers/xrRender/ResourceManager_Reset.cpp index 04c9d25215a..931dd0179f9 100644 --- a/src/Layers/xrRender/ResourceManager_Reset.cpp +++ b/src/Layers/xrRender/ResourceManager_Reset.cpp @@ -82,7 +82,7 @@ void CResourceManager::reset_end() #pragma todo("container is created in stack!") // DX10 cut xr_vector rt; // DX10 cut for (map_RTCIt rt_it=m_rtargets_c.begin(); rt_it!=m_rtargets_c.end(); rt_it++) - //rt.push_back(rt_it->second); + // rt.push_back(rt_it->second); // DX10 cut std::sort(rt.begin(),rt.end(),cmp_rtc); // DX10 cut for (u32 _it=0; _itreset_end (); } @@ -92,9 +92,9 @@ void CResourceManager::reset_end() for (u32 _it = 0; _it < v_states.size(); _it++) #if defined(USE_DX10) || defined(USE_DX11) v_states[_it]->state = ID3DState::Create(v_states[_it]->state_code); -#else // USE_DX10 +#else // USE_DX10 v_states[_it]->state = v_states[_it]->state_code.record(); -#endif // USE_DX10 +#endif // USE_DX10 } // create everything, renderer may use diff --git a/src/Layers/xrRender/ResourceManager_Resources.cpp b/src/Layers/xrRender/ResourceManager_Resources.cpp index 64f50fad7dd..dcaf105c51b 100644 --- a/src/Layers/xrRender/ResourceManager_Resources.cpp +++ b/src/Layers/xrRender/ResourceManager_Resources.cpp @@ -449,12 +449,12 @@ CTexture* CResourceManager::_CreateTexture(LPCSTR _Name) if (0 == xr_strcmp(_Name, "null")) return 0; R_ASSERT(_Name && _Name[0]); string_path Name; - xr_strcpy(Name, _Name); //. andy if (strext(Name)) *strext(Name)=0; + xr_strcpy(Name, _Name); //. andy if (strext(Name)) *strext(Name)=0; fix_texture_name(Name); #ifdef DEBUG simplify_texture(Name); -#endif // DEBUG +#endif // DEBUG // ***** first pass - search already loaded texture LPSTR N = LPSTR(Name); @@ -753,7 +753,7 @@ SVS* CResourceManager::_CreateVS(LPCSTR _name) c_target, D3DXSHADER_DEBUG | D3DXSHADER_PACKMATRIX_ROWMAJOR /*| D3DXSHADER_PREFER_FLOW_CONTROL*/, &pShaderBuf, &pErrorBuf, NULL); // _hr = D3DXCompileShader (LPCSTR(fs->pointer()),fs->length(), NULL, &Includer, "main", target, - //D3DXSHADER_DEBUG | D3DXSHADER_PACKMATRIX_ROWMAJOR, &pShaderBuf, &pErrorBuf, NULL); + // D3DXSHADER_DEBUG | D3DXSHADER_PACKMATRIX_ROWMAJOR, &pShaderBuf, &pErrorBuf, NULL); FS.r_close(fs); if (SUCCEEDED(_hr)) { @@ -872,7 +872,7 @@ SPS* CResourceManager::_CreatePS(LPCSTR name) _hr = GlobalEnv.Render->shader_compile(name, data, size, NULL, &Includer, c_entry, c_target, D3DXSHADER_DEBUG | D3DXSHADER_PACKMATRIX_ROWMAJOR, &pShaderBuf, &pErrorBuf, NULL); //_hr = D3DXCompileShader (text,text_size, NULL, &Includer, c_entry, c_target, D3DXSHADER_DEBUG | - //D3DXSHADER_PACKMATRIX_ROWMAJOR, &pShaderBuf, &pErrorBuf, NULL); + // D3DXSHADER_PACKMATRIX_ROWMAJOR, &pShaderBuf, &pErrorBuf, NULL); xr_free(data); if (SUCCEEDED(_hr)) { diff --git a/src/Layers/xrRender/ResourceManager_Scripting.cpp b/src/Layers/xrRender/ResourceManager_Scripting.cpp index bb63669da43..d2bb233890f 100644 --- a/src/Layers/xrRender/ResourceManager_Scripting.cpp +++ b/src/Layers/xrRender/ResourceManager_Scripting.cpp @@ -245,7 +245,7 @@ void CResourceManager::LS_Load() .def("blend", &adopt_compiler::_blend, return_reference_to<1>()) .def("aref", &adopt_compiler::_aref, return_reference_to<1>()) .def("color_write_enable", &adopt_compiler::_color_write_enable, return_reference_to<1>()) - .def("sampler", &adopt_compiler::_sampler), // returns sampler-object + .def("sampler", &adopt_compiler::_sampler), // returns sampler-object class_("blend").enum_("blend")[value("zero", int(D3DBLEND_ZERO)), value("one", int(D3DBLEND_ONE)), value("srccolor", int(D3DBLEND_SRCCOLOR)), diff --git a/src/Layers/xrRender/SH_Atomic.cpp b/src/Layers/xrRender/SH_Atomic.cpp index bcde62d531f..1abc98f0585 100644 --- a/src/Layers/xrRender/SH_Atomic.cpp +++ b/src/Layers/xrRender/SH_Atomic.cpp @@ -5,13 +5,17 @@ #include "sh_atomic.h" // Atomic -// SVS::~SVS () { _RELEASE(vs); dxRenderDeviceRender::Instance().Resources->_DeleteVS (this); +// SVS::~SVS () { _RELEASE(vs); dxRenderDeviceRender::Instance().Resources->_DeleteVS +// (this); // } -// SPS::~SPS () { _RELEASE(ps); dxRenderDeviceRender::Instance().Resources->_DeletePS (this); +// SPS::~SPS () { _RELEASE(ps); dxRenderDeviceRender::Instance().Resources->_DeletePS +// (this); // } -// SState::~SState () { _RELEASE(state); dxRenderDeviceRender::Instance().Resources->_DeleteState (this); +// SState::~SState () { _RELEASE(state); dxRenderDeviceRender::Instance().Resources->_DeleteState +// (this); // } -// SDeclaration::~SDeclaration () { _RELEASE(dcl); dxRenderDeviceRender::Instance().Resources->_DeleteDecl +// SDeclaration::~SDeclaration () { _RELEASE(dcl); +// dxRenderDeviceRender::Instance().Resources->_DeleteDecl // (this); } /////////////////////////////////////////////////////////////////////// @@ -19,7 +23,7 @@ SVS::SVS() : vs(0) #if defined(USE_DX10) || defined(USE_DX11) // ,signature(0) -#endif // USE_DX10 +#endif // USE_DX10 { ; } @@ -30,7 +34,7 @@ SVS::~SVS() #if defined(USE_DX10) || defined(USE_DX11) //_RELEASE(signature); // Now it is release automatically -#endif // USE_DX10 +#endif // USE_DX10 _RELEASE(vs); } @@ -82,7 +86,7 @@ SInputSignature::~SInputSignature() _RELEASE(signature); RImplementation.Resources->_DeleteInputSignature(this); } -#endif // USE_DX10 +#endif // USE_DX10 /////////////////////////////////////////////////////////////////////// // SState @@ -105,8 +109,8 @@ SDeclaration::~SDeclaration() // Release vertex layout _RELEASE(iLayout->second); } -#else // USE_DX10 +#else // USE_DX10 // Release vertex layout _RELEASE(dcl); -#endif // USE_DX10 +#endif // USE_DX10 } diff --git a/src/Layers/xrRender/SH_Atomic.h b/src/Layers/xrRender/SH_Atomic.h index f871889415f..f70104c6bf1 100644 --- a/src/Layers/xrRender/SH_Atomic.h +++ b/src/Layers/xrRender/SH_Atomic.h @@ -5,7 +5,7 @@ #include "xrCore/xr_resource.h" #if defined(USE_DX10) || defined(USE_DX11) #include "Layers/xrRenderDX10/StateManager/dx10State.h" -#endif // USE_DX10 +#endif // USE_DX10 #pragma pack(push, 4) @@ -20,7 +20,7 @@ struct ECORE_API SInputSignature : public xr_resource_flagged ~SInputSignature(); }; typedef resptr_core> ref_input_sign; -#endif // USE_DX10 +#endif // USE_DX10 ////////////////////////////////////////////////////////////////////////// struct ECORE_API SVS : public xr_resource_named { @@ -28,7 +28,7 @@ struct ECORE_API SVS : public xr_resource_named R_constant_table constants; #if defined(USE_DX10) || defined(USE_DX11) ref_input_sign signature; -#endif // USE_DX10 +#endif // USE_DX10 SVS(); ~SVS(); }; @@ -52,7 +52,7 @@ struct ECORE_API SGS : public xr_resource_named ~SGS(); }; typedef resptr_core> ref_gs; -#endif // USE_DX10 +#endif // USE_DX10 #ifdef USE_DX11 @@ -98,10 +98,10 @@ struct ECORE_API SDeclaration : public xr_resource_flagged // Maps input signature to input layout xr_map vs_to_layout; xr_vector dx10_dcl_code; -#else // USE_DX10 // Don't need it: use ID3DInputLayout instead +#else // USE_DX10 // Don't need it: use ID3DInputLayout instead // which is per ( declaration, VS input layout) pair IDirect3DVertexDeclaration9* dcl; -#endif // USE_DX10 +#endif // USE_DX10 // Use this for DirectX10 to cache DX9 declaration for comparison purpose only xr_vector dcl_code; @@ -110,4 +110,4 @@ struct ECORE_API SDeclaration : public xr_resource_flagged typedef resptr_core> ref_declaration; #pragma pack(pop) -#endif // sh_atomicH +#endif // sh_atomicH diff --git a/src/Layers/xrRender/SH_Constant.h b/src/Layers/xrRender/SH_Constant.h index 211158500ab..ac9760699e7 100644 --- a/src/Layers/xrRender/SH_Constant.h +++ b/src/Layers/xrRender/SH_Constant.h @@ -44,7 +44,7 @@ class ECORE_API CConstant : public xr_resource_named const_dword = c; } void Calculate(); - IC BOOL Similar(CConstant& C) // comare by modes and params + IC BOOL Similar(CConstant& C) // comare by modes and params { if (dwMode != C.dwMode) return FALSE; if (!_R.Similar(C._R)) return FALSE; diff --git a/src/Layers/xrRender/SH_Matrix.h b/src/Layers/xrRender/SH_Matrix.h index 0ae2747266d..7b23e309081 100644 --- a/src/Layers/xrRender/SH_Matrix.h +++ b/src/Layers/xrRender/SH_Matrix.h @@ -33,7 +33,7 @@ class ECORE_API CMatrix : public xr_resource_named u32 dwMode; union { - u32 tcm; // mask for tc-modifiers + u32 tcm; // mask for tc-modifiers Flags32 tcm_flags; }; WaveForm scaleU, scaleV; @@ -49,7 +49,7 @@ class ECORE_API CMatrix : public xr_resource_named } void Calculate(); - IC BOOL Similar(CMatrix& M) // comare by modes and params + IC BOOL Similar(CMatrix& M) // comare by modes and params { if (dwMode != M.dwMode) return FALSE; if (tcm != M.tcm) return FALSE; diff --git a/src/Layers/xrRender/SH_RT.cpp b/src/Layers/xrRender/SH_RT.cpp index 6d92c59b1da..8f6912aa799 100644 --- a/src/Layers/xrRender/SH_RT.cpp +++ b/src/Layers/xrRender/SH_RT.cpp @@ -24,7 +24,7 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount) if (pSurface) return; R_ASSERT(HW.pDevice && Name && Name[0] && w && h); - _order = CPU::GetCLK(); // RDEVICE.GetTimerGlobal()->GetElapsed_clk(); + _order = CPU::GetCLK(); // RDEVICE.GetTimerGlobal()->GetElapsed_clk(); HRESULT _hr; @@ -76,7 +76,7 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount) // OK #ifdef DEBUG Msg("* created RT(%s), %dx%d", Name, w, h); -#endif // DEBUG +#endif // DEBUG R_CHK(pSurface->GetSurfaceLevel(0, &pRT)); pTexture = RImplementation.Resources->_CreateTexture(Name); pTexture->surface_set(pSurface); diff --git a/src/Layers/xrRender/SH_RT.h b/src/Layers/xrRender/SH_RT.h index 96993cfee74..9f238cee7ca 100644 --- a/src/Layers/xrRender/SH_RT.h +++ b/src/Layers/xrRender/SH_RT.h @@ -27,7 +27,7 @@ class CRT : public xr_resource_named ID3D11UnorderedAccessView* pUAView; #endif -#endif // USE_DX10 +#endif // USE_DX10 ref_texture pTexture; u32 dwWidth; @@ -77,4 +77,4 @@ struct resptrcode_crtc : public resptr_base typedef resptr_core ref_rtc; */ -#endif // SH_RT_H +#endif // SH_RT_H diff --git a/src/Layers/xrRender/SH_Texture.cpp b/src/Layers/xrRender/SH_Texture.cpp index fa4ef0ed221..86f6b655be1 100644 --- a/src/Layers/xrRender/SH_Texture.cpp +++ b/src/Layers/xrRender/SH_Texture.cpp @@ -126,7 +126,7 @@ void CTexture::apply_avi(u32 dwStage) void CTexture::apply_seq(u32 dwStage) { // SEQ - u32 frame = RDEVICE.dwTimeContinual / seqMSPF; // RDEVICE.dwTimeGlobal + u32 frame = RDEVICE.dwTimeContinual / seqMSPF; // RDEVICE.dwTimeGlobal u32 frame_data = seqDATA.size(); if (flags.seqCycles) { u32 frame_id = frame % (frame_data * 2); @@ -286,7 +286,7 @@ void CTexture::Unload() #ifdef DEBUG string_path msg_buff; xr_sprintf(msg_buff, sizeof(msg_buff), "* Unloading texture [%s] pSurface RefCount=", cName.c_str()); -#endif // DEBUG +#endif // DEBUG //. if (flags.bLoaded) Msg ("* Unloaded: %s",cName.c_str()); @@ -303,7 +303,7 @@ void CTexture::Unload() #ifdef DEBUG _SHOW_REF(msg_buff, pSurface); -#endif // DEBUG +#endif // DEBUG _RELEASE(pSurface); diff --git a/src/Layers/xrRender/SH_Texture.h b/src/Layers/xrRender/SH_Texture.h index adc7c95a52b..3691080a5ca 100644 --- a/src/Layers/xrRender/SH_Texture.h +++ b/src/Layers/xrRender/SH_Texture.h @@ -12,9 +12,9 @@ class ECORE_API CTexture : public xr_resource_named public: // Since DX10 allows up to 128 unique textures, // distance between enum values should be at leas 128 - enum ResourceShaderType // Don't change this since it's hardware-dependent + enum ResourceShaderType // Don't change this since it's hardware-dependent { - rstPixel = 0, // Default texture offset + rstPixel = 0, // Default texture offset rstVertex = D3DVERTEXTEXTURESAMPLER0, rstGeometry = rstVertex + 256, rstHull = rstGeometry + 256, @@ -62,7 +62,7 @@ class ECORE_API CTexture : public xr_resource_named #if defined(USE_DX10) || defined(USE_DX11) ID3DShaderResourceView* get_SRView() { return m_pSRView; } -#endif // USE_DX10 +#endif // USE_DX10 private: IC BOOL desc_valid() { return pSurface == desc_cache; } @@ -75,10 +75,10 @@ class ECORE_API CTexture : public xr_resource_named void Apply(u32 dwStage); void ProcessStaging(); D3D_USAGE GetUsage(); -#endif // USE_DX10 +#endif // USE_DX10 // Class data -public: // Public class members (must be encapsulated furthur) +public: // Public class members (must be encapsulated furthur) struct { u32 bLoaded : 1; @@ -87,7 +87,7 @@ class ECORE_API CTexture : public xr_resource_named u32 MemoryUsage : 28; #if defined(USE_DX10) || defined(USE_DX11) u32 bLoadedAsStaging : 1; -#endif // USE_DX10 +#endif // USE_DX10 } flags; fastdelegate::FastDelegate1 bind; @@ -98,8 +98,8 @@ class ECORE_API CTexture : public xr_resource_named union { - u32 m_play_time; // sync theora time - u32 seqMSPF; // Sequence data milliseconds per frame + u32 m_play_time; // sync theora time + u32 seqMSPF; // Sequence data milliseconds per frame }; private: @@ -115,7 +115,7 @@ class ECORE_API CTexture : public xr_resource_named ID3DShaderResourceView* m_pSRView; // Sequence view data xr_vector m_seqSRView; -#endif // USE_DX10 +#endif // USE_DX10 }; struct resptrcode_texture : public resptr_base { diff --git a/src/Layers/xrRender/Shader.cpp b/src/Layers/xrRender/Shader.cpp index b7bea781127..55ac3181081 100644 --- a/src/Layers/xrRender/Shader.cpp +++ b/src/Layers/xrRender/Shader.cpp @@ -72,8 +72,8 @@ BOOL SPass::equal(const SPass& other) if (ds != other.ds) return FALSE; if (cs != other.cs) return FALSE; #endif -#endif // USE_DX10 - if (constants != other.constants) return FALSE; // is this nessesary??? (ps+vs already combines) +#endif // USE_DX10 + if (constants != other.constants) return FALSE; // is this nessesary??? (ps+vs already combines) if (T != other.T) return FALSE; if (C != other.C) return FALSE; diff --git a/src/Layers/xrRender/Shader.h b/src/Layers/xrRender/Shader.h index cb2ddea5d5d..c2785d4a6db 100644 --- a/src/Layers/xrRender/Shader.h +++ b/src/Layers/xrRender/Shader.h @@ -82,19 +82,19 @@ typedef resptr_core ref_geom; ////////////////////////////////////////////////////////////////////////// struct ECORE_API SPass : public xr_resource_flagged { - ref_state state; // Generic state, like Z-Buffering, samplers, etc - ref_ps ps; // may be NULL = FFP, in that case "state" must contain TSS setup - ref_vs vs; // may be NULL = FFP, in that case "state" must contain RS setup, *and* FVF-compatible declaration must - // be used + ref_state state; // Generic state, like Z-Buffering, samplers, etc + ref_ps ps; // may be NULL = FFP, in that case "state" must contain TSS setup + ref_vs vs; // may be NULL = FFP, in that case "state" must contain RS setup, *and* FVF-compatible declaration must + // be used #if defined(USE_DX10) || defined(USE_DX11) - ref_gs gs; // may be NULL = don't use geometry shader at all + ref_gs gs; // may be NULL = don't use geometry shader at all #ifdef USE_DX11 - ref_hs hs; // may be NULL = don't use hull shader at all - ref_ds ds; // may be NULL = don't use domain shader at all - ref_cs cs; // may be NULL = don't use compute shader at all + ref_hs hs; // may be NULL = don't use hull shader at all + ref_ds ds; // may be NULL = don't use domain shader at all + ref_cs cs; // may be NULL = don't use compute shader at all #endif -#endif // USE_DX10 - ref_ctable constants; // may be NULL +#endif // USE_DX10 + ref_ctable constants; // may be NULL ref_texture_list T; ref_constant_list C; @@ -136,7 +136,7 @@ typedef resptr_core> ref_selement; struct ECORE_API Shader : public xr_resource_flagged { public: - ref_selement E[6]; // R1 - 0=norm_lod0(det), 1=norm_lod1(normal), 2=L_point, 3=L_spot, 4=L_for_models, + ref_selement E[6]; // R1 - 0=norm_lod0(det), 1=norm_lod1(normal), 2=L_point, 3=L_spot, 4=L_for_models, // R2 - 0=deffer, 1=norm_lod1(normal), 2=psm, 3=ssm, 4=dsm ~Shader(); BOOL equal(Shader& S); @@ -152,11 +152,11 @@ typedef resptr_core ref_shader; enum SE_R1 { - SE_R1_NORMAL_HQ = 0, // high quality/detail - SE_R1_NORMAL_LQ = 1, // normal or low quality - SE_R1_LPOINT = 2, // add: point light - SE_R1_LSPOT = 3, // add: spot light - SE_R1_LMODELS = 4, // lighting info for models or shadowing from models + SE_R1_NORMAL_HQ = 0, // high quality/detail + SE_R1_NORMAL_LQ = 1, // normal or low quality + SE_R1_LPOINT = 2, // add: point light + SE_R1_LSPOT = 3, // add: spot light + SE_R1_LMODELS = 4, // lighting info for models or shadowing from models }; //#define SE_R2_NORMAL_HQ 0 // high quality/detail @@ -169,4 +169,4 @@ enum SE_R1 #pragma pack(pop) -#endif // !defined(AFX_SHADER_H__9CBD70DD_E147_446B_B4EE_5DA321EB726F__INCLUDED_) +#endif // !defined(AFX_SHADER_H__9CBD70DD_E147_446B_B4EE_5DA321EB726F__INCLUDED_) diff --git a/src/Layers/xrRender/SkeletonAnimated.cpp b/src/Layers/xrRender/SkeletonAnimated.cpp index 214d69666d4..26bdf45675f 100644 --- a/src/Layers/xrRender/SkeletonAnimated.cpp +++ b/src/Layers/xrRender/SkeletonAnimated.cpp @@ -229,7 +229,7 @@ void CKinematicsAnimated::LL_FadeCycle(u16 part, float falloff, u8 mask_channel B.set_falloff_state(); B.blendFalloff = falloff; // B.blendAccrue = B.timeCurrent; - if (B.stop_at_end) B.stop_at_end_callback = FALSE; // callback не должен приходить! + if (B.stop_at_end) B.stop_at_end_callback = FALSE; // callback не должен приходить! } } void CKinematicsAnimated::LL_CloseCycle(u16 part, u8 mask_channel /*= (1<<0)*/) @@ -250,7 +250,7 @@ void CKinematicsAnimated::LL_CloseCycle(u16 part, u8 mask_channel /*= (1<<0)*/) for (u32 i = 0; i < P.bones.size(); i++) Bone_Motion_Stop_IM((*bones)[P.bones[i]], *I); - blend_cycles[part].erase(I); // ? + blend_cycles[part].erase(I); // ? E = blend_cycles[part].end(); I--; } @@ -294,7 +294,7 @@ void CKinematicsAnimated::IBlendSetup(CBlend& B, u16 part, u8 channel, MotionID B.blendAmount = 1; } B.blendAccrue = blendAccrue; - B.blendFalloff = 0; // blendFalloff used for previous cycles + B.blendFalloff = 0; // blendFalloff used for previous cycles B.blendPower = 1; B.speed = Speed; B.motionID = motion_ID; @@ -723,7 +723,7 @@ void CKinematicsAnimated::Load(const char* N, IReader* data, u32 dwFlags) // Check compatibility m_Motions.push_back(SMotionsSlot()); bool create_res = true; - if (!g_pMotionsContainer->has(nm)) // optimize fs operations + if (!g_pMotionsContainer->has(nm)) // optimize fs operations { IReader* MS = FS.r_open(fn); create_res = m_Motions.back().motions.create(nm, MS, bones); @@ -761,7 +761,7 @@ void CKinematicsAnimated::Load(const char* N, IReader* data, u32 dwFlags) // Check compatibility m_Motions.push_back(SMotionsSlot()); bool create_res = true; - if (!g_pMotionsContainer->has(nm)) // optimize fs operations + if (!g_pMotionsContainer->has(nm)) // optimize fs operations { IReader* MS = FS.r_open(fn); create_res = m_Motions.back().motions.create(nm, MS, bones); @@ -813,7 +813,7 @@ void CKinematicsAnimated::LL_BuldBoneMatrixDequatize(const CBoneData* bd, u8 cha u16 SelfID = bd->GetSelfID(); CBlendInstance& BLEND_INST = LL_GetBlendInstance(SelfID); const CBlendInstance::BlendSVec& Blend = BLEND_INST.blend_vector(); - CKey BK[MAX_CHANNELS][MAX_BLENDED]; // base keys + CKey BK[MAX_CHANNELS][MAX_BLENDED]; // base keys BlendSVecCIt BI; for (BI = Blend.begin(); BI != Blend.end(); BI++) { diff --git a/src/Layers/xrRender/SkeletonAnimated.h b/src/Layers/xrRender/SkeletonAnimated.h index 4a8f37592f8..d9369ac69b2 100644 --- a/src/Layers/xrRender/SkeletonAnimated.h +++ b/src/Layers/xrRender/SkeletonAnimated.h @@ -10,7 +10,7 @@ //*** Bone Instance ******************************************************************************* #pragma pack(push, 8) -class CBlendInstance // Bone Instance Blend List (per-bone data) +class CBlendInstance // Bone Instance Blend List (per-bone data) { public: typedef svector BlendSVec; @@ -49,8 +49,8 @@ class ECORE_API CKinematicsAnimated : public CKinematics, public IKinematicsAnim private: // Motion control - void Bone_Motion_Start(CBoneData* bd, CBlend* handle); // with recursion - void Bone_Motion_Stop(CBoneData* bd, CBlend* handle); // with recursion + void Bone_Motion_Start(CBoneData* bd, CBlend* handle); // with recursion + void Bone_Motion_Stop(CBoneData* bd, CBlend* handle); // with recursion void Bone_Motion_Start_IM(CBoneData* bd, CBlend* handle); void Bone_Motion_Stop_IM(CBoneData* bd, CBlend* handle); @@ -166,8 +166,8 @@ class ECORE_API CKinematicsAnimated : public CKinematics, public IKinematicsAnim } // Main functionality - void UpdateTracks(); // Update motions - void LL_UpdateTracks(float dt, bool b_force, bool leave_blends); // Update motions + void UpdateTracks(); // Update motions + void LL_UpdateTracks(float dt, bool b_force, bool leave_blends); // Update motions void LL_UpdateFxTracks(float dt); void DestroyCycle(CBlend& B); diff --git a/src/Layers/xrRender/SkeletonCustom.cpp b/src/Layers/xrRender/SkeletonCustom.cpp index 99c76af6a8e..437753b3788 100644 --- a/src/Layers/xrRender/SkeletonCustom.cpp +++ b/src/Layers/xrRender/SkeletonCustom.cpp @@ -12,7 +12,7 @@ int psSkeletonUpdate = 32; Lock UCalc_Mutex #ifdef CONFIG_PROFILE_LOCKS (MUTEX_PROFILE_ID(UCalc_Mutex)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ; #ifndef _EDITOR @@ -188,7 +188,7 @@ void CKinematics::Load(const char* N, IReader* data, u32 dwFlags) VERIFY3(m_lod, "Cant create LOD model for", N); //. VERIFY2 (m_lod->Type==MT_HIERRARHY || m_lod->Type==MT_PROGRESSIVE || - //m_lod->Type==MT_NORMAL,lod_name.c_str()); + // m_lod->Type==MT_NORMAL,lod_name.c_str()); /* strconcat (name_load, short_name, ":lod:1"); m_lod = GlobalEnv.Render->model_CreateChild(name_load,LD); @@ -441,7 +441,7 @@ void CKinematics::Depart() u32 count = bones->size(); #ifdef DEBUG if (count > 64) Msg("ahtung !!! %d", count); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG for (u32 b = 0; b < count; b++) visimask.set((u64(1) << b), TRUE); } @@ -583,7 +583,7 @@ DEFINE_VECTOR(Fobb, OBBVec, OBBVecIt); bool CKinematics::PickBone(const Fmatrix& parent_xform, IKinematics::pick_result& r, float dist, const Fvector& start, const Fvector& dir, u16 bone_id) { - Fvector S, D; // normal = {0,0,0} + Fvector S, D; // normal = {0,0,0} // transform ray from world to model Fmatrix P; P.invert(parent_xform); diff --git a/src/Layers/xrRender/SkeletonCustom.h b/src/Layers/xrRender/SkeletonCustom.h index d80097111de..0a4a18ff98c 100644 --- a/src/Layers/xrRender/SkeletonCustom.h +++ b/src/Layers/xrRender/SkeletonCustom.h @@ -24,19 +24,19 @@ struct UCalc_mtlock #pragma warning(push) #pragma warning(disable : 4275) -class CSkeletonWallmark : public intrusive_base // 4+4+4+12+4+16+16 = 60 + 4 = 64 +class CSkeletonWallmark : public intrusive_base // 4+4+4+12+4+16+16 = 60 + 4 = 64 { #pragma warning(pop) - CKinematics* m_Parent; // 4 - const Fmatrix* m_XForm; // 4 - ref_shader m_Shader; // 4 - Fvector3 m_ContactPoint; // 12 model space - float m_fTimeStart; // 4 + CKinematics* m_Parent; // 4 + const Fmatrix* m_XForm; // 4 + ref_shader m_Shader; // 4 + Fvector3 m_ContactPoint; // 12 model space + float m_fTimeStart; // 4 public: #ifdef DEBUG u32 used_in_render; #endif - Fsphere m_LocalBounds; // 16 model space + Fsphere m_LocalBounds; // 16 model space struct WMFace { Fvector3 vert[3]; @@ -45,9 +45,9 @@ class CSkeletonWallmark : public intrusive_base // 4+4+4+12+4+16+16 = 60 + 4 = float weight[3]; }; DEFINE_VECTOR(WMFace, WMFacesVec, WMFacesVecIt); - WMFacesVec m_Faces; // 16 + WMFacesVec m_Faces; // 16 public: - Fsphere m_Bounds; // 16 world space + Fsphere m_Bounds; // 16 world space public: CSkeletonWallmark(CKinematics* p, const Fmatrix* m, ref_shader s, const Fvector& cp, float ts) : m_Parent(p), m_XForm(m), m_Shader(s), m_fTimeStart(ts), m_ContactPoint(cp) @@ -125,13 +125,13 @@ class CKinematics : public FHierrarhyVisual, public IKinematics // Globals CInifile* pUserData; - CBoneInstance* bone_instances; // bone instances - vecBones* bones; // all bones (shared) - u16 iRoot; // Root bone index + CBoneInstance* bone_instances; // bone instances + vecBones* bones; // all bones (shared) + u16 iRoot; // Root bone index // Fast search - accel* bone_map_N; // bones associations (shared) - sorted by name - accel* bone_map_P; // bones associations (shared) - sorted by name-pointer + accel* bone_map_N; // bones associations (shared) - sorted by name + accel* bone_map_P; // bones associations (shared) - sorted by name-pointer BOOL Update_Visibility; u32 UCalc_Time; @@ -226,7 +226,7 @@ class CKinematics : public FHierrarhyVisual, public IKinematics ICF Fmatrix& LL_GetTransform_R(u16 bone_id) { return LL_GetBoneInstance(bone_id).mRenderTransform; - } // rendering only + } // rendering only Fobb& LL_GetBox(u16 bone_id) { VERIFY(bone_id < LL_BoneCount()); @@ -253,7 +253,7 @@ class CKinematics : public FHierrarhyVisual, public IKinematics void LL_SetBonesVisible(u64 mask); // Main functionality - virtual void CalculateBones(BOOL bForceExact = FALSE); // Recalculate skeleton + virtual void CalculateBones(BOOL bForceExact = FALSE); // Recalculate skeleton void CalculateBones_Invalidate(); void Callback(UpdateCallback C, void* Param) { diff --git a/src/Layers/xrRender/SkeletonRigid.cpp b/src/Layers/xrRender/SkeletonRigid.cpp index 842c30dbd6b..e1a0c162ad7 100644 --- a/src/Layers/xrRender/SkeletonRigid.cpp +++ b/src/Layers/xrRender/SkeletonRigid.cpp @@ -15,10 +15,10 @@ void CKinematics::CalculateBones(BOOL bForceExact) // early out. // check if the info is still relevant // skip all the computations - assume nothing changes in a small period of time :) - if (RDEVICE.dwTimeGlobal == UCalc_Time) return; // early out for "fast" update + if (RDEVICE.dwTimeGlobal == UCalc_Time) return; // early out for "fast" update UCalc_mtlock lock; OnCalculateBones(); - if (!bForceExact && (RDEVICE.dwTimeGlobal < (UCalc_Time + UCalc_Interval))) return; // early out for "slow" update + if (!bForceExact && (RDEVICE.dwTimeGlobal < (UCalc_Time + UCalc_Interval))) return; // early out for "slow" update if (Update_Visibility) Visibility_Update(); _DBG_SINGLE_USE_MARKER; @@ -153,12 +153,12 @@ void CKinematics::CLBone(const CBoneData* bd, CBoneInstance& bi, const Fmatrix* BuildBoneMatrix(bd, bi, parent, channel_mask); #ifndef MASTER_GOLD R_ASSERT2(_valid(bi.mTransform), "anim kils bone matrix"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD if (bi.callback()) { bi.callback()(&bi); #ifndef MASTER_GOLD R_ASSERT2(_valid(bi.mTransform), make_string("callback kils bone matrix bone: %s ", bd->name.c_str())); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } bi.mRenderTransform.mul_43(bi.mTransform, bd->m2b_transform); diff --git a/src/Layers/xrRender/SkeletonX.cpp b/src/Layers/xrRender/SkeletonX.cpp index 259ed62ed72..0d002eced84 100644 --- a/src/Layers/xrRender/SkeletonX.cpp +++ b/src/Layers/xrRender/SkeletonX.cpp @@ -51,7 +51,7 @@ void CSkeletonX::_Copy(CSkeletonX* B) #if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL) m_Indices = B->m_Indices; -#endif // USE_DX10 +#endif // USE_DX10 } ////////////////////////////////////////////////////////////////////// void CSkeletonX::_Render(ref_geom& hGeom, u32 vCount, u32 iOffset, u32 pCount) @@ -118,34 +118,34 @@ void CSkeletonX::_Render_soft(ref_geom& hGeom, u32 vCount, u32 iOffset, u32 pCou RImplementation.BasicStats.Skinning.Begin(); if (*Vertices1W) { - Skin1W(Dest, // dest - *Vertices1W, // source - vCount, // count - Parent->bone_instances // bones + Skin1W(Dest, // dest + *Vertices1W, // source + vCount, // count + Parent->bone_instances // bones ); } else if (*Vertices2W) { - Skin2W(Dest, // dest - *Vertices2W, // source - vCount, // count - Parent->bone_instances // bones + Skin2W(Dest, // dest + *Vertices2W, // source + vCount, // count + Parent->bone_instances // bones ); } else if (*Vertices3W) { - Skin3W(Dest, // dest - *Vertices3W, // source - vCount, // count - Parent->bone_instances // bones + Skin3W(Dest, // dest + *Vertices3W, // source + vCount, // count + Parent->bone_instances // bones ); } else if (*Vertices4W) { - Skin4W(Dest, // dest - *Vertices4W, // source - vCount, // count - Parent->bone_instances // bones + Skin4W(Dest, // dest + *Vertices4W, // source + vCount, // count + Parent->bone_instances // bones ); } else @@ -173,7 +173,7 @@ void CSkeletonX::_Load(const char* N, IReader* data, u32& dwVertCount) #if RENDER == R_R1 if (ps_r1_SoftwareSkinning == 1) hw_bones_cnt = 0; -#endif // RENDER == R_R1 +#endif // RENDER == R_R1 u16 sw_bones_cnt = 0; #ifdef _EDITOR @@ -189,7 +189,7 @@ void CSkeletonX::_Load(const char* N, IReader* data, u32& dwVertCount) switch (dwVertType) { - case OGF_VERTEXFORMAT_FVF_1L: // 1-Link + case OGF_VERTEXFORMAT_FVF_1L: // 1-Link case 1: { size = dwVertCount * sizeof(vertBoned1W); @@ -232,7 +232,7 @@ void CSkeletonX::_Load(const char* N, IReader* data, u32& dwVertCount) #endif } break; - case OGF_VERTEXFORMAT_FVF_2L: // 2-Link + case OGF_VERTEXFORMAT_FVF_2L: // 2-Link case 2: { size = dwVertCount * sizeof(vertBoned2W); @@ -264,7 +264,7 @@ void CSkeletonX::_Load(const char* N, IReader* data, u32& dwVertCount) } } break; - case OGF_VERTEXFORMAT_FVF_3L: // 3-Link + case OGF_VERTEXFORMAT_FVF_3L: // 3-Link case 3: { size = dwVertCount * sizeof(vertBoned3W); @@ -294,7 +294,7 @@ void CSkeletonX::_Load(const char* N, IReader* data, u32& dwVertCount) } } break; - case OGF_VERTEXFORMAT_FVF_4L: // 4-Link + case OGF_VERTEXFORMAT_FVF_4L: // 4-Link case 4: { size = dwVertCount * sizeof(vertBoned4W); @@ -573,4 +573,4 @@ void CSkeletonX::_DuplicateIndices(const char* N, IReader* data) u32 crc = crc32(data->pointer(), size); m_Indices.create(crc, iCount, (u16*)data->pointer()); } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/SkeletonX.h b/src/Layers/xrRender/SkeletonX.h index 273927a9b78..f48507a7627 100644 --- a/src/Layers/xrRender/SkeletonX.h +++ b/src/Layers/xrRender/SkeletonX.h @@ -33,12 +33,12 @@ class CSkeletonX RM_SKINNING_4B }; - CKinematics* Parent; // setted up by parent - ref_smem Vertices1W; // shared - ref_smem Vertices2W; // shared - ref_smem Vertices3W; // shared - ref_smem Vertices4W; // shared - ref_smem BonesUsed; // actual bones which have influence on vertices + CKinematics* Parent; // setted up by parent + ref_smem Vertices1W; // shared + ref_smem Vertices2W; // shared + ref_smem Vertices3W; // shared + ref_smem Vertices4W; // shared + ref_smem BonesUsed; // actual bones which have influence on vertices u16 RenderMode; u16 ChildIDX; @@ -47,13 +47,13 @@ class CSkeletonX union { struct - { // soft-skinning only + { // soft-skinning only u32 cache_DiscardID; u32 cache_vCount; u32 cache_vOffset; }; - u32 RMS_boneid; // single-bone-rendering - u32 RMS_bonecount; // skinning, maximal bone ID + u32 RMS_boneid; // single-bone-rendering + u32 RMS_bonecount; // skinning, maximal bone ID }; void _Copy(CSkeletonX* V); @@ -122,7 +122,7 @@ class CSkeletonX // Index buffer replica since we can't read from index buffer in DX10 ref_smem m_Indices; -#endif // USE_DX10 +#endif // USE_DX10 }; template @@ -166,6 +166,6 @@ BOOL pick_bone(CKinematics* Parent, IKinematics::pick_result& r, float dist, con CHK_DX(V->p_rm_Vertices->Unlock()); return intersect; } -#endif // USE_DX10 +#endif // USE_DX10 -#endif // SkeletonXH +#endif // SkeletonXH diff --git a/src/Layers/xrRender/SkeletonXVertRender.h b/src/Layers/xrRender/SkeletonXVertRender.h index 84196638751..20cc216ab1e 100644 --- a/src/Layers/xrRender/SkeletonXVertRender.h +++ b/src/Layers/xrRender/SkeletonXVertRender.h @@ -3,7 +3,7 @@ #pragma once #pragma pack(push, 2) -struct vertRender // T&B are not skinned, because in R2 skinning occurs always in hardware +struct vertRender // T&B are not skinned, because in R2 skinning occurs always in hardware { Fvector P; Fvector N; @@ -11,4 +11,4 @@ struct vertRender // T&B are not skinned, because in R2 skinning occurs always }; #pragma pack(pop) -#endif // SkeletonXVertRender_h_included \ No newline at end of file +#endif // SkeletonXVertRender_h_included \ No newline at end of file diff --git a/src/Layers/xrRender/Texture.cpp b/src/Layers/xrRender/Texture.cpp index 97bf725fc3c..c169771c92b 100644 --- a/src/Layers/xrRender/Texture.cpp +++ b/src/Layers/xrRender/Texture.cpp @@ -231,7 +231,7 @@ IC void TW_Iterate_2OP(ID3DTexture2D* t_dst, ID3DTexture2D* t_src0, ID3DTexture2 IC u32 it_gloss_rev(u32 d, u32 s) { - return color_rgba(color_get_A(s), // gloss + return color_rgba(color_get_A(s), // gloss color_get_B(d), color_get_G(d), color_get_R(d)); } IC u32 it_gloss_rev_base(u32 d, u32 s) @@ -239,29 +239,29 @@ IC u32 it_gloss_rev_base(u32 d, u32 s) u32 occ = color_get_A(d) / 3; u32 def = 8; u32 gloss = (occ * 1 + def * 3) / 4; - return color_rgba(gloss, // gloss + return color_rgba(gloss, // gloss color_get_B(d), color_get_G(d), color_get_R(d)); } IC u32 it_difference(u32 d, u32 orig, u32 ucomp) { - return color_rgba(128 + (int(color_get_R(orig)) - int(color_get_R(ucomp))) * 2, // R-error - 128 + (int(color_get_G(orig)) - int(color_get_G(ucomp))) * 2, // G-error - 128 + (int(color_get_B(orig)) - int(color_get_B(ucomp))) * 2, // B-error - 128 + (int(color_get_A(orig)) - int(color_get_A(ucomp))) * 2); // A-error + return color_rgba(128 + (int(color_get_R(orig)) - int(color_get_R(ucomp))) * 2, // R-error + 128 + (int(color_get_G(orig)) - int(color_get_G(ucomp))) * 2, // G-error + 128 + (int(color_get_B(orig)) - int(color_get_B(ucomp))) * 2, // B-error + 128 + (int(color_get_A(orig)) - int(color_get_A(ucomp))) * 2); // A-error } IC u32 it_height_rev(u32 d, u32 s) { - return color_rgba(color_get_A(d), // diff x - color_get_B(d), // diff y - color_get_G(d), // diff z - color_get_R(s)); // height + return color_rgba(color_get_A(d), // diff x + color_get_B(d), // diff y + color_get_G(d), // diff z + color_get_R(s)); // height } IC u32 it_height_rev_base(u32 d, u32 s) { - return color_rgba(color_get_A(d), // diff x - color_get_B(d), // diff y - color_get_G(d), // diff z - (color_get_R(s) + color_get_G(s) + color_get_B(s)) / 3); // height + return color_rgba(color_get_A(d), // diff x + color_get_B(d), // diff y + color_get_G(d), // diff z + (color_get_R(s) + color_get_G(s) + color_get_B(s)) / 3); // height } ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize) @@ -280,7 +280,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize) // make file name string_path fname; - xr_strcpy(fname, fRName); //. andy if (strext(fname)) *strext(fname)=0; + xr_strcpy(fname, fRName); //. andy if (strext(fname)) *strext(fname)=0; fix_texture_name(fname); IReader* S = NULL; // if (FS.exist(fn,"$game_textures$",fname, ".dds") && strstr(fname,"_bump")) goto _BUMP; @@ -309,7 +309,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize) S = FS.r_open(fn); #ifdef DEBUG Msg("* Loaded: %s[%d]", fn, S->length()); -#endif // DEBUG +#endif // DEBUG img_size = S->length(); R_ASSERT(S); HRESULT const result = D3DXGetImageInfoFromFileInMemory(S->pointer(), S->length(), &IMG); @@ -531,7 +531,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize) strconcat(sizeof(fnameB), fnameB, "$user$", fname, "_bumpX"); ref_texture t_temp = Resources->_CreateTexture(fnameB); t_temp->surface_set(T_normal_2C); - _RELEASE(T_normal_2C); // texture should keep reference to it by itself + _RELEASE(T_normal_2C); // texture should keep reference to it by itself #endif // T_normal_1C - normal.gloss, reversed // T_normal_2C - 2*error.height, non-reversed diff --git a/src/Layers/xrRender/TextureDescrManager.cpp b/src/Layers/xrRender/TextureDescrManager.cpp index 3e4678e5927..35f804ad3c6 100644 --- a/src/Layers/xrRender/TextureDescrManager.cpp +++ b/src/Layers/xrRender/TextureDescrManager.cpp @@ -28,7 +28,7 @@ void CTextureDescrMngr::LoadTHM(LPCSTR initial) FS.file_list(flist, initial, FS_ListFiles, "*.thm"); #ifdef DEBUG Msg("count of .thm files=%d", flist.size()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG FS_FileSetIt It = flist.begin(); FS_FileSetIt It_e = flist.end(); STextureParams tp; @@ -92,14 +92,14 @@ void CTextureDescrMngr::Load() #ifdef DEBUG CTimer TT; TT.Start(); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG LoadTHM("$game_textures$"); LoadTHM("$level$"); #ifdef DEBUG Msg("load time=%d ms", TT.GetElapsed_ms()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void CTextureDescrMngr::UnLoad() @@ -178,7 +178,7 @@ BOOL CTextureDescrMngr::GetDetailTexture(const shared_str& tex_name, LPCSTR& res texture_assoc* TA = I->second.m_assoc; res = TA->detail_name.c_str(); map_CS::const_iterator It2 = m_detail_scalers.find(tex_name); - CS = It2 == m_detail_scalers.end() ? 0 : It2->second; // TA->cs; + CS = It2 == m_detail_scalers.end() ? 0 : It2->second; // TA->cs; return TRUE; } } diff --git a/src/Layers/xrRender/Utils/dxHashHelper.cpp b/src/Layers/xrRender/Utils/dxHashHelper.cpp index e67f7352db9..ccea3a2466c 100644 --- a/src/Layers/xrRender/Utils/dxHashHelper.cpp +++ b/src/Layers/xrRender/Utils/dxHashHelper.cpp @@ -2,7 +2,7 @@ #include "stdafx.h" bool dxHashHelper::m_bTableReady = false; -u32 dxHashHelper::m_CrcTable[256]; // Lookup table array +u32 dxHashHelper::m_CrcTable[256]; // Lookup table array dxHashHelper::dxHashHelper() : m_uiCrcValue(0xffffffff) { diff --git a/src/Layers/xrRender/Utils/dxHashHelper.h b/src/Layers/xrRender/Utils/dxHashHelper.h index 006c5a2fcc0..48b7dd735dd 100644 --- a/src/Layers/xrRender/Utils/dxHashHelper.h +++ b/src/Layers/xrRender/Utils/dxHashHelper.h @@ -31,4 +31,4 @@ IC void dxHashHelper::AddData(const void* P, u32 len) } } -#endif // dxHashHelper_included \ No newline at end of file +#endif // dxHashHelper_included \ No newline at end of file diff --git a/src/Layers/xrRender/WallmarksEngine.cpp b/src/Layers/xrRender/WallmarksEngine.cpp index 567999275d0..84f8a3ed30b 100644 --- a/src/Layers/xrRender/WallmarksEngine.cpp +++ b/src/Layers/xrRender/WallmarksEngine.cpp @@ -56,8 +56,8 @@ CWallmarksEngine::CWallmarksEngine() : #ifdef CONFIG_PROFILE_LOCKS lock(MUTEX_PROFILE_ID(CWallmarksEngine)), -#endif // CONFIG_PROFILE_LOCKS - xrc("wallmarks") // XXX stats: add to statistics +#endif // CONFIG_PROFILE_LOCKS + xrc("wallmarks") // XXX stats: add to statistics { static_pool.reserve(256); marks.reserve(256); @@ -178,7 +178,7 @@ void CWallmarksEngine::RecurseTri(u32 t, Fmatrix& mView, CWallmarksEngine::stati Fvector test_normal; test_normal.mknormal(v_data[v_ids[0]], v_data[v_ids[1]], v_data[v_ids[2]]); float cosa = test_normal.dotproduct(sml_normal); - if (cosa < 0.034899f) continue; // cos(88) + if (cosa < 0.034899f) continue; // cos(88) RecurseTri(adj, mView, W); } } @@ -270,7 +270,7 @@ void CWallmarksEngine::AddWallmark_internal( for (; it != end; it++) { static_wallmark* wm = *it; - if (wm->bounds.P.similar(W->bounds.P, 0.02f)) { // replace + if (wm->bounds.P.similar(W->bounds.P, 0.02f)) { // replace static_wm_destroy(wm); *it = W; return; @@ -379,7 +379,7 @@ void CWallmarksEngine::Render() float ssaCLIP = r_ssaDISCARD / 4; - lock.Enter(); // Physics may add wallmarks in parallel with rendering + lock.Enter(); // Physics may add wallmarks in parallel with rendering for (WMSlotVecIt slot_it = marks.begin(); slot_it != marks.end(); slot_it++) { @@ -404,7 +404,7 @@ void CWallmarksEngine::Render() } static_wm_render(W, w_verts); } - W->ttl -= 0.1f * Device.fTimeDelta; // visible wallmarks fade much slower + W->ttl -= 0.1f * Device.fTimeDelta; // visible wallmarks fade much slower } else { @@ -422,7 +422,7 @@ void CWallmarksEngine::Render() } // Flush stream RImplementation.BasicStats.WMTriCount += FlushStream( - hGeom, slot->shader, w_offset, w_verts, w_start, FALSE); //. remove line if !(suppress cull needed) + hGeom, slot->shader, w_offset, w_verts, w_start, FALSE); //. remove line if !(suppress cull needed) BeginStream(hGeom, w_offset, w_verts, w_start); // dynamic wallmarks @@ -473,7 +473,7 @@ void CWallmarksEngine::Render() RImplementation.BasicStats.WMTriCount += FlushStream(hGeom, slot->shader, w_offset, w_verts, w_start, TRUE); } - lock.Leave(); // Physics may add wallmarks in parallel with rendering + lock.Leave(); // Physics may add wallmarks in parallel with rendering // Level-wmarks RImplementation.r_dsgraph_render_wmarks(); diff --git a/src/Layers/xrRender/blenders/Blender.cpp b/src/Layers/xrRender/blenders/Blender.cpp index 704922d8b6d..e9c131a7c5a 100644 --- a/src/Layers/xrRender/blenders/Blender.cpp +++ b/src/Layers/xrRender/blenders/Blender.cpp @@ -18,13 +18,13 @@ void CBlender_DESC::Setup(LPCSTR N) xr_strcpy(cName, N); strlwr(cName); - xr_strcpy(cComputer, Core.CompName); // Computer + xr_strcpy(cComputer, Core.CompName); // Computer #ifndef _EDITOR _tzset(); - _time32((__time32_t*)&cTime); // Time + _time32((__time32_t*)&cTime); // Time #else _tzset(); - time((long*)&cTime); // Time + time((long*)&cTime); // Time #endif }; diff --git a/src/Layers/xrRender/blenders/Blender.h b/src/Layers/xrRender/blenders/Blender.h index a3113572ae3..44f4bcf6c63 100644 --- a/src/Layers/xrRender/blenders/Blender.h +++ b/src/Layers/xrRender/blenders/Blender.h @@ -68,4 +68,4 @@ class ECORE_API IBlender : public CPropertyBase }; #pragma pack(pop) -#endif // !defined(AFX_BLENDER_H__A023332E_C09B_4D93_AA53_57C052CCC075__INCLUDED_) +#endif // !defined(AFX_BLENDER_H__A023332E_C09B_4D93_AA53_57C052CCC075__INCLUDED_) diff --git a/src/Layers/xrRender/blenders/Blender_Recorder.cpp b/src/Layers/xrRender/blenders/Blender_Recorder.cpp index c45b52cf9dc..906d9642062 100644 --- a/src/Layers/xrRender/blenders/Blender_Recorder.cpp +++ b/src/Layers/xrRender/blenders/Blender_Recorder.cpp @@ -175,7 +175,7 @@ void CBlender_Compile::PassEnd() proto.cs = RImplementation.Resources->_CreateCS(pass_cs); ctable.merge(&proto.cs->constants); #endif -#endif // USE_DX10 +#endif // USE_DX10 SetMapping(); proto.constants = RImplementation.Resources->_CreateConstantTable(ctable); proto.T = RImplementation.Resources->_CreateTextureList(passTextures); @@ -225,7 +225,7 @@ void CBlender_Compile::PassSET_ablend_mode(BOOL bABlend, u32 abSRC, u32 abDST) // alpha in DX10 identical to color. RS.SetRS(D3DRS_SRCBLENDALPHA, bABlend ? abSRC : D3DBLEND_ONE); RS.SetRS(D3DRS_DESTBLENDALPHA, bABlend ? abDST : D3DBLEND_ZERO); -#endif // USE_DX10 +#endif // USE_DX10 } void CBlender_Compile::PassSET_ablend_aref(BOOL bATest, u32 aRef) { @@ -256,7 +256,7 @@ void CBlender_Compile::PassSET_LightFog(BOOL bLight, BOOL bFog) // void CBlender_Compile::StageBegin() { - StageSET_Address(D3DTADDRESS_WRAP); // Wrapping enabled by default + StageSET_Address(D3DTADDRESS_WRAP); // Wrapping enabled by default } void CBlender_Compile::StageEnd() { @@ -316,7 +316,7 @@ void CBlender_Compile::Stage_Texture(LPCSTR name, u32, u32 fmin, u32 fmip, u32 f // i_Address (Stage(),address); i_Filter(Stage(), fmin, fmip, fmag); } -#endif // USE_DX10 +#endif // USE_DX10 void CBlender_Compile::Stage_Matrix(LPCSTR name, int iChannel) { sh_list& lst = L_matrices; diff --git a/src/Layers/xrRender/blenders/Blender_Recorder.h b/src/Layers/xrRender/blenders/Blender_Recorder.h index a15baedc143..8320f8c18ee 100644 --- a/src/Layers/xrRender/blenders/Blender_Recorder.h +++ b/src/Layers/xrRender/blenders/Blender_Recorder.h @@ -60,7 +60,7 @@ class CBlender_Compile string128 pass_ds; string128 pass_cs; #endif -#endif // USE_DX10 +#endif // USE_DX10 u32 BC(BOOL v) { return v ? 0x01 : 0; } public: @@ -112,7 +112,7 @@ class CBlender_Compile void Stage_Texture(LPCSTR name, u32 address = D3DTADDRESS_WRAP, u32 fmin = D3DTEXF_LINEAR, u32 fmip = D3DTEXF_LINEAR, u32 fmag = D3DTEXF_LINEAR); void StageTemplate_LMAP0(); -#endif // USE_DX10 +#endif // USE_DX10 void Stage_Matrix(LPCSTR name, int UVW_channel); void Stage_Constant(LPCSTR name); void StageEnd(); @@ -126,7 +126,7 @@ class CBlender_Compile void i_dx10FilterAnizo(u32 s, BOOL value); void i_dx10Filter(u32 s, u32 _min, u32 _mip, u32 _mag); void i_dx10BorderColor(u32 s, u32 color); -#else // USE_DX10 +#else // USE_DX10 u32 i_Sampler(LPCSTR name); void i_Texture(u32 s, LPCSTR name); void i_Projective(u32 s, bool b); @@ -136,7 +136,7 @@ class CBlender_Compile void i_Filter_Mag(u32 s, u32 f); void i_Filter(u32 s, u32 _min, u32 _mip, u32 _mag); void i_BorderColor(u32 s, u32 color); -#endif // USE_DX10 +#endif // USE_DX10 // R1/R2-compiler [programmable] - templates void r_Pass(LPCSTR vs, LPCSTR ps, bool bFog, BOOL bZtest = TRUE, BOOL bZwrite = TRUE, BOOL bABlend = FALSE, @@ -163,7 +163,7 @@ class CBlender_Compile return r_dx10Texture(ResourceName, texture.c_str()); }; u32 r_dx10Sampler(LPCSTR ResourceName); -#else // USE_DX10 +#else // USE_DX10 u32 r_Sampler(LPCSTR name, LPCSTR texture, bool b_ps1x_ProjectiveDivide = false, u32 address = D3DTADDRESS_WRAP, u32 fmin = D3DTEXF_LINEAR, u32 fmip = D3DTEXF_LINEAR, u32 fmag = D3DTEXF_LINEAR); u32 r_Sampler(LPCSTR name, shared_str texture, bool b_ps1x_ProjectiveDivide = false, u32 address = D3DTADDRESS_WRAP, @@ -174,7 +174,7 @@ class CBlender_Compile void r_Sampler_rtf(LPCSTR name, LPCSTR texture, bool b_ps1x_ProjectiveDivide = false); void r_Sampler_clf(LPCSTR name, LPCSTR texture, bool b_ps1x_ProjectiveDivide = false); void r_Sampler_clw(LPCSTR name, LPCSTR texture, bool b_ps1x_ProjectiveDivide = false); -#endif // USE_DX10 +#endif // USE_DX10 void r_ColorWriteEnable(bool cR = true, bool cG = true, bool cB = true, bool cA = true); void r_End(); @@ -188,4 +188,4 @@ class CBlender_Compile }; #pragma pack(pop) -#endif // !defined(AFX_BLENDER_RECORDER_H__1F549674_8674_4EB2_95E6_E6BC19218A6C__INCLUDED_) +#endif // !defined(AFX_BLENDER_RECORDER_H__1F549674_8674_4EB2_95E6_E6BC19218A6C__INCLUDED_) diff --git a/src/Layers/xrRender/doug_lea_memory_allocator.c b/src/Layers/xrRender/doug_lea_memory_allocator.c index 3dc9d5ff5a6..4c99008478f 100644 --- a/src/Layers/xrRender/doug_lea_memory_allocator.c +++ b/src/Layers/xrRender/doug_lea_memory_allocator.c @@ -439,7 +439,7 @@ DEFAULT_MMAP_THRESHOLD default: 256K */ #ifdef DEBUG #undef DEBUG -#endif // DEBUG +#endif // DEBUG #ifndef WIN32 #ifdef _WIN32 @@ -1413,7 +1413,7 @@ static int win32_acquire_lock(MLOCK_T* sl) { #ifdef InterlockedCompareExchangePointer if (!InterlockedCompareExchange(sl, 1, 0)) return 0; -#else /* Use older void* version */ +#else /* Use older void* version */ if (!InterlockedCompareExchange((void**)sl, (void*)1, (void*)0)) return 0; #endif /* InterlockedCompareExchangePointer */ Sleep(0); diff --git a/src/Layers/xrRender/doug_lea_memory_allocator.h b/src/Layers/xrRender/doug_lea_memory_allocator.h index 1f60fd3a0d9..ea1841a8473 100644 --- a/src/Layers/xrRender/doug_lea_memory_allocator.h +++ b/src/Layers/xrRender/doug_lea_memory_allocator.h @@ -187,8 +187,8 @@ size_t dlmalloc_footprint(); be kept as longs, the reported values may wrap around zero and thus be inaccurate. */ -#if 1 // ndef HAVE_USR_INCLUDE_MALLOC_H -#if 1 // ndef _MALLOC_H +#if 1 // ndef HAVE_USR_INCLUDE_MALLOC_H +#if 1 // ndef _MALLOC_H #ifndef MALLINFO_FIELD_TYPE #define MALLINFO_FIELD_TYPE size_t #endif /* MALLINFO_FIELD_TYPE */ diff --git a/src/Layers/xrRender/du_box.cpp b/src/Layers/xrRender/du_box.cpp index 5b4ba355cd9..07dd28d6086 100644 --- a/src/Layers/xrRender/du_box.cpp +++ b/src/Layers/xrRender/du_box.cpp @@ -20,8 +20,8 @@ Fvector du_box_vertices[DU_BOX_NUMVERTEX] = { }; WORD du_box_faces[DU_BOX_NUMFACES * 3] = { - 0, 1, 2, 2, 3, 0, 3, 2, 6, 6, 7, 3, 6, 4, 5, 6, 5, 7, 4, 1, 5, 1, 0, 5, 3, 5, 0, 3, 7, 5, // bottom - 1, 4, 6, 1, 6, 2 // top + 0, 1, 2, 2, 3, 0, 3, 2, 6, 6, 7, 3, 6, 4, 5, 6, 5, 7, 4, 1, 5, 1, 0, 5, 3, 5, 0, 3, 7, 5, // bottom + 1, 4, 6, 1, 6, 2 // top }; WORD du_box_lines[DU_BOX_NUMLINES * 2] = {0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 7, 6, 7, 6, 4, 0, 5, 1, 4, 2, 6, 3, 7}; diff --git a/src/Layers/xrRender/du_cylinder.cpp b/src/Layers/xrRender/du_cylinder.cpp index ab69571990d..437aba2c441 100644 --- a/src/Layers/xrRender/du_cylinder.cpp +++ b/src/Layers/xrRender/du_cylinder.cpp @@ -6,32 +6,32 @@ //--------------------------------------------------------------------------- //#pragma package(smart_init) Fvector du_cylinder_vertices[DU_CYLINDER_NUMVERTEX] = { - {0.5000f, 0.0000f, 0.5000f}, // 0 - {0.5000f, -0.0000f, -0.5000f}, // 1 - {0.4330f, -0.2500f, -0.5000f}, // 2 - {0.4330f, -0.2500f, 0.5000f}, // 3 - {0.2500f, -0.4330f, -0.5000f}, // 4 - {0.2500f, -0.4330f, 0.5000f}, // 5 - {0.0000f, -0.5000f, -0.5000f}, // 6 - {-0.0000f, -0.5000f, 0.5000f}, // 7 - {-0.2500f, -0.4330f, -0.5000f}, // 8 - {-0.2500f, -0.4330f, 0.5000f}, // 9 - {-0.4330f, -0.2500f, -0.5000f}, // 10 - {-0.4330f, -0.2500f, 0.5000f}, // 11 - {-0.5000f, -0.0000f, -0.5000f}, // 12 - {-0.5000f, 0.0000f, 0.5000f}, // 13 - {-0.4330f, 0.2500f, -0.5000f}, // 14 - {-0.4330f, 0.2500f, 0.5000f}, // 15 - {-0.2500f, 0.4330f, -0.5000f}, // 16 - {-0.2500f, 0.4330f, 0.5000f}, // 17 - {0.0000f, 0.5000f, -0.5000f}, // 18 - {-0.0000f, 0.5000f, 0.5000f}, // 19 - {0.2500f, 0.4330f, -0.5000f}, // 20 - {0.2500f, 0.4330f, 0.5000f}, // 21 - {0.4330f, 0.2500f, -0.5000f}, // 22 - {0.4330f, 0.2500f, 0.5000f}, // 23 - {-0.0000f, 0.0000f, 0.5000f}, // 24 - {0.0000f, -0.0000f, -0.5000f}, // 25 + {0.5000f, 0.0000f, 0.5000f}, // 0 + {0.5000f, -0.0000f, -0.5000f}, // 1 + {0.4330f, -0.2500f, -0.5000f}, // 2 + {0.4330f, -0.2500f, 0.5000f}, // 3 + {0.2500f, -0.4330f, -0.5000f}, // 4 + {0.2500f, -0.4330f, 0.5000f}, // 5 + {0.0000f, -0.5000f, -0.5000f}, // 6 + {-0.0000f, -0.5000f, 0.5000f}, // 7 + {-0.2500f, -0.4330f, -0.5000f}, // 8 + {-0.2500f, -0.4330f, 0.5000f}, // 9 + {-0.4330f, -0.2500f, -0.5000f}, // 10 + {-0.4330f, -0.2500f, 0.5000f}, // 11 + {-0.5000f, -0.0000f, -0.5000f}, // 12 + {-0.5000f, 0.0000f, 0.5000f}, // 13 + {-0.4330f, 0.2500f, -0.5000f}, // 14 + {-0.4330f, 0.2500f, 0.5000f}, // 15 + {-0.2500f, 0.4330f, -0.5000f}, // 16 + {-0.2500f, 0.4330f, 0.5000f}, // 17 + {0.0000f, 0.5000f, -0.5000f}, // 18 + {-0.0000f, 0.5000f, 0.5000f}, // 19 + {0.2500f, 0.4330f, -0.5000f}, // 20 + {0.2500f, 0.4330f, 0.5000f}, // 21 + {0.4330f, 0.2500f, -0.5000f}, // 22 + {0.4330f, 0.2500f, 0.5000f}, // 23 + {-0.0000f, 0.0000f, 0.5000f}, // 24 + {0.0000f, -0.0000f, -0.5000f}, // 25 }; u16 du_cylinder_faces[DU_CYLINDER_NUMFACES * 3] = { diff --git a/src/Layers/xrRender/du_cylinder.h b/src/Layers/xrRender/du_cylinder.h index 1485e6628bf..47a298fad20 100644 --- a/src/Layers/xrRender/du_cylinder.h +++ b/src/Layers/xrRender/du_cylinder.h @@ -5,7 +5,7 @@ //--------------------------------------------------------------------------- #define DU_CYLINDER_NUMVERTEX 26 #define DU_CYLINDER_NUMFACES 48 -#define DU_CYLINDER_NUMLINES 30 // 36 +#define DU_CYLINDER_NUMLINES 30 // 36 extern ECORE_API Fvector du_cylinder_vertices[]; extern ECORE_API u16 du_cylinder_faces[]; extern ECORE_API u16 du_cylinder_lines[]; diff --git a/src/Layers/xrRender/dxApplicationRender.cpp b/src/Layers/xrRender/dxApplicationRender.cpp index 7f2f7b55672..3f545f99e24 100644 --- a/src/Layers/xrRender/dxApplicationRender.cpp +++ b/src/Layers/xrRender/dxApplicationRender.cpp @@ -46,14 +46,14 @@ void dxApplicationRender::load_draw_internal(CApplication& owner) RImplementation.rmNormal(); RCache.set_RT(HW.pBaseRT); RCache.set_ZB(HW.pBaseZB); -#endif // USE_DX10 +#endif // USE_DX10 #if defined(USE_DX10) || defined(USE_DX11) FLOAT ColorRGBA[4] = {0.0f, 0.0f, 0.0f, 0.0f}; HW.pContext->ClearRenderTargetView(RCache.get_RT(), ColorRGBA); -#else // USE_DX10 +#else // USE_DX10 CHK_DX(HW.pDevice->Clear(0, 0, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0, 0, 0, 0), 1, 0)); -#endif // USE_DX10 +#endif // USE_DX10 if (!sh_progress) { return; @@ -64,13 +64,13 @@ void dxApplicationRender::load_draw_internal(CApplication& owner) // FLOAT ColorRGBA[4] = {0.0f, 0.0f, 1.0f, 0.0f}; // HW.pContext->ClearRenderTargetView( RCache.get_RT(), ColorRGBA); // HW.pContext->ClearDepthStencilView( RCache.get_ZB(), D3D_CLEAR_DEPTH|D3D_CLEAR_STENCIL, 1.0f, 0); -#endif // USE_DX10 +#endif // USE_DX10 float _w = (float)Device.dwWidth; float _h = (float)Device.dwHeight; bool b_ws = (_w / _h) > 1.34f; bool b_16x9 = b_ws && ((_w / _h) > 1.77f); - float ws_k = (b_16x9) ? 0.75f : 0.8333f; // 16:9 or 16:10 + float ws_k = (b_16x9) ? 0.75f : 0.8333f; // 16:9 or 16:10 float ws_w = b_ws ? (b_16x9 ? 171.0f : 102.6f) : 0.0f; float bw = 1024.0f; @@ -89,7 +89,7 @@ void dxApplicationRender::load_draw_internal(CApplication& owner) Fvector2 back_offset; if (b_ws) - back_offset.set(ws_w * ws_k, 0.0f); // ws_w == 171 + back_offset.set(ws_w * ws_k, 0.0f); // ws_w == 171 else back_offset.set(0.0f, 0.0f); @@ -97,7 +97,7 @@ void dxApplicationRender::load_draw_internal(CApplication& owner) back_tex_size.set(506, 4); back_size.set(506, 4); - if (b_ws) back_size.x *= ws_k; // ws + if (b_ws) back_size.x *= ws_k; // ws back_tex_coords.lt.set(0, 772); back_tex_coords.rb.add(back_tex_coords.lt, back_tex_size); @@ -146,7 +146,7 @@ void dxApplicationRender::load_draw_internal(CApplication& owner) back_tex_size.set(1024, 768); back_size.set(1024, 768); - if (b_ws) back_size.x *= ws_k; // ws + if (b_ws) back_size.x *= ws_k; // ws back_tex_coords.lt.set(0, 0); back_tex_coords.rb.add(back_tex_coords.lt, back_tex_size); @@ -159,7 +159,7 @@ void dxApplicationRender::load_draw_internal(CApplication& owner) back_coords.rb.mul(k); draw_face(sh_progress, back_coords, back_tex_coords, tsz); - if (b_ws) // draw additional frames (left&right) + if (b_ws) // draw additional frames (left&right) { // left back_size.set(ws_w * ws_k, 768.0f); @@ -227,7 +227,7 @@ void dxApplicationRender::load_draw_internal(CApplication& owner) r.lt.y += offs; back_size.set(1024, 399); - if (b_ws) back_size.x *= ws_k; // ws 0.625 + if (b_ws) back_size.x *= ws_k; // ws 0.625 r.rb.add(r.lt, back_size); r.lt.mul(k); @@ -316,7 +316,7 @@ void draw_multiline_text(CGameFont* F, float fTargetWidth, LPCSTR pszText) strncpy_s(buff + xr_strlen(buff), sizeof(buff) - xr_strlen(buff), ch, next_word - ch); ch = next_word; } - if (0 == *next_word) // end of text + if (0 == *next_word) // end of text { strncpy_s(buff + xr_strlen(buff), sizeof(buff) - xr_strlen(buff), ch, next_word - ch); F->OutNext(buff); diff --git a/src/Layers/xrRender/dxApplicationRender.h b/src/Layers/xrRender/dxApplicationRender.h index 9223b1c540d..664698bdccf 100644 --- a/src/Layers/xrRender/dxApplicationRender.h +++ b/src/Layers/xrRender/dxApplicationRender.h @@ -26,4 +26,4 @@ class dxApplicationRender : public IApplicationRender void draw_face(ref_shader& sh, Frect& coords, Frect& tex_coords, const Fvector2& tex_size); }; -#endif // ApplicationRender_included \ No newline at end of file +#endif // ApplicationRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxConsoleRender.cpp b/src/Layers/xrRender/dxConsoleRender.cpp index b7ae0c4151c..fe04e39a60d 100644 --- a/src/Layers/xrRender/dxConsoleRender.cpp +++ b/src/Layers/xrRender/dxConsoleRender.cpp @@ -39,7 +39,7 @@ void dxConsoleRender::OnRender(bool bGame) RCache.set_Geometry(m_Geom); RCache.Render(D3DPT_TRIANGLELIST, vOffset, 0, 4, 0, 2); -#else // USE_DX10 +#else // USE_DX10 CHK_DX(HW.pDevice->Clear(1, &R, D3DCLEAR_TARGET, color_xrgb(32, 32, 32), 1, 0)); -#endif // USE_DX10 +#endif // USE_DX10 } \ No newline at end of file diff --git a/src/Layers/xrRender/dxConsoleRender.h b/src/Layers/xrRender/dxConsoleRender.h index 35b1deea5d0..1c404c61fa3 100644 --- a/src/Layers/xrRender/dxConsoleRender.h +++ b/src/Layers/xrRender/dxConsoleRender.h @@ -19,4 +19,4 @@ class dxConsoleRender : public IConsoleRender #endif }; -#endif // ConsoleRender_included \ No newline at end of file +#endif // ConsoleRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxDebugRender.cpp b/src/Layers/xrRender/dxDebugRender.cpp index 054a4a3a038..44a08d3dacb 100644 --- a/src/Layers/xrRender/dxDebugRender.cpp +++ b/src/Layers/xrRender/dxDebugRender.cpp @@ -74,7 +74,7 @@ void dxDebugRender::NextSceneMode() // This mode is not supported in DX10 #ifndef USE_DX10 HW.Caps.SceneMode = (HW.Caps.SceneMode + 1) % 3; -#endif // USE_DX10 +#endif // USE_DX10 } void dxDebugRender::ZEnable(bool bEnable) @@ -108,9 +108,9 @@ void dxDebugRender::SetAmbient(u32 colour) #if defined(USE_DX10) || defined(USE_DX11) // TODO: DX10: Check if need this for DX10 VERIFY(!"Not implemented for DX10"); -#else // USE_DX10 +#else // USE_DX10 CHK_DX(HW.pDevice->SetRenderState(D3DRS_AMBIENT, colour)); -#endif // USE_DX10 +#endif // USE_DX10 } void dxDebugRender::SetDebugShader(dbgShaderHandle shdHandle) @@ -118,7 +118,7 @@ void dxDebugRender::SetDebugShader(dbgShaderHandle shdHandle) R_ASSERT(shdHandle < dbgShaderCount); static const LPCSTR dbgShaderParams[][2] = { - {"hud\\default", "ui\\ui_pop_up_active_back"}, // dbgShaderWindow + {"hud\\default", "ui\\ui_pop_up_active_back"}, // dbgShaderWindow }; if (!m_dbgShaders[shdHandle]) @@ -172,4 +172,4 @@ struct RDebugRender : public dxDebugRender, public pureRender } rdebug_render_impl; dxDebugRender* rdebug_render = &rdebug_render_impl; -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/Layers/xrRender/dxDebugRender.h b/src/Layers/xrRender/dxDebugRender.h index ad45745eeb3..d259d3ab10e 100644 --- a/src/Layers/xrRender/dxDebugRender.h +++ b/src/Layers/xrRender/dxDebugRender.h @@ -30,7 +30,7 @@ class dxDebugRender : public IDebugRender #ifdef DEBUG virtual void dbg_DrawTRI(Fmatrix& T, Fvector& p1, Fvector& p2, Fvector& p3, u32 C); -#endif // DEBUG +#endif // DEBUG private: void try_render(u32 const& vertex_count, u32 const& index_count); @@ -56,6 +56,6 @@ class dxDebugRender : public IDebugRender extern dxDebugRender DebugRenderImpl; extern dxDebugRender* rdebug_render; -#endif // DEBUG +#endif // DEBUG -#endif // dxDebugRender_included \ No newline at end of file +#endif // dxDebugRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxEnvironmentRender.cpp b/src/Layers/xrRender/dxEnvironmentRender.cpp index 880690dd238..1da769157ac 100644 --- a/src/Layers/xrRender/dxEnvironmentRender.cpp +++ b/src/Layers/xrRender/dxEnvironmentRender.cpp @@ -8,15 +8,15 @@ ////////////////////////////////////////////////////////////////////////// // half box def static Fvector3 hbox_verts[24] = { - {-1.f, -1.f, -1.f}, {-1.f, -1.01f, -1.f}, // down - {1.f, -1.f, -1.f}, {1.f, -1.01f, -1.f}, // down - {-1.f, -1.f, 1.f}, {-1.f, -1.01f, 1.f}, // down - {1.f, -1.f, 1.f}, {1.f, -1.01f, 1.f}, // down + {-1.f, -1.f, -1.f}, {-1.f, -1.01f, -1.f}, // down + {1.f, -1.f, -1.f}, {1.f, -1.01f, -1.f}, // down + {-1.f, -1.f, 1.f}, {-1.f, -1.01f, 1.f}, // down + {1.f, -1.f, 1.f}, {1.f, -1.01f, 1.f}, // down {-1.f, 2.f, -1.f}, {-1.f, 1.f, -1.f}, {1.f, 2.f, -1.f}, {1.f, 1.f, -1.f}, {-1.f, 2.f, 1.f}, {-1.f, 1.f, 1.f}, - {1.f, 2.f, 1.f}, {1.f, 1.f, 1.f}, {-1.f, 0.f, -1.f}, {-1.f, -1.f, -1.f}, // half - {1.f, 0.f, -1.f}, {1.f, -1.f, -1.f}, // half - {1.f, 0.f, 1.f}, {1.f, -1.f, 1.f}, // half - {-1.f, 0.f, 1.f}, {-1.f, -1.f, 1.f} // half + {1.f, 2.f, 1.f}, {1.f, 1.f, 1.f}, {-1.f, 0.f, -1.f}, {-1.f, -1.f, -1.f}, // half + {1.f, 0.f, -1.f}, {1.f, -1.f, -1.f}, // half + {1.f, 0.f, 1.f}, {1.f, -1.f, 1.f}, // half + {-1.f, 0.f, 1.f}, {-1.f, -1.f, 1.f} // half }; static u16 hbox_faces[20 * 3] = {0, 2, 3, 3, 1, 0, 4, 5, 7, 7, 6, 4, 0, 1, 9, 9, 8, 0, 8, 9, 5, 5, 4, 8, 1, 3, 10, 10, 9, 1, 9, 10, 7, 7, 5, 9, 3, 2, 11, 11, 10, 3, 10, 11, 6, 6, 7, 10, 2, 0, 8, 8, 11, 2, 11, 8, 4, 4, 6, 11}; @@ -147,16 +147,16 @@ void dxEnvironmentRender::OnFrame(CEnvironment& env) //. very very ugly hack if (HW.Caps.raster_major >= 3 && HW.Caps.geometry.bVTF) { // tonemapping in VS - mixRen.sky_r_textures.push_back(mk_pair(u32(CTexture::rstVertex), tonemap)); //. hack - mixRen.sky_r_textures_env.push_back(mk_pair(u32(CTexture::rstVertex), tonemap)); //. hack - mixRen.clouds_r_textures.push_back(mk_pair(u32(CTexture::rstVertex), tonemap)); //. hack + mixRen.sky_r_textures.push_back(mk_pair(u32(CTexture::rstVertex), tonemap)); //. hack + mixRen.sky_r_textures_env.push_back(mk_pair(u32(CTexture::rstVertex), tonemap)); //. hack + mixRen.clouds_r_textures.push_back(mk_pair(u32(CTexture::rstVertex), tonemap)); //. hack } else { // tonemapping in PS - mixRen.sky_r_textures.push_back(mk_pair(2, tonemap)); //. hack - mixRen.sky_r_textures_env.push_back(mk_pair(2, tonemap)); //. hack - mixRen.clouds_r_textures.push_back(mk_pair(2, tonemap)); //. hack + mixRen.sky_r_textures.push_back(mk_pair(2, tonemap)); //. hack + mixRen.sky_r_textures_env.push_back(mk_pair(2, tonemap)); //. hack + mixRen.clouds_r_textures.push_back(mk_pair(2, tonemap)); //. hack } } @@ -172,24 +172,24 @@ void dxEnvironmentRender::OnFrame(CEnvironment& env) // ******************** Environment params (setting) #if defined(USE_DX10) || defined(USE_DX11) // TODO: DX10: Implement environment parameters setting for DX10 (if necessary) -#else // USE_DX10 +#else // USE_DX10 #if RENDER == R_R1 Fvector3 fog_color = env.CurrentEnv->fog_color; fog_color.mul(ps_r1_fog_luminance); -#else // RENDER==R_R1 +#else // RENDER==R_R1 Fvector3& fog_color = env.CurrentEnv->fog_color; -#endif // RENDER==R_R1 +#endif // RENDER==R_R1 CHK_DX(HW.pDevice->SetRenderState(D3DRS_FOGCOLOR, color_rgba_f(fog_color.x, fog_color.y, fog_color.z, 0))); CHK_DX(HW.pDevice->SetRenderState(D3DRS_FOGSTART, *(u32*)(&env.CurrentEnv->fog_near))); CHK_DX(HW.pDevice->SetRenderState(D3DRS_FOGEND, *(u32*)(&env.CurrentEnv->fog_far))); -#endif // USE_DX10 +#endif // USE_DX10 } void dxEnvironmentRender::OnLoad() { - tonemap = RImplementation.Resources->_CreateTexture("$user$tonemap"); //. hack + tonemap = RImplementation.Resources->_CreateTexture("$user$tonemap"); //. hack } void dxEnvironmentRender::OnUnload() diff --git a/src/Layers/xrRender/dxEnvironmentRender.h b/src/Layers/xrRender/dxEnvironmentRender.h index 4496e66bb7f..95e0f6a9a57 100644 --- a/src/Layers/xrRender/dxEnvironmentRender.h +++ b/src/Layers/xrRender/dxEnvironmentRender.h @@ -21,13 +21,13 @@ class CBlender_skybox : public IBlender C.r_dx10Texture("s_sky1", "$null"); C.r_dx10Sampler("smp_rtlinear"); // C.r_Sampler_rtf ("s_tonemap", "$user$tonemap" ); //. hack - C.r_dx10Texture("s_tonemap", "$user$tonemap"); //. hack + C.r_dx10Texture("s_tonemap", "$user$tonemap"); //. hack C.PassSET_ZB(FALSE, FALSE); -#else // USE_DX10 +#else // USE_DX10 C.r_Sampler_clf("s_sky0", "$null"); C.r_Sampler_clf("s_sky1", "$null"); - C.r_Sampler_rtf("s_tonemap", "$user$tonemap"); //. hack -#endif // USE_DX10 + C.r_Sampler_rtf("s_tonemap", "$user$tonemap"); //. hack +#endif // USE_DX10 C.r_End(); } }; @@ -91,4 +91,4 @@ class dxEnvironmentRender : public IEnvironmentRender ref_texture tsky0, tsky1; }; -#endif // EnvironmentRender_included \ No newline at end of file +#endif // EnvironmentRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxFontRender.cpp b/src/Layers/xrRender/dxFontRender.cpp index 846e9fecb38..ae953a58f31 100644 --- a/src/Layers/xrRender/dxFontRender.cpp +++ b/src/Layers/xrRender/dxFontRender.cpp @@ -91,11 +91,11 @@ void dxFontRender::OnRender(CGameFont& owner) } #if defined(USE_DX10) || defined(USE_DX11) || \ - defined(USE_OGL) // Vertex shader will cancel a DX9 correction, so make fake offset + defined(USE_OGL) // Vertex shader will cancel a DX9 correction, so make fake offset X -= 0.5f; Y -= 0.5f; Y2 -= 0.5f; -#endif // USE_DX10 +#endif // USE_DX10 float tu, tv; for (int j = 0; j < len; j++) @@ -117,7 +117,7 @@ void dxFontRender::OnRender(CGameFont& owner) // Make half pixel offset for 1 to 1 mapping tu += (0.5f / owner.vTS.x); tv += (0.5f / owner.vTS.y); -#endif // USE_DX10 +#endif // USE_DX10 v->set(X, Y2, clr2, tu, tv + owner.fTCHeight); v++; diff --git a/src/Layers/xrRender/dxFontRender.h b/src/Layers/xrRender/dxFontRender.h index ceca0ee35ed..45918faa689 100644 --- a/src/Layers/xrRender/dxFontRender.h +++ b/src/Layers/xrRender/dxFontRender.h @@ -18,4 +18,4 @@ class dxFontRender : public IFontRender ref_geom pGeom; }; -#endif // FontRender_included \ No newline at end of file +#endif // FontRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxLensFlareRender.h b/src/Layers/xrRender/dxLensFlareRender.h index 4b683cc9943..50881c4a590 100644 --- a/src/Layers/xrRender/dxLensFlareRender.h +++ b/src/Layers/xrRender/dxLensFlareRender.h @@ -31,4 +31,4 @@ class dxLensFlareRender : public ILensFlareRender ref_geom hGeom; }; -#endif // LensFlareRender_included \ No newline at end of file +#endif // LensFlareRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxObjectSpaceRender.cpp b/src/Layers/xrRender/dxObjectSpaceRender.cpp index 542a9487cad..d3a15e8c6e2 100644 --- a/src/Layers/xrRender/dxObjectSpaceRender.cpp +++ b/src/Layers/xrRender/dxObjectSpaceRender.cpp @@ -58,4 +58,4 @@ void dxObjectSpaceRender::SetShader() RCache.set_Shader(m_shDebug); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/Layers/xrRender/dxObjectSpaceRender.h b/src/Layers/xrRender/dxObjectSpaceRender.h index eda255f9f69..85630a34750 100644 --- a/src/Layers/xrRender/dxObjectSpaceRender.h +++ b/src/Layers/xrRender/dxObjectSpaceRender.h @@ -19,10 +19,10 @@ class dxObjectSpaceRender : public IObjectSpaceRender private: ref_shader m_shDebug; - clQueryCollision q_debug; // MT: dangerous - xr_vector> dbg_S; // MT: dangerous + clQueryCollision q_debug; // MT: dangerous + xr_vector> dbg_S; // MT: dangerous }; -#endif // DEBUG +#endif // DEBUG -#endif // ObjectSpaceRender_included \ No newline at end of file +#endif // ObjectSpaceRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxParticleCustom.h b/src/Layers/xrRender/dxParticleCustom.h index 8abff6bbc95..5c9c0943e14 100644 --- a/src/Layers/xrRender/dxParticleCustom.h +++ b/src/Layers/xrRender/dxParticleCustom.h @@ -17,4 +17,4 @@ class dxParticleCustom : public dxRender_Visual, public IParticleCustom }; //--------------------------------------------------------------------------- -#endif // ParticleCustomH +#endif // ParticleCustomH diff --git a/src/Layers/xrRender/dxRainRender.cpp b/src/Layers/xrRender/dxRainRender.cpp index 036a9476e1e..df1988fa0d9 100644 --- a/src/Layers/xrRender/dxRainRender.cpp +++ b/src/Layers/xrRender/dxRainRender.cpp @@ -117,18 +117,18 @@ void dxRainRender::Render(CEffect_Rain& owner) float height = max_distance; if (owner.RayPick(src_p, one.D, height, collide::rqtBoth)) { if (_sqr(height) <= dist_sqr) { - one.invalidate(); // need born - // Log("1"); + one.invalidate(); // need born + // Log("1"); } else { - owner.RenewItem(one, height - _sqrt(dist_sqr), TRUE); // fly to point - // Log("2",height-dist); + owner.RenewItem(one, height - _sqrt(dist_sqr), TRUE); // fly to point + // Log("2",height-dist); } } else { - owner.RenewItem(one, max_distance - _sqrt(dist_sqr), FALSE); // fly ... + owner.RenewItem(one, max_distance - _sqrt(dist_sqr), FALSE); // fly ... // Log("3",1.5f*b_height-dist); } } diff --git a/src/Layers/xrRender/dxRainRender.h b/src/Layers/xrRender/dxRainRender.h index 7564983b91b..d1e3cff03c7 100644 --- a/src/Layers/xrRender/dxRainRender.h +++ b/src/Layers/xrRender/dxRainRender.h @@ -25,4 +25,4 @@ class dxRainRender : public IRainRender ref_geom hGeom_Drops; }; -#endif // RainRender_included \ No newline at end of file +#endif // RainRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxRenderFactory.cpp b/src/Layers/xrRender/dxRenderFactory.cpp index 1233b4379fc..48da5c8ceca 100644 --- a/src/Layers/xrRender/dxRenderFactory.cpp +++ b/src/Layers/xrRender/dxRenderFactory.cpp @@ -7,13 +7,13 @@ #endif #include "dxConsoleRender.h" #ifndef _EDITOR -#include "dxThunderboltRender.h" -#include "dxThunderboltDescRender.h" -#include "dxRainRender.h" -#include "dxLensFlareRender.h" #include "dxEnvironmentRender.h" +#include "dxLensFlareRender.h" #include "dxObjectSpaceRender.h" -#endif // _EDITOR +#include "dxRainRender.h" +#include "dxThunderboltDescRender.h" +#include "dxThunderboltRender.h" +#endif // _EDITOR #include "dxApplicationRender.h" #include "dxFontRender.h" @@ -33,10 +33,10 @@ RENDER_FACTORY_IMPLEMENT(StatGraphRender) RENDER_FACTORY_IMPLEMENT(ConsoleRender) #ifdef DEBUG RENDER_FACTORY_IMPLEMENT(ObjectSpaceRender) -#endif // DEBUG +#endif // DEBUG RENDER_FACTORY_IMPLEMENT(ApplicationRender) RENDER_FACTORY_IMPLEMENT(WallMarkArray) -#endif // _EDITOR +#endif // _EDITOR #ifndef _EDITOR RENDER_FACTORY_IMPLEMENT(ThunderboltRender) diff --git a/src/Layers/xrRender/dxRenderFactory.h b/src/Layers/xrRender/dxRenderFactory.h index 936c197ae66..1a1712fa9c2 100644 --- a/src/Layers/xrRender/dxRenderFactory.h +++ b/src/Layers/xrRender/dxRenderFactory.h @@ -17,10 +17,10 @@ class dxRenderFactory : public IRenderFactory RENDER_FACTORY_DECLARE(ConsoleRender) #ifdef DEBUG RENDER_FACTORY_DECLARE(ObjectSpaceRender) -#endif // DEBUG +#endif // DEBUG RENDER_FACTORY_DECLARE(ApplicationRender) RENDER_FACTORY_DECLARE(WallMarkArray) -#endif // _EDITOR +#endif // _EDITOR #ifndef _EDITOR RENDER_FACTORY_DECLARE(FlareRender) @@ -37,4 +37,4 @@ class dxRenderFactory : public IRenderFactory extern dxRenderFactory RenderFactoryImpl; -#endif // RenderFactory_included \ No newline at end of file +#endif // RenderFactory_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxStatGraphRender.cpp b/src/Layers/xrRender/dxStatGraphRender.cpp index e82271d267a..39facb21beb 100644 --- a/src/Layers/xrRender/dxStatGraphRender.cpp +++ b/src/Layers/xrRender/dxStatGraphRender.cpp @@ -114,13 +114,13 @@ void dxStatGraphRender::RenderBack(CStatGraph& owner) FVF::TL0uv* pv = pv_start; // base rect pv->set(owner.lt.x, owner.rb.y, owner.back_color); - pv++; // 0 + pv++; // 0 pv->set(owner.lt.x, owner.lt.y, owner.back_color); - pv++; // 1 + pv++; // 1 pv->set(owner.rb.x, owner.rb.y, owner.back_color); - pv++; // 2 + pv++; // 2 pv->set(owner.rb.x, owner.lt.y, owner.back_color); - pv++; // 3 + pv++; // 3 // render dwCount = u32(pv - pv_start); RCache.Vertex.Unlock(dwCount, hGeomTri->vb_stride); @@ -132,15 +132,15 @@ void dxStatGraphRender::RenderBack(CStatGraph& owner) pv = pv_start; // base rect pv->set(owner.lt.x, owner.lt.y, owner.rect_color); - pv++; // 0 + pv++; // 0 pv->set(owner.rb.x - 1, owner.lt.y, owner.rect_color); - pv++; // 1 + pv++; // 1 pv->set(owner.rb.x - 1, owner.rb.y, owner.rect_color); - pv++; // 2 + pv++; // 2 pv->set(owner.lt.x, owner.rb.y, owner.rect_color); - pv++; // 3 + pv++; // 3 pv->set(owner.lt.x, owner.lt.y, owner.rect_color); - pv++; // 0 + pv++; // 0 // render dwCount = u32(pv - pv_start); RCache.Vertex.Unlock(dwCount, hGeomLine->vb_stride); @@ -161,9 +161,9 @@ void dxStatGraphRender::RenderBack(CStatGraph& owner) pv = pv_start; // base Coordinate Line pv->set(owner.lt.x, int(base_y), owner.base_color); - pv++; // 0 + pv++; // 0 pv->set(owner.rb.x, int(base_y), owner.base_color); - pv++; // 0 + pv++; // 0 // owner.grid // float grid_offs_x = float(owner.rb.x-owner.lt.x)/float(owner.grid.x+1); // float grid_offs_y = float(owner.rb.y-owner.lt.y)/float(owner.grid.y+1); diff --git a/src/Layers/xrRender/dxStatGraphRender.h b/src/Layers/xrRender/dxStatGraphRender.h index 391e23629ee..e41603caa9c 100644 --- a/src/Layers/xrRender/dxStatGraphRender.h +++ b/src/Layers/xrRender/dxStatGraphRender.h @@ -26,4 +26,4 @@ class dxStatGraphRender : public IStatGraphRender ref_geom hGeomLine; }; -#endif // dxStatGraphRender_included \ No newline at end of file +#endif // dxStatGraphRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxThunderboltDescRender.h b/src/Layers/xrRender/dxThunderboltDescRender.h index e76ecd87f5a..ddc574425c3 100644 --- a/src/Layers/xrRender/dxThunderboltDescRender.h +++ b/src/Layers/xrRender/dxThunderboltDescRender.h @@ -18,4 +18,4 @@ class dxThunderboltDescRender : public IThunderboltDescRender IRender_DetailModel* l_model; }; -#endif // dxThunderboltDescRender_included \ No newline at end of file +#endif // dxThunderboltDescRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxThunderboltRender.cpp b/src/Layers/xrRender/dxThunderboltRender.cpp index 005649fb93c..38a3e75ce85 100644 --- a/src/Layers/xrRender/dxThunderboltRender.cpp +++ b/src/Layers/xrRender/dxThunderboltRender.cpp @@ -103,13 +103,13 @@ void dxThunderboltRender::Render(CEffect_Thunderbolt& owner) // Hack. Since lightning gradient uses sun shader override z write settings manually RCache.set_Z(TRUE); RCache.set_ZFunc(D3DCMP_LESSEQUAL); -#endif // USE_DX10 +#endif // USE_DX10 #if defined(USE_DX10) || defined(USE_DX11) // Hack. Since lightning gradient uses sun shader override z write settings manually RCache.set_Z(TRUE); RCache.set_ZFunc(D3DCMP_LESSEQUAL); -#endif // USE_DX10 +#endif // USE_DX10 RCache.Render(D3DPT_TRIANGLELIST, VS_Offset, 0, 4, 0, 2); RCache.set_Shader(((dxFlareRender*)&*owner.current->m_GradientCenter->m_pFlare)->hShader); @@ -117,12 +117,12 @@ void dxThunderboltRender::Render(CEffect_Thunderbolt& owner) // Hack. Since lightning gradient uses sun shader override z write settings manually RCache.set_Z(TRUE); RCache.set_ZFunc(D3DCMP_LESSEQUAL); -#endif // USE_DX10 +#endif // USE_DX10 #if defined(USE_DX10) || defined(USE_DX11) // Hack. Since lightning gradient uses sun shader override z write settings manually RCache.set_Z(TRUE); RCache.set_ZFunc(D3DCMP_LESSEQUAL); -#endif // USE_DX10 +#endif // USE_DX10 RCache.Render(D3DPT_TRIANGLELIST, VS_Offset + 4, 0, 4, 0, 2); } \ No newline at end of file diff --git a/src/Layers/xrRender/dxThunderboltRender.h b/src/Layers/xrRender/dxThunderboltRender.h index 81c5777a054..0ebc301ea53 100644 --- a/src/Layers/xrRender/dxThunderboltRender.h +++ b/src/Layers/xrRender/dxThunderboltRender.h @@ -19,4 +19,4 @@ class dxThunderboltRender : public IThunderboltRender ref_geom hGeom_gradient; }; -#endif // ThunderboltRender_included \ No newline at end of file +#endif // ThunderboltRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxUIRender.cpp b/src/Layers/xrRender/dxUIRender.cpp index fc87d348661..b73502519e2 100644 --- a/src/Layers/xrRender/dxUIRender.cpp +++ b/src/Layers/xrRender/dxUIRender.cpp @@ -142,9 +142,9 @@ void dxUIRender::SetScissor(Irect* rect) #if (RENDER == R_R3) || (RENDER == R_R4) RCache.set_Scissor(rect); StateManager.OverrideScissoring(rect ? true : false, TRUE); -#else // (RENDER == R_R3) || (RENDER == R_R4) +#else // (RENDER == R_R3) || (RENDER == R_R4) RCache.set_Scissor(rect); -#endif // (RENDER == R_R3) || (RENDER == R_R4) +#endif // (RENDER == R_R3) || (RENDER == R_R4) } void dxUIRender::GetActiveTextureResolution(Fvector2& res) diff --git a/src/Layers/xrRender/dxUIRender.h b/src/Layers/xrRender/dxUIRender.h index 5f066cf7cad..f71247538b1 100644 --- a/src/Layers/xrRender/dxUIRender.h +++ b/src/Layers/xrRender/dxUIRender.h @@ -58,4 +58,4 @@ class dxUIRender : public IUIRender extern dxUIRender UIRenderImpl; -#endif // dxUIRender_included \ No newline at end of file +#endif // dxUIRender_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxUISequenceVideoItem.h b/src/Layers/xrRender/dxUISequenceVideoItem.h index 4999c8168ef..835c7afb19c 100644 --- a/src/Layers/xrRender/dxUISequenceVideoItem.h +++ b/src/Layers/xrRender/dxUISequenceVideoItem.h @@ -21,4 +21,4 @@ class dxUISequenceVideoItem : public IUISequenceVideoItem CTexture* m_texture; }; -#endif // dxUISequenceVideoItem_included \ No newline at end of file +#endif // dxUISequenceVideoItem_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxUIShader.h b/src/Layers/xrRender/dxUIShader.h index f26e892f28e..de4a3719c08 100644 --- a/src/Layers/xrRender/dxUIShader.h +++ b/src/Layers/xrRender/dxUIShader.h @@ -22,4 +22,4 @@ class dxUIShader : public IUIShader ref_shader hShader; }; -#endif // dxUIShader_included \ No newline at end of file +#endif // dxUIShader_included \ No newline at end of file diff --git a/src/Layers/xrRender/dxWallMarkArray.h b/src/Layers/xrRender/dxWallMarkArray.h index 6ab67dba427..37e5e95d049 100644 --- a/src/Layers/xrRender/dxWallMarkArray.h +++ b/src/Layers/xrRender/dxWallMarkArray.h @@ -23,4 +23,4 @@ class dxWallMarkArray : public IWallMarkArray ShaderVec m_CollideMarks; }; -#endif // WallMarkArray_included \ No newline at end of file +#endif // WallMarkArray_included \ No newline at end of file diff --git a/src/Layers/xrRender/light.cpp b/src/Layers/xrRender/light.cpp index 87971de8db7..79d837cec6f 100644 --- a/src/Layers/xrRender/light.cpp +++ b/src/Layers/xrRender/light.cpp @@ -31,12 +31,12 @@ light::light(void) : SpatialBase(g_SpatialSpace) ZeroMemory(omnipart, sizeof(omnipart)); s_spot = NULL; s_point = NULL; - vis.frame2test = 0; // xffffffff; + vis.frame2test = 0; // xffffffff; vis.query_id = 0; vis.query_order = 0; vis.visible = true; vis.pending = false; -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) } light::~light() @@ -44,14 +44,14 @@ light::~light() #if (RENDER == R_R2) || (RENDER == R_R3) || (RENDER == R_R4) for (int f = 0; f < 6; f++) xr_delete(omnipart[f]); -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) set_active(false); // remove from Lights_LastFrame #if (RENDER == R_R2) || (RENDER == R_R3) || (RENDER == R_R4) for (u32 it = 0; it < RImplementation.Lights_LastFrame.size(); it++) if (this == RImplementation.Lights_LastFrame[it]) RImplementation.Lights_LastFrame[it] = 0; -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) } #if (RENDER == R_R2) || (RENDER == R_R3) || (RENDER == R_R4) @@ -74,7 +74,7 @@ void light::set_texture(LPCSTR name) #if (RENDER != R_R3) && (RENDER != R_R4) s_volumetric.create("accum_volumetric", name); -#else // (RENDER!=R_R3) && (RENDER!=R_R4) +#else // (RENDER!=R_R3) && (RENDER!=R_R4) s_volumetric.create("accum_volumetric_nomsaa", name); if (RImplementation.o.dx10_msaa) { int bound = 1; @@ -89,7 +89,7 @@ void light::set_texture(LPCSTR name) strconcat(sizeof(temp), temp, "r2\\accum_volumetric_", name), name); } } -#endif // (RENDER!=R_R3) || (RENDER!=R_R4) +#endif // (RENDER!=R_R3) || (RENDER!=R_R4) } #endif @@ -113,7 +113,7 @@ void light::set_active(bool a) if (position.similar(zero)) { Msg("- Uninitialized light position."); } -#endif // DEBUG +#endif // DEBUG } else { @@ -127,7 +127,7 @@ void light::set_active(bool a) void light::set_position(const Fvector& P) { - float eps = EPS_L; //_max (range*0.001f,EPS_L); + float eps = EPS_L; //_max (range*0.001f,EPS_L); if (position.similar(P, eps)) return; position.set(P); spatial_move(); @@ -144,7 +144,7 @@ void light::set_range(float R) void light::set_cone(float angle) { if (fsimilar(cone, angle)) return; - VERIFY(cone < deg2rad(121.f)); // 120 is hard limit for lights + VERIFY(cone < deg2rad(121.f)); // 120 is hard limit for lights cone = angle; spatial_move(); } @@ -200,7 +200,7 @@ void light::spatial_move() #if (RENDER == R_R2) || (RENDER == R_R3) || (RENDER == R_R4) if (flags.bActive) gi_generate(); svis.invalidate(); -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) } vis_data& light::get_homdata() @@ -286,13 +286,13 @@ void light::xform_calc() // scale to account range and angle float s = 2.f * range * tanf(cone / 2.f); Fmatrix mScale; - mScale.scale(s, s, range); // make range and radius + mScale.scale(s, s, range); // make range and radius m_xform.mul_43(mR, mScale); } break; case IRender_Light::OMNIPART: { - float L_R = 2 * range; // volume is half-radius + float L_R = 2 * range; // volume is half-radius Fmatrix mScale; mScale.scale(L_R, L_R, L_R); m_xform.mul_43(mR, mScale); @@ -331,7 +331,7 @@ void light::Export(light_Package& package) L->set_cone(PI_DIV_2); L->set_range(range); L->set_color(color); - L->spatial.sector = spatial.sector; //. dangerous? + L->spatial.sector = spatial.sector; //. dangerous? L->s_spot = s_spot; L->s_point = s_point; @@ -349,7 +349,7 @@ void light::Export(light_Package& package) // L->s_volumetric_msaa[i] = s_volumetric_msaa[i]; } } -#endif // (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R3) || (RENDER==R_R4) // Igor: add volumetric support L->set_volumetric(flags.bVolumetric); @@ -382,7 +382,7 @@ void light::set_attenuation_params(float a0, float a1, float a2, float fo) falloff = fo; } -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) extern float r_ssaGLOD_start, r_ssaGLOD_end; extern float ps_r2_slight_fade; diff --git a/src/Layers/xrRender/light.h b/src/Layers/xrRender/light.h index 92a5798e30a..a3b227eab32 100644 --- a/src/Layers/xrRender/light.h +++ b/src/Layers/xrRender/light.h @@ -4,10 +4,10 @@ #include "xrCDB/ISpatial.h" #if (RENDER == R_R2) || (RENDER == R_R3) || (RENDER == R_R4) +#include "light_GI.h" #include "light_package.h" #include "light_smapvis.h" -#include "light_GI.h" -#endif //(RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif //(RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) class light : public IRender_Light, public SpatialBase { @@ -37,16 +37,16 @@ class light : public IRender_Light, public SpatialBase float m_volumetric_distance; #if (RENDER == R_R2) || (RENDER == R_R3) || (RENDER == R_R4) - float falloff; // precalc to make light equal to zero at light range - float attenuation0; // Constant attenuation - float attenuation1; // Linear attenuation - float attenuation2; // Quadratic attenuation + float falloff; // precalc to make light equal to zero at light range + float attenuation0; // Constant attenuation + float attenuation1; // Linear attenuation + float attenuation2; // Quadratic attenuation light* omnipart[6]; xr_vector indirect; u32 indirect_photons; - smapvis svis; // used for 6-cubemap faces + smapvis svis; // used for 6-cubemap faces ref_shader s_spot; ref_shader s_point; @@ -56,18 +56,18 @@ class light : public IRender_Light, public SpatialBase ref_shader s_spot_msaa[8]; ref_shader s_point_msaa[8]; ref_shader s_volumetric_msaa[8]; -#endif // (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R3) || (RENDER==R_R4) u32 m_xform_frame; Fmatrix m_xform; struct _vis { - u32 frame2test; // frame the test is sheduled to - u32 query_id; // ID of occlusion query - u32 query_order; // order of occlusion query - bool visible; // visible/invisible - bool pending; // test is still pending + u32 frame2test; // frame the test is sheduled to + u32 query_id; // ID of occlusion query + u32 query_order; // order of occlusion query + bool visible; // visible/invisible + bool pending; // test is still pending u16 smap_ID; } vis; @@ -98,7 +98,7 @@ class light : public IRender_Light, public SpatialBase BOOL transluent; } S; } X; -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) public: virtual void set_type(LT type) { flags.type = type; } @@ -131,7 +131,7 @@ class light : public IRender_Light, public SpatialBase void vis_update(); void Export(light_Package& dest); void set_attenuation_params(float a0, float a1, float a2, float fo); -#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) +#endif // (RENDER==R_R2) || (RENDER==R_R3) || (RENDER==R_R4) float get_LOD(); @@ -139,4 +139,4 @@ class light : public IRender_Light, public SpatialBase virtual ~light(); }; -#endif // #define LAYERS_XRRENDER_LIGHT_H_INCLUDED \ No newline at end of file +#endif // #define LAYERS_XRRENDER_LIGHT_H_INCLUDED \ No newline at end of file diff --git a/src/Layers/xrRender/occRasterizer.h b/src/Layers/xrRender/occRasterizer.h index 520563f17c8..de3c2ea474a 100644 --- a/src/Layers/xrRender/occRasterizer.h +++ b/src/Layers/xrRender/occRasterizer.h @@ -6,7 +6,7 @@ const int occ_dim_0 = 64; const int occ_dim_1 = occ_dim_0 / 2; const int occ_dim_2 = occ_dim_1 / 2; const int occ_dim_3 = occ_dim_2 / 2; -const int occ_dim = occ_dim_0 + 4; // 2 pixel border around frame +const int occ_dim = occ_dim_0 + 4; // 2 pixel border around frame class occTri { @@ -20,8 +20,8 @@ class occTri Fvector center; }; -const float occQ_s32 = float(0x40000000); // [-2..2] -const float occQ_s16 = float(16384 - 1); // [-2..2] +const float occQ_s32 = float(0x40000000); // [-2..2] +const float occQ_s16 = float(16384 - 1); // [-2..2] typedef s32 occD; class occRasterizer diff --git a/src/Layers/xrRender/occRasterizer_core.cpp b/src/Layers/xrRender/occRasterizer_core.cpp index 4f3349cc119..5c4adef4025 100644 --- a/src/Layers/xrRender/occRasterizer_core.cpp +++ b/src/Layers/xrRender/occRasterizer_core.cpp @@ -16,7 +16,7 @@ void i_order(float* A, float* B, float* C) mid = B; max = C; } - else // C < B + else // C < B if (A[1] <= C[1]) { min = A; @@ -30,14 +30,14 @@ void i_order(float* A, float* B, float* C) max = B; } } - else // B < A + else // B < A { if (A[1] <= C[1]) { min = B; mid = A; max = C; } - else // C < A + else // C < A if (B[1] <= C[1]) { min = B; @@ -132,9 +132,9 @@ void i_scan(int curY, float leftX, float lhx, float rightX, float rhx, float sta // interpolate float lenR = endR - startR; float Zlen = endZ - startZ; - float Z = startZ + (minT - startR) / lenR * Zlen; // interpolate Z to the start - float Zend = startZ + (maxT - startR) / lenR * Zlen; // interpolate Z to the end - float dZ = (Zend - Z) / (maxT - minT); // increment in Z / pixel wrt dX + float Z = startZ + (minT - startR) / lenR * Zlen; // interpolate Z to the start + float Zend = startZ + (maxT - startR) / lenR * Zlen; // interpolate Z to the end + float dZ = (Zend - Z) / (maxT - minT); // increment in Z / pixel wrt dX // Move to far my dz/5 to place the pixel at the center of face that it covers. // This will make sure that objects will not be clipped for just standing next to the home from outside. @@ -334,14 +334,14 @@ IC void i_section(int Sect, BOOL bMiddle) if (((mE1 < mE2) && (Sect == BOTTOM)) || ((mE1 > mE2) && (Sect == TOP))) { // E1 is on the Left // Initial Starting values for left (from E1) - t = e1_init_dY / E1[1]; // Initial fraction of offset + t = e1_init_dY / E1[1]; // Initial fraction of offset leftX = startp1[0] + E1[0] * t; left_dX = mE1; leftZ = startp1[2] + E1[2] * t; left_dZ = E1[2] / E1[1]; // Initial Ending values for right (from E2) - t = e2_init_dY / E2[1]; // Initial fraction of offset + t = e2_init_dY / E2[1]; // Initial fraction of offset rightX = startp2[0] + E2[0] * t; right_dX = mE2; rightZ = startp2[2] + E2[2] * t; @@ -351,14 +351,14 @@ IC void i_section(int Sect, BOOL bMiddle) { // E2 is on left // Initial Starting values for left (from E2) - t = e2_init_dY / E2[1]; // Initial fraction of offset + t = e2_init_dY / E2[1]; // Initial fraction of offset leftX = startp2[0] + E2[0] * t; left_dX = mE2; leftZ = startp2[2] + E2[2] * t; left_dZ = E2[2] / E2[1]; // Initial Ending values for right (from E1) - t = e1_init_dY / E1[1]; // Initial fraction of offset + t = e1_init_dY / E1[1]; // Initial fraction of offset rightX = startp1[0] + E1[0] * t; right_dX = mE1; rightZ = startp1[2] + E1[2] * t; @@ -367,9 +367,9 @@ IC void i_section(int Sect, BOOL bMiddle) // Now scan all lines in this section float lhx = left_dX / 2; - leftX += lhx; // half pixel + leftX += lhx; // half pixel float rhx = right_dX / 2; - rightX += rhx; // half pixel + rightX += rhx; // half pixel for (; startY <= endY; startY++) { i_scan(startY, leftX, lhx, rightX, rhx, leftZ, rightZ); @@ -406,13 +406,13 @@ u32 occRasterizer::rasterize(occTri* T) // Rasterize sections if (currentB[1] - iFloor(currentB[1]) > .5f) { - i_section_b1(); // Rasterise First Section - i_section_t0(); // Rasterise Second Section + i_section_b1(); // Rasterise First Section + i_section_t0(); // Rasterise Second Section } else { - i_section_b0(); // Rasterise First Section - i_section_t1(); // Rasterise Second Section + i_section_b0(); // Rasterise First Section + i_section_t1(); // Rasterise Second Section } return dwPixels; } diff --git a/src/Layers/xrRender/r__dsgraph_build.cpp b/src/Layers/xrRender/r__dsgraph_build.cpp index bf024430a42..8417f39f614 100644 --- a/src/Layers/xrRender/r__dsgraph_build.cpp +++ b/src/Layers/xrRender/r__dsgraph_build.cpp @@ -61,7 +61,7 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fvector& N->val.pObject = RI.val_pObject; N->val.pVisual = pVisual; N->val.Matrix = *RI.val_pTransform; - N->val.se = sh_d; // 4=L_special + N->val.se = sh_d; // 4=L_special } // Select shader @@ -99,9 +99,9 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fvector& N->val.pObject = RI.val_pObject; N->val.pVisual = pVisual; N->val.Matrix = *RI.val_pTransform; - N->val.se = &*pVisual->shader->E[4]; // 4=L_special + N->val.se = &*pVisual->shader->E[4]; // 4=L_special } -#endif // RENDER!=R_R1 +#endif // RENDER!=R_R1 return; } } @@ -135,7 +135,7 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fvector& N->val.pObject = RI.val_pObject; N->val.pVisual = pVisual; N->val.Matrix = *RI.val_pTransform; - N->val.se = &*pVisual->shader->E[4]; // 4=L_special + N->val.se = &*pVisual->shader->E[4]; // 4=L_special } if (sh->flags.bWmark && pmask_wmark) { mapSorted_Node* N = mapWmark.insertInAnyWay(distSQ); @@ -161,19 +161,19 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fvector& mapMatrixVS::TNode* Nvs = map.insert(pass.vs); mapMatrixGS::TNode* Ngs = Nvs->val.insert(pass.gs); mapMatrixPS::TNode* Nps = Ngs->val.insert(pass.ps); -#else // USE_DX10 +#else // USE_DX10 mapMatrixVS::TNode* Nvs = map.insert(pass.vs); mapMatrixPS::TNode* Nps = Nvs->val.insert(pass.ps); -#endif // USE_DX10 +#endif // USE_DX10 #else #if defined(USE_DX10) || defined(USE_DX11) mapMatrixVS::TNode* Nvs = map.insert(&*pass.vs); mapMatrixGS::TNode* Ngs = Nvs->val.insert(pass.gs->gs); mapMatrixPS::TNode* Nps = Ngs->val.insert(pass.ps->ps); -#else // USE_DX10 +#else // USE_DX10 mapMatrixVS::TNode* Nvs = map.insert(pass.vs->vs); mapMatrixPS::TNode* Nps = Nvs->val.insert(pass.ps->ps); -#endif // USE_DX10 +#endif // USE_DX10 #endif #ifdef USE_DX11 @@ -211,7 +211,7 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fvector& #if defined(USE_DX10) || defined(USE_DX11) if (SSA > Ngs->val.ssa) { Ngs->val.ssa = SSA; -#endif // USE_DX10 +#endif // USE_DX10 if (SSA > Nvs->val.ssa) { Nvs->val.ssa = SSA; #if defined(USE_DX10) || defined(USE_DX11) @@ -221,13 +221,13 @@ void D3DXRenderBase::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fvector& } } } -#else // USE_DX10 +#else // USE_DX10 } } } } } -#endif // USE_DX10 +#endif // USE_DX10 } #if RENDER != R_R1 @@ -267,7 +267,7 @@ void D3DXRenderBase::r_dsgraph_insert_static(dxRender_Visual* pVisual) N->val.pObject = NULL; N->val.pVisual = pVisual; N->val.Matrix = Fidentity; - N->val.se = &*pVisual->shader->E[4]; // 4=L_special + N->val.se = &*pVisual->shader->E[4]; // 4=L_special } // Select shader @@ -297,7 +297,7 @@ void D3DXRenderBase::r_dsgraph_insert_static(dxRender_Visual* pVisual) N->val.pObject = NULL; N->val.pVisual = pVisual; N->val.Matrix = Fidentity; - N->val.se = &*pVisual->shader->E[4]; // 4=L_special + N->val.se = &*pVisual->shader->E[4]; // 4=L_special } if (sh->flags.bWmark && pmask_wmark) { mapSorted_Node* N = mapWmark.insertInAnyWay(distSQ); @@ -338,20 +338,20 @@ void D3DXRenderBase::r_dsgraph_insert_static(dxRender_Visual* pVisual) mapNormalVS::TNode* Nvs = map.insert(pass.vs); mapNormalGS::TNode* Ngs = Nvs->val.insert(pass.gs); mapNormalPS::TNode* Nps = Ngs->val.insert(pass.ps); -#else // USE_DX10 +#else // USE_DX10 mapNormalVS::TNode* Nvs = map.insert(pass.vs); mapNormalPS::TNode* Nps = Nvs->val.insert(pass.ps); -#endif // USE_DX10 -#else // USE_RESOURCE_DEBUGGER +#endif // USE_DX10 +#else // USE_RESOURCE_DEBUGGER #if defined(USE_DX10) || defined(USE_DX11) mapNormalVS::TNode* Nvs = map.insert(&*pass.vs); mapNormalGS::TNode* Ngs = Nvs->val.insert(pass.gs->gs); mapNormalPS::TNode* Nps = Ngs->val.insert(pass.ps->ps); -#else // USE_DX10 +#else // USE_DX10 mapNormalVS::TNode* Nvs = map.insert(pass.vs->vs); mapNormalPS::TNode* Nps = Nvs->val.insert(pass.ps->ps); -#endif // USE_DX10 -#endif // USE_RESOURCE_DEBUGGER +#endif // USE_DX10 +#endif // USE_RESOURCE_DEBUGGER #ifdef USE_DX11 #ifdef USE_RESOURCE_DEBUGGER @@ -391,7 +391,7 @@ void D3DXRenderBase::r_dsgraph_insert_static(dxRender_Visual* pVisual) #if defined(USE_DX10) || defined(USE_DX11) if (SSA > Ngs->val.ssa) { Ngs->val.ssa = SSA; -#endif // USE_DX10 +#endif // USE_DX10 if (SSA > Nvs->val.ssa) { Nvs->val.ssa = SSA; #if defined(USE_DX10) || defined(USE_DX11) @@ -401,13 +401,13 @@ void D3DXRenderBase::r_dsgraph_insert_static(dxRender_Visual* pVisual) } } } -#else // USE_DX10 +#else // USE_DX10 } } } } } -#endif // USE_DX10 +#endif // USE_DX10 } #if RENDER != R_R1 @@ -425,7 +425,7 @@ void CRender::add_leafs_Dynamic(dxRender_Visual* pVisual) if (0 == pVisual) return; // Visual is 100% visible - simply add it - xr_vector::iterator I, E; // it may be useful for 'hierrarhy' visual + xr_vector::iterator I, E; // it may be useful for 'hierrarhy' visual switch (pVisual->Type) { @@ -466,7 +466,7 @@ void CRender::add_leafs_Dynamic(dxRender_Visual* pVisual) Fvector Tpos; float D; val_pTransform->transform_tiny(Tpos, pV->vis.sphere.P); - float ssa = CalcSSA(D, Tpos, pV->vis.sphere.R / 2.f); // assume dynamics never consume full sphere + float ssa = CalcSSA(D, Tpos, pV->vis.sphere.R / 2.f); // assume dynamics never consume full sphere if (ssa < r_ssaLOD_A) _use_lod = TRUE; } if (_use_lod) { @@ -475,7 +475,7 @@ void CRender::add_leafs_Dynamic(dxRender_Visual* pVisual) else { pV->CalculateBones(TRUE); - pV->CalculateWallmarks(); //. bug? + pV->CalculateWallmarks(); //. bug? I = pV->children.begin(); E = pV->children.end(); for (; I != E; I++) @@ -500,7 +500,7 @@ void CRender::add_leafs_Static(dxRender_Visual* pVisual) if (!HOM.visible(pVisual->vis)) return; // Visual is 100% visible - simply add it - xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals + xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals switch (pVisual->Type) { @@ -591,7 +591,7 @@ void CRender::add_leafs_Static(dxRender_Visual* pVisual) BOOL CRender::add_Dynamic(dxRender_Visual* pVisual, u32 planes) { // Check frustum visibility and calculate distance to visual's center - Fvector Tpos; // transformed position + Fvector Tpos; // transformed position EFC_Visible VIS; val_pTransform->transform_tiny(Tpos, pVisual->vis.sphere.P); @@ -599,7 +599,7 @@ BOOL CRender::add_Dynamic(dxRender_Visual* pVisual, u32 planes) if (fcvNone == VIS) return FALSE; // If we get here visual is visible or partially visible - xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals + xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals switch (pVisual->Type) { @@ -659,7 +659,7 @@ BOOL CRender::add_Dynamic(dxRender_Visual* pVisual, u32 planes) Fvector Tpos; float D; val_pTransform->transform_tiny(Tpos, pV->vis.sphere.P); - float ssa = CalcSSA(D, Tpos, pV->vis.sphere.R / 2.f); // assume dynamics never consume full sphere + float ssa = CalcSSA(D, Tpos, pV->vis.sphere.R / 2.f); // assume dynamics never consume full sphere if (ssa < r_ssaLOD_A) _use_lod = TRUE; } if (_use_lod) { @@ -668,7 +668,7 @@ BOOL CRender::add_Dynamic(dxRender_Visual* pVisual, u32 planes) else { pV->CalculateBones(TRUE); - pV->CalculateWallmarks(); //. bug? + pV->CalculateWallmarks(); //. bug? I = pV->children.begin(); E = pV->children.end(); for (; I != E; I++) @@ -706,7 +706,7 @@ void CRender::add_Static(dxRender_Visual* pVisual, u32 planes) if (!HOM.visible(vis)) return; // If we get here visual is visible or partially visible - xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals + xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals switch (pVisual->Type) { @@ -883,7 +883,7 @@ void D3DXRenderBase::Reset(HWND hWnd, u32& dwWidth, u32& dwHeight, float& fWidth { #ifdef DEBUG _SHOW_REF("*ref -CRenderDevice::ResetTotal: DeviceREF:", HW.pDevice); -#endif // DEBUG +#endif // DEBUG Resources->reset_begin(); Memory.mem_compact(); @@ -892,10 +892,10 @@ void D3DXRenderBase::Reset(HWND hWnd, u32& dwWidth, u32& dwHeight, float& fWidth #if defined(USE_DX10) || defined(USE_DX11) dwWidth = HW.m_ChainDesc.BufferDesc.Width; dwHeight = HW.m_ChainDesc.BufferDesc.Height; -#else // USE_DX10 +#else // USE_DX10 dwWidth = HW.DevPP.BackBufferWidth; dwHeight = HW.DevPP.BackBufferHeight; -#endif // USE_DX10 +#endif // USE_DX10 fWidth_2 = float(dwWidth / 2); fHeight_2 = float(dwHeight / 2); @@ -903,7 +903,7 @@ void D3DXRenderBase::Reset(HWND hWnd, u32& dwWidth, u32& dwHeight, float& fWidth #ifdef DEBUG _SHOW_REF("*ref +CRenderDevice::ResetTotal: DeviceREF:", HW.pDevice); -#endif // DEBUG +#endif // DEBUG } void D3DXRenderBase::SetupStates() @@ -912,7 +912,7 @@ void D3DXRenderBase::SetupStates() #if defined(USE_DX10) || defined(USE_DX11) // TODO: DX10: Implement Resetting of render states into default mode // VERIFY(!"D3DXRenderBase::SetupStates not implemented."); -#else // USE_DX10 +#else // USE_DX10 for (u32 i = 0; i < HW.Caps.raster.dwStages; i++) { float fBias = -.5f; @@ -951,7 +951,7 @@ void D3DXRenderBase::SetupStates() CHK_DX(HW.pDevice->SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_NONE)); CHK_DX(HW.pDevice->SetRenderState(D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR)); } -#endif // USE_DX10 +#endif // USE_DX10 } void D3DXRenderBase::OnDeviceCreate(const char* shName) @@ -1006,9 +1006,9 @@ void D3DXRenderBase::overdrawBegin() CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP)); CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_INCRSAT)); if (1 == HW.Caps.SceneMode) - CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP)); // Overdraw + CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP)); // Overdraw else - CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_INCRSAT)); // ZB access + CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_INCRSAT)); // ZB access #endif } @@ -1043,7 +1043,7 @@ void D3DXRenderBase::overdrawEnd() CHK_DX(HW.pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, pv, sizeof(FVF::TL))); } CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILENABLE, FALSE)); -#endif // USE_DX10 +#endif // USE_DX10 } void D3DXRenderBase::DeferredLoad(bool E) @@ -1078,7 +1078,7 @@ DeviceState D3DXRenderBase::GetDeviceState() // TODO: DX10: Implement GetDeviceState // TODO: DX10: Implement DXGI_PRESENT_TEST testing // VERIFY(!"D3DXRenderBase::overdrawBegin not implemented."); -#else // USE_DX10 +#else // USE_DX10 HRESULT _hr = HW.pDevice->TestCooperativeLevel(); if (FAILED(_hr)) { // If the device was lost, do not render until we get it back @@ -1086,7 +1086,7 @@ DeviceState D3DXRenderBase::GetDeviceState() // Check if the device is ready to be reset if (D3DERR_DEVICENOTRESET == _hr) return DeviceState::NeedReset; } -#endif // USE_DX10 +#endif // USE_DX10 return DeviceState::Normal; } diff --git a/src/Layers/xrRender/r__dsgraph_render.cpp b/src/Layers/xrRender/r__dsgraph_render.cpp index 44251003e12..836ec670dca 100644 --- a/src/Layers/xrRender/r__dsgraph_render.cpp +++ b/src/Layers/xrRender/r__dsgraph_render.cpp @@ -117,7 +117,7 @@ IC bool cmp_gs_mat(mapMatrixGS::TNode* N1, mapMatrixGS::TNode* N2) { return (N1->val.ssa > N2->val.ssa); } -#endif // USE_DX10 +#endif // USE_DX10 IC bool cmp_cs_nrm(mapNormalCS::TNode* N1, mapNormalCS::TNode* N2) { @@ -341,10 +341,10 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority, bool _clear) mapNormalPS& ps = Ngs->val; ps.ssa = 0; -#else // USE_DX10 +#else // USE_DX10 mapNormalPS& ps = Nvs->val; ps.ssa = 0; -#endif // USE_DX10 +#endif // USE_DX10 ps.getANY_P(nrmPS); std::sort(nrmPS.begin(), nrmPS.end(), cmp_ps_nrm); @@ -407,7 +407,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority, bool _clear) } nrmGS.clear(); if (_clear) gs.clear(); -#endif // USE_DX10 +#endif // USE_DX10 } nrmVS.clear(); if (_clear) vs.clear(); @@ -442,10 +442,10 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority, bool _clear) mapMatrixPS& ps = Ngs->val; ps.ssa = 0; -#else // USE_DX10 +#else // USE_DX10 mapMatrixPS& ps = Nvs->val; ps.ssa = 0; -#endif // USE_DX10 +#endif // USE_DX10 ps.getANY_P(matPS); std::sort(matPS.begin(), matPS.end(), cmp_ps_mat); @@ -508,7 +508,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority, bool _clear) } matGS.clear(); if (_clear) gs.clear(); -#endif // USE_DX10 +#endif // USE_DX10 } matVS.clear(); if (_clear) vs.clear(); @@ -540,7 +540,7 @@ void D3DXRenderBase::r_dsgraph_render_hud() mapHUD.clear(); #if RENDER == R_R1 - if (g_hud && g_hud->RenderActiveItemUIQuery()) r_dsgraph_render_hud_ui(); // hud ui + if (g_hud && g_hud->RenderActiveItemUIQuery()) r_dsgraph_render_hud_ui(); // hud ui #endif /* if(g_hud && g_hud->RenderActiveItemUIQuery()) @@ -618,13 +618,13 @@ void D3DXRenderBase::r_dsgraph_render_hud_ui() RImplementation.Target->u_setrt( RImplementation.Target->rt_Color, rt_null, rt_null, RImplementation.Target->rt_MSAADepth->pZRT); } -#else // (RENDER==R_R3) || (RENDER==R_R4) +#else // (RENDER==R_R3) || (RENDER==R_R4) if (RImplementation.o.albedo_wo) RImplementation.Target->u_setrt(RImplementation.Target->rt_Accumulator, rt_null, rt_null, HW.pBaseZB); else RImplementation.Target->u_setrt(RImplementation.Target->rt_Color, rt_null, rt_null, HW.pBaseZB); -#endif // (RENDER==R_R3) || (RENDER==R_R4) -#endif // RENDER!=R_R1 +#endif // (RENDER==R_R3) || (RENDER==R_R4) +#endif // RENDER!=R_R1 rmNear(); g_hud->RenderActiveItemUI(); @@ -717,7 +717,7 @@ void D3DXRenderBase::r_dsgraph_render_subspace(IRender_Sector* _sector, CFrustum Fvector& _cop, BOOL _dynamic, BOOL _precise_portals) { VERIFY(_sector); - RImplementation.marker++; // !!! critical here + RImplementation.marker++; // !!! critical here // Save and build new frustum, disable HOM CFrustum ViewSave = ViewBase; @@ -765,8 +765,8 @@ void D3DXRenderBase::r_dsgraph_render_subspace(IRender_Sector* _sector, CFrustum { ISpatial* spatial = lstRenderables[o_it]; CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure - if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector + if (0 == sector) continue; // disassociated from S/P structure + if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector for (u32 v_it = 0; v_it < sector->r_frustums.size(); v_it++) { set_Frustum(&(sector->r_frustums[v_it])); @@ -775,7 +775,7 @@ void D3DXRenderBase::r_dsgraph_render_subspace(IRender_Sector* _sector, CFrustum // renderable IRenderable* renderable = spatial->dcast_Renderable(); - if (0 == renderable) continue; // unknown, but renderable object (r1_glow???) + if (0 == renderable) continue; // unknown, but renderable object (r1_glow???) renderable->renderable_Render(); } @@ -803,7 +803,7 @@ void D3DXRenderBase::r_dsgraph_render_R1_box(IRender_Sector* _S, Fbox& BB, int s dxRender_Visual* V = lstVisuals[test]; // Visual is 100% visible - simply add it - xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals + xr_vector::iterator I, E; // it may be usefull for 'hierrarhy' visuals switch (V->Type) { diff --git a/src/Layers/xrRender/r__dsgraph_render_lods.cpp b/src/Layers/xrRender/r__dsgraph_render_lods.cpp index e252ed90f67..c7f40399dbd 100644 --- a/src/Layers/xrRender/r__dsgraph_render_lods.cpp +++ b/src/Layers/xrRender/r__dsgraph_render_lods.cpp @@ -19,9 +19,9 @@ ICF bool pred_dot(const std::pair& _1, const std::pair& void D3DXRenderBase::r_dsgraph_render_lods(bool _setup_zb, bool _clear) { if (_setup_zb) - mapLOD.getLR(lstLODs); // front-to-back + mapLOD.getLR(lstLODs); // front-to-back else - mapLOD.getRL(lstLODs); // back-to-front + mapLOD.getRL(lstLODs); // back-to-front if (lstLODs.empty()) return; // *** Fill VB and generate groups diff --git a/src/Layers/xrRender/r__dsgraph_types.h b/src/Layers/xrRender/r__dsgraph_types.h index 6c89b156fbf..bc8693bcfc3 100644 --- a/src/Layers/xrRender/r__dsgraph_types.h +++ b/src/Layers/xrRender/r__dsgraph_types.h @@ -100,7 +100,7 @@ struct _MatrixItem float ssa; IRenderable* pObject; dxRender_Visual* pVisual; - Fmatrix Matrix; // matrix (copy) + Fmatrix Matrix; // matrix (copy) }; struct _MatrixItemS : public _MatrixItem @@ -123,18 +123,18 @@ typedef ref_gs gs_type; typedef ref_hs hs_type; typedef ref_ds ds_type; #endif -#endif // USE_DX10 +#endif // USE_DX10 #else -#if defined(USE_DX10) || defined(USE_DX11) // DX10 needs shader signature to propperly bind deometry to shader +#if defined(USE_DX10) || defined(USE_DX11) // DX10 needs shader signature to propperly bind deometry to shader typedef SVS* vs_type; typedef ID3DGeometryShader* gs_type; #ifdef USE_DX11 typedef ID3D11HullShader* hs_type; typedef ID3D11DomainShader* ds_type; #endif -#else // USE_DX10 +#else // USE_DX10 typedef ID3DVertexShader* vs_type; -#endif // USE_DX10 +#endif // USE_DX10 typedef ID3DPixelShader* ps_type; #endif @@ -172,7 +172,7 @@ struct mapNormalPS : public FixedMAP { float ssa; }; -#endif // USE_DX11 +#endif // USE_DX11 #if defined(USE_DX10) || defined(USE_DX11) struct mapNormalGS : public FixedMAP { @@ -181,11 +181,11 @@ struct mapNormalGS : public FixedMAP struct mapNormalVS : public FixedMAP { }; -#else // USE_DX10 +#else // USE_DX10 struct mapNormalVS : public FixedMAP { }; -#endif // USE_DX10 +#endif // USE_DX10 typedef mapNormalVS mapNormal_T; typedef mapNormal_T mapNormalPasses_T[SHADER_PASSES_MAX]; @@ -223,7 +223,7 @@ struct mapMatrixPS : public FixedMAP { float ssa; }; -#endif // USE_DX11 +#endif // USE_DX11 #if defined(USE_DX10) || defined(USE_DX11) struct mapMatrixGS : public FixedMAP { @@ -232,11 +232,11 @@ struct mapMatrixGS : public FixedMAP struct mapMatrixVS : public FixedMAP { }; -#else // USE_DX10 +#else // USE_DX10 struct mapMatrixVS : public FixedMAP { }; -#endif // USE_DX10 +#endif // USE_DX10 typedef mapMatrixVS mapMatrix_T; typedef mapMatrix_T mapMatrixPasses_T[SHADER_PASSES_MAX]; diff --git a/src/Layers/xrRender/r__occlusion.cpp b/src/Layers/xrRender/r__occlusion.cpp index 72d236c6c5f..994c364580b 100644 --- a/src/Layers/xrRender/r__occlusion.cpp +++ b/src/Layers/xrRender/r__occlusion.cpp @@ -105,7 +105,7 @@ R_occlusion::occq_result R_occlusion::occq_get(u32& ID) if (!SwitchToThread()) Sleep(ps_r2_wait_sleep); if (T.GetElapsed_ms() > 500) { - fragments = (occq_result)-1; // 0xffffffff; + fragments = (occq_result)-1; // 0xffffffff; break; } } diff --git a/src/Layers/xrRender/r__occlusion.h b/src/Layers/xrRender/r__occlusion.h index 5bf33a98dc8..a129f148b99 100644 --- a/src/Layers/xrRender/r__occlusion.h +++ b/src/Layers/xrRender/r__occlusion.h @@ -1,6 +1,6 @@ #pragma once -const u32 occq_size = 2 * 768; // 256 ; // queue for occlusion queries +const u32 occq_size = 2 * 768; // 256 ; // queue for occlusion queries // must conform to following order of allocation/free // a(A), a(B), a(C), a(D), .... @@ -23,23 +23,23 @@ class R_occlusion static const u32 iInvalidHandle = 0xFFFFFFFF; - BOOL enabled; // - xr_vector<_Q> pool; // sorted (max ... min), insertions are usually at the end - xr_vector<_Q> used; // id's are generated from this and it is cleared from back only - xr_vector fids; // free id's + BOOL enabled; // + xr_vector<_Q> pool; // sorted (max ... min), insertions are usually at the end + xr_vector<_Q> used; // id's are generated from this and it is cleared from back only + xr_vector fids; // free id's public: #if defined(USE_DX10) || defined(USE_DX11) typedef u64 occq_result; -#else // USE_DX10 +#else // USE_DX10 typedef u32 occq_result; -#endif // USE_DX10 +#endif // USE_DX10 public: R_occlusion(); ~R_occlusion(); void occq_create(u32 limit); void occq_destroy(); - u32 occq_begin(u32& ID); // returns 'order' + u32 occq_begin(u32& ID); // returns 'order' void occq_end(u32& ID); occq_result occq_get(u32& ID); }; diff --git a/src/Layers/xrRender/r__pixel_calculator.cpp b/src/Layers/xrRender/r__pixel_calculator.cpp index 6750ee81ae2..67a34e9bf83 100644 --- a/src/Layers/xrRender/r__pixel_calculator.cpp +++ b/src/Layers/xrRender/r__pixel_calculator.cpp @@ -57,7 +57,7 @@ r_aabb_ssa r_pixel_calculator::calculate(dxRender_Visual* V) RCache.set_xform_project(mProject); // render-0 - Device.Clear(); // clear-ZB + Device.Clear(); // clear-ZB RCache.set_Shader(V->shader); V->Render(1.f); @@ -90,4 +90,4 @@ void r_pixel_calculator::run() } end(); } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/r__screenshot.cpp b/src/Layers/xrRender/r__screenshot.cpp index b438ae7635c..1b2c6a24e0b 100644 --- a/src/Layers/xrRender/r__screenshot.cpp +++ b/src/Layers/xrRender/r__screenshot.cpp @@ -4,7 +4,7 @@ #include "xr_effgamma.h" #if defined(USE_DX10) || defined(USE_DX11) #include "d3dx10tex.h" -#endif // USE_DX10 +#endif // USE_DX10 using namespace XRay::Media; @@ -163,7 +163,7 @@ void CRender::ScreenshotImpl(ScreenshotMode mode, LPCSTR name, CMemoryWriter* me FS.w_close(fs); _RELEASE(saved); - if (strstr(Core.Params, "-ss_tga")) { // hq + if (strstr(Core.Params, "-ss_tga")) { // hq xr_sprintf(buf, sizeof(buf), "ssq_%s_%s_(%s).tga", Core.UserName, timestamp(t_stemp), (g_pGameLevel) ? g_pGameLevel->name().c_str() : "mainmenu"); ID3DBlob* saved = 0; @@ -222,7 +222,7 @@ void CRender::ScreenshotImpl(ScreenshotMode mode, LPCSTR name, CMemoryWriter* me _RELEASE(pSrcTexture); } -#else // USE_DX10 +#else // USE_DX10 void CRender::ScreenshotImpl(ScreenshotMode mode, LPCSTR name, CMemoryWriter* memory_writer) { @@ -370,7 +370,7 @@ void CRender::ScreenshotImpl(ScreenshotMode mode, LPCSTR name, CMemoryWriter* me fs->w(saved->GetBufferPointer(), saved->GetBufferSize()); FS.w_close(fs); _RELEASE(saved); - if (strstr(Core.Params, "-ss_tga")) { // hq + if (strstr(Core.Params, "-ss_tga")) { // hq xr_sprintf(buf, sizeof(buf), "ssq_%s_%s_(%s).tga", Core.UserName, timestamp(t_stemp), (g_pGameLevel) ? g_pGameLevel->name().c_str() : "mainmenu"); ID3DBlob* saved = 0; @@ -416,7 +416,7 @@ void CRender::ScreenshotImpl(ScreenshotMode mode, LPCSTR name, CMemoryWriter* me _RELEASE(pFB); } -#endif // USE_DX10 +#endif // USE_DX10 void CRender::Screenshot(ScreenshotMode mode, LPCSTR name) { @@ -478,7 +478,7 @@ void CRender::ScreenshotAsyncEnd(CMemoryWriter& memory_writer) #endif } -#else // USE_DX10 +#else // USE_DX10 void CRender::ScreenshotAsyncEnd(CMemoryWriter& memory_writer) { @@ -498,10 +498,10 @@ void CRender::ScreenshotAsyncEnd(CMemoryWriter& memory_writer) #if RENDER == R_R1 u32 rtWidth = Target->get_rtwidth(); u32 rtHeight = Target->get_rtheight(); -#else // RENDER != R_R1 +#else // RENDER != R_R1 u32 rtWidth = Device.dwWidth; u32 rtHeight = Device.dwHeight; -#endif // RENDER != R_R1 +#endif // RENDER != R_R1 // Image processing (gamma-correct) u32* pPixel = (u32*)D.pBits; @@ -532,7 +532,7 @@ void CRender::ScreenshotAsyncEnd(CMemoryWriter& memory_writer) } } else -#endif // RENDER != R_R1 +#endif // RENDER != R_R1 { for (; pPixel != pEnd; pPixel++) { @@ -550,7 +550,7 @@ void CRender::ScreenshotAsyncEnd(CMemoryWriter& memory_writer) hr = pFB->UnlockRect(); } -#endif // USE_DX10 +#endif // USE_DX10 void DoAsyncScreenshot() { diff --git a/src/Layers/xrRender/r__sector.h b/src/Layers/xrRender/r__sector.h index fd03cd3bea0..89b501a2186 100644 --- a/src/Layers/xrRender/r__sector.h +++ b/src/Layers/xrRender/r__sector.h @@ -66,7 +66,7 @@ class dxRender_Visual; class CSector : public IRender_Sector { protected: - dxRender_Visual* m_root; // whole geometry of that sector + dxRender_Visual* m_root; // whole geometry of that sector xr_vector m_portals; public: @@ -93,18 +93,18 @@ class CPortalTraverser VQ_HOM = (1 << 0), VQ_SSA = (1 << 1), VQ_SCISSOR = (1 << 2), - VQ_FADE = (1 << 3), // requires SSA to work + VQ_FADE = (1 << 3), // requires SSA to work }; public: - u32 i_marker; // input - u32 i_options; // input: culling options - Fvector i_vBase; // input: "view" point - Fmatrix i_mXFORM; // input: 4x4 xform - Fmatrix i_mXFORM_01; // - CSector* i_start; // input: starting point - xr_vector r_sectors; // result - xr_vector> f_portals; // + u32 i_marker; // input + u32 i_options; // input: culling options + Fvector i_vBase; // input: "view" point + Fmatrix i_mXFORM; // input: 4x4 xform + Fmatrix i_mXFORM_01; // + CSector* i_start; // input: starting point + xr_vector r_sectors; // result + xr_vector> f_portals; // ref_shader f_shader; ref_geom f_geom; @@ -122,4 +122,4 @@ class CPortalTraverser extern CPortalTraverser PortalTraverser; -#endif // !defined(AFX_PORTAL_H__1FC2D371_4A19_49EA_BD1E_2D0F8DEBBF15__INCLUDED_) +#endif // !defined(AFX_PORTAL_H__1FC2D371_4A19_49EA_BD1E_2D0F8DEBBF15__INCLUDED_) diff --git a/src/Layers/xrRender/r__sector_traversal.cpp b/src/Layers/xrRender/r__sector_traversal.cpp index 5d130f97655..b8127158185 100644 --- a/src/Layers/xrRender/r__sector_traversal.cpp +++ b/src/Layers/xrRender/r__sector_traversal.cpp @@ -73,7 +73,7 @@ ICF bool psort_pred(const std::pair& _1, const std::pairS.P); float d2 = PortalTraverser.i_vBase.distance_to_sqr(_2.first->S.P); - return d2 > d1; // descending, back to front + return d2 > d1; // descending, back to front } extern float r_ssaDISCARD; extern float r_ssaLOD_A, r_ssaLOD_B; diff --git a/src/Layers/xrRender/r_constants.cpp b/src/Layers/xrRender/r_constants.cpp index ac2a6be844e..5f812ab0aea 100644 --- a/src/Layers/xrRender/r_constants.cpp +++ b/src/Layers/xrRender/r_constants.cpp @@ -129,7 +129,7 @@ BOOL R_constant_table::parse(void* _desc, u32 destination) // We have determined all valuable info, search if constant already created ref_constant C = get(name); if (!C) { - C = new R_constant(); //.g_constant_allocator.create(); + C = new R_constant(); //.g_constant_allocator.create(); C->name = name; C->destination = RC_dest_sampler; C->type = RC_sampler; @@ -160,7 +160,7 @@ BOOL R_constant_table::parse(void* _desc, u32 destination) // We have determined all valuable info, search if constant already created ref_constant C = get(name); if (!C) { - C = new R_constant(); //.g_constant_allocator.create(); + C = new R_constant(); //.g_constant_allocator.create(); C->name = name; C->destination = destination; C->type = type; @@ -181,7 +181,7 @@ BOOL R_constant_table::parse(void* _desc, u32 destination) std::sort(table.begin(), table.end(), p_sort); return TRUE; } -#endif // USE_DX10 +#endif // USE_DX10 /// !!!!!!!!FIX THIS FOR DX11!!!!!!!!! void R_constant_table::merge(R_constant_table* T) @@ -194,7 +194,7 @@ void R_constant_table::merge(R_constant_table* T) ref_constant src = T->table[it]; ref_constant C = get(*src->name); if (!C) { - C = new R_constant(); //.g_constant_allocator.create(); + C = new R_constant(); //.g_constant_allocator.create(); C->name = src->name; C->destination = src->destination; C->type = src->type; @@ -233,18 +233,18 @@ void R_constant_table::merge(R_constant_table* T) m_CBTable.reserve(m_CBTable.size() + T->m_CBTable.size()); for (u32 i = 0; i < T->m_CBTable.size(); ++i) m_CBTable.push_back(T->m_CBTable[i]); -#endif // USE_DX10 +#endif // USE_DX10 } void R_constant_table::clear() { //. for (u32 it = 0; it < table.size(); it++) - table[it] = 0; //.g_constant_allocator.destroy(table[it]); + table[it] = 0; //.g_constant_allocator.destroy(table[it]); table.clear(); #if defined(USE_DX10) || defined(USE_DX11) m_CBTable.clear(); -#endif // +#endif // } BOOL R_constant_table::equal(R_constant_table& C) diff --git a/src/Layers/xrRender/r_constants.h b/src/Layers/xrRender/r_constants.h index 1b03a5cd8fd..633e03b8437 100644 --- a/src/Layers/xrRender/r_constants.h +++ b/src/Layers/xrRender/r_constants.h @@ -4,7 +4,7 @@ #include "xrCore/xr_resource.h" #if defined(USE_DX10) || defined(USE_DX11) #include "Layers/xrRenderDX10/dx10ConstantBuffer.h" -#endif // USE_DX10 +#endif // USE_DX10 class ECORE_API R_constant_setup; @@ -13,50 +13,50 @@ enum RC_float = 0, RC_int = 1, RC_bool = 2, - RC_sampler = 99, // DX9 shares index for sampler and texture - RC_dx10texture = 100, // For DX10 sampler and texture are different resources + RC_sampler = 99, // DX9 shares index for sampler and texture + RC_dx10texture = 100, // For DX10 sampler and texture are different resources RC_dx11UAV = 101 }; enum { - RC_1x1 = 0, // vector1, or scalar - RC_1x4, // vector4 - RC_1x3, // vector3 - RC_1x2, // vector2 - RC_2x4, // 4x2 matrix, transpose - RC_3x4, // 4x3 matrix, transpose - RC_4x4, // 4x4 matrix, transpose - RC_1x4a, // array: vector4 - RC_3x4a, // array: 4x3 matrix, transpose - RC_4x4a // array: 4x4 matrix, transpose + RC_1x1 = 0, // vector1, or scalar + RC_1x4, // vector4 + RC_1x3, // vector3 + RC_1x2, // vector2 + RC_2x4, // 4x2 matrix, transpose + RC_3x4, // 4x3 matrix, transpose + RC_4x4, // 4x4 matrix, transpose + RC_1x4a, // array: vector4 + RC_3x4a, // array: 4x3 matrix, transpose + RC_4x4a // array: 4x4 matrix, transpose }; enum { // Don't change this since some code relies on magic numbers RC_dest_pixel = (1 << 0), RC_dest_vertex = (1 << 1), - RC_dest_sampler = (1 << 2), // For DX10 it's either sampler or texture - RC_dest_geometry = (1 << 3), // DX10 only - RC_dest_hull = (1 << 4), // DX11 only - RC_dest_domain = (1 << 5), // DX11 only - RC_dest_compute = (1 << 6), // DX11 only - RC_dest_compute_cb_index_mask = 0xF0000000, // Buffer index == 0..14 + RC_dest_sampler = (1 << 2), // For DX10 it's either sampler or texture + RC_dest_geometry = (1 << 3), // DX10 only + RC_dest_hull = (1 << 4), // DX11 only + RC_dest_domain = (1 << 5), // DX11 only + RC_dest_compute = (1 << 6), // DX11 only + RC_dest_compute_cb_index_mask = 0xF0000000, // Buffer index == 0..14 RC_dest_compute_cb_index_shift = 28, - RC_dest_domain_cb_index_mask = 0x0F000000, // Buffer index == 0..14 + RC_dest_domain_cb_index_mask = 0x0F000000, // Buffer index == 0..14 RC_dest_domain_cb_index_shift = 24, - RC_dest_hull_cb_index_mask = 0x00F00000, // Buffer index == 0..14 + RC_dest_hull_cb_index_mask = 0x00F00000, // Buffer index == 0..14 RC_dest_hull_cb_index_shift = 20, - RC_dest_pixel_cb_index_mask = 0x000F0000, // Buffer index == 0..14 + RC_dest_pixel_cb_index_mask = 0x000F0000, // Buffer index == 0..14 RC_dest_pixel_cb_index_shift = 16, - RC_dest_vertex_cb_index_mask = 0x0000F000, // Buffer index == 0..14 + RC_dest_vertex_cb_index_mask = 0x0000F000, // Buffer index == 0..14 RC_dest_vertex_cb_index_shift = 12, - RC_dest_geometry_cb_index_mask = 0x00000F00, // Buffer index == 0..14 + RC_dest_geometry_cb_index_mask = 0x00000F00, // Buffer index == 0..14 RC_dest_geometry_cb_index_shift = 8, }; -enum // Constant buffer index masks +enum // Constant buffer index masks { - CB_BufferIndexMask = 0xF, // Buffer index == 0..14 + CB_BufferIndexMask = 0xF, // Buffer index == 0..14 CB_BufferTypeMask = 0x70, CB_BufferPixelShader = 0x10, @@ -69,8 +69,8 @@ enum // Constant buffer index masks struct ECORE_API R_constant_load { - u16 index; // linear index (pixel) - u16 cls; // element class + u16 index; // linear index (pixel) + u16 cls; // element class R_constant_load() : index(u16(-1)), cls(u16(-1)){}; @@ -79,9 +79,9 @@ struct ECORE_API R_constant_load struct ECORE_API R_constant : public xr_resource { - shared_str name; // HLSL-name - u16 type; // float=0/integer=1/boolean=2 - u32 destination; // pixel/vertex/(or both)/sampler + shared_str name; // HLSL-name + u16 type; // float=0/integer=1/boolean=2 + u32 destination; // pixel/vertex/(or both)/sampler R_constant_load ps; R_constant_load vs; @@ -92,7 +92,7 @@ struct ECORE_API R_constant : public xr_resource R_constant_load ds; R_constant_load cs; #endif -#endif // USE_DX10 +#endif // USE_DX10 R_constant_load samp; R_constant_setup* handler; @@ -145,14 +145,14 @@ class ECORE_API R_constant_table : public xr_resource_flagged typedef std::pair cb_table_record; typedef xr_vector cb_table; cb_table m_CBTable; -#endif // USE_DX10 +#endif // USE_DX10 private: void fatal(LPCSTR s); #if defined(USE_DX10) || defined(USE_DX11) BOOL parseConstants(ID3DShaderReflectionConstantBuffer* pTable, u32 destination); BOOL parseResources(ID3DShaderReflection* pReflection, int ResNum, u32 destination); -#endif // USE_DX10 +#endif // USE_DX10 public: ~R_constant_table(); @@ -160,8 +160,8 @@ class ECORE_API R_constant_table : public xr_resource_flagged void clear(); BOOL parse(void* desc, u32 destination); void merge(R_constant_table* C); - ref_constant get(LPCSTR name); // slow search - ref_constant get(shared_str& name); // fast search + ref_constant get(LPCSTR name); // slow search + ref_constant get(shared_str& name); // fast search BOOL equal(R_constant_table& C); BOOL equal(R_constant_table* C) { return equal(*C); } @@ -172,6 +172,6 @@ typedef resptr_core> ref_ctable; #if defined(USE_DX10) || defined(USE_DX11) #include "../xrRenderDX10/dx10ConstantBuffer_impl.h" -#endif // USE_DX10 +#endif // USE_DX10 #endif diff --git a/src/Layers/xrRender/r_constants_cache.h b/src/Layers/xrRender/r_constants_cache.h index 84c1f750a28..0ce5b6c8e74 100644 --- a/src/Layers/xrRender/r_constants_cache.h +++ b/src/Layers/xrRender/r_constants_cache.h @@ -6,9 +6,9 @@ #if defined(USE_DX10) || defined(USE_DX11) #include "Layers/xrRenderDX10/dx10r_constants_cache.h" -#else // USE_DX10 +#else // USE_DX10 #include "Layers/xrRenderDX9/dx9r_constants_cache.h" -#endif // USE_DX10 +#endif // USE_DX10 /* template diff --git a/src/Layers/xrRender/r_sun_cascades.h b/src/Layers/xrRender/r_sun_cascades.h index e5bc536f21a..7869a99584d 100644 --- a/src/Layers/xrRender/r_sun_cascades.h +++ b/src/Layers/xrRender/r_sun_cascades.h @@ -20,4 +20,4 @@ struct cascade bool reset_chain; }; -} // namespace sun \ No newline at end of file +} // namespace sun \ No newline at end of file diff --git a/src/Layers/xrRender/stats_manager.cpp b/src/Layers/xrRender/stats_manager.cpp index ea829b46bcf..03041e63b17 100644 --- a/src/Layers/xrRender/stats_manager.cpp +++ b/src/Layers/xrRender/stats_manager.cpp @@ -175,9 +175,9 @@ void stats_manager::decrement_stats(u32 size, enum_stats_buffer_type type, _D3DP break; } } - R_ASSERT(find); // "Specified buffer not fount in the buffers list. - // The buffer may not incremented to stats or it already was removed" -#endif // DEBUG + R_ASSERT(find); // "Specified buffer not fount in the buffers list. + // The buffer may not incremented to stats or it already was removed" +#endif // DEBUG memory_usage_summary[type][location] -= size; } diff --git a/src/Layers/xrRender/stats_manager.h b/src/Layers/xrRender/stats_manager.h index 95da93d1036..7d0e54e331f 100644 --- a/src/Layers/xrRender/stats_manager.h +++ b/src/Layers/xrRender/stats_manager.h @@ -43,11 +43,11 @@ class stats_manager u32 size; enum_stats_buffer_type type; _D3DPOOL location; - }; // stats_item + }; // stats_item xr_vector m_buffers_list; #endif -}; // class stats_manager +}; // class stats_manager u32 get_format_pixel_size(D3DFORMAT format); @@ -55,4 +55,4 @@ u32 get_format_pixel_size(D3DFORMAT format); u32 get_format_pixel_size(DXGI_FORMAT format); #endif -#endif // #ifndef STATS_MANAGER_H_INCLUDED \ No newline at end of file +#endif // #ifndef STATS_MANAGER_H_INCLUDED \ No newline at end of file diff --git a/src/Layers/xrRender/tss.h b/src/Layers/xrRender/tss.h index fd802031325..17cf85aa61a 100644 --- a/src/Layers/xrRender/tss.h +++ b/src/Layers/xrRender/tss.h @@ -10,13 +10,13 @@ enum XRDX10SAMPLERSTATETYPE XRDX10SAMP_ANISOTROPICFILTER = 256, XRDX10SAMP_COMPARISONFILTER, XRDX10SAMP_COMPARISONFUNC, - XRDX10SAMP_MINLOD // integer value. 0 - the most detailed level + XRDX10SAMP_MINLOD // integer value. 0 - the most detailed level }; enum XRDX10RENDERSTATETYPE { XRDX10RS_ALPHATOCOVERAGE = 1024 }; -#endif // USE_DX10 +#endif // USE_DX10 class CSimulatorTSS { diff --git a/src/Layers/xrRender/tss_def.cpp b/src/Layers/xrRender/tss_def.cpp index aef271b48ef..05f67bf1bee 100644 --- a/src/Layers/xrRender/tss_def.cpp +++ b/src/Layers/xrRender/tss_def.cpp @@ -9,7 +9,7 @@ IDirect3DStateBlock9* SimulatorStates::record() #if defined(USE_DX10) || defined(USE_DX11) // VERIFY(!"SimulatorStates::record not implemented!"); return 0; -#else // USE_DX10 +#else // USE_DX10 CHK_DX(HW.pDevice->BeginStateBlock()); for (u32 it = 0; it < States.size(); it++) { @@ -30,7 +30,7 @@ IDirect3DStateBlock9* SimulatorStates::record() IDirect3DStateBlock9* SB = 0; CHK_DX(HW.pDevice->EndStateBlock(&SB)); return SB; -#endif // USE_DX10 +#endif // USE_DX10 } void SimulatorStates::set_RS(u32 a, u32 b) @@ -507,4 +507,4 @@ void SimulatorStates::UpdateDesc(D3D_SAMPLER_DESC descArray[D3D_COMMONSHADER_SAM } } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/tss_def.h b/src/Layers/xrRender/tss_def.h index 53ed96a731a..64c52d51557 100644 --- a/src/Layers/xrRender/tss_def.h +++ b/src/Layers/xrRender/tss_def.h @@ -8,7 +8,7 @@ class SimulatorStates private: struct State { - u32 type; // 0=RS, 1=TSS + u32 type; // 0=RS, 1=TSS u32 v1, v2, v3; IC void set_RS(u32 a, u32 b) @@ -51,6 +51,6 @@ class SimulatorStates void UpdateDesc(D3D_BLEND_DESC& desc) const; void UpdateDesc(D3D_SAMPLER_DESC descArray[D3D_COMMONSHADER_SAMPLER_SLOT_COUNT], bool SamplerUsed[D3D_COMMONSHADER_SAMPLER_SLOT_COUNT], int iBaseSamplerIndex) const; -#endif // USE_DX10 +#endif // USE_DX10 }; #endif diff --git a/src/Layers/xrRender/uber_deffer.cpp b/src/Layers/xrRender/uber_deffer.cpp index 05e3bdf901b..4c0f377807d 100644 --- a/src/Layers/xrRender/uber_deffer.cpp +++ b/src/Layers/xrRender/uber_deffer.cpp @@ -7,7 +7,7 @@ void uber_deffer( { // Uber-parse string256 fname, fnameA, fnameB; - xr_strcpy(fname, *C.L_textures[0]); //. andy if (strext(fname)) *strext(fname)=0; + xr_strcpy(fname, *C.L_textures[0]); //. andy if (strext(fname)) *strext(fname)=0; fix_texture_name(fname); ref_texture _t; _t.create(fname); @@ -74,7 +74,7 @@ void uber_deffer( if (hq && (C.bDetail_Diffuse || C.bDetail_Bump)) { xr_strcat(vs, "_d"); if (bHasDetailBump) - xr_strcat(ps, "_db"); // bump & detail & hq + xr_strcat(ps, "_db"); // bump & detail & hq else xr_strcat(ps, "_d"); } @@ -90,7 +90,7 @@ void uber_deffer( #if defined(USE_DX10) || defined(USE_DX11) #ifdef USE_DX11 if (bump && hq && RImplementation.o.dx11_enable_tessellation && C.TessMethod != 0) { - char hs[256], ds[256]; // = "DX11\\tess", ds[256] = "DX11\\tess"; + char hs[256], ds[256]; // = "DX11\\tess", ds[256] = "DX11\\tess"; char params[256] = "("; if (C.TessMethod == CBlender_Compile::TESS_PN || C.TessMethod == CBlender_Compile::TESS_PN_HM) { @@ -136,7 +136,7 @@ void uber_deffer( } if (ps_r2_ls_flags_ext.test(R2FLAGEXT_WIREFRAME)) C.R().SetRS(D3DRS_FILLMODE, D3DFILL_WIREFRAME); C.r_dx10Texture("s_tbump", fnameA); - C.r_dx10Texture("s_tbumpX", fnameB); // should be before base bump + C.r_dx10Texture("s_tbumpX", fnameB); // should be before base bump if (bHasDetailBump) { C.r_dx10Texture("s_tdetailBumpX", texDetailBumpX); } @@ -144,18 +144,23 @@ void uber_deffer( else #endif C.r_Pass(vs, ps, FALSE); - // C.r_Sampler ("s_base", C.L_textures[0], false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, + // C.r_Sampler ("s_base", C.L_textures[0], false, D3DTADDRESS_WRAP, + // D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, // D3DTEXF_ANISOTROPIC); - // C.r_Sampler ("s_bumpX", fnameB, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, + // C.r_Sampler ("s_bumpX", fnameB, false, D3DTADDRESS_WRAP, + // D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, // D3DTEXF_ANISOTROPIC); // should be before base bump - // C.r_Sampler ("s_bump", fnameA, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, + // C.r_Sampler ("s_bump", fnameA, false, D3DTADDRESS_WRAP, + // D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, // D3DTEXF_ANISOTROPIC); - // C.r_Sampler ("s_bumpD", dt, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, + // C.r_Sampler ("s_bumpD", dt, false, D3DTADDRESS_WRAP, + // D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, // D3DTEXF_ANISOTROPIC); - // C.r_Sampler ("s_detail", dt, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, + // C.r_Sampler ("s_detail", dt, false, D3DTADDRESS_WRAP, + // D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR, // D3DTEXF_ANISOTROPIC); C.r_dx10Texture("s_base", C.L_textures[0]); - C.r_dx10Texture("s_bumpX", fnameB); // should be before base bump + C.r_dx10Texture("s_bumpX", fnameB); // should be before base bump C.r_dx10Texture("s_bump", fnameA); C.r_dx10Texture("s_bumpD", dt); C.r_dx10Texture("s_detail", dt); @@ -170,7 +175,7 @@ void uber_deffer( C.r_dx10Texture("s_hemi", C.L_textures[2]); C.r_dx10Sampler("smp_rtlinear"); } -#else // USE_DX10 +#else // USE_DX10 C.r_Pass(vs, ps, FALSE); VERIFY(C.L_textures[0].size()); if (bump) { @@ -184,7 +189,7 @@ void uber_deffer( C.r_Sampler( "s_base", C.L_textures[0], false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC, D3DTEXF_LINEAR, D3DTEXF_ANISOTROPIC); C.r_Sampler("s_bumpX", fnameB, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC, D3DTEXF_LINEAR, - D3DTEXF_ANISOTROPIC); // should be before base bump + D3DTEXF_ANISOTROPIC); // should be before base bump C.r_Sampler("s_bump", fnameA, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC, D3DTEXF_LINEAR, D3DTEXF_ANISOTROPIC); C.r_Sampler("s_bumpD", dt, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC, D3DTEXF_LINEAR, D3DTEXF_ANISOTROPIC); C.r_Sampler("s_detail", dt, false, D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC, D3DTEXF_LINEAR, D3DTEXF_ANISOTROPIC); @@ -196,7 +201,7 @@ void uber_deffer( } if (lmap) C.r_Sampler("s_hemi", C.L_textures[2], false, D3DTADDRESS_CLAMP, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR); -#endif // USE_DX10 +#endif // USE_DX10 if (!DO_NOT_FINISH) C.r_End(); } @@ -206,7 +211,7 @@ void uber_shadow(CBlender_Compile& C, LPCSTR _vspec) { // Uber-parse string256 fname, fnameA, fnameB; - xr_strcpy(fname, *C.L_textures[0]); //. andy if (strext(fname)) *strext(fname)=0; + xr_strcpy(fname, *C.L_textures[0]); //. andy if (strext(fname)) *strext(fname)=0; fix_texture_name(fname); ref_texture _t; _t.create(fname); @@ -253,7 +258,7 @@ void uber_shadow(CBlender_Compile& C, LPCSTR _vspec) } if (bump && RImplementation.o.dx11_enable_tessellation && C.TessMethod != 0) { - char hs[256], ds[256]; // = "DX11\\tess", ds[256] = "DX11\\tess"; + char hs[256], ds[256]; // = "DX11\\tess", ds[256] = "DX11\\tess"; char params[256] = "("; if (C.TessMethod == CBlender_Compile::TESS_PN || C.TessMethod == CBlender_Compile::TESS_PN_HM) { @@ -290,7 +295,7 @@ void uber_shadow(CBlender_Compile& C, LPCSTR _vspec) C.r_TessPass(vs, hs, ds, "null", "dumb", FALSE, TRUE, TRUE, FALSE); RImplementation.clearAllShaderOptions(); C.r_dx10Texture("s_base", C.L_textures[0]); - C.r_dx10Texture("s_bumpX", fnameB); // should be before base bump + C.r_dx10Texture("s_bumpX", fnameB); // should be before base bump C.r_dx10Texture("s_bump", fnameA); if (bHasDetailBump) { C.r_dx10Texture("s_detailBump", texDetailBump); diff --git a/src/Layers/xrRender/xrD3DDefs.h b/src/Layers/xrRender/xrD3DDefs.h index fb37b76e7b1..738877b5dfa 100644 --- a/src/Layers/xrRender/xrD3DDefs.h +++ b/src/Layers/xrRender/xrD3DDefs.h @@ -4,7 +4,7 @@ #if defined(USE_DX11) || defined(USE_DX10) #include "Layers/xrRenderDX10/DXCommonTypes.h" -#else // USE_DX10 +#else // USE_DX10 typedef IDirect3DVertexShader9 ID3DVertexShader; typedef IDirect3DPixelShader9 ID3DPixelShader; @@ -28,6 +28,6 @@ typedef IDirect3DStateBlock9 ID3DState; { \ } while (0) -#endif // USE_DX10 +#endif // USE_DX10 -#endif // xrD3DDefs_included +#endif // xrD3DDefs_included diff --git a/src/Layers/xrRender/xrRender_console.cpp b/src/Layers/xrRender/xrRender_console.cpp index 79c939f997f..e290efc977d 100644 --- a/src/Layers/xrRender/xrRender_console.cpp +++ b/src/Layers/xrRender/xrRender_console.cpp @@ -19,23 +19,23 @@ xr_token qssao_token[] = {{"st_opt_off", 0}, {"st_opt_low", 1}, {"st_opt_medium" #endif {0, 0}}; -u32 ps_r_sun_quality = 1; // = 0; +u32 ps_r_sun_quality = 1; // = 0; xr_token qsun_quality_token[] = {{"st_opt_low", 0}, {"st_opt_medium", 1}, {"st_opt_high", 2}, #if defined(USE_DX10) || defined(USE_DX11) {"st_opt_ultra", 3}, {"st_opt_extreme", 4}, -#endif // USE_DX10 +#endif // USE_DX10 {0, 0}}; -u32 ps_r3_msaa = 0; // = 0; +u32 ps_r3_msaa = 0; // = 0; xr_token qmsaa_token[] = {{"st_opt_off", 0}, {"2x", 1}, {"4x", 2}, // { "8x", 3 }, {0, 0}}; -u32 ps_r3_msaa_atest = 0; // = 0; +u32 ps_r3_msaa_atest = 0; // = 0; xr_token qmsaa__atest_token[] = { {"st_opt_off", 0}, {"st_opt_atest_msaa_dx10_0", 1}, {"st_opt_atest_msaa_dx10_1", 2}, {0, 0}}; -u32 ps_r3_minmax_sm = 3; // = 0; +u32 ps_r3_minmax_sm = 3; // = 0; xr_token qminmax_sm_token[] = {{"off", 0}, {"on", 1}, {"auto", 2}, {"autodetect", 3}, {0, 0}}; // “Off” @@ -58,7 +58,7 @@ float ps_r__Tree_w_rot = 10.0f; float ps_r__Tree_w_speed = 1.00f; float ps_r__Tree_w_amp = 0.005f; Fvector ps_r__Tree_Wave = {.1f, .01f, .11f}; -float ps_r__Tree_SBC = 1.5f; // scale bias correct +float ps_r__Tree_SBC = 1.5f; // scale bias correct float ps_r__WallmarkTTL = 50.f; float ps_r__WallmarkSHIFT = 0.0001f; @@ -68,9 +68,9 @@ float ps_r__GLOD_ssa_start = 256.f; float ps_r__GLOD_ssa_end = 64.f; float ps_r__LOD = 0.75f; //. float ps_r__LOD_Power = 1.5f ; -float ps_r__ssaDISCARD = 3.5f; // RO -float ps_r__ssaDONTSORT = 32.f; // RO -float ps_r__ssaHZBvsTEX = 96.f; // RO +float ps_r__ssaDISCARD = 3.5f; // RO +float ps_r__ssaDONTSORT = 32.f; // RO +float ps_r__ssaHZBvsTEX = 96.f; // RO int ps_r__tf_Anisotropic = 8; @@ -78,16 +78,16 @@ int ps_r__tf_Anisotropic = 8; float ps_r1_ssaLOD_A = 64.f; float ps_r1_ssaLOD_B = 48.f; float ps_r1_tf_Mipbias = 0.0f; -Flags32 ps_r1_flags = {R1FLAG_DLIGHTS}; // r1-only +Flags32 ps_r1_flags = {R1FLAG_DLIGHTS}; // r1-only float ps_r1_lmodel_lerp = 0.1f; float ps_r1_dlights_clip = 40.f; float ps_r1_pps_u = 0.f; float ps_r1_pps_v = 0.f; // R1-specific -int ps_r1_GlowsPerFrame = 16; // r1-only -float ps_r1_fog_luminance = 1.1f; // r1-only -int ps_r1_SoftwareSkinning = 0; // r1-only +int ps_r1_GlowsPerFrame = 16; // r1-only +float ps_r1_fog_luminance = 1.1f; // r1-only +int ps_r1_SoftwareSkinning = 0; // r1-only // R2 float ps_r2_ssaLOD_A = 64.f; @@ -103,70 +103,70 @@ Flags32 ps_r2_ls_flags = {R2FLAG_SUN //| R3FLAG_MSAA_OPT | R3FLAG_GBUFFER_OPT | R2FLAG_DETAIL_BUMP | R2FLAG_DOF | R2FLAG_SOFT_PARTICLES | R2FLAG_SOFT_WATER | R2FLAG_STEEP_PARALLAX | R2FLAG_SUN_FOCUS | R2FLAG_SUN_TSM | - R2FLAG_TONEMAP | R2FLAG_VOLUMETRIC_LIGHTS}; // r2-only + R2FLAG_TONEMAP | R2FLAG_VOLUMETRIC_LIGHTS}; // r2-only Flags32 ps_r2_ls_flags_ext = { /*R2FLAGEXT_SSAO_OPT_DATA |*/ R2FLAGEXT_SSAO_HALF_DATA | R2FLAGEXT_ENABLE_TESSELLATION}; float ps_r2_df_parallax_h = 0.02f; float ps_r2_df_parallax_range = 75.f; -float ps_r2_tonemap_middlegray = 1.f; // r2-only -float ps_r2_tonemap_adaptation = 1.f; // r2-only -float ps_r2_tonemap_low_lum = 0.0001f; // r2-only -float ps_r2_tonemap_amount = 0.7f; // r2-only -float ps_r2_ls_bloom_kernel_g = 3.f; // r2-only -float ps_r2_ls_bloom_kernel_b = .7f; // r2-only -float ps_r2_ls_bloom_speed = 100.f; // r2-only -float ps_r2_ls_bloom_kernel_scale = .7f; // r2-only // gauss -float ps_r2_ls_dsm_kernel = .7f; // r2-only -float ps_r2_ls_psm_kernel = .7f; // r2-only -float ps_r2_ls_ssm_kernel = .7f; // r2-only -float ps_r2_ls_bloom_threshold = .00001f; // r2-only -Fvector ps_r2_aa_barier = {.8f, .1f, 0}; // r2-only -Fvector ps_r2_aa_weight = {.25f, .25f, 0}; // r2-only -float ps_r2_aa_kernel = .5f; // r2-only -float ps_r2_mblur = .0f; // .5f -int ps_r2_GI_depth = 1; // 1..5 -int ps_r2_GI_photons = 16; // 8..64 -float ps_r2_GI_clip = EPS_L; // EPS -float ps_r2_GI_refl = .9f; // .9f -float ps_r2_ls_depth_scale = 1.00001f; // 1.00001f -float ps_r2_ls_depth_bias = -0.0003f; // -0.0001f -float ps_r2_ls_squality = 1.0f; // 1.00f -float ps_r2_sun_tsm_projection = 0.3f; // 0.18f -float ps_r2_sun_tsm_bias = -0.01f; // -float ps_r2_sun_near = 20.f; // 12.0f - -extern float OLES_SUN_LIMIT_27_01_07; // actually sun_far - -float ps_r2_sun_near_border = 0.75f; // 1.0f -float ps_r2_sun_depth_far_scale = 1.00000f; // 1.00001f -float ps_r2_sun_depth_far_bias = -0.00002f; // -0.0000f -float ps_r2_sun_depth_near_scale = 1.0000f; // 1.00001f -float ps_r2_sun_depth_near_bias = 0.00001f; // -0.00005f -float ps_r2_sun_lumscale = 1.0f; // 1.0f -float ps_r2_sun_lumscale_hemi = 1.0f; // 1.0f +float ps_r2_tonemap_middlegray = 1.f; // r2-only +float ps_r2_tonemap_adaptation = 1.f; // r2-only +float ps_r2_tonemap_low_lum = 0.0001f; // r2-only +float ps_r2_tonemap_amount = 0.7f; // r2-only +float ps_r2_ls_bloom_kernel_g = 3.f; // r2-only +float ps_r2_ls_bloom_kernel_b = .7f; // r2-only +float ps_r2_ls_bloom_speed = 100.f; // r2-only +float ps_r2_ls_bloom_kernel_scale = .7f; // r2-only // gauss +float ps_r2_ls_dsm_kernel = .7f; // r2-only +float ps_r2_ls_psm_kernel = .7f; // r2-only +float ps_r2_ls_ssm_kernel = .7f; // r2-only +float ps_r2_ls_bloom_threshold = .00001f; // r2-only +Fvector ps_r2_aa_barier = {.8f, .1f, 0}; // r2-only +Fvector ps_r2_aa_weight = {.25f, .25f, 0}; // r2-only +float ps_r2_aa_kernel = .5f; // r2-only +float ps_r2_mblur = .0f; // .5f +int ps_r2_GI_depth = 1; // 1..5 +int ps_r2_GI_photons = 16; // 8..64 +float ps_r2_GI_clip = EPS_L; // EPS +float ps_r2_GI_refl = .9f; // .9f +float ps_r2_ls_depth_scale = 1.00001f; // 1.00001f +float ps_r2_ls_depth_bias = -0.0003f; // -0.0001f +float ps_r2_ls_squality = 1.0f; // 1.00f +float ps_r2_sun_tsm_projection = 0.3f; // 0.18f +float ps_r2_sun_tsm_bias = -0.01f; // +float ps_r2_sun_near = 20.f; // 12.0f + +extern float OLES_SUN_LIMIT_27_01_07; // actually sun_far + +float ps_r2_sun_near_border = 0.75f; // 1.0f +float ps_r2_sun_depth_far_scale = 1.00000f; // 1.00001f +float ps_r2_sun_depth_far_bias = -0.00002f; // -0.0000f +float ps_r2_sun_depth_near_scale = 1.0000f; // 1.00001f +float ps_r2_sun_depth_near_bias = 0.00001f; // -0.00005f +float ps_r2_sun_lumscale = 1.0f; // 1.0f +float ps_r2_sun_lumscale_hemi = 1.0f; // 1.0f float ps_r2_sun_lumscale_amb = 1.0f; -float ps_r2_gmaterial = 2.2f; // -float ps_r2_zfill = 0.25f; // .1f +float ps_r2_gmaterial = 2.2f; // +float ps_r2_zfill = 0.25f; // .1f -float ps_r2_dhemi_sky_scale = 0.08f; // 1.5f +float ps_r2_dhemi_sky_scale = 0.08f; // 1.5f float ps_r2_dhemi_light_scale = 0.2f; float ps_r2_dhemi_light_flow = 0.1f; -int ps_r2_dhemi_count = 5; // 5 +int ps_r2_dhemi_count = 5; // 5 int ps_r2_wait_sleep = 0; -float ps_r2_lt_smooth = 1.f; // 1.f -float ps_r2_slight_fade = 0.5f; // 1.f +float ps_r2_lt_smooth = 1.f; // 1.f +float ps_r2_slight_fade = 0.5f; // 1.f // x - min (0), y - focus (1.4), z - max (100) Fvector3 ps_r2_dof = Fvector3().set(-1.25f, 1.4f, 600.f); -float ps_r2_dof_sky = 30; // distance to sky -float ps_r2_dof_kernel_size = 5.0f; // 7.0f +float ps_r2_dof_sky = 30; // distance to sky +float ps_r2_dof_kernel_size = 5.0f; // 7.0f -float ps_r3_dyn_wet_surf_near = 10.f; // 10.0f -float ps_r3_dyn_wet_surf_far = 30.f; // 30.0f -int ps_r3_dyn_wet_surf_sm_res = 256; // 256 +float ps_r3_dyn_wet_surf_near = 10.f; // 10.0f +float ps_r3_dyn_wet_surf_far = 30.f; // 30.0f +int ps_r3_dyn_wet_surf_sm_res = 256; // 256 //- Mad Max float ps_r2_gloss_factor = 4.0f; @@ -177,7 +177,7 @@ float ps_r2_gloss_factor = 4.0f; #if defined(USE_DX10) || defined(USE_DX11) #include "Layers/xrRenderDX10/StateManager/dx10SamplerStateCache.h" -#endif // USE_DX10 +#endif // USE_DX10 //----------------------------------------------------------------------- class CCC_tf_Aniso : public CCC_Integer @@ -190,10 +190,10 @@ class CCC_tf_Aniso : public CCC_Integer clamp(val, 1, 16); #if defined(USE_DX10) || defined(USE_DX11) SSManager.SetMaxAnisotropy(val); -#else // USE_DX10 +#else // USE_DX10 for (u32 i = 0; i < HW.Caps.raster.dwStages; i++) CHK_DX(HW.pDevice->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, val)); -#endif // USE_DX10 +#endif // USE_DX10 } CCC_tf_Aniso(LPCSTR N, int* v) : CCC_Integer(N, v, 1, 16){}; virtual void Execute(LPCSTR args) @@ -217,10 +217,10 @@ class CCC_tf_MipBias : public CCC_Float #if defined(USE_DX10) || defined(USE_DX11) // TODO: DX10: Implement mip bias control // VERIFY(!"apply not implmemented."); -#else // USE_DX10 +#else // USE_DX10 for (u32 i = 0; i < HW.Caps.raster.dwStages; i++) CHK_DX(HW.pDevice->SetSamplerState(i, D3DSAMP_MIPMAPLODBIAS, *((LPDWORD)value))); -#endif // USE_DX10 +#endif // USE_DX10 } CCC_tf_MipBias(LPCSTR N, float* v) : CCC_Float(N, v, -0.5f, +0.5f){}; @@ -433,7 +433,7 @@ class CCC_BuildSSA : public IConsole_Command // TODO: DX10: Implement pixel calculator r_pixel_calculator c; c.run(); -#endif // USE_DX10 +#endif // USE_DX10 } }; #endif @@ -575,8 +575,8 @@ class CCC_Fog_Reload : public IConsole_Command CCC_Fog_Reload(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = TRUE; }; virtual void Execute(LPCSTR args) { FluidManager.UpdateProfiles(); } }; -#endif // DEBUG -#endif // (RENDER == R_R3) || (RENDER == R_R4) +#endif // DEBUG +#endif // (RENDER == R_R3) || (RENDER == R_R4) //----------------------------------------------------------------------- void xrRender_initconsole() @@ -586,7 +586,7 @@ void xrRender_initconsole() CMD4(CCC_Integer, "rs_skeleton_update", &psSkeletonUpdate, 2, 128); #ifdef DEBUG CMD1(CCC_DumpResources, "dump_resources"); -#endif // DEBUG +#endif // DEBUG CMD4(CCC_Float, "r__dtex_range", &r__dtex_range, 5, 175); @@ -605,7 +605,7 @@ void xrRender_initconsole() CMD4(CCC_Float, "r__wallmark_shift_pp", &ps_r__WallmarkSHIFT, 0.0f, 1.f); CMD4(CCC_Float, "r__wallmark_shift_v", &ps_r__WallmarkSHIFT_V, 0.0f, 1.f); CMD1(CCC_ModelPoolStat, "stat_models"); -#endif // DEBUG +#endif // DEBUG CMD4(CCC_Float, "r__wallmark_ttl", &ps_r__WallmarkTTL, 1.0f, 5.f * 60.f); CMD4(CCC_Integer, "r__supersample", &ps_r__Supersample, 1, 8); @@ -629,15 +629,15 @@ void xrRender_initconsole() tw_min.set(EPS, EPS, EPS); tw_max.set(2, 2, 2); CMD4(CCC_Vector3, "r__d_tree_wave", &ps_r__Tree_Wave, tw_min, tw_max); -#endif // DEBUG +#endif // DEBUG - CMD2(CCC_tf_Aniso, "r__tf_aniso", &ps_r__tf_Anisotropic); // {1..16} + CMD2(CCC_tf_Aniso, "r__tf_aniso", &ps_r__tf_Anisotropic); // {1..16} // R1 CMD4(CCC_Float, "r1_ssa_lod_a", &ps_r1_ssaLOD_A, 16, 96); CMD4(CCC_Float, "r1_ssa_lod_b", &ps_r1_ssaLOD_B, 16, 64); CMD4(CCC_Float, "r1_lmodel_lerp", &ps_r1_lmodel_lerp, 0, 0.333f); - CMD2(CCC_tf_MipBias, "r1_tf_mipbias", &ps_r1_tf_Mipbias); // {-3 +3} + CMD2(CCC_tf_MipBias, "r1_tf_mipbias", &ps_r1_tf_Mipbias); // {-3 +3} CMD3(CCC_Mask, "r1_dlights", &ps_r1_flags, R1FLAG_DLIGHTS); CMD4(CCC_Float, "r1_dlights_clip", &ps_r1_dlights_clip, 10.f, 150.f); CMD4(CCC_Float, "r1_pps_u", &ps_r1_pps_u, -1.f, +1.f); @@ -689,7 +689,7 @@ void xrRender_initconsole() #ifdef DEBUG CMD3(CCC_Mask, "r2_use_nvdbt", &ps_r2_ls_flags, R2FLAG_USE_NVDBT); CMD3(CCC_Mask, "r2_mt", &ps_r2_ls_flags, R2FLAG_EXP_MT_CALC); -#endif // DEBUG +#endif // DEBUG CMD3(CCC_Mask, "r2_sun", &ps_r2_ls_flags, R2FLAG_SUN); CMD3(CCC_Mask, "r2_sun_details", &ps_r2_ls_flags, R2FLAG_SUN_DETAILS); @@ -737,7 +737,7 @@ void xrRender_initconsole() CMD3(CCC_Mask, "r2_shadow_cascede_zcul", &ps_r2_ls_flags_ext, R2FLAGEXT_SUN_ZCULLING); CMD3(CCC_Mask, "r2_shadow_cascede_old", &ps_r2_ls_flags_ext, R2FLAGEXT_SUN_OLD); -#endif // DEBUG +#endif // DEBUG CMD4(CCC_Float, "r2_ls_depth_scale", &ps_r2_ls_depth_scale, 0.5, 1.5); CMD4(CCC_Float, "r2_ls_depth_bias", &ps_r2_ls_depth_bias, -0.5, +0.5); @@ -775,13 +775,13 @@ void xrRender_initconsole() CMD3(CCC_Token, "r2_sun_shafts", &ps_r_sun_shafts, qsun_shafts_token); CMD3(CCC_SSAO_Mode, "r2_ssao_mode", &ps_r_ssao_mode, qssao_mode_token); CMD3(CCC_Token, "r2_ssao", &ps_r_ssao, qssao_token); - CMD3(CCC_Mask, "r2_ssao_blur", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_BLUR); // Need restart - CMD3(CCC_Mask, "r2_ssao_opt_data", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_OPT_DATA); // Need restart - CMD3(CCC_Mask, "r2_ssao_half_data", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_HALF_DATA); // Need restart - CMD3(CCC_Mask, "r2_ssao_hbao", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_HBAO); // Need restart - CMD3(CCC_Mask, "r2_ssao_hdao", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_HDAO); // Need restart - CMD3(CCC_Mask, "r4_enable_tessellation", &ps_r2_ls_flags_ext, R2FLAGEXT_ENABLE_TESSELLATION); // Need restart - CMD3(CCC_Mask, "r4_wireframe", &ps_r2_ls_flags_ext, R2FLAGEXT_WIREFRAME); // Need restart + CMD3(CCC_Mask, "r2_ssao_blur", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_BLUR); // Need restart + CMD3(CCC_Mask, "r2_ssao_opt_data", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_OPT_DATA); // Need restart + CMD3(CCC_Mask, "r2_ssao_half_data", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_HALF_DATA); // Need restart + CMD3(CCC_Mask, "r2_ssao_hbao", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_HBAO); // Need restart + CMD3(CCC_Mask, "r2_ssao_hdao", &ps_r2_ls_flags_ext, R2FLAGEXT_SSAO_HDAO); // Need restart + CMD3(CCC_Mask, "r4_enable_tessellation", &ps_r2_ls_flags_ext, R2FLAGEXT_ENABLE_TESSELLATION); // Need restart + CMD3(CCC_Mask, "r4_wireframe", &ps_r2_ls_flags_ext, R2FLAGEXT_WIREFRAME); // Need restart CMD3(CCC_Mask, "r2_steep_parallax", &ps_r2_ls_flags, R2FLAG_STEEP_PARALLAX); CMD3(CCC_Mask, "r2_detail_bump", &ps_r2_ls_flags, R2FLAG_DETAIL_BUMP); @@ -805,8 +805,8 @@ void xrRender_initconsole() #if (RENDER == R_R3) || (RENDER == R_R4) #ifdef DEBUG CMD1(CCC_Fog_Reload, "r3_fog_reload"); -#endif // DEBUG -#endif // (RENDER == R_R3) || (RENDER == R_R4) +#endif // DEBUG +#endif // (RENDER == R_R3) || (RENDER == R_R4) CMD3(CCC_Mask, "r3_dynamic_wet_surfaces", &ps_r2_ls_flags, R3FLAG_DYN_WET_SURF); CMD4(CCC_Float, "r3_dynamic_wet_surfaces_near", &ps_r3_dyn_wet_surf_near, 10, 70); diff --git a/src/Layers/xrRender/xrRender_console.h b/src/Layers/xrRender/xrRender_console.h index d7e879e86a2..eb5561c0916 100644 --- a/src/Layers/xrRender/xrRender_console.h +++ b/src/Layers/xrRender/xrRender_console.h @@ -3,25 +3,25 @@ #pragma once // Common -extern ECORE_API u32 ps_r_sun_shafts; //= 0; +extern ECORE_API u32 ps_r_sun_shafts; //= 0; extern ECORE_API xr_token qsun_shafts_token[]; -extern ECORE_API u32 ps_r_ssao; // = 0; +extern ECORE_API u32 ps_r_ssao; // = 0; extern ECORE_API xr_token qssao_token[]; extern ECORE_API u32 ps_r_ssao_mode; extern ECORE_API xr_token qssao_mode_token[]; -extern ECORE_API u32 ps_r_sun_quality; // = 0; +extern ECORE_API u32 ps_r_sun_quality; // = 0; extern ECORE_API xr_token qsun_quality_token[]; -extern ECORE_API u32 ps_r3_msaa; // = 0; +extern ECORE_API u32 ps_r3_msaa; // = 0; extern ECORE_API xr_token qmsaa_token[]; -extern ECORE_API u32 ps_r3_msaa_atest; //= 0; +extern ECORE_API u32 ps_r3_msaa_atest; //= 0; extern ECORE_API xr_token qmsaa__atest_token[]; -extern ECORE_API u32 ps_r3_minmax_sm; // = 0; +extern ECORE_API u32 ps_r3_minmax_sm; // = 0; extern ECORE_API xr_token qminmax_sm_token[]; extern ENGINE_API int ps_r__Supersample; @@ -34,7 +34,7 @@ extern ECORE_API float ps_r__Detail_density; extern ECORE_API float ps_r__Tree_w_rot; extern ECORE_API float ps_r__Tree_w_speed; extern ECORE_API float ps_r__Tree_w_amp; -extern ECORE_API float ps_r__Tree_SBC; // scale bias correct +extern ECORE_API float ps_r__Tree_SBC; // scale bias correct extern ECORE_API Fvector ps_r__Tree_Wave; extern ECORE_API float ps_r__WallmarkTTL; @@ -60,11 +60,11 @@ extern ECORE_API float ps_r1_pps_u; extern ECORE_API float ps_r1_pps_v; // R1-specific -extern ECORE_API int ps_r1_GlowsPerFrame; // r1-only -extern ECORE_API Flags32 ps_r1_flags; // r1-only +extern ECORE_API int ps_r1_GlowsPerFrame; // r1-only +extern ECORE_API Flags32 ps_r1_flags; // r1-only -extern ECORE_API float ps_r1_fog_luminance; // 1.f r1-only -extern ECORE_API int ps_r1_SoftwareSkinning; // r1-only +extern ECORE_API float ps_r1_fog_luminance; // 1.f r1-only +extern ECORE_API int ps_r1_SoftwareSkinning; // r1-only enum { @@ -77,62 +77,62 @@ extern ECORE_API float ps_r2_ssaLOD_B; extern ECORE_API float ps_r2_tf_Mipbias; // R2-specific -extern ECORE_API Flags32 ps_r2_ls_flags; // r2-only +extern ECORE_API Flags32 ps_r2_ls_flags; // r2-only extern ECORE_API Flags32 ps_r2_ls_flags_ext; -extern ECORE_API float ps_r2_df_parallax_h; // r2-only -extern ECORE_API float ps_r2_df_parallax_range; // r2-only -extern ECORE_API float ps_r2_gmaterial; // r2-only -extern ECORE_API float ps_r2_tonemap_middlegray; // r2-only -extern ECORE_API float ps_r2_tonemap_adaptation; // r2-only -extern ECORE_API float ps_r2_tonemap_low_lum; // r2-only -extern ECORE_API float ps_r2_tonemap_amount; // r2-only -extern ECORE_API float ps_r2_ls_bloom_kernel_scale; // r2-only // gauss -extern ECORE_API float ps_r2_ls_bloom_kernel_g; // r2-only // gauss -extern ECORE_API float ps_r2_ls_bloom_kernel_b; // r2-only // bilinear -extern ECORE_API float ps_r2_ls_bloom_threshold; // r2-only -extern ECORE_API float ps_r2_ls_bloom_speed; // r2-only -extern ECORE_API float ps_r2_ls_dsm_kernel; // r2-only -extern ECORE_API float ps_r2_ls_psm_kernel; // r2-only -extern ECORE_API float ps_r2_ls_ssm_kernel; // r2-only -extern ECORE_API Fvector ps_r2_aa_barier; // r2-only -extern ECORE_API Fvector ps_r2_aa_weight; // r2-only -extern ECORE_API float ps_r2_aa_kernel; // r2-only -extern ECORE_API float ps_r2_mblur; // .5f -extern ECORE_API int ps_r2_GI_depth; // 1..5 -extern ECORE_API int ps_r2_GI_photons; // 8..256 -extern ECORE_API float ps_r2_GI_clip; // EPS -extern ECORE_API float ps_r2_GI_refl; // .9f -extern ECORE_API float ps_r2_ls_depth_scale; // 1.0f -extern ECORE_API float ps_r2_ls_depth_bias; // -0.0001f -extern ECORE_API float ps_r2_ls_squality; // 1.0f -extern ECORE_API float ps_r2_sun_near; // 10.0f -extern ECORE_API float ps_r2_sun_near_border; // 1.0f -extern ECORE_API float ps_r2_sun_tsm_projection; // 0.2f -extern ECORE_API float ps_r2_sun_tsm_bias; // 0.0001f -extern ECORE_API float ps_r2_sun_depth_far_scale; // 1.00001f -extern ECORE_API float ps_r2_sun_depth_far_bias; // -0.0001f -extern ECORE_API float ps_r2_sun_depth_near_scale; // 1.00001f -extern ECORE_API float ps_r2_sun_depth_near_bias; // -0.0001f -extern ECORE_API float ps_r2_sun_lumscale; // 0.5f -extern ECORE_API float ps_r2_sun_lumscale_hemi; // 1.0f -extern ECORE_API float ps_r2_sun_lumscale_amb; // 1.0f -extern ECORE_API float ps_r2_zfill; // .1f - -extern ECORE_API float ps_r2_dhemi_sky_scale; // 1.5f -extern ECORE_API float ps_r2_dhemi_light_scale; // 1.f -extern ECORE_API float ps_r2_dhemi_light_flow; // .1f -extern ECORE_API int ps_r2_dhemi_count; // 5 -extern ECORE_API float ps_r2_slight_fade; // 1.f +extern ECORE_API float ps_r2_df_parallax_h; // r2-only +extern ECORE_API float ps_r2_df_parallax_range; // r2-only +extern ECORE_API float ps_r2_gmaterial; // r2-only +extern ECORE_API float ps_r2_tonemap_middlegray; // r2-only +extern ECORE_API float ps_r2_tonemap_adaptation; // r2-only +extern ECORE_API float ps_r2_tonemap_low_lum; // r2-only +extern ECORE_API float ps_r2_tonemap_amount; // r2-only +extern ECORE_API float ps_r2_ls_bloom_kernel_scale; // r2-only // gauss +extern ECORE_API float ps_r2_ls_bloom_kernel_g; // r2-only // gauss +extern ECORE_API float ps_r2_ls_bloom_kernel_b; // r2-only // bilinear +extern ECORE_API float ps_r2_ls_bloom_threshold; // r2-only +extern ECORE_API float ps_r2_ls_bloom_speed; // r2-only +extern ECORE_API float ps_r2_ls_dsm_kernel; // r2-only +extern ECORE_API float ps_r2_ls_psm_kernel; // r2-only +extern ECORE_API float ps_r2_ls_ssm_kernel; // r2-only +extern ECORE_API Fvector ps_r2_aa_barier; // r2-only +extern ECORE_API Fvector ps_r2_aa_weight; // r2-only +extern ECORE_API float ps_r2_aa_kernel; // r2-only +extern ECORE_API float ps_r2_mblur; // .5f +extern ECORE_API int ps_r2_GI_depth; // 1..5 +extern ECORE_API int ps_r2_GI_photons; // 8..256 +extern ECORE_API float ps_r2_GI_clip; // EPS +extern ECORE_API float ps_r2_GI_refl; // .9f +extern ECORE_API float ps_r2_ls_depth_scale; // 1.0f +extern ECORE_API float ps_r2_ls_depth_bias; // -0.0001f +extern ECORE_API float ps_r2_ls_squality; // 1.0f +extern ECORE_API float ps_r2_sun_near; // 10.0f +extern ECORE_API float ps_r2_sun_near_border; // 1.0f +extern ECORE_API float ps_r2_sun_tsm_projection; // 0.2f +extern ECORE_API float ps_r2_sun_tsm_bias; // 0.0001f +extern ECORE_API float ps_r2_sun_depth_far_scale; // 1.00001f +extern ECORE_API float ps_r2_sun_depth_far_bias; // -0.0001f +extern ECORE_API float ps_r2_sun_depth_near_scale; // 1.00001f +extern ECORE_API float ps_r2_sun_depth_near_bias; // -0.0001f +extern ECORE_API float ps_r2_sun_lumscale; // 0.5f +extern ECORE_API float ps_r2_sun_lumscale_hemi; // 1.0f +extern ECORE_API float ps_r2_sun_lumscale_amb; // 1.0f +extern ECORE_API float ps_r2_zfill; // .1f + +extern ECORE_API float ps_r2_dhemi_sky_scale; // 1.5f +extern ECORE_API float ps_r2_dhemi_light_scale; // 1.f +extern ECORE_API float ps_r2_dhemi_light_flow; // .1f +extern ECORE_API int ps_r2_dhemi_count; // 5 +extern ECORE_API float ps_r2_slight_fade; // 1.f extern ECORE_API int ps_r2_wait_sleep; // x - min (0), y - focus (1.4), z - max (100) extern ECORE_API Fvector3 ps_r2_dof; -extern ECORE_API float ps_r2_dof_sky; // distance to sky -extern ECORE_API float ps_r2_dof_kernel_size; // 7.0f +extern ECORE_API float ps_r2_dof_sky; // distance to sky +extern ECORE_API float ps_r2_dof_kernel_size; // 7.0f -extern ECORE_API float ps_r3_dyn_wet_surf_near; // 10.0f -extern ECORE_API float ps_r3_dyn_wet_surf_far; // 30.0f -extern ECORE_API int ps_r3_dyn_wet_surf_sm_res; // 256 +extern ECORE_API float ps_r3_dyn_wet_surf_near; // 10.0f +extern ECORE_API float ps_r3_dyn_wet_surf_far; // 30.0f +extern ECORE_API int ps_r3_dyn_wet_surf_sm_res; // 256 enum { @@ -160,8 +160,8 @@ enum R2FLAG_EXP_MT_CALC = (1 << 18), - R2FLAG_SOFT_WATER = (1 << 19), // Igor: need restart - R2FLAG_SOFT_PARTICLES = (1 << 20), // Igor: need restart + R2FLAG_SOFT_WATER = (1 << 19), // Igor: need restart + R2FLAG_SOFT_PARTICLES = (1 << 20), // Igor: need restart R2FLAG_VOLUMETRIC_LIGHTS = (1 << 21), R2FLAG_STEEP_PARALLAX = (1 << 22), R2FLAG_DOF = (1 << 23), diff --git a/src/Layers/xrRender/xr_effgamma.cpp b/src/Layers/xrRender/xr_effgamma.cpp index 68ebf9db43f..f11f3f611b7 100644 --- a/src/Layers/xrRender/xr_effgamma.cpp +++ b/src/Layers/xrRender/xr_effgamma.cpp @@ -48,7 +48,7 @@ void CGammaControl::GenLUT(const DXGI_GAMMA_CONTROL_CAPABILITIES& GC, DXGI_GAMMA } } -#else // USE_DX10 +#else // USE_DX10 IC u16 clr2gamma(float c) { @@ -80,4 +80,4 @@ void CGammaControl::GenLUT(D3DGAMMARAMP& G) } } -#endif // USE_DX10 \ No newline at end of file +#endif // USE_DX10 \ No newline at end of file diff --git a/src/Layers/xrRender/xr_effgamma.h b/src/Layers/xrRender/xr_effgamma.h index e35ddd106a6..87368db4976 100644 --- a/src/Layers/xrRender/xr_effgamma.h +++ b/src/Layers/xrRender/xr_effgamma.h @@ -37,9 +37,9 @@ class CGammaControl private: #if defined(USE_DX10) || defined(USE_DX11) void GenLUT(const DXGI_GAMMA_CONTROL_CAPABILITIES& GC, DXGI_GAMMA_CONTROL& G); -#else // USE_DX10 +#else // USE_DX10 void GenLUT(D3DGAMMARAMP& G); -#endif // USE_DX10 +#endif // USE_DX10 }; #endif diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.cpp b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.cpp index e73e9e2d7db..f758fccca5e 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.cpp +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.cpp @@ -197,7 +197,7 @@ void SetupTextures(CBlender_Compile& C) for (int i = 0; i < dx103DFluidRenderer::RRT_NumRT; ++i) C.r_dx10Texture(RNames[i], TNames[i]); } -} // namespace +} // namespace void CBlender_fluid_advect::Compile(CBlender_Compile& C) { @@ -205,19 +205,19 @@ void CBlender_fluid_advect::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // Advect + case 0: // Advect C.r_Pass("fluid_grid", "fluid_array", "fluid_advect", false, FALSE, FALSE, FALSE); break; - case 1: // AdvectBFECC + case 1: // AdvectBFECC C.r_Pass("fluid_grid", "fluid_array", "fluid_advect_bfecc", false, FALSE, FALSE, FALSE); break; - case 2: // AdvectTemp + case 2: // AdvectTemp C.r_Pass("fluid_grid", "fluid_array", "fluid_advect_temp", false, FALSE, FALSE, FALSE); break; - case 3: // AdvectBFECCTemp + case 3: // AdvectBFECCTemp C.r_Pass("fluid_grid", "fluid_array", "fluid_advect_bfecc_temp", false, FALSE, FALSE, FALSE); break; - case 4: // AdvectVel + case 4: // AdvectVel C.r_Pass("fluid_grid", "fluid_array", "fluid_advect_vel", false, FALSE, FALSE, FALSE); break; } @@ -238,10 +238,10 @@ void CBlender_fluid_advect_velocity::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // AdvectVel + case 0: // AdvectVel C.r_Pass("fluid_grid", "fluid_array", "fluid_advect_vel", false, FALSE, FALSE, FALSE); break; - case 1: // AdvectVelGravity + case 1: // AdvectVelGravity C.r_Pass("fluid_grid", "fluid_array", "fluid_advect_vel_g", false, FALSE, FALSE, FALSE); break; } @@ -262,21 +262,21 @@ void CBlender_fluid_simulate::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // Vorticity + case 0: // Vorticity C.r_Pass("fluid_grid", "fluid_array", "fluid_vorticity", false, FALSE, FALSE, FALSE); break; - case 1: // Confinement + case 1: // Confinement // Use additive blending C.r_Pass( "fluid_grid", "fluid_array", "fluid_confinement", false, FALSE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); break; - case 2: // Divergence + case 2: // Divergence C.r_Pass("fluid_grid", "fluid_array", "fluid_divergence", false, FALSE, FALSE, FALSE); break; - case 3: // Jacobi + case 3: // Jacobi C.r_Pass("fluid_grid", "fluid_array", "fluid_jacobi", false, FALSE, FALSE, FALSE); break; - case 4: // Project + case 4: // Project C.r_Pass("fluid_grid", "fluid_array", "fluid_project", false, FALSE, FALSE, FALSE); break; } @@ -297,13 +297,13 @@ void CBlender_fluid_obst::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // ObstStaticBox + case 0: // ObstStaticBox // AABB // C.r_Pass ("fluid_grid", "fluid_array", "fluid_obststaticbox", false,FALSE,FALSE,FALSE); // OOBB C.r_Pass("fluid_grid_oobb", "fluid_array_oobb", "fluid_obst_static_oobb", false, FALSE, FALSE, FALSE); break; - case 1: // ObstDynBox + case 1: // ObstDynBox // OOBB C.r_Pass("fluid_grid_dyn_oobb", "fluid_array_dyn_oobb", "fluid_obst_dynamic_oobb", false, FALSE, FALSE, FALSE); break; @@ -325,7 +325,7 @@ void CBlender_fluid_emitter::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // ET_SimpleGausian + case 0: // ET_SimpleGausian C.r_Pass("fluid_grid", "fluid_array", "fluid_gaussian", false, FALSE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.RS.SetRS(D3DRS_DESTBLENDALPHA, D3DBLEND_ONE); @@ -349,7 +349,7 @@ void CBlender_fluid_obstdraw::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // DrawTexture + case 0: // DrawTexture C.r_Pass("fluid_grid", "null", "fluid_draw_texture", false, FALSE, FALSE, FALSE); break; // TechniqueDrawWhiteTriangles = pEffect->GetTechniqueByName( "DrawWhiteTriangles" ); @@ -373,12 +373,12 @@ void CBlender_fluid_raydata::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // CompRayData_Back + case 0: // CompRayData_Back C.r_Pass("fluid_raydata_back", "null", "fluid_raydata_back", false, FALSE, FALSE, FALSE); - C.r_CullMode(D3DCULL_CW); // Front + C.r_CullMode(D3DCULL_CW); // Front // C.r_CullMode(D3DCULL_CCW); // Front break; - case 1: // CompRayData_Front + case 1: // CompRayData_Front C.r_Pass("fluid_raydata_front", "null", "fluid_raydata_front", false, FALSE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // RS.SetRS(D3DRS_SRCBLENDALPHA, bABlend?abSRC:D3DBLEND_ONE ); @@ -390,15 +390,15 @@ void CBlender_fluid_raydata::Compile(CBlender_Compile& C) // since r_pass would disable blend if src=one and blend - zero. C.RS.SetRS(D3DRS_DESTBLEND, D3DBLEND_ZERO); - C.RS.SetRS(D3DRS_BLENDOP, D3DBLENDOP_REVSUBTRACT); // DST - SRC - C.RS.SetRS(D3DRS_BLENDOPALPHA, D3DBLENDOP_REVSUBTRACT); // DST - SRC + C.RS.SetRS(D3DRS_BLENDOP, D3DBLENDOP_REVSUBTRACT); // DST - SRC + C.RS.SetRS(D3DRS_BLENDOPALPHA, D3DBLENDOP_REVSUBTRACT); // DST - SRC - C.r_CullMode(D3DCULL_CCW); // Back + C.r_CullMode(D3DCULL_CCW); // Back // C.r_CullMode(D3DCULL_CW); // Back break; - case 2: // QuadDownSampleRayDataTexture + case 2: // QuadDownSampleRayDataTexture C.r_Pass("fluid_raycast_quad", "null", "fluid_raydatacopy_quad", false, FALSE, FALSE, FALSE); - C.r_CullMode(D3DCULL_CCW); // Back + C.r_CullMode(D3DCULL_CCW); // Back break; } @@ -418,29 +418,29 @@ void CBlender_fluid_raycast::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // QuadEdgeDetect + case 0: // QuadEdgeDetect C.r_Pass("fluid_edge_detect", "null", "fluid_edge_detect", false, FALSE, FALSE, FALSE); - C.r_CullMode(D3DCULL_NONE); // Back + C.r_CullMode(D3DCULL_NONE); // Back break; - case 1: // QuadRaycastFog + case 1: // QuadRaycastFog C.r_Pass("fluid_raycast_quad", "null", "fluid_raycast_quad", false, FALSE, FALSE, FALSE); - C.r_CullMode(D3DCULL_CCW); // Back + C.r_CullMode(D3DCULL_CCW); // Back break; - case 2: // QuadRaycastCopyFog + case 2: // QuadRaycastCopyFog C.r_Pass("fluid_raycast_quad", "null", "fluid_raycastcopy_quad", false, FALSE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_ColorWriteEnable(true, true, true, false); - C.r_CullMode(D3DCULL_CCW); // Back + C.r_CullMode(D3DCULL_CCW); // Back break; - case 3: // QuadRaycastFire + case 3: // QuadRaycastFire C.r_Pass("fluid_raycast_quad", "null", "fluid_raycast_quad_fire", false, FALSE, FALSE, FALSE); - C.r_CullMode(D3DCULL_CCW); // Back + C.r_CullMode(D3DCULL_CCW); // Back break; - case 4: // QuadRaycastCopyFire + case 4: // QuadRaycastCopyFire C.r_Pass("fluid_raycast_quad", "null", "fluid_raycastcopy_quad_fire", false, FALSE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_ColorWriteEnable(true, true, true, false); - C.r_CullMode(D3DCULL_CCW); // Back + C.r_CullMode(D3DCULL_CCW); // Back break; } diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.h index 7a38a908a1f..17d57c845d6 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.h @@ -74,4 +74,4 @@ class CBlender_fluid_raycast : public IBlender virtual void Compile(CBlender_Compile& C); }; -#endif // dx103DFluidBlenders_included \ No newline at end of file +#endif // dx103DFluidBlenders_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.cpp b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.cpp index 46114a5e7dc..16c5e1ae6ea 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.cpp +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.cpp @@ -12,9 +12,9 @@ const xr_token emitter_type_token[] = {{"SimpleGaussian", dx103DFluidEmitters::E } DXGI_FORMAT dx103DFluidData::m_VPRenderTargetFormats[VP_NUM_TARGETS] = { - DXGI_FORMAT_R16G16B16A16_FLOAT, // VP_VELOCITY0 - DXGI_FORMAT_R16_FLOAT, // VP_PRESSURE - DXGI_FORMAT_R16_FLOAT // VP_COLOR + DXGI_FORMAT_R16G16B16A16_FLOAT, // VP_VELOCITY0 + DXGI_FORMAT_R16_FLOAT, // VP_PRESSURE + DXGI_FORMAT_R16_FLOAT // VP_COLOR }; dx103DFluidData::dx103DFluidData() @@ -48,7 +48,7 @@ dx103DFluidData::~dx103DFluidData() // Allow real-time config reload #ifdef DEBUG FluidManager.DeregisterFluidData(this); -#endif // DEBUG +#endif // DEBUG for (int rtIndex = 0; rtIndex < VP_NUM_TARGETS; rtIndex++) { @@ -207,7 +207,7 @@ void dx103DFluidData::ParseProfile(const xr_string& Profile) // Allow real-time config reload #ifdef DEBUG FluidManager.RegisterFluidData(this, Profile); -#endif // DEBUG +#endif // DEBUG } // Allow real-time config reload @@ -217,4 +217,4 @@ void dx103DFluidData::ReparseProfile(const xr_string& Profile) m_Emitters.clear_not_free(); ParseProfile(Profile); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.h index 00c42a3d032..4e7e67574bd 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.h @@ -11,7 +11,7 @@ class dx103DFluidData { VP_VELOCITY0 = 0, VP_PRESSURE, - VP_COLOR, // Swap with global after update + VP_COLOR, // Swap with global after update VP_NUM_TARGETS }; @@ -66,7 +66,7 @@ class dx103DFluidData // Allow real-time config reload #ifdef DEBUG void ReparseProfile(const xr_string& Profile); -#endif // DEBUG +#endif // DEBUG private: typedef dx103DFluidEmitters::CEmitter CEmitter; @@ -91,4 +91,4 @@ class dx103DFluidData ID3DTexture3D* m_pRTTextures[VP_NUM_TARGETS]; }; -#endif // dx103DFluidData_included \ No newline at end of file +#endif // dx103DFluidData_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidEmitters.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidEmitters.h index ff8afdec6b9..cd60e7d9096 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidEmitters.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidEmitters.h @@ -19,14 +19,14 @@ class dx103DFluidEmitters { EmitterType m_eType; - Fvector m_vPosition; // In fluid space + Fvector m_vPosition; // In fluid space float m_fRadius; // Distribution attributes - float m_InvSigma_2; // 1/Sigma^2 for gaussian distribution + float m_InvSigma_2; // 1/Sigma^2 for gaussian distribution // Flow attributes - Fvector m_vFlowVelocity; // In fluid space + Fvector m_vFlowVelocity; // In fluid space // Density attributes float m_fSaturation; @@ -38,7 +38,7 @@ class dx103DFluidEmitters { float m_fPeriod; float m_fPhase; - float m_fAmp; // Speed == [FlowSpeed*(1-m_fAmp)..FlowSpeed*(1+m_fAmp)] + float m_fAmp; // Speed == [FlowSpeed*(1-m_fAmp)..FlowSpeed*(1+m_fAmp)] } m_DraughtParams; }; @@ -68,4 +68,4 @@ class dx103DFluidEmitters dx103DFluidGrid* m_pGrid; }; -#endif // dx103DFluidEmitters_included \ No newline at end of file +#endif // dx103DFluidEmitters_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.cpp b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.cpp index 2e340e99589..6409fa8864e 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.cpp +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.cpp @@ -4,12 +4,12 @@ struct VS_INPUT_FLUIDSIM_STRUCT { - D3DXVECTOR3 Pos; // Clip space position for slice vertices - D3DXVECTOR3 Tex; // Cell coordinates in 0-"texture dimension" range + D3DXVECTOR3 Pos; // Clip space position for slice vertices + D3DXVECTOR3 Tex; // Cell coordinates in 0-"texture dimension" range }; namespace -{ // namespace start +{ // namespace start inline void ComputeRowColsForFlat3DTexture(int depth, int* outCols, int* outRows) { @@ -26,7 +26,7 @@ inline void ComputeRowColsForFlat3DTexture(int depth, int* outCols, int* outRows *outCols = m_iCols; *outRows = m_iRows; } -} // namespace end +} // namespace end #define VERTICES_PER_SLICE 6 #define VERTICES_PER_LINE 2 diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.h index db0618c7cd6..1288475f74b 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidGrid.h @@ -48,4 +48,4 @@ class dx103DFluidGrid int m_iNumVerticesBoundaryLines; }; -#endif // dx103DFluidGrid_included \ No newline at end of file +#endif // dx103DFluidGrid_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.cpp b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.cpp index 134d9f93b51..9874cbd10db 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.cpp +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.cpp @@ -39,29 +39,29 @@ shared_str strGravityBuoyancy("GravityBuoyancy"); } LPCSTR dx103DFluidManager::m_pEngineTextureNames[NUM_RENDER_TARGETS] = { - "$user$Texture_velocity1", // RENDER_TARGET_VELOCITY1 = 0, - "$user$Texture_color_out", // RENDER_TARGET_COLOR, // Swap with object's - "$user$Texture_obstacles", // RENDER_TARGET_OBSTACLES, - "$user$Texture_obstvelocity", // RENDER_TARGET_OBSTVELOCITY, - "$user$Texture_tempscalar", // RENDER_TARGET_TEMPSCALAR, - "$user$Texture_tempvector", // RENDER_TARGET_TEMPVECTOR, - "$user$Texture_velocity0", // RENDER_TARGET_VELOCITY0 = NUM_OWN_RENDER_TARGETS, // For textures generated from - //local data - "$user$Texture_pressure", // RENDER_TARGET_PRESSURE, - "$user$Texture_color", // RENDER_TARGET_COLOR_IN, + "$user$Texture_velocity1", // RENDER_TARGET_VELOCITY1 = 0, + "$user$Texture_color_out", // RENDER_TARGET_COLOR, // Swap with object's + "$user$Texture_obstacles", // RENDER_TARGET_OBSTACLES, + "$user$Texture_obstvelocity", // RENDER_TARGET_OBSTVELOCITY, + "$user$Texture_tempscalar", // RENDER_TARGET_TEMPSCALAR, + "$user$Texture_tempvector", // RENDER_TARGET_TEMPVECTOR, + "$user$Texture_velocity0", // RENDER_TARGET_VELOCITY0 = NUM_OWN_RENDER_TARGETS, // For textures generated from + // local data + "$user$Texture_pressure", // RENDER_TARGET_PRESSURE, + "$user$Texture_color", // RENDER_TARGET_COLOR_IN, }; LPCSTR dx103DFluidManager::m_pShaderTextureNames[NUM_RENDER_TARGETS] = { - "Texture_velocity1", // RENDER_TARGET_VELOCITY1 = 0, - "Texture_color_out", // RENDER_TARGET_COLOR, // Swap with object's - "Texture_obstacles", // RENDER_TARGET_OBSTACLES, - "Texture_obstvelocity", // RENDER_TARGET_OBSTVELOCITY, - "Texture_tempscalar", // RENDER_TARGET_TEMPSCALAR, - "Texture_tempvector", // RENDER_TARGET_TEMPVECTOR, - "Texture_velocity0", // RENDER_TARGET_VELOCITY0 = NUM_OWN_RENDER_TARGETS, // For textures generated from - //local data - "Texture_pressure", // RENDER_TARGET_PRESSURE, - "Texture_color", // RENDER_TARGET_COLOR_IN, + "Texture_velocity1", // RENDER_TARGET_VELOCITY1 = 0, + "Texture_color_out", // RENDER_TARGET_COLOR, // Swap with object's + "Texture_obstacles", // RENDER_TARGET_OBSTACLES, + "Texture_obstvelocity", // RENDER_TARGET_OBSTVELOCITY, + "Texture_tempscalar", // RENDER_TARGET_TEMPSCALAR, + "Texture_tempvector", // RENDER_TARGET_TEMPVECTOR, + "Texture_velocity0", // RENDER_TARGET_VELOCITY0 = NUM_OWN_RENDER_TARGETS, // For textures generated from + // local data + "Texture_pressure", // RENDER_TARGET_PRESSURE, + "Texture_color", // RENDER_TARGET_COLOR_IN, }; dx103DFluidManager::dx103DFluidManager() @@ -273,10 +273,10 @@ void dx103DFluidManager::Update(dx103DFluidData& FluidData, float timestep) #ifdef USE_DX11 rtViewport.Width = (float)m_iTextureWidth; rtViewport.Height = (float)m_iTextureHeight; -#else // #ifdef USE_DX11 +#else // #ifdef USE_DX11 rtViewport.Width = m_iTextureWidth; rtViewport.Height = m_iTextureHeight; -#endif // #ifdef USE_DX11 +#endif // #ifdef USE_DX11 HW.pContext->RSSetViewports(1, &rtViewport); RCache.set_ZB(0); @@ -345,9 +345,9 @@ void dx103DFluidManager::Update(dx103DFluidData& FluidData, float timestep) // Restore render state CRenderTarget* pTarget = RImplementation.Target; if (!RImplementation.o.dx10_msaa) - pTarget->u_setrt(pTarget->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + pTarget->u_setrt(pTarget->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT else - pTarget->u_setrt(pTarget->rt_Generic_0_r, 0, 0, pTarget->rt_MSAADepth->pZRT); // LDR RT + pTarget->u_setrt(pTarget->rt_Generic_0_r, 0, 0, pTarget->rt_MSAADepth->pZRT); // LDR RT RImplementation.rmNormal(); // RImplementation.Target->phase_scene_begin(); @@ -727,9 +727,9 @@ void dx103DFluidManager::RenderFluid(dx103DFluidData& FluidData) // Restore render state CRenderTarget* pTarget = RImplementation.Target; if (!RImplementation.o.dx10_msaa) - pTarget->u_setrt(pTarget->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + pTarget->u_setrt(pTarget->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT else - pTarget->u_setrt(pTarget->rt_Generic_0_r, 0, 0, pTarget->rt_MSAADepth->pZRT); // LDR RT + pTarget->u_setrt(pTarget->rt_Generic_0_r, 0, 0, pTarget->rt_MSAADepth->pZRT); // LDR RT RImplementation.rmNormal(); } @@ -813,4 +813,4 @@ void dx103DFluidManager::UpdateProfiles() } } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.h index c462773d5c0..4ecd4f8cd8f 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.h @@ -15,13 +15,13 @@ class dx103DFluidManager enum RENDER_TARGET { RENDER_TARGET_VELOCITY1 = 0, - RENDER_TARGET_COLOR, // Swap with object's + RENDER_TARGET_COLOR, // Swap with object's RENDER_TARGET_OBSTACLES, RENDER_TARGET_OBSTVELOCITY, RENDER_TARGET_TEMPSCALAR, RENDER_TARGET_TEMPVECTOR, - NUM_OWN_RENDER_TARGETS, // Owns render targets only upt to this id. - RENDER_TARGET_VELOCITY0 = NUM_OWN_RENDER_TARGETS, // For textures generated from local data + NUM_OWN_RENDER_TARGETS, // Owns render targets only upt to this id. + RENDER_TARGET_VELOCITY0 = NUM_OWN_RENDER_TARGETS, // For textures generated from local data RENDER_TARGET_PRESSURE, RENDER_TARGET_COLOR_IN, NUM_RENDER_TARGETS @@ -56,7 +56,7 @@ class dx103DFluidManager void RegisterFluidData(dx103DFluidData* pData, const xr_string& SectionName); void DeregisterFluidData(dx103DFluidData* pData); void UpdateProfiles(); -#endif // DEBUG +#endif // DEBUG private: enum SimulationShader @@ -139,13 +139,13 @@ class dx103DFluidManager #ifdef DEBUG xr_vector m_lstSectionNames; xr_vector m_lstFluidData; -#endif // DEBUG +#endif // DEBUG // Allow real-time config reload #ifdef DEBUG -#endif // DEBUG +#endif // DEBUG }; extern dx103DFluidManager FluidManager; -#endif // dx103DFluidManager_included \ No newline at end of file +#endif // dx103DFluidManager_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.cpp b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.cpp index 012a67c2370..92cd4577b89 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.cpp +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.cpp @@ -49,12 +49,12 @@ shared_str strOOBBWorldAngularVelocity("OOBBWorldAngularVelocity"); shared_str strOOBBWorldTranslationVelocity("OOBBWorldTranslationVelocity"); Fvector4 UnitClipPlanes[] = { - {-1.f, 0.0f, 0.0f, 0.5f}, // - {1.f, 0.0f, 0.0f, 0.5f}, // - {0.0f, -1.f, 0.0f, 0.5f}, // Top - {0.0f, 1.f, 0.0f, 0.5f}, // Bottom - {0.0f, 0.0f, -1.f, 0.5f}, // - {0.0f, 0.0f, 1.f, 0.5f}, // + {-1.f, 0.0f, 0.0f, 0.5f}, // + {1.f, 0.0f, 0.0f, 0.5f}, // + {0.0f, -1.f, 0.0f, 0.5f}, // Top + {0.0f, 1.f, 0.0f, 0.5f}, // Bottom + {0.0f, 0.0f, -1.f, 0.5f}, // + {0.0f, 0.0f, 1.f, 0.5f}, // }; } @@ -184,7 +184,7 @@ void dx103DFluidObstacles::ProcessDynamicObstacles( // Traverse object database g_SpatialSpace->q_box(m_lstRenderables, - 0, // ISpatial_DB::O_ORDERED, + 0, // ISpatial_DB::O_ORDERED, STYPE_RENDERABLE, center, size); // Determine visibility for dynamic part of scene diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.h index b2af40dc768..399da8b429f 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidObstacles.h @@ -53,4 +53,4 @@ class dx103DFluidObstacles xr_vector m_lstElements; }; -#endif // dx103DFluidObstacles_included \ No newline at end of file +#endif // dx103DFluidObstacles_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.cpp b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.cpp index 1fa04fb4948..b9eacea4d97 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.cpp +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.cpp @@ -657,7 +657,7 @@ void dx103DFluidRenderer::Draw(const dx103DFluidData& FluidData) HW.pContext->ClearRenderTargetView(RT[RRT_RayCastTex]->pRT, color); // m_pD3DDevice->OMSetRenderTargets( 1, &pRayCastRTV , NULL ); CRenderTarget* pTarget = RImplementation.Target; - pTarget->u_setrt(RT[RRT_RayCastTex], 0, 0, 0); // LDR RT + pTarget->u_setrt(RT[RRT_RayCastTex], 0, 0, 0); // LDR RT // rtViewport.Width = renderTextureWidth; // rtViewport.Height = renderTextureHeight; @@ -687,9 +687,9 @@ void dx103DFluidRenderer::Draw(const dx103DFluidData& FluidData) // m_pD3DDevice->OMSetRenderTargets( 1, &pRTV , pDSV ); // Restore render state if (!RImplementation.o.dx10_msaa) - pTarget->u_setrt(pTarget->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + pTarget->u_setrt(pTarget->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT else - pTarget->u_setrt(pTarget->rt_Generic_0_r, 0, 0, pTarget->rt_MSAADepth->pZRT); // LDR RT + pTarget->u_setrt(pTarget->rt_Generic_0_r, 0, 0, pTarget->rt_MSAADepth->pZRT); // LDR RT if (bRenderFire) RCache.set_Element(m_RendererTechnique[RS_QuadRaycastCopyFire]); @@ -724,7 +724,7 @@ void dx103DFluidRenderer::ComputeRayData() HW.pContext->ClearRenderTargetView(RT[RRT_RayDataTex]->pRT, blackColor); // m_pD3DDevice->OMSetRenderTargets(1, &pRayDataRTV, NULL); CRenderTarget* pTarget = RImplementation.Target; - pTarget->u_setrt(RT[RRT_RayDataTex], 0, 0, 0); // LDR RT + pTarget->u_setrt(RT[RRT_RayDataTex], 0, 0, 0); // LDR RT // pEffect->GetVariableByName("sceneDepthTex")->AsShaderResource()->SetResource(g_pSceneDepthSRV); RCache.set_Element(m_RendererTechnique[RS_CompRayData_Back]); @@ -752,7 +752,7 @@ void dx103DFluidRenderer::ComputeRayData() // We output xyz="position in grid space" and w=boxDepth, // unless the pixel is occluded by the scene, in which case we output xyzw=(1,0,0,0) // m_pD3DDevice->OMSetRenderTargets(1, &pRayDataRTV, NULL); - pTarget->u_setrt(RT[RRT_RayDataTex], 0, 0, 0); // LDR RT + pTarget->u_setrt(RT[RRT_RayDataTex], 0, 0, 0); // LDR RT RCache.set_Element(m_RendererTechnique[RS_CompRayData_Front]); // pTechnique->GetPassByName("CompRayData_Front")->Apply(0); DrawBox(); @@ -761,7 +761,7 @@ void dx103DFluidRenderer::ComputeRayData() void dx103DFluidRenderer::ComputeEdgeTexture() { CRenderTarget* pTarget = RImplementation.Target; - pTarget->u_setrt(RT[RRT_RayDataTexSmall], 0, 0, 0); // LDR RT + pTarget->u_setrt(RT[RRT_RayDataTexSmall], 0, 0, 0); // LDR RT RCache.set_Element(m_RendererTechnique[RS_QuadDownSampleRayDataTexture]); // First setup viewport to match the size of the destination low-res texture @@ -786,7 +786,7 @@ void dx103DFluidRenderer::ComputeEdgeTexture() DrawScreenQuad(); // Create an edge texture, performing edge detection on 'rayDataTexSmall' - pTarget->u_setrt(RT[RRT_EdgeTex], 0, 0, 0); // LDR RT + pTarget->u_setrt(RT[RRT_EdgeTex], 0, 0, 0); // LDR RT RCache.set_Element(m_RendererTechnique[RS_QuadEdgeDetect]); // m_pD3DDevice->OMSetRenderTargets( 1, &pEdgeRTV , NULL ); // pRayDataSmallVar->SetResource(pRayDataSmallSRV); @@ -848,7 +848,7 @@ void dx103DFluidRenderer::CalculateLighting(const dx103DFluidData& FluidData, Fo // Traverse object database g_SpatialSpace->q_box(m_lstRenderables, - 0, // ISpatial_DB::O_ORDERED, + 0, // ISpatial_DB::O_ORDERED, STYPE_LIGHTSOURCE, center, size); u32 iNumRenderables = m_lstRenderables.size(); diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.h index ad859e4b629..c733cb1b084 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidRenderer.h @@ -108,4 +108,4 @@ class dx103DFluidRenderer xr_vector m_lstRenderables; }; -#endif // dx103DFluidRenderer_included \ No newline at end of file +#endif // dx103DFluidRenderer_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.cpp b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.cpp index 4c08bbfe641..cf7656a9342 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.cpp +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.cpp @@ -91,7 +91,7 @@ void dx103DFluidVolume::Load(LPCSTR N, IReader* data, u32 dwFlags) */ } -void dx103DFluidVolume::Render(float LOD) // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored ? +void dx103DFluidVolume::Render(float LOD) // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored ? { // Render debug box // Do it BEFORE update since update resets shaders and other pipeline settings diff --git a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.h b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.h index e356465e9b6..4619e2a79c9 100644 --- a/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.h +++ b/src/Layers/xrRenderDX10/3DFluid/dx103DFluidVolume.h @@ -12,7 +12,7 @@ class dx103DFluidVolume : public dxRender_Visual virtual ~dx103DFluidVolume(); virtual void Load(LPCSTR N, IReader* data, u32 dwFlags); - virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored ? + virtual void Render(float LOD); // LOD - Level Of Detail [0.0f - min, 1.0f - max], Ignored ? virtual void Copy(dxRender_Visual* pFrom); virtual void Release(); @@ -23,4 +23,4 @@ class dx103DFluidVolume : public dxRender_Visual dx103DFluidData m_FluidData; }; -#endif // dx103DFluidVolume_included \ No newline at end of file +#endif // dx103DFluidVolume_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.cpp b/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.cpp index 747e82a1ce1..a12d5333619 100644 --- a/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.cpp +++ b/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.cpp @@ -7,12 +7,12 @@ void CBlender_rain::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // Test + case 0: // Test // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, // D3DBLEND_INVSRCALPHA); C.r_Pass("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, FALSE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -36,12 +36,12 @@ void CBlender_rain::Compile(CBlender_Compile& C) break; - case 1: // Patch normals + case 1: // Patch normals // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, // D3DBLEND_INVSRCALPHA); C.r_Pass("stub_notransform_2uv", "rain_patch_normal_nomsaa", false, TRUE, FALSE, FALSE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -72,12 +72,12 @@ void CBlender_rain::Compile(CBlender_Compile& C) break; - case 2: // Apply normals + case 2: // Apply normals // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, // D3DBLEND_INVSRCALPHA); C.r_Pass("stub_notransform_2uv", "rain_apply_normal_nomsaa", false, TRUE, FALSE, FALSE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); // C.r_dx10Texture ("s_normal", r2_RT_N); @@ -107,13 +107,13 @@ void CBlender_rain::Compile(CBlender_Compile& C) break; - case 3: // Apply gloss + case 3: // Apply gloss // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, // D3DBLEND_INVSRCALPHA); C.r_Pass( "stub_notransform_2uv", "rain_apply_gloss_nomsaa", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); // C.r_dx10Texture ("s_normal", r2_RT_N); @@ -161,12 +161,12 @@ void CBlender_rain_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // Patch normals + case 0: // Patch normals // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, // D3DBLEND_INVSRCALPHA); C.r_Pass("stub_notransform_2uv", "rain_patch_normal_msaa", false, TRUE, FALSE, FALSE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -197,12 +197,12 @@ void CBlender_rain_msaa::Compile(CBlender_Compile& C) break; - case 1: // Apply normals + case 1: // Apply normals // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, // D3DBLEND_INVSRCALPHA); C.r_Pass("stub_notransform_2uv", "rain_apply_normal_msaa", false, TRUE, FALSE, FALSE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); // C.r_dx10Texture ("s_normal", r2_RT_N); @@ -232,12 +232,12 @@ void CBlender_rain_msaa::Compile(CBlender_Compile& C) break; - case 2: // Apply gloss + case 2: // Apply gloss // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); // C.r_Pass ("stub_notransform_2uv", "rain_layer", false, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, // D3DBLEND_INVSRCALPHA); C.r_Pass("stub_notransform_2uv", "rain_apply_gloss_msaa", false, TRUE, FALSE, TRUE, D3DBLEND_ONE, D3DBLEND_ONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); // C.r_dx10Texture ("s_normal", r2_RT_N); diff --git a/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.h b/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.h index a28ba066785..25a5c2c50b1 100644 --- a/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.h +++ b/src/Layers/xrRenderDX10/DX10 Rain/dx10RainBlender.h @@ -28,4 +28,4 @@ class CBlender_rain_msaa : public IBlender LPCSTR Definition; }; -#endif // dx10RainBlender_included \ No newline at end of file +#endif // dx10RainBlender_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/MSAA/dx10MSAABlender.h b/src/Layers/xrRenderDX10/MSAA/dx10MSAABlender.h index d9afe43de26..1b96e18be26 100644 --- a/src/Layers/xrRenderDX10/MSAA/dx10MSAABlender.h +++ b/src/Layers/xrRenderDX10/MSAA/dx10MSAABlender.h @@ -10,4 +10,4 @@ class CBlender_msaa : public IBlender virtual void Compile(CBlender_Compile& C); }; -#endif // dx10RainBlender_included \ No newline at end of file +#endif // dx10RainBlender_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/StateManager/dx10SamplerStateCache.h b/src/Layers/xrRenderDX10/StateManager/dx10SamplerStateCache.h index 8d937d069e2..1a9ff6b5f55 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10SamplerStateCache.h +++ b/src/Layers/xrRenderDX10/StateManager/dx10SamplerStateCache.h @@ -73,4 +73,4 @@ class dx10SamplerStateCache extern dx10SamplerStateCache SSManager; -#endif // dx10SamplerStateCache_included \ No newline at end of file +#endif // dx10SamplerStateCache_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/StateManager/dx10ShaderResourceStateCache.h b/src/Layers/xrRenderDX10/StateManager/dx10ShaderResourceStateCache.h index b788acd3030..5b733a49167 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10ShaderResourceStateCache.h +++ b/src/Layers/xrRenderDX10/StateManager/dx10ShaderResourceStateCache.h @@ -62,4 +62,4 @@ class dx10ShaderResourceStateCache extern dx10ShaderResourceStateCache SRVSManager; -#endif // dx10ShaderResourceStateCache_included \ No newline at end of file +#endif // dx10ShaderResourceStateCache_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/StateManager/dx10State.h b/src/Layers/xrRenderDX10/StateManager/dx10State.h index acfb5e57611..28219fa934d 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10State.h +++ b/src/Layers/xrRenderDX10/StateManager/dx10State.h @@ -10,7 +10,7 @@ class dx10State { // Public interface public: - dx10State(); // These have to be private bu new/xr_delete don't support this + dx10State(); // These have to be private bu new/xr_delete don't support this ~dx10State(); static dx10State* Create(SimulatorStates& state_code); @@ -31,9 +31,9 @@ class dx10State private: // All states are supposed to live along all application lifetime - ID3DRasterizerState* m_pRasterizerState; // Weak link - ID3DDepthStencilState* m_pDepthStencilState; // Weak link - ID3DBlendState* m_pBlendState; // Weak link + ID3DRasterizerState* m_pRasterizerState; // Weak link + ID3DDepthStencilState* m_pDepthStencilState; // Weak link + ID3DBlendState* m_pBlendState; // Weak link tSamplerHArray m_VSSamplers; tSamplerHArray m_PSSamplers; @@ -51,4 +51,4 @@ class dx10State private: }; -#endif // dx10State_included \ No newline at end of file +#endif // dx10State_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/StateManager/dx10StateCache.cpp b/src/Layers/xrRenderDX10/StateManager/dx10StateCache.cpp index a55dc9ea93f..c9c1db4b202 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10StateCache.cpp +++ b/src/Layers/xrRenderDX10/StateManager/dx10StateCache.cpp @@ -49,7 +49,7 @@ void dx10StateCache::CreateState( // TODO: DX10: Remove this. #ifdef DEBUG Msg("ID3DRasterizerState #%d created.", m_StateArray.size()); -#endif // DEBUG +#endif // DEBUG } template <> @@ -61,7 +61,7 @@ void dx10StateCache::CreateState( // TODO: DX10: Remove this. #ifdef DEBUG Msg("ID3DDepthStencilState #%d created.", m_StateArray.size()); -#endif // DEBUG +#endif // DEBUG } template <> @@ -72,7 +72,7 @@ void dx10StateCache::CreateState(D3D_BLEND_DESC // TODO: DX10: Remove this. #ifdef DEBUG Msg("ID3DBlendState #%d created.", m_StateArray.size()); -#endif // DEBUG +#endif // DEBUG } /* diff --git a/src/Layers/xrRenderDX10/StateManager/dx10StateCache.h b/src/Layers/xrRenderDX10/StateManager/dx10StateCache.h index d6229912035..2bbf4a74c10 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10StateCache.h +++ b/src/Layers/xrRenderDX10/StateManager/dx10StateCache.h @@ -44,4 +44,4 @@ extern dx10StateCache BSManager; #include "dx10StateCacheImpl.h" -#endif // dx10StateCache_included \ No newline at end of file +#endif // dx10StateCache_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/StateManager/dx10StateCacheImpl.h b/src/Layers/xrRenderDX10/StateManager/dx10StateCacheImpl.h index 63184cc5e81..531f1c5e7d3 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10StateCacheImpl.h +++ b/src/Layers/xrRenderDX10/StateManager/dx10StateCacheImpl.h @@ -90,4 +90,4 @@ IDeviceState* dx10StateCache::FindState(const StateDecs */ } -#endif // dx10StateCacheImpl_included \ No newline at end of file +#endif // dx10StateCacheImpl_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/StateManager/dx10StateManager.cpp b/src/Layers/xrRenderDX10/StateManager/dx10StateManager.cpp index 06398dd6972..d6769ceba93 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10StateManager.cpp +++ b/src/Layers/xrRenderDX10/StateManager/dx10StateManager.cpp @@ -204,7 +204,8 @@ void dx10StateManager::SetStencil(u32 Enable, u32 Func, u32 Ref, u32 Mask, u32 W if (!m_DSDesc.StencilEnable) return; - // if (stencil_func != _func) { stencil_func=_func; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILFUNC, + // if (stencil_func != _func) { stencil_func=_func; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILFUNC, // _func )); } D3D_COMPARISON_FUNC SFunc = dx10StateUtils::ConvertCmpFunction(D3DCMPFUNC(Func)); @@ -214,11 +215,13 @@ void dx10StateManager::SetStencil(u32 Enable, u32 Func, u32 Ref, u32 Mask, u32 W m_DSDesc.BackFace.StencilFunc = SFunc; } - // if (stencil_ref != _ref) { stencil_ref=_ref; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILREF, _ref + // if (stencil_ref != _ref) { stencil_ref=_ref; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILREF, + // _ref // )); } SetStencilRef(Ref); - // if (stencil_mask != _mask) { stencil_mask=_mask; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILMASK, + // if (stencil_mask != _mask) { stencil_mask=_mask; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILMASK, // _mask )); } UINT8 SMask = (UINT8)Mask; if (m_DSDesc.StencilReadMask != SMask) { @@ -234,7 +237,8 @@ void dx10StateManager::SetStencil(u32 Enable, u32 Func, u32 Ref, u32 Mask, u32 W m_DSDesc.StencilWriteMask = SMask; } - // if (stencil_fail != _fail) { stencil_fail=_fail; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILFAIL, + // if (stencil_fail != _fail) { stencil_fail=_fail; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILFAIL, // _fail )); } D3D_STENCIL_OP SOp = dx10StateUtils::ConvertStencilOp(D3DSTENCILOP(Fail)); if ((m_DSDesc.FrontFace.StencilFailOp != SOp) || (m_DSDesc.BackFace.StencilFailOp != SOp)) { @@ -243,7 +247,8 @@ void dx10StateManager::SetStencil(u32 Enable, u32 Func, u32 Ref, u32 Mask, u32 W m_DSDesc.BackFace.StencilFailOp = SOp; } - // if (stencil_pass != _pass) { stencil_pass=_pass; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILPASS, + // if (stencil_pass != _pass) { stencil_pass=_pass; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILPASS, // _pass )); } SOp = dx10StateUtils::ConvertStencilOp(D3DSTENCILOP(Pass)); if ((m_DSDesc.FrontFace.StencilPassOp != SOp) || (m_DSDesc.BackFace.StencilPassOp != SOp)) { @@ -252,7 +257,8 @@ void dx10StateManager::SetStencil(u32 Enable, u32 Func, u32 Ref, u32 Mask, u32 W m_DSDesc.BackFace.StencilPassOp = SOp; } - // if (stencil_zfail != _zfail) { stencil_zfail=_zfail; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILZFAIL, + // if (stencil_zfail != _zfail) { stencil_zfail=_zfail; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILZFAIL, // _zfail )); } SOp = dx10StateUtils::ConvertStencilOp(D3DSTENCILOP(ZFail)); if ((m_DSDesc.FrontFace.StencilDepthFailOp != SOp) || (m_DSDesc.BackFace.StencilDepthFailOp != SOp)) { @@ -343,7 +349,8 @@ void dx10StateManager::SetSampleMask(u32 SampleMask) void dx10StateManager::SetCullMode(u32 Mode) { ValidateRDesc(); - // if (cull_mode != _mode) { cull_mode = _mode; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_CULLMODE, _mode + // if (cull_mode != _mode) { cull_mode = _mode; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_CULLMODE, + // _mode // )); } D3D_CULL_MODE CMode = dx10StateUtils::ConvertCullMode((D3DCULL)Mode); diff --git a/src/Layers/xrRenderDX10/StateManager/dx10StateManager.h b/src/Layers/xrRenderDX10/StateManager/dx10StateManager.h index 8bfba0c76c7..3701af2f879 100644 --- a/src/Layers/xrRenderDX10/StateManager/dx10StateManager.h +++ b/src/Layers/xrRenderDX10/StateManager/dx10StateManager.h @@ -52,9 +52,9 @@ class dx10StateManager private: // All states are supposed to live along all application lifetime - ID3DRasterizerState* m_pRState; // Weak link - ID3DDepthStencilState* m_pDepthStencilState; // Weak link - ID3DBlendState* m_pBlendState; // Weak link + ID3DRasterizerState* m_pRState; // Weak link + ID3DDepthStencilState* m_pDepthStencilState; // Weak link + ID3DBlendState* m_pBlendState; // Weak link UINT m_uiStencilRef; UINT m_uiAlphaRef; @@ -92,4 +92,4 @@ class dx10StateManager extern dx10StateManager StateManager; -#endif // dx10StateManager_included \ No newline at end of file +#endif // dx10StateManager_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/dx10BufferUtils.cpp b/src/Layers/xrRenderDX10/dx10BufferUtils.cpp index 8008086f49d..3bf8360412d 100644 --- a/src/Layers/xrRenderDX10/dx10BufferUtils.cpp +++ b/src/Layers/xrRenderDX10/dx10BufferUtils.cpp @@ -55,16 +55,16 @@ VertexFormatPairs VertexFormatList[] = {{D3DDECLTYPE_FLOAT1, DXGI_FORMAT_R32_FLO {D3DDECLTYPE_FLOAT2, DXGI_FORMAT_R32G32_FLOAT}, {D3DDECLTYPE_FLOAT3, DXGI_FORMAT_R32G32B32_FLOAT}, {D3DDECLTYPE_FLOAT4, DXGI_FORMAT_R32G32B32A32_FLOAT}, {D3DDECLTYPE_D3DCOLOR, - DXGI_FORMAT_R8G8B8A8_UNORM}, // Warning. Explicit RGB component swizzling is nesessary // Not available - {D3DDECLTYPE_UBYTE4, DXGI_FORMAT_R8G8B8A8_UINT}, // Note: Shader gets UINT values, but if Direct3D 9 style integral - // floats are needed (0.0f, 1.0f... 255.f), UINT can just be - // converted to float32 in shader. - {D3DDECLTYPE_SHORT2, DXGI_FORMAT_R16G16_SINT}, // Note: Shader gets SINT values, but if Direct3D 9 style integral - // floats are needed, SINT can just be converted to float32 in - // shader. - {D3DDECLTYPE_SHORT4, DXGI_FORMAT_R16G16B16A16_SINT}, // Note: Shader gets SINT values, but if Direct3D 9 style - // integral floats are needed, SINT can just be converted to - // float32 in shader. + DXGI_FORMAT_R8G8B8A8_UNORM}, // Warning. Explicit RGB component swizzling is nesessary // Not available + {D3DDECLTYPE_UBYTE4, DXGI_FORMAT_R8G8B8A8_UINT}, // Note: Shader gets UINT values, but if Direct3D 9 style integral + // floats are needed (0.0f, 1.0f... 255.f), UINT can just be + // converted to float32 in shader. + {D3DDECLTYPE_SHORT2, DXGI_FORMAT_R16G16_SINT}, // Note: Shader gets SINT values, but if Direct3D 9 style integral + // floats are needed, SINT can just be converted to float32 in + // shader. + {D3DDECLTYPE_SHORT4, DXGI_FORMAT_R16G16B16A16_SINT}, // Note: Shader gets SINT values, but if Direct3D 9 style + // integral floats are needed, SINT can just be converted to + // float32 in shader. {D3DDECLTYPE_UBYTE4N, DXGI_FORMAT_R8G8B8A8_UNORM}, {D3DDECLTYPE_SHORT2N, DXGI_FORMAT_R16G16_SNORM}, {D3DDECLTYPE_SHORT4N, DXGI_FORMAT_R16G16B16A16_SNORM}, {D3DDECLTYPE_USHORT2N, DXGI_FORMAT_R16G16_UNORM}, {D3DDECLTYPE_USHORT4N, DXGI_FORMAT_R16G16B16A16_UNORM}, @@ -91,18 +91,18 @@ struct VertexSemanticPairs }; VertexSemanticPairs VertexSemanticList[] = { - {D3DDECLUSAGE_POSITION, "POSITION"}, // 0 - {D3DDECLUSAGE_BLENDWEIGHT, "BLENDWEIGHT"}, // 1 - {D3DDECLUSAGE_BLENDINDICES, "BLENDINDICES"}, // 2 - {D3DDECLUSAGE_NORMAL, "NORMAL"}, // 3 - {D3DDECLUSAGE_PSIZE, "PSIZE"}, // 4 - {D3DDECLUSAGE_TEXCOORD, "TEXCOORD"}, // 5 - {D3DDECLUSAGE_TANGENT, "TANGENT"}, // 6 - {D3DDECLUSAGE_BINORMAL, "BINORMAL"}, // 7 + {D3DDECLUSAGE_POSITION, "POSITION"}, // 0 + {D3DDECLUSAGE_BLENDWEIGHT, "BLENDWEIGHT"}, // 1 + {D3DDECLUSAGE_BLENDINDICES, "BLENDINDICES"}, // 2 + {D3DDECLUSAGE_NORMAL, "NORMAL"}, // 3 + {D3DDECLUSAGE_PSIZE, "PSIZE"}, // 4 + {D3DDECLUSAGE_TEXCOORD, "TEXCOORD"}, // 5 + {D3DDECLUSAGE_TANGENT, "TANGENT"}, // 6 + {D3DDECLUSAGE_BINORMAL, "BINORMAL"}, // 7 // D3DDECLUSAGE_TESSFACTOR, // 8 - {D3DDECLUSAGE_POSITIONT, "POSITIONT"}, // 9 - {D3DDECLUSAGE_COLOR, "COLOR"}, // 10 - // D3DDECLUSAGE_FOG, // 11 + {D3DDECLUSAGE_POSITIONT, "POSITIONT"}, // 9 + {D3DDECLUSAGE_COLOR, "COLOR"}, // 10 + // D3DDECLUSAGE_FOG, // 11 // D3DDECLUSAGE_DEPTH, // 12 // D3DDECLUSAGE_SAMPLE, // 13 }; diff --git a/src/Layers/xrRenderDX10/dx10BufferUtils.h b/src/Layers/xrRenderDX10/dx10BufferUtils.h index 1faea34bd53..732735675e0 100644 --- a/src/Layers/xrRenderDX10/dx10BufferUtils.h +++ b/src/Layers/xrRenderDX10/dx10BufferUtils.h @@ -11,5 +11,5 @@ HRESULT CreateConstantBuffer(ID3DBuffer** ppBuffer, UINT DataSize); void ConvertVertexDeclaration(const xr_vector& declIn, xr_vector& declOut); }; -#endif // USE_DX10 -#endif // dx10BufferUtils_included \ No newline at end of file +#endif // USE_DX10 +#endif // dx10BufferUtils_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/dx10ConstantBuffer.h b/src/Layers/xrRenderDX10/dx10ConstantBuffer.h index 0de23a902ce..830881bf00b 100644 --- a/src/Layers/xrRenderDX10/dx10ConstantBuffer.h +++ b/src/Layers/xrRenderDX10/dx10ConstantBuffer.h @@ -40,7 +40,7 @@ class dx10ConstantBuffer : public xr_resource_named xr_vector m_MembersNames; ID3DBuffer* m_pBuffer; - u32 m_uiBufferSize; // Cache buffer size for debug validation + u32 m_uiBufferSize; // Cache buffer size for debug validation void* m_pBufferData; bool m_bChanged; @@ -53,4 +53,4 @@ class dx10ConstantBuffer : public xr_resource_named typedef resptr_core> ref_cbuffer; -#endif // dx10ConstantBuffer_included \ No newline at end of file +#endif // dx10ConstantBuffer_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/dx10ConstantBuffer_impl.h b/src/Layers/xrRenderDX10/dx10ConstantBuffer_impl.h index 2d10288e86a..28eed7691d4 100644 --- a/src/Layers/xrRenderDX10/dx10ConstantBuffer_impl.h +++ b/src/Layers/xrRenderDX10/dx10ConstantBuffer_impl.h @@ -187,4 +187,4 @@ IC void* dx10ConstantBuffer::AccessDirect(R_constant_load& L, u32 DataSize) return 0; } -#endif // dx10ConstantBuffer_impl_included \ No newline at end of file +#endif // dx10ConstantBuffer_impl_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/dx10DetailManager_VS.cpp b/src/Layers/xrRenderDX10/dx10DetailManager_VS.cpp index 8ba82c86a15..6514614e9de 100644 --- a/src/Layers/xrRenderDX10/dx10DetailManager_VS.cpp +++ b/src/Layers/xrRenderDX10/dx10DetailManager_VS.cpp @@ -8,9 +8,8 @@ const int quant = 16384; const int c_hdr = 10; const int c_size = 4; -static D3DVERTEXELEMENT9 dwDecl[] = { - {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos - {0, 12, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, // uv +static D3DVERTEXELEMENT9 dwDecl[] = {{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos + {0, 12, D3DDECLTYPE_SHORT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, // uv D3DDECL_END()}; #pragma pack(push, 1) @@ -75,10 +74,11 @@ void CDetailManager::hw_Render() consts.set(scale, scale, ps_r__Detail_l_aniso, ps_r__Detail_l_ambient); // wave.set (1.f/5.f, 1.f/7.f, 1.f/3.f, Device.fTimeGlobal*swing_current.speed); wave.set(1.f / 5.f, 1.f / 7.f, 1.f / 3.f, m_time_pos); - // RCache.set_c (&*hwc_consts, scale, scale, ps_r__Detail_l_aniso, ps_r__Detail_l_ambient); // + // RCache.set_c (&*hwc_consts, scale, scale, ps_r__Detail_l_aniso, ps_r__Detail_l_ambient); + // // // consts // RCache.set_c (&*hwc_wave, wave.div(PI_MUL_2)); // wave - // RCache.set_c (&*hwc_wind, dir1); // + // RCache.set_c (&*hwc_wind, dir1); // // wind-dir // hw_Render_dump (&*hwc_array, 1, 0, c_hdr ); hw_Render_dump(consts, wave.div(PI_MUL_2), dir1, 1, 0); @@ -87,7 +87,7 @@ void CDetailManager::hw_Render() // wave.set (1.f/3.f, 1.f/7.f, 1.f/5.f, Device.fTimeGlobal*swing_current.speed); wave.set(1.f / 3.f, 1.f / 7.f, 1.f / 5.f, m_time_pos); // RCache.set_c (&*hwc_wave, wave.div(PI_MUL_2)); // wave - // RCache.set_c (&*hwc_wind, dir2); // + // RCache.set_c (&*hwc_wind, dir2); // // wind-dir // hw_Render_dump (&*hwc_array, 2, 0, c_hdr ); hw_Render_dump(consts, wave.div(PI_MUL_2), dir2, 2, 0); diff --git a/src/Layers/xrRenderDX10/dx10HW.cpp b/src/Layers/xrRenderDX10/dx10HW.cpp index d3caa1fb41c..35ddba4107c 100644 --- a/src/Layers/xrRenderDX10/dx10HW.cpp +++ b/src/Layers/xrRenderDX10/dx10HW.cpp @@ -45,7 +45,7 @@ IDirect3DStateBlock9* dwDebugSB = 0; */ CHW::CHW() - : // hD3D(NULL), + : // hD3D(NULL), // pD3D(NULL), m_pAdapter(0), pDevice(NULL), m_move_window(true) @@ -111,7 +111,7 @@ void CHW::CreateD3D() } ++i; } -#endif // MASTER_GOLD +#endif // MASTER_GOLD if (!m_pAdapter) pFactory->EnumAdapters(0, &m_pAdapter); @@ -226,7 +226,7 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window) D3DFORMAT& fDepth = Caps.fDepth; // HACK: DX10: Embed hard target format. - fTarget = D3DFMT_X8R8G8B8; // No match in DX10. D3DFMT_A8B8G8R8->DXGI_FORMAT_R8G8B8A8_UNORM + fTarget = D3DFMT_X8R8G8B8; // No match in DX10. D3DFMT_A8B8G8R8->DXGI_FORMAT_R8G8B8A8_UNORM fDepth = selectDepthStencil(fTarget); /* if (bWindowed) @@ -341,7 +341,7 @@ void CHW::CreateDevice(HWND m_hWnd, bool move_window) }; R = D3D11CreateDeviceAndSwapChain( - 0, // m_pAdapter,//What wrong with adapter??? We should use another version of DXGI????? + 0, // m_pAdapter,//What wrong with adapter??? We should use another version of DXGI????? m_DriverType, NULL, createDeviceFlags, pFeatureLevels, sizeof(pFeatureLevels) / sizeof(pFeatureLevels[0]), D3D11_SDK_VERSION, &sd, &m_pSwapChain, &pDevice, &FeatureLevel, &pContext); #else @@ -578,13 +578,13 @@ void CHW::selectResolution(u32& dwWidth, u32& dwHeight, BOOL bWindowed) dwWidth = psCurrentVidMode[0]; dwHeight = psCurrentVidMode[1]; } - else // check + else // check { string64 buff; xr_sprintf(buff, sizeof(buff), "%dx%d", psCurrentVidMode[0], psCurrentVidMode[1]); - if (_ParseItem(buff, GlobalEnv.vid_mode_token) == u32(-1)) // not found - { // select safe + if (_ParseItem(buff, GlobalEnv.vid_mode_token) == u32(-1)) // not found + { // select safe xr_sprintf(buff, sizeof(buff), "vid_mode %s", GlobalEnv.vid_mode_token[0].name); Console->Execute(buff); } @@ -821,14 +821,14 @@ void fill_vid_mode_list(CHW* _hw) #ifdef DEBUG Msg("Available video modes[%d]:", _tmp.size()); -#endif // DEBUG +#endif // DEBUG for (u32 i = 0; i < _tmp.size(); ++i) { GlobalEnv.vid_mode_token[i].id = i; GlobalEnv.vid_mode_token[i].name = _tmp[i]; #ifdef DEBUG Msg("[%s]", _tmp[i]); -#endif // DEBUG +#endif // DEBUG } } @@ -863,9 +863,9 @@ void CHW::UpdateViews() descDepth.BindFlags = D3D_BIND_DEPTH_STENCIL; descDepth.CPUAccessFlags = 0; descDepth.MiscFlags = 0; - R = pDevice->CreateTexture2D(&descDepth, // Texture desc - NULL, // Initial data - &pDepthStencil); // [out] Texture + R = pDevice->CreateTexture2D(&descDepth, // Texture desc + NULL, // Initial data + &pDepthStencil); // [out] Texture R_CHK(R); // Create Depth/stencil view diff --git a/src/Layers/xrRenderDX10/dx10R_Backend_Runtime.h b/src/Layers/xrRenderDX10/dx10R_Backend_Runtime.h index e62e7e75875..389fc2fa766 100644 --- a/src/Layers/xrRenderDX10/dx10R_Backend_Runtime.h +++ b/src/Layers/xrRenderDX10/dx10R_Backend_Runtime.h @@ -201,13 +201,13 @@ ICF void CBackend::set_Indices(ID3DIndexBuffer* _ib) IC D3D_PRIMITIVE_TOPOLOGY TranslateTopology(D3DPRIMITIVETYPE T) { static D3D_PRIMITIVE_TOPOLOGY translateTable[] = { - D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, // None - D3D_PRIMITIVE_TOPOLOGY_POINTLIST, // D3DPT_POINTLIST = 1, - D3D_PRIMITIVE_TOPOLOGY_LINELIST, // D3DPT_LINELIST = 2, - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, // D3DPT_LINESTRIP = 3, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, // D3DPT_TRIANGLELIST = 4, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, // D3DPT_TRIANGLESTRIP = 5, - D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, // D3DPT_TRIANGLEFAN = 6, + D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, // None + D3D_PRIMITIVE_TOPOLOGY_POINTLIST, // D3DPT_POINTLIST = 1, + D3D_PRIMITIVE_TOPOLOGY_LINELIST, // D3DPT_LINELIST = 2, + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, // D3DPT_LINESTRIP = 3, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, // D3DPT_TRIANGLELIST = 4, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, // D3DPT_TRIANGLESTRIP = 5, + D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, // D3DPT_TRIANGLEFAN = 6, }; VERIFY(T < sizeof(translateTable) / sizeof(translateTable[0])); @@ -232,7 +232,7 @@ IC u32 GetIndexCount(D3DPRIMITIVETYPE T, u32 iPrimitiveCount) default: NODEFAULT; #ifdef DEBUG return 0; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } } @@ -367,19 +367,25 @@ IC void CBackend::set_Stencil( // if (stencil_enable != _enable) { stencil_enable=_enable; CHK_DX(HW.pDevice->SetRenderState ( // D3DRS_STENCILENABLE, _enable )); } // if (!stencil_enable) return; - // if (stencil_func != _func) { stencil_func=_func; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILFUNC, + // if (stencil_func != _func) { stencil_func=_func; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILFUNC, // _func )); } - // if (stencil_ref != _ref) { stencil_ref=_ref; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILREF, _ref + // if (stencil_ref != _ref) { stencil_ref=_ref; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILREF, + // _ref // )); } - // if (stencil_mask != _mask) { stencil_mask=_mask; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILMASK, + // if (stencil_mask != _mask) { stencil_mask=_mask; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILMASK, // _mask )); } // if (stencil_writemask != _writemask) { stencil_writemask=_writemask; CHK_DX(HW.pDevice->SetRenderState ( // D3DRS_STENCILWRITEMASK, _writemask )); } - // if (stencil_fail != _fail) { stencil_fail=_fail; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILFAIL, + // if (stencil_fail != _fail) { stencil_fail=_fail; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILFAIL, // _fail )); } - // if (stencil_pass != _pass) { stencil_pass=_pass; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILPASS, + // if (stencil_pass != _pass) { stencil_pass=_pass; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILPASS, // _pass )); } - // if (stencil_zfail != _zfail) { stencil_zfail=_zfail; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_STENCILZFAIL, + // if (stencil_zfail != _zfail) { stencil_zfail=_zfail; CHK_DX(HW.pDevice->SetRenderState ( + // D3DRS_STENCILZFAIL, // _zfail )); } } @@ -428,7 +434,8 @@ IC void CBackend::set_ColorWriteEnable(u32 _mask) ICF void CBackend::set_CullMode(u32 _mode) { StateManager.SetCullMode(_mode); - // if (cull_mode != _mode) { cull_mode = _mode; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_CULLMODE, _mode + // if (cull_mode != _mode) { cull_mode = _mode; CHK_DX(HW.pDevice->SetRenderState ( D3DRS_CULLMODE, + // _mode // )); } } @@ -729,4 +736,4 @@ IC void CBackend::get_ConstantDirect(shared_str& n, u32 DataSize, void** pVData, } } -#endif // dx10R_Backend_Runtime_included \ No newline at end of file +#endif // dx10R_Backend_Runtime_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp index 475ce8cbf38..05b7feb1250 100644 --- a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp +++ b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp @@ -49,7 +49,7 @@ void CResourceManager::_DeleteCS(const SCS* CS) { DestroyShader(CS); } -#endif // USE_DX10 +#endif // USE_DX10 void fix_texture_name(LPSTR fn); @@ -83,9 +83,9 @@ SState* CResourceManager::_CreateState(SimulatorStates& state_code) v_states.back()->dwFlags |= xr_resource_flagged::RF_REGISTERED; #if defined(USE_DX10) || defined(USE_DX11) v_states.back()->state = ID3DState::Create(state_code); -#else // USE_DX10 +#else // USE_DX10 v_states.back()->state = state_code.record(); -#endif // USE_DX10 +#endif // USE_DX10 v_states.back()->state_code = state_code; return v_states.back(); } @@ -600,7 +600,7 @@ CTexture* CResourceManager::_CreateTexture(LPCSTR _Name) if (0 == xr_strcmp(_Name, "null")) return 0; R_ASSERT(_Name && _Name[0]); string_path Name; - xr_strcpy(Name, _Name); //. andy if (strext(Name)) *strext(Name)=0; + xr_strcpy(Name, _Name); //. andy if (strext(Name)) *strext(Name)=0; fix_texture_name(Name); // ***** first pass - search already loaded texture LPSTR N = LPSTR(Name); diff --git a/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp b/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp index 144891ec1e7..df37179f143 100644 --- a/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp +++ b/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp @@ -32,7 +32,7 @@ class adopt_dx10options class adopt_dx10sampler { CBlender_Compile* m_pC; - u32 m_SI; // Sampler index + u32 m_SI; // Sampler index public: adopt_dx10sampler(CBlender_Compile* C, u32 SamplerIndex) : m_pC(C), m_SI(SamplerIndex) { @@ -44,45 +44,52 @@ class adopt_dx10sampler } // adopt_sampler& _texture (LPCSTR texture) { if (C) C->i_Texture (stage,texture); - //return *this; } + // return *this; } // adopt_sampler& _projective (bool _b) { if (C) C->i_Projective(stage,_b); - //return *this; } - // adopt_sampler& _clamp () { if (C) C->i_Address (stage,D3DTADDRESS_CLAMP); - //return *this; } - // adopt_sampler& _wrap () { if (C) C->i_Address (stage,D3DTADDRESS_WRAP); - //return *this; } - // adopt_sampler& _mirror () { if (C) C->i_Address (stage,D3DTADDRESS_MIRROR); - //return *this; } + // return *this; } + // adopt_sampler& _clamp () { if (C) C->i_Address + //(stage,D3DTADDRESS_CLAMP); + // return *this; } + // adopt_sampler& _wrap () { if (C) C->i_Address + //(stage,D3DTADDRESS_WRAP); + // return *this; } + // adopt_sampler& _mirror () { if (C) C->i_Address + //(stage,D3DTADDRESS_MIRROR); + // return *this; } // adopt_sampler& _f_anisotropic () { if (C) C->i_Filter //(stage,D3DTEXF_ANISOTROPIC,D3DTEXF_LINEAR,D3DTEXF_ANISOTROPIC); return *this; } // adopt_sampler& _f_trilinear () { if (C) C->i_Filter //(stage,D3DTEXF_LINEAR,D3DTEXF_LINEAR,D3DTEXF_LINEAR); return *this; } - // adopt_sampler& _f_bilinear () { if (C) C->i_Filter (stage,D3DTEXF_LINEAR,D3DTEXF_POINT, - //D3DTEXF_LINEAR); return *this; } - // adopt_sampler& _f_linear () { if (C) C->i_Filter (stage,D3DTEXF_LINEAR,D3DTEXF_NONE, - //D3DTEXF_LINEAR); return *this; } - // adopt_sampler& _f_none () { if (C) C->i_Filter (stage,D3DTEXF_POINT, D3DTEXF_NONE, - //D3DTEXF_POINT); return *this; } + // adopt_sampler& _f_bilinear () { if (C) C->i_Filter + //(stage,D3DTEXF_LINEAR,D3DTEXF_POINT, + // D3DTEXF_LINEAR); return *this; } + // adopt_sampler& _f_linear () { if (C) C->i_Filter + //(stage,D3DTEXF_LINEAR,D3DTEXF_NONE, + // D3DTEXF_LINEAR); return *this; } + // adopt_sampler& _f_none () { if (C) C->i_Filter (stage,D3DTEXF_POINT, + //D3DTEXF_NONE, + // D3DTEXF_POINT); return *this; } // adopt_sampler& _fmin_none () { if (C) C->i_Filter_Min(stage,D3DTEXF_NONE); - //return *this; } + // return *this; } // adopt_sampler& _fmin_point () { if (C) C->i_Filter_Min(stage,D3DTEXF_POINT); - //return *this; } + // return *this; } // adopt_sampler& _fmin_linear () { if (C) C->i_Filter_Min(stage,D3DTEXF_LINEAR); - //return *this; } - // adopt_sampler& _fmin_aniso () { if (C) C->i_Filter_Min(stage,D3DTEXF_ANISOTROPIC); - //return *this; } + // return *this; } + // adopt_sampler& _fmin_aniso () { if (C) + //C->i_Filter_Min(stage,D3DTEXF_ANISOTROPIC); + // return *this; } // adopt_sampler& _fmip_none () { if (C) C->i_Filter_Mip(stage,D3DTEXF_NONE); - //return *this; } + // return *this; } // adopt_sampler& _fmip_point () { if (C) C->i_Filter_Mip(stage,D3DTEXF_POINT); - //return *this; } + // return *this; } // adopt_sampler& _fmip_linear () { if (C) C->i_Filter_Mip(stage,D3DTEXF_LINEAR); - //return *this; } + // return *this; } // adopt_sampler& _fmag_none () { if (C) C->i_Filter_Mag(stage,D3DTEXF_NONE); - //return *this; } + // return *this; } // adopt_sampler& _fmag_point () { if (C) C->i_Filter_Mag(stage,D3DTEXF_POINT); - //return *this; } + // return *this; } // adopt_sampler& _fmag_linear () { if (C) C->i_Filter_Mag(stage,D3DTEXF_LINEAR); - //return *this; } + // return *this; } }; /* class adopt_dx10texture @@ -203,7 +210,8 @@ class adopt_compiler C->RS.SetRS(D3DRS_ZFUNC, Func); return *this; } - // adopt_dx10texture _dx10texture (LPCSTR _name) { u32 s = C->r_dx10Texture(_name,0); return + // adopt_dx10texture _dx10texture (LPCSTR _name) { u32 s = C->r_dx10Texture(_name,0); + // return // adopt_dx10sampler(C,s); } adopt_dx10options _dx10Options() { return adopt_dx10options(); }; @@ -278,8 +286,8 @@ void CResourceManager::LS_Load() .def("dx10atoc", &adopt_compiler::_dx10ATOC, return_reference_to<1>()) .def("dx10zfunc", &adopt_compiler::_dx10ZFunc, return_reference_to<1>()) - .def("dx10sampler", &adopt_compiler::_dx10sampler) // returns sampler-object - .def("dx10Options", &adopt_compiler::_dx10Options), // returns options-object + .def("dx10sampler", &adopt_compiler::_dx10sampler) // returns sampler-object + .def("dx10Options", &adopt_compiler::_dx10Options), // returns options-object class_("blend").enum_("blend")[value("zero", int(D3DBLEND_ZERO)), value("one", int(D3DBLEND_ONE)), value("srccolor", int(D3DBLEND_SRCCOLOR)), diff --git a/src/Layers/xrRenderDX10/dx10SH_RT.cpp b/src/Layers/xrRenderDX10/dx10SH_RT.cpp index 2b66fc5f1f8..4992243b92c 100644 --- a/src/Layers/xrRenderDX10/dx10SH_RT.cpp +++ b/src/Layers/xrRenderDX10/dx10SH_RT.cpp @@ -33,7 +33,7 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount) if (pSurface) return; R_ASSERT(HW.pDevice && Name && Name[0] && w && h); - _order = CPU::GetCLK(); // Device.GetTimerGlobal()->GetElapsed_clk(); + _order = CPU::GetCLK(); // Device.GetTimerGlobal()->GetElapsed_clk(); // HRESULT _hr; @@ -140,7 +140,7 @@ void CRT::create(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount) // OK #ifdef DEBUG Msg("* created RT(%s), %dx%d, format = %d samples = %d", Name, w, h, dx10FMT, SampleCount); -#endif // DEBUG +#endif // DEBUG // R_CHK (pSurface->GetSurfaceLevel (0,&pRT)); if (bUseAsDepth) { D3D_DEPTH_STENCIL_VIEW_DESC ViewDesc; diff --git a/src/Layers/xrRenderDX10/dx10SH_Texture.cpp b/src/Layers/xrRenderDX10/dx10SH_Texture.cpp index 49be02b7ae0..c8fe2393542 100644 --- a/src/Layers/xrRenderDX10/dx10SH_Texture.cpp +++ b/src/Layers/xrRenderDX10/dx10SH_Texture.cpp @@ -156,9 +156,9 @@ void CTexture::ProcessStaging() T = 0; - CHK_DX(HW.pDevice->CreateTexture2D(&TexDesc, // Texture desc - NULL, // Initial data - &T)); // [out] Texture + CHK_DX(HW.pDevice->CreateTexture2D(&TexDesc, // Texture desc + NULL, // Initial data + &T)); // [out] Texture pTargetSurface = T; } @@ -174,9 +174,9 @@ void CTexture::ProcessStaging() T = 0; - CHK_DX(HW.pDevice->CreateTexture3D(&TexDesc, // Texture desc - NULL, // Initial data - &T)); // [out] Texture + CHK_DX(HW.pDevice->CreateTexture3D(&TexDesc, // Texture desc + NULL, // Initial data + &T)); // [out] Texture pTargetSurface = T; } @@ -226,31 +226,31 @@ void CTexture::Apply(u32 dwStage) // return; //} - if (dwStage < rstVertex) // Pixel shader stage resources + if (dwStage < rstVertex) // Pixel shader stage resources { // HW.pDevice->PSSetShaderResources(dwStage, 1, &m_pSRView); SRVSManager.SetPSResource(dwStage, m_pSRView); } - else if (dwStage < rstGeometry) // Vertex shader stage resources + else if (dwStage < rstGeometry) // Vertex shader stage resources { // HW.pDevice->VSSetShaderResources(dwStage-rstVertex, 1, &m_pSRView); SRVSManager.SetVSResource(dwStage - rstVertex, m_pSRView); } - else if (dwStage < rstHull) // Geometry shader stage resources + else if (dwStage < rstHull) // Geometry shader stage resources { // HW.pDevice->GSSetShaderResources(dwStage-rstGeometry, 1, &m_pSRView); SRVSManager.SetGSResource(dwStage - rstGeometry, m_pSRView); } #ifdef USE_DX11 - else if (dwStage < rstDomain) // Geometry shader stage resources + else if (dwStage < rstDomain) // Geometry shader stage resources { SRVSManager.SetHSResource(dwStage - rstHull, m_pSRView); } - else if (dwStage < rstCompute) // Geometry shader stage resources + else if (dwStage < rstCompute) // Geometry shader stage resources { SRVSManager.SetDSResource(dwStage - rstDomain, m_pSRView); } - else if (dwStage < rstInvalid) // Geometry shader stage resources + else if (dwStage < rstInvalid) // Geometry shader stage resources { SRVSManager.SetCSResource(dwStage - rstCompute, m_pSRView); } @@ -329,7 +329,7 @@ void CTexture::apply_avi(u32 dwStage) void CTexture::apply_seq(u32 dwStage) { // SEQ - u32 frame = Device.dwTimeContinual / seqMSPF; // Device.dwTimeGlobal + u32 frame = Device.dwTimeContinual / seqMSPF; // Device.dwTimeGlobal u32 frame_data = seqDATA.size(); if (flags.seqCycles) { u32 frame_id = frame % (frame_data * 2); @@ -537,7 +537,7 @@ void CTexture::Unload() #ifdef DEBUG string_path msg_buff; xr_sprintf(msg_buff, sizeof(msg_buff), "* Unloading texture [%s] pSurface RefCount=", cName.c_str()); -#endif // DEBUG +#endif // DEBUG //. if (flags.bLoaded) Msg ("* Unloaded: %s",cName.c_str()); @@ -557,7 +557,7 @@ void CTexture::Unload() #ifdef DEBUG _SHOW_REF(msg_buff, pSurface); -#endif // DEBUG +#endif // DEBUG _RELEASE(pSurface); _RELEASE(m_pSRView); diff --git a/src/Layers/xrRenderDX10/dx10StateUtils.h b/src/Layers/xrRenderDX10/dx10StateUtils.h index 6a0b5fe66d7..0ad0f0d6b0e 100644 --- a/src/Layers/xrRenderDX10/dx10StateUtils.h +++ b/src/Layers/xrRenderDX10/dx10StateUtils.h @@ -36,4 +36,4 @@ void ValidateState(D3D_BLEND_DESC& desc); void ValidateState(D3D_SAMPLER_DESC& desc); }; -#endif // dx10StateUtils_included \ No newline at end of file +#endif // dx10StateUtils_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/dx10Texture.cpp b/src/Layers/xrRenderDX10/dx10Texture.cpp index 8063157cce6..84ce025eca7 100644 --- a/src/Layers/xrRenderDX10/dx10Texture.cpp +++ b/src/Layers/xrRenderDX10/dx10Texture.cpp @@ -316,7 +316,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize, bool bStag // make file name string_path fname; - xr_strcpy(fname, fRName); //. andy if (strext(fname)) *strext(fname)=0; + xr_strcpy(fname, fRName); //. andy if (strext(fname)) *strext(fname)=0; fix_texture_name(fname); IReader* S = NULL; if (!FS.exist(fn, "$game_textures$", fname, ".dds") && strstr(fname, "_bump")) goto _BUMP_from_base; @@ -344,7 +344,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize, bool bStag S = FS.r_open(fn); #ifdef DEBUG Msg("* Loaded: %s[%d]", fn, S->length()); -#endif // DEBUG +#endif // DEBUG img_size = S->length(); R_ASSERT(S); // R_CHK2 (D3DXGetImageInfoFromFileInMemory (S->pointer(),S->length(),&IMG), fn); diff --git a/src/Layers/xrRenderDX10/dx10TextureUtils.cpp b/src/Layers/xrRenderDX10/dx10TextureUtils.cpp index 27835cfde14..bcdace3b8d0 100644 --- a/src/Layers/xrRenderDX10/dx10TextureUtils.cpp +++ b/src/Layers/xrRenderDX10/dx10TextureUtils.cpp @@ -12,12 +12,12 @@ struct TextureFormatPairs TextureFormatPairs TextureFormatList[] = { {D3DFMT_UNKNOWN, DXGI_FORMAT_UNKNOWN}, // D3DFMT_R8G8B8 Not available - {D3DFMT_A8R8G8B8, DXGI_FORMAT_R8G8B8A8_UNORM}, // Not available - // D3DFMT_X8R8G8B8 Not available + {D3DFMT_A8R8G8B8, DXGI_FORMAT_R8G8B8A8_UNORM}, // Not available + // D3DFMT_X8R8G8B8 Not available // TODO: DX10: Remove. Need only for nullrt //{ D3DFMT_R5G6B5, DXGI_FORMAT_B5G6R5_UNORM }, // Not available - {D3DFMT_R5G6B5, DXGI_FORMAT_R8G8B8A8_UNORM}, // Not available - // D3DFMT_X1R5G5B5 Not available + {D3DFMT_R5G6B5, DXGI_FORMAT_R8G8B8A8_UNORM}, // Not available + // D3DFMT_X1R5G5B5 Not available // D3DFMT_A1R5G5B5 Not available // D3DFMT_A4R4G4B4 Not available // D3DFMT_R3G3B2 Not available @@ -25,16 +25,16 @@ TextureFormatPairs TextureFormatList[] = { // D3DFMT_A8R3G3B2 Not available // D3DFMT_X4R4G4B4 Not available // D3DFMT_A2B10G10R10 DXGI_FORMAT_R10G10B10A2 - {D3DFMT_A8B8G8R8, DXGI_FORMAT_R8G8B8A8_UNORM}, // & DXGI_FORMAT_R8G8B8A8_UNORM_SRGB - // D3DFMT_X8B8G8R8 Not available + {D3DFMT_A8B8G8R8, DXGI_FORMAT_R8G8B8A8_UNORM}, // & DXGI_FORMAT_R8G8B8A8_UNORM_SRGB + // D3DFMT_X8B8G8R8 Not available {D3DFMT_G16R16, DXGI_FORMAT_R16G16_UNORM}, // D3DFMT_A2R10G10B10 Not available {D3DFMT_A16B16G16R16, DXGI_FORMAT_R16G16B16A16_UNORM}, // D3DFMT_A8P8 Not available // D3DFMT_P8 Not available - {D3DFMT_L8, DXGI_FORMAT_R8_UNORM}, // Note: Use .r swizzle in shader to duplicate red to other components to get - // D3D9 behavior. - // D3DFMT_A8L8 Not available + {D3DFMT_L8, DXGI_FORMAT_R8_UNORM}, // Note: Use .r swizzle in shader to duplicate red to other components to get + // D3D9 behavior. + // D3DFMT_A8L8 Not available // D3DFMT_A4L4 Not available {D3DFMT_V8U8, DXGI_FORMAT_R8G8_SNORM}, // D3DFMT_L6V5U5 Not available @@ -61,7 +61,7 @@ TextureFormatPairs TextureFormatList[] = { // D3DFMT_D32 Not available // D3DFMT_D15S1 Not available // D3DFMT_D24S8 Not available - {D3DFMT_D24X8, DXGI_FORMAT_R24G8_TYPELESS}, // DXGI_FORMAT_D24_UNORM_S8_UINT}, // Not available + {D3DFMT_D24X8, DXGI_FORMAT_R24G8_TYPELESS}, // DXGI_FORMAT_D24_UNORM_S8_UINT}, // Not available // D3DFMT_D24X4S4 Not available // D3DFMT_D16 DXGI_FORMAT_D16_UNORM //{ D3DFMT_D32F_LOCKABLE, DXGI_FORMAT_D32_FLOAT}, diff --git a/src/Layers/xrRenderDX10/dx10TextureUtils.h b/src/Layers/xrRenderDX10/dx10TextureUtils.h index 76499ba9d57..44d9cd03c8d 100644 --- a/src/Layers/xrRenderDX10/dx10TextureUtils.h +++ b/src/Layers/xrRenderDX10/dx10TextureUtils.h @@ -7,4 +7,4 @@ namespace dx10TextureUtils DXGI_FORMAT ConvertTextureFormat(D3DFORMAT dx9FMT); } -#endif // dx10TextureUtils_included \ No newline at end of file +#endif // dx10TextureUtils_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX10/dx10r_constants.cpp b/src/Layers/xrRenderDX10/dx10r_constants.cpp index e991e59f2ac..70fd89f5040 100644 --- a/src/Layers/xrRenderDX10/dx10r_constants.cpp +++ b/src/Layers/xrRenderDX10/dx10r_constants.cpp @@ -165,7 +165,7 @@ BOOL R_constant_table::parseConstants(ID3DShaderReflectionConstantBuffer* pTable // We have determined all valuable info, search if constant already created ref_constant C = get(name); if (!C) { - C = new R_constant(); //.g_constant_allocator.create(); + C = new R_constant(); //.g_constant_allocator.create(); C->name = name; C->destination = destination; C->type = type; @@ -245,7 +245,7 @@ BOOL R_constant_table::parseResources(ID3DShaderReflection* pReflection, int Res ref_constant C = get(ResDesc.Name); if (!C) { - C = new R_constant(); //.g_constant_allocator.create(); + C = new R_constant(); //.g_constant_allocator.create(); C->name = ResDesc.Name; C->destination = RC_dest_sampler; C->type = type; @@ -323,8 +323,8 @@ BOOL R_constant_table::parse(void* _desc, u32 destination) // Encode buffer index into destination u32 updatedDest = destination; updatedDest |= iBuf << dest_to_shift_value(destination); /*((destination&RC_dest_pixel) - ? RC_dest_pixel_cb_index_shift : (destination&RC_dest_vertex) - ? RC_dest_vertex_cb_index_shift : RC_dest_geometry_cb_index_shift);*/ + ? RC_dest_pixel_cb_index_shift : (destination&RC_dest_vertex) + ? RC_dest_vertex_cb_index_shift : RC_dest_geometry_cb_index_shift);*/ // Encode bind dest (pixel/vertex buffer) and bind point index u32 uiBufferIndex = iBuf; diff --git a/src/Layers/xrRenderDX10/dx10r_constants_cache.h b/src/Layers/xrRenderDX10/dx10r_constants_cache.h index fc511ac0320..baed30f0e51 100644 --- a/src/Layers/xrRenderDX10/dx10r_constants_cache.h +++ b/src/Layers/xrRenderDX10/dx10r_constants_cache.h @@ -28,23 +28,23 @@ class ECORE_API R_constants { if (C->destination & RC_dest_pixel) { set(C, C->ps, A, BT_PixelBuffer); - } // a_pixel.b_dirty=TRUE; } + } // a_pixel.b_dirty=TRUE; } if (C->destination & RC_dest_vertex) { set(C, C->vs, A, BT_VertexBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } if (C->destination & RC_dest_geometry) { set(C, C->gs, A, BT_GeometryBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } #ifdef USE_DX11 if (C->destination & RC_dest_hull) { set(C, C->hs, A, BT_HullBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } if (C->destination & RC_dest_domain) { set(C, C->ds, A, BT_DomainBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } if (C->destination & RC_dest_compute) { set(C, C->cs, A, BT_Compute); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } #endif } @@ -53,23 +53,23 @@ class ECORE_API R_constants { if (C->destination & RC_dest_pixel) { seta(C, C->ps, e, A, BT_PixelBuffer); - } // a_pixel.b_dirty=TRUE; } + } // a_pixel.b_dirty=TRUE; } if (C->destination & RC_dest_vertex) { seta(C, C->vs, e, A, BT_VertexBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } if (C->destination & RC_dest_geometry) { seta(C, C->gs, e, A, BT_GeometryBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } #ifdef USE_DX11 if (C->destination & RC_dest_hull) { seta(C, C->hs, e, A, BT_HullBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } if (C->destination & RC_dest_domain) { seta(C, C->ds, e, A, BT_DomainBuffer); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } if (C->destination & RC_dest_compute) { seta(C, C->cs, e, A, BT_Compute); - } // a_vertex.b_dirty=TRUE; } + } // a_vertex.b_dirty=TRUE; } #endif } // ICF void set (R_constant* C, const Fmatrix& A) { @@ -207,4 +207,4 @@ class ECORE_API R_constants dx10ConstantBuffer& GetCBuffer(R_constant* C, BufferType BType); }; -#endif // dx10r_constants_cacheH \ No newline at end of file +#endif // dx10r_constants_cacheH \ No newline at end of file diff --git a/src/Layers/xrRenderDX9/dx9R_Backend_Runtime.h b/src/Layers/xrRenderDX9/dx9R_Backend_Runtime.h index 3c988c305fa..fb2ea31b13d 100644 --- a/src/Layers/xrRenderDX9/dx9R_Backend_Runtime.h +++ b/src/Layers/xrRenderDX9/dx9R_Backend_Runtime.h @@ -247,4 +247,4 @@ IC void CBackend::set_Constants(R_constant_table* C) } } -#endif // dx9R_Backend_Runtime_included \ No newline at end of file +#endif // dx9R_Backend_Runtime_included \ No newline at end of file diff --git a/src/Layers/xrRenderDX9/dx9r_constants_cache.cpp b/src/Layers/xrRenderDX9/dx9r_constants_cache.cpp index d51e4bee5a2..47268f65b9d 100644 --- a/src/Layers/xrRenderDX9/dx9r_constants_cache.cpp +++ b/src/Layers/xrRenderDX9/dx9r_constants_cache.cpp @@ -9,7 +9,7 @@ void R_constants::flush_cache() // fp R_constant_array::t_f& F = a_pixel.c_f; { - if (F.r_lo() <= 32) //. hack + if (F.r_lo() <= 32) //. hack { u32 count = F.r_hi() - F.r_lo(); if (count) { diff --git a/src/Layers/xrRenderDX9/dx9r_constants_cache.h b/src/Layers/xrRenderDX9/dx9r_constants_cache.h index 717171c8c8a..c4db9727f33 100644 --- a/src/Layers/xrRenderDX9/dx9r_constants_cache.h +++ b/src/Layers/xrRenderDX9/dx9r_constants_cache.h @@ -210,4 +210,4 @@ class ECORE_API R_constants if (a_pixel.b_dirty || a_vertex.b_dirty) flush_cache(); } }; -#endif // dx9r_constants_cacheH +#endif // dx9r_constants_cacheH diff --git a/src/Layers/xrRenderPC_R1/BlenderDefault.h b/src/Layers/xrRenderPC_R1/BlenderDefault.h index 2a3bead27e7..09a519cdb3a 100644 --- a/src/Layers/xrRenderPC_R1/BlenderDefault.h +++ b/src/Layers/xrRenderPC_R1/BlenderDefault.h @@ -24,4 +24,4 @@ class CBlender_default : public IBlender xrP_TOKEN oTessellation; }; -#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_) +#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/Blender_Blur.h b/src/Layers/xrRenderPC_R1/Blender_Blur.h index 47c475c9141..8249f8acc16 100644 --- a/src/Layers/xrRenderPC_R1/Blender_Blur.h +++ b/src/Layers/xrRenderPC_R1/Blender_Blur.h @@ -16,4 +16,4 @@ class CBlender_Blur : public IBlender virtual ~CBlender_Blur(); }; -#endif // BLENDER_BLUR_H +#endif // BLENDER_BLUR_H diff --git a/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp b/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp index ff6b72ed9fa..07bd62cd582 100644 --- a/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp +++ b/src/Layers/xrRenderPC_R1/Blender_LaEmB.cpp @@ -64,13 +64,13 @@ void CBlender_LaEmB::Compile(CBlender_Compile& C) { switch (HW.Caps.raster.dwStages) { - case 2: // Geforce1/2/MX + case 2: // Geforce1/2/MX if (bConstant) compile_2c(C); else compile_2(C); break; - case 3: // Kyro, Radeon, Radeon2, Geforce3/4 + case 3: // Kyro, Radeon, Radeon2, Geforce3/4 default: if (bConstant) compile_3c(C); diff --git a/src/Layers/xrRenderPC_R1/Blender_LaEmB.h b/src/Layers/xrRenderPC_R1/Blender_LaEmB.h index be6b3a7f47b..bd8de0187df 100644 --- a/src/Layers/xrRenderPC_R1/Blender_LaEmB.h +++ b/src/Layers/xrRenderPC_R1/Blender_LaEmB.h @@ -9,8 +9,8 @@ class CBlender_LaEmB : public IBlender { public: - string64 oT2_Name; // name of secondary texture - string64 oT2_xform; // xform for secondary texture + string64 oT2_Name; // name of secondary texture + string64 oT2_xform; // xform for secondary texture string64 oT2_const; void compile_ED(CBlender_Compile& C); @@ -34,4 +34,4 @@ class CBlender_LaEmB : public IBlender virtual ~CBlender_LaEmB(); }; -#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_1) +#endif // !defined(AFX_BLENDERDEFAULT_H__C12F64EE_43E7_4483_9AC3_29272E0401E7__INCLUDED_1) diff --git a/src/Layers/xrRenderPC_R1/Blender_Model.h b/src/Layers/xrRenderPC_R1/Blender_Model.h index a5cdd00a439..afd2dae0c06 100644 --- a/src/Layers/xrRenderPC_R1/Blender_Model.h +++ b/src/Layers/xrRenderPC_R1/Blender_Model.h @@ -27,4 +27,4 @@ class CBlender_Model : public IBlender xrP_TOKEN oTessellation; }; -#endif // !defined(AFX_BLENDER_MODEL_H__A215FA40_D885_4D06_9032_ED934AE295E3__INCLUDED_) +#endif // !defined(AFX_BLENDER_MODEL_H__A215FA40_D885_4D06_9032_ED934AE295E3__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/Blender_Screen_GRAY.h b/src/Layers/xrRenderPC_R1/Blender_Screen_GRAY.h index e6fd96a9948..f216a3ba906 100644 --- a/src/Layers/xrRenderPC_R1/Blender_Screen_GRAY.h +++ b/src/Layers/xrRenderPC_R1/Blender_Screen_GRAY.h @@ -20,4 +20,4 @@ class CBlender_Screen_GRAY : public IBlender virtual ~CBlender_Screen_GRAY(); }; -#endif // !defined(AFX_BLENDER_SCREEN_GRAY_H__483E49EF_23EC_4810_9231_7EE4BD72CC3B__INCLUDED_) +#endif // !defined(AFX_BLENDER_SCREEN_GRAY_H__483E49EF_23EC_4810_9231_7EE4BD72CC3B__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/Blender_Shadow_World.h b/src/Layers/xrRenderPC_R1/Blender_Shadow_World.h index 826cd3c060b..bbdf65207bd 100644 --- a/src/Layers/xrRenderPC_R1/Blender_Shadow_World.h +++ b/src/Layers/xrRenderPC_R1/Blender_Shadow_World.h @@ -16,4 +16,4 @@ class CBlender_ShWorld : public IBlender virtual ~CBlender_ShWorld(); }; -#endif // BLENDER_SHADOW_WORLD_H +#endif // BLENDER_SHADOW_WORLD_H diff --git a/src/Layers/xrRenderPC_R1/Blender_Vertex.h b/src/Layers/xrRenderPC_R1/Blender_Vertex.h index e71543cb141..632e1966620 100644 --- a/src/Layers/xrRenderPC_R1/Blender_Vertex.h +++ b/src/Layers/xrRenderPC_R1/Blender_Vertex.h @@ -24,4 +24,4 @@ class CBlender_Vertex : public IBlender xrP_TOKEN oTessellation; }; -#endif // !defined(AFX_BLENDER_VERTEX_H__D3B42F77_7018_4672_B6A5_6EE6BD947662__INCLUDED_) +#endif // !defined(AFX_BLENDER_VERTEX_H__D3B42F77_7018_4672_B6A5_6EE6BD947662__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/Blender_Vertex_aref.h b/src/Layers/xrRenderPC_R1/Blender_Vertex_aref.h index 5941db14a4b..654ed8d02d6 100644 --- a/src/Layers/xrRenderPC_R1/Blender_Vertex_aref.h +++ b/src/Layers/xrRenderPC_R1/Blender_Vertex_aref.h @@ -24,4 +24,4 @@ class CBlender_Vertex_aref : public IBlender virtual ~CBlender_Vertex_aref(); }; -#endif // !defined(AFX_BLENDER_VERTEX_AREF_H__07141B30_A968_407E_86F8_D12702FE0B9B__INCLUDED_) +#endif // !defined(AFX_BLENDER_VERTEX_AREF_H__07141B30_A968_407E_86F8_D12702FE0B9B__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/Blender_default_aref.h b/src/Layers/xrRenderPC_R1/Blender_default_aref.h index 4262c831708..f9014db7989 100644 --- a/src/Layers/xrRenderPC_R1/Blender_default_aref.h +++ b/src/Layers/xrRenderPC_R1/Blender_default_aref.h @@ -25,4 +25,4 @@ class CBlender_default_aref : public IBlender virtual ~CBlender_default_aref(); }; -#endif // !defined(AFX_BLENDER_DEFAULT_AREF_H__E17F011F_C371_4464_B75A_01D68F55FC4E__INCLUDED_) +#endif // !defined(AFX_BLENDER_DEFAULT_AREF_H__E17F011F_C371_4464_B75A_01D68F55FC4E__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/FStaticRender.cpp b/src/Layers/xrRenderPC_R1/FStaticRender.cpp index d67ca10250d..c634ea58599 100644 --- a/src/Layers/xrRenderPC_R1/FStaticRender.cpp +++ b/src/Layers/xrRenderPC_R1/FStaticRender.cpp @@ -360,7 +360,7 @@ void CRender::add_Occluder(Fbox2& bb_screenspace) void CRender::set_Object(IRenderable* O) { VERIFY(g_bRendering); - val_pObject = O; // NULL is OK, trust me :) + val_pObject = O; // NULL is OK, trust me :) if (val_pObject) { VERIFY(dynamic_cast(O) || dynamic_cast(O)); if (O->GetRenderData().pROS) { @@ -438,7 +438,7 @@ void CRender::Calculate() { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("CRender::Calculate()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED BasicStats.Culling.Begin(); @@ -518,7 +518,7 @@ void CRender::Calculate() // Determine visibility for dynamic part of scene set_Object(0); - g_hud->Render_First(); // R1 shadows + g_hud->Render_First(); // R1 shadows g_hud->Render_Last(); u32 uID_LTRACK = 0xffffffff; if (phase == PHASE_NORMAL) { @@ -537,11 +537,11 @@ void CRender::Calculate() ISpatial* spatial = lstRenderables[o_it]; spatial->spatial_updatesector(); CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure + if (0 == sector) continue; // disassociated from S/P structure // Filter only not light spatial if (PortalTraverser.i_marker != sector->r_marker && (spatial->GetSpatialData().type & STYPE_RENDERABLE)) - continue; // inactive (untouched) sector + continue; // inactive (untouched) sector if (spatial->GetSpatialData().type & STYPE_RENDERABLE) { for (u32 v_it = 0; v_it < sector->r_frustums.size(); v_it++) @@ -576,7 +576,7 @@ void CRender::Calculate() v_orig.marker = v_copy.marker; v_orig.hom_frame = v_copy.hom_frame; v_orig.hom_tested = v_copy.hom_tested; - if (!bVisible) break; // exit loop on frustums + if (!bVisible) break; // exit loop on frustums // rendering if (o_it == uID_LTRACK && renderable->renderable_ROS()) { @@ -586,9 +586,9 @@ void CRender::Calculate() } set_Object(renderable); renderable->renderable_Render(); - set_Object(0); //? is it needed at all + set_Object(0); //? is it needed at all } - break; // exit loop on frustums + break; // exit loop on frustums } } else @@ -650,7 +650,7 @@ void CRender::Render() { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("CRender::Render()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED if (m_bFirstFrameAfterReset) { m_bFirstFrameAfterReset = false; @@ -663,39 +663,39 @@ void CRender::Render() Target->Begin(); o.vis_intersect = FALSE; phase = PHASE_NORMAL; - r_dsgraph_render_hud(); // hud - r_dsgraph_render_graph(0); // normal level - if (Details) Details->Render(); // grass / details - r_dsgraph_render_lods(true, false); // lods - FB + r_dsgraph_render_hud(); // hud + r_dsgraph_render_graph(0); // normal level + if (Details) Details->Render(); // grass / details + r_dsgraph_render_lods(true, false); // lods - FB - g_pGamePersistent->Environment().RenderSky(); // sky / sun - g_pGamePersistent->Environment().RenderClouds(); // clouds + g_pGamePersistent->Environment().RenderSky(); // sky / sun + g_pGamePersistent->Environment().RenderClouds(); // clouds - r_pmask(true, false); // disable priority "1" + r_pmask(true, false); // disable priority "1" o.vis_intersect = TRUE; HOM.Disable(); - L_Dynamic->render(0); // addititional light sources + L_Dynamic->render(0); // addititional light sources if (Wallmarks) { g_r = 0; - Wallmarks->Render(); // wallmarks has priority as normal geometry + Wallmarks->Render(); // wallmarks has priority as normal geometry } HOM.Enable(); o.vis_intersect = FALSE; phase = PHASE_NORMAL; - r_pmask(true, true); // enable priority "0" and "1" + r_pmask(true, true); // enable priority "0" and "1" BasicStats.ShadowsRender.Begin(); - if (L_Shadows) L_Shadows->render(); // ... and shadows + if (L_Shadows) L_Shadows->render(); // ... and shadows BasicStats.ShadowsRender.End(); - r_dsgraph_render_lods(false, true); // lods - FB - r_dsgraph_render_graph(1); // normal level, secondary priority - L_Dynamic->render(1); // addititional light sources, secondary priority - PortalTraverser.fade_render(); // faded-portals - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_lods(false, true); // lods - FB + r_dsgraph_render_graph(1); // normal level, secondary priority + L_Dynamic->render(1); // addititional light sources, secondary priority + PortalTraverser.fade_render(); // faded-portals + r_dsgraph_render_sorted(); // strict-sorted geoms BasicStats.Glows.Begin(); - if (L_Glows) L_Glows->Render(); // glows + if (L_Glows) L_Glows->Render(); // glows BasicStats.Glows.End(); - g_pGamePersistent->Environment().RenderFlares(); // lens-flares - g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts + g_pGamePersistent->Environment().RenderFlares(); // lens-flares + g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts #if DEBUG for (int _priority = 0; _priority < 2; ++_priority) @@ -1047,7 +1047,7 @@ static inline bool match_shader_id( #if 0 strcpy_s ( result, "" ); return false; -#else // #if 1 +#else // #if 1 #ifdef DEBUG LPCSTR temp = ""; bool found = false; @@ -1064,7 +1064,7 @@ static inline bool match_shader_id( xr_strcpy(result, temp); return found; -#else // #ifdef DEBUG +#else // #ifdef DEBUG FS_FileSet::const_iterator i = file_set.begin(); FS_FileSet::const_iterator const e = file_set.end(); for (; i != e; ++i) @@ -1076,6 +1076,6 @@ static inline bool match_shader_id( } return false; -#endif // #ifdef DEBUG -#endif // #if 1 +#endif // #ifdef DEBUG +#endif // #if 1 } \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R1/FStaticRender.h b/src/Layers/xrRenderPC_R1/FStaticRender.h index 49b5c1f11c0..8ee93ff2b92 100644 --- a/src/Layers/xrRenderPC_R1/FStaticRender.h +++ b/src/Layers/xrRenderPC_R1/FStaticRender.h @@ -27,12 +27,12 @@ class CRender : public D3DXRenderBase struct _options { - u32 vis_intersect : 1; // config - u32 distortion : 1; // run-time modified - u32 color_mapping : 1; // true if SM 1.4 and higher - u32 disasm : 1; // config - u32 forceskinw : 1; // config - u32 no_detail_textures : 1; // config + u32 vis_intersect : 1; // config + u32 distortion : 1; // run-time modified + u32 color_mapping : 1; // true if SM 1.4 and higher + u32 disasm : 1; // config + u32 forceskinw : 1; // config + u32 no_detail_textures : 1; // config } o; public: @@ -63,7 +63,7 @@ class CRender : public D3DXRenderBase CWallmarksEngine* Wallmarks; CDetailManager* Details; CModelPool* Models; - CRenderTarget* Target; // Render-target + CRenderTarget* Target; // Render-target // R1-specific global constants Fmatrix r1_dlight_tcgen; @@ -74,7 +74,7 @@ class CRender : public D3DXRenderBase cl_light_XFORM r1_dlight_binder_xform; shared_str c_ldynamic_props; bool m_bMakeAsyncSS; - bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. + bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. private: // Loading / Unloading @@ -83,10 +83,10 @@ class CRender : public D3DXRenderBase void LoadLights(IReader* fs); void LoadSectors(IReader* fs); void LoadSWIs(CStreamReader* fs); - BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing + BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing void add_Static(dxRender_Visual* pVisual, u32 planes); - void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility - void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility public: ShaderElement* rimp_select_sh_static(dxRender_Visual* pVisual, float cdist_sq); @@ -132,9 +132,9 @@ class CRender : public D3DXRenderBase // Main virtual void flush() override; virtual void set_Object(IRenderable* O) override; - virtual void add_Occluder(Fbox2& bb_screenspace) override; // mask screen region as oclluded - virtual void add_Visual(IRenderVisual* V) override; // add visual leaf (no culling performed at all) - virtual void add_Geometry(IRenderVisual* V) override; // add visual(s) (all culling performed) + virtual void add_Occluder(Fbox2& bb_screenspace) override; // mask screen region as oclluded + virtual void add_Visual(IRenderVisual* V) override; // add visual leaf (no culling performed at all) + virtual void add_Geometry(IRenderVisual* V) override; // add visual(s) (all culling performed) // wallmarks virtual void add_StaticWallmark(ref_shader& S, const Fvector& P, float s, CDB::TRI* T, Fvector* V); diff --git a/src/Layers/xrRenderPC_R1/FStaticRender_DetectSector.cpp b/src/Layers/xrRenderPC_R1/FStaticRender_DetectSector.cpp index a59afc8cec1..2856da81590 100644 --- a/src/Layers/xrRenderPC_R1/FStaticRender_DetectSector.cpp +++ b/src/Layers/xrRenderPC_R1/FStaticRender_DetectSector.cpp @@ -14,7 +14,7 @@ int CRender::translateSector(IRender_Sector* pSector) #ifdef DEBUG return (-1); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } IRender_Sector* CRender::detectSector(const Fvector& P) @@ -49,12 +49,12 @@ IRender_Sector* CRender::detectSector(const Fvector& P) int ID; if (id1 >= 0) { if (id2 >= 0) - ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found + ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found else - ID = id1; // only id1 found + ID = id1; // only id1 found } else if (id2 >= 0) - ID = id2; // only id2 found + ID = id2; // only id2 found else return 0; diff --git a/src/Layers/xrRenderPC_R1/FStaticRender_Loader.cpp b/src/Layers/xrRenderPC_R1/FStaticRender_Loader.cpp index 0f09f32e3bb..b4057db0331 100644 --- a/src/Layers/xrRenderPC_R1/FStaticRender_Loader.cpp +++ b/src/Layers/xrRenderPC_R1/FStaticRender_Loader.cpp @@ -29,7 +29,7 @@ void CRender::level_Load(IReader* fs) R_ASSERT2(chunk, "Level doesn't builded correctly."); u32 count = chunk->r_u32(); Shaders.resize(count); - for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one + for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one { string512 n_sh, n_tlist; LPCSTR n = LPCSTR(chunk->pointer()); diff --git a/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.cpp b/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.cpp index 542b3af8be6..1e07affca69 100644 --- a/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.cpp +++ b/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.cpp @@ -296,7 +296,7 @@ void CRenderTarget::DoAsyncScreenshot() void CRenderTarget::End() { - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI // find if distortion is needed at all BOOL bPerform = Perform(); @@ -393,5 +393,5 @@ void CRenderTarget::phase_distortion() else RImplementation.mapDistort.clear(); - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI } diff --git a/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.h b/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.h index 7ba8c017da6..749a9326fd8 100644 --- a/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.h +++ b/src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.h @@ -19,8 +19,8 @@ class CRenderTarget : public IRender_Target // Can't implement in a single pass of a shader since // should be compiled only for the hardware that supports it. - ref_shader s_postprocess[2]; // Igor: 0 - plain, 1 - colormapped - ref_shader s_postprocess_D[2]; // Igor: 0 - plain, 1 - colormapped + ref_shader s_postprocess[2]; // Igor: 0 - plain, 1 - colormapped + ref_shader s_postprocess_D[2]; // Igor: 0 - plain, 1 - colormapped ref_geom g_postprocess; float im_noise_time; @@ -50,7 +50,7 @@ class CRenderTarget : public IRender_Target IDirect3DSurface9* pTempZB; // Igor: for async screenshots - IDirect3DSurface9* pFB; // 32bit (r,g,b,a) is situated in the system memory + IDirect3DSurface9* pFB; // 32bit (r,g,b,a) is situated in the system memory private: BOOL Create(); diff --git a/src/Layers/xrRenderPC_R1/GlowManager.h b/src/Layers/xrRenderPC_R1/GlowManager.h index bf71831eea4..187bd638848 100644 --- a/src/Layers/xrRenderPC_R1/GlowManager.h +++ b/src/Layers/xrRenderPC_R1/GlowManager.h @@ -52,9 +52,9 @@ class CGlowManager { xr_vector Glows; xr_vector Selected; - xr_vector SelectedToTest_2; // 2-frames behind - xr_vector SelectedToTest_1; // 1-frames behind - xr_vector SelectedToTest_0; // 0-frames behind + xr_vector SelectedToTest_2; // 2-frames behind + xr_vector SelectedToTest_1; // 1-frames behind + xr_vector SelectedToTest_0; // 0-frames behind ref_geom hGeom; BOOL b_hardware; @@ -75,4 +75,4 @@ class CGlowManager ~CGlowManager(); }; -#endif // !defined(AFX_GLOWMANAGER_H__EC35911F_479B_469A_845C_1A64D81D0326__INCLUDED_) +#endif // !defined(AFX_GLOWMANAGER_H__EC35911F_479B_469A_845C_1A64D81D0326__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/LightPPA.cpp b/src/Layers/xrRenderPC_R1/LightPPA.cpp index b1081be30e5..ef287bdb3e4 100644 --- a/src/Layers/xrRenderPC_R1/LightPPA.cpp +++ b/src/Layers/xrRenderPC_R1/LightPPA.cpp @@ -268,7 +268,7 @@ void CLightR_Manager::render_spot(u32 _priority) if (_priority == 1) RImplementation.r_pmask(false, true); RImplementation.r_dsgraph_render_subspace(L->spatial.sector, L_combine, L_pos, TRUE, - TRUE // precise portals + TRUE // precise portals ); if (_priority == 1) RImplementation.r_pmask(true, true); diff --git a/src/Layers/xrRenderPC_R1/LightPPA.h b/src/Layers/xrRenderPC_R1/LightPPA.h index ccaadfd0390..e2bda5a0841 100644 --- a/src/Layers/xrRenderPC_R1/LightPPA.h +++ b/src/Layers/xrRenderPC_R1/LightPPA.h @@ -48,4 +48,4 @@ class cl_light_XFORM : public R_constant_setup virtual void setup(R_constant* C); }; -#endif // !defined(AFX_LIGHTPPA_H__E5B97AC9_84A6_4773_9FEF_3BC5D1CEF8B6__INCLUDED_) +#endif // !defined(AFX_LIGHTPPA_H__E5B97AC9_84A6_4773_9FEF_3BC5D1CEF8B6__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/LightProjector.cpp b/src/Layers/xrRenderPC_R1/LightProjector.cpp index 9a250e888a9..f354fe0890e 100644 --- a/src/Layers/xrRenderPC_R1/LightProjector.cpp +++ b/src/Layers/xrRenderPC_R1/LightProjector.cpp @@ -15,7 +15,7 @@ // tir2.xrdemo -> 45.2 // tir2.xrdemo -> 61.8 -const float P_distance = 50; // switch distance between LOW-q light and HIGH-q light +const float P_distance = 50; // switch distance between LOW-q light and HIGH-q light const float P_cam_dist = 200; const float P_cam_range = 7.f; const D3DFORMAT P_rtf = D3DFMT_A8R8G8B8; @@ -137,7 +137,7 @@ void CLightProjector::calculate() { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("CLightProjector::calculate()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED if (receivers.empty()) return; @@ -150,9 +150,9 @@ void CLightProjector::calculate() CROS_impl* LT = (CROS_impl*)O->renderable_ROS(); int slot = LT->shadow_recv_slot; if (slot < 0 || slot >= P_o_count) - bValid = FALSE; // invalid slot + bValid = FALSE; // invalid slot else if (cache[slot].O != O) - bValid = FALSE; // not the same object + bValid = FALSE; // not the same object else { // seems to be valid @@ -160,10 +160,10 @@ void CLightProjector::calculate() bb.xform(O->GetRenderData().visual->getVisData().box, O->GetRenderData().xform); if (cache[slot].BB.contains(bb)) { // inside, but maybe timelimit exceeded? - if (Device.dwTimeGlobal > cache[slot].dwTimeValid) bValid = FALSE; // timeout + if (Device.dwTimeGlobal > cache[slot].dwTimeValid) bValid = FALSE; // timeout } else - bValid = FALSE; // out of bounds + bValid = FALSE; // out of bounds } // @@ -204,7 +204,7 @@ void CLightProjector::calculate() O->GetRenderData().xform.transform_tiny(C, vis.sphere.P); R.O = O; R.C = C; - R.C.y += vis.sphere.R * 0.1f; //. YURA: 0.1 can be more + R.C.y += vis.sphere.R * 0.1f; //. YURA: 0.1 can be more R.BB.xform(vis.box, O->GetRenderData().xform).scale(0.1f); R.dwTimeValid = Device.dwTimeGlobal + ::Random.randI(time_min, time_max); LT->shadow_recv_slot = c_it; @@ -310,8 +310,8 @@ void CLightProjector::calculate() min.set(R.C.x - p_R, R.C.y - (p_R + P_cam_range), R.C.z - p_R); max.set(R.C.x + p_R, R.C.y + 0, R.C.z + p_R); BB.set(min, max); - R.UVclamp_min.set(min).add(.05f); // shrink a little - R.UVclamp_max.set(max).sub(.05f); // shrink a little + R.UVclamp_min.set(min).add(.05f); // shrink a little + R.UVclamp_max.set(max).sub(.05f); // shrink a little ISpatial* spatial = dynamic_cast(O); if (spatial) { spatial->spatial_updatesector(); diff --git a/src/Layers/xrRenderPC_R1/LightProjector.h b/src/Layers/xrRenderPC_R1/LightProjector.h index ca1bd141e4b..53143c44d82 100644 --- a/src/Layers/xrRenderPC_R1/LightProjector.h +++ b/src/Layers/xrRenderPC_R1/LightProjector.h @@ -32,7 +32,7 @@ class CLightProjector : public pureAppActivate private: IRenderable* current; - xr_vector cache; // same as number of slots + xr_vector cache; // same as number of slots xr_vector receivers; xr_vector taskid; @@ -62,4 +62,4 @@ class CLightProjector : public pureAppActivate ~CLightProjector(); }; -#endif // !defined(AFX_LIGHTPRJ_H__CFA216D9_CACB_4515_9FBE_7C531649168F__INCLUDED_) +#endif // !defined(AFX_LIGHTPRJ_H__CFA216D9_CACB_4515_9FBE_7C531649168F__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R1/LightShadows.cpp b/src/Layers/xrRenderPC_R1/LightShadows.cpp index a0fc70db30c..c7dbb01b902 100644 --- a/src/Layers/xrRenderPC_R1/LightShadows.cpp +++ b/src/Layers/xrRenderPC_R1/LightShadows.cpp @@ -12,11 +12,11 @@ using namespace XRay::Math; const float S_distance = 48; const float S_distance2 = S_distance * S_distance; -const float S_ideal_size = 4.f; // ideal size for the object +const float S_ideal_size = 4.f; // ideal size for the object const float S_fade = 4.5; const float S_fade2 = S_fade * S_fade; -const float S_level = .05f; // clip by energy level +const float S_level = .05f; // clip by energy level const int S_size = 85; const int S_rt_size = 512; const int batch_size = 256; @@ -26,7 +26,7 @@ const int S_clip = 256 - 8; const D3DFORMAT S_rtf = D3DFMT_A8R8G8B8; const float S_blur_kernel = 0.75f; -const u32 cache_old = 30 * 1000; // 30 secs +const u32 cache_old = 30 * 1000; // 30 secs ////////////////////////////////////////////////////////////////////// // Construction/Destruction @@ -146,7 +146,7 @@ void CLightShadows::calculate() { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("CLightShadows::calculate()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED if (casters.empty()) return; @@ -204,7 +204,7 @@ void CLightShadows::calculate() _dist = C.C.distance_to(Lpos); // Msg ("* o-dist: %f", _dist); if (_dist > EPS_L) break; - Lpos.y += .01f; //. hack to avoid light-in-the-center-of-object + Lpos.y += .01f; //. hack to avoid light-in-the-center-of-object } float _R = C.O->GetRenderData().visual->getVisData().sphere.R + 0.1f; // Msg ("* o-r: %f",_R); @@ -330,7 +330,7 @@ IC bool cache_search(const CLightShadows::cache_item& A, const CLightShadows::ca if (A.O > B.O) return false; if (A.L < B.L) return true; if (A.L > B.L) return false; - return false; // eq + return false; // eq } IC float PLC_energy(Fvector& P, Fvector& N, light* L, float E) @@ -426,14 +426,14 @@ void CLightShadows::render() CI_what.L = S.L; CI_what.tris = 0; xr_vector::iterator CI_ptr = std::lower_bound(cache.begin(), cache.end(), CI_what, cache_search); - if (CI_ptr == cache.end()) { // empty ? + if (CI_ptr == cache.end()) { // empty ? CI_ptr = cache.insert(CI_ptr, CI_what); CI = &*CI_ptr; bValid = FALSE; } else { - if (CI_ptr->O != CI_what.O || CI_ptr->L != CI_what.L) { // we found something different + if (CI_ptr->O != CI_what.O || CI_ptr->L != CI_what.L) { // we found something different CI_ptr = cache.insert(CI_ptr, CI_what); CI = &*CI_ptr; bValid = FALSE; @@ -449,7 +449,7 @@ void CLightShadows::render() bValid = FALSE; } } - CI->time = Device.dwTimeGlobal; // acess time + CI->time = Device.dwTimeGlobal; // acess time if (!bValid) { // Frustum diff --git a/src/Layers/xrRenderPC_R1/LightShadows.h b/src/Layers/xrRenderPC_R1/LightShadows.h index ad33b62c646..c236b5a7360 100644 --- a/src/Layers/xrRenderPC_R1/LightShadows.h +++ b/src/Layers/xrRenderPC_R1/LightShadows.h @@ -84,4 +84,4 @@ class CLightShadows ~CLightShadows(); }; -#endif // !defined(AFX_LIGHTSHADOWS_H__CFA216D9_CACB_4515_9FBE_7C531649168F__INCLUDED_) +#endif // !defined(AFX_LIGHTSHADOWS_H__CFA216D9_CACB_4515_9FBE_7C531649168F__INCLUDED_) diff --git a/src/Layers/xrRenderPC_R2/Light_Render_Direct.h b/src/Layers/xrRenderPC_R2/Light_Render_Direct.h index 68e888c3b75..7868cdd9072 100644 --- a/src/Layers/xrRenderPC_R2/Light_Render_Direct.h +++ b/src/Layers/xrRenderPC_R2/Light_Render_Direct.h @@ -3,5 +3,5 @@ class CLight_Compute_XFORM_and_VIS { public: - void compute_xf_spot(light* L); // + void compute_xf_spot(light* L); // }; diff --git a/src/Layers/xrRenderPC_R2/Light_Render_Direct_ComputeXFS.cpp b/src/Layers/xrRenderPC_R2/Light_Render_Direct_ComputeXFS.cpp index 4ff5e32a435..9c947dd6591 100644 --- a/src/Layers/xrRenderPC_R2/Light_Render_Direct_ComputeXFS.cpp +++ b/src/Layers/xrRenderPC_R2/Light_Render_Direct_ComputeXFS.cpp @@ -44,23 +44,23 @@ void CLight_Compute_XFORM_and_VIS::compute_xf_spot(light* L) // compute intensity float intensity0 = (L->color.r + L->color.g + L->color.b) / 3.f; float intensity1 = (L->color.r * 0.2125f + L->color.g * 0.7154f + L->color.b * 0.0721f); - float intensity = (intensity0 + intensity1) / 2.f; // intensity1 tends to underestimate... + float intensity = (intensity0 + intensity1) / 2.f; // intensity1 tends to underestimate... // compute how much duelling frusta occurs [-1..1]-> 1 + [-0.5 .. +0.5] float duel_dot = 1.f - 0.5f * Device.vCameraDirection.dotproduct(L_dir); // compute how large the light is - give more texels to larger lights, assume 8m as being optimal radius - float sizefactor = L->range / 8.f; // 4m = .5, 8m=1.f, 16m=2.f, 32m=4.f + float sizefactor = L->range / 8.f; // 4m = .5, 8m=1.f, 16m=2.f, 32m=4.f // compute how wide the light frustum is - assume 90deg as being optimal - float widefactor = L->cone / deg2rad(90.f); // + float widefactor = L->cone / deg2rad(90.f); // // factors - float factor0 = powf(ssa, 1.f / 2.f); // ssa is quadratic - float factor1 = powf(intensity, 1.f / 16.f); // less perceptually important? - float factor2 = powf(duel_dot, 1.f / 4.f); // difficult to fast-change this -> visible - float factor3 = powf(sizefactor, 1.f / 4.f); // this shouldn't make much difference - float factor4 = powf(widefactor, 1.f / 2.f); // make it linear ??? + float factor0 = powf(ssa, 1.f / 2.f); // ssa is quadratic + float factor1 = powf(intensity, 1.f / 16.f); // less perceptually important? + float factor2 = powf(duel_dot, 1.f / 4.f); // difficult to fast-change this -> visible + float factor3 = powf(sizefactor, 1.f / 4.f); // this shouldn't make much difference + float factor4 = powf(widefactor, 1.f / 2.f); // make it linear ??? float factor = ps_r2_ls_squality * factor0 * factor1 * factor2 * factor3 * factor4; // final size calc diff --git a/src/Layers/xrRenderPC_R2/SMAP_Allocator.h b/src/Layers/xrRenderPC_R2/SMAP_Allocator.h index 485f261979a..a29476fc442 100644 --- a/src/Layers/xrRenderPC_R2/SMAP_Allocator.h +++ b/src/Layers/xrRenderPC_R2/SMAP_Allocator.h @@ -24,16 +24,16 @@ struct SMAP_Rect } void get_cp(Ivector2& p0, Ivector2& p1) { - p0.set(max.x + 1, min.y); // right - p1.set(min.x, max.y + 1); // down + p0.set(max.x + 1, min.y); // right + p1.set(min.x, max.y + 1); // down } }; class SMAP_Allocator { - u32 psize; // pool size - xr_vector stack; // - xr_vector cpoint; // critical points + u32 psize; // pool size + xr_vector stack; // + xr_vector cpoint; // critical points private: void _add(SMAP_Rect& R) { @@ -41,8 +41,8 @@ class SMAP_Allocator Ivector2 p0, p1; R.get_cp(p0, p1); s32 ps = s32(psize); - if ((p0.x < ps) && (p0.y < ps)) cpoint.push_back(p0); // 1st - if ((p1.x < ps) && (p1.y < ps)) cpoint.push_back(p1); // 2nd + if ((p0.x < ps) && (p0.y < ps)) cpoint.push_back(p0); // 1st + if ((p1.x < ps) && (p1.y < ps)) cpoint.push_back(p1); // 2nd } public: diff --git a/src/Layers/xrRenderPC_R2/blender_bloom_build.cpp b/src/Layers/xrRenderPC_R2/blender_bloom_build.cpp index 5bc9a7af31e..cf858661ad6 100644 --- a/src/Layers/xrRenderPC_R2/blender_bloom_build.cpp +++ b/src/Layers/xrRenderPC_R2/blender_bloom_build.cpp @@ -17,27 +17,27 @@ void CBlender_bloom_build::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // transfer into bloom-target + case 0: // transfer into bloom-target C.r_Pass("null", "bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_Sampler_clf("s_image", r2_RT_generic1); C.r_End(); break; - case 1: // X-filter + case 1: // X-filter C.r_Pass("null", "bloom_filter", FALSE, FALSE, FALSE); C.r_Sampler_clf("s_bloom", r2_RT_bloom1); C.r_End(); break; - case 2: // Y-filter + case 2: // Y-filter C.r_Pass("null", "bloom_filter", FALSE, FALSE, FALSE); C.r_Sampler_clf("s_bloom", r2_RT_bloom2); C.r_End(); break; - case 3: // FF-filter_P0 + case 3: // FF-filter_P0 C.r_Pass("null", "bloom_filter_f", FALSE, FALSE, FALSE); C.r_Sampler_clf("s_bloom", r2_RT_bloom1); C.r_End(); break; - case 4: // FF-filter_P1 + case 4: // FF-filter_P1 C.r_Pass("null", "bloom_filter_f", FALSE, FALSE, FALSE); C.r_Sampler_clf("s_bloom", r2_RT_bloom2); C.r_End(); diff --git a/src/Layers/xrRenderPC_R2/blender_combine.cpp b/src/Layers/xrRenderPC_R2/blender_combine.cpp index 62653056b0a..602d429b27f 100644 --- a/src/Layers/xrRenderPC_R2/blender_combine.cpp +++ b/src/Layers/xrRenderPC_R2/blender_combine.cpp @@ -17,9 +17,9 @@ void CBlender_combine::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // combine + case 0: // combine C.r_Pass("combine_1", "combine_1", FALSE, FALSE, FALSE, TRUE, D3DBLEND_INVSRCALPHA, - D3DBLEND_SRCALPHA); //. MRT-blend? + D3DBLEND_SRCALPHA); //. MRT-blend? C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); C.r_Sampler_rtf("s_diffuse", r2_RT_albedo); @@ -36,7 +36,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) jitter(C); C.r_End(); break; - case 1: // aa-edge-detection + AA :) + case 1: // aa-edge-detection + AA :) C.r_Pass("null", "combine_2_AA", FALSE, FALSE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -46,7 +46,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_End(); break; - case 2: // non-AA + case 2: // non-AA C.r_Pass("null", "combine_2_NAA", FALSE, FALSE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -55,7 +55,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_Sampler_clf("s_distort", r2_RT_generic1); C.r_End(); break; - case 3: // aa-edge-detection + AA :) + DISTORTION + case 3: // aa-edge-detection + AA :) + DISTORTION C.r_Pass("null", "combine_2_AA_D", FALSE, FALSE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -64,7 +64,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_Sampler_clf("s_distort", r2_RT_generic1); C.r_End(); break; - case 4: // non-AA + DISTORTION + case 4: // non-AA + DISTORTION C.r_Pass("null", "combine_2_NAA_D", FALSE, FALSE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -73,7 +73,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_Sampler_clf("s_distort", r2_RT_generic1); C.r_End(); break; - case 5: // post-processing + case 5: // post-processing break; } } diff --git a/src/Layers/xrRenderPC_R2/blender_deffer_aref.cpp b/src/Layers/xrRenderPC_R2/blender_deffer_aref.cpp index 80f3b086c05..37f412ce27d 100644 --- a/src/Layers/xrRenderPC_R2/blender_deffer_aref.cpp +++ b/src/Layers/xrRenderPC_R2/blender_deffer_aref.cpp @@ -65,19 +65,19 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) } else { - C.SetParams(1, false); //. + C.SetParams(1, false); //. // codepath is the same, only the shaders differ // ***only pixel shaders differ*** switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "base", "base", true); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "base", "base", true); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap if (RImplementation.o.HW_smap) C.r_Pass("shadow_direct_base_aref", "shadow_direct_base_aref", FALSE, TRUE, TRUE, FALSE, D3DBLEND_ZERO, D3DBLEND_ONE, TRUE, 220); diff --git a/src/Layers/xrRenderPC_R2/blender_deffer_flat.cpp b/src/Layers/xrRenderPC_R2/blender_deffer_flat.cpp index f44b6bf616a..d30bcbfa5f7 100644 --- a/src/Layers/xrRenderPC_R2/blender_deffer_flat.cpp +++ b/src/Layers/xrRenderPC_R2/blender_deffer_flat.cpp @@ -50,13 +50,13 @@ void CBlender_deffer_flat::Compile(CBlender_Compile& C) // codepath is the same, only the shaders differ switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "base", "base", false); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "base", "base", false); break; - case SE_R2_SHADOW: // smap-direct + case SE_R2_SHADOW: // smap-direct if (RImplementation.o.HW_smap) C.r_Pass("shadow_direct_base", "dumb", FALSE, TRUE, TRUE, FALSE); else diff --git a/src/Layers/xrRenderPC_R2/blender_deffer_model.cpp b/src/Layers/xrRenderPC_R2/blender_deffer_model.cpp index e638838d101..3b37cd13e99 100644 --- a/src/Layers/xrRenderPC_R2/blender_deffer_model.cpp +++ b/src/Layers/xrRenderPC_R2/blender_deffer_model.cpp @@ -75,8 +75,8 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) LPCSTR vsname, psname; switch (C.iElement) { - case 0: // - case 1: // + case 0: // + case 1: // vsname = psname = "model_def_lq"; C.r_Pass( vsname, psname, TRUE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); @@ -93,13 +93,13 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) // codepath is the same, only the shaders differ switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "model", "base", bAref); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "model", "base", bAref); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap if (bAref) { if (RImplementation.o.HW_smap) C.r_Pass("shadow_direct_model_aref", "shadow_direct_base_aref", FALSE, TRUE, TRUE, FALSE, diff --git a/src/Layers/xrRenderPC_R2/blender_light_direct.cpp b/src/Layers/xrRenderPC_R2/blender_light_direct.cpp index b3f11a8e718..226a9c9c7e1 100644 --- a/src/Layers/xrRenderPC_R2/blender_light_direct.cpp +++ b/src/Layers/xrRenderPC_R2/blender_light_direct.cpp @@ -17,7 +17,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) BOOL b_HW_smap = RImplementation.o.HW_smap; BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -26,10 +26,10 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping case SE_SUN_MIDDLE: C.r_Pass("accum_volume", "accum_sun_near", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); C.r_Sampler_clw("s_material", r2_material); @@ -48,7 +48,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) jitter(C); C.r_End(); break; - case SE_SUN_FAR: // far pass, only stencil clipping performed + case SE_SUN_FAR: // far pass, only stencil clipping performed C.r_Pass("accum_volume", "accum_sun_near", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -66,7 +66,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) jitter(C); C.r_End(); break; - case SE_SUN_LUMINANCE: // luminance pass + case SE_SUN_LUMINANCE: // luminance pass C.r_Pass("null", "accum_sun", false, FALSE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); diff --git a/src/Layers/xrRenderPC_R2/blender_light_direct_cascade.cpp b/src/Layers/xrRenderPC_R2/blender_light_direct_cascade.cpp index fc0d09e3b7e..623debc01a6 100644 --- a/src/Layers/xrRenderPC_R2/blender_light_direct_cascade.cpp +++ b/src/Layers/xrRenderPC_R2/blender_light_direct_cascade.cpp @@ -17,7 +17,7 @@ void CBlender_accum_direct_cascade::Compile(CBlender_Compile& C) BOOL b_HW_smap = RImplementation.o.HW_smap; BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -26,10 +26,10 @@ void CBlender_accum_direct_cascade::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping case SE_SUN_MIDDLE: C.r_Pass("accum_volume", "accum_sun_cascade", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); C.r_Sampler_clw("s_material", r2_material); @@ -54,7 +54,7 @@ void CBlender_accum_direct_cascade::Compile(CBlender_Compile& C) // } C.r_End(); break; - case SE_SUN_FAR: // far pass, only stencil clipping performed + case SE_SUN_FAR: // far pass, only stencil clipping performed C.r_Pass("accum_volume", "accum_sun_cascade_far", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); diff --git a/src/Layers/xrRenderPC_R2/blender_light_mask.cpp b/src/Layers/xrRenderPC_R2/blender_light_mask.cpp index 1172fd98297..f7f6ed3b958 100644 --- a/src/Layers/xrRenderPC_R2/blender_light_mask.cpp +++ b/src/Layers/xrRenderPC_R2/blender_light_mask.cpp @@ -17,32 +17,32 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_MASK_SPOT: // spot or omni-part + case SE_MASK_SPOT: // spot or omni-part C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_End(); break; - case SE_MASK_POINT: // point + case SE_MASK_POINT: // point C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_End(); break; - case SE_MASK_DIRECT: // stencil mask for directional light + case SE_MASK_DIRECT: // stencil mask for directional light C.r_Pass("null", "accum_sun_mask", false, FALSE, FALSE, TRUE, D3DBLEND_ZERO, D3DBLEND_ONE, TRUE, 1); C.r_Sampler_rtf("s_normal", r2_RT_N); C.r_End(); break; - case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) + case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) C.r_Pass("accum_volume", "copy_p", false, FALSE, FALSE); C.r_Sampler_rtf("s_base", r2_RT_accum_temp); C.r_End(); break; - case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) + case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) C.r_Pass("null", "copy", false, FALSE, FALSE); C.r_Sampler_rtf("s_base", r2_RT_accum_temp); C.r_End(); break; - case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) + case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) C.r_Pass("null", "copy", false, FALSE, FALSE); C.r_Sampler_rtf("s_base", r2_RT_accum); C.r_End(); diff --git a/src/Layers/xrRenderPC_R2/blender_light_occq.cpp b/src/Layers/xrRenderPC_R2/blender_light_occq.cpp index ae460c8b272..25c4765e730 100644 --- a/src/Layers/xrRenderPC_R2/blender_light_occq.cpp +++ b/src/Layers/xrRenderPC_R2/blender_light_occq.cpp @@ -17,11 +17,11 @@ void CBlender_light_occq::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // occlusion testing + case 0: // occlusion testing C.r_Pass("dumb", "dumb", false, TRUE, FALSE, FALSE); C.r_End(); break; - case 1: // NV40 optimization :) + case 1: // NV40 optimization :) C.r_Pass("null", "dumb", false, FALSE, FALSE, FALSE); C.r_End(); break; diff --git a/src/Layers/xrRenderPC_R2/blender_light_point.cpp b/src/Layers/xrRenderPC_R2/blender_light_point.cpp index 6f1a7c9cd7d..46ca236f7c2 100644 --- a/src/Layers/xrRenderPC_R2/blender_light_point.cpp +++ b/src/Layers/xrRenderPC_R2/blender_light_point.cpp @@ -21,12 +21,12 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; switch (C.iElement) { - case SE_L_FILL: // fill projective + case SE_L_FILL: // fill projective C.r_Pass("null", "copy", false, FALSE, FALSE); C.r_Sampler("s_base", C.L_textures[0]); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_omni_unshadowed", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -35,7 +35,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_Sampler_rtf("s_accumulator", r2_RT_accum); C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_omni_normal", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -53,7 +53,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_Sampler_rtf("s_accumulator", r2_RT_accum); C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_omni_normal", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -71,12 +71,12 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_Sampler_rtf("s_accumulator", r2_RT_accum); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_omni_transluent", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); C.r_Sampler_clw("s_material", r2_material); - C.r_Sampler_clf("s_lmap", r2_RT_smap_surf); // diff here + C.r_Sampler_clf("s_lmap", r2_RT_smap_surf); // diff here if (b_HW_smap) { if (b_HW_PCF) C.r_Sampler_clf("s_smap", r2_RT_smap_depth); diff --git a/src/Layers/xrRenderPC_R2/blender_light_spot.cpp b/src/Layers/xrRenderPC_R2/blender_light_spot.cpp index 0b268a01b6b..37d382fc2d0 100644 --- a/src/Layers/xrRenderPC_R2/blender_light_spot.cpp +++ b/src/Layers/xrRenderPC_R2/blender_light_spot.cpp @@ -22,12 +22,12 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_L_FILL: // masking + case SE_L_FILL: // masking C.r_Pass("null", "copy", false, FALSE, FALSE); C.r_Sampler("s_base", C.L_textures[0]); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_spot_unshadowed", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -36,7 +36,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_Sampler_rtf("s_accumulator", r2_RT_accum); C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_spot_normal", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -54,7 +54,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_Sampler_rtf("s_accumulator", r2_RT_accum); C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_spot_fullsize", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -72,12 +72,12 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_Sampler_rtf("s_accumulator", r2_RT_accum); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_spot_fullsize", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); C.r_Sampler_clw("s_material", r2_material); - C.r_Sampler_clf("s_lmap", r2_RT_smap_surf); // diff here + C.r_Sampler_clf("s_lmap", r2_RT_smap_surf); // diff here if (b_HW_smap) { if (b_HW_PCF) C.r_Sampler_clf("s_smap", r2_RT_smap_depth); diff --git a/src/Layers/xrRenderPC_R2/blender_luminance.cpp b/src/Layers/xrRenderPC_R2/blender_luminance.cpp index f1725621b46..79887fcaf3e 100644 --- a/src/Layers/xrRenderPC_R2/blender_luminance.cpp +++ b/src/Layers/xrRenderPC_R2/blender_luminance.cpp @@ -17,17 +17,17 @@ void CBlender_luminance::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // 256x256 => 64x64 + case 0: // 256x256 => 64x64 C.r_Pass("null", "bloom_luminance_1", false, FALSE, FALSE, FALSE); C.r_Sampler_clf("s_image", r2_RT_bloom1); C.r_End(); break; - case 1: // 64x64 => 8x8 + case 1: // 64x64 => 8x8 C.r_Pass("null", "bloom_luminance_2", false, FALSE, FALSE, FALSE); C.r_Sampler_clf("s_image", r2_RT_luminance_t64); C.r_End(); break; - case 2: // 8x8 => 1x1, blending with old result + case 2: // 8x8 => 1x1, blending with old result C.r_Pass("null", "bloom_luminance_3", false, FALSE, FALSE, FALSE); C.r_Sampler_clf("s_image", r2_RT_luminance_t8); C.r_Sampler_clf("s_tonemap", r2_RT_luminance_src); diff --git a/src/Layers/xrRenderPC_R2/blender_ssao.cpp b/src/Layers/xrRenderPC_R2/blender_ssao.cpp index c0a402bb5bd..0b790e92574 100644 --- a/src/Layers/xrRenderPC_R2/blender_ssao.cpp +++ b/src/Layers/xrRenderPC_R2/blender_ssao.cpp @@ -17,7 +17,7 @@ void CBlender_SSAO::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // calculate SSAO + case 0: // calculate SSAO C.r_Pass("combine_1", "ssao_calc", FALSE, FALSE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); C.r_Sampler_rtf("s_normal", r2_RT_N); @@ -25,7 +25,7 @@ void CBlender_SSAO::Compile(CBlender_Compile& C) jitter(C); C.r_End(); break; - case 1: // downsample HBAO source rendertarget + case 1: // downsample HBAO source rendertarget C.r_Pass("combine_1", "depth_downs", FALSE, FALSE, FALSE); C.r_Sampler_rtf("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); diff --git a/src/Layers/xrRenderPC_R2/light_GI.cpp b/src/Layers/xrRenderPC_R2/light_GI.cpp index cfa22227aa0..6b0af64b441 100644 --- a/src/Layers/xrRenderPC_R2/light_GI.cpp +++ b/src/Layers/xrRenderPC_R2/light_GI.cpp @@ -44,7 +44,7 @@ void light::gi_generate() LI.D.reflect(dir, TN); LI.E = dot * (1 - R->range / range); if (LI.E < ps_r2_GI_clip) continue; - LI.S = spatial.sector; //. BUG + LI.S = spatial.sector; //. BUG indirect.push_back(LI); } diff --git a/src/Layers/xrRenderPC_R2/light_smapvis.cpp b/src/Layers/xrRenderPC_R2/light_smapvis.cpp index 3635258a55d..378b3059f44 100644 --- a/src/Layers/xrRenderPC_R2/light_smapvis.cpp +++ b/src/Layers/xrRenderPC_R2/light_smapvis.cpp @@ -67,7 +67,7 @@ void smapvis::end() RImplementation.r_dsgraph_insert_static(testQ_V); RImplementation.r_dsgraph_render_graph(0); RImplementation.occq_end(testQ_id); - testQ_frame = Device.dwFrame + 1; // get result on next frame + testQ_frame = Device.dwFrame + 1; // get result on next frame } break; case state_usingTC: @@ -110,9 +110,9 @@ void smapvis::resetoccq() void smapvis::mark() { RImplementation.Stats.ic_culled += invisible.size(); - u32 marker = RImplementation.marker + 1; // we are called befor marker increment + u32 marker = RImplementation.marker + 1; // we are called befor marker increment for (u32 it = 0; it < invisible.size(); it++) - invisible[it]->vis.marker = marker; // this effectively disables processing + invisible[it]->vis.marker = marker; // this effectively disables processing } void smapvis::rfeedback_static(dxRender_Visual* V) diff --git a/src/Layers/xrRenderPC_R2/light_smapvis.h b/src/Layers/xrRenderPC_R2/light_smapvis.h index b73a88b8cea..f9cf2bbd29c 100644 --- a/src/Layers/xrRenderPC_R2/light_smapvis.h +++ b/src/Layers/xrRenderPC_R2/light_smapvis.h @@ -23,10 +23,10 @@ class smapvis : public R_feedback ~smapvis(); void invalidate(); - void begin(); // should be called before 'marker++' and before graph-build + void begin(); // should be called before 'marker++' and before graph-build void end(); void mark(); - void flushoccq(); // should be called when no rendering of light is supposed + void flushoccq(); // should be called when no rendering of light is supposed void resetoccq(); diff --git a/src/Layers/xrRenderPC_R2/light_vis.cpp b/src/Layers/xrRenderPC_R2/light_vis.cpp index a8691ed457c..20c0b14b882 100644 --- a/src/Layers/xrRenderPC_R2/light_vis.cpp +++ b/src/Layers/xrRenderPC_R2/light_vis.cpp @@ -37,7 +37,7 @@ void light::vis_prepare() if (ps_r2_ls_flags.test(R2FLAG_EXP_DONT_TEST_SHADOWED) && flags.bShadow) skiptest = true; if (skiptest || Device.vCameraPosition.distance_to(spatial.sphere.P) <= (spatial.sphere.R * 1.01f + safe_area)) - { // small error + { // small error vis.visible = true; vis.pending = false; vis.frame2test = frame + ::Random.randI(delay_small_min, delay_small_max); diff --git a/src/Layers/xrRenderPC_R2/r2.cpp b/src/Layers/xrRenderPC_R2/r2.cpp index 9e603e1e196..96103a702a5 100644 --- a/src/Layers/xrRenderPC_R2/r2.cpp +++ b/src/Layers/xrRenderPC_R2/r2.cpp @@ -93,7 +93,7 @@ static class cl_sun_shafts_intensity : public R_constant_setup } binder_sun_shafts_intensity; extern ENGINE_API BOOL r2_sun_static; -extern ENGINE_API BOOL r2_advanced_pp; // advanced post process and effects +extern ENGINE_API BOOL r2_advanced_pp; // advanced post process and effects ////////////////////////////////////////////////////////////////////////// // Just two static storage void CRender::create() @@ -135,7 +135,7 @@ void CRender::create() case 0x19D: case 0x19E: { - disable_nullrt = true; // G80 + disable_nullrt = true; // G80 break; } case 0x400: @@ -147,7 +147,7 @@ void CRender::create() case 0x40E: case 0x40F: { - disable_nullrt = true; // G84 + disable_nullrt = true; // G84 break; } case 0x420: @@ -159,7 +159,7 @@ void CRender::create() case 0x42E: case 0x42F: { - disable_nullrt = true; // G86 + disable_nullrt = true; // G86 break; } } @@ -278,7 +278,7 @@ void CRender::create() m_bMakeAsyncSS = false; - Target = new CRenderTarget(); // Main target + Target = new CRenderTarget(); // Main target Models = new CModelPool(); PSLibrary.OnCreate(); @@ -1132,9 +1132,9 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData // if (0 == xr_strcmp(pFunctionName, "main")) { if ('v' == pTarget[0]) - pTarget = D3DXGetVertexShaderProfile(HW.pDevice); // vertex "vs_2_a"; // + pTarget = D3DXGetVertexShaderProfile(HW.pDevice); // vertex "vs_2_a"; // else - pTarget = D3DXGetPixelShaderProfile(HW.pDevice); // pixel "ps_2_a"; // + pTarget = D3DXGetPixelShaderProfile(HW.pDevice); // pixel "ps_2_a"; // } includer Includer; @@ -1200,7 +1200,7 @@ static inline bool match_shader_id( #if 0 strcpy_s ( result, "" ); return false; -#else // #if 1 +#else // #if 1 #ifdef DEBUG LPCSTR temp = ""; bool found = false; @@ -1217,7 +1217,7 @@ static inline bool match_shader_id( xr_strcpy(result, temp); return found; -#else // #ifdef DEBUG +#else // #ifdef DEBUG FS_FileSet::const_iterator i = file_set.begin(); FS_FileSet::const_iterator const e = file_set.end(); for (; i != e; ++i) @@ -1229,6 +1229,6 @@ static inline bool match_shader_id( } return false; -#endif // #ifdef DEBUG -#endif // #if 1 +#endif // #ifdef DEBUG +#endif // #if 1 } \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R2/r2.h b/src/Layers/xrRenderPC_R2/r2.h index 4ce01ad848d..f6ac63a23cb 100644 --- a/src/Layers/xrRenderPC_R2/r2.h +++ b/src/Layers/xrRenderPC_R2/r2.h @@ -24,8 +24,8 @@ class CRender : public D3DXRenderBase public: enum { - PHASE_NORMAL = 0, // E[0] - PHASE_SMAP = 1, // E[1] + PHASE_NORMAL = 0, // E[0] + PHASE_SMAP = 1, // E[1] }; struct _options @@ -43,7 +43,7 @@ class CRender : public D3DXRenderBase u32 mrtmixdepth : 1; u32 fp16_filter : 1; u32 fp16_blend : 1; - u32 albedo_wo : 1; // work-around albedo on less capable HW + u32 albedo_wo : 1; // work-around albedo on less capable HW u32 HW_smap : 1; u32 HW_smap_PCF : 1; u32 HW_smap_FETCH4 : 1; @@ -63,9 +63,9 @@ class CRender : public D3DXRenderBase u32 sunstatic : 1; u32 sjitter : 1; u32 noshadows : 1; - u32 Tshadows : 1; // transluent shadows + u32 Tshadows : 1; // transluent shadows u32 disasm : 1; - u32 advancedpp : 1; // advanced post process (DOF, SSAO, volumetrics, etc.) + u32 advancedpp : 1; // advanced post process (DOF, SSAO, volumetrics, etc.) u32 forcegloss : 1; u32 forceskinw : 1; @@ -127,7 +127,7 @@ class CRender : public D3DXRenderBase CModelPool* Models; CWallmarksEngine* Wallmarks; - CRenderTarget* Target; // Render-target + CRenderTarget* Target; // Render-target CLight_DB Lights; CLight_Compute_XFORM_and_VIS LR; @@ -147,7 +147,7 @@ class CRender : public D3DXRenderBase u32 q_sync_count; bool m_bMakeAsyncSS; - bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. + bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. xr_vector m_sun_cascades; @@ -160,10 +160,10 @@ class CRender : public D3DXRenderBase void LoadSectors(IReader* fs); void LoadSWIs(CStreamReader* fs); - BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing + BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing void add_Static(dxRender_Visual* pVisual, u32 planes); - void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility - void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility public: IRender_Sector* rimp_detectSector(Fvector& P, Fvector& D); @@ -209,7 +209,7 @@ class CRender : public D3DXRenderBase } IC void apply_lmaterial() { - R_constant* C = &*RCache.get_c(c_sbase); // get sampler + R_constant* C = &*RCache.get_c(c_sbase); // get sampler if (0 == C) return; VERIFY(RC_dest_sampler == C->destination); VERIFY(RC_sampler == C->type); @@ -256,9 +256,9 @@ class CRender : public D3DXRenderBase // Main virtual void flush(); virtual void set_Object(IRenderable* O); - virtual void add_Occluder(Fbox2& bb_screenspace); // mask screen region as oclluded - virtual void add_Visual(IRenderVisual* V); // add visual leaf (no culling performed at all) - virtual void add_Geometry(IRenderVisual* V); // add visual(s) (all culling performed) + virtual void add_Occluder(Fbox2& bb_screenspace); // mask screen region as oclluded + virtual void add_Visual(IRenderVisual* V); // add visual leaf (no culling performed at all) + virtual void add_Geometry(IRenderVisual* V); // add visual(s) (all culling performed) // wallmarks virtual void add_StaticWallmark(ref_shader& S, const Fvector& P, float s, CDB::TRI* T, Fvector* V); diff --git a/src/Layers/xrRenderPC_R2/r2_R_calculate.cpp b/src/Layers/xrRenderPC_R2/r2_R_calculate.cpp index b08494204e4..7536d904461 100644 --- a/src/Layers/xrRenderPC_R2/r2_R_calculate.cpp +++ b/src/Layers/xrRenderPC_R2/r2_R_calculate.cpp @@ -61,7 +61,7 @@ void CRender::Calculate() ISpatial* spatial = lstRenderables[_it]; spatial->spatial_updatesector(); CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure + if (0 == sector) continue; // disassociated from S/P structure VERIFY(spatial->GetSpatialData().type & STYPE_LIGHTSOURCE); // lightsource diff --git a/src/Layers/xrRenderPC_R2/r2_R_lights.cpp b/src/Layers/xrRenderPC_R2/r2_R_lights.cpp index 00226b01a12..8933d199d2e 100644 --- a/src/Layers/xrRenderPC_R2/r2_R_lights.cpp +++ b/src/Layers/xrRenderPC_R2/r2_R_lights.cpp @@ -4,7 +4,7 @@ IC bool pred_area(light* _1, light* _2) { u32 a0 = _1->X.S.size; u32 a1 = _2->X.S.size; - return a0 > a1; // reverse -> descending + return a0 > a1; // reverse -> descending } void CRender::render_lights(light_Package& LP) @@ -117,8 +117,8 @@ void CRender::render_lights(light_Package& LP) if (bSpecial) { L->X.S.transluent = TRUE; Target->phase_smap_spot_tsh(L); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } else diff --git a/src/Layers/xrRenderPC_R2/r2_R_render.cpp b/src/Layers/xrRenderPC_R2/r2_R_render.cpp index d982dd0abe9..fdf69f40ce6 100644 --- a/src/Layers/xrRenderPC_R2/r2_R_render.cpp +++ b/src/Layers/xrRenderPC_R2/r2_R_render.cpp @@ -79,7 +79,7 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) ISpatial* spatial = lstRenderables[o_it]; spatial->spatial_updatesector(); CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure + if (0 == sector) continue; // disassociated from S/P structure if (spatial->GetSpatialData().type & STYPE_LIGHTSOURCE) { // lightsource @@ -93,7 +93,7 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) continue; } - if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector + if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector for (u32 v_it = 0; v_it < sector->r_frustums.size(); v_it++) { CFrustum& view = sector->r_frustums[v_it]; @@ -115,22 +115,22 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) v_orig.accept_frame = v_copy.accept_frame; v_orig.hom_frame = v_copy.hom_frame; v_orig.hom_tested = v_copy.hom_tested; - if (!bVisible) break; // exit loop on frustums + if (!bVisible) break; // exit loop on frustums // Rendering set_Object(renderable); renderable->renderable_Render(); set_Object(0); } - break; // exit loop on frustums + break; // exit loop on frustums } } - if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD + if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD } else { set_Object(0); - if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD + if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD } } @@ -143,14 +143,14 @@ void CRender::render_menu() // Main Render { - Target->u_setrt(Target->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT - g_pGamePersistent->OnRenderPPUI_main(); // PP-UI + Target->u_setrt(Target->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + g_pGamePersistent->OnRenderPPUI_main(); // PP-UI } // Distort { - Target->u_setrt(Target->rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask + Target->u_setrt(Target->rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, color_rgba(127, 127, 0, 127), 1.0f, 0L)); - g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI + g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI } // Actual Display @@ -206,7 +206,7 @@ void CRender::Render() //. VERIFY (g_pGameLevel && g_pGameLevel->pHUD); // Configure - RImplementation.o.distortion = FALSE; // disable distorion + RImplementation.o.distortion = FALSE; // disable distorion Fcolor sun_color = ((light*)Lights.sun_adapted._get())->color; BOOL bSUN = ps_r2_ls_flags.test(R2FLAG_SUN) && (u_diffuse2s(sun_color.r, sun_color.g, sun_color.b) > EPS); if (o.sunstatic) bSUN = FALSE; @@ -228,11 +228,11 @@ void CRender::Render() m_project.build_projection(deg2rad(Device.fFOV /* *Device.fASPECT*/), Device.fASPECT, VIEWPORT_NEAR, z_distance * g_pGamePersistent->Environment().CurrentEnv->far_plane); m_zfill.mul(m_project, Device.mView); - r_pmask(true, false); // enable priority "0" + r_pmask(true, false); // enable priority "0" set_Recorder(NULL); phase = PHASE_SMAP; render_main(m_zfill, false); - r_pmask(true, false); // disable priority "1" + r_pmask(true, false); // disable priority "1" BasicStats.Culling.End(); // flush @@ -270,7 +270,7 @@ void CRender::Render() //******* Main calc - DEFERRER RENDERER // Main calc BasicStats.Culling.Begin(); - r_pmask(true, false, true); // enable priority "0",+ capture wmarks + r_pmask(true, false, true); // enable priority "0",+ capture wmarks if (bSUN) set_Recorder(&main_coarse_structure); else @@ -278,7 +278,7 @@ void CRender::Render() phase = PHASE_NORMAL; render_main(Device.mFullTransform, true); set_Recorder(NULL); - r_pmask(true, false); // disable priority "1" + r_pmask(true, false); // disable priority "1" BasicStats.Culling.End(); BOOL split_the_scene_to_minimize_wait = FALSE; @@ -383,7 +383,7 @@ void CRender::Render() if (Wallmarks) { Target->phase_wallmarks(); g_r = 0; - Wallmarks->Render(); // wallmarks has priority as normal geometry + Wallmarks->Render(); // wallmarks has priority as normal geometry } // Update incremental shadowmap-visibility solver @@ -455,22 +455,22 @@ void CRender::Render() void CRender::render_forward() { VERIFY(0 == mapDistort.size()); - RImplementation.o.distortion = RImplementation.o.distortion_enabled; // enable distorion + RImplementation.o.distortion = RImplementation.o.distortion_enabled; // enable distorion //******* Main render - second order geometry (the one, that doesn't support deffering) //.todo: should be done inside "combine" with estimation of of luminance, tone-mapping, etc. { // level - r_pmask(false, true); // enable priority "1" + r_pmask(false, true); // enable priority "1" phase = PHASE_NORMAL; - render_main(Device.mFullTransform, false); // + render_main(Device.mFullTransform, false); // // Igor: we don't want to render old lods on next frame. mapLOD.clear(); - r_dsgraph_render_graph(1); // normal level, secondary priority - PortalTraverser.fade_render(); // faded-portals - r_dsgraph_render_sorted(); // strict-sorted geoms - g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts + r_dsgraph_render_graph(1); // normal level, secondary priority + PortalTraverser.fade_render(); // faded-portals + r_dsgraph_render_sorted(); // strict-sorted geoms + g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts } - RImplementation.o.distortion = FALSE; // disable distorion + RImplementation.o.distortion = FALSE; // disable distorion } diff --git a/src/Layers/xrRenderPC_R2/r2_R_sun.cpp b/src/Layers/xrRenderPC_R2/r2_R_sun.cpp index f4df8dbcf4d..4de2448cc34 100644 --- a/src/Layers/xrRenderPC_R2/r2_R_sun.cpp +++ b/src/Layers/xrRenderPC_R2/r2_R_sun.cpp @@ -4,8 +4,8 @@ #include "xrEngine/IRenderable.h" const float tweak_COP_initial_offs = 1200.f; -const float tweak_ortho_xform_initial_offs = 1000.f; //. ? -const float tweak_guaranteed_range = 20.f; //. ? +const float tweak_ortho_xform_initial_offs = 1000.f; //. ? +const float tweak_guaranteed_range = 20.f; //. ? // float OLES_SUN_LIMIT_27_01_07 = 180.f ; float OLES_SUN_LIMIT_27_01_07 = 100.f; @@ -152,17 +152,17 @@ Frustum::Frustum(const D3DXMATRIX* matrix) D3DXVECTOR4 column3(matrix->_13, matrix->_23, matrix->_33, matrix->_43); D3DXVECTOR4 planes[6]; - planes[0] = column4 - column1; // left - planes[1] = column4 + column1; // right - planes[2] = column4 - column2; // bottom - planes[3] = column4 + column2; // top - planes[4] = column4 - column3; // near - planes[5] = column4 + column3; // far + planes[0] = column4 - column1; // left + planes[1] = column4 + column1; // right + planes[2] = column4 - column2; // bottom + planes[3] = column4 + column2; // top + planes[4] = column4 - column3; // near + planes[5] = column4 + column3; // far // ignore near & far plane int p; - for (p = 0; p < 6; p++) // normalize the planes + for (p = 0; p < 6; p++) // normalize the planes { float dot = planes[p].x * planes[p].x + planes[p].y * planes[p].y + planes[p].z * planes[p].z; dot = 1.f / _sqrt(dot); @@ -176,7 +176,7 @@ Frustum::Frustum(const D3DXMATRIX* matrix) for (int i = 0; i < 6; i++) nVertexLUT[i] = ((planes[i].x < 0.f) ? 1 : 0) | ((planes[i].y < 0.f) ? 2 : 0) | ((planes[i].z < 0.f) ? 4 : 0); - for (int i = 0; i < 8; i++) // compute extrema + for (int i = 0; i < 8; i++) // compute extrema { const D3DXPLANE& p0 = (i & 1) ? camPlanes[4] : camPlanes[5]; const D3DXPLANE& p1 = (i & 2) ? camPlanes[3] : camPlanes[2]; @@ -534,7 +534,7 @@ class DumbConvexVolume for (int it = 0; it < int(polys.size()); it++) { _poly& base = polys[it]; - VERIFY(base.classify(cog) < 0); // debug + VERIFY(base.classify(cog) < 0); // debug int marker = (base.planeN.dotproduct(direction) <= 0) ? -1 : 1; @@ -577,8 +577,8 @@ class DumbConvexVolume int pend = int(points.size()); P.points.push_back(E.p0); P.points.push_back(E.p1); - P.points.push_back(pend - 1); // p1 mod - P.points.push_back(pend - 2); // p0 mod + P.points.push_back(pend - 1); // p1 mod + P.points.push_back(pend - 2); // p0 mod if (_debug) T.dbg_addline(points[E.p0], point.mad(points[E.p0], direction, -1000), color_rgba(0, 255, 0, 255)); if (_debug) @@ -627,7 +627,7 @@ struct DumbClipper { CFrustum frustum; xr_vector planes; - BOOL clip(D3DXVECTOR3& p0, D3DXVECTOR3& p1) // returns TRUE if result meaningfull + BOOL clip(D3DXVECTOR3& p0, D3DXVECTOR3& p1) // returns TRUE if result meaningfull { float denum; D3DXVECTOR3 D; @@ -636,7 +636,7 @@ struct DumbClipper D3DXPLANE& P = planes[it]; float cls0 = D3DXPlaneDotCoord(&P, &p0); float cls1 = D3DXPlaneDotCoord(&P, &p1); - if (cls0 > 0 && cls1 > 0) return false; // fully outside + if (cls0 > 0 && cls1 > 0) return false; // fully outside if (cls0 > 0) { // clip p0 @@ -865,12 +865,12 @@ void CRender::render_sun() // get the near and the far plane (points) in eye space. D3DXVECTOR3 frustumPnts[8]; - Frustum eyeFrustum(&m_Projection); // autocomputes all the extrema points + Frustum eyeFrustum(&m_Projection); // autocomputes all the extrema points for (int i = 0; i < 4; i++) { - frustumPnts[i] = eyeFrustum.pntList[(i << 1)]; // far plane - frustumPnts[i + 4] = eyeFrustum.pntList[(i << 1) | 0x1]; // near plane + frustumPnts[i] = eyeFrustum.pntList[(i << 1)]; // far plane + frustumPnts[i + 4] = eyeFrustum.pntList[(i << 1) | 0x1]; // near plane } // we need to transform the eye into the light's post-projective space. @@ -879,10 +879,10 @@ void CRender::render_sun() // this matrix is a variant of "light space" from LSPSMs, with the Y and Z axes permuted D3DXVECTOR3 leftVector, upVector, viewVector; - const D3DXVECTOR3 eyeVector(0.f, 0.f, -1.f); // eye is always -Z in eye space + const D3DXVECTOR3 eyeVector(0.f, 0.f, -1.f); // eye is always -Z in eye space // code copied straight from BuildLSPSMProjectionMatrix - D3DXVec3TransformNormal(&upVector, &m_lightDir, &m_View); // lightDir is defined in eye space, so xform it + D3DXVec3TransformNormal(&upVector, &m_lightDir, &m_View); // lightDir is defined in eye space, so xform it D3DXVec3Cross(&leftVector, &upVector, &eyeVector); D3DXVec3Normalize(&leftVector, &leftVector); D3DXVec3Cross(&viewVector, &upVector, &leftVector); @@ -920,7 +920,7 @@ void CRender::render_sun() float min_z = std::min(depthbounds.x, frustumBox.minPt.z); float max_z = std::max(depthbounds.y, frustumBox.maxPt.z); - if (min_z <= 1.f) //? + if (min_z <= 1.f) //? { D3DXMATRIX lightSpaceTranslate; D3DXMatrixTranslation(&lightSpaceTranslate, 0.f, 0.f, -min_z + 1.f); @@ -994,8 +994,8 @@ void CRender::render_sun() // compute eta. float lambda = frustumAABB2D.maxPt.x - frustumAABB2D.minPt.x; - float delta_proj = m_fTSM_Delta * lambda; // focusPt.x - frustumAABB2D.minPt.x; - const float xi = -0.6f; // - 0.6f; // 80% line + float delta_proj = m_fTSM_Delta * lambda; // focusPt.x - frustumAABB2D.minPt.x; + const float xi = -0.6f; // - 0.6f; // 80% line float eta = (lambda * delta_proj * (1.f + xi)) / (lambda * (1.f - xi) - 2.f * delta_proj); // compute the projection point a distance eta from the top line. this point is on the center line, y=0 @@ -1099,8 +1099,8 @@ void CRender::render_sun() } for (int e = 0; e < 8; e++) { - pt = wform(x_full_inverse, corners[e]); // world space - pt = wform(xform, pt); // trapezoid space + pt = wform(x_full_inverse, corners[e]); // world space + pt = wform(xform, pt); // trapezoid space b_receivers.modify(pt); } @@ -1158,8 +1158,8 @@ void CRender::render_sun() if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_FAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } @@ -1371,7 +1371,7 @@ void CRender::render_sun_near() r_dsgraph_render_subspace(cull_sector, &cull_frustum, cull_xform, cull_COP, TRUE); // Finalize & Cleanup - fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); + fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); // Render shadow-map //. !!! We should clip based on shrinked frustum (again) @@ -1389,8 +1389,8 @@ void CRender::render_sun_near() if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_NEAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } @@ -1700,8 +1700,8 @@ void CRender::render_sun_cascade(u32 cascade_ind) if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_FAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } diff --git a/src/Layers/xrRenderPC_R2/r2_loader.cpp b/src/Layers/xrRenderPC_R2/r2_loader.cpp index d6dec99d15f..250e3536985 100644 --- a/src/Layers/xrRenderPC_R2/r2_loader.cpp +++ b/src/Layers/xrRenderPC_R2/r2_loader.cpp @@ -31,7 +31,7 @@ void CRender::level_Load(IReader* fs) R_ASSERT2(chunk, "Level doesn't builded correctly."); u32 count = chunk->r_u32(); Shaders.resize(count); - for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one + for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one { string512 n_sh, n_tlist; LPCSTR n = LPCSTR(chunk->pointer()); diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget.cpp index ce5276a6635..5d687e85ddd 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget.cpp @@ -67,7 +67,7 @@ void CRenderTarget::u_stencil_optimize(BOOL common_stencil) pv++; RCache.Vertex.Unlock(4, g_combine->vb_stride); RCache.set_CullMode(CULL_NONE); - if (common_stencil) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, dwLightMarkerID, 0xff, 0x00); // keep/keep/keep + if (common_stencil) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, dwLightMarkerID, 0xff, 0x00); // keep/keep/keep RCache.set_Element(s_occq->E[1]); RCache.set_Geometry(g_combine); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); @@ -234,14 +234,14 @@ CRenderTarget::CRenderTarget() // can't - mix-depth if (RImplementation.o.fp16_blend) { // NV40 - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A16B16G16R16F); // expand to full + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A16B16G16R16F); // expand to full rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F); } else { // R4xx, no-fp-blend,-> albedo_wo VERIFY(RImplementation.o.albedo_wo); - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8); // normal + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8); // normal rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F); rt_Accumulator_temp.create(r2_RT_accum_temp, w, h, D3DFMT_A16B16G16R16F); } @@ -323,7 +323,7 @@ CRenderTarget::CRenderTarget() // BLOOM { - D3DFORMAT fmt = D3DFMT_A8R8G8B8; //; // D3DFMT_X8R8G8B8 + D3DFORMAT fmt = D3DFMT_A8R8G8B8; //; // D3DFMT_X8R8G8B8 u32 w = BLOOM_size_X, h = BLOOM_size_Y; u32 fvf_build = D3DFVF_XYZRHW | D3DFVF_TEX4 | D3DFVF_TEXCOORDSIZE2(0) | D3DFVF_TEXCOORDSIZE2(1) | D3DFVF_TEXCOORDSIZE2(2) | D3DFVF_TEXCOORDSIZE2(3); @@ -391,7 +391,7 @@ CRenderTarget::CRenderTarget() // COMBINE { static D3DVERTEXELEMENT9 dwDecl[] = { - {0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos+uv + {0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos+uv {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, {0, 20, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END()}; s_combine.create(b_combine, "r2\\combine"); @@ -445,29 +445,29 @@ CRenderTarget::CRenderTarget() switch (slice) { case 0: - { // looks like OrenNayar - fd = powf(ld, 0.75f); // 0.75 + { // looks like OrenNayar + fd = powf(ld, 0.75f); // 0.75 fs = powf(ls, 16.f) * .5f; } break; case 1: - { // looks like Blinn - fd = powf(ld, 0.90f); // 0.90 + { // looks like Blinn + fd = powf(ld, 0.90f); // 0.90 fs = powf(ls, 24.f); } break; case 2: - { // looks like Phong - fd = ld; // 1.0 + { // looks like Phong + fd = ld; // 1.0 fs = powf(ls * 1.01f, 128.f); } break; case 3: - { // looks like Metal + { // looks like Metal float s0 = _abs(1 - _abs(0.05f * _sin(33.f * ld) + ld - ls)); float s1 = _abs(1 - _abs(0.05f * _cos(33.f * ld * ls) + ld - ls)); float s2 = _abs(1 - _abs(ld - ls)); - fd = ld; // 1.0 + fd = ld; // 1.0 fs = powf(_max(_max(s0, s1), s2), 24.f); fs *= powf(ld, 1 / 7.f); } @@ -597,7 +597,7 @@ CRenderTarget::~CRenderTarget() #ifdef DEBUG _SHOW_REF("t_material_surf", t_material_surf); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_material_surf); t_LUM_src->surface_set(NULL); @@ -615,7 +615,7 @@ CRenderTarget::~CRenderTarget() _SHOW_REF("t_envmap_1 - #small", pSurf); //_SHOW_REF("t_envmap_0 - #small",t_envmap_0->pSurface); //_SHOW_REF("t_envmap_1 - #small",t_envmap_1->pSurface); -#endif // DEBUG +#endif // DEBUG t_envmap_0->surface_set(NULL); t_envmap_1->surface_set(NULL); t_envmap_0.destroy(); @@ -629,7 +629,7 @@ CRenderTarget::~CRenderTarget() t_noise[it]->surface_set(NULL); #ifdef DEBUG _SHOW_REF("t_noise_surf[it]", t_noise_surf[it]); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_noise_surf[it]); } diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget.h b/src/Layers/xrRenderPC_R2/r2_rendertarget.h index 05c83c81b4c..4ba68ae3d38 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget.h +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget.h @@ -43,38 +43,38 @@ class CRenderTarget : public IRender_Target #endif // MRT-path - ref_rt rt_Depth; // Z-buffer like - initial depth - ref_rt rt_Position; // 64bit, fat (x,y,z,?) (eye-space) - ref_rt rt_Normal; // 64bit, fat (x,y,z,hemi) (eye-space) - ref_rt rt_Color; // 64/32bit,fat (r,g,b,specular-gloss) (or decompressed MET-8-8-8-8) + ref_rt rt_Depth; // Z-buffer like - initial depth + ref_rt rt_Position; // 64bit, fat (x,y,z,?) (eye-space) + ref_rt rt_Normal; // 64bit, fat (x,y,z,hemi) (eye-space) + ref_rt rt_Color; // 64/32bit,fat (r,g,b,specular-gloss) (or decompressed MET-8-8-8-8) // - ref_rt rt_Accumulator; // 64bit (r,g,b,specular) - ref_rt rt_Accumulator_temp; // only for HW which doesn't feature fp16 blend - ref_rt rt_Generic_0; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. - ref_rt rt_Generic_1; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Accumulator; // 64bit (r,g,b,specular) + ref_rt rt_Accumulator_temp; // only for HW which doesn't feature fp16 blend + ref_rt rt_Generic_0; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Generic_1; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. // Igor: for volumetric lights - ref_rt rt_Generic_2; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. - ref_rt rt_Bloom_1; // 32bit, dim/4 (r,g,b,?) - ref_rt rt_Bloom_2; // 32bit, dim/4 (r,g,b,?) - ref_rt rt_LUM_64; // 64bit, 64x64, log-average in all components - ref_rt rt_LUM_8; // 64bit, 8x8, log-average in all components + ref_rt rt_Generic_2; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Bloom_1; // 32bit, dim/4 (r,g,b,?) + ref_rt rt_Bloom_2; // 32bit, dim/4 (r,g,b,?) + ref_rt rt_LUM_64; // 64bit, 64x64, log-average in all components + ref_rt rt_LUM_8; // 64bit, 8x8, log-average in all components // Igor: for async screenshots - IDirect3DSurface9* pFB; // 32bit (r,g,b,a) is situated in the system memory + IDirect3DSurface9* pFB; // 32bit (r,g,b,a) is situated in the system memory - ref_rt rt_LUM_pool[CHWCaps::MAX_GPUS * 2]; // 1xfp32,1x1, exp-result -> scaler - ref_texture t_LUM_src; // source - ref_texture t_LUM_dest; // destination & usage for current frame + ref_rt rt_LUM_pool[CHWCaps::MAX_GPUS * 2]; // 1xfp32,1x1, exp-result -> scaler + ref_texture t_LUM_src; // source + ref_texture t_LUM_dest; // destination & usage for current frame // env - ref_texture t_envmap_0; // env-0 - ref_texture t_envmap_1; // env-1 + ref_texture t_envmap_0; // env-0 + ref_texture t_envmap_1; // env-1 // smap - ref_rt rt_smap_surf; // 32bit, color - ref_rt rt_smap_depth; // 24(32) bit, depth - IDirect3DSurface9* rt_smap_ZB; // + ref_rt rt_smap_surf; // 32bit, color + ref_rt rt_smap_depth; // 24(32) bit, depth + IDirect3DSurface9* rt_smap_ZB; // // Textures IDirect3DVolumeTexture9* t_material_surf; @@ -134,7 +134,7 @@ class CRenderTarget : public IRender_Target // Combine ref_geom g_combine; - ref_geom g_combine_VP; // xy=p,zw=tc + ref_geom g_combine_VP; // xy=p,zw=tc ref_geom g_combine_2UV; ref_geom g_combine_cuboid; ref_geom g_aa_blur; @@ -220,7 +220,7 @@ class CRenderTarget : public IRender_Target bool need_to_render_sunshafts(); - BOOL enable_scissor(light* L); // true if intersects near plane + BOOL enable_scissor(light* L); // true if intersects near plane void enable_dbt_bounds(light* L); void disable_aniso(); diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_direct.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_direct.cpp index 7443282fda7..326873020f7 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_direct.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_direct.cpp @@ -47,7 +47,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); - if (SE_SUN_NEAR == sub_phase) //. + if (SE_SUN_NEAR == sub_phase) //. { // Fill vertex buffer FVF::TL* pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); @@ -66,7 +66,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -83,7 +83,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? // Perform lighting { @@ -261,7 +261,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); - if (SE_SUN_NEAR == sub_phase) //. + if (SE_SUN_NEAR == sub_phase) //. { // Fill vertex buffer FVF::TL* pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); @@ -280,7 +280,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -297,13 +297,13 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? // Perform lighting // if( sub_phase == SE_SUN_FAR ) //****************************************************************** { phase_accumulator(); - RCache.set_CullMode(CULL_CCW); //****************************************************************** + RCache.set_CullMode(CULL_CCW); //****************************************************************** RCache.set_ColorWriteEnable(); // texture adjustment matrix @@ -568,7 +568,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); - if (SE_SUN_NEAR == sub_phase) //. + if (SE_SUN_NEAR == sub_phase) //. { // For sun-filter - clear to zero CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, 0, 1.0f, 0L)); @@ -590,7 +590,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -607,11 +607,11 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? // Perform lighting { - u_setrt(rt_Generic_0, NULL, NULL, HW.pBaseZB); // enshure RT setup + u_setrt(rt_Generic_0, NULL, NULL, HW.pBaseZB); // enshure RT setup RCache.set_CullMode(CULL_NONE); RCache.set_ColorWriteEnable(); @@ -695,7 +695,7 @@ void CRenderTarget::accum_direct_lum() Fvector2 p0, p1; p0.set(.5f / _w, .5f / _h); p1.set((_w + .5f) / _w, (_h + .5f) / _h); - float d_Z = EPS_S; //, d_W = 1.f; + float d_Z = EPS_S; //, d_W = 1.f; // Common constants (light-related) Fvector L_dir, L_clr; @@ -899,8 +899,7 @@ void CRenderTarget::accum_direct_volumetric(u32 sub_phase, const u32 Offset, con if (ps_r2_ls_flags_ext.is(R2FLAGEXT_SUN_OLD)) zMin = ps_r2_sun_near; else - zMin = - 0; /////***************************************************************************************** + zMin = 0; /////***************************************************************************************** zMax = OLES_SUN_LIMIT_27_01_07; } diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_omnipart_geom.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_omnipart_geom.cpp index 6e1ac97c280..55249c5d31f 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_omnipart_geom.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_omnipart_geom.cpp @@ -36,12 +36,12 @@ void CRenderTarget::accum_omnip_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_omnip_ib", g_accum_omnip_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_omnip_ib); _RELEASE(g_accum_omnip_ib); #ifdef DEBUG _SHOW_REF("g_accum_omnip_vb", g_accum_omnip_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_omnip_vb); _RELEASE(g_accum_omnip_vb); } diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point.cpp index aa877fe7621..6750ac52d2e 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point.cpp @@ -45,7 +45,7 @@ void CRenderTarget::accum_point(light* L) // *** similar to "Carmack's reverse", but assumes convex, non intersecting objects, // *** thus can cope without stencil clear with 127 lights // *** in practice, 'cause we "clear" it back to 0x1 it usually allows us to > 200 lights :) - RCache.set_Element(s_accum_mask->E[SE_MASK_POINT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_POINT]); // masker RCache.set_ColorWriteEnable(FALSE); // backfaces: if (stencil>=1 && zfail) stencil = light_id @@ -66,7 +66,7 @@ void CRenderTarget::accum_point(light* L) // ***************************** Minimize overdraw ************************************* // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back /* if (bIntersect) RCache.set_CullMode (CULL_CW); // back else RCache.set_CullMode (CULL_CCW); // front diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point_geom.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point_geom.cpp index b3c3cbf9070..a97f8129537 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point_geom.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_point_geom.cpp @@ -318,12 +318,12 @@ void CRenderTarget::accum_point_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_point_ib", g_accum_point_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_point_ib); _RELEASE(g_accum_point_ib); #ifdef DEBUG _SHOW_REF("g_accum_point_vb", g_accum_point_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_point_vb); _RELEASE(g_accum_point_vb); } diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_reflected.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_reflected.cpp index b618d163e99..bfab04f0526 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_reflected.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_reflected.cpp @@ -9,7 +9,7 @@ void CRenderTarget::accum_reflected(light* L) // ***************************** Mask by stencil ************************************* ref_shader shader = s_accum_reflected; - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); L->xform_calc(); RCache.set_xform_world(L->m_xform); RCache.set_xform_view(Device.mView); @@ -21,9 +21,9 @@ void CRenderTarget::accum_reflected(light* L) // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); if (bIntersect) - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back else - RCache.set_CullMode(CULL_CCW); // front + RCache.set_CullMode(CULL_CCW); // front // 2D texgen (texture adjustment matrix) Fmatrix m_Texgen; diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot.cpp index c62ae692a62..a43aeec18ba 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot.cpp @@ -21,7 +21,7 @@ void CRenderTarget::accum_spot(light* L) if (!shader) shader = s_accum_spot; } - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); { // setup xform L->xform_calc(); @@ -35,7 +35,7 @@ void CRenderTarget::accum_spot(light* L) // *** thus can cope without stencil clear with 127 lights // *** in practice, 'cause we "clear" it back to 0x1 it usually allows us to > 200 lights :) RCache.set_ColorWriteEnable(FALSE); - RCache.set_Element(s_accum_mask->E[SE_MASK_SPOT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_SPOT]); // masker // backfaces: if (stencil>=1 && zfail) stencil = light_id RCache.set_CullMode(CULL_CW); @@ -56,7 +56,7 @@ void CRenderTarget::accum_spot(light* L) // ***************************** Minimize overdraw ************************************* // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back // 2D texgens Fmatrix m_Texgen; @@ -186,7 +186,7 @@ void CRenderTarget::accum_volumetric(light* L) // *** assume accumulator setted up *** // ***************************** Mask by stencil ************************************* - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); { // setup xform L->xform_calc(); @@ -199,7 +199,7 @@ void CRenderTarget::accum_volumetric(light* L) } RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_NONE); // back + RCache.set_CullMode(CULL_NONE); // back // 2D texgens Fmatrix m_Texgen; diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot_geom.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot_geom.cpp index 06049cacd67..ee1718f28ff 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot_geom.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_accum_spot_geom.cpp @@ -94,12 +94,12 @@ void CRenderTarget::accum_spot_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_spot_ib", g_accum_spot_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_spot_ib); _RELEASE(g_accum_spot_ib); #ifdef DEBUG _SHOW_REF("g_accum_spot_vb", g_accum_spot_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_spot_vb); _RELEASE(g_accum_spot_vb); } @@ -166,13 +166,13 @@ void CRenderTarget::accum_volumetric_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_volumetric_ib", g_accum_volumetric_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_volumetric_ib); _RELEASE(g_accum_volumetric_ib); #ifdef DEBUG _SHOW_REF("g_accum_volumetric_vb", g_accum_volumetric_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_volumetric_vb); _RELEASE(g_accum_volumetric_vb); } \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_enable_scissor.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_enable_scissor.cpp index 677213bcfaf..2987df9af60 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_enable_scissor.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_enable_scissor.cpp @@ -57,7 +57,7 @@ void CRenderTarget::u_DBT_disable() HW.pDevice->SetRenderState(D3DRS_ADAPTIVETESS_X, 0); } -BOOL CRenderTarget::enable_scissor(light* L) // true if intersects near plane +BOOL CRenderTarget::enable_scissor(light* L) // true if intersects near plane { // Msg ("%d: %x type(%d), pos(%f,%f,%f)",Device.dwFrame,u32(L),u32(L->flags.type),VPUSH(L->position)); diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_accumulator.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_accumulator.cpp index e597143b59e..bd115dd71c6 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_accumulator.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_accumulator.cpp @@ -19,7 +19,7 @@ void CRenderTarget::phase_accumulator() u_setrt(rt_Accumulator, NULL, NULL, HW.pBaseZB); // dwLightMarkerID = 5; // start from 5, increment in 2 units reset_light_marker(); - u32 clr4clear = color_rgba(0, 0, 0, 0); // 0x00 + u32 clr4clear = color_rgba(0, 0, 0, 0); // 0x00 CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, clr4clear, 1.0f, 0L)); // Do it after the sun to preserve data. @@ -50,7 +50,7 @@ void CRenderTarget::phase_vol_accumulator() m_bHasActiveVolumetric = true; u_setrt(rt_Generic_2, NULL, NULL, HW.pBaseZB); - u32 clr4clearVol = color_rgba(0, 0, 0, 0); // 0x00 + u32 clr4clearVol = color_rgba(0, 0, 0, 0); // 0x00 CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, clr4clearVol, 1.0f, 0L)); } else diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_bloom.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_bloom.cpp index 846ebe4efc6..d8328e4570c 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_bloom.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_bloom.cpp @@ -30,10 +30,10 @@ struct v_filter // Gauss filtering coeffs // Samples: 0-central, -1, -2,..., -7, 1, 2,... 7 // -void CalcGauss_k7(Fvector4& w0, // weight - Fvector4& w1, // weight - float r = 3.3f, // gaussian radius - float s_out = 1.f // resulting magnitude +void CalcGauss_k7(Fvector4& w0, // weight + Fvector4& w1, // weight + float r = 3.3f, // gaussian radius + float s_out = 1.f // resulting magnitude ) { float W[8]; @@ -41,21 +41,21 @@ void CalcGauss_k7(Fvector4& w0, // weight // calculate float mag = 0; for (int i = -7; i <= 0; i++) - W[-i] = expf(-float(i * i) / (2 * r * r)); // weight + W[-i] = expf(-float(i * i) / (2 * r * r)); // weight for (int i = 0; i < 8; i++) - mag += i ? 2 * W[i] : W[i]; // symmetrical weight + mag += i ? 2 * W[i] : W[i]; // symmetrical weight for (int i = 0; i < 8; i++) W[i] = s_out * W[i] / mag; // W[0]=0, W[7]=-7 - w0.set(W[1], W[2], W[3], W[4]); // -1, -2, -3, -4 - w1.set(W[5], W[6], W[7], W[0]); // -5, -6, -7, 0 + w0.set(W[1], W[2], W[3], W[4]); // -1, -2, -3, -4 + w1.set(W[5], W[6], W[7], W[0]); // -5, -6, -7, 0 } -void CalcGauss_wave(Fvector4& w0, // weight - Fvector4& w1, // weight - float r_base = 3.3f, // gaussian radius - float r_detail = 1.0f, // gaussian radius - float s_out = 1.f // resulting magnitude +void CalcGauss_wave(Fvector4& w0, // weight + Fvector4& w1, // weight + float r_base = 3.3f, // gaussian radius + float r_detail = 1.0f, // gaussian radius + float s_out = 1.f // resulting magnitude ) { Fvector4 t0, t1; @@ -70,7 +70,7 @@ void CRenderTarget::phase_bloom() u32 Offset; // Targets - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all // Clear - don't clear - it's stupid here :) // Stencil - disable @@ -129,8 +129,8 @@ void CRenderTarget::phase_bloom() RCache.Vertex.Unlock(4, g_bloom_build->vb_stride); // Perform combine (all scalers must account for 4 samples + final diffuse multiply); - float s = ps_r2_ls_bloom_threshold; // scale - f_bloom_factor = .9f * f_bloom_factor + .1f * ps_r2_ls_bloom_speed * Device.fTimeDelta; // speed + float s = ps_r2_ls_bloom_threshold; // scale + f_bloom_factor = .9f * f_bloom_factor + .1f * ps_r2_ls_bloom_speed * Device.fTimeDelta; // speed RCache.set_Element(s_bloom->E[0]); RCache.set_c("b_params", s, s, s, f_bloom_factor); RCache.set_Geometry(g_bloom_build); @@ -180,12 +180,12 @@ void CRenderTarget::phase_bloom() RCache.set_Geometry(g_bloom_build); // P0 - u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[3]); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); // P1 - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[4]); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } @@ -199,14 +199,14 @@ void CRenderTarget::phase_bloom() Fvector2 two = {2.f / _w, 2.f / _h}; Fvector2 one = {1.f / _w, 1.f / _h}; Fvector2 half = {.5f / _w, .5f / _h}; - Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center - Fvector4 a_1 = {a_0.x - one.x - half.x, half.y, half.y, a_0.w + one.x + half.x}; // -1,+1i - Fvector4 a_2 = {a_1.x - two.x, half.y, half.y, a_1.w + two.x}; // -2,+2i - Fvector4 a_3 = {a_2.x - two.x, half.y, half.y, a_2.w + two.x}; // -3,+3i - Fvector4 a_4 = {a_3.x - two.x, half.y, half.y, a_3.w + two.x}; // -4,+4i - Fvector4 a_5 = {a_4.x - two.x, half.y, half.y, a_4.w + two.x}; // -5,+5i - Fvector4 a_6 = {a_5.x - two.x, half.y, half.y, a_5.w + two.x}; // -6,+6i - Fvector4 a_7 = {a_6.x - two.x, half.y, half.y, a_6.w + two.x}; // -7,+7i + Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center + Fvector4 a_1 = {a_0.x - one.x - half.x, half.y, half.y, a_0.w + one.x + half.x}; // -1,+1i + Fvector4 a_2 = {a_1.x - two.x, half.y, half.y, a_1.w + two.x}; // -2,+2i + Fvector4 a_3 = {a_2.x - two.x, half.y, half.y, a_2.w + two.x}; // -3,+3i + Fvector4 a_4 = {a_3.x - two.x, half.y, half.y, a_3.w + two.x}; // -4,+4i + Fvector4 a_5 = {a_4.x - two.x, half.y, half.y, a_4.w + two.x}; // -5,+5i + Fvector4 a_6 = {a_5.x - two.x, half.y, half.y, a_5.w + two.x}; // -6,+6i + Fvector4 a_7 = {a_6.x - two.x, half.y, half.y, a_6.w + two.x}; // -7,+7i // Fill vertex buffer v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); @@ -264,7 +264,7 @@ void CRenderTarget::phase_bloom() Fvector4 w0, w1; float kernel = ps_r2_ls_bloom_kernel_g; CalcGauss_wave(w0, w1, kernel, kernel / 3.f, ps_r2_ls_bloom_kernel_scale); - u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[1]); RCache.set_ca("weight", 0, w0); RCache.set_ca("weight", 1, w1); @@ -279,14 +279,14 @@ void CRenderTarget::phase_bloom() Fvector2 two = {2.f / _w, 2.f / _h}; Fvector2 one = {1.f / _w, 1.f / _h}; Fvector2 half = {.5f / _w, .5f / _h}; - Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center - Fvector4 a_1 = {half.x, a_0.y - one.y - half.y, half.y + one.y + a_0.z, half.x}; // -1,+1i - Fvector4 a_2 = {half.x, a_1.y - two.y, two.y + a_1.z, half.x}; // -2,+2i - Fvector4 a_3 = {half.x, a_2.y - two.y, two.y + a_2.z, half.x}; // -3,+3i - Fvector4 a_4 = {half.x, a_3.y - two.y, two.y + a_3.z, half.x}; // -4,+4i - Fvector4 a_5 = {half.x, a_4.y - two.y, two.y + a_4.z, half.x}; // -5,+5i - Fvector4 a_6 = {half.x, a_5.y - two.y, two.y + a_5.z, half.x}; // -6,+6i - Fvector4 a_7 = {half.x, a_6.y - two.y, two.y + a_6.z, half.x}; // -7,+7i + Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center + Fvector4 a_1 = {half.x, a_0.y - one.y - half.y, half.y + one.y + a_0.z, half.x}; // -1,+1i + Fvector4 a_2 = {half.x, a_1.y - two.y, two.y + a_1.z, half.x}; // -2,+2i + Fvector4 a_3 = {half.x, a_2.y - two.y, two.y + a_2.z, half.x}; // -3,+3i + Fvector4 a_4 = {half.x, a_3.y - two.y, two.y + a_3.z, half.x}; // -4,+4i + Fvector4 a_5 = {half.x, a_4.y - two.y, two.y + a_4.z, half.x}; // -5,+5i + Fvector4 a_6 = {half.x, a_5.y - two.y, two.y + a_5.z, half.x}; // -6,+6i + Fvector4 a_7 = {half.x, a_6.y - two.y, two.y + a_6.z, half.x}; // -7,+7i // Fill vertex buffer v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); @@ -344,7 +344,7 @@ void CRenderTarget::phase_bloom() Fvector4 w0, w1; float kernel = ps_r2_ls_bloom_kernel_g * float(Device.dwHeight) / float(Device.dwWidth); CalcGauss_wave(w0, w1, kernel, kernel / 3.f, ps_r2_ls_bloom_kernel_scale); - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[2]); RCache.set_ca("weight", 0, w0); RCache.set_ca("weight", 1, w1); diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_combine.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_combine.cpp index 480addd5e1a..ddc0d83fd42 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_combine.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_combine.cpp @@ -73,7 +73,7 @@ void CRenderTarget::phase_combine() // // if (RImplementation.o.bug) { - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 if (RImplementation.o.nvstencil) { u_stencil_optimize(FALSE); RCache.set_ColorWriteEnable(); @@ -108,7 +108,7 @@ void CRenderTarget::phase_combine() ambclr.mul(ps_r2_sun_lumscale_amb); //. Fvector4 envclr = { envdesc.sky_color.x*2+EPS, envdesc.sky_color.y*2+EPS, - //envdesc.sky_color.z*2+EPS, envdesc.weight }; + // envdesc.sky_color.z*2+EPS, envdesc.weight }; Fvector4 envclr = {envdesc.hemi_color.x * 2 + EPS, envdesc.hemi_color.y * 2 + EPS, envdesc.hemi_color.z * 2 + EPS, envdesc.weight}; @@ -198,13 +198,13 @@ void CRenderTarget::phase_combine() // Forward rendering { - u_setrt(rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT RCache.set_CullMode(CULL_CCW); RCache.set_Stencil(FALSE); RCache.set_ColorWriteEnable(); // g_pGamePersistent->Environment().RenderClouds (); RImplementation.render_forward(); - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI } // Igor: for volumetric lights @@ -213,20 +213,20 @@ void CRenderTarget::phase_combine() // Perform blooming filter and distortion if needed RCache.set_Stencil(FALSE); - phase_bloom(); // HDR RT invalidated here + phase_bloom(); // HDR RT invalidated here // Distortion filter - BOOL bDistort = RImplementation.o.distortion_enabled; // This can be modified + BOOL bDistort = RImplementation.o.distortion_enabled; // This can be modified { if ((0 == RImplementation.mapDistort.size()) && !_menu_pp) bDistort = FALSE; if (bDistort) { - u_setrt(rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask + u_setrt(rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask RCache.set_CullMode(CULL_CCW); RCache.set_Stencil(FALSE); RCache.set_ColorWriteEnable(); CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, color_rgba(127, 127, 0, 127), 1.0f, 0L)); RImplementation.r_dsgraph_render_distort(); - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI } } @@ -237,7 +237,7 @@ void CRenderTarget::phase_combine() // Combine everything + perform AA if (PP_Complex) - u_setrt(rt_Color, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Color, 0, 0, HW.pBaseZB); // LDR RT else u_setrt(Device.dwWidth, Device.dwHeight, HW.pBaseRT, NULL, NULL, HW.pBaseZB); //. u_setrt ( Device.dwWidth,Device.dwHeight,HW.pBaseRT,NULL,NULL,HW.pBaseZB); @@ -311,9 +311,9 @@ void CRenderTarget::phase_combine() // Draw COLOR if (ps_r2_ls_flags.test(R2FLAG_AA)) - RCache.set_Element(s_combine->E[bDistort ? 3 : 1]); // look at blender_combine.cpp + RCache.set_Element(s_combine->E[bDistort ? 3 : 1]); // look at blender_combine.cpp else - RCache.set_Element(s_combine->E[bDistort ? 4 : 2]); // look at blender_combine.cpp + RCache.set_Element(s_combine->E[bDistort ? 4 : 2]); // look at blender_combine.cpp RCache.set_c("e_barrier", ps_r2_aa_barier.x, ps_r2_aa_barier.y, ps_r2_aa_barier.z, 0); RCache.set_c("e_weights", ps_r2_aa_weight.x, ps_r2_aa_weight.y, ps_r2_aa_weight.z, 0); RCache.set_c("e_kernel", ps_r2_aa_kernel, ps_r2_aa_kernel, ps_r2_aa_kernel, 0); @@ -332,7 +332,7 @@ void CRenderTarget::phase_combine() RCache.set_Stencil(FALSE); // if FP16-BLEND !not! supported - draw flares here, overwise they are already in the bloom target - /* if (!RImplementation.o.fp16_blend)*/ g_pGamePersistent->Environment().RenderFlares(); // lens-flares + /* if (!RImplementation.o.fp16_blend)*/ g_pGamePersistent->Environment().RenderFlares(); // lens-flares // Igor: screenshot will not have postprocess applied. // TODO: fox that later @@ -503,7 +503,7 @@ void CRenderTarget::phase_combine_volumetric() ambclr.mul(ps_r2_sun_lumscale_amb); //. Fvector4 envclr = { envdesc.sky_color.x*2+EPS, envdesc.sky_color.y*2+EPS, - //envdesc.sky_color.z*2+EPS, envdesc.weight }; + // envdesc.sky_color.z*2+EPS, envdesc.weight }; Fvector4 envclr = {envdesc.hemi_color.x * 2 + EPS, envdesc.hemi_color.y * 2 + EPS, envdesc.hemi_color.z * 2 + EPS, envdesc.weight}; diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_luminance.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_luminance.cpp index 50c35b94d5b..8309f622123 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_luminance.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_luminance.cpp @@ -34,8 +34,8 @@ void CRenderTarget::phase_luminance() float ts = 64; float _w = float(BLOOM_size_X); float _h = float(BLOOM_size_Y); - Fvector2 one = {2.f / _w, 2.f / _h}; // two, infact - Fvector2 half = {1.f / _w, 1.f / _h}; // one, infact + Fvector2 one = {2.f / _w, 2.f / _h}; // two, infact + Fvector2 half = {1.f / _w, 1.f / _h}; // one, infact Fvector2 a_0 = {half.x + 0, half.y + 0}; Fvector2 a_1 = {half.x + one.x, half.y + 0}; Fvector2 a_2 = {half.x + 0, half.y + one.y}; @@ -86,8 +86,8 @@ void CRenderTarget::phase_luminance() Fvector2 a[16], b[16]; for (int k = 0; k < 16; k++) { - int _x = (k * 2 + 1) % 8; // 1,3,5,7 - int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... + int _x = (k * 2 + 1) % 8; // 1,3,5,7 + int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... a[k].set(_x, _y).div(_src); b[k].set(a[k]).add(1); } @@ -96,19 +96,19 @@ void CRenderTarget::phase_luminance() v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); pv->p.set(eps, float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down + pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down pv++; pv->p.set(eps, eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up + pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up pv++; pv->p.set(float(_ts + eps), float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down + pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down pv++; pv->p.set(float(_ts + eps), eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up + pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up pv++; RCache.Vertex.Unlock(4, g_bloom_filter->vb_stride); RCache.set_Element(s_luminance->E[1]); @@ -126,8 +126,8 @@ void CRenderTarget::phase_luminance() Fvector2 a[16], b[16]; for (int k = 0; k < 16; k++) { - int _x = (k * 2 + 1) % 8; // 1,3,5,7 - int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... + int _x = (k * 2 + 1) % 8; // 1,3,5,7 + int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... a[k].set(_x, _y).div(_src); b[k].set(a[k]).add(1); } @@ -136,19 +136,19 @@ void CRenderTarget::phase_luminance() v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); pv->p.set(eps, float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down + pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down pv++; pv->p.set(eps, eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up + pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up pv++; pv->p.set(float(_ts + eps), float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down + pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down pv++; pv->p.set(float(_ts + eps), eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up + pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up pv++; RCache.Vertex.Unlock(4, g_bloom_filter->vb_stride); diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_scene.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_scene.cpp index 2d3d8eb1cff..d4f9ef810cd 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_scene.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_scene.cpp @@ -70,9 +70,9 @@ void CRenderTarget::phase_scene_end() // transfer from "rt_Accumulator" into "rt_Color" u_setrt(rt_Color, 0, 0, HW.pBaseZB); RCache.set_CullMode(CULL_NONE); - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 if (RImplementation.o.nvstencil) u_stencil_optimize(FALSE); - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 RCache.set_ColorWriteEnable(); // common calc for quad-rendering @@ -98,7 +98,7 @@ void CRenderTarget::phase_scene_end() RCache.Vertex.Unlock(4, g_combine->vb_stride); // if (stencil>=1 && aref_pass) stencil = light_id - RCache.set_Element(s_accum_mask->E[SE_MASK_ALBEDO]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_ALBEDO]); // masker RCache.set_Geometry(g_combine); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_smap_D.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_smap_D.cpp index 7eed4e05270..8cd0981a372 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_smap_D.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_smap_D.cpp @@ -36,7 +36,7 @@ void CRenderTarget::phase_smap_direct(light* L, u32 sub_phase) } */ // Cull always CCW. If you want to revert to previouse solution, please, revert bias setup/ - RCache.set_CullMode(CULL_CCW); // near + RCache.set_CullMode(CULL_CCW); // near if (RImplementation.o.HW_smap) RCache.set_ColorWriteEnable(FALSE); else @@ -46,7 +46,7 @@ void CRenderTarget::phase_smap_direct(light* L, u32 sub_phase) void CRenderTarget::phase_smap_direct_tsh(light* L, u32 sub_phase) { VERIFY(RImplementation.o.Tshadows); - u32 _clr = 0xffffffff; // color_rgba(127,127,12,12); + u32 _clr = 0xffffffff; // color_rgba(127,127,12,12); RCache.set_ColorWriteEnable(); CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, _clr, 1.0f, 0L)); } diff --git a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_ssao.cpp b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_ssao.cpp index 279642fa6f5..3d97598715c 100644 --- a/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_ssao.cpp +++ b/src/Layers/xrRenderPC_R2/r2_rendertarget_phase_ssao.cpp @@ -17,19 +17,19 @@ void CRenderTarget::phase_ssao() u32 Offset = 0; // Targets - u_setrt(rt_ssao_temp, NULL, NULL, NULL); // No need for ZBuffer at all - u32 clr4clear = color_rgba(0, 0, 0, 0); // 0x00 + u_setrt(rt_ssao_temp, NULL, NULL, NULL); // No need for ZBuffer at all + u32 clr4clear = color_rgba(0, 0, 0, 0); // 0x00 CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, clr4clear, 1.0f, 0L)); CHK_DX(HW.pDevice->SetRenderState(D3DRS_ZENABLE, FALSE)); - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 if (RImplementation.o.nvstencil) { u_stencil_optimize(FALSE); RCache.set_ColorWriteEnable(); } - RCache.set_Stencil(FALSE); // TODO - disable later + RCache.set_Stencil(FALSE); // TODO - disable later { Fmatrix m_v2w; @@ -92,13 +92,13 @@ void CRenderTarget::phase_downsamp() u32 Offset = 0; // Targets - u_setrt(rt_half_depth, NULL, NULL, NULL); // No need for ZBuffer at all - u32 clr4clear = color_rgba(0, 0, 0, 0); // 0x00 + u_setrt(rt_half_depth, NULL, NULL, NULL); // No need for ZBuffer at all + u32 clr4clear = color_rgba(0, 0, 0, 0); // 0x00 CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, clr4clear, 1.0f, 0L)); CHK_DX(HW.pDevice->SetRenderState(D3DRS_ZENABLE, FALSE)); - RCache.set_Stencil(FALSE); // TODO - disable later + RCache.set_Stencil(FALSE); // TODO - disable later { Fmatrix m_v2w; diff --git a/src/Layers/xrRenderPC_R2/r2_sector_detect.cpp b/src/Layers/xrRenderPC_R2/r2_sector_detect.cpp index 42b2e90639e..a400f0a5f3f 100644 --- a/src/Layers/xrRenderPC_R2/r2_sector_detect.cpp +++ b/src/Layers/xrRenderPC_R2/r2_sector_detect.cpp @@ -15,7 +15,7 @@ int CRender::translateSector(IRender_Sector* pSector) #ifdef DEBUG return (-1); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } IRender_Sector* CRender::detectSector(const Fvector& P) @@ -61,12 +61,12 @@ IRender_Sector* CRender::detectSector(const Fvector& P, Fvector& dir) int ID; if (id1 >= 0) { if (id2 >= 0) - ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found + ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found else - ID = id1; // only id1 found + ID = id1; // only id1 found } else if (id2 >= 0) - ID = id2; // only id2 found + ID = id2; // only id2 found else return 0; diff --git a/src/Layers/xrRenderPC_R2/r2_types.h b/src/Layers/xrRenderPC_R2/r2_types.h index 9723d2a8593..c300d02cf24 100644 --- a/src/Layers/xrRenderPC_R2/r2_types.h +++ b/src/Layers/xrRenderPC_R2/r2_types.h @@ -1,46 +1,46 @@ #pragma once // r3xx code-path (MRT) -#define r2_RT_depth "$user$depth" // MRT -#define r2_RT_P "$user$position" // MRT -#define r2_RT_N "$user$normal" // MRT -#define r2_RT_albedo "$user$albedo" // MRT +#define r2_RT_depth "$user$depth" // MRT +#define r2_RT_P "$user$position" // MRT +#define r2_RT_N "$user$normal" // MRT +#define r2_RT_albedo "$user$albedo" // MRT // other -#define r2_RT_accum "$user$accum" // --- 16 bit fp or 16 bit fx -#define r2_RT_accum_temp "$user$accum_temp" // --- 16 bit fp - only for HW which doesn't feature fp16 blend +#define r2_RT_accum "$user$accum" // --- 16 bit fp or 16 bit fx +#define r2_RT_accum_temp "$user$accum_temp" // --- 16 bit fp - only for HW which doesn't feature fp16 blend -#define r2_T_envs0 "$user$env_s0" // --- -#define r2_T_envs1 "$user$env_s1" // --- +#define r2_T_envs0 "$user$env_s0" // --- +#define r2_T_envs1 "$user$env_s1" // --- #define r2_T_sky0 "$user$sky0" #define r2_T_sky1 "$user$sky1" -#define r2_RT_generic0 "$user$generic0" // --- -#define r2_RT_generic1 "$user$generic1" // --- -#define r2_RT_generic2 "$user$generic2" // --- // Igor: for volumetric lights +#define r2_RT_generic0 "$user$generic0" // --- +#define r2_RT_generic1 "$user$generic1" // --- +#define r2_RT_generic2 "$user$generic2" // --- // Igor: for volumetric lights -#define r2_RT_ssao_temp "$user$ssao_temp" // temporary rt for ssao calculation -#define r2_RT_half_depth "$user$half_depth" // temporary rt for hbao calculation +#define r2_RT_ssao_temp "$user$ssao_temp" // temporary rt for ssao calculation +#define r2_RT_half_depth "$user$half_depth" // temporary rt for hbao calculation -#define r2_RT_bloom1 "$user$bloom1" // --- -#define r2_RT_bloom2 "$user$bloom2" // --- +#define r2_RT_bloom1 "$user$bloom1" // --- +#define r2_RT_bloom2 "$user$bloom2" // --- -#define r2_RT_luminance_t64 "$user$lum_t64" // --- temp -#define r2_RT_luminance_t8 "$user$lum_t8" // --- temp +#define r2_RT_luminance_t64 "$user$lum_t64" // --- temp +#define r2_RT_luminance_t8 "$user$lum_t8" // --- temp -#define r2_RT_luminance_src "$user$tonemap_src" // --- prev-frame-result -#define r2_RT_luminance_cur "$user$tonemap" // --- result -#define r2_RT_luminance_pool "$user$luminance" // --- pool +#define r2_RT_luminance_src "$user$tonemap_src" // --- prev-frame-result +#define r2_RT_luminance_cur "$user$tonemap" // --- result +#define r2_RT_luminance_pool "$user$luminance" // --- pool -#define r2_RT_smap_surf "$user$smap_surf" // --- directional -#define r2_RT_smap_depth "$user$smap_depth" // ---directional +#define r2_RT_smap_surf "$user$smap_surf" // --- directional +#define r2_RT_smap_depth "$user$smap_depth" // ---directional -#define r2_material "$user$material" // --- -#define r2_ds2_fade "$user$ds2_fade" // --- +#define r2_material "$user$material" // --- +#define r2_ds2_fade "$user$ds2_fade" // --- -#define r2_jitter "$user$jitter_" // --- dither -#define r2_jitter_mipped "$user$jitter_mipped" // --- dither +#define r2_jitter "$user$jitter_" // --- dither +#define r2_jitter_mipped "$user$jitter_mipped" // --- dither #define r2_sunmask "sunmask" #define JITTER(a) r2_jitter #a @@ -51,26 +51,26 @@ const u32 SMAP_adapt_min = 32; const u32 SMAP_adapt_optimal = 768; const u32 SMAP_adapt_max = 1536; -const u32 TEX_material_LdotN = 128; // diffuse, X, almost linear = small res -const u32 TEX_material_LdotH = 256; // specular, Y +const u32 TEX_material_LdotN = 128; // diffuse, X, almost linear = small res +const u32 TEX_material_LdotH = 256; // specular, Y const u32 TEX_jitter = 64; -const u32 TEX_jitter_count = 5; // for HBAO +const u32 TEX_jitter_count = 5; // for HBAO const u32 BLOOM_size_X = 256; const u32 BLOOM_size_Y = 256; const u32 LUMINANCE_size = 16; // deffer -#define SE_R2_NORMAL_HQ 0 // high quality/detail -#define SE_R2_NORMAL_LQ 1 // low quality -#define SE_R2_SHADOW 2 // shadow generation +#define SE_R2_NORMAL_HQ 0 // high quality/detail +#define SE_R2_NORMAL_LQ 1 // low quality +#define SE_R2_SHADOW 2 // shadow generation // spot #define SE_L_FILL 0 #define SE_L_UNSHADOWED 1 -#define SE_L_NORMAL 2 // typical, scaled -#define SE_L_FULLSIZE 3 // full texture coverage -#define SE_L_TRANSLUENT 4 // with opacity/color mask +#define SE_L_NORMAL 2 // typical, scaled +#define SE_L_FULLSIZE 3 // full texture coverage +#define SE_L_TRANSLUENT 4 // with opacity/color mask // mask #define SE_MASK_SPOT 0 diff --git a/src/Layers/xrRenderPC_R3/Light_Render_Direct.h b/src/Layers/xrRenderPC_R3/Light_Render_Direct.h index 68e888c3b75..7868cdd9072 100644 --- a/src/Layers/xrRenderPC_R3/Light_Render_Direct.h +++ b/src/Layers/xrRenderPC_R3/Light_Render_Direct.h @@ -3,5 +3,5 @@ class CLight_Compute_XFORM_and_VIS { public: - void compute_xf_spot(light* L); // + void compute_xf_spot(light* L); // }; diff --git a/src/Layers/xrRenderPC_R3/Light_Render_Direct_ComputeXFS.cpp b/src/Layers/xrRenderPC_R3/Light_Render_Direct_ComputeXFS.cpp index ff4674ffffe..c355f3018a6 100644 --- a/src/Layers/xrRenderPC_R3/Light_Render_Direct_ComputeXFS.cpp +++ b/src/Layers/xrRenderPC_R3/Light_Render_Direct_ComputeXFS.cpp @@ -44,23 +44,23 @@ void CLight_Compute_XFORM_and_VIS::compute_xf_spot(light* L) // compute intensity float intensity0 = (L->color.r + L->color.g + L->color.b) / 3.f; float intensity1 = (L->color.r * 0.2125f + L->color.g * 0.7154f + L->color.b * 0.0721f); - float intensity = (intensity0 + intensity1) / 2.f; // intensity1 tends to underestimate... + float intensity = (intensity0 + intensity1) / 2.f; // intensity1 tends to underestimate... // compute how much duelling frusta occurs [-1..1]-> 1 + [-0.5 .. +0.5] float duel_dot = 1.f - 0.5f * Device.vCameraDirection.dotproduct(L_dir); // compute how large the light is - give more texels to larger lights, assume 8m as being optimal radius - float sizefactor = L->range / 8.f; // 4m = .5, 8m=1.f, 16m=2.f, 32m=4.f + float sizefactor = L->range / 8.f; // 4m = .5, 8m=1.f, 16m=2.f, 32m=4.f // compute how wide the light frustum is - assume 90deg as being optimal - float widefactor = L->cone / deg2rad(90.f); // + float widefactor = L->cone / deg2rad(90.f); // // factors - float factor0 = powf(ssa, 1.f / 2.f); // ssa is quadratic - float factor1 = powf(intensity, 1.f / 16.f); // less perceptually important? - float factor2 = powf(duel_dot, 1.f / 4.f); // difficult to fast-change this -> visible - float factor3 = powf(sizefactor, 1.f / 4.f); // this shouldn't make much difference - float factor4 = powf(widefactor, 1.f / 2.f); // make it linear ??? + float factor0 = powf(ssa, 1.f / 2.f); // ssa is quadratic + float factor1 = powf(intensity, 1.f / 16.f); // less perceptually important? + float factor2 = powf(duel_dot, 1.f / 4.f); // difficult to fast-change this -> visible + float factor3 = powf(sizefactor, 1.f / 4.f); // this shouldn't make much difference + float factor4 = powf(widefactor, 1.f / 2.f); // make it linear ??? float factor = ps_r2_ls_squality * factor0 * factor1 * factor2 * factor3 * factor4; // final size calc diff --git a/src/Layers/xrRenderPC_R3/SMAP_Allocator.h b/src/Layers/xrRenderPC_R3/SMAP_Allocator.h index 485f261979a..a29476fc442 100644 --- a/src/Layers/xrRenderPC_R3/SMAP_Allocator.h +++ b/src/Layers/xrRenderPC_R3/SMAP_Allocator.h @@ -24,16 +24,16 @@ struct SMAP_Rect } void get_cp(Ivector2& p0, Ivector2& p1) { - p0.set(max.x + 1, min.y); // right - p1.set(min.x, max.y + 1); // down + p0.set(max.x + 1, min.y); // right + p1.set(min.x, max.y + 1); // down } }; class SMAP_Allocator { - u32 psize; // pool size - xr_vector stack; // - xr_vector cpoint; // critical points + u32 psize; // pool size + xr_vector stack; // + xr_vector cpoint; // critical points private: void _add(SMAP_Rect& R) { @@ -41,8 +41,8 @@ class SMAP_Allocator Ivector2 p0, p1; R.get_cp(p0, p1); s32 ps = s32(psize); - if ((p0.x < ps) && (p0.y < ps)) cpoint.push_back(p0); // 1st - if ((p1.x < ps) && (p1.y < ps)) cpoint.push_back(p1); // 2nd + if ((p0.x < ps) && (p0.y < ps)) cpoint.push_back(p0); // 1st + if ((p1.x < ps) && (p1.y < ps)) cpoint.push_back(p1); // 2nd } public: diff --git a/src/Layers/xrRenderPC_R3/blender_bloom_build.cpp b/src/Layers/xrRenderPC_R3/blender_bloom_build.cpp index 9d8ea1acf10..466ebcb563d 100644 --- a/src/Layers/xrRenderPC_R3/blender_bloom_build.cpp +++ b/src/Layers/xrRenderPC_R3/blender_bloom_build.cpp @@ -17,7 +17,7 @@ void CBlender_bloom_build::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // transfer into bloom-target + case 0: // transfer into bloom-target C.r_Pass("stub_notransform_build", "bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); // C.r_Sampler_clf ("s_image", r2_RT_generic1); @@ -25,28 +25,28 @@ void CBlender_bloom_build::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // X-filter + case 1: // X-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // Y-filter + case 2: // Y-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // FF-filter_P0 + case 3: // FF-filter_P0 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // FF-filter_P1 + case 4: // FF-filter_P1 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); @@ -70,7 +70,7 @@ void CBlender_bloom_build_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // transfer into bloom-target + case 0: // transfer into bloom-target C.r_Pass("stub_notransform_build", "bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); // C.r_Sampler_clf ("s_image", r2_RT_generic1); @@ -78,28 +78,28 @@ void CBlender_bloom_build_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // X-filter + case 1: // X-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // Y-filter + case 2: // Y-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // FF-filter_P0 + case 3: // FF-filter_P0 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // FF-filter_P1 + case 4: // FF-filter_P1 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); @@ -123,7 +123,7 @@ void CBlender_postprocess_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // transfer into bloom-target + case 0: // transfer into bloom-target C.r_Pass("stub_notransform_postpr", "postprocess", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_dx10Texture("s_base0", r2_RT_generic); @@ -135,7 +135,7 @@ void CBlender_postprocess_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case 4: // use color map + case 4: // use color map C.r_Pass("stub_notransform_postpr", "postprocess_CM", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_dx10Texture("s_base0", r2_RT_generic); diff --git a/src/Layers/xrRenderPC_R3/blender_combine.cpp b/src/Layers/xrRenderPC_R3/blender_combine.cpp index dceb9c87405..f3ba70d4e8c 100644 --- a/src/Layers/xrRenderPC_R3/blender_combine.cpp +++ b/src/Layers/xrRenderPC_R3/blender_combine.cpp @@ -17,10 +17,10 @@ void CBlender_combine::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // combine + case 0: // combine C.r_Pass("combine_1", "combine_1_nomsaa", FALSE, FALSE, FALSE, TRUE, D3DBLEND_INVSRCALPHA, - D3DBLEND_SRCALPHA); //. MRT-blend? - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 + D3DBLEND_SRCALPHA); //. MRT-blend? + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 C.r_StencilRef(0x01); // C.r_Sampler_rtf ("s_position", r2_RT_P ); // C.r_Sampler_rtf ("s_normal", r2_RT_N ); @@ -55,7 +55,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // aa-edge-detection + AA :) + case 1: // aa-edge-detection + AA :) C.r_Pass("stub_notransform_aa_AA", "combine_2_AA", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -73,7 +73,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // non-AA + case 2: // non-AA // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -92,7 +92,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // aa-edge-detection + AA :) + DISTORTION + case 3: // aa-edge-detection + AA :) + DISTORTION C.r_Pass("stub_notransform_aa_AA", "combine_2_AA_D", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -110,7 +110,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // non-AA + DISTORTION + case 4: // non-AA + DISTORTION // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA_D", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -129,7 +129,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 5: // post-processing + case 5: // post-processing break; } } @@ -154,10 +154,10 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // combine + case 0: // combine C.r_Pass("combine_1", "combine_1_msaa", FALSE, FALSE, FALSE, TRUE, D3DBLEND_INVSRCALPHA, - D3DBLEND_SRCALPHA); //. MRT-blend? - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 + D3DBLEND_SRCALPHA); //. MRT-blend? + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 C.r_StencilRef(0x01); // C.r_Sampler_rtf ("s_position", r2_RT_P ); // C.r_Sampler_rtf ("s_normal", r2_RT_N ); @@ -192,7 +192,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // aa-edge-detection + AA :) + case 1: // aa-edge-detection + AA :) C.r_Pass("stub_notransform_aa_AA", "combine_2_AA", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -210,7 +210,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // non-AA + case 2: // non-AA // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA", FALSE, FALSE, TRUE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -229,7 +229,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // aa-edge-detection + AA :) + DISTORTION + case 3: // aa-edge-detection + AA :) + DISTORTION C.r_Pass("stub_notransform_aa_AA", "combine_2_AA_D", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -247,7 +247,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // non-AA + DISTORTION + case 4: // non-AA + DISTORTION // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA_D", FALSE, FALSE, TRUE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -266,7 +266,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 5: // post-processing + case 5: // post-processing break; } GlobalEnv.Render->m_MSAASample = -1; diff --git a/src/Layers/xrRenderPC_R3/blender_deffer_aref.cpp b/src/Layers/xrRenderPC_R3/blender_deffer_aref.cpp index beee82bdb02..4adc8ca62eb 100644 --- a/src/Layers/xrRenderPC_R3/blender_deffer_aref.cpp +++ b/src/Layers/xrRenderPC_R3/blender_deffer_aref.cpp @@ -76,7 +76,7 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) } else { - C.SetParams(1, false); //. + C.SetParams(1, false); //. bool bUseATOC = (RImplementation.o.dx10_msaa_alphatest == CRender::MSAA_ATEST_DX10_0_ATOC); @@ -84,7 +84,7 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) // ***only pixel shaders differ*** switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer if (bUseATOC) { uber_deffer(C, true, "base", "base_atoc", true, 0, true); @@ -104,7 +104,7 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer if (bUseATOC) { uber_deffer(C, false, "base", "base_atoc", true, 0, true); @@ -124,8 +124,8 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_SHADOW: // smap - // if (RImplementation.o.HW_smap) C.r_Pass + case SE_R2_SHADOW: // smap + // if (RImplementation.o.HW_smap) C.r_Pass //("shadow_direct_base_aref","shadow_direct_base_aref",FALSE,TRUE,TRUE,FALSE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,220); // else C.r_Pass //("shadow_direct_base_aref","shadow_direct_base_aref",FALSE); diff --git a/src/Layers/xrRenderPC_R3/blender_deffer_flat.cpp b/src/Layers/xrRenderPC_R3/blender_deffer_flat.cpp index 5f766891ba3..b3d70080783 100644 --- a/src/Layers/xrRenderPC_R3/blender_deffer_flat.cpp +++ b/src/Layers/xrRenderPC_R3/blender_deffer_flat.cpp @@ -49,21 +49,21 @@ void CBlender_deffer_flat::Compile(CBlender_Compile& C) // codepath is the same, only the shaders differ switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "base", "base", false, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); C.r_StencilRef(0x01); C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "base", "base", false, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); C.r_StencilRef(0x01); C.r_End(); break; - case SE_R2_SHADOW: // smap-direct + case SE_R2_SHADOW: // smap-direct // if (RImplementation.o.HW_smap) C.r_Pass ("shadow_direct_base","dumb", FALSE,TRUE,TRUE,FALSE); // else C.r_Pass ("shadow_direct_base","shadow_direct_base",FALSE); C.r_Pass("shadow_direct_base", "dumb", FALSE, TRUE, TRUE, FALSE); diff --git a/src/Layers/xrRenderPC_R3/blender_deffer_model.cpp b/src/Layers/xrRenderPC_R3/blender_deffer_model.cpp index c3d1a132944..74a4d3c39b3 100644 --- a/src/Layers/xrRenderPC_R3/blender_deffer_model.cpp +++ b/src/Layers/xrRenderPC_R3/blender_deffer_model.cpp @@ -75,8 +75,8 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) LPCSTR vsname, psname; switch (C.iElement) { - case 0: // - case 1: // + case 0: // + case 1: // vsname = psname = "model_def_lq"; C.r_Pass( vsname, psname, TRUE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); @@ -98,7 +98,7 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer if (bUseATOC) { uber_deffer(C, true, "model", "base_atoc", bAref, 0, true); C.r_Stencil( @@ -117,7 +117,7 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) if (bUseATOC) C.RS.SetRS(D3DRS_ZFUNC, D3DCMP_EQUAL); C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer if (bUseATOC) { uber_deffer(C, false, "model", "base_atoc", bAref, 0, true); C.r_Stencil( @@ -135,7 +135,7 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) if (bUseATOC) C.RS.SetRS(D3DRS_ZFUNC, D3DCMP_EQUAL); C.r_End(); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap if (bAref) { // if (RImplementation.o.HW_smap) C.r_Pass ("shadow_direct_model_aref","shadow_direct_base_aref", // FALSE,TRUE,TRUE,FALSE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,220); diff --git a/src/Layers/xrRenderPC_R3/blender_light_direct.cpp b/src/Layers/xrRenderPC_R3/blender_light_direct.cpp index b80801740d7..f7d5ecc881f 100644 --- a/src/Layers/xrRenderPC_R3/blender_light_direct.cpp +++ b/src/Layers/xrRenderPC_R3/blender_light_direct.cpp @@ -17,7 +17,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) // BOOL b_HW_smap = RImplementation.o.HW_smap; // BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -26,13 +26,13 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping - case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping // FVF::TL2uv C.r_Pass("accum_sun", "accum_sun_near_nomsaa_nominmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -50,7 +50,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_FAR: // far pass, only stencil clipping performed + case SE_SUN_FAR: // far pass, only stencil clipping performed // FVF::TL2uv // C.r_Pass ("null", "accum_sun_far", false, TRUE, FALSE,blend,D3DBLEND_ONE,dest); C.r_Pass("accum_sun", "accum_sun_far_nomsaa", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); @@ -88,7 +88,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_LUMINANCE: // luminance pass + case SE_SUN_LUMINANCE: // luminance pass // C.r_Pass ("null", "accum_sun", false, FALSE, FALSE); C.r_Pass("stub_notransform_aa_AA", "accum_sun_nomsaa", false, FALSE, FALSE); C.r_CullMode(D3DCULL_NONE); @@ -110,11 +110,11 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) break; // SE_SUN_NEAR for min/max - case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping // FVF::TL2uv C.r_Pass("accum_sun", "accum_sun_near_nomsaa_minmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -181,7 +181,7 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) // BOOL b_HW_smap = RImplementation.o.HW_smap; // BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -190,13 +190,13 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping - case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping // FVF::TL2uv // C.r_Pass ("null", "accum_sun_near", false, TRUE, FALSE,blend,D3DBLEND_ONE,dest); C.r_Pass("accum_sun", "accum_sun_near_msaa_nominmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer // C.r_Sampler_rtf ("s_position", r2_RT_P ); // C.r_Sampler_rtf ("s_normal", r2_RT_N ); // C.r_Sampler_clw ("s_material", r2_material ); @@ -226,7 +226,7 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_FAR: // far pass, only stencil clipping performed + case SE_SUN_FAR: // far pass, only stencil clipping performed // FVF::TL2uv // C.r_Pass ("null", "accum_sun_far", false, TRUE, FALSE,blend,D3DBLEND_ONE,dest); C.r_Pass("accum_sun", "accum_sun_far_msaa", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); @@ -264,7 +264,7 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_LUMINANCE: // luminance pass + case SE_SUN_LUMINANCE: // luminance pass // C.r_Pass ("null", "accum_sun", false, FALSE, FALSE); C.r_Pass("stub_notransform_aa_AA", "accum_sun_msaa", false, FALSE, FALSE); C.r_CullMode(D3DCULL_NONE); @@ -286,11 +286,11 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) break; // SE_SUN_NEAR for minmax - case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping // FVF::TL2uv C.r_Pass("accum_sun", "accum_sun_near_msaa_minmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -334,7 +334,7 @@ void CBlender_accum_direct_volumetric_msaa::Compile(CBlender_Compile& C) // BOOL b_HW_smap = RImplementation.o.HW_smap; // BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -343,7 +343,7 @@ void CBlender_accum_direct_volumetric_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // near pass - enable Z-test to perform depth-clipping + case 0: // near pass - enable Z-test to perform depth-clipping C.r_Pass("accum_sun", "accum_volumetric_sun_msaa", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_dx10Texture("s_lmap", C.L_textures[0]); C.r_dx10Texture("s_smap", r2_RT_smap_depth); @@ -380,7 +380,7 @@ void CBlender_accum_direct_volumetric_sun_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // near pass - enable Z-test to perform depth-clipping + case 0: // near pass - enable Z-test to perform depth-clipping C.r_Pass( "accum_sun", "accum_volumetric_sun_msaa", false, false, false, true, D3DBLEND_ONE, D3DBLEND_ONE, false, 0); C.r_dx10Texture("s_smap", r2_RT_smap_depth); diff --git a/src/Layers/xrRenderPC_R3/blender_light_mask.cpp b/src/Layers/xrRenderPC_R3/blender_light_mask.cpp index 2d6be5e4a23..b921ab68b95 100644 --- a/src/Layers/xrRenderPC_R3/blender_light_mask.cpp +++ b/src/Layers/xrRenderPC_R3/blender_light_mask.cpp @@ -18,7 +18,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_MASK_SPOT: // spot or omni-part + case SE_MASK_SPOT: // spot or omni-part C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -26,7 +26,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_POINT: // point + case SE_MASK_POINT: // point C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -34,7 +34,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_DIRECT: // stencil mask for directional light + case SE_MASK_DIRECT: // stencil mask for directional light // FVF::F_TL // C.r_Pass ("null", "accum_sun_mask", false, // FALSE,FALSE,TRUE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,1); @@ -49,14 +49,14 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) + case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) C.r_Pass("accum_volume", "copy_p_nomsaa", false, FALSE, FALSE); // C.r_Sampler_rtf ("s_base", r2_RT_accum_temp ); C.r_dx10Texture("s_generic", r2_RT_accum_temp); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) + case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); @@ -66,7 +66,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) + case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); @@ -101,7 +101,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_MASK_SPOT: // spot or omni-part + case SE_MASK_SPOT: // spot or omni-part C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -109,7 +109,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_POINT: // point + case SE_MASK_POINT: // point C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -117,7 +117,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_DIRECT: // stencil mask for directional light + case SE_MASK_DIRECT: // stencil mask for directional light // FVF::F_TL // C.r_Pass ("null", "accum_sun_mask", false, // FALSE,FALSE,TRUE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,1); @@ -132,14 +132,14 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) + case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) C.r_Pass("accum_volume", "copy_p_msaa", false, FALSE, FALSE); // C.r_Sampler_rtf ("s_base", r2_RT_accum_temp ); C.r_dx10Texture("s_generic", r2_RT_accum_temp); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) + case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); @@ -149,7 +149,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) + case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); diff --git a/src/Layers/xrRenderPC_R3/blender_light_occq.cpp b/src/Layers/xrRenderPC_R3/blender_light_occq.cpp index 66dba739a5f..6a63b28e39c 100644 --- a/src/Layers/xrRenderPC_R3/blender_light_occq.cpp +++ b/src/Layers/xrRenderPC_R3/blender_light_occq.cpp @@ -17,19 +17,19 @@ void CBlender_light_occq::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // occlusion testing + case 0: // occlusion testing C.r_Pass("dumb", "dumb", false, TRUE, FALSE, FALSE); C.r_End(); // Color write as well as culling and stencil are set up manually in code. break; - case 1: // NV40 optimization :) + case 1: // NV40 optimization :) C.r_Pass("stub_notransform_t", "dumb", false, FALSE, FALSE, FALSE); C.r_ColorWriteEnable(false, false, false, false); C.r_CullMode(D3DCULL_NONE); - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // keep/keep/keep + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // keep/keep/keep C.r_End(); break; - case 2: // Stencil clear in case we've ran out of markers. + case 2: // Stencil clear in case we've ran out of markers. C.r_Pass("stub_notransform_t", "dumb", false, FALSE, FALSE, FALSE); C.r_ColorWriteEnable(false, false, false, false); C.r_CullMode(D3DCULL_NONE); @@ -40,7 +40,8 @@ void CBlender_light_occq::Compile(CBlender_Compile& C) // Clear all bits except the last one C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0x00, 0xFE, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO); } - // C.r_Stencil (TRUE,D3DCMP_ALWAYS,0x00,0xFF, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO); // + // C.r_Stencil (TRUE,D3DCMP_ALWAYS,0x00,0xFF, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO); + // // // keep/keep/keep C.r_End(); break; diff --git a/src/Layers/xrRenderPC_R3/blender_light_point.cpp b/src/Layers/xrRenderPC_R3/blender_light_point.cpp index 6ebc8df0fd2..70809b9dc83 100644 --- a/src/Layers/xrRenderPC_R3/blender_light_point.cpp +++ b/src/Layers/xrRenderPC_R3/blender_light_point.cpp @@ -21,7 +21,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; switch (C.iElement) { - case SE_L_FILL: // fill projective + case SE_L_FILL: // fill projective // C.r_Pass ("null", "copy", false, FALSE, FALSE); C.r_Pass("stub_notransform", "copy_nomsaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0] ); @@ -29,7 +29,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_omni_unshadowed_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -47,7 +47,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_omni_normal_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -74,7 +74,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_omni_normal_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -101,7 +101,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_omni_transluent_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -155,7 +155,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; switch (C.iElement) { - case SE_L_FILL: // fill projective + case SE_L_FILL: // fill projective // C.r_Pass ("null", "copy", false, FALSE, FALSE); C.r_Pass("stub_notransform", "copy_msaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0] ); @@ -163,7 +163,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_omni_unshadowed_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -181,7 +181,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_omni_normal_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -208,7 +208,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_omni_normal_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -235,7 +235,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_omni_transluent_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); diff --git a/src/Layers/xrRenderPC_R3/blender_light_spot.cpp b/src/Layers/xrRenderPC_R3/blender_light_spot.cpp index 1736e959f5b..bd90d174e6d 100644 --- a/src/Layers/xrRenderPC_R3/blender_light_spot.cpp +++ b/src/Layers/xrRenderPC_R3/blender_light_spot.cpp @@ -22,14 +22,14 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_L_FILL: // masking + case SE_L_FILL: // masking C.r_Pass("stub_notransform", "copy_nomsaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0]); C.r_dx10Texture("s_base", C.L_textures[0]); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_spot_unshadowed_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -48,7 +48,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_spot_normal_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -76,7 +76,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_spot_fullsize_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -103,7 +103,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_spot_fullsize_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -157,14 +157,14 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_L_FILL: // masking + case SE_L_FILL: // masking C.r_Pass("stub_notransform", "copy_msaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0]); C.r_dx10Texture("s_base", C.L_textures[0]); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_spot_unshadowed_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -183,7 +183,7 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_spot_normal_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -211,7 +211,7 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_spot_fullsize_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -238,7 +238,7 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_spot_fullsize_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -288,7 +288,7 @@ void CBlender_accum_volumetric_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // masking + case 0: // masking C.r_Pass("accum_volumetric", "accum_volumetric_msaa", false, FALSE, FALSE); C.r_dx10Texture("s_lmap", C.L_textures[0]); diff --git a/src/Layers/xrRenderPC_R3/blender_luminance.cpp b/src/Layers/xrRenderPC_R3/blender_luminance.cpp index a71b9827163..8df93d61f77 100644 --- a/src/Layers/xrRenderPC_R3/blender_luminance.cpp +++ b/src/Layers/xrRenderPC_R3/blender_luminance.cpp @@ -17,21 +17,21 @@ void CBlender_luminance::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // 256x256 => 64x64 + case 0: // 256x256 => 64x64 C.r_Pass("stub_notransform_build", "bloom_luminance_1", false, FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_image", r2_RT_bloom1); C.r_dx10Texture("s_image", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // 64x64 => 8x8 + case 1: // 64x64 => 8x8 C.r_Pass("stub_notransform_filter", "bloom_luminance_2", false, FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_image", r2_RT_luminance_t64); C.r_dx10Texture("s_image", r2_RT_luminance_t64); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // 8x8 => 1x1, blending with old result + case 2: // 8x8 => 1x1, blending with old result C.r_Pass("stub_notransform_filter", "bloom_luminance_3", false, FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_image", r2_RT_luminance_t8 ); // C.r_Sampler_clf ("s_tonemap", r2_RT_luminance_src ); diff --git a/src/Layers/xrRenderPC_R3/blender_ssao.cpp b/src/Layers/xrRenderPC_R3/blender_ssao.cpp index ade8a021298..db89ae9dab5 100644 --- a/src/Layers/xrRenderPC_R3/blender_ssao.cpp +++ b/src/Layers/xrRenderPC_R3/blender_ssao.cpp @@ -17,9 +17,9 @@ void CBlender_SSAO_noMSAA::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // calculate SSAO + case 0: // calculate SSAO C.r_Pass("combine_1", "ssao_calc_nomsaa", FALSE, FALSE, FALSE); - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xFF); // stencil should be >= 1 + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xFF); // stencil should be >= 1 C.r_StencilRef(0x01); C.r_CullMode(D3DCULL_NONE); @@ -35,7 +35,7 @@ void CBlender_SSAO_noMSAA::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // depth downsample for HBAO + case 1: // depth downsample for HBAO C.r_Pass("combine_1", "depth_downs", FALSE, FALSE, FALSE); // C.r_Stencil (TRUE, D3DCMP_LESSEQUAL, 0xFF); // stencil should be >= 1 // C.r_StencilRef (0x01); @@ -72,9 +72,9 @@ void CBlender_SSAO_MSAA::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // combine + case 0: // combine C.r_Pass("combine_1", "ssao_calc_msaa", FALSE, FALSE, FALSE); - C.r_Stencil(TRUE, D3DCMP_EQUAL, 0x81); // stencil should be >= 1 + C.r_Stencil(TRUE, D3DCMP_EQUAL, 0x81); // stencil should be >= 1 C.r_StencilRef(0x81); C.r_CullMode(D3DCULL_NONE); diff --git a/src/Layers/xrRenderPC_R3/light_GI.cpp b/src/Layers/xrRenderPC_R3/light_GI.cpp index cfa22227aa0..6b0af64b441 100644 --- a/src/Layers/xrRenderPC_R3/light_GI.cpp +++ b/src/Layers/xrRenderPC_R3/light_GI.cpp @@ -44,7 +44,7 @@ void light::gi_generate() LI.D.reflect(dir, TN); LI.E = dot * (1 - R->range / range); if (LI.E < ps_r2_GI_clip) continue; - LI.S = spatial.sector; //. BUG + LI.S = spatial.sector; //. BUG indirect.push_back(LI); } diff --git a/src/Layers/xrRenderPC_R3/light_smapvis.cpp b/src/Layers/xrRenderPC_R3/light_smapvis.cpp index 3635258a55d..378b3059f44 100644 --- a/src/Layers/xrRenderPC_R3/light_smapvis.cpp +++ b/src/Layers/xrRenderPC_R3/light_smapvis.cpp @@ -67,7 +67,7 @@ void smapvis::end() RImplementation.r_dsgraph_insert_static(testQ_V); RImplementation.r_dsgraph_render_graph(0); RImplementation.occq_end(testQ_id); - testQ_frame = Device.dwFrame + 1; // get result on next frame + testQ_frame = Device.dwFrame + 1; // get result on next frame } break; case state_usingTC: @@ -110,9 +110,9 @@ void smapvis::resetoccq() void smapvis::mark() { RImplementation.Stats.ic_culled += invisible.size(); - u32 marker = RImplementation.marker + 1; // we are called befor marker increment + u32 marker = RImplementation.marker + 1; // we are called befor marker increment for (u32 it = 0; it < invisible.size(); it++) - invisible[it]->vis.marker = marker; // this effectively disables processing + invisible[it]->vis.marker = marker; // this effectively disables processing } void smapvis::rfeedback_static(dxRender_Visual* V) diff --git a/src/Layers/xrRenderPC_R3/light_smapvis.h b/src/Layers/xrRenderPC_R3/light_smapvis.h index b73a88b8cea..f9cf2bbd29c 100644 --- a/src/Layers/xrRenderPC_R3/light_smapvis.h +++ b/src/Layers/xrRenderPC_R3/light_smapvis.h @@ -23,10 +23,10 @@ class smapvis : public R_feedback ~smapvis(); void invalidate(); - void begin(); // should be called before 'marker++' and before graph-build + void begin(); // should be called before 'marker++' and before graph-build void end(); void mark(); - void flushoccq(); // should be called when no rendering of light is supposed + void flushoccq(); // should be called when no rendering of light is supposed void resetoccq(); diff --git a/src/Layers/xrRenderPC_R3/light_vis.cpp b/src/Layers/xrRenderPC_R3/light_vis.cpp index df0feab26d9..d192aded1a7 100644 --- a/src/Layers/xrRenderPC_R3/light_vis.cpp +++ b/src/Layers/xrRenderPC_R3/light_vis.cpp @@ -40,7 +40,7 @@ void light::vis_prepare() // skiptest = true; if (skiptest || Device.vCameraPosition.distance_to(spatial.sphere.P) <= (spatial.sphere.R * 1.01f + safe_area)) - { // small error + { // small error vis.visible = true; vis.pending = false; vis.frame2test = frame + ::Random.randI(delay_small_min, delay_small_max); diff --git a/src/Layers/xrRenderPC_R3/r2_R_calculate.cpp b/src/Layers/xrRenderPC_R3/r2_R_calculate.cpp index b08494204e4..7536d904461 100644 --- a/src/Layers/xrRenderPC_R3/r2_R_calculate.cpp +++ b/src/Layers/xrRenderPC_R3/r2_R_calculate.cpp @@ -61,7 +61,7 @@ void CRender::Calculate() ISpatial* spatial = lstRenderables[_it]; spatial->spatial_updatesector(); CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure + if (0 == sector) continue; // disassociated from S/P structure VERIFY(spatial->GetSpatialData().type & STYPE_LIGHTSOURCE); // lightsource diff --git a/src/Layers/xrRenderPC_R3/r2_R_lights.cpp b/src/Layers/xrRenderPC_R3/r2_R_lights.cpp index 621629b62e4..47ce4c74967 100644 --- a/src/Layers/xrRenderPC_R3/r2_R_lights.cpp +++ b/src/Layers/xrRenderPC_R3/r2_R_lights.cpp @@ -4,7 +4,7 @@ IC bool pred_area(light* _1, light* _2) { u32 a0 = _1->X.S.size; u32 a1 = _2->X.S.size; - return a0 > a1; // reverse -> descending + return a0 > a1; // reverse -> descending } void CRender::render_lights(light_Package& LP) @@ -121,9 +121,9 @@ void CRender::render_lights(light_Package& LP) L->X.S.transluent = TRUE; Target->phase_smap_spot_tsh(L); PIX_EVENT(SHADOWED_LIGHTS_RENDER_GRAPH); - r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_graph(1); // normal level, secondary priority PIX_EVENT(SHADOWED_LIGHTS_RENDER_SORTED); - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_sorted(); // strict-sorted geoms } } else diff --git a/src/Layers/xrRenderPC_R3/r2_R_sun.cpp b/src/Layers/xrRenderPC_R3/r2_R_sun.cpp index 54b5e890e05..d4c94801e08 100644 --- a/src/Layers/xrRenderPC_R3/r2_R_sun.cpp +++ b/src/Layers/xrRenderPC_R3/r2_R_sun.cpp @@ -5,8 +5,8 @@ #include "xrEngine/IRenderable.h" const float tweak_COP_initial_offs = 1200.f; -const float tweak_ortho_xform_initial_offs = 1000.f; //. ? -const float tweak_guaranteed_range = 20.f; //. ? +const float tweak_ortho_xform_initial_offs = 1000.f; //. ? +const float tweak_guaranteed_range = 20.f; //. ? // float OLES_SUN_LIMIT_27_01_07 = 180.f ; float OLES_SUN_LIMIT_27_01_07 = 100.f; @@ -153,17 +153,17 @@ Frustum::Frustum(const D3DXMATRIX* matrix) D3DXVECTOR4 column3(matrix->_13, matrix->_23, matrix->_33, matrix->_43); D3DXVECTOR4 planes[6]; - planes[0] = column4 - column1; // left - planes[1] = column4 + column1; // right - planes[2] = column4 - column2; // bottom - planes[3] = column4 + column2; // top - planes[4] = column4 - column3; // near - planes[5] = column4 + column3; // far + planes[0] = column4 - column1; // left + planes[1] = column4 + column1; // right + planes[2] = column4 - column2; // bottom + planes[3] = column4 + column2; // top + planes[4] = column4 - column3; // near + planes[5] = column4 + column3; // far // ignore near & far plane int p; - for (p = 0; p < 6; p++) // normalize the planes + for (p = 0; p < 6; p++) // normalize the planes { float dot = planes[p].x * planes[p].x + planes[p].y * planes[p].y + planes[p].z * planes[p].z; dot = 1.f / _sqrt(dot); @@ -177,7 +177,7 @@ Frustum::Frustum(const D3DXMATRIX* matrix) for (int i = 0; i < 6; i++) nVertexLUT[i] = ((planes[i].x < 0.f) ? 1 : 0) | ((planes[i].y < 0.f) ? 2 : 0) | ((planes[i].z < 0.f) ? 4 : 0); - for (int i = 0; i < 8; i++) // compute extrema + for (int i = 0; i < 8; i++) // compute extrema { const D3DXPLANE& p0 = (i & 1) ? camPlanes[4] : camPlanes[5]; const D3DXPLANE& p1 = (i & 2) ? camPlanes[3] : camPlanes[2]; @@ -209,7 +209,7 @@ struct DumbClipper { CFrustum frustum; xr_vector planes; - BOOL clip(D3DXVECTOR3& p0, D3DXVECTOR3& p1) // returns TRUE if result meaningfull + BOOL clip(D3DXVECTOR3& p0, D3DXVECTOR3& p1) // returns TRUE if result meaningfull { float denum; D3DXVECTOR3 D; @@ -218,7 +218,7 @@ struct DumbClipper D3DXPLANE& P = planes[it]; float cls0 = D3DXPlaneDotCoord(&P, &p0); float cls1 = D3DXPlaneDotCoord(&P, &p1); - if (cls0 > 0 && cls1 > 0) return false; // fully outside + if (cls0 > 0 && cls1 > 0) return false; // fully outside if (cls0 > 0) { // clip p0 @@ -449,12 +449,12 @@ void CRender::render_sun() // get the near and the far plane (points) in eye space. D3DXVECTOR3 frustumPnts[8]; - Frustum eyeFrustum(&m_Projection); // autocomputes all the extrema points + Frustum eyeFrustum(&m_Projection); // autocomputes all the extrema points for (int i = 0; i < 4; i++) { - frustumPnts[i] = eyeFrustum.pntList[(i << 1)]; // far plane - frustumPnts[i + 4] = eyeFrustum.pntList[(i << 1) | 0x1]; // near plane + frustumPnts[i] = eyeFrustum.pntList[(i << 1)]; // far plane + frustumPnts[i + 4] = eyeFrustum.pntList[(i << 1) | 0x1]; // near plane } // we need to transform the eye into the light's post-projective space. @@ -463,10 +463,10 @@ void CRender::render_sun() // this matrix is a variant of "light space" from LSPSMs, with the Y and Z axes permuted D3DXVECTOR3 leftVector, upVector, viewVector; - const D3DXVECTOR3 eyeVector(0.f, 0.f, -1.f); // eye is always -Z in eye space + const D3DXVECTOR3 eyeVector(0.f, 0.f, -1.f); // eye is always -Z in eye space // code copied straight from BuildLSPSMProjectionMatrix - D3DXVec3TransformNormal(&upVector, &m_lightDir, &m_View); // lightDir is defined in eye space, so xform it + D3DXVec3TransformNormal(&upVector, &m_lightDir, &m_View); // lightDir is defined in eye space, so xform it D3DXVec3Cross(&leftVector, &upVector, &eyeVector); D3DXVec3Normalize(&leftVector, &leftVector); D3DXVec3Cross(&viewVector, &upVector, &leftVector); @@ -504,7 +504,7 @@ void CRender::render_sun() float min_z = std::min(depthbounds.x, frustumBox.minPt.z); float max_z = std::max(depthbounds.y, frustumBox.maxPt.z); - if (min_z <= 1.f) //? + if (min_z <= 1.f) //? { D3DXMATRIX lightSpaceTranslate; D3DXMatrixTranslation(&lightSpaceTranslate, 0.f, 0.f, -min_z + 1.f); @@ -578,8 +578,8 @@ void CRender::render_sun() // compute eta. float lambda = frustumAABB2D.maxPt.x - frustumAABB2D.minPt.x; - float delta_proj = m_fTSM_Delta * lambda; // focusPt.x - frustumAABB2D.minPt.x; - const float xi = -0.6f; // - 0.6f; // 80% line + float delta_proj = m_fTSM_Delta * lambda; // focusPt.x - frustumAABB2D.minPt.x; + const float xi = -0.6f; // - 0.6f; // 80% line float eta = (lambda * delta_proj * (1.f + xi)) / (lambda * (1.f - xi) - 2.f * delta_proj); // compute the projection point a distance eta from the top line. this point is on the center line, y=0 @@ -683,8 +683,8 @@ void CRender::render_sun() } for (int e = 0; e < 8; e++) { - pt = wform(x_full_inverse, corners[e]); // world space - pt = wform(xform, pt); // trapezoid space + pt = wform(x_full_inverse, corners[e]); // world space + pt = wform(xform, pt); // trapezoid space b_receivers.modify(pt); } @@ -742,8 +742,8 @@ void CRender::render_sun() if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_FAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } @@ -962,7 +962,7 @@ void CRender::render_sun_near() r_dsgraph_render_subspace(cull_sector, &cull_frustum, cull_xform, cull_COP, TRUE); // Finalize & Cleanup - fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); + fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); // Render shadow-map //. !!! We should clip based on shrinked frustum (again) @@ -980,8 +980,8 @@ void CRender::render_sun_near() if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_NEAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } @@ -1291,7 +1291,7 @@ void CRender::render_sun_cascade(u32 cascade_ind) r_dsgraph_render_subspace(cull_sector, &cull_frustum, cull_xform, cull_COP, TRUE); // Finalize & Cleanup - fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); + fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); // Render shadow-map //. !!! We should clip based on shrinked frustum (again) @@ -1309,8 +1309,8 @@ void CRender::render_sun_cascade(u32 cascade_ind) if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_FAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } diff --git a/src/Layers/xrRenderPC_R3/r2_sector_detect.cpp b/src/Layers/xrRenderPC_R3/r2_sector_detect.cpp index bcda068e6c9..101d074bdc5 100644 --- a/src/Layers/xrRenderPC_R3/r2_sector_detect.cpp +++ b/src/Layers/xrRenderPC_R3/r2_sector_detect.cpp @@ -15,7 +15,7 @@ int CRender::translateSector(IRender_Sector* pSector) #ifdef DEBUG return (-1); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } IRender_Sector* CRender::detectSector(const Fvector& P) @@ -61,12 +61,12 @@ IRender_Sector* CRender::detectSector(const Fvector& P, Fvector& dir) int ID; if (id1 >= 0) { if (id2 >= 0) - ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found + ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found else - ID = id1; // only id1 found + ID = id1; // only id1 found } else if (id2 >= 0) - ID = id2; // only id2 found + ID = id2; // only id2 found else return 0; diff --git a/src/Layers/xrRenderPC_R3/r2_types.h b/src/Layers/xrRenderPC_R3/r2_types.h index 2467a4af3aa..2aeaef0cb1e 100644 --- a/src/Layers/xrRenderPC_R3/r2_types.h +++ b/src/Layers/xrRenderPC_R3/r2_types.h @@ -1,51 +1,51 @@ #pragma once // r3xx code-path (MRT) -#define r2_RT_depth "$user$depth" // MRT -#define r2_RT_MSAAdepth "$user$msaadepth" // MRT -#define r2_RT_P "$user$position" // MRT -#define r2_RT_N "$user$normal" // MRT -#define r2_RT_albedo "$user$albedo" // MRT +#define r2_RT_depth "$user$depth" // MRT +#define r2_RT_MSAAdepth "$user$msaadepth" // MRT +#define r2_RT_P "$user$position" // MRT +#define r2_RT_N "$user$normal" // MRT +#define r2_RT_albedo "$user$albedo" // MRT // other -#define r2_RT_accum "$user$accum" // --- 16 bit fp or 16 bit fx -#define r2_RT_accum_temp "$user$accum_temp" // --- 16 bit fp - only for HW which doesn't feature fp16 blend +#define r2_RT_accum "$user$accum" // --- 16 bit fp or 16 bit fx +#define r2_RT_accum_temp "$user$accum_temp" // --- 16 bit fp - only for HW which doesn't feature fp16 blend -#define r2_T_envs0 "$user$env_s0" // --- -#define r2_T_envs1 "$user$env_s1" // --- +#define r2_T_envs0 "$user$env_s0" // --- +#define r2_T_envs1 "$user$env_s1" // --- #define r2_T_sky0 "$user$sky0" #define r2_T_sky1 "$user$sky1" -#define r2_RT_ssao_temp "$user$ssao_temp" // temporary rt for ssao calculation -#define r2_RT_half_depth "$user$half_depth" // temporary rt for ssao calculation +#define r2_RT_ssao_temp "$user$ssao_temp" // temporary rt for ssao calculation +#define r2_RT_half_depth "$user$half_depth" // temporary rt for ssao calculation -#define r2_RT_generic0 "$user$generic0" // --- -#define r2_RT_generic0_r "$user$generic0_r" // --- -#define r2_RT_generic1 "$user$generic1" // --- -#define r2_RT_generic1_r "$user$generic1_r" // --- -#define r2_RT_generic2 "$user$generic2" // --- // Igor: for volumetric lights -#define r2_RT_generic "$user$generic" // --- +#define r2_RT_generic0 "$user$generic0" // --- +#define r2_RT_generic0_r "$user$generic0_r" // --- +#define r2_RT_generic1 "$user$generic1" // --- +#define r2_RT_generic1_r "$user$generic1_r" // --- +#define r2_RT_generic2 "$user$generic2" // --- // Igor: for volumetric lights +#define r2_RT_generic "$user$generic" // --- -#define r2_RT_bloom1 "$user$bloom1" // --- -#define r2_RT_bloom2 "$user$bloom2" // --- +#define r2_RT_bloom1 "$user$bloom1" // --- +#define r2_RT_bloom2 "$user$bloom2" // --- -#define r2_RT_luminance_t64 "$user$lum_t64" // --- temp -#define r2_RT_luminance_t8 "$user$lum_t8" // --- temp +#define r2_RT_luminance_t64 "$user$lum_t64" // --- temp +#define r2_RT_luminance_t8 "$user$lum_t8" // --- temp -#define r2_RT_luminance_src "$user$tonemap_src" // --- prev-frame-result -#define r2_RT_luminance_cur "$user$tonemap" // --- result -#define r2_RT_luminance_pool "$user$luminance" // --- pool +#define r2_RT_luminance_src "$user$tonemap_src" // --- prev-frame-result +#define r2_RT_luminance_cur "$user$tonemap" // --- result +#define r2_RT_luminance_pool "$user$luminance" // --- pool -#define r2_RT_smap_surf "$user$smap_surf" // --- directional -#define r2_RT_smap_depth "$user$smap_depth" // ---directional +#define r2_RT_smap_surf "$user$smap_surf" // --- directional +#define r2_RT_smap_depth "$user$smap_depth" // ---directional #define r2_RT_smap_depth_minmax "$user$smap_depth_minmax" -#define r2_material "$user$material" // --- -#define r2_ds2_fade "$user$ds2_fade" // --- +#define r2_material "$user$material" // --- +#define r2_ds2_fade "$user$ds2_fade" // --- -#define r2_jitter "$user$jitter_" // --- dither -#define r2_jitter_mipped "$user$jitter_mipped" // --- dither +#define r2_jitter "$user$jitter_" // --- dither +#define r2_jitter_mipped "$user$jitter_mipped" // --- dither #define r2_sunmask "sunmask" #define JITTER(a) r2_jitter #a @@ -56,27 +56,27 @@ const u32 SMAP_adapt_min = 32; const u32 SMAP_adapt_optimal = 768; const u32 SMAP_adapt_max = 1536; -const u32 TEX_material_LdotN = 128; // diffuse, X, almost linear = small res -const u32 TEX_material_LdotH = 256; // specular, Y -const u32 TEX_material_Count = 4; // Number of materials, Z +const u32 TEX_material_LdotN = 128; // diffuse, X, almost linear = small res +const u32 TEX_material_LdotH = 256; // specular, Y +const u32 TEX_material_Count = 4; // Number of materials, Z const u32 TEX_jitter = 64; -const u32 TEX_jitter_count = 5; // for HBAO +const u32 TEX_jitter_count = 5; // for HBAO const u32 BLOOM_size_X = 256; const u32 BLOOM_size_Y = 256; const u32 LUMINANCE_size = 16; // deffer -#define SE_R2_NORMAL_HQ 0 // high quality/detail -#define SE_R2_NORMAL_LQ 1 // low quality -#define SE_R2_SHADOW 2 // shadow generation +#define SE_R2_NORMAL_HQ 0 // high quality/detail +#define SE_R2_NORMAL_LQ 1 // low quality +#define SE_R2_SHADOW 2 // shadow generation // spot #define SE_L_FILL 0 #define SE_L_UNSHADOWED 1 -#define SE_L_NORMAL 2 // typical, scaled -#define SE_L_FULLSIZE 3 // full texture coverage -#define SE_L_TRANSLUENT 4 // with opacity/color mask +#define SE_L_NORMAL 2 // typical, scaled +#define SE_L_FULLSIZE 3 // full texture coverage +#define SE_L_TRANSLUENT 4 // with opacity/color mask // mask #define SE_MASK_SPOT 0 diff --git a/src/Layers/xrRenderPC_R3/r3.cpp b/src/Layers/xrRenderPC_R3/r3.cpp index e2d1a177b66..42d5c8d3869 100644 --- a/src/Layers/xrRenderPC_R3/r3.cpp +++ b/src/Layers/xrRenderPC_R3/r3.cpp @@ -109,7 +109,7 @@ static class cl_alpha_ref : public R_constant_setup } binder_alpha_ref; extern ENGINE_API BOOL r2_sun_static; -extern ENGINE_API BOOL r2_advanced_pp; // advanced post process and effects +extern ENGINE_API BOOL r2_advanced_pp; // advanced post process and effects ////////////////////////////////////////////////////////////////////////// // Just two static storage void CRender::create() @@ -154,7 +154,7 @@ void CRender::create() case 0x19D: case 0x19E: { - disable_nullrt = true; // G80 + disable_nullrt = true; // G80 break; } case 0x400: @@ -166,7 +166,7 @@ void CRender::create() case 0x40E: case 0x40F: { - disable_nullrt = true; // G84 + disable_nullrt = true; // G84 break; } case 0x420: @@ -178,7 +178,7 @@ void CRender::create() case 0x42E: case 0x42F: { - disable_nullrt = true; // G86 + disable_nullrt = true; // G86 break; } } @@ -374,7 +374,7 @@ void CRender::create() m_bMakeAsyncSS = false; - Target = new CRenderTarget(); // Main target + Target = new CRenderTarget(); // Main target Models = new CModelPool(); PSLibrary.OnCreate(); @@ -800,9 +800,9 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons SPS* sps_result = (SPS*)result; #ifdef USE_DX11 _result = HW.pDevice->CreatePixelShader(buffer, buffer_size, 0, &sps_result->ps); -#else // #ifdef USE_DX11 +#else // #ifdef USE_DX11 _result = HW.pDevice->CreatePixelShader(buffer, buffer_size, &sps_result->ps); -#endif // #ifdef USE_DX11 +#endif // #ifdef USE_DX11 if (!SUCCEEDED(_result)) { Log("! PS: ", file_name); Msg("! CreatePixelShader hr == 0x%08x", _result); @@ -836,9 +836,9 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons SVS* svs_result = (SVS*)result; #ifdef USE_DX11 _result = HW.pDevice->CreateVertexShader(buffer, buffer_size, 0, &svs_result->vs); -#else // #ifdef USE_DX11 +#else // #ifdef USE_DX11 _result = HW.pDevice->CreateVertexShader(buffer, buffer_size, &svs_result->vs); -#endif // #ifdef USE_DX11 +#endif // #ifdef USE_DX11 if (!SUCCEEDED(_result)) { Log("! VS: ", file_name); @@ -885,9 +885,9 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons SGS* sgs_result = (SGS*)result; #ifdef USE_DX11 _result = HW.pDevice->CreateGeometryShader(buffer, buffer_size, 0, &sgs_result->gs); -#else // #ifdef USE_DX11 +#else // #ifdef USE_DX11 _result = HW.pDevice->CreateGeometryShader(buffer, buffer_size, &sgs_result->gs); -#endif // #ifdef USE_DX11 +#endif // #ifdef USE_DX11 if (!SUCCEEDED(_result)) { Log("! GS: ", file_name); Msg("! CreateGeometryShaderhr == 0x%08x", _result); @@ -1430,23 +1430,23 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData if (0 == xr_strcmp(pFunctionName, "main")) { if ('v' == pTarget[0]) { if (HW.pDevice1 == 0) - pTarget = D3D10GetVertexShaderProfile(HW.pDevice); // vertex "vs_4_0"; // + pTarget = D3D10GetVertexShaderProfile(HW.pDevice); // vertex "vs_4_0"; // else - pTarget = "vs_4_1"; // pixel "ps_4_0"; // + pTarget = "vs_4_1"; // pixel "ps_4_0"; // } else if ('p' == pTarget[0]) { if (HW.pDevice1 == 0) - pTarget = D3D10GetPixelShaderProfile(HW.pDevice); // pixel "ps_4_0"; // + pTarget = D3D10GetPixelShaderProfile(HW.pDevice); // pixel "ps_4_0"; // else - pTarget = "ps_4_1"; // pixel "ps_4_0"; // + pTarget = "ps_4_1"; // pixel "ps_4_0"; // } else if ('g' == pTarget[0]) { if (HW.pDevice1 == 0) - pTarget = D3D10GetGeometryShaderProfile(HW.pDevice); // geometry "gs_4_0"; // + pTarget = D3D10GetGeometryShaderProfile(HW.pDevice); // geometry "gs_4_0"; // else - pTarget = "gs_4_1"; // pixel "ps_4_0"; // + pTarget = "gs_4_1"; // pixel "ps_4_0"; // } } @@ -1500,7 +1500,7 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData LPD3DBLOB pShaderBuf = NULL; LPD3DBLOB pErrorBuf = NULL; _result = D3DCompile(pSrcData, SrcDataLen, - "", // NULL, //LPCSTR pFileName, // NVPerfHUD bug workaround. + "", // NULL, //LPCSTR pFileName, // NVPerfHUD bug workaround. defines, &Includer, pFunctionName, pTarget, Flags, 0, &pShaderBuf, &pErrorBuf); if (SUCCEEDED(_result)) { @@ -1554,7 +1554,7 @@ static inline bool match_shader_id( #if 0 strcpy_s ( result, "" ); return false; -#else // #if 1 +#else // #if 1 #ifdef DEBUG LPCSTR temp = ""; bool found = false; @@ -1571,7 +1571,7 @@ static inline bool match_shader_id( xr_strcpy(result, temp); return found; -#else // #ifdef DEBUG +#else // #ifdef DEBUG FS_FileSet::const_iterator i = file_set.begin(); FS_FileSet::const_iterator const e = file_set.end(); for (; i != e; ++i) @@ -1583,6 +1583,6 @@ static inline bool match_shader_id( } return false; -#endif // #ifdef DEBUG -#endif // #if 1 +#endif // #ifdef DEBUG +#endif // #if 1 } \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R3/r3.h b/src/Layers/xrRenderPC_R3/r3.h index 69ac5103336..47f24883d54 100644 --- a/src/Layers/xrRenderPC_R3/r3.h +++ b/src/Layers/xrRenderPC_R3/r3.h @@ -24,14 +24,14 @@ class CRender : public D3DXRenderBase public: enum { - PHASE_NORMAL = 0, // E[0] - PHASE_SMAP = 1, // E[1] + PHASE_NORMAL = 0, // E[0] + PHASE_SMAP = 1, // E[1] }; enum { - MSAA_ATEST_NONE = 0x0, // Hi bit - DX10.1 mode - MSAA_ATEST_DX10_0_ATOC = 0x1, // Lo bit - ATOC mode + MSAA_ATEST_NONE = 0x0, // Hi bit - DX10.1 mode + MSAA_ATEST_DX10_0_ATOC = 0x1, // Lo bit - ATOC mode MSAA_ATEST_DX10_1_NATIVE = 0x2, MSAA_ATEST_DX10_1_ATOC = 0x3, }; @@ -62,7 +62,7 @@ class CRender : public D3DXRenderBase u32 mrtmixdepth : 1; u32 fp16_filter : 1; u32 fp16_blend : 1; - u32 albedo_wo : 1; // work-around albedo on less capable HW + u32 albedo_wo : 1; // work-around albedo on less capable HW u32 HW_smap : 1; u32 HW_smap_PCF : 1; u32 HW_smap_FETCH4 : 1; @@ -82,17 +82,17 @@ class CRender : public D3DXRenderBase u32 sunstatic : 1; u32 sjitter : 1; u32 noshadows : 1; - u32 Tshadows : 1; // transluent shadows + u32 Tshadows : 1; // transluent shadows u32 disasm : 1; - u32 advancedpp : 1; // advanced post process (DOF, SSAO, volumetrics, etc.) + u32 advancedpp : 1; // advanced post process (DOF, SSAO, volumetrics, etc.) u32 volumetricfog : 1; - u32 dx10_msaa : 1; // DX10.0 path - u32 dx10_msaa_hybrid : 1; // DX10.0 main path with DX10.1 A-test msaa allowed - u32 dx10_msaa_opt : 1; // DX10.1 path - u32 dx10_gbuffer_opt : 1; // - u32 dx10_sm4_1 : 1; // DX10.1 path - u32 dx10_msaa_alphatest : 2; // A-test mode + u32 dx10_msaa : 1; // DX10.0 path + u32 dx10_msaa_hybrid : 1; // DX10.0 main path with DX10.1 A-test msaa allowed + u32 dx10_msaa_opt : 1; // DX10.1 path + u32 dx10_gbuffer_opt : 1; // + u32 dx10_sm4_1 : 1; // DX10.1 path + u32 dx10_msaa_alphatest : 2; // A-test mode u32 dx10_msaa_samples : 4; u32 dx10_minmax_sm : 2; @@ -162,7 +162,7 @@ class CRender : public D3DXRenderBase CModelPool* Models; CWallmarksEngine* Wallmarks; - CRenderTarget* Target; // Render-target + CRenderTarget* Target; // Render-target CLight_DB Lights; CLight_Compute_XFORM_and_VIS LR; @@ -182,7 +182,7 @@ class CRender : public D3DXRenderBase u32 q_sync_count; bool m_bMakeAsyncSS; - bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. + bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. xr_vector m_sun_cascades; private: @@ -195,10 +195,10 @@ class CRender : public D3DXRenderBase void LoadSWIs(CStreamReader* fs); void Load3DFluid(); - BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing + BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing void add_Static(dxRender_Visual* pVisual, u32 planes); - void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility - void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility public: IRender_Sector* rimp_detectSector(Fvector& P, Fvector& D); @@ -247,7 +247,7 @@ class CRender : public D3DXRenderBase } IC void apply_lmaterial() { - R_constant* C = &*RCache.get_c(c_sbase); // get sampler + R_constant* C = &*RCache.get_c(c_sbase); // get sampler if (0 == C) return; VERIFY(RC_dest_sampler == C->destination); VERIFY(RC_dx10texture == C->type); @@ -294,9 +294,9 @@ class CRender : public D3DXRenderBase // Main virtual void flush(); virtual void set_Object(IRenderable* O); - virtual void add_Occluder(Fbox2& bb_screenspace); // mask screen region as oclluded - virtual void add_Visual(IRenderVisual* V); // add visual leaf (no culling performed at all) - virtual void add_Geometry(IRenderVisual* V); // add visual(s) (all culling performed) + virtual void add_Occluder(Fbox2& bb_screenspace); // mask screen region as oclluded + virtual void add_Visual(IRenderVisual* V); // add visual leaf (no culling performed at all) + virtual void add_Geometry(IRenderVisual* V); // add visual(s) (all culling performed) // wallmarks virtual void add_StaticWallmark(ref_shader& S, const Fvector& P, float s, CDB::TRI* T, Fvector* V); diff --git a/src/Layers/xrRenderPC_R3/r3_R_rain.cpp b/src/Layers/xrRenderPC_R3/r3_R_rain.cpp index f7439ba3b3f..bc7dbe73bd3 100644 --- a/src/Layers/xrRenderPC_R3/r3_R_rain.cpp +++ b/src/Layers/xrRenderPC_R3/r3_R_rain.cpp @@ -5,7 +5,7 @@ #include "xrEngine/IRenderable.h" const float tweak_rain_COP_initial_offs = 1200.f; -const float tweak_rain_ortho_xform_initial_offs = 1000.f; //. ? +const float tweak_rain_ortho_xform_initial_offs = 1000.f; //. ? // Defined in r2_R_sun.cpp Fvector3 wform(Fmatrix& m, Fvector3 const& v); @@ -224,7 +224,7 @@ void CRender::render_rain() r_dsgraph_render_subspace(cull_sector, &cull_frustum, cull_xform, cull_COP, FALSE); // Finalize & Cleanup - RainLight.X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); + RainLight.X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); // Render shadow-map //. !!! We should clip based on shrinked frustum (again) diff --git a/src/Layers/xrRenderPC_R3/r3_R_render.cpp b/src/Layers/xrRenderPC_R3/r3_R_render.cpp index e3a883bc098..56f0fe418aa 100644 --- a/src/Layers/xrRenderPC_R3/r3_R_render.cpp +++ b/src/Layers/xrRenderPC_R3/r3_R_render.cpp @@ -81,7 +81,7 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) ISpatial* spatial = lstRenderables[o_it]; spatial->spatial_updatesector(); CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure + if (0 == sector) continue; // disassociated from S/P structure if (spatial->GetSpatialData().type & STYPE_LIGHTSOURCE) { // lightsource @@ -95,7 +95,7 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) continue; } - if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector + if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector for (u32 v_it = 0; v_it < sector->r_frustums.size(); v_it++) { CFrustum& view = sector->r_frustums[v_it]; @@ -117,22 +117,22 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) v_orig.accept_frame = v_copy.accept_frame; v_orig.hom_frame = v_copy.hom_frame; v_orig.hom_tested = v_copy.hom_tested; - if (!bVisible) break; // exit loop on frustums + if (!bVisible) break; // exit loop on frustums // Rendering set_Object(renderable); renderable->renderable_Render(); set_Object(0); } - break; // exit loop on frustums + break; // exit loop on frustums } } - if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD + if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD } else { set_Object(0); - if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD + if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD } } @@ -146,16 +146,16 @@ void CRender::render_menu() // Main Render { - Target->u_setrt(Target->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT - g_pGamePersistent->OnRenderPPUI_main(); // PP-UI + Target->u_setrt(Target->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + g_pGamePersistent->OnRenderPPUI_main(); // PP-UI } // Distort { FLOAT ColorRGBA[4] = {127.0f / 255.0f, 127.0f / 255.0f, 0.0f, 127.0f / 255.0f}; - Target->u_setrt(Target->rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask + Target->u_setrt(Target->rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask HW.pDevice->ClearRenderTargetView(Target->rt_Generic_1->pRT, ColorRGBA); - g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI + g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI } // Actual Display @@ -218,7 +218,7 @@ void CRender::Render() //. VERIFY (g_pGameLevel && g_pGameLevel->pHUD); // Configure - RImplementation.o.distortion = FALSE; // disable distorion + RImplementation.o.distortion = FALSE; // disable distorion Fcolor sun_color = ((light*)Lights.sun_adapted._get())->color; BOOL bSUN = ps_r2_ls_flags.test(R2FLAG_SUN) && (u_diffuse2s(sun_color.r, sun_color.g, sun_color.b) > EPS); if (o.sunstatic) bSUN = FALSE; @@ -241,11 +241,11 @@ void CRender::Render() m_project.build_projection(deg2rad(Device.fFOV /* *Device.fASPECT*/), Device.fASPECT, VIEWPORT_NEAR, z_distance * g_pGamePersistent->Environment().CurrentEnv->far_plane); m_zfill.mul(m_project, Device.mView); - r_pmask(true, false); // enable priority "0" + r_pmask(true, false); // enable priority "0" set_Recorder(NULL); phase = PHASE_SMAP; render_main(m_zfill, false); - r_pmask(true, false); // disable priority "1" + r_pmask(true, false); // disable priority "1" BasicStats.Culling.End(); // flush @@ -285,7 +285,7 @@ void CRender::Render() //******* Main calc - DEFERRER RENDERER // Main calc BasicStats.Culling.Begin(); - r_pmask(true, false, true); // enable priority "0",+ capture wmarks + r_pmask(true, false, true); // enable priority "0",+ capture wmarks if (bSUN) set_Recorder(&main_coarse_structure); else @@ -293,7 +293,7 @@ void CRender::Render() phase = PHASE_NORMAL; render_main(Device.mFullTransform, true); set_Recorder(NULL); - r_pmask(true, false); // disable priority "1" + r_pmask(true, false); // disable priority "1" BasicStats.Culling.End(); BOOL split_the_scene_to_minimize_wait = FALSE; @@ -410,7 +410,7 @@ void CRender::Render() PIX_EVENT(DEFER_WALLMARKS); Target->phase_wallmarks(); g_r = 0; - Wallmarks->Render(); // wallmarks has priority as normal geometry + Wallmarks->Render(); // wallmarks has priority as normal geometry } // Update incremental shadowmap-visibility solver @@ -505,22 +505,22 @@ void CRender::Render() void CRender::render_forward() { VERIFY(0 == mapDistort.size()); - RImplementation.o.distortion = RImplementation.o.distortion_enabled; // enable distorion + RImplementation.o.distortion = RImplementation.o.distortion_enabled; // enable distorion //******* Main render - second order geometry (the one, that doesn't support deffering) //.todo: should be done inside "combine" with estimation of of luminance, tone-mapping, etc. { // level - r_pmask(false, true); // enable priority "1" + r_pmask(false, true); // enable priority "1" phase = PHASE_NORMAL; - render_main(Device.mFullTransform, false); // + render_main(Device.mFullTransform, false); // // Igor: we don't want to render old lods on next frame. mapLOD.clear(); - r_dsgraph_render_graph(1); // normal level, secondary priority - PortalTraverser.fade_render(); // faded-portals - r_dsgraph_render_sorted(); // strict-sorted geoms - g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts + r_dsgraph_render_graph(1); // normal level, secondary priority + PortalTraverser.fade_render(); // faded-portals + r_dsgraph_render_sorted(); // strict-sorted geoms + g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts } - RImplementation.o.distortion = FALSE; // disable distorion + RImplementation.o.distortion = FALSE; // disable distorion } diff --git a/src/Layers/xrRenderPC_R3/r3_R_sun_support.h b/src/Layers/xrRenderPC_R3/r3_R_sun_support.h index 9e14ab5fb12..e329eb3f480 100644 --- a/src/Layers/xrRenderPC_R3/r3_R_sun_support.h +++ b/src/Layers/xrRenderPC_R3/r3_R_sun_support.h @@ -397,7 +397,7 @@ class DumbConvexVolume for (int it = 0; it < int(polys.size()); it++) { _poly& base = polys[it]; - VERIFY(base.classify(cog) < 0); // debug + VERIFY(base.classify(cog) < 0); // debug int marker = (base.planeN.dotproduct(direction) <= 0) ? -1 : 1; @@ -440,8 +440,8 @@ class DumbConvexVolume int pend = int(points.size()); P.points.push_back(E.p0); P.points.push_back(E.p1); - P.points.push_back(pend - 1); // p1 mod - P.points.push_back(pend - 2); // p0 mod + P.points.push_back(pend - 1); // p1 mod + P.points.push_back(pend - 2); // p0 mod if (_debug) T.dbg_addline(points[E.p0], point.mad(points[E.p0], direction, -1000), color_rgba(0, 255, 0, 255)); if (_debug) @@ -467,4 +467,4 @@ class DumbConvexVolume } }; -#endif // r3_R_sun_support_included \ No newline at end of file +#endif // r3_R_sun_support_included \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R3/r3_loader.cpp b/src/Layers/xrRenderPC_R3/r3_loader.cpp index e4fecb95f10..3e862404e3c 100644 --- a/src/Layers/xrRenderPC_R3/r3_loader.cpp +++ b/src/Layers/xrRenderPC_R3/r3_loader.cpp @@ -34,7 +34,7 @@ void CRender::level_Load(IReader* fs) R_ASSERT2(chunk, "Level doesn't builded correctly."); u32 count = chunk->r_u32(); Shaders.resize(count); - for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one + for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one { string512 n_sh, n_tlist; LPCSTR n = LPCSTR(chunk->pointer()); diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget.cpp index 1a2ab542bb6..da2a9aae64b 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget.cpp @@ -273,7 +273,7 @@ CRenderTarget::CRenderTarget() Msg("MSAA samples = %d", SampleCount); if (RImplementation.o.dx10_msaa_opt) Msg("dx10_MSAA_opt = on"); if (RImplementation.o.dx10_gbuffer_opt) Msg("dx10_gbuffer_opt = on"); -#endif // DEBUG +#endif // DEBUG param_blur = 0.f; param_gray = 0.f; param_noise = 0.f; @@ -364,12 +364,12 @@ CRenderTarget::CRenderTarget() if (RImplementation.o.fp16_blend) { // NV40 if (!RImplementation.o.dx10_gbuffer_opt) { - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A16B16G16R16F, SampleCount); // expand to full + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A16B16G16R16F, SampleCount); // expand to full rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F, SampleCount); } else { - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // expand to full + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // expand to full rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F, SampleCount); } } @@ -377,7 +377,7 @@ CRenderTarget::CRenderTarget() { // R4xx, no-fp-blend,-> albedo_wo VERIFY(RImplementation.o.albedo_wo); - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // normal + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // normal rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F, SampleCount); rt_Accumulator_temp.create(r2_RT_accum_temp, w, h, D3DFMT_A16B16G16R16F, SampleCount); } @@ -543,7 +543,7 @@ CRenderTarget::CRenderTarget() // BLOOM { - D3DFORMAT fmt = D3DFMT_A8R8G8B8; //; // D3DFMT_X8R8G8B8 + D3DFORMAT fmt = D3DFMT_A8R8G8B8; //; // D3DFMT_X8R8G8B8 u32 w = BLOOM_size_X, h = BLOOM_size_Y; u32 fvf_build = D3DFVF_XYZRHW | D3DFVF_TEX4 | D3DFVF_TEXCOORDSIZE2(0) | D3DFVF_TEXCOORDSIZE2(1) | D3DFVF_TEXCOORDSIZE2(2) | D3DFVF_TEXCOORDSIZE2(3); @@ -626,7 +626,7 @@ CRenderTarget::CRenderTarget() // COMBINE { static D3DVERTEXELEMENT9 dwDecl[] = { - {0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos+uv + {0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos+uv D3DDECL_END()}; s_combine.create(b_combine, "r2\\combine"); s_combine_volumetric.create("combine_volumetric"); @@ -719,29 +719,29 @@ CRenderTarget::CRenderTarget() switch (slice) { case 0: - { // looks like OrenNayar - fd = powf(ld, 0.75f); // 0.75 + { // looks like OrenNayar + fd = powf(ld, 0.75f); // 0.75 fs = powf(ls, 16.f) * .5f; } break; case 1: - { // looks like Blinn - fd = powf(ld, 0.90f); // 0.90 + { // looks like Blinn + fd = powf(ld, 0.90f); // 0.90 fs = powf(ls, 24.f); } break; case 2: - { // looks like Phong - fd = ld; // 1.0 + { // looks like Phong + fd = ld; // 1.0 fs = powf(ls * 1.01f, 128.f); } break; case 3: - { // looks like Metal + { // looks like Metal float s0 = _abs(1 - _abs(0.05f * _sin(33.f * ld) + ld - ls)); float s1 = _abs(1 - _abs(0.05f * _cos(33.f * ld * ls) + ld - ls)); float s2 = _abs(1 - _abs(ld - ls)); - fd = ld; // 1.0 + fd = ld; // 1.0 fs = powf(_max(_max(s0, s1), s2), 24.f); fs *= powf(ld, 1 / 7.f); } @@ -941,7 +941,7 @@ CRenderTarget::~CRenderTarget() #ifdef DEBUG _SHOW_REF("t_material_surf", t_material_surf); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_material_surf); t_LUM_src->surface_set(NULL); @@ -959,7 +959,7 @@ CRenderTarget::~CRenderTarget() _SHOW_REF("t_envmap_1 - #small", pSurf); //_SHOW_REF("t_envmap_0 - #small",t_envmap_0->pSurface); //_SHOW_REF("t_envmap_1 - #small",t_envmap_1->pSurface); -#endif // DEBUG +#endif // DEBUG t_envmap_0->surface_set(NULL); t_envmap_1->surface_set(NULL); t_envmap_0.destroy(); @@ -974,14 +974,14 @@ CRenderTarget::~CRenderTarget() t_noise[it]->surface_set(NULL); #ifdef DEBUG _SHOW_REF("t_noise_surf[it]", t_noise_surf[it]); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_noise_surf[it]); } t_noise_mipped->surface_set(NULL); #ifdef DEBUG _SHOW_REF("t_noise_surf_mipped", t_noise_surf_mipped); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_noise_surf_mipped); // diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget.h b/src/Layers/xrRenderPC_R3/r3_rendertarget.h index dfe42ecc328..891c02c4a13 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget.h +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget.h @@ -21,8 +21,8 @@ class CRenderTarget : public IRender_Target public: enum eStencilOptimizeMode { - SO_Light = 0, // Default - SO_Combine, // Default + SO_Light = 0, // Default + SO_Combine, // Default }; u32 dwLightMarkerID; @@ -61,44 +61,44 @@ class CRenderTarget : public IRender_Target #endif // MRT-path - ref_rt rt_Depth; // Z-buffer like - initial depth - ref_rt rt_MSAADepth; // z-buffer for MSAA deferred shading - ref_rt rt_Generic_0_r; // MRT generic 0 - ref_rt rt_Generic_1_r; // MRT generic 1 + ref_rt rt_Depth; // Z-buffer like - initial depth + ref_rt rt_MSAADepth; // z-buffer for MSAA deferred shading + ref_rt rt_Generic_0_r; // MRT generic 0 + ref_rt rt_Generic_1_r; // MRT generic 1 ref_rt rt_Generic; - ref_rt rt_Position; // 64bit, fat (x,y,z,?) (eye-space) - ref_rt rt_Normal; // 64bit, fat (x,y,z,hemi) (eye-space) - ref_rt rt_Color; // 64/32bit,fat (r,g,b,specular-gloss) (or decompressed MET-8-8-8-8) + ref_rt rt_Position; // 64bit, fat (x,y,z,?) (eye-space) + ref_rt rt_Normal; // 64bit, fat (x,y,z,hemi) (eye-space) + ref_rt rt_Color; // 64/32bit,fat (r,g,b,specular-gloss) (or decompressed MET-8-8-8-8) // - ref_rt rt_Accumulator; // 64bit (r,g,b,specular) - ref_rt rt_Accumulator_temp; // only for HW which doesn't feature fp16 blend - ref_rt rt_Generic_0; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. - ref_rt rt_Generic_1; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Accumulator; // 64bit (r,g,b,specular) + ref_rt rt_Accumulator_temp; // only for HW which doesn't feature fp16 blend + ref_rt rt_Generic_0; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Generic_1; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. // Igor: for volumetric lights - ref_rt rt_Generic_2; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. - ref_rt rt_Bloom_1; // 32bit, dim/4 (r,g,b,?) - ref_rt rt_Bloom_2; // 32bit, dim/4 (r,g,b,?) - ref_rt rt_LUM_64; // 64bit, 64x64, log-average in all components - ref_rt rt_LUM_8; // 64bit, 8x8, log-average in all components + ref_rt rt_Generic_2; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Bloom_1; // 32bit, dim/4 (r,g,b,?) + ref_rt rt_Bloom_2; // 32bit, dim/4 (r,g,b,?) + ref_rt rt_LUM_64; // 64bit, 64x64, log-average in all components + ref_rt rt_LUM_8; // 64bit, 8x8, log-average in all components - ref_rt rt_LUM_pool[CHWCaps::MAX_GPUS * 2]; // 1xfp32,1x1, exp-result -> scaler - ref_texture t_LUM_src; // source - ref_texture t_LUM_dest; // destination & usage for current frame + ref_rt rt_LUM_pool[CHWCaps::MAX_GPUS * 2]; // 1xfp32,1x1, exp-result -> scaler + ref_texture t_LUM_src; // source + ref_texture t_LUM_dest; // destination & usage for current frame // env - ref_texture t_envmap_0; // env-0 - ref_texture t_envmap_1; // env-1 + ref_texture t_envmap_0; // env-0 + ref_texture t_envmap_1; // env-1 // smap - ref_rt rt_smap_surf; // 32bit, color - ref_rt rt_smap_depth; // 24(32) bit, depth - ref_rt rt_smap_depth_minmax; // is used for min/max sm - // TODO: DX10: CHeck if we need old-style SMAP - // IDirect3DSurface9* rt_smap_ZB; // + ref_rt rt_smap_surf; // 32bit, color + ref_rt rt_smap_depth; // 24(32) bit, depth + ref_rt rt_smap_depth_minmax; // is used for min/max sm + // TODO: DX10: CHeck if we need old-style SMAP + // IDirect3DSurface9* rt_smap_ZB; // // Igor: for async screenshots - ID3DTexture2D* t_ss_async; // 32bit (r,g,b,a) is situated in the system memory + ID3DTexture2D* t_ss_async; // 32bit (r,g,b,a) is situated in the system memory // Textures ID3DTexture3D* t_material_surf; @@ -136,7 +136,7 @@ class CRenderTarget : public IRender_Target // DX10 Rain ref_shader s_rain; - ref_shader s_rain_msaa[8]; // up to 8 shaders for DX10.0 support + ref_shader s_rain_msaa[8]; // up to 8 shaders for DX10.0 support ref_shader s_accum_direct_volumetric_msaa[8]; ref_shader s_accum_mask_msaa[8]; ref_shader s_accum_direct_msaa[8]; @@ -178,7 +178,7 @@ class CRenderTarget : public IRender_Target // Combine ref_geom g_combine; - ref_geom g_combine_VP; // xy=p,zw=tc + ref_geom g_combine_VP; // xy=p,zw=tc ref_geom g_combine_2UV; ref_geom g_combine_cuboid; ref_geom g_aa_blur; @@ -275,7 +275,7 @@ class CRenderTarget : public IRender_Target bool need_to_render_sunshafts(); bool use_minmax_sm_this_frame(); - BOOL enable_scissor(light* L); // true if intersects near plane + BOOL enable_scissor(light* L); // true if intersects near plane void enable_dbt_bounds(light* L); void disable_aniso(); diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_direct.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_direct.cpp index b3befdce255..5b19ffca42b 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_direct.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_direct.cpp @@ -52,8 +52,8 @@ void CRenderTarget::accum_direct(u32 sub_phase) // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); PIX_EVENT(SE_SUN_NEAR_sub_phase); - if (SE_SUN_NEAR == sub_phase) //. - // if( 0 ) + if (SE_SUN_NEAR == sub_phase) //. + // if( 0 ) { // Fill vertex buffer FVF::TL* pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); @@ -72,7 +72,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -92,7 +92,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) // per sample rendering if (RImplementation.o.dx10_msaa_opt) { - RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -102,7 +102,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { - RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -123,7 +123,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? PIX_EVENT(Perform_lighting); @@ -359,8 +359,8 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); PIX_EVENT(SE_SUN_NEAR_sub_phase); - if (SE_SUN_NEAR == sub_phase) //. - // if( 0 ) + if (SE_SUN_NEAR == sub_phase) //. + // if( 0 ) { // Fill vertex buffer FVF::TL* pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); @@ -379,7 +379,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -399,7 +399,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& // per sample rendering if (RImplementation.o.dx10_msaa_opt) { - RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -409,7 +409,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { - RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -430,14 +430,14 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? PIX_EVENT(Perform_lighting); // Perform lighting { phase_accumulator(); - RCache.set_CullMode(CULL_CCW); //****************************************************************** + RCache.set_CullMode(CULL_CCW); //****************************************************************** RCache.set_ColorWriteEnable(); // texture adjustment matrix @@ -759,7 +759,7 @@ void CRenderTarget::accum_direct_blend() RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0xff, 0x00); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -814,7 +814,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); - if (SE_SUN_NEAR == sub_phase) //. + if (SE_SUN_NEAR == sub_phase) //. { // For sun-filter - clear to zero // CHK_DX (HW.pDevice->Clear ( 0L, NULL, D3DCLEAR_TARGET, 0, 1.0f, 0L)); @@ -838,7 +838,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -858,7 +858,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) // per sample if (RImplementation.o.dx10_msaa_opt) { - RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker RCache.set_Stencil(TRUE, D3DCMP_LESS, dwLightMarkerID, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); RCache.set_CullMode(CULL_NONE); @@ -868,7 +868,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { - RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker RCache.set_Stencil(TRUE, D3DCMP_LESS, dwLightMarkerID, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); RCache.set_CullMode(CULL_NONE); @@ -889,14 +889,14 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? // Perform lighting { if (!RImplementation.o.dx10_msaa) - u_setrt(rt_Generic_0, NULL, NULL, HW.pBaseZB); // enshure RT setup + u_setrt(rt_Generic_0, NULL, NULL, HW.pBaseZB); // enshure RT setup else - u_setrt(rt_Generic_0_r, NULL, NULL, RImplementation.Target->rt_MSAADepth->pZRT); // enshure RT setup + u_setrt(rt_Generic_0_r, NULL, NULL, RImplementation.Target->rt_MSAADepth->pZRT); // enshure RT setup RCache.set_CullMode(CULL_NONE); RCache.set_ColorWriteEnable(); @@ -1022,7 +1022,7 @@ void CRenderTarget::accum_direct_lum() Fvector2 p0, p1; p0.set(.5f / _w, .5f / _h); p1.set((_w + .5f) / _w, (_h + .5f) / _h); - float d_Z = EPS_S; //, d_W = 1.f; + float d_Z = EPS_S; //, d_W = 1.f; // Common constants (light-related) Fvector L_dir, L_clr; @@ -1243,7 +1243,7 @@ void CRenderTarget::accum_direct_volumetric(u32 sub_phase, const u32 Offset, con else { extern float OLES_SUN_LIMIT_27_01_07; - zMin = 0; /////***************************************************************************************** + zMin = 0; /////***************************************************************************************** zMax = OLES_SUN_LIMIT_27_01_07; } diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_omnipart_geom.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_omnipart_geom.cpp index aaa59132d9f..4eabedc0a0f 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_omnipart_geom.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_omnipart_geom.cpp @@ -46,12 +46,12 @@ void CRenderTarget::accum_omnip_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_omnip_ib", g_accum_omnip_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_omnip_ib); _RELEASE(g_accum_omnip_ib); #ifdef DEBUG _SHOW_REF("g_accum_omnip_vb", g_accum_omnip_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_omnip_vb); _RELEASE(g_accum_omnip_vb); } diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point.cpp index d8341d72f9c..618729f1945 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point.cpp @@ -34,7 +34,7 @@ void CRenderTarget::accum_point(light* L) // *** similar to "Carmack's reverse", but assumes convex, non intersecting objects, // *** thus can cope without stencil clear with 127 lights // *** in practice, 'cause we "clear" it back to 0x1 it usually allows us to > 200 lights :) - RCache.set_Element(s_accum_mask->E[SE_MASK_POINT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_POINT]); // masker // Done in blender! // RCache.set_ColorWriteEnable (FALSE); @@ -64,7 +64,7 @@ void CRenderTarget::accum_point(light* L) // ***************************** Minimize overdraw ************************************* // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back /* if (bIntersect) RCache.set_CullMode (CULL_CW); // back else RCache.set_CullMode (CULL_CCW); // front @@ -108,13 +108,13 @@ void CRenderTarget::accum_point(light* L) // HW.pDevice->SetSamplerState ( 0, D3DSAMP_MIPMAPLODBIAS, FOURCC_GET4 ); // } - RCache.set_CullMode(CULL_CW); // back - // Render if (light_id <= stencil && z-pass) + RCache.set_CullMode(CULL_CW); // back + // Render if (light_id <= stencil && z-pass) if (!RImplementation.o.dx10_msaa) { RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID, 0xff, 0x00); @@ -127,7 +127,7 @@ void CRenderTarget::accum_point(light* L) RCache.set_CullMode(D3DCULL_CW); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -162,7 +162,7 @@ void CRenderTarget::accum_point(light* L) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, dwLightMarkerID, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_CullMode(D3DCULL_CW); @@ -175,7 +175,7 @@ void CRenderTarget::accum_point(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point_geom.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point_geom.cpp index 5e327584dda..5278328aa6e 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point_geom.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_point_geom.cpp @@ -327,13 +327,13 @@ void CRenderTarget::accum_point_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_point_ib", g_accum_point_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_point_ib); _RELEASE(g_accum_point_ib); #ifdef DEBUG _SHOW_REF("g_accum_point_vb", g_accum_point_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_point_vb); _RELEASE(g_accum_point_vb); } diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_reflected.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_reflected.cpp index 8ed8fa037f2..d636047bba3 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_reflected.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_reflected.cpp @@ -10,7 +10,7 @@ void CRenderTarget::accum_reflected(light* L) ref_shader shader = s_accum_reflected; ref_shader* shader_msaa = s_accum_reflected_msaa; - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); L->xform_calc(); RCache.set_xform_world(L->m_xform); RCache.set_xform_view(Device.mView); @@ -22,9 +22,9 @@ void CRenderTarget::accum_reflected(light* L) // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); if (bIntersect) - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back else - RCache.set_CullMode(CULL_CCW); // front + RCache.set_CullMode(CULL_CCW); // front // 2D texgen (texture adjustment matrix) Fmatrix m_Texgen; @@ -61,7 +61,7 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x01, 0x81, 0x00); @@ -72,21 +72,21 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Shader(shader_msaa[0]); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x81, 0x81, 0x00); if (bIntersect) - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back else - RCache.set_CullMode(CULL_CCW); // front + RCache.set_CullMode(CULL_CCW); // front draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { RCache.set_Shader(shader_msaa[i]); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x81, 0x81, 0x00); if (bIntersect) - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back else - RCache.set_CullMode(CULL_CCW); // front + RCache.set_CullMode(CULL_CCW); // front StateManager.SetSampleMask(u32(1) << i); draw_volume(L); } @@ -109,7 +109,7 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); draw_volume(L); } - else // checked holger + else // checked holger { // per pixel RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x01, 0x81, 0x00); @@ -120,7 +120,7 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x81, 0x81, 0x00); draw_volume(L); } - else // checked holger + else // checked holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot.cpp index a616c4579a2..1fbc7d34717 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot.cpp @@ -30,7 +30,7 @@ void CRenderTarget::accum_spot(light* L) } } - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); { // setup xform L->xform_calc(); @@ -45,7 +45,7 @@ void CRenderTarget::accum_spot(light* L) // *** in practice, 'cause we "clear" it back to 0x1 it usually allows us to > 200 lights :) // Done in blender! // RCache.set_ColorWriteEnable (FALSE); - RCache.set_Element(s_accum_mask->E[SE_MASK_SPOT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_SPOT]); // masker // backfaces: if (stencil>=1 && zfail) stencil = light_id RCache.set_CullMode(CULL_CW); @@ -74,7 +74,7 @@ void CRenderTarget::accum_spot(light* L) // ***************************** Minimize overdraw ************************************* // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back // 2D texgens Fmatrix m_Texgen; @@ -147,7 +147,7 @@ void CRenderTarget::accum_spot(light* L) } RCache.set_Element(shader->E[_id]); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back // Constants float att_R = L->range * .95f; @@ -185,7 +185,7 @@ void CRenderTarget::accum_spot(light* L) RCache.set_CullMode(D3DCULL_CW); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -221,7 +221,7 @@ void CRenderTarget::accum_spot(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_Element(s_accum_mask->E[SE_MASK_ACCUM_VOL]); @@ -233,7 +233,7 @@ void CRenderTarget::accum_spot(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -275,7 +275,7 @@ void CRenderTarget::accum_volumetric(light* L) // *** assume accumulator setted up *** // ***************************** Mask by stencil ************************************* - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); { // setup xform L->xform_calc(); @@ -288,7 +288,7 @@ void CRenderTarget::accum_volumetric(light* L) } RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_NONE); // back + RCache.set_CullMode(CULL_NONE); // back // 2D texgens Fmatrix m_Texgen; diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot_geom.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot_geom.cpp index 0c2a07a7410..e6f89fe7593 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot_geom.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_accum_spot_geom.cpp @@ -105,12 +105,12 @@ void CRenderTarget::accum_spot_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_spot_ib", g_accum_spot_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_spot_ib); _RELEASE(g_accum_spot_ib); #ifdef DEBUG _SHOW_REF("g_accum_spot_vb", g_accum_spot_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_spot_vb); _RELEASE(g_accum_spot_vb); } @@ -214,13 +214,13 @@ void CRenderTarget::accum_volumetric_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_volumetric_ib", g_accum_volumetric_ib); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_ib(g_accum_volumetric_ib); _RELEASE(g_accum_volumetric_ib); #ifdef DEBUG _SHOW_REF("g_accum_volumetric_vb", g_accum_volumetric_vb); -#endif // DEBUG +#endif // DEBUG HW.stats_manager.decrement_stats_vb(g_accum_volumetric_vb); _RELEASE(g_accum_volumetric_vb); diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_draw_rain.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_draw_rain.cpp index 50758ec5307..d95e77339ea 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_draw_rain.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_draw_rain.cpp @@ -46,7 +46,7 @@ void CRenderTarget::draw_rain(light& RainSetup) // setup // float intensity = 0.3f*fuckingsun->color.r + 0.48f*fuckingsun->color.g + - //0.22f*fuckingsun->color.b; + // 0.22f*fuckingsun->color.b; // Fvector dir = L_dir; // dir.normalize().mul (- _sqrt(intensity+EPS)); // RCache.set_Element (s_accum_mask->E[SE_MASK_DIRECT]); // masker diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_enable_scissor.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_enable_scissor.cpp index 13b8c891878..cb94ec816c0 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_enable_scissor.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_enable_scissor.cpp @@ -61,7 +61,7 @@ void CRenderTarget::u_DBT_disable() // HW.pDevice->SetRenderState(D3DRS_ADAPTIVETESS_X,0); } -BOOL CRenderTarget::enable_scissor(light* L) // true if intersects near plane +BOOL CRenderTarget::enable_scissor(light* L) // true if intersects near plane { // Msg ("%d: %x type(%d), pos(%f,%f,%f)",Device.dwFrame,u32(L),u32(L->flags.type),VPUSH(L->position)); diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_bloom.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_bloom.cpp index 9005295e065..468443a0434 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_bloom.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_bloom.cpp @@ -30,10 +30,10 @@ struct v_filter // Gauss filtering coeffs // Samples: 0-central, -1, -2,..., -7, 1, 2,... 7 // -void CalcGauss_k7(Fvector4& w0, // weight - Fvector4& w1, // weight - float r = 3.3f, // gaussian radius - float s_out = 1.f // resulting magnitude +void CalcGauss_k7(Fvector4& w0, // weight + Fvector4& w1, // weight + float r = 3.3f, // gaussian radius + float s_out = 1.f // resulting magnitude ) { float W[8]; @@ -41,21 +41,21 @@ void CalcGauss_k7(Fvector4& w0, // weight // calculate float mag = 0; for (int i = -7; i <= 0; i++) - W[-i] = expf(-float(i * i) / (2 * r * r)); // weight + W[-i] = expf(-float(i * i) / (2 * r * r)); // weight for (int i = 0; i < 8; i++) - mag += i ? 2 * W[i] : W[i]; // symmetrical weight + mag += i ? 2 * W[i] : W[i]; // symmetrical weight for (int i = 0; i < 8; i++) W[i] = s_out * W[i] / mag; // W[0]=0, W[7]=-7 - w0.set(W[1], W[2], W[3], W[4]); // -1, -2, -3, -4 - w1.set(W[5], W[6], W[7], W[0]); // -5, -6, -7, 0 + w0.set(W[1], W[2], W[3], W[4]); // -1, -2, -3, -4 + w1.set(W[5], W[6], W[7], W[0]); // -5, -6, -7, 0 } -void CalcGauss_wave(Fvector4& w0, // weight - Fvector4& w1, // weight - float r_base = 3.3f, // gaussian radius - float r_detail = 1.0f, // gaussian radius - float s_out = 1.f // resulting magnitude +void CalcGauss_wave(Fvector4& w0, // weight + Fvector4& w1, // weight + float r_base = 3.3f, // gaussian radius + float r_detail = 1.0f, // gaussian radius + float s_out = 1.f // resulting magnitude ) { Fvector4 t0, t1; @@ -71,7 +71,7 @@ void CRenderTarget::phase_bloom() u32 Offset; // Targets - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all // RImplementation.rmNormal(); // Clear - don't clear - it's stupid here :) @@ -132,8 +132,8 @@ void CRenderTarget::phase_bloom() RCache.Vertex.Unlock(4, g_bloom_build->vb_stride); // Perform combine (all scalers must account for 4 samples + final diffuse multiply); - float s = ps_r2_ls_bloom_threshold; // scale - f_bloom_factor = .9f * f_bloom_factor + .1f * ps_r2_ls_bloom_speed * Device.fTimeDelta; // speed + float s = ps_r2_ls_bloom_threshold; // scale + f_bloom_factor = .9f * f_bloom_factor + .1f * ps_r2_ls_bloom_speed * Device.fTimeDelta; // speed if (!RImplementation.o.dx10_msaa) RCache.set_Element(s_bloom->E[0]); else @@ -186,12 +186,12 @@ void CRenderTarget::phase_bloom() RCache.set_Geometry(g_bloom_build); // P0 - u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[3]); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); // P1 - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[4]); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } @@ -205,14 +205,14 @@ void CRenderTarget::phase_bloom() Fvector2 two = {2.f / _w, 2.f / _h}; Fvector2 one = {1.f / _w, 1.f / _h}; Fvector2 half = {.5f / _w, .5f / _h}; - Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center - Fvector4 a_1 = {a_0.x - one.x - half.x, half.y, half.y, a_0.w + one.x + half.x}; // -1,+1i - Fvector4 a_2 = {a_1.x - two.x, half.y, half.y, a_1.w + two.x}; // -2,+2i - Fvector4 a_3 = {a_2.x - two.x, half.y, half.y, a_2.w + two.x}; // -3,+3i - Fvector4 a_4 = {a_3.x - two.x, half.y, half.y, a_3.w + two.x}; // -4,+4i - Fvector4 a_5 = {a_4.x - two.x, half.y, half.y, a_4.w + two.x}; // -5,+5i - Fvector4 a_6 = {a_5.x - two.x, half.y, half.y, a_5.w + two.x}; // -6,+6i - Fvector4 a_7 = {a_6.x - two.x, half.y, half.y, a_6.w + two.x}; // -7,+7i + Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center + Fvector4 a_1 = {a_0.x - one.x - half.x, half.y, half.y, a_0.w + one.x + half.x}; // -1,+1i + Fvector4 a_2 = {a_1.x - two.x, half.y, half.y, a_1.w + two.x}; // -2,+2i + Fvector4 a_3 = {a_2.x - two.x, half.y, half.y, a_2.w + two.x}; // -3,+3i + Fvector4 a_4 = {a_3.x - two.x, half.y, half.y, a_3.w + two.x}; // -4,+4i + Fvector4 a_5 = {a_4.x - two.x, half.y, half.y, a_4.w + two.x}; // -5,+5i + Fvector4 a_6 = {a_5.x - two.x, half.y, half.y, a_5.w + two.x}; // -6,+6i + Fvector4 a_7 = {a_6.x - two.x, half.y, half.y, a_6.w + two.x}; // -7,+7i // Fill vertex buffer v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); @@ -270,7 +270,7 @@ void CRenderTarget::phase_bloom() Fvector4 w0, w1; float kernel = ps_r2_ls_bloom_kernel_g; CalcGauss_wave(w0, w1, kernel, kernel / 3.f, ps_r2_ls_bloom_kernel_scale); - u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[1]); RCache.set_ca("weight", 0, w0); RCache.set_ca("weight", 1, w1); @@ -285,14 +285,14 @@ void CRenderTarget::phase_bloom() Fvector2 two = {2.f / _w, 2.f / _h}; Fvector2 one = {1.f / _w, 1.f / _h}; Fvector2 half = {.5f / _w, .5f / _h}; - Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center - Fvector4 a_1 = {half.x, a_0.y - one.y - half.y, half.y + one.y + a_0.z, half.x}; // -1,+1i - Fvector4 a_2 = {half.x, a_1.y - two.y, two.y + a_1.z, half.x}; // -2,+2i - Fvector4 a_3 = {half.x, a_2.y - two.y, two.y + a_2.z, half.x}; // -3,+3i - Fvector4 a_4 = {half.x, a_3.y - two.y, two.y + a_3.z, half.x}; // -4,+4i - Fvector4 a_5 = {half.x, a_4.y - two.y, two.y + a_4.z, half.x}; // -5,+5i - Fvector4 a_6 = {half.x, a_5.y - two.y, two.y + a_5.z, half.x}; // -6,+6i - Fvector4 a_7 = {half.x, a_6.y - two.y, two.y + a_6.z, half.x}; // -7,+7i + Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center + Fvector4 a_1 = {half.x, a_0.y - one.y - half.y, half.y + one.y + a_0.z, half.x}; // -1,+1i + Fvector4 a_2 = {half.x, a_1.y - two.y, two.y + a_1.z, half.x}; // -2,+2i + Fvector4 a_3 = {half.x, a_2.y - two.y, two.y + a_2.z, half.x}; // -3,+3i + Fvector4 a_4 = {half.x, a_3.y - two.y, two.y + a_3.z, half.x}; // -4,+4i + Fvector4 a_5 = {half.x, a_4.y - two.y, two.y + a_4.z, half.x}; // -5,+5i + Fvector4 a_6 = {half.x, a_5.y - two.y, two.y + a_5.z, half.x}; // -6,+6i + Fvector4 a_7 = {half.x, a_6.y - two.y, two.y + a_6.z, half.x}; // -7,+7i // Fill vertex buffer v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); @@ -350,7 +350,7 @@ void CRenderTarget::phase_bloom() Fvector4 w0, w1; float kernel = ps_r2_ls_bloom_kernel_g * float(Device.dwHeight) / float(Device.dwWidth); CalcGauss_wave(w0, w1, kernel, kernel / 3.f, ps_r2_ls_bloom_kernel_scale); - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[2]); RCache.set_ca("weight", 0, w0); RCache.set_ca("weight", 1, w1); diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_combine.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_combine.cpp index b369a58c5fe..758a00e68ca 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_combine.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_combine.cpp @@ -99,7 +99,7 @@ void CRenderTarget::phase_combine() // // if (RImplementation.o.bug) { - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 if (RImplementation.o.nvstencil) { u_stencil_optimize(CRenderTarget::SO_Combine); RCache.set_ColorWriteEnable(); @@ -135,7 +135,7 @@ void CRenderTarget::phase_combine() ambclr.mul(ps_r2_sun_lumscale_amb); //. Fvector4 envclr = { envdesc.sky_color.x*2+EPS, envdesc.sky_color.y*2+EPS, - //envdesc.sky_color.z*2+EPS, envdesc.weight }; + // envdesc.sky_color.z*2+EPS, envdesc.weight }; Fvector4 envclr = {envdesc.hemi_color.x * 2 + EPS, envdesc.hemi_color.y * 2 + EPS, envdesc.hemi_color.z * 2 + EPS, envdesc.weight}; @@ -262,16 +262,16 @@ void CRenderTarget::phase_combine() { PIX_EVENT(Forward_rendering); if (!RImplementation.o.dx10_msaa) - u_setrt(rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT else - u_setrt(rt_Generic_0_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // LDR RT + u_setrt(rt_Generic_0_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // LDR RT RCache.set_CullMode(CULL_CCW); RCache.set_Stencil(FALSE); RCache.set_ColorWriteEnable(); // TODO: DX10: CHeck this! // g_pGamePersistent->Environment().RenderClouds (); RImplementation.render_forward(); - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI } // Igor: for volumetric lights @@ -290,26 +290,26 @@ void CRenderTarget::phase_combine() } // for msaa we need a resolved color buffer - Holger - phase_bloom(); // HDR RT invalidated here + phase_bloom(); // HDR RT invalidated here // RImplementation.rmNormal(); // u_setrt(rt_Generic_1,0,0,HW.pBaseZB); // Distortion filter - BOOL bDistort = RImplementation.o.distortion_enabled; // This can be modified + BOOL bDistort = RImplementation.o.distortion_enabled; // This can be modified { if ((0 == RImplementation.mapDistort.size()) && !_menu_pp) bDistort = FALSE; if (bDistort) { PIX_EVENT(render_distort_objects); FLOAT ColorRGBA[4] = {127.0f / 255.0f, 127.0f / 255.0f, 0.0f, 127.0f / 255.0f}; if (!RImplementation.o.dx10_msaa) { - u_setrt(rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask + u_setrt(rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask HW.pDevice->ClearRenderTargetView(rt_Generic_1->pRT, ColorRGBA); } else { u_setrt( - rt_Generic_1_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // Now RT is a distortion mask + rt_Generic_1_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // Now RT is a distortion mask HW.pDevice->ClearRenderTargetView(rt_Generic_1_r->pRT, ColorRGBA); } RCache.set_CullMode(CULL_CCW); @@ -317,7 +317,7 @@ void CRenderTarget::phase_combine() RCache.set_ColorWriteEnable(); // CHK_DX(HW.pDevice->Clear ( 0L, NULL, D3DCLEAR_TARGET, color_rgba(127,127,0,127), 1.0f, 0L)); RImplementation.r_dsgraph_render_distort(); - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI } } @@ -342,14 +342,14 @@ void CRenderTarget::phase_combine() // Combine everything + perform AA if (RImplementation.o.dx10_msaa) { if (PP_Complex) - u_setrt(rt_Generic, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Generic, 0, 0, HW.pBaseZB); // LDR RT else u_setrt(Device.dwWidth, Device.dwHeight, HW.pBaseRT, NULL, NULL, HW.pBaseZB); } else { if (PP_Complex) - u_setrt(rt_Color, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Color, 0, 0, HW.pBaseZB); // LDR RT else u_setrt(Device.dwWidth, Device.dwHeight, HW.pBaseRT, NULL, NULL, HW.pBaseZB); } @@ -427,16 +427,16 @@ void CRenderTarget::phase_combine() // Draw COLOR if (!RImplementation.o.dx10_msaa) { if (ps_r2_ls_flags.test(R2FLAG_AA)) - RCache.set_Element(s_combine->E[bDistort ? 3 : 1]); // look at blender_combine.cpp + RCache.set_Element(s_combine->E[bDistort ? 3 : 1]); // look at blender_combine.cpp else - RCache.set_Element(s_combine->E[bDistort ? 4 : 2]); // look at blender_combine.cpp + RCache.set_Element(s_combine->E[bDistort ? 4 : 2]); // look at blender_combine.cpp } else { if (ps_r2_ls_flags.test(R2FLAG_AA)) - RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 3 : 1]); // look at blender_combine.cpp + RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 3 : 1]); // look at blender_combine.cpp else - RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 4 : 2]); // look at blender_combine.cpp + RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 4 : 2]); // look at blender_combine.cpp } RCache.set_c("e_barrier", ps_r2_aa_barier.x, ps_r2_aa_barier.y, ps_r2_aa_barier.z, 0); RCache.set_c("e_weights", ps_r2_aa_weight.x, ps_r2_aa_weight.y, ps_r2_aa_weight.z, 0); @@ -456,7 +456,7 @@ void CRenderTarget::phase_combine() RCache.set_Stencil(FALSE); // if FP16-BLEND !not! supported - draw flares here, overwise they are already in the bloom target - /* if (!RImplementation.o.fp16_blend)*/ g_pGamePersistent->Environment().RenderFlares(); // lens-flares + /* if (!RImplementation.o.fp16_blend)*/ g_pGamePersistent->Environment().RenderFlares(); // lens-flares // PP-if required if (PP_Complex) { diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_luminance.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_luminance.cpp index f389ecdd5b0..ac288a99d13 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_luminance.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_luminance.cpp @@ -37,8 +37,8 @@ void CRenderTarget::phase_luminance() float ts = 64; float _w = float(BLOOM_size_X); float _h = float(BLOOM_size_Y); - Fvector2 one = {2.f / _w, 2.f / _h}; // two, infact - Fvector2 half = {1.f / _w, 1.f / _h}; // one, infact + Fvector2 one = {2.f / _w, 2.f / _h}; // two, infact + Fvector2 half = {1.f / _w, 1.f / _h}; // one, infact Fvector2 a_0 = {half.x + 0, half.y + 0}; Fvector2 a_1 = {half.x + one.x, half.y + 0}; Fvector2 a_2 = {half.x + 0, half.y + one.y}; @@ -90,8 +90,8 @@ void CRenderTarget::phase_luminance() Fvector2 a[16], b[16]; for (int k = 0; k < 16; k++) { - int _x = (k * 2 + 1) % 8; // 1,3,5,7 - int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... + int _x = (k * 2 + 1) % 8; // 1,3,5,7 + int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... a[k].set(_x, _y).div(_src); b[k].set(a[k]).add(1); } @@ -100,19 +100,19 @@ void CRenderTarget::phase_luminance() v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); pv->p.set(eps, float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down + pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down pv++; pv->p.set(eps, eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up + pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up pv++; pv->p.set(float(_ts + eps), float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down + pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down pv++; pv->p.set(float(_ts + eps), eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up + pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up pv++; RCache.Vertex.Unlock(4, g_bloom_filter->vb_stride); RCache.set_Element(s_luminance->E[1]); @@ -131,8 +131,8 @@ void CRenderTarget::phase_luminance() Fvector2 a[16], b[16]; for (int k = 0; k < 16; k++) { - int _x = (k * 2 + 1) % 8; // 1,3,5,7 - int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... + int _x = (k * 2 + 1) % 8; // 1,3,5,7 + int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... a[k].set(_x, _y).div(_src); b[k].set(a[k]).add(1); } @@ -141,19 +141,19 @@ void CRenderTarget::phase_luminance() v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); pv->p.set(eps, float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down + pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down pv++; pv->p.set(eps, eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up + pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up pv++; pv->p.set(float(_ts + eps), float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down + pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down pv++; pv->p.set(float(_ts + eps), eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up + pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up pv++; RCache.Vertex.Unlock(4, g_bloom_filter->vb_stride); diff --git a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_scene.cpp b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_scene.cpp index 4fe98a77d0a..c5f2f1a5881 100644 --- a/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_scene.cpp +++ b/src/Layers/xrRenderPC_R3/r3_rendertarget_phase_scene.cpp @@ -116,9 +116,9 @@ void CRenderTarget::phase_scene_end() else u_setrt(rt_Color, 0, 0, rt_MSAADepth->pZRT); RCache.set_CullMode(CULL_NONE); - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 if (RImplementation.o.nvstencil) u_stencil_optimize(CRenderTarget::SO_Combine); - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 RCache.set_ColorWriteEnable(); // common calc for quad-rendering @@ -144,7 +144,7 @@ void CRenderTarget::phase_scene_end() RCache.Vertex.Unlock(4, g_combine->vb_stride); // if (stencil>=1 && aref_pass) stencil = light_id - RCache.set_Element(s_accum_mask->E[SE_MASK_ALBEDO]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_ALBEDO]); // masker RCache.set_Geometry(g_combine); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } diff --git a/src/Layers/xrRenderPC_R4/CSCompiler.cpp b/src/Layers/xrRenderPC_R4/CSCompiler.cpp index 31581d949d1..de40a3795d5 100644 --- a/src/Layers/xrRenderPC_R4/CSCompiler.cpp +++ b/src/Layers/xrRenderPC_R4/CSCompiler.cpp @@ -127,7 +127,7 @@ CSCompiler& CSCompiler::defOutput(LPCSTR ResourceName, ref_rt rt) if (stage >= m_Textures.size()) m_Textures.resize(stage + 1); - m_Outputs[stage] = rt->pUAView; //!!!dangerous view can be deleted + m_Outputs[stage] = rt->pUAView; //!!!dangerous view can be deleted return *this; } @@ -146,7 +146,7 @@ CSCompiler& CSCompiler::defTexture(LPCSTR ResourceName, ref_texture texture) if (stage >= m_Textures.size()) m_Textures.resize(stage + 1); - m_Textures[stage] = texture->get_SRView(); //!!!dangerous view can be deleted + m_Textures[stage] = texture->get_SRView(); //!!!dangerous view can be deleted return *this; } diff --git a/src/Layers/xrRenderPC_R4/CSCompiler.h b/src/Layers/xrRenderPC_R4/CSCompiler.h index d796766bcb6..3fa35ef4502 100644 --- a/src/Layers/xrRenderPC_R4/CSCompiler.h +++ b/src/Layers/xrRenderPC_R4/CSCompiler.h @@ -34,6 +34,6 @@ class CSCompiler xr_vector m_Samplers; xr_vector m_Textures; xr_vector m_Outputs; -}; // class CSCompiler +}; // class CSCompiler -#endif // #ifndef CSCOMPILER_H_INCLUDED \ No newline at end of file +#endif // #ifndef CSCOMPILER_H_INCLUDED \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R4/ComputeShader.h b/src/Layers/xrRenderPC_R4/ComputeShader.h index 1297e606224..27c64a4f0a3 100644 --- a/src/Layers/xrRenderPC_R4/ComputeShader.h +++ b/src/Layers/xrRenderPC_R4/ComputeShader.h @@ -29,6 +29,6 @@ class ComputeShader xr_vector m_Samplers; xr_vector m_Textures; xr_vector m_Outputs; -}; // class ComputeShader +}; // class ComputeShader -#endif // #ifndef COMPUTESHADER_H_INCLUDED \ No newline at end of file +#endif // #ifndef COMPUTESHADER_H_INCLUDED \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R4/Light_Render_Direct.h b/src/Layers/xrRenderPC_R4/Light_Render_Direct.h index 68e888c3b75..7868cdd9072 100644 --- a/src/Layers/xrRenderPC_R4/Light_Render_Direct.h +++ b/src/Layers/xrRenderPC_R4/Light_Render_Direct.h @@ -3,5 +3,5 @@ class CLight_Compute_XFORM_and_VIS { public: - void compute_xf_spot(light* L); // + void compute_xf_spot(light* L); // }; diff --git a/src/Layers/xrRenderPC_R4/Light_Render_Direct_ComputeXFS.cpp b/src/Layers/xrRenderPC_R4/Light_Render_Direct_ComputeXFS.cpp index ff4674ffffe..c355f3018a6 100644 --- a/src/Layers/xrRenderPC_R4/Light_Render_Direct_ComputeXFS.cpp +++ b/src/Layers/xrRenderPC_R4/Light_Render_Direct_ComputeXFS.cpp @@ -44,23 +44,23 @@ void CLight_Compute_XFORM_and_VIS::compute_xf_spot(light* L) // compute intensity float intensity0 = (L->color.r + L->color.g + L->color.b) / 3.f; float intensity1 = (L->color.r * 0.2125f + L->color.g * 0.7154f + L->color.b * 0.0721f); - float intensity = (intensity0 + intensity1) / 2.f; // intensity1 tends to underestimate... + float intensity = (intensity0 + intensity1) / 2.f; // intensity1 tends to underestimate... // compute how much duelling frusta occurs [-1..1]-> 1 + [-0.5 .. +0.5] float duel_dot = 1.f - 0.5f * Device.vCameraDirection.dotproduct(L_dir); // compute how large the light is - give more texels to larger lights, assume 8m as being optimal radius - float sizefactor = L->range / 8.f; // 4m = .5, 8m=1.f, 16m=2.f, 32m=4.f + float sizefactor = L->range / 8.f; // 4m = .5, 8m=1.f, 16m=2.f, 32m=4.f // compute how wide the light frustum is - assume 90deg as being optimal - float widefactor = L->cone / deg2rad(90.f); // + float widefactor = L->cone / deg2rad(90.f); // // factors - float factor0 = powf(ssa, 1.f / 2.f); // ssa is quadratic - float factor1 = powf(intensity, 1.f / 16.f); // less perceptually important? - float factor2 = powf(duel_dot, 1.f / 4.f); // difficult to fast-change this -> visible - float factor3 = powf(sizefactor, 1.f / 4.f); // this shouldn't make much difference - float factor4 = powf(widefactor, 1.f / 2.f); // make it linear ??? + float factor0 = powf(ssa, 1.f / 2.f); // ssa is quadratic + float factor1 = powf(intensity, 1.f / 16.f); // less perceptually important? + float factor2 = powf(duel_dot, 1.f / 4.f); // difficult to fast-change this -> visible + float factor3 = powf(sizefactor, 1.f / 4.f); // this shouldn't make much difference + float factor4 = powf(widefactor, 1.f / 2.f); // make it linear ??? float factor = ps_r2_ls_squality * factor0 * factor1 * factor2 * factor3 * factor4; // final size calc diff --git a/src/Layers/xrRenderPC_R4/R_Backend_LOD.h b/src/Layers/xrRenderPC_R4/R_Backend_LOD.h index 8a4a7e57f61..2b5fcc1ffcc 100644 --- a/src/Layers/xrRenderPC_R4/R_Backend_LOD.h +++ b/src/Layers/xrRenderPC_R4/R_Backend_LOD.h @@ -14,4 +14,4 @@ class R_LOD void set_LOD(float LOD); }; -#endif // #ifndef R_BACKEND_LOD_H_INCLUDED \ No newline at end of file +#endif // #ifndef R_BACKEND_LOD_H_INCLUDED \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R4/SMAP_Allocator.h b/src/Layers/xrRenderPC_R4/SMAP_Allocator.h index 485f261979a..a29476fc442 100644 --- a/src/Layers/xrRenderPC_R4/SMAP_Allocator.h +++ b/src/Layers/xrRenderPC_R4/SMAP_Allocator.h @@ -24,16 +24,16 @@ struct SMAP_Rect } void get_cp(Ivector2& p0, Ivector2& p1) { - p0.set(max.x + 1, min.y); // right - p1.set(min.x, max.y + 1); // down + p0.set(max.x + 1, min.y); // right + p1.set(min.x, max.y + 1); // down } }; class SMAP_Allocator { - u32 psize; // pool size - xr_vector stack; // - xr_vector cpoint; // critical points + u32 psize; // pool size + xr_vector stack; // + xr_vector cpoint; // critical points private: void _add(SMAP_Rect& R) { @@ -41,8 +41,8 @@ class SMAP_Allocator Ivector2 p0, p1; R.get_cp(p0, p1); s32 ps = s32(psize); - if ((p0.x < ps) && (p0.y < ps)) cpoint.push_back(p0); // 1st - if ((p1.x < ps) && (p1.y < ps)) cpoint.push_back(p1); // 2nd + if ((p0.x < ps) && (p0.y < ps)) cpoint.push_back(p0); // 1st + if ((p1.x < ps) && (p1.y < ps)) cpoint.push_back(p1); // 2nd } public: diff --git a/src/Layers/xrRenderPC_R4/blender_bloom_build.cpp b/src/Layers/xrRenderPC_R4/blender_bloom_build.cpp index 9d8ea1acf10..466ebcb563d 100644 --- a/src/Layers/xrRenderPC_R4/blender_bloom_build.cpp +++ b/src/Layers/xrRenderPC_R4/blender_bloom_build.cpp @@ -17,7 +17,7 @@ void CBlender_bloom_build::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // transfer into bloom-target + case 0: // transfer into bloom-target C.r_Pass("stub_notransform_build", "bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); // C.r_Sampler_clf ("s_image", r2_RT_generic1); @@ -25,28 +25,28 @@ void CBlender_bloom_build::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // X-filter + case 1: // X-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // Y-filter + case 2: // Y-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // FF-filter_P0 + case 3: // FF-filter_P0 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // FF-filter_P1 + case 4: // FF-filter_P1 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); @@ -70,7 +70,7 @@ void CBlender_bloom_build_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // transfer into bloom-target + case 0: // transfer into bloom-target C.r_Pass("stub_notransform_build", "bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); // C.r_Sampler_clf ("s_image", r2_RT_generic1); @@ -78,28 +78,28 @@ void CBlender_bloom_build_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // X-filter + case 1: // X-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // Y-filter + case 2: // Y-filter C.r_Pass("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // FF-filter_P0 + case 3: // FF-filter_P0 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom1); C.r_dx10Texture("s_bloom", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // FF-filter_P1 + case 4: // FF-filter_P1 C.r_Pass("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_bloom", r2_RT_bloom2); C.r_dx10Texture("s_bloom", r2_RT_bloom2); @@ -123,7 +123,7 @@ void CBlender_postprocess_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // transfer into bloom-target + case 0: // transfer into bloom-target C.r_Pass("stub_notransform_postpr", "postprocess", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_dx10Texture("s_base0", r2_RT_generic); @@ -135,7 +135,7 @@ void CBlender_postprocess_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case 4: // use color map + case 4: // use color map C.r_Pass("stub_notransform_postpr", "postprocess_CM", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA); C.r_dx10Texture("s_base0", r2_RT_generic); diff --git a/src/Layers/xrRenderPC_R4/blender_combine.cpp b/src/Layers/xrRenderPC_R4/blender_combine.cpp index dceb9c87405..f3ba70d4e8c 100644 --- a/src/Layers/xrRenderPC_R4/blender_combine.cpp +++ b/src/Layers/xrRenderPC_R4/blender_combine.cpp @@ -17,10 +17,10 @@ void CBlender_combine::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // combine + case 0: // combine C.r_Pass("combine_1", "combine_1_nomsaa", FALSE, FALSE, FALSE, TRUE, D3DBLEND_INVSRCALPHA, - D3DBLEND_SRCALPHA); //. MRT-blend? - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 + D3DBLEND_SRCALPHA); //. MRT-blend? + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 C.r_StencilRef(0x01); // C.r_Sampler_rtf ("s_position", r2_RT_P ); // C.r_Sampler_rtf ("s_normal", r2_RT_N ); @@ -55,7 +55,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // aa-edge-detection + AA :) + case 1: // aa-edge-detection + AA :) C.r_Pass("stub_notransform_aa_AA", "combine_2_AA", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -73,7 +73,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // non-AA + case 2: // non-AA // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -92,7 +92,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // aa-edge-detection + AA :) + DISTORTION + case 3: // aa-edge-detection + AA :) + DISTORTION C.r_Pass("stub_notransform_aa_AA", "combine_2_AA_D", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -110,7 +110,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // non-AA + DISTORTION + case 4: // non-AA + DISTORTION // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA_D", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -129,7 +129,7 @@ void CBlender_combine::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 5: // post-processing + case 5: // post-processing break; } } @@ -154,10 +154,10 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // combine + case 0: // combine C.r_Pass("combine_1", "combine_1_msaa", FALSE, FALSE, FALSE, TRUE, D3DBLEND_INVSRCALPHA, - D3DBLEND_SRCALPHA); //. MRT-blend? - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 + D3DBLEND_SRCALPHA); //. MRT-blend? + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // stencil should be >= 1 C.r_StencilRef(0x01); // C.r_Sampler_rtf ("s_position", r2_RT_P ); // C.r_Sampler_rtf ("s_normal", r2_RT_N ); @@ -192,7 +192,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // aa-edge-detection + AA :) + case 1: // aa-edge-detection + AA :) C.r_Pass("stub_notransform_aa_AA", "combine_2_AA", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -210,7 +210,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // non-AA + case 2: // non-AA // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA", FALSE, FALSE, TRUE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -229,7 +229,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 3: // aa-edge-detection + AA :) + DISTORTION + case 3: // aa-edge-detection + AA :) + DISTORTION C.r_Pass("stub_notransform_aa_AA", "combine_2_AA_D", FALSE, FALSE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -247,7 +247,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 4: // non-AA + DISTORTION + case 4: // non-AA + DISTORTION // Can use simpler VS (need only Tex0) C.r_Pass("stub_notransform_aa_AA", "combine_2_NAA_D", FALSE, FALSE, TRUE); // C.r_Sampler_rtf ("s_position", r2_RT_P); @@ -266,7 +266,7 @@ void CBlender_combine_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 5: // post-processing + case 5: // post-processing break; } GlobalEnv.Render->m_MSAASample = -1; diff --git a/src/Layers/xrRenderPC_R4/blender_deffer_aref.cpp b/src/Layers/xrRenderPC_R4/blender_deffer_aref.cpp index beee82bdb02..4adc8ca62eb 100644 --- a/src/Layers/xrRenderPC_R4/blender_deffer_aref.cpp +++ b/src/Layers/xrRenderPC_R4/blender_deffer_aref.cpp @@ -76,7 +76,7 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) } else { - C.SetParams(1, false); //. + C.SetParams(1, false); //. bool bUseATOC = (RImplementation.o.dx10_msaa_alphatest == CRender::MSAA_ATEST_DX10_0_ATOC); @@ -84,7 +84,7 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) // ***only pixel shaders differ*** switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer if (bUseATOC) { uber_deffer(C, true, "base", "base_atoc", true, 0, true); @@ -104,7 +104,7 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer if (bUseATOC) { uber_deffer(C, false, "base", "base_atoc", true, 0, true); @@ -124,8 +124,8 @@ void CBlender_deffer_aref::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_R2_SHADOW: // smap - // if (RImplementation.o.HW_smap) C.r_Pass + case SE_R2_SHADOW: // smap + // if (RImplementation.o.HW_smap) C.r_Pass //("shadow_direct_base_aref","shadow_direct_base_aref",FALSE,TRUE,TRUE,FALSE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,220); // else C.r_Pass //("shadow_direct_base_aref","shadow_direct_base_aref",FALSE); diff --git a/src/Layers/xrRenderPC_R4/blender_deffer_flat.cpp b/src/Layers/xrRenderPC_R4/blender_deffer_flat.cpp index f65c04a192e..c9e6b03d868 100644 --- a/src/Layers/xrRenderPC_R4/blender_deffer_flat.cpp +++ b/src/Layers/xrRenderPC_R4/blender_deffer_flat.cpp @@ -51,21 +51,21 @@ void CBlender_deffer_flat::Compile(CBlender_Compile& C) // codepath is the same, only the shaders differ switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer uber_deffer(C, true, "base", "base", false, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); C.r_StencilRef(0x01); C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer uber_deffer(C, false, "base", "base", false, 0, true); C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0xff, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); C.r_StencilRef(0x01); C.r_End(); break; - case SE_R2_SHADOW: // smap-direct + case SE_R2_SHADOW: // smap-direct // if (RImplementation.o.HW_smap) C.r_Pass ("shadow_direct_base","dumb", FALSE,TRUE,TRUE,FALSE); // else C.r_Pass ("shadow_direct_base","shadow_direct_base",FALSE); uber_shadow(C, "base"); diff --git a/src/Layers/xrRenderPC_R4/blender_deffer_model.cpp b/src/Layers/xrRenderPC_R4/blender_deffer_model.cpp index 1f7a93383ae..7b47e67d1cf 100644 --- a/src/Layers/xrRenderPC_R4/blender_deffer_model.cpp +++ b/src/Layers/xrRenderPC_R4/blender_deffer_model.cpp @@ -75,8 +75,8 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) LPCSTR vsname, psname; switch (C.iElement) { - case 0: // - case 1: // + case 0: // + case 1: // vsname = psname = "model_def_lq"; C.r_Pass( vsname, psname, TRUE, TRUE, FALSE, TRUE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, TRUE, oAREF.value); @@ -99,7 +99,7 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) C.TessMethod = oTessellation.IDselected; switch (C.iElement) { - case SE_R2_NORMAL_HQ: // deffer + case SE_R2_NORMAL_HQ: // deffer if (bUseATOC) { uber_deffer(C, true, "model", "base_atoc", bAref, 0, true); C.r_Stencil( @@ -118,7 +118,7 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) if (bUseATOC) C.RS.SetRS(D3DRS_ZFUNC, D3DCMP_EQUAL); C.r_End(); break; - case SE_R2_NORMAL_LQ: // deffer + case SE_R2_NORMAL_LQ: // deffer if (bUseATOC) { uber_deffer(C, false, "model", "base_atoc", bAref, 0, true); C.r_Stencil( @@ -136,7 +136,7 @@ void CBlender_deffer_model::Compile(CBlender_Compile& C) if (bUseATOC) C.RS.SetRS(D3DRS_ZFUNC, D3DCMP_EQUAL); C.r_End(); break; - case SE_R2_SHADOW: // smap + case SE_R2_SHADOW: // smap if (bAref) { // if (RImplementation.o.HW_smap) C.r_Pass ("shadow_direct_model_aref","shadow_direct_base_aref", // FALSE,TRUE,TRUE,FALSE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,220); diff --git a/src/Layers/xrRenderPC_R4/blender_light_direct.cpp b/src/Layers/xrRenderPC_R4/blender_light_direct.cpp index b80801740d7..f7d5ecc881f 100644 --- a/src/Layers/xrRenderPC_R4/blender_light_direct.cpp +++ b/src/Layers/xrRenderPC_R4/blender_light_direct.cpp @@ -17,7 +17,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) // BOOL b_HW_smap = RImplementation.o.HW_smap; // BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -26,13 +26,13 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping - case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping // FVF::TL2uv C.r_Pass("accum_sun", "accum_sun_near_nomsaa_nominmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -50,7 +50,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_FAR: // far pass, only stencil clipping performed + case SE_SUN_FAR: // far pass, only stencil clipping performed // FVF::TL2uv // C.r_Pass ("null", "accum_sun_far", false, TRUE, FALSE,blend,D3DBLEND_ONE,dest); C.r_Pass("accum_sun", "accum_sun_far_nomsaa", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); @@ -88,7 +88,7 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_LUMINANCE: // luminance pass + case SE_SUN_LUMINANCE: // luminance pass // C.r_Pass ("null", "accum_sun", false, FALSE, FALSE); C.r_Pass("stub_notransform_aa_AA", "accum_sun_nomsaa", false, FALSE, FALSE); C.r_CullMode(D3DCULL_NONE); @@ -110,11 +110,11 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C) break; // SE_SUN_NEAR for min/max - case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping // FVF::TL2uv C.r_Pass("accum_sun", "accum_sun_near_nomsaa_minmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -181,7 +181,7 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) // BOOL b_HW_smap = RImplementation.o.HW_smap; // BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -190,13 +190,13 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping - case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_MIDDLE: // middle pass - enable Z-test to perform depth-clipping // FVF::TL2uv // C.r_Pass ("null", "accum_sun_near", false, TRUE, FALSE,blend,D3DBLEND_ONE,dest); C.r_Pass("accum_sun", "accum_sun_near_msaa_nominmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer // C.r_Sampler_rtf ("s_position", r2_RT_P ); // C.r_Sampler_rtf ("s_normal", r2_RT_N ); // C.r_Sampler_clw ("s_material", r2_material ); @@ -226,7 +226,7 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_FAR: // far pass, only stencil clipping performed + case SE_SUN_FAR: // far pass, only stencil clipping performed // FVF::TL2uv // C.r_Pass ("null", "accum_sun_far", false, TRUE, FALSE,blend,D3DBLEND_ONE,dest); C.r_Pass("accum_sun", "accum_sun_far_msaa", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); @@ -264,7 +264,7 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_SUN_LUMINANCE: // luminance pass + case SE_SUN_LUMINANCE: // luminance pass // C.r_Pass ("null", "accum_sun", false, FALSE, FALSE); C.r_Pass("stub_notransform_aa_AA", "accum_sun_msaa", false, FALSE, FALSE); C.r_CullMode(D3DCULL_NONE); @@ -286,11 +286,11 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C) break; // SE_SUN_NEAR for minmax - case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping + case SE_SUN_NEAR_MINMAX: // near pass - enable Z-test to perform depth-clipping // FVF::TL2uv C.r_Pass("accum_sun", "accum_sun_near_msaa_minmax", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_CullMode(D3DCULL_NONE); - C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer + C.PassSET_ZB(TRUE, FALSE, TRUE); // force inverted Z-Buffer C.r_dx10Texture("s_position", r2_RT_P); C.r_dx10Texture("s_normal", r2_RT_N); @@ -334,7 +334,7 @@ void CBlender_accum_direct_volumetric_msaa::Compile(CBlender_Compile& C) // BOOL b_HW_smap = RImplementation.o.HW_smap; // BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF; - BOOL blend = FALSE; // RImplementation.o.fp16_blend; + BOOL blend = FALSE; // RImplementation.o.fp16_blend; D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; if (RImplementation.o.sunfilter) { blend = FALSE; @@ -343,7 +343,7 @@ void CBlender_accum_direct_volumetric_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // near pass - enable Z-test to perform depth-clipping + case 0: // near pass - enable Z-test to perform depth-clipping C.r_Pass("accum_sun", "accum_volumetric_sun_msaa", false, TRUE, FALSE, blend, D3DBLEND_ONE, dest); C.r_dx10Texture("s_lmap", C.L_textures[0]); C.r_dx10Texture("s_smap", r2_RT_smap_depth); @@ -380,7 +380,7 @@ void CBlender_accum_direct_volumetric_sun_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // near pass - enable Z-test to perform depth-clipping + case 0: // near pass - enable Z-test to perform depth-clipping C.r_Pass( "accum_sun", "accum_volumetric_sun_msaa", false, false, false, true, D3DBLEND_ONE, D3DBLEND_ONE, false, 0); C.r_dx10Texture("s_smap", r2_RT_smap_depth); diff --git a/src/Layers/xrRenderPC_R4/blender_light_mask.cpp b/src/Layers/xrRenderPC_R4/blender_light_mask.cpp index 2d6be5e4a23..b921ab68b95 100644 --- a/src/Layers/xrRenderPC_R4/blender_light_mask.cpp +++ b/src/Layers/xrRenderPC_R4/blender_light_mask.cpp @@ -18,7 +18,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_MASK_SPOT: // spot or omni-part + case SE_MASK_SPOT: // spot or omni-part C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -26,7 +26,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_POINT: // point + case SE_MASK_POINT: // point C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -34,7 +34,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_DIRECT: // stencil mask for directional light + case SE_MASK_DIRECT: // stencil mask for directional light // FVF::F_TL // C.r_Pass ("null", "accum_sun_mask", false, // FALSE,FALSE,TRUE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,1); @@ -49,14 +49,14 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) + case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) C.r_Pass("accum_volume", "copy_p_nomsaa", false, FALSE, FALSE); // C.r_Sampler_rtf ("s_base", r2_RT_accum_temp ); C.r_dx10Texture("s_generic", r2_RT_accum_temp); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) + case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); @@ -66,7 +66,7 @@ void CBlender_accum_direct_mask::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) + case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); @@ -101,7 +101,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_MASK_SPOT: // spot or omni-part + case SE_MASK_SPOT: // spot or omni-part C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -109,7 +109,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_POINT: // point + case SE_MASK_POINT: // point C.r_Pass("accum_mask", "dumb", false, TRUE, FALSE); // C.r_Sampler_rtf ("s_position", r2_RT_P); // ??? // C.r_dx10Texture ("s_position", r2_RT_P); // ??? @@ -117,7 +117,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_DIRECT: // stencil mask for directional light + case SE_MASK_DIRECT: // stencil mask for directional light // FVF::F_TL // C.r_Pass ("null", "accum_sun_mask", false, // FALSE,FALSE,TRUE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,1); @@ -132,14 +132,14 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_ColorWriteEnable(false, false, false, false); C.r_End(); break; - case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) + case SE_MASK_ACCUM_VOL: // copy accumulator (temp -> real), volumetric (usually after blend) C.r_Pass("accum_volume", "copy_p_msaa", false, FALSE, FALSE); // C.r_Sampler_rtf ("s_base", r2_RT_accum_temp ); C.r_dx10Texture("s_generic", r2_RT_accum_temp); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) + case SE_MASK_ACCUM_2D: // copy accumulator (temp -> real), 2D (usually after sun-blend) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); @@ -149,7 +149,7 @@ void CBlender_accum_direct_mask_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) + case SE_MASK_ALBEDO: // copy accumulator, 2D (for accum->color, albedo_wo) // FVF::F_TL2uv but only uv0 is used // C.r_Pass ("null", "copy", false, FALSE,FALSE); // C.r_Pass ("stub_notransform","copy", false, FALSE,FALSE); diff --git a/src/Layers/xrRenderPC_R4/blender_light_occq.cpp b/src/Layers/xrRenderPC_R4/blender_light_occq.cpp index 66dba739a5f..6a63b28e39c 100644 --- a/src/Layers/xrRenderPC_R4/blender_light_occq.cpp +++ b/src/Layers/xrRenderPC_R4/blender_light_occq.cpp @@ -17,19 +17,19 @@ void CBlender_light_occq::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // occlusion testing + case 0: // occlusion testing C.r_Pass("dumb", "dumb", false, TRUE, FALSE, FALSE); C.r_End(); // Color write as well as culling and stencil are set up manually in code. break; - case 1: // NV40 optimization :) + case 1: // NV40 optimization :) C.r_Pass("stub_notransform_t", "dumb", false, FALSE, FALSE, FALSE); C.r_ColorWriteEnable(false, false, false, false); C.r_CullMode(D3DCULL_NONE); - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // keep/keep/keep + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xff, 0x00); // keep/keep/keep C.r_End(); break; - case 2: // Stencil clear in case we've ran out of markers. + case 2: // Stencil clear in case we've ran out of markers. C.r_Pass("stub_notransform_t", "dumb", false, FALSE, FALSE, FALSE); C.r_ColorWriteEnable(false, false, false, false); C.r_CullMode(D3DCULL_NONE); @@ -40,7 +40,8 @@ void CBlender_light_occq::Compile(CBlender_Compile& C) // Clear all bits except the last one C.r_Stencil(TRUE, D3DCMP_ALWAYS, 0x00, 0xFE, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO); } - // C.r_Stencil (TRUE,D3DCMP_ALWAYS,0x00,0xFF, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO); // + // C.r_Stencil (TRUE,D3DCMP_ALWAYS,0x00,0xFF, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO); + // // // keep/keep/keep C.r_End(); break; diff --git a/src/Layers/xrRenderPC_R4/blender_light_point.cpp b/src/Layers/xrRenderPC_R4/blender_light_point.cpp index 6ebc8df0fd2..70809b9dc83 100644 --- a/src/Layers/xrRenderPC_R4/blender_light_point.cpp +++ b/src/Layers/xrRenderPC_R4/blender_light_point.cpp @@ -21,7 +21,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; switch (C.iElement) { - case SE_L_FILL: // fill projective + case SE_L_FILL: // fill projective // C.r_Pass ("null", "copy", false, FALSE, FALSE); C.r_Pass("stub_notransform", "copy_nomsaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0] ); @@ -29,7 +29,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_omni_unshadowed_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -47,7 +47,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_omni_normal_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -74,7 +74,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_omni_normal_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -101,7 +101,7 @@ void CBlender_accum_point::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_omni_transluent_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -155,7 +155,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) D3DBLEND dest = blend ? D3DBLEND_ONE : D3DBLEND_ZERO; switch (C.iElement) { - case SE_L_FILL: // fill projective + case SE_L_FILL: // fill projective // C.r_Pass ("null", "copy", false, FALSE, FALSE); C.r_Pass("stub_notransform", "copy_msaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0] ); @@ -163,7 +163,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_omni_unshadowed_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -181,7 +181,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_omni_normal_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -208,7 +208,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_omni_normal_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -235,7 +235,7 @@ void CBlender_accum_point_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_omni_transluent_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); diff --git a/src/Layers/xrRenderPC_R4/blender_light_spot.cpp b/src/Layers/xrRenderPC_R4/blender_light_spot.cpp index 1736e959f5b..bd90d174e6d 100644 --- a/src/Layers/xrRenderPC_R4/blender_light_spot.cpp +++ b/src/Layers/xrRenderPC_R4/blender_light_spot.cpp @@ -22,14 +22,14 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_L_FILL: // masking + case SE_L_FILL: // masking C.r_Pass("stub_notransform", "copy_nomsaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0]); C.r_dx10Texture("s_base", C.L_textures[0]); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_spot_unshadowed_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -48,7 +48,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_spot_normal_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -76,7 +76,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_spot_fullsize_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -103,7 +103,7 @@ void CBlender_accum_spot::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_spot_fullsize_nomsaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -157,14 +157,14 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case SE_L_FILL: // masking + case SE_L_FILL: // masking C.r_Pass("stub_notransform", "copy_msaa", false, FALSE, FALSE); // C.r_Sampler ("s_base", C.L_textures[0]); C.r_dx10Texture("s_base", C.L_textures[0]); C.r_dx10Sampler("smp_nofilter"); C.r_End(); break; - case SE_L_UNSHADOWED: // unshadowed + case SE_L_UNSHADOWED: // unshadowed C.r_Pass("accum_volume", "accum_spot_unshadowed_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -183,7 +183,7 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_NORMAL: // normal + case SE_L_NORMAL: // normal C.r_Pass("accum_volume", "accum_spot_normal_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -211,7 +211,7 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) C.r_End(); break; - case SE_L_FULLSIZE: // normal-fullsize + case SE_L_FULLSIZE: // normal-fullsize C.r_Pass("accum_volume", "accum_spot_fullsize_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -238,7 +238,7 @@ void CBlender_accum_spot_msaa::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_smap"); C.r_End(); break; - case SE_L_TRANSLUENT: // shadowed + transluency + case SE_L_TRANSLUENT: // shadowed + transluency C.r_Pass("accum_volume", "accum_spot_fullsize_msaa", false, FALSE, FALSE, blend, D3DBLEND_ONE, dest); // C.r_Sampler_rtf ("s_position", r2_RT_P); // C.r_Sampler_rtf ("s_normal", r2_RT_N); @@ -288,7 +288,7 @@ void CBlender_accum_volumetric_msaa::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // masking + case 0: // masking C.r_Pass("accum_volumetric", "accum_volumetric_msaa", false, FALSE, FALSE); C.r_dx10Texture("s_lmap", C.L_textures[0]); diff --git a/src/Layers/xrRenderPC_R4/blender_luminance.cpp b/src/Layers/xrRenderPC_R4/blender_luminance.cpp index a71b9827163..8df93d61f77 100644 --- a/src/Layers/xrRenderPC_R4/blender_luminance.cpp +++ b/src/Layers/xrRenderPC_R4/blender_luminance.cpp @@ -17,21 +17,21 @@ void CBlender_luminance::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // 256x256 => 64x64 + case 0: // 256x256 => 64x64 C.r_Pass("stub_notransform_build", "bloom_luminance_1", false, FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_image", r2_RT_bloom1); C.r_dx10Texture("s_image", r2_RT_bloom1); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // 64x64 => 8x8 + case 1: // 64x64 => 8x8 C.r_Pass("stub_notransform_filter", "bloom_luminance_2", false, FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_image", r2_RT_luminance_t64); C.r_dx10Texture("s_image", r2_RT_luminance_t64); C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 2: // 8x8 => 1x1, blending with old result + case 2: // 8x8 => 1x1, blending with old result C.r_Pass("stub_notransform_filter", "bloom_luminance_3", false, FALSE, FALSE, FALSE); // C.r_Sampler_clf ("s_image", r2_RT_luminance_t8 ); // C.r_Sampler_clf ("s_tonemap", r2_RT_luminance_src ); diff --git a/src/Layers/xrRenderPC_R4/blender_ssao.cpp b/src/Layers/xrRenderPC_R4/blender_ssao.cpp index ade8a021298..db89ae9dab5 100644 --- a/src/Layers/xrRenderPC_R4/blender_ssao.cpp +++ b/src/Layers/xrRenderPC_R4/blender_ssao.cpp @@ -17,9 +17,9 @@ void CBlender_SSAO_noMSAA::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // calculate SSAO + case 0: // calculate SSAO C.r_Pass("combine_1", "ssao_calc_nomsaa", FALSE, FALSE, FALSE); - C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xFF); // stencil should be >= 1 + C.r_Stencil(TRUE, D3DCMP_LESSEQUAL, 0xFF); // stencil should be >= 1 C.r_StencilRef(0x01); C.r_CullMode(D3DCULL_NONE); @@ -35,7 +35,7 @@ void CBlender_SSAO_noMSAA::Compile(CBlender_Compile& C) C.r_dx10Sampler("smp_rtlinear"); C.r_End(); break; - case 1: // depth downsample for HBAO + case 1: // depth downsample for HBAO C.r_Pass("combine_1", "depth_downs", FALSE, FALSE, FALSE); // C.r_Stencil (TRUE, D3DCMP_LESSEQUAL, 0xFF); // stencil should be >= 1 // C.r_StencilRef (0x01); @@ -72,9 +72,9 @@ void CBlender_SSAO_MSAA::Compile(CBlender_Compile& C) switch (C.iElement) { - case 0: // combine + case 0: // combine C.r_Pass("combine_1", "ssao_calc_msaa", FALSE, FALSE, FALSE); - C.r_Stencil(TRUE, D3DCMP_EQUAL, 0x81); // stencil should be >= 1 + C.r_Stencil(TRUE, D3DCMP_EQUAL, 0x81); // stencil should be >= 1 C.r_StencilRef(0x81); C.r_CullMode(D3DCULL_NONE); diff --git a/src/Layers/xrRenderPC_R4/light_GI.cpp b/src/Layers/xrRenderPC_R4/light_GI.cpp index cfa22227aa0..6b0af64b441 100644 --- a/src/Layers/xrRenderPC_R4/light_GI.cpp +++ b/src/Layers/xrRenderPC_R4/light_GI.cpp @@ -44,7 +44,7 @@ void light::gi_generate() LI.D.reflect(dir, TN); LI.E = dot * (1 - R->range / range); if (LI.E < ps_r2_GI_clip) continue; - LI.S = spatial.sector; //. BUG + LI.S = spatial.sector; //. BUG indirect.push_back(LI); } diff --git a/src/Layers/xrRenderPC_R4/light_smapvis.cpp b/src/Layers/xrRenderPC_R4/light_smapvis.cpp index 3635258a55d..378b3059f44 100644 --- a/src/Layers/xrRenderPC_R4/light_smapvis.cpp +++ b/src/Layers/xrRenderPC_R4/light_smapvis.cpp @@ -67,7 +67,7 @@ void smapvis::end() RImplementation.r_dsgraph_insert_static(testQ_V); RImplementation.r_dsgraph_render_graph(0); RImplementation.occq_end(testQ_id); - testQ_frame = Device.dwFrame + 1; // get result on next frame + testQ_frame = Device.dwFrame + 1; // get result on next frame } break; case state_usingTC: @@ -110,9 +110,9 @@ void smapvis::resetoccq() void smapvis::mark() { RImplementation.Stats.ic_culled += invisible.size(); - u32 marker = RImplementation.marker + 1; // we are called befor marker increment + u32 marker = RImplementation.marker + 1; // we are called befor marker increment for (u32 it = 0; it < invisible.size(); it++) - invisible[it]->vis.marker = marker; // this effectively disables processing + invisible[it]->vis.marker = marker; // this effectively disables processing } void smapvis::rfeedback_static(dxRender_Visual* V) diff --git a/src/Layers/xrRenderPC_R4/light_smapvis.h b/src/Layers/xrRenderPC_R4/light_smapvis.h index b73a88b8cea..f9cf2bbd29c 100644 --- a/src/Layers/xrRenderPC_R4/light_smapvis.h +++ b/src/Layers/xrRenderPC_R4/light_smapvis.h @@ -23,10 +23,10 @@ class smapvis : public R_feedback ~smapvis(); void invalidate(); - void begin(); // should be called before 'marker++' and before graph-build + void begin(); // should be called before 'marker++' and before graph-build void end(); void mark(); - void flushoccq(); // should be called when no rendering of light is supposed + void flushoccq(); // should be called when no rendering of light is supposed void resetoccq(); diff --git a/src/Layers/xrRenderPC_R4/light_vis.cpp b/src/Layers/xrRenderPC_R4/light_vis.cpp index df0feab26d9..d192aded1a7 100644 --- a/src/Layers/xrRenderPC_R4/light_vis.cpp +++ b/src/Layers/xrRenderPC_R4/light_vis.cpp @@ -40,7 +40,7 @@ void light::vis_prepare() // skiptest = true; if (skiptest || Device.vCameraPosition.distance_to(spatial.sphere.P) <= (spatial.sphere.R * 1.01f + safe_area)) - { // small error + { // small error vis.visible = true; vis.pending = false; vis.frame2test = frame + ::Random.randI(delay_small_min, delay_small_max); diff --git a/src/Layers/xrRenderPC_R4/r2_R_calculate.cpp b/src/Layers/xrRenderPC_R4/r2_R_calculate.cpp index b08494204e4..7536d904461 100644 --- a/src/Layers/xrRenderPC_R4/r2_R_calculate.cpp +++ b/src/Layers/xrRenderPC_R4/r2_R_calculate.cpp @@ -61,7 +61,7 @@ void CRender::Calculate() ISpatial* spatial = lstRenderables[_it]; spatial->spatial_updatesector(); CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure + if (0 == sector) continue; // disassociated from S/P structure VERIFY(spatial->GetSpatialData().type & STYPE_LIGHTSOURCE); // lightsource diff --git a/src/Layers/xrRenderPC_R4/r2_R_lights.cpp b/src/Layers/xrRenderPC_R4/r2_R_lights.cpp index 621629b62e4..47ce4c74967 100644 --- a/src/Layers/xrRenderPC_R4/r2_R_lights.cpp +++ b/src/Layers/xrRenderPC_R4/r2_R_lights.cpp @@ -4,7 +4,7 @@ IC bool pred_area(light* _1, light* _2) { u32 a0 = _1->X.S.size; u32 a1 = _2->X.S.size; - return a0 > a1; // reverse -> descending + return a0 > a1; // reverse -> descending } void CRender::render_lights(light_Package& LP) @@ -121,9 +121,9 @@ void CRender::render_lights(light_Package& LP) L->X.S.transluent = TRUE; Target->phase_smap_spot_tsh(L); PIX_EVENT(SHADOWED_LIGHTS_RENDER_GRAPH); - r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_graph(1); // normal level, secondary priority PIX_EVENT(SHADOWED_LIGHTS_RENDER_SORTED); - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_sorted(); // strict-sorted geoms } } else diff --git a/src/Layers/xrRenderPC_R4/r2_R_sun.cpp b/src/Layers/xrRenderPC_R4/r2_R_sun.cpp index 6bb7dced838..6c0a3d3688c 100644 --- a/src/Layers/xrRenderPC_R4/r2_R_sun.cpp +++ b/src/Layers/xrRenderPC_R4/r2_R_sun.cpp @@ -6,8 +6,8 @@ #include "r4_R_sun_support.h" const float tweak_COP_initial_offs = 1200.f; -const float tweak_ortho_xform_initial_offs = 1000.f; //. ? -const float tweak_guaranteed_range = 20.f; //. ? +const float tweak_ortho_xform_initial_offs = 1000.f; //. ? +const float tweak_guaranteed_range = 20.f; //. ? // float OLES_SUN_LIMIT_27_01_07 = 180.f ; float OLES_SUN_LIMIT_27_01_07 = 100.f; @@ -154,17 +154,17 @@ Frustum::Frustum(const D3DXMATRIX* matrix) D3DXVECTOR4 column3(matrix->_13, matrix->_23, matrix->_33, matrix->_43); D3DXVECTOR4 planes[6]; - planes[0] = column4 - column1; // left - planes[1] = column4 + column1; // right - planes[2] = column4 - column2; // bottom - planes[3] = column4 + column2; // top - planes[4] = column4 - column3; // near - planes[5] = column4 + column3; // far + planes[0] = column4 - column1; // left + planes[1] = column4 + column1; // right + planes[2] = column4 - column2; // bottom + planes[3] = column4 + column2; // top + planes[4] = column4 - column3; // near + planes[5] = column4 + column3; // far // ignore near & far plane int p; - for (p = 0; p < 6; p++) // normalize the planes + for (p = 0; p < 6; p++) // normalize the planes { float dot = planes[p].x * planes[p].x + planes[p].y * planes[p].y + planes[p].z * planes[p].z; dot = 1.f / _sqrt(dot); @@ -178,7 +178,7 @@ Frustum::Frustum(const D3DXMATRIX* matrix) for (int i = 0; i < 6; i++) nVertexLUT[i] = ((planes[i].x < 0.f) ? 1 : 0) | ((planes[i].y < 0.f) ? 2 : 0) | ((planes[i].z < 0.f) ? 4 : 0); - for (int i = 0; i < 8; i++) // compute extrema + for (int i = 0; i < 8; i++) // compute extrema { const D3DXPLANE& p0 = (i & 1) ? camPlanes[4] : camPlanes[5]; const D3DXPLANE& p1 = (i & 2) ? camPlanes[3] : camPlanes[2]; @@ -210,7 +210,7 @@ struct DumbClipper { CFrustum frustum; xr_vector planes; - BOOL clip(D3DXVECTOR3& p0, D3DXVECTOR3& p1) // returns TRUE if result meaningfull + BOOL clip(D3DXVECTOR3& p0, D3DXVECTOR3& p1) // returns TRUE if result meaningfull { float denum; D3DXVECTOR3 D; @@ -219,7 +219,7 @@ struct DumbClipper D3DXPLANE& P = planes[it]; float cls0 = D3DXPlaneDotCoord(&P, &p0); float cls1 = D3DXPlaneDotCoord(&P, &p1); - if (cls0 > 0 && cls1 > 0) return false; // fully outside + if (cls0 > 0 && cls1 > 0) return false; // fully outside if (cls0 > 0) { // clip p0 @@ -450,12 +450,12 @@ void CRender::render_sun() // get the near and the far plane (points) in eye space. D3DXVECTOR3 frustumPnts[8]; - Frustum eyeFrustum(&m_Projection); // autocomputes all the extrema points + Frustum eyeFrustum(&m_Projection); // autocomputes all the extrema points for (int i = 0; i < 4; i++) { - frustumPnts[i] = eyeFrustum.pntList[(i << 1)]; // far plane - frustumPnts[i + 4] = eyeFrustum.pntList[(i << 1) | 0x1]; // near plane + frustumPnts[i] = eyeFrustum.pntList[(i << 1)]; // far plane + frustumPnts[i + 4] = eyeFrustum.pntList[(i << 1) | 0x1]; // near plane } // we need to transform the eye into the light's post-projective space. @@ -464,10 +464,10 @@ void CRender::render_sun() // this matrix is a variant of "light space" from LSPSMs, with the Y and Z axes permuted D3DXVECTOR3 leftVector, upVector, viewVector; - const D3DXVECTOR3 eyeVector(0.f, 0.f, -1.f); // eye is always -Z in eye space + const D3DXVECTOR3 eyeVector(0.f, 0.f, -1.f); // eye is always -Z in eye space // code copied straight from BuildLSPSMProjectionMatrix - D3DXVec3TransformNormal(&upVector, &m_lightDir, &m_View); // lightDir is defined in eye space, so xform it + D3DXVec3TransformNormal(&upVector, &m_lightDir, &m_View); // lightDir is defined in eye space, so xform it D3DXVec3Cross(&leftVector, &upVector, &eyeVector); D3DXVec3Normalize(&leftVector, &leftVector); D3DXVec3Cross(&viewVector, &upVector, &leftVector); @@ -505,7 +505,7 @@ void CRender::render_sun() float min_z = std::min(depthbounds.x, frustumBox.minPt.z); float max_z = std::max(depthbounds.y, frustumBox.maxPt.z); - if (min_z <= 1.f) //? + if (min_z <= 1.f) //? { D3DXMATRIX lightSpaceTranslate; D3DXMatrixTranslation(&lightSpaceTranslate, 0.f, 0.f, -min_z + 1.f); @@ -579,8 +579,8 @@ void CRender::render_sun() // compute eta. float lambda = frustumAABB2D.maxPt.x - frustumAABB2D.minPt.x; - float delta_proj = m_fTSM_Delta * lambda; // focusPt.x - frustumAABB2D.minPt.x; - const float xi = -0.6f; // - 0.6f; // 80% line + float delta_proj = m_fTSM_Delta * lambda; // focusPt.x - frustumAABB2D.minPt.x; + const float xi = -0.6f; // - 0.6f; // 80% line float eta = (lambda * delta_proj * (1.f + xi)) / (lambda * (1.f - xi) - 2.f * delta_proj); // compute the projection point a distance eta from the top line. this point is on the center line, y=0 @@ -684,8 +684,8 @@ void CRender::render_sun() } for (int e = 0; e < 8; e++) { - pt = wform(x_full_inverse, corners[e]); // world space - pt = wform(xform, pt); // trapezoid space + pt = wform(x_full_inverse, corners[e]); // world space + pt = wform(xform, pt); // trapezoid space b_receivers.modify(pt); } @@ -743,8 +743,8 @@ void CRender::render_sun() if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_FAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } @@ -963,7 +963,7 @@ void CRender::render_sun_near() r_dsgraph_render_subspace(cull_sector, &cull_frustum, cull_xform, cull_COP, TRUE); // Finalize & Cleanup - fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); + fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); // Render shadow-map //. !!! We should clip based on shrinked frustum (again) @@ -981,8 +981,8 @@ void CRender::render_sun_near() if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_NEAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } @@ -1292,7 +1292,7 @@ void CRender::render_sun_cascade(u32 cascade_ind) r_dsgraph_render_subspace(cull_sector, &cull_frustum, cull_xform, cull_COP, TRUE); // Finalize & Cleanup - fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); + fuckingsun->X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); // Render shadow-map //. !!! We should clip based on shrinked frustum (again) @@ -1310,8 +1310,8 @@ void CRender::render_sun_cascade(u32 cascade_ind) if (bSpecial) { fuckingsun->X.D.transluent = TRUE; Target->phase_smap_direct_tsh(fuckingsun, SE_SUN_FAR); - r_dsgraph_render_graph(1); // normal level, secondary priority - r_dsgraph_render_sorted(); // strict-sorted geoms + r_dsgraph_render_graph(1); // normal level, secondary priority + r_dsgraph_render_sorted(); // strict-sorted geoms } } } diff --git a/src/Layers/xrRenderPC_R4/r2_sector_detect.cpp b/src/Layers/xrRenderPC_R4/r2_sector_detect.cpp index 5018f9c9d1b..7491d304c0d 100644 --- a/src/Layers/xrRenderPC_R4/r2_sector_detect.cpp +++ b/src/Layers/xrRenderPC_R4/r2_sector_detect.cpp @@ -15,7 +15,7 @@ int CRender::translateSector(IRender_Sector* pSector) #ifdef DEBUG return (-1); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } IRender_Sector* CRender::detectSector(const Fvector& P) @@ -61,12 +61,12 @@ IRender_Sector* CRender::detectSector(const Fvector& P, Fvector& dir) int ID; if (id1 >= 0) { if (id2 >= 0) - ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found + ID = (range1 <= range2 + EPS) ? id1 : id2; // both was found else - ID = id1; // only id1 found + ID = id1; // only id1 found } else if (id2 >= 0) - ID = id2; // only id2 found + ID = id2; // only id2 found else return 0; diff --git a/src/Layers/xrRenderPC_R4/r2_test_hw.cpp b/src/Layers/xrRenderPC_R4/r2_test_hw.cpp index bc75a04f61c..e44c18abbdf 100644 --- a/src/Layers/xrRenderPC_R4/r2_test_hw.cpp +++ b/src/Layers/xrRenderPC_R4/r2_test_hw.cpp @@ -96,5 +96,5 @@ BOOL xrRender_test_hw() // hr = _HW.m_pAdapter->CheckInterfaceSupport(__uuidof(ID3DDevice), 0); //_HW.DestroyD3D () ; - return TestDX11Present(); // SUCCEEDED(hr); + return TestDX11Present(); // SUCCEEDED(hr); } diff --git a/src/Layers/xrRenderPC_R4/r2_types.h b/src/Layers/xrRenderPC_R4/r2_types.h index 2467a4af3aa..2aeaef0cb1e 100644 --- a/src/Layers/xrRenderPC_R4/r2_types.h +++ b/src/Layers/xrRenderPC_R4/r2_types.h @@ -1,51 +1,51 @@ #pragma once // r3xx code-path (MRT) -#define r2_RT_depth "$user$depth" // MRT -#define r2_RT_MSAAdepth "$user$msaadepth" // MRT -#define r2_RT_P "$user$position" // MRT -#define r2_RT_N "$user$normal" // MRT -#define r2_RT_albedo "$user$albedo" // MRT +#define r2_RT_depth "$user$depth" // MRT +#define r2_RT_MSAAdepth "$user$msaadepth" // MRT +#define r2_RT_P "$user$position" // MRT +#define r2_RT_N "$user$normal" // MRT +#define r2_RT_albedo "$user$albedo" // MRT // other -#define r2_RT_accum "$user$accum" // --- 16 bit fp or 16 bit fx -#define r2_RT_accum_temp "$user$accum_temp" // --- 16 bit fp - only for HW which doesn't feature fp16 blend +#define r2_RT_accum "$user$accum" // --- 16 bit fp or 16 bit fx +#define r2_RT_accum_temp "$user$accum_temp" // --- 16 bit fp - only for HW which doesn't feature fp16 blend -#define r2_T_envs0 "$user$env_s0" // --- -#define r2_T_envs1 "$user$env_s1" // --- +#define r2_T_envs0 "$user$env_s0" // --- +#define r2_T_envs1 "$user$env_s1" // --- #define r2_T_sky0 "$user$sky0" #define r2_T_sky1 "$user$sky1" -#define r2_RT_ssao_temp "$user$ssao_temp" // temporary rt for ssao calculation -#define r2_RT_half_depth "$user$half_depth" // temporary rt for ssao calculation +#define r2_RT_ssao_temp "$user$ssao_temp" // temporary rt for ssao calculation +#define r2_RT_half_depth "$user$half_depth" // temporary rt for ssao calculation -#define r2_RT_generic0 "$user$generic0" // --- -#define r2_RT_generic0_r "$user$generic0_r" // --- -#define r2_RT_generic1 "$user$generic1" // --- -#define r2_RT_generic1_r "$user$generic1_r" // --- -#define r2_RT_generic2 "$user$generic2" // --- // Igor: for volumetric lights -#define r2_RT_generic "$user$generic" // --- +#define r2_RT_generic0 "$user$generic0" // --- +#define r2_RT_generic0_r "$user$generic0_r" // --- +#define r2_RT_generic1 "$user$generic1" // --- +#define r2_RT_generic1_r "$user$generic1_r" // --- +#define r2_RT_generic2 "$user$generic2" // --- // Igor: for volumetric lights +#define r2_RT_generic "$user$generic" // --- -#define r2_RT_bloom1 "$user$bloom1" // --- -#define r2_RT_bloom2 "$user$bloom2" // --- +#define r2_RT_bloom1 "$user$bloom1" // --- +#define r2_RT_bloom2 "$user$bloom2" // --- -#define r2_RT_luminance_t64 "$user$lum_t64" // --- temp -#define r2_RT_luminance_t8 "$user$lum_t8" // --- temp +#define r2_RT_luminance_t64 "$user$lum_t64" // --- temp +#define r2_RT_luminance_t8 "$user$lum_t8" // --- temp -#define r2_RT_luminance_src "$user$tonemap_src" // --- prev-frame-result -#define r2_RT_luminance_cur "$user$tonemap" // --- result -#define r2_RT_luminance_pool "$user$luminance" // --- pool +#define r2_RT_luminance_src "$user$tonemap_src" // --- prev-frame-result +#define r2_RT_luminance_cur "$user$tonemap" // --- result +#define r2_RT_luminance_pool "$user$luminance" // --- pool -#define r2_RT_smap_surf "$user$smap_surf" // --- directional -#define r2_RT_smap_depth "$user$smap_depth" // ---directional +#define r2_RT_smap_surf "$user$smap_surf" // --- directional +#define r2_RT_smap_depth "$user$smap_depth" // ---directional #define r2_RT_smap_depth_minmax "$user$smap_depth_minmax" -#define r2_material "$user$material" // --- -#define r2_ds2_fade "$user$ds2_fade" // --- +#define r2_material "$user$material" // --- +#define r2_ds2_fade "$user$ds2_fade" // --- -#define r2_jitter "$user$jitter_" // --- dither -#define r2_jitter_mipped "$user$jitter_mipped" // --- dither +#define r2_jitter "$user$jitter_" // --- dither +#define r2_jitter_mipped "$user$jitter_mipped" // --- dither #define r2_sunmask "sunmask" #define JITTER(a) r2_jitter #a @@ -56,27 +56,27 @@ const u32 SMAP_adapt_min = 32; const u32 SMAP_adapt_optimal = 768; const u32 SMAP_adapt_max = 1536; -const u32 TEX_material_LdotN = 128; // diffuse, X, almost linear = small res -const u32 TEX_material_LdotH = 256; // specular, Y -const u32 TEX_material_Count = 4; // Number of materials, Z +const u32 TEX_material_LdotN = 128; // diffuse, X, almost linear = small res +const u32 TEX_material_LdotH = 256; // specular, Y +const u32 TEX_material_Count = 4; // Number of materials, Z const u32 TEX_jitter = 64; -const u32 TEX_jitter_count = 5; // for HBAO +const u32 TEX_jitter_count = 5; // for HBAO const u32 BLOOM_size_X = 256; const u32 BLOOM_size_Y = 256; const u32 LUMINANCE_size = 16; // deffer -#define SE_R2_NORMAL_HQ 0 // high quality/detail -#define SE_R2_NORMAL_LQ 1 // low quality -#define SE_R2_SHADOW 2 // shadow generation +#define SE_R2_NORMAL_HQ 0 // high quality/detail +#define SE_R2_NORMAL_LQ 1 // low quality +#define SE_R2_SHADOW 2 // shadow generation // spot #define SE_L_FILL 0 #define SE_L_UNSHADOWED 1 -#define SE_L_NORMAL 2 // typical, scaled -#define SE_L_FULLSIZE 3 // full texture coverage -#define SE_L_TRANSLUENT 4 // with opacity/color mask +#define SE_L_NORMAL 2 // typical, scaled +#define SE_L_FULLSIZE 3 // full texture coverage +#define SE_L_TRANSLUENT 4 // with opacity/color mask // mask #define SE_MASK_SPOT 0 diff --git a/src/Layers/xrRenderPC_R4/r4.cpp b/src/Layers/xrRenderPC_R4/r4.cpp index b6e2a1a8e17..c3b66311822 100644 --- a/src/Layers/xrRenderPC_R4/r4.cpp +++ b/src/Layers/xrRenderPC_R4/r4.cpp @@ -115,7 +115,7 @@ static class cl_alpha_ref : public R_constant_setup } binder_alpha_ref; extern ENGINE_API BOOL r2_sun_static; -extern ENGINE_API BOOL r2_advanced_pp; // advanced post process and effects +extern ENGINE_API BOOL r2_advanced_pp; // advanced post process and effects ////////////////////////////////////////////////////////////////////////// // Just two static storage void CRender::create() @@ -160,7 +160,7 @@ void CRender::create() case 0x19D: case 0x19E: { - disable_nullrt = true; // G80 + disable_nullrt = true; // G80 break; } case 0x400: @@ -172,7 +172,7 @@ void CRender::create() case 0x40E: case 0x40F: { - disable_nullrt = true; // G84 + disable_nullrt = true; // G84 break; } case 0x420: @@ -184,7 +184,7 @@ void CRender::create() case 0x42E: case 0x42F: { - disable_nullrt = true; // G86 + disable_nullrt = true; // G86 break; } } @@ -384,7 +384,7 @@ void CRender::create() m_bMakeAsyncSS = false; - Target = new CRenderTarget(); // Main target + Target = new CRenderTarget(); // Main target Models = new CModelPool(); PSLibrary.OnCreate(); @@ -841,9 +841,9 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons SPS* sps_result = (SPS*)result; #ifdef USE_DX11 _result = HW.pDevice->CreatePixelShader(buffer, buffer_size, 0, &sps_result->ps); -#else // #ifdef USE_DX11 +#else // #ifdef USE_DX11 _result = HW.pDevice->CreatePixelShader(buffer, buffer_size, &sps_result->ps); -#endif // #ifdef USE_DX11 +#endif // #ifdef USE_DX11 if (!SUCCEEDED(_result)) { Log("! PS: ", file_name); Msg("! CreatePixelShader hr == 0x%08x", _result); @@ -877,9 +877,9 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons SVS* svs_result = (SVS*)result; #ifdef USE_DX11 _result = HW.pDevice->CreateVertexShader(buffer, buffer_size, 0, &svs_result->vs); -#else // #ifdef USE_DX11 +#else // #ifdef USE_DX11 _result = HW.pDevice->CreateVertexShader(buffer, buffer_size, &svs_result->vs); -#endif // #ifdef USE_DX11 +#endif // #ifdef USE_DX11 if (!SUCCEEDED(_result)) { Log("! VS: ", file_name); @@ -926,9 +926,9 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons SGS* sgs_result = (SGS*)result; #ifdef USE_DX11 _result = HW.pDevice->CreateGeometryShader(buffer, buffer_size, 0, &sgs_result->gs); -#else // #ifdef USE_DX11 +#else // #ifdef USE_DX11 _result = HW.pDevice->CreateGeometryShader(buffer, buffer_size, &sgs_result->gs); -#endif // #ifdef USE_DX11 +#endif // #ifdef USE_DX11 if (!SUCCEEDED(_result)) { Log("! GS: ", file_name); Msg("! CreateGeometryShaderhr == 0x%08x", _result); @@ -1633,7 +1633,7 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData LPD3DBLOB pShaderBuf = NULL; LPD3DBLOB pErrorBuf = NULL; _result = D3DCompile(pSrcData, SrcDataLen, - "", // NULL, //LPCSTR pFileName, // NVPerfHUD bug workaround. + "", // NULL, //LPCSTR pFileName, // NVPerfHUD bug workaround. defines, &Includer, pFunctionName, pTarget, Flags, 0, &pShaderBuf, &pErrorBuf); if (SUCCEEDED(_result)) { @@ -1687,7 +1687,7 @@ static inline bool match_shader_id( #if 0 strcpy_s ( result, "" ); return false; -#else // #if 1 +#else // #if 1 #ifdef DEBUG LPCSTR temp = ""; bool found = false; @@ -1704,7 +1704,7 @@ static inline bool match_shader_id( xr_strcpy(result, temp); return found; -#else // #ifdef DEBUG +#else // #ifdef DEBUG FS_FileSet::const_iterator i = file_set.begin(); FS_FileSet::const_iterator const e = file_set.end(); for (; i != e; ++i) @@ -1716,6 +1716,6 @@ static inline bool match_shader_id( } return false; -#endif // #ifdef DEBUG -#endif // #if 1 +#endif // #ifdef DEBUG +#endif // #if 1 } \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R4/r4.h b/src/Layers/xrRenderPC_R4/r4.h index 9837554b8b0..cd9e2ed52e7 100644 --- a/src/Layers/xrRenderPC_R4/r4.h +++ b/src/Layers/xrRenderPC_R4/r4.h @@ -30,14 +30,14 @@ class CRender : public D3DXRenderBase public: enum { - PHASE_NORMAL = 0, // E[0] - PHASE_SMAP = 1, // E[1] + PHASE_NORMAL = 0, // E[0] + PHASE_SMAP = 1, // E[1] }; enum { - MSAA_ATEST_NONE = 0x0, // Hi bit - DX10.1 mode - MSAA_ATEST_DX10_0_ATOC = 0x1, // Lo bit - ATOC mode + MSAA_ATEST_NONE = 0x0, // Hi bit - DX10.1 mode + MSAA_ATEST_DX10_0_ATOC = 0x1, // Lo bit - ATOC mode MSAA_ATEST_DX10_1_NATIVE = 0x2, MSAA_ATEST_DX10_1_ATOC = 0x3, }; @@ -69,7 +69,7 @@ class CRender : public D3DXRenderBase u32 mrtmixdepth : 1; u32 fp16_filter : 1; u32 fp16_blend : 1; - u32 albedo_wo : 1; // work-around albedo on less capable HW + u32 albedo_wo : 1; // work-around albedo on less capable HW u32 HW_smap : 1; u32 HW_smap_PCF : 1; u32 HW_smap_FETCH4 : 1; @@ -89,17 +89,17 @@ class CRender : public D3DXRenderBase u32 sunstatic : 1; u32 sjitter : 1; u32 noshadows : 1; - u32 Tshadows : 1; // transluent shadows + u32 Tshadows : 1; // transluent shadows u32 disasm : 1; - u32 advancedpp : 1; // advanced post process (DOF, SSAO, volumetrics, etc.) + u32 advancedpp : 1; // advanced post process (DOF, SSAO, volumetrics, etc.) u32 volumetricfog : 1; - u32 dx10_msaa : 1; // DX10.0 path - u32 dx10_msaa_hybrid : 1; // DX10.0 main path with DX10.1 A-test msaa allowed - u32 dx10_msaa_opt : 1; // DX10.1 path - u32 dx10_gbuffer_opt : 1; // - u32 dx10_sm4_1 : 1; // DX10.1 path - u32 dx10_msaa_alphatest : 2; // A-test mode + u32 dx10_msaa : 1; // DX10.0 path + u32 dx10_msaa_hybrid : 1; // DX10.0 main path with DX10.1 A-test msaa allowed + u32 dx10_msaa_opt : 1; // DX10.1 path + u32 dx10_gbuffer_opt : 1; // + u32 dx10_sm4_1 : 1; // DX10.1 path + u32 dx10_msaa_alphatest : 2; // A-test mode u32 dx10_msaa_samples : 4; u32 dx10_minmax_sm : 2; @@ -167,7 +167,7 @@ class CRender : public D3DXRenderBase CModelPool* Models; CWallmarksEngine* Wallmarks; - CRenderTarget* Target; // Render-target + CRenderTarget* Target; // Render-target CLight_DB Lights; CLight_Compute_XFORM_and_VIS LR; @@ -187,7 +187,7 @@ class CRender : public D3DXRenderBase u32 q_sync_count; bool m_bMakeAsyncSS; - bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. + bool m_bFirstFrameAfterReset; // Determines weather the frame is the first after resetting device. xr_vector m_sun_cascades; private: @@ -200,10 +200,10 @@ class CRender : public D3DXRenderBase void LoadSWIs(CStreamReader* fs); void Load3DFluid(); - BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing + BOOL add_Dynamic(dxRender_Visual* pVisual, u32 planes); // normal processing void add_Static(dxRender_Visual* pVisual, u32 planes); - void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility - void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Dynamic(dxRender_Visual* pVisual); // if detected node's full visibility + void add_leafs_Static(dxRender_Visual* pVisual); // if detected node's full visibility public: IRender_Sector* rimp_detectSector(Fvector& P, Fvector& D); @@ -252,7 +252,7 @@ class CRender : public D3DXRenderBase } IC void apply_lmaterial() { - R_constant* C = &*RCache.get_c(c_sbase); // get sampler + R_constant* C = &*RCache.get_c(c_sbase); // get sampler if (0 == C) return; VERIFY(RC_dest_sampler == C->destination); VERIFY(RC_dx10texture == C->type); @@ -299,9 +299,9 @@ class CRender : public D3DXRenderBase // Main virtual void flush(); virtual void set_Object(IRenderable* O); - virtual void add_Occluder(Fbox2& bb_screenspace); // mask screen region as oclluded - virtual void add_Visual(IRenderVisual* V); // add visual leaf (no culling performed at all) - virtual void add_Geometry(IRenderVisual* V); // add visual(s) (all culling performed) + virtual void add_Occluder(Fbox2& bb_screenspace); // mask screen region as oclluded + virtual void add_Visual(IRenderVisual* V); // add visual leaf (no culling performed at all) + virtual void add_Geometry(IRenderVisual* V); // add visual(s) (all culling performed) // wallmarks virtual void add_StaticWallmark(ref_shader& S, const Fvector& P, float s, CDB::TRI* T, Fvector* V); diff --git a/src/Layers/xrRenderPC_R4/r4_R_rain.cpp b/src/Layers/xrRenderPC_R4/r4_R_rain.cpp index 0c526b0fa6c..ed636b28080 100644 --- a/src/Layers/xrRenderPC_R4/r4_R_rain.cpp +++ b/src/Layers/xrRenderPC_R4/r4_R_rain.cpp @@ -6,7 +6,7 @@ #include "r4_R_sun_support.h" const float tweak_rain_COP_initial_offs = 1200.f; -const float tweak_rain_ortho_xform_initial_offs = 1000.f; //. ? +const float tweak_rain_ortho_xform_initial_offs = 1000.f; //. ? // Defined in r2_R_sun.cpp Fvector3 wform(Fmatrix& m, Fvector3 const& v); @@ -225,7 +225,7 @@ void CRender::render_rain() r_dsgraph_render_subspace(cull_sector, &cull_frustum, cull_xform, cull_COP, FALSE); // Finalize & Cleanup - RainLight.X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); + RainLight.X.D.combine = cull_xform; //*((Fmatrix*)&m_LightViewProj); // Render shadow-map //. !!! We should clip based on shrinked frustum (again) diff --git a/src/Layers/xrRenderPC_R4/r4_R_render.cpp b/src/Layers/xrRenderPC_R4/r4_R_render.cpp index 2e3035ee701..44e67038ea8 100644 --- a/src/Layers/xrRenderPC_R4/r4_R_render.cpp +++ b/src/Layers/xrRenderPC_R4/r4_R_render.cpp @@ -82,7 +82,7 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) ISpatial* spatial = lstRenderables[o_it]; spatial->spatial_updatesector(); CSector* sector = (CSector*)spatial->GetSpatialData().sector; - if (0 == sector) continue; // disassociated from S/P structure + if (0 == sector) continue; // disassociated from S/P structure if (spatial->GetSpatialData().type & STYPE_LIGHTSOURCE) { // lightsource @@ -96,7 +96,7 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) continue; } - if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector + if (PortalTraverser.i_marker != sector->r_marker) continue; // inactive (untouched) sector for (u32 v_it = 0; v_it < sector->r_frustums.size(); v_it++) { CFrustum& view = sector->r_frustums[v_it]; @@ -118,22 +118,22 @@ void CRender::render_main(Fmatrix& m_ViewProjection, bool _fportals) v_orig.accept_frame = v_copy.accept_frame; v_orig.hom_frame = v_copy.hom_frame; v_orig.hom_tested = v_copy.hom_tested; - if (!bVisible) break; // exit loop on frustums + if (!bVisible) break; // exit loop on frustums // Rendering set_Object(renderable); renderable->renderable_Render(); set_Object(0); } - break; // exit loop on frustums + break; // exit loop on frustums } } - if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD + if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD } else { set_Object(0); - if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD + if (g_pGameLevel && (phase == PHASE_NORMAL)) g_hud->Render_Last(); // HUD } } @@ -147,16 +147,16 @@ void CRender::render_menu() // Main Render { - Target->u_setrt(Target->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT - g_pGamePersistent->OnRenderPPUI_main(); // PP-UI + Target->u_setrt(Target->rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + g_pGamePersistent->OnRenderPPUI_main(); // PP-UI } // Distort { FLOAT ColorRGBA[4] = {127.0f / 255.0f, 127.0f / 255.0f, 0.0f, 127.0f / 255.0f}; - Target->u_setrt(Target->rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask + Target->u_setrt(Target->rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask HW.pContext->ClearRenderTargetView(Target->rt_Generic_1->pRT, ColorRGBA); - g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI + g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI } // Actual Display @@ -219,7 +219,7 @@ void CRender::Render() //. VERIFY (g_pGameLevel && g_pGameLevel->pHUD); // Configure - RImplementation.o.distortion = FALSE; // disable distorion + RImplementation.o.distortion = FALSE; // disable distorion Fcolor sun_color = ((light*)Lights.sun_adapted._get())->color; BOOL bSUN = ps_r2_ls_flags.test(R2FLAG_SUN) && (u_diffuse2s(sun_color.r, sun_color.g, sun_color.b) > EPS); if (o.sunstatic) bSUN = FALSE; @@ -242,11 +242,11 @@ void CRender::Render() m_project.build_projection(deg2rad(Device.fFOV /* *Device.fASPECT*/), Device.fASPECT, VIEWPORT_NEAR, z_distance * g_pGamePersistent->Environment().CurrentEnv->far_plane); m_zfill.mul(m_project, Device.mView); - r_pmask(true, false); // enable priority "0" + r_pmask(true, false); // enable priority "0" set_Recorder(NULL); phase = PHASE_SMAP; render_main(m_zfill, false); - r_pmask(true, false); // disable priority "1" + r_pmask(true, false); // disable priority "1" RImplementation.BasicStats.Culling.End(); // flush @@ -286,7 +286,7 @@ void CRender::Render() //******* Main calc - DEFERRER RENDERER // Main calc RImplementation.BasicStats.Culling.Begin(); - r_pmask(true, false, true); // enable priority "0",+ capture wmarks + r_pmask(true, false, true); // enable priority "0",+ capture wmarks if (bSUN) set_Recorder(&main_coarse_structure); else @@ -294,7 +294,7 @@ void CRender::Render() phase = PHASE_NORMAL; render_main(Device.mFullTransform, true); set_Recorder(NULL); - r_pmask(true, false); // disable priority "1" + r_pmask(true, false); // disable priority "1" RImplementation.BasicStats.Culling.End(); BOOL split_the_scene_to_minimize_wait = FALSE; @@ -411,7 +411,7 @@ void CRender::Render() PIX_EVENT(DEFER_WALLMARKS); Target->phase_wallmarks(); g_r = 0; - Wallmarks->Render(); // wallmarks has priority as normal geometry + Wallmarks->Render(); // wallmarks has priority as normal geometry } // Update incremental shadowmap-visibility solver @@ -506,22 +506,22 @@ void CRender::Render() void CRender::render_forward() { VERIFY(0 == mapDistort.size()); - RImplementation.o.distortion = RImplementation.o.distortion_enabled; // enable distorion + RImplementation.o.distortion = RImplementation.o.distortion_enabled; // enable distorion //******* Main render - second order geometry (the one, that doesn't support deffering) //.todo: should be done inside "combine" with estimation of of luminance, tone-mapping, etc. { // level - r_pmask(false, true); // enable priority "1" + r_pmask(false, true); // enable priority "1" phase = PHASE_NORMAL; - render_main(Device.mFullTransform, false); // + render_main(Device.mFullTransform, false); // // Igor: we don't want to render old lods on next frame. mapLOD.clear(); - r_dsgraph_render_graph(1); // normal level, secondary priority - PortalTraverser.fade_render(); // faded-portals - r_dsgraph_render_sorted(); // strict-sorted geoms - g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts + r_dsgraph_render_graph(1); // normal level, secondary priority + PortalTraverser.fade_render(); // faded-portals + r_dsgraph_render_sorted(); // strict-sorted geoms + g_pGamePersistent->Environment().RenderLast(); // rain/thunder-bolts } - RImplementation.o.distortion = FALSE; // disable distorion + RImplementation.o.distortion = FALSE; // disable distorion } diff --git a/src/Layers/xrRenderPC_R4/r4_R_sun_support.h b/src/Layers/xrRenderPC_R4/r4_R_sun_support.h index d1c0e6d75a8..02bc95f76ac 100644 --- a/src/Layers/xrRenderPC_R4/r4_R_sun_support.h +++ b/src/Layers/xrRenderPC_R4/r4_R_sun_support.h @@ -397,7 +397,7 @@ class DumbConvexVolume for (int it = 0; it < int(polys.size()); it++) { _poly& base = polys[it]; - VERIFY(base.classify(cog) < 0); // debug + VERIFY(base.classify(cog) < 0); // debug int marker = (base.planeN.dotproduct(direction) <= 0) ? -1 : 1; @@ -440,8 +440,8 @@ class DumbConvexVolume int pend = int(points.size()); P.points.push_back(E.p0); P.points.push_back(E.p1); - P.points.push_back(pend - 1); // p1 mod - P.points.push_back(pend - 2); // p0 mod + P.points.push_back(pend - 1); // p1 mod + P.points.push_back(pend - 2); // p0 mod if (_debug) T.dbg_addline(points[E.p0], point.mad(points[E.p0], direction, -1000), color_rgba(0, 255, 0, 255)); if (_debug) @@ -467,4 +467,4 @@ class DumbConvexVolume } }; -#endif // r3_R_sun_support_included \ No newline at end of file +#endif // r3_R_sun_support_included \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R4/r4_loader.cpp b/src/Layers/xrRenderPC_R4/r4_loader.cpp index 1097370fe13..1af6011a5f8 100644 --- a/src/Layers/xrRenderPC_R4/r4_loader.cpp +++ b/src/Layers/xrRenderPC_R4/r4_loader.cpp @@ -34,7 +34,7 @@ void CRender::level_Load(IReader* fs) R_ASSERT2(chunk, "Level doesn't builded correctly."); u32 count = chunk->r_u32(); Shaders.resize(count); - for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one + for (u32 i = 0; i < count; i++) // skip first shader as "reserved" one { string512 n_sh, n_tlist; LPCSTR n = LPCSTR(chunk->pointer()); diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp index ed18a89d011..2990e2819c2 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp @@ -275,7 +275,7 @@ CRenderTarget::CRenderTarget() Msg("MSAA samples = %d", SampleCount); if (RImplementation.o.dx10_msaa_opt) Msg("dx10_MSAA_opt = on"); if (RImplementation.o.dx10_gbuffer_opt) Msg("dx10_gbuffer_opt = on"); -#endif // DEBUG +#endif // DEBUG param_blur = 0.f; param_gray = 0.f; param_noise = 0.f; @@ -372,12 +372,12 @@ CRenderTarget::CRenderTarget() if (RImplementation.o.fp16_blend) { // NV40 if (!RImplementation.o.dx10_gbuffer_opt) { - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A16B16G16R16F, SampleCount); // expand to full + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A16B16G16R16F, SampleCount); // expand to full rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F, SampleCount); } else { - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // expand to full + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // expand to full rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F, SampleCount); } } @@ -385,7 +385,7 @@ CRenderTarget::CRenderTarget() { // R4xx, no-fp-blend,-> albedo_wo VERIFY(RImplementation.o.albedo_wo); - rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // normal + rt_Color.create(r2_RT_albedo, w, h, D3DFMT_A8R8G8B8, SampleCount); // normal rt_Accumulator.create(r2_RT_accum, w, h, D3DFMT_A16B16G16R16F, SampleCount); rt_Accumulator_temp.create(r2_RT_accum_temp, w, h, D3DFMT_A16B16G16R16F, SampleCount); } @@ -551,7 +551,7 @@ CRenderTarget::CRenderTarget() // BLOOM { - D3DFORMAT fmt = D3DFMT_A8R8G8B8; //; // D3DFMT_X8R8G8B8 + D3DFORMAT fmt = D3DFMT_A8R8G8B8; //; // D3DFMT_X8R8G8B8 u32 w = BLOOM_size_X, h = BLOOM_size_Y; u32 fvf_build = D3DFVF_XYZRHW | D3DFVF_TEX4 | D3DFVF_TEXCOORDSIZE2(0) | D3DFVF_TEXCOORDSIZE2(1) | D3DFVF_TEXCOORDSIZE2(2) | D3DFVF_TEXCOORDSIZE2(3); @@ -646,7 +646,7 @@ CRenderTarget::CRenderTarget() // COMBINE { static D3DVERTEXELEMENT9 dwDecl[] = { - {0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos+uv + {0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, // pos+uv D3DDECL_END()}; s_combine.create(b_combine, "r2\\combine"); s_combine_volumetric.create("combine_volumetric"); @@ -739,29 +739,29 @@ CRenderTarget::CRenderTarget() switch (slice) { case 0: - { // looks like OrenNayar - fd = powf(ld, 0.75f); // 0.75 + { // looks like OrenNayar + fd = powf(ld, 0.75f); // 0.75 fs = powf(ls, 16.f) * .5f; } break; case 1: - { // looks like Blinn - fd = powf(ld, 0.90f); // 0.90 + { // looks like Blinn + fd = powf(ld, 0.90f); // 0.90 fs = powf(ls, 24.f); } break; case 2: - { // looks like Phong - fd = ld; // 1.0 + { // looks like Phong + fd = ld; // 1.0 fs = powf(ls * 1.01f, 128.f); } break; case 3: - { // looks like Metal + { // looks like Metal float s0 = _abs(1 - _abs(0.05f * _sin(33.f * ld) + ld - ls)); float s1 = _abs(1 - _abs(0.05f * _cos(33.f * ld * ls) + ld - ls)); float s2 = _abs(1 - _abs(ld - ls)); - fd = ld; // 1.0 + fd = ld; // 1.0 fs = powf(_max(_max(s0, s1), s2), 24.f); fs *= powf(ld, 1 / 7.f); } @@ -961,7 +961,7 @@ CRenderTarget::~CRenderTarget() #ifdef DEBUG _SHOW_REF("t_material_surf", t_material_surf); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_material_surf); t_LUM_src->surface_set(NULL); @@ -979,7 +979,7 @@ CRenderTarget::~CRenderTarget() _SHOW_REF("t_envmap_1 - #small", pSurf); //_SHOW_REF("t_envmap_0 - #small",t_envmap_0->pSurface); //_SHOW_REF("t_envmap_1 - #small",t_envmap_1->pSurface); -#endif // DEBUG +#endif // DEBUG t_envmap_0->surface_set(NULL); t_envmap_1->surface_set(NULL); t_envmap_0.destroy(); @@ -994,14 +994,14 @@ CRenderTarget::~CRenderTarget() t_noise[it]->surface_set(NULL); #ifdef DEBUG _SHOW_REF("t_noise_surf[it]", t_noise_surf[it]); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_noise_surf[it]); } t_noise_mipped->surface_set(NULL); #ifdef DEBUG _SHOW_REF("t_noise_surf_mipped", t_noise_surf_mipped); -#endif // DEBUG +#endif // DEBUG _RELEASE(t_noise_surf_mipped); // diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget.h b/src/Layers/xrRenderPC_R4/r4_rendertarget.h index d82136ae437..a96c9940717 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget.h +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget.h @@ -21,8 +21,8 @@ class CRenderTarget : public IRender_Target public: enum eStencilOptimizeMode { - SO_Light = 0, // Default - SO_Combine, // Default + SO_Light = 0, // Default + SO_Combine, // Default }; u32 dwLightMarkerID; @@ -66,44 +66,44 @@ class CRenderTarget : public IRender_Target #endif // MRT-path - ref_rt rt_Depth; // Z-buffer like - initial depth - ref_rt rt_MSAADepth; // z-buffer for MSAA deferred shading - ref_rt rt_Generic_0_r; // MRT generic 0 - ref_rt rt_Generic_1_r; // MRT generic 1 + ref_rt rt_Depth; // Z-buffer like - initial depth + ref_rt rt_MSAADepth; // z-buffer for MSAA deferred shading + ref_rt rt_Generic_0_r; // MRT generic 0 + ref_rt rt_Generic_1_r; // MRT generic 1 ref_rt rt_Generic; - ref_rt rt_Position; // 64bit, fat (x,y,z,?) (eye-space) - ref_rt rt_Normal; // 64bit, fat (x,y,z,hemi) (eye-space) - ref_rt rt_Color; // 64/32bit,fat (r,g,b,specular-gloss) (or decompressed MET-8-8-8-8) + ref_rt rt_Position; // 64bit, fat (x,y,z,?) (eye-space) + ref_rt rt_Normal; // 64bit, fat (x,y,z,hemi) (eye-space) + ref_rt rt_Color; // 64/32bit,fat (r,g,b,specular-gloss) (or decompressed MET-8-8-8-8) // - ref_rt rt_Accumulator; // 64bit (r,g,b,specular) - ref_rt rt_Accumulator_temp; // only for HW which doesn't feature fp16 blend - ref_rt rt_Generic_0; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. - ref_rt rt_Generic_1; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Accumulator; // 64bit (r,g,b,specular) + ref_rt rt_Accumulator_temp; // only for HW which doesn't feature fp16 blend + ref_rt rt_Generic_0; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Generic_1; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. // Igor: for volumetric lights - ref_rt rt_Generic_2; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. - ref_rt rt_Bloom_1; // 32bit, dim/4 (r,g,b,?) - ref_rt rt_Bloom_2; // 32bit, dim/4 (r,g,b,?) - ref_rt rt_LUM_64; // 64bit, 64x64, log-average in all components - ref_rt rt_LUM_8; // 64bit, 8x8, log-average in all components + ref_rt rt_Generic_2; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + ref_rt rt_Bloom_1; // 32bit, dim/4 (r,g,b,?) + ref_rt rt_Bloom_2; // 32bit, dim/4 (r,g,b,?) + ref_rt rt_LUM_64; // 64bit, 64x64, log-average in all components + ref_rt rt_LUM_8; // 64bit, 8x8, log-average in all components - ref_rt rt_LUM_pool[CHWCaps::MAX_GPUS * 2]; // 1xfp32,1x1, exp-result -> scaler - ref_texture t_LUM_src; // source - ref_texture t_LUM_dest; // destination & usage for current frame + ref_rt rt_LUM_pool[CHWCaps::MAX_GPUS * 2]; // 1xfp32,1x1, exp-result -> scaler + ref_texture t_LUM_src; // source + ref_texture t_LUM_dest; // destination & usage for current frame // env - ref_texture t_envmap_0; // env-0 - ref_texture t_envmap_1; // env-1 + ref_texture t_envmap_0; // env-0 + ref_texture t_envmap_1; // env-1 // smap - ref_rt rt_smap_surf; // 32bit, color - ref_rt rt_smap_depth; // 24(32) bit, depth - ref_rt rt_smap_depth_minmax; // is used for min/max sm - // TODO: DX10: CHeck if we need old-style SMAP - // IDirect3DSurface9* rt_smap_ZB; // + ref_rt rt_smap_surf; // 32bit, color + ref_rt rt_smap_depth; // 24(32) bit, depth + ref_rt rt_smap_depth_minmax; // is used for min/max sm + // TODO: DX10: CHeck if we need old-style SMAP + // IDirect3DSurface9* rt_smap_ZB; // // Igor: for async screenshots - ID3DTexture2D* t_ss_async; // 32bit (r,g,b,a) is situated in the system memory + ID3DTexture2D* t_ss_async; // 32bit (r,g,b,a) is situated in the system memory // Textures ID3DTexture3D* t_material_surf; @@ -143,7 +143,7 @@ class CRenderTarget : public IRender_Target // DX10 Rain ref_shader s_rain; - ref_shader s_rain_msaa[8]; // up to 8 shaders for DX10.0 support + ref_shader s_rain_msaa[8]; // up to 8 shaders for DX10.0 support ref_shader s_accum_direct_volumetric_msaa[8]; ref_shader s_accum_mask_msaa[8]; ref_shader s_accum_direct_msaa[8]; @@ -185,7 +185,7 @@ class CRenderTarget : public IRender_Target // Combine ref_geom g_combine; - ref_geom g_combine_VP; // xy=p,zw=tc + ref_geom g_combine_VP; // xy=p,zw=tc ref_geom g_combine_2UV; ref_geom g_combine_cuboid; ref_geom g_aa_blur; @@ -283,7 +283,7 @@ class CRenderTarget : public IRender_Target bool need_to_render_sunshafts(); bool use_minmax_sm_this_frame(); - BOOL enable_scissor(light* L); // true if intersects near plane + BOOL enable_scissor(light* L); // true if intersects near plane void enable_dbt_bounds(light* L); void disable_aniso(); diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_direct.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_direct.cpp index 723e8ead26b..c848ef9208c 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_direct.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_direct.cpp @@ -52,8 +52,8 @@ void CRenderTarget::accum_direct(u32 sub_phase) // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); PIX_EVENT(SE_SUN_NEAR_sub_phase); - if (SE_SUN_NEAR == sub_phase) //. - // if( 0 ) + if (SE_SUN_NEAR == sub_phase) //. + // if( 0 ) { // Fill vertex buffer FVF::TL* pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); @@ -72,7 +72,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -92,7 +92,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) // per sample rendering if (RImplementation.o.dx10_msaa_opt) { - RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -102,7 +102,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { - RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -123,7 +123,7 @@ void CRenderTarget::accum_direct(u32 sub_phase) d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? PIX_EVENT(Perform_lighting); @@ -359,8 +359,8 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); PIX_EVENT(SE_SUN_NEAR_sub_phase); - if (SE_SUN_NEAR == sub_phase) //. - // if( 0 ) + if (SE_SUN_NEAR == sub_phase) //. + // if( 0 ) { // Fill vertex buffer FVF::TL* pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); @@ -379,7 +379,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -399,7 +399,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& // per sample rendering if (RImplementation.o.dx10_msaa_opt) { - RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -409,7 +409,7 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { - RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker RCache.set_CullMode(CULL_NONE); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); @@ -430,14 +430,14 @@ void CRenderTarget::accum_direct_cascade(u32 sub_phase, Fmatrix& xform, Fmatrix& d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? PIX_EVENT(Perform_lighting); // Perform lighting { phase_accumulator(); - RCache.set_CullMode(CULL_CCW); //****************************************************************** + RCache.set_CullMode(CULL_CCW); //****************************************************************** RCache.set_ColorWriteEnable(); // texture adjustment matrix @@ -757,7 +757,7 @@ void CRenderTarget::accum_direct_blend() RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0xff, 0x00); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -812,7 +812,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) // Perform masking (only once - on the first/near phase) RCache.set_CullMode(CULL_NONE); - if (SE_SUN_NEAR == sub_phase) //. + if (SE_SUN_NEAR == sub_phase) //. { // For sun-filter - clear to zero // CHK_DX (HW.pDevice->Clear ( 0L, NULL, D3DCLEAR_TARGET, 0, 1.0f, 0L)); @@ -836,7 +836,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) float intensity = 0.3f * fuckingsun->color.r + 0.48f * fuckingsun->color.g + 0.22f * fuckingsun->color.b; Fvector dir = L_dir; dir.normalize().mul(-_sqrt(intensity + EPS)); - RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_DIRECT]); // masker RCache.set_c("Ldynamic_dir", dir.x, dir.y, dir.z, 0); // if (stencil>=1 && aref_pass) stencil = light_id @@ -856,7 +856,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) // per sample if (RImplementation.o.dx10_msaa_opt) { - RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[0]->E[SE_MASK_DIRECT]); // masker RCache.set_Stencil(TRUE, D3DCMP_LESS, dwLightMarkerID, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); RCache.set_CullMode(CULL_NONE); @@ -866,7 +866,7 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { - RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker + RCache.set_Element(s_accum_mask_msaa[i]->E[SE_MASK_DIRECT]); // masker RCache.set_Stencil(TRUE, D3DCMP_LESS, dwLightMarkerID, 0x81, 0x7f, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE, D3DSTENCILOP_KEEP); RCache.set_CullMode(CULL_NONE); @@ -887,14 +887,14 @@ void CRenderTarget::accum_direct_f(u32 sub_phase) d_Z = center_pt.z; // nv-stencil recompression - if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? + if (RImplementation.o.nvstencil && (SE_SUN_NEAR == sub_phase)) u_stencil_optimize(); //. driver bug? // Perform lighting { if (!RImplementation.o.dx10_msaa) - u_setrt(rt_Generic_0, NULL, NULL, HW.pBaseZB); // enshure RT setup + u_setrt(rt_Generic_0, NULL, NULL, HW.pBaseZB); // enshure RT setup else - u_setrt(rt_Generic_0_r, NULL, NULL, RImplementation.Target->rt_MSAADepth->pZRT); // enshure RT setup + u_setrt(rt_Generic_0_r, NULL, NULL, RImplementation.Target->rt_MSAADepth->pZRT); // enshure RT setup RCache.set_CullMode(CULL_NONE); RCache.set_ColorWriteEnable(); @@ -1020,7 +1020,7 @@ void CRenderTarget::accum_direct_lum() Fvector2 p0, p1; p0.set(.5f / _w, .5f / _h); p1.set((_w + .5f) / _w, (_h + .5f) / _h); - float d_Z = EPS_S; //, d_W = 1.f; + float d_Z = EPS_S; //, d_W = 1.f; // Common constants (light-related) Fvector L_dir, L_clr; @@ -1241,7 +1241,7 @@ void CRenderTarget::accum_direct_volumetric(u32 sub_phase, const u32 Offset, con else { extern float OLES_SUN_LIMIT_27_01_07; - zMin = 0; /////***************************************************************************************** + zMin = 0; /////***************************************************************************************** zMax = OLES_SUN_LIMIT_27_01_07; } diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_omnipart_geom.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_omnipart_geom.cpp index 7581e6dee98..7430d272f4c 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_omnipart_geom.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_omnipart_geom.cpp @@ -44,10 +44,10 @@ void CRenderTarget::accum_omnip_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_omnip_ib", g_accum_omnip_ib); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_omnip_ib); #ifdef DEBUG _SHOW_REF("g_accum_omnip_vb", g_accum_omnip_vb); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_omnip_vb); } diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point.cpp index d8341d72f9c..618729f1945 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point.cpp @@ -34,7 +34,7 @@ void CRenderTarget::accum_point(light* L) // *** similar to "Carmack's reverse", but assumes convex, non intersecting objects, // *** thus can cope without stencil clear with 127 lights // *** in practice, 'cause we "clear" it back to 0x1 it usually allows us to > 200 lights :) - RCache.set_Element(s_accum_mask->E[SE_MASK_POINT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_POINT]); // masker // Done in blender! // RCache.set_ColorWriteEnable (FALSE); @@ -64,7 +64,7 @@ void CRenderTarget::accum_point(light* L) // ***************************** Minimize overdraw ************************************* // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back /* if (bIntersect) RCache.set_CullMode (CULL_CW); // back else RCache.set_CullMode (CULL_CCW); // front @@ -108,13 +108,13 @@ void CRenderTarget::accum_point(light* L) // HW.pDevice->SetSamplerState ( 0, D3DSAMP_MIPMAPLODBIAS, FOURCC_GET4 ); // } - RCache.set_CullMode(CULL_CW); // back - // Render if (light_id <= stencil && z-pass) + RCache.set_CullMode(CULL_CW); // back + // Render if (light_id <= stencil && z-pass) if (!RImplementation.o.dx10_msaa) { RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID, 0xff, 0x00); @@ -127,7 +127,7 @@ void CRenderTarget::accum_point(light* L) RCache.set_CullMode(D3DCULL_CW); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -162,7 +162,7 @@ void CRenderTarget::accum_point(light* L) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, dwLightMarkerID, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_CullMode(D3DCULL_CW); @@ -175,7 +175,7 @@ void CRenderTarget::accum_point(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point_geom.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point_geom.cpp index bd57f3dbed3..650fa9876ce 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point_geom.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_point_geom.cpp @@ -325,10 +325,10 @@ void CRenderTarget::accum_point_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_point_ib", g_accum_point_ib); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_point_ib); #ifdef DEBUG _SHOW_REF("g_accum_point_vb", g_accum_point_vb); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_point_vb); } diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_reflected.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_reflected.cpp index 8ed8fa037f2..d636047bba3 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_reflected.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_reflected.cpp @@ -10,7 +10,7 @@ void CRenderTarget::accum_reflected(light* L) ref_shader shader = s_accum_reflected; ref_shader* shader_msaa = s_accum_reflected_msaa; - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); L->xform_calc(); RCache.set_xform_world(L->m_xform); RCache.set_xform_view(Device.mView); @@ -22,9 +22,9 @@ void CRenderTarget::accum_reflected(light* L) // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); if (bIntersect) - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back else - RCache.set_CullMode(CULL_CCW); // front + RCache.set_CullMode(CULL_CCW); // front // 2D texgen (texture adjustment matrix) Fmatrix m_Texgen; @@ -61,7 +61,7 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x01, 0x81, 0x00); @@ -72,21 +72,21 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Shader(shader_msaa[0]); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x81, 0x81, 0x00); if (bIntersect) - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back else - RCache.set_CullMode(CULL_CCW); // front + RCache.set_CullMode(CULL_CCW); // front draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { RCache.set_Shader(shader_msaa[i]); RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x81, 0x81, 0x00); if (bIntersect) - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back else - RCache.set_CullMode(CULL_CCW); // front + RCache.set_CullMode(CULL_CCW); // front StateManager.SetSampleMask(u32(1) << i); draw_volume(L); } @@ -109,7 +109,7 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); draw_volume(L); } - else // checked holger + else // checked holger { // per pixel RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x01, 0x81, 0x00); @@ -120,7 +120,7 @@ void CRenderTarget::accum_reflected(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, 0x81, 0x81, 0x00); draw_volume(L); } - else // checked holger + else // checked holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot.cpp index a616c4579a2..1fbc7d34717 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot.cpp @@ -30,7 +30,7 @@ void CRenderTarget::accum_spot(light* L) } } - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); { // setup xform L->xform_calc(); @@ -45,7 +45,7 @@ void CRenderTarget::accum_spot(light* L) // *** in practice, 'cause we "clear" it back to 0x1 it usually allows us to > 200 lights :) // Done in blender! // RCache.set_ColorWriteEnable (FALSE); - RCache.set_Element(s_accum_mask->E[SE_MASK_SPOT]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_SPOT]); // masker // backfaces: if (stencil>=1 && zfail) stencil = light_id RCache.set_CullMode(CULL_CW); @@ -74,7 +74,7 @@ void CRenderTarget::accum_spot(light* L) // ***************************** Minimize overdraw ************************************* // Select shader (front or back-faces), *** back, if intersect near plane RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back // 2D texgens Fmatrix m_Texgen; @@ -147,7 +147,7 @@ void CRenderTarget::accum_spot(light* L) } RCache.set_Element(shader->E[_id]); - RCache.set_CullMode(CULL_CW); // back + RCache.set_CullMode(CULL_CW); // back // Constants float att_R = L->range * .95f; @@ -185,7 +185,7 @@ void CRenderTarget::accum_spot(light* L) RCache.set_CullMode(D3DCULL_CW); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -221,7 +221,7 @@ void CRenderTarget::accum_spot(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { // per pixel RCache.set_Element(s_accum_mask->E[SE_MASK_ACCUM_VOL]); @@ -233,7 +233,7 @@ void CRenderTarget::accum_spot(light* L) RCache.set_Stencil(TRUE, D3DCMP_EQUAL, dwLightMarkerID | 0x80, 0xff, 0x00); draw_volume(L); } - else // checked Holger + else // checked Holger { for (u32 i = 0; i < RImplementation.o.dx10_msaa_samples; ++i) { @@ -275,7 +275,7 @@ void CRenderTarget::accum_volumetric(light* L) // *** assume accumulator setted up *** // ***************************** Mask by stencil ************************************* - BOOL bIntersect = FALSE; // enable_scissor(L); + BOOL bIntersect = FALSE; // enable_scissor(L); { // setup xform L->xform_calc(); @@ -288,7 +288,7 @@ void CRenderTarget::accum_volumetric(light* L) } RCache.set_ColorWriteEnable(); - RCache.set_CullMode(CULL_NONE); // back + RCache.set_CullMode(CULL_NONE); // back // 2D texgens Fmatrix m_Texgen; diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot_geom.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot_geom.cpp index b680c19765a..184d18ff758 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot_geom.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_accum_spot_geom.cpp @@ -103,11 +103,11 @@ void CRenderTarget::accum_spot_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_spot_ib", g_accum_spot_ib); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_spot_ib); #ifdef DEBUG _SHOW_REF("g_accum_spot_vb", g_accum_spot_vb); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_spot_vb); } @@ -208,10 +208,10 @@ void CRenderTarget::accum_volumetric_geom_destroy() { #ifdef DEBUG _SHOW_REF("g_accum_volumetric_ib", g_accum_volumetric_ib); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_volumetric_ib); #ifdef DEBUG _SHOW_REF("g_accum_volumetric_vb", g_accum_volumetric_vb); -#endif // DEBUG +#endif // DEBUG _RELEASE(g_accum_volumetric_vb); } \ No newline at end of file diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_draw_rain.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_draw_rain.cpp index 6a5934aa6f0..52782be0d5e 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_draw_rain.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_draw_rain.cpp @@ -46,7 +46,7 @@ void CRenderTarget::draw_rain(light& RainSetup) // setup // float intensity = 0.3f*fuckingsun->color.r + 0.48f*fuckingsun->color.g + - //0.22f*fuckingsun->color.b; + // 0.22f*fuckingsun->color.b; // Fvector dir = L_dir; // dir.normalize().mul (- _sqrt(intensity+EPS)); // RCache.set_Element (s_accum_mask->E[SE_MASK_DIRECT]); // masker diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_enable_scissor.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_enable_scissor.cpp index 13b8c891878..cb94ec816c0 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_enable_scissor.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_enable_scissor.cpp @@ -61,7 +61,7 @@ void CRenderTarget::u_DBT_disable() // HW.pDevice->SetRenderState(D3DRS_ADAPTIVETESS_X,0); } -BOOL CRenderTarget::enable_scissor(light* L) // true if intersects near plane +BOOL CRenderTarget::enable_scissor(light* L) // true if intersects near plane { // Msg ("%d: %x type(%d), pos(%f,%f,%f)",Device.dwFrame,u32(L),u32(L->flags.type),VPUSH(L->position)); diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_bloom.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_bloom.cpp index 6f4e7bb9968..672246b6959 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_bloom.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_bloom.cpp @@ -30,10 +30,10 @@ struct v_filter // Gauss filtering coeffs // Samples: 0-central, -1, -2,..., -7, 1, 2,... 7 // -void CalcGauss_k7(Fvector4& w0, // weight - Fvector4& w1, // weight - float r = 3.3f, // gaussian radius - float s_out = 1.f // resulting magnitude +void CalcGauss_k7(Fvector4& w0, // weight + Fvector4& w1, // weight + float r = 3.3f, // gaussian radius + float s_out = 1.f // resulting magnitude ) { float W[8]; @@ -41,21 +41,21 @@ void CalcGauss_k7(Fvector4& w0, // weight // calculate float mag = 0; for (int i = -7; i <= 0; i++) - W[-i] = expf(-float(i * i) / (2 * r * r)); // weight + W[-i] = expf(-float(i * i) / (2 * r * r)); // weight for (int i = 0; i < 8; i++) - mag += i ? 2 * W[i] : W[i]; // symmetrical weight + mag += i ? 2 * W[i] : W[i]; // symmetrical weight for (int i = 0; i < 8; i++) W[i] = s_out * W[i] / mag; // W[0]=0, W[7]=-7 - w0.set(W[1], W[2], W[3], W[4]); // -1, -2, -3, -4 - w1.set(W[5], W[6], W[7], W[0]); // -5, -6, -7, 0 + w0.set(W[1], W[2], W[3], W[4]); // -1, -2, -3, -4 + w1.set(W[5], W[6], W[7], W[0]); // -5, -6, -7, 0 } -void CalcGauss_wave(Fvector4& w0, // weight - Fvector4& w1, // weight - float r_base = 3.3f, // gaussian radius - float r_detail = 1.0f, // gaussian radius - float s_out = 1.f // resulting magnitude +void CalcGauss_wave(Fvector4& w0, // weight + Fvector4& w1, // weight + float r_base = 3.3f, // gaussian radius + float r_detail = 1.0f, // gaussian radius + float s_out = 1.f // resulting magnitude ) { Fvector4 t0, t1; @@ -71,7 +71,7 @@ void CRenderTarget::phase_bloom() u32 Offset; // Targets - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all // RImplementation.rmNormal(); // Clear - don't clear - it's stupid here :) @@ -132,8 +132,8 @@ void CRenderTarget::phase_bloom() RCache.Vertex.Unlock(4, g_bloom_build->vb_stride); // Perform combine (all scalers must account for 4 samples + final diffuse multiply); - float s = ps_r2_ls_bloom_threshold; // scale - f_bloom_factor = .9f * f_bloom_factor + .1f * ps_r2_ls_bloom_speed * Device.fTimeDelta; // speed + float s = ps_r2_ls_bloom_threshold; // scale + f_bloom_factor = .9f * f_bloom_factor + .1f * ps_r2_ls_bloom_speed * Device.fTimeDelta; // speed if (!RImplementation.o.dx10_msaa) RCache.set_Element(s_bloom->E[0]); else @@ -186,12 +186,12 @@ void CRenderTarget::phase_bloom() RCache.set_Geometry(g_bloom_build); // P0 - u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[3]); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); // P1 - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[4]); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } @@ -205,14 +205,14 @@ void CRenderTarget::phase_bloom() Fvector2 two = {2.f / _w, 2.f / _h}; Fvector2 one = {1.f / _w, 1.f / _h}; Fvector2 half = {.5f / _w, .5f / _h}; - Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center - Fvector4 a_1 = {a_0.x - one.x - half.x, half.y, half.y, a_0.w + one.x + half.x}; // -1,+1i - Fvector4 a_2 = {a_1.x - two.x, half.y, half.y, a_1.w + two.x}; // -2,+2i - Fvector4 a_3 = {a_2.x - two.x, half.y, half.y, a_2.w + two.x}; // -3,+3i - Fvector4 a_4 = {a_3.x - two.x, half.y, half.y, a_3.w + two.x}; // -4,+4i - Fvector4 a_5 = {a_4.x - two.x, half.y, half.y, a_4.w + two.x}; // -5,+5i - Fvector4 a_6 = {a_5.x - two.x, half.y, half.y, a_5.w + two.x}; // -6,+6i - Fvector4 a_7 = {a_6.x - two.x, half.y, half.y, a_6.w + two.x}; // -7,+7i + Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center + Fvector4 a_1 = {a_0.x - one.x - half.x, half.y, half.y, a_0.w + one.x + half.x}; // -1,+1i + Fvector4 a_2 = {a_1.x - two.x, half.y, half.y, a_1.w + two.x}; // -2,+2i + Fvector4 a_3 = {a_2.x - two.x, half.y, half.y, a_2.w + two.x}; // -3,+3i + Fvector4 a_4 = {a_3.x - two.x, half.y, half.y, a_3.w + two.x}; // -4,+4i + Fvector4 a_5 = {a_4.x - two.x, half.y, half.y, a_4.w + two.x}; // -5,+5i + Fvector4 a_6 = {a_5.x - two.x, half.y, half.y, a_5.w + two.x}; // -6,+6i + Fvector4 a_7 = {a_6.x - two.x, half.y, half.y, a_6.w + two.x}; // -7,+7i // Fill vertex buffer v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); @@ -270,7 +270,7 @@ void CRenderTarget::phase_bloom() Fvector4 w0, w1; float kernel = ps_r2_ls_bloom_kernel_g; CalcGauss_wave(w0, w1, kernel, kernel / 3.f, ps_r2_ls_bloom_kernel_scale); - u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_2, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[1]); RCache.set_ca("weight", 0, w0); RCache.set_ca("weight", 1, w1); @@ -285,14 +285,14 @@ void CRenderTarget::phase_bloom() Fvector2 two = {2.f / _w, 2.f / _h}; Fvector2 one = {1.f / _w, 1.f / _h}; Fvector2 half = {.5f / _w, .5f / _h}; - Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center - Fvector4 a_1 = {half.x, a_0.y - one.y - half.y, half.y + one.y + a_0.z, half.x}; // -1,+1i - Fvector4 a_2 = {half.x, a_1.y - two.y, two.y + a_1.z, half.x}; // -2,+2i - Fvector4 a_3 = {half.x, a_2.y - two.y, two.y + a_2.z, half.x}; // -3,+3i - Fvector4 a_4 = {half.x, a_3.y - two.y, two.y + a_3.z, half.x}; // -4,+4i - Fvector4 a_5 = {half.x, a_4.y - two.y, two.y + a_4.z, half.x}; // -5,+5i - Fvector4 a_6 = {half.x, a_5.y - two.y, two.y + a_5.z, half.x}; // -6,+6i - Fvector4 a_7 = {half.x, a_6.y - two.y, two.y + a_6.z, half.x}; // -7,+7i + Fvector4 a_0 = {half.x, half.y, half.y, half.x}; // center + Fvector4 a_1 = {half.x, a_0.y - one.y - half.y, half.y + one.y + a_0.z, half.x}; // -1,+1i + Fvector4 a_2 = {half.x, a_1.y - two.y, two.y + a_1.z, half.x}; // -2,+2i + Fvector4 a_3 = {half.x, a_2.y - two.y, two.y + a_2.z, half.x}; // -3,+3i + Fvector4 a_4 = {half.x, a_3.y - two.y, two.y + a_3.z, half.x}; // -4,+4i + Fvector4 a_5 = {half.x, a_4.y - two.y, two.y + a_4.z, half.x}; // -5,+5i + Fvector4 a_6 = {half.x, a_5.y - two.y, two.y + a_5.z, half.x}; // -6,+6i + Fvector4 a_7 = {half.x, a_6.y - two.y, two.y + a_6.z, half.x}; // -7,+7i // Fill vertex buffer v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); @@ -350,7 +350,7 @@ void CRenderTarget::phase_bloom() Fvector4 w0, w1; float kernel = ps_r2_ls_bloom_kernel_g * float(Device.dwHeight) / float(Device.dwWidth); CalcGauss_wave(w0, w1, kernel, kernel / 3.f, ps_r2_ls_bloom_kernel_scale); - u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all + u_setrt(rt_Bloom_1, NULL, NULL, NULL); // No need for ZBuffer at all RCache.set_Element(s_bloom->E[2]); RCache.set_ca("weight", 0, w0); RCache.set_ca("weight", 1, w1); diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp index a9515cb0aa1..14ed312fcae 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp @@ -103,7 +103,7 @@ void CRenderTarget::phase_combine() // // if (RImplementation.o.bug) { - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 if (RImplementation.o.nvstencil) { u_stencil_optimize(CRenderTarget::SO_Combine); RCache.set_ColorWriteEnable(); @@ -139,7 +139,7 @@ void CRenderTarget::phase_combine() ambclr.mul(ps_r2_sun_lumscale_amb); //. Fvector4 envclr = { envdesc.sky_color.x*2+EPS, envdesc.sky_color.y*2+EPS, - //envdesc.sky_color.z*2+EPS, envdesc.weight }; + // envdesc.sky_color.z*2+EPS, envdesc.weight }; Fvector4 envclr = {envdesc.hemi_color.x * 2 + EPS, envdesc.hemi_color.y * 2 + EPS, envdesc.hemi_color.z * 2 + EPS, envdesc.weight}; @@ -266,16 +266,16 @@ void CRenderTarget::phase_combine() { PIX_EVENT(Forward_rendering); if (!RImplementation.o.dx10_msaa) - u_setrt(rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Generic_0, 0, 0, HW.pBaseZB); // LDR RT else - u_setrt(rt_Generic_0_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // LDR RT + u_setrt(rt_Generic_0_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // LDR RT RCache.set_CullMode(CULL_CCW); RCache.set_Stencil(FALSE); RCache.set_ColorWriteEnable(); // TODO: DX10: CHeck this! // g_pGamePersistent->Environment().RenderClouds (); RImplementation.render_forward(); - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_main(); // PP-UI } // Igor: for volumetric lights @@ -294,26 +294,26 @@ void CRenderTarget::phase_combine() } // for msaa we need a resolved color buffer - Holger - phase_bloom(); // HDR RT invalidated here + phase_bloom(); // HDR RT invalidated here // RImplementation.rmNormal(); // u_setrt(rt_Generic_1,0,0,HW.pBaseZB); // Distortion filter - BOOL bDistort = RImplementation.o.distortion_enabled; // This can be modified + BOOL bDistort = RImplementation.o.distortion_enabled; // This can be modified { if ((0 == RImplementation.mapDistort.size()) && !_menu_pp) bDistort = FALSE; if (bDistort) { PIX_EVENT(render_distort_objects); FLOAT ColorRGBA[4] = {127.0f / 255.0f, 127.0f / 255.0f, 0.0f, 127.0f / 255.0f}; if (!RImplementation.o.dx10_msaa) { - u_setrt(rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask + u_setrt(rt_Generic_1, 0, 0, HW.pBaseZB); // Now RT is a distortion mask HW.pContext->ClearRenderTargetView(rt_Generic_1->pRT, ColorRGBA); } else { u_setrt( - rt_Generic_1_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // Now RT is a distortion mask + rt_Generic_1_r, 0, 0, RImplementation.Target->rt_MSAADepth->pZRT); // Now RT is a distortion mask HW.pContext->ClearRenderTargetView(rt_Generic_1_r->pRT, ColorRGBA); } RCache.set_CullMode(CULL_CCW); @@ -321,7 +321,7 @@ void CRenderTarget::phase_combine() RCache.set_ColorWriteEnable(); // CHK_DX(HW.pDevice->Clear ( 0L, NULL, D3DCLEAR_TARGET, color_rgba(127,127,0,127), 1.0f, 0L)); RImplementation.r_dsgraph_render_distort(); - if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI + if (g_pGamePersistent) g_pGamePersistent->OnRenderPPUI_PP(); // PP-UI } } @@ -346,14 +346,14 @@ void CRenderTarget::phase_combine() // Combine everything + perform AA if (RImplementation.o.dx10_msaa) { if (PP_Complex) - u_setrt(rt_Generic, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Generic, 0, 0, HW.pBaseZB); // LDR RT else u_setrt(Device.dwWidth, Device.dwHeight, HW.pBaseRT, NULL, NULL, HW.pBaseZB); } else { if (PP_Complex) - u_setrt(rt_Color, 0, 0, HW.pBaseZB); // LDR RT + u_setrt(rt_Color, 0, 0, HW.pBaseZB); // LDR RT else u_setrt(Device.dwWidth, Device.dwHeight, HW.pBaseRT, NULL, NULL, HW.pBaseZB); } @@ -431,16 +431,16 @@ void CRenderTarget::phase_combine() // Draw COLOR if (!RImplementation.o.dx10_msaa) { if (ps_r2_ls_flags.test(R2FLAG_AA)) - RCache.set_Element(s_combine->E[bDistort ? 3 : 1]); // look at blender_combine.cpp + RCache.set_Element(s_combine->E[bDistort ? 3 : 1]); // look at blender_combine.cpp else - RCache.set_Element(s_combine->E[bDistort ? 4 : 2]); // look at blender_combine.cpp + RCache.set_Element(s_combine->E[bDistort ? 4 : 2]); // look at blender_combine.cpp } else { if (ps_r2_ls_flags.test(R2FLAG_AA)) - RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 3 : 1]); // look at blender_combine.cpp + RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 3 : 1]); // look at blender_combine.cpp else - RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 4 : 2]); // look at blender_combine.cpp + RCache.set_Element(s_combine_msaa[0]->E[bDistort ? 4 : 2]); // look at blender_combine.cpp } RCache.set_c("e_barrier", ps_r2_aa_barier.x, ps_r2_aa_barier.y, ps_r2_aa_barier.z, 0); RCache.set_c("e_weights", ps_r2_aa_weight.x, ps_r2_aa_weight.y, ps_r2_aa_weight.z, 0); @@ -460,7 +460,7 @@ void CRenderTarget::phase_combine() RCache.set_Stencil(FALSE); // if FP16-BLEND !not! supported - draw flares here, overwise they are already in the bloom target - /* if (!RImplementation.o.fp16_blend)*/ g_pGamePersistent->Environment().RenderFlares(); // lens-flares + /* if (!RImplementation.o.fp16_blend)*/ g_pGamePersistent->Environment().RenderFlares(); // lens-flares // PP-if required if (PP_Complex) { diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_luminance.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_luminance.cpp index f389ecdd5b0..ac288a99d13 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_luminance.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_luminance.cpp @@ -37,8 +37,8 @@ void CRenderTarget::phase_luminance() float ts = 64; float _w = float(BLOOM_size_X); float _h = float(BLOOM_size_Y); - Fvector2 one = {2.f / _w, 2.f / _h}; // two, infact - Fvector2 half = {1.f / _w, 1.f / _h}; // one, infact + Fvector2 one = {2.f / _w, 2.f / _h}; // two, infact + Fvector2 half = {1.f / _w, 1.f / _h}; // one, infact Fvector2 a_0 = {half.x + 0, half.y + 0}; Fvector2 a_1 = {half.x + one.x, half.y + 0}; Fvector2 a_2 = {half.x + 0, half.y + one.y}; @@ -90,8 +90,8 @@ void CRenderTarget::phase_luminance() Fvector2 a[16], b[16]; for (int k = 0; k < 16; k++) { - int _x = (k * 2 + 1) % 8; // 1,3,5,7 - int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... + int _x = (k * 2 + 1) % 8; // 1,3,5,7 + int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... a[k].set(_x, _y).div(_src); b[k].set(a[k]).add(1); } @@ -100,19 +100,19 @@ void CRenderTarget::phase_luminance() v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); pv->p.set(eps, float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down + pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down pv++; pv->p.set(eps, eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up + pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up pv++; pv->p.set(float(_ts + eps), float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down + pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down pv++; pv->p.set(float(_ts + eps), eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up + pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up pv++; RCache.Vertex.Unlock(4, g_bloom_filter->vb_stride); RCache.set_Element(s_luminance->E[1]); @@ -131,8 +131,8 @@ void CRenderTarget::phase_luminance() Fvector2 a[16], b[16]; for (int k = 0; k < 16; k++) { - int _x = (k * 2 + 1) % 8; // 1,3,5,7 - int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... + int _x = (k * 2 + 1) % 8; // 1,3,5,7 + int _y = ((k / 4) * 2 + 1); // 1,1,1,1 ~ 3,3,3,3 ~...etc... a[k].set(_x, _y).div(_src); b[k].set(a[k]).add(1); } @@ -141,19 +141,19 @@ void CRenderTarget::phase_luminance() v_filter* pv = (v_filter*)RCache.Vertex.Lock(4, g_bloom_filter->vb_stride, Offset); pv->p.set(eps, float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down + pv->uv[t].set(a[t].x, b[t].y, b[t + 8].y, a[t + 8].x); // xy/yx - left+down pv++; pv->p.set(eps, eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up + pv->uv[t].set(a[t].x, a[t].y, a[t + 8].y, a[t + 8].x); // xy/yx - left+up pv++; pv->p.set(float(_ts + eps), float(_ts + eps), eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down + pv->uv[t].set(b[t].x, b[t].y, b[t + 8].y, b[t + 8].x); // xy/yx - right+down pv++; pv->p.set(float(_ts + eps), eps, eps, 1.f); for (int t = 0; t < 8; t++) - pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up + pv->uv[t].set(b[t].x, a[t].y, a[t + 8].y, b[t + 8].x); // xy/yx - right+up pv++; RCache.Vertex.Unlock(4, g_bloom_filter->vb_stride); diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_scene.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_scene.cpp index e2f59c1efa2..9360b2b4124 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_scene.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_scene.cpp @@ -116,9 +116,9 @@ void CRenderTarget::phase_scene_end() else u_setrt(rt_Color, 0, 0, rt_MSAADepth->pZRT); RCache.set_CullMode(CULL_NONE); - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 if (RImplementation.o.nvstencil) u_stencil_optimize(CRenderTarget::SO_Combine); - RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 + RCache.set_Stencil(TRUE, D3DCMP_LESSEQUAL, 0x01, 0xff, 0x00); // stencil should be >= 1 RCache.set_ColorWriteEnable(); // common calc for quad-rendering @@ -144,7 +144,7 @@ void CRenderTarget::phase_scene_end() RCache.Vertex.Unlock(4, g_combine->vb_stride); // if (stencil>=1 && aref_pass) stencil = light_id - RCache.set_Element(s_accum_mask->E[SE_MASK_ALBEDO]); // masker + RCache.set_Element(s_accum_mask->E[SE_MASK_ALBEDO]); // masker RCache.set_Geometry(g_combine); RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); } diff --git a/src/plugins/Max/Export/BoneDef.cpp b/src/plugins/Max/Export/BoneDef.cpp index 4e6e4f9b7ff..6f0a66d047f 100644 --- a/src/plugins/Max/Export/BoneDef.cpp +++ b/src/plugins/Max/Export/BoneDef.cpp @@ -37,12 +37,12 @@ BOOL CBoneDef::SetInitTM(IPhysiqueExport* pExport, const Matrix3& matMesh) if (bErr) tmp.IdentityMatrix(); } - if (1) { //! bErr){ + if (1) { //! bErr){ Helper::ConvertMatrix(tmp, matInit); matOffset.invert(matInit); // S matMesh // pBone->matOffset = matMesh * Inverse(pBone->matInit); } - return 1; //! bErr; + return 1; //! bErr; } diff --git a/src/plugins/Max/Export/EditMeshExportMAX.cpp b/src/plugins/Max/Export/EditMeshExportMAX.cpp index adb49108539..9a95b3b596a 100644 --- a/src/plugins/Max/Export/EditMeshExportMAX.cpp +++ b/src/plugins/Max/Export/EditMeshExportMAX.cpp @@ -257,7 +257,7 @@ bool CEditableMesh::Convert(CExporter* E) } if (bResult) { RecomputeBBox(); - OptimizeMesh(true); // false); + OptimizeMesh(true); // false); RebuildVMaps(); } return bResult; diff --git a/src/plugins/Max/Export/ExportKeys.cpp b/src/plugins/Max/Export/ExportKeys.cpp index 0658d14bffa..c0332451ca7 100644 --- a/src/plugins/Max/Export/ExportKeys.cpp +++ b/src/plugins/Max/Export/ExportKeys.cpp @@ -21,7 +21,7 @@ class SceneEntry TSTR name; INode *node, *tnode; Object* obj; - int type; // See above + int type; // See above int id; SceneEntry* next; SceneEntry(INode* n, Object* o, int t); @@ -138,7 +138,7 @@ int SceneEnumProc::callback(INode* node) if (obj->ClassID() == Class_ID(LOOKAT_CAM_CLASS_ID, 0)) Append(node, obj, OBTYPE_CAMERA); break; } - return TREE_CONTINUE; // Keep on enumeratin'! + return TREE_CONTINUE; // Keep on enumeratin'! } void SceneEnumProc::Append(INode* node, Object* obj, int type) diff --git a/src/plugins/Max/Export/FS2.H b/src/plugins/Max/Export/FS2.H index 478abc61a65..989d7449975 100644 --- a/src/plugins/Max/Export/FS2.H +++ b/src/plugins/Max/Export/FS2.H @@ -99,7 +99,7 @@ public: { w_u32(type); chunk_pos.push(tell()); - w_u32(0); // the place for 'size' + w_u32(0); // the place for 'size' } IC void close_chunk() { @@ -116,7 +116,7 @@ public: { w_u32(type); subchunk_pos.push((u16)tell()); - w_u16(0); // the place for 'size' + w_u16(0); // the place for 'size' } IC void close_subchunk() { @@ -210,9 +210,9 @@ public: IC void w_layer(u16 number, LPCSTR name) { open_chunk(ID_LAYR); - w_u16(number); // num + w_u16(number); // num w_u16(0); - w_float(0); // pivot + w_float(0); // pivot w_float(0); w_float(0); w_stringZ(name); diff --git a/src/plugins/Max/Export/MeshExpPlugin.cpp b/src/plugins/Max/Export/MeshExpPlugin.cpp index 0f9fe7fc979..a135edd3e2a 100644 --- a/src/plugins/Max/Export/MeshExpPlugin.cpp +++ b/src/plugins/Max/Export/MeshExpPlugin.cpp @@ -35,7 +35,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, ULONG fdwReason, LPVOID lpvReserved) controlsInit = TRUE; Core._initialize("S.T.A.L.K.E.R.Plugin", LogCallback(ELogCallback, nullptr), FALSE, nullptr, true); FS._initialize(CLocatorAPI::flScanAppRoot, NULL, "xray_path.ltx"); - FPU::m64r(); // нужно чтобы макс не сбрасывал контрольки в 0 + FPU::m64r(); // нужно чтобы макс не сбрасывал контрольки в 0 InitCustomControls(hInstance); InitCommonControls(); ELog.Msg(mtInformation, "S.T.A.L.K.E.R. Object Export (ver. %d.%02d)", EXPORTER_VERSION, EXPORTER_BUILD); diff --git a/src/plugins/Max/Export/MeshExpUtility.rc b/src/plugins/Max/Export/MeshExpUtility.rc index cb4939c9479..2fc5ff19cfc 100644 --- a/src/plugins/Max/Export/MeshExpUtility.rc +++ b/src/plugins/Max/Export/MeshExpUtility.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT #pragma code_page(1251) -#endif //_WIN32 +#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -57,7 +57,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_CONSOLE, DIALOG BEGIN RIGHTMARGIN, 310 BOTTOMMARGIN, 163 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -75,9 +75,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 3 TEXTINCLUDE BEGIN "\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // Russian resources +#endif // Russian resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// @@ -88,7 +88,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT #pragma code_page(1251) -#endif //_WIN32 +#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -111,9 +111,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_SHADERDIALOG, DIALOG BEGIN LEFTMARGIN, 3 RIGHTMARGIN, 224 TOPMARGIN, 4 BOTTOMMARGIN, 92 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // Ukrainian resources +#endif // Ukrainian resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -123,4 +123,4 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT // ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/plugins/Max/Export/Stdafx.h b/src/plugins/Max/Export/Stdafx.h index c2af33e8b0e..6efba9b4807 100644 --- a/src/plugins/Max/Export/Stdafx.h +++ b/src/plugins/Max/Export/Stdafx.h @@ -54,8 +54,8 @@ using std::string; // CS SDK #ifdef _MAX_EXPORT -#include "phyexp.h" #include "bipexp.h" +#include "phyexp.h" #endif #include diff --git a/src/plugins/Max/Material/DllEntry.cpp b/src/plugins/Max/Material/DllEntry.cpp index 1cf6451355e..04ac63ff49a 100644 --- a/src/plugins/Max/Material/DllEntry.cpp +++ b/src/plugins/Max/Material/DllEntry.cpp @@ -11,15 +11,15 @@ int controlsInit = FALSE; BOOL WINAPI DllMain(HINSTANCE hinstDLL, ULONG fdwReason, LPVOID lpvReserved) { - hInstance = hinstDLL; // Hang on to this DLL's instance handle. + hInstance = hinstDLL; // Hang on to this DLL's instance handle. if (!controlsInit) { controlsInit = TRUE; Core._initialize("S.T.A.L.K.E.R.Plugin", 0, FALSE, nullptr, true); FS._initialize(CLocatorAPI::flScanAppRoot, NULL, "xray_path.ltx"); - FPU::m64r(); // нужно чтобы макс не сбрасывал контрольки в 0 - InitCustomControls(hInstance); // Initialize MAX's custom controls - InitCommonControls(); // Initialize Win95 controls + FPU::m64r(); // нужно чтобы макс не сбрасывал контрольки в 0 + InitCustomControls(hInstance); // Initialize MAX's custom controls + InitCommonControls(); // Initialize Win95 controls // load shader list XRayMtl::LoadXRayShaderList(); } diff --git a/src/plugins/Max/Material/GameMaterial.rc b/src/plugins/Max/Material/GameMaterial.rc index 9a061cfcd3a..3c0a4d57ffd 100644 --- a/src/plugins/Max/Material/GameMaterial.rc +++ b/src/plugins/Max/Material/GameMaterial.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 +#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -187,7 +187,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_DMTL_XRAY, DIALOG BEGIN VERTGUIDE, 8 VERTGUIDE, 206 BOTTOMMARGIN, 46 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -205,7 +205,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 3 TEXTINCLUDE BEGIN "\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -294,7 +294,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US STRINGTABLE BEGIN IDS_DS_AMOUNT "Amount" IDS_JW_GAMEMTLTYPE "Game Mtl Type" IDS_JW_GAMEMTLBYNAME "Game Mtl Name" END -#endif // English (U.S.) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -304,4 +304,4 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/plugins/Max/Material/Stdafx.h b/src/plugins/Max/Material/Stdafx.h index 78d3dfbc666..b9f5d1b767e 100644 --- a/src/plugins/Max/Material/Stdafx.h +++ b/src/plugins/Max/Material/Stdafx.h @@ -53,8 +53,8 @@ using std::string; // CS SDK #ifdef _MAX_EXPORT -#include "phyexp.h" #include "bipexp.h" +#include "phyexp.h" #endif #include diff --git a/src/plugins/Maya/Export/ExportDefines.h b/src/plugins/Maya/Export/ExportDefines.h index 6f07c11b88b..06c743a4dd3 100644 --- a/src/plugins/Maya/Export/ExportDefines.h +++ b/src/plugins/Maya/Export/ExportDefines.h @@ -9,10 +9,10 @@ class CSurface; // typedef struct SXREdgeInfo { - int polyIds[2]; // Id's of polygons that reference edge - int vertId; // The second vertex of this edge - struct SXREdgeInfo* next; // Pointer to next edge - bool smooth; // Is this edge smooth + int polyIds[2]; // Id's of polygons that reference edge + int vertId; // The second vertex of this edge + struct SXREdgeInfo* next; // Pointer to next edge + bool smooth; // Is this edge smooth } * SXREdgeInfoPtr; struct SXRShaderData diff --git a/src/plugins/Maya/Export/MayaExport.cpp b/src/plugins/Maya/Export/MayaExport.cpp index af0fb6a3381..e06ae833c7c 100644 --- a/src/plugins/Maya/Export/MayaExport.cpp +++ b/src/plugins/Maya/Export/MayaExport.cpp @@ -96,10 +96,10 @@ MStatus CXRayObjectExport::ExportAll(CEditableObject* O) if (status != MS::kSuccess) { fprintf(stderr, "Error: exporting geom failed.\n"); freeLookupTables(); - destroyEdgeTable(); // Free up the edge table + destroyEdgeTable(); // Free up the edge table return MS::kFailure; } - destroyEdgeTable(); // Free up the edge table + destroyEdgeTable(); // Free up the edge table } } } @@ -187,10 +187,10 @@ MStatus CXRayObjectExport::ExportSelected(CEditableObject* O) if (status != MS::kSuccess) { fprintf(stderr, "Error: exporting geom failed, check your selection.\n"); freeLookupTables(); - destroyEdgeTable(); // Free up the edge table + destroyEdgeTable(); // Free up the edge table return MS::kFailure; } - destroyEdgeTable(); // Free up the edge table + destroyEdgeTable(); // Free up the edge table } } } @@ -229,7 +229,7 @@ int AppendUV(st_VMap*& VM, Fvector2& _uv) } MStatus CXRayObjectExport::set_smoth_flags( - u32& flags, const MIntArray& tri_vert_indeces) // const MFnMesh &fnMesh, const MItMeshPolygon &meshPoly, + u32& flags, const MIntArray& tri_vert_indeces) // const MFnMesh &fnMesh, const MItMeshPolygon &meshPoly, { return t_set_smoth_flags(*this, flags, tri_vert_indeces); } @@ -405,8 +405,8 @@ MStatus CXRayObjectExport::ExportPart(CEditableObject* O, MDagPath& mdagPath, MO for (int i = 0; i < cTri; i++) { // for each triangle, first get the triangle data - rgpt.clear(); // triangle vertices - rgint.clear(); // triangle vertex indices + rgpt.clear(); // triangle vertices + rgint.clear(); // triangle vertex indices // triangles that come from object are retrieved in world space status = meshPoly.getTriangle(i, rgpt, rgint, MSpace::kWorld); diff --git a/src/plugins/Maya/Export/SmdBone.h b/src/plugins/Maya/Export/SmdBone.h index d999c228e4b..737036a045d 100644 --- a/src/plugins/Maya/Export/SmdBone.h +++ b/src/plugins/Maya/Export/SmdBone.h @@ -11,7 +11,7 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 #include #include @@ -32,4 +32,4 @@ class SmdBone virtual ~SmdBone(); }; -#endif // !defined(AFX_SMDBONE_H__27691F7E_CEE4_422A_9FDE_7972C7C13819__INCLUDED_) +#endif // !defined(AFX_SMDBONE_H__27691F7E_CEE4_422A_9FDE_7972C7C13819__INCLUDED_) diff --git a/src/plugins/Maya/Export/SmdMaya.cpp b/src/plugins/Maya/Export/SmdMaya.cpp index d5f67a76d3d..891edc2cb81 100644 --- a/src/plugins/Maya/Export/SmdMaya.cpp +++ b/src/plugins/Maya/Export/SmdMaya.cpp @@ -85,7 +85,7 @@ void* CXRaySkinExport::creator_skin_motion() MStatus CXRaySkinExport::writer(const MFileObject& file, const MString& options, FileAccessMode mode) { MStatus status; - clearData(); // initialize all data structures + clearData(); // initialize all data structures bool b_ogf = false; MString locator_name; @@ -94,7 +94,7 @@ MStatus CXRaySkinExport::writer(const MFileObject& file, const MString& options, // Start parsing. MStringArray optionList; MStringArray theOption; - options.split(';', optionList); // break out all the options. + options.split(';', optionList); // break out all the options. length = optionList.length(); for (i = 0; i < length; ++i) @@ -162,8 +162,8 @@ MStatus CXRaySkinExport::writer(const MFileObject& file, const MString& options, aptTypePtr = obj.apiTypeStr(); //------------------------------- MStatus stat; - MFnDagNode dagNode(DagPath); // path to the visible mesh - MFnMesh meshFn(DagPath, &stat); // this is the visible mesh + MFnDagNode dagNode(DagPath); // path to the visible mesh + MFnMesh meshFn(DagPath, &stat); // this is the visible mesh MObject inObj; MObject dataObj1; @@ -452,7 +452,7 @@ MStatus CXRaySkinExport::exportObject(LPCSTR fn, bool b_ogf) BONE->SetWMap((*boneIt)->name); BONE->SetName((*boneIt)->name); BONE->SetParentName( - (*boneIt)->parentId > -1 ? m_boneList[(*boneIt)->parentId]->name : 0); //. need convert space + (*boneIt)->parentId > -1 ? m_boneList[(*boneIt)->parentId]->name : 0); //. need convert space BONE->SetRestParams(length, offset, rotate); } @@ -1260,7 +1260,7 @@ MStatus CXRaySkinExport::parseBoneGeometry() MItMeshPolygon piter(path, MObject::kNullObj, &status); parsePolySet(piter, rgShaders, rgFaces, (*itBones)->id); - destroyEdgeTable(); // Free up the edge table + destroyEdgeTable(); // Free up the edge table } } } @@ -1307,7 +1307,7 @@ MStatus CXRaySkinExport::parseShape(MDagPath path) MItMeshPolygon piter(path, MObject::kNullObj, &status); parsePolySet(piter, rgShaders, rgFaces); - destroyEdgeTable(); // Free up the edge table + destroyEdgeTable(); // Free up the edge table return MStatus::kSuccess; } @@ -1345,7 +1345,7 @@ void CXRaySkinExport::CreateSMGFacegroups(MFnMesh& fnMesh) // Now create a polyId->smoothingGroup table // int numPolygons = fnMesh.numPolygons(); - polySmoothingGroups = xr_alloc(numPolygons); //(int*)malloc( sizeof(int) * numPolygons ); + polySmoothingGroups = xr_alloc(numPolygons); //(int*)malloc( sizeof(int) * numPolygons ); for (int i = 0; i < numPolygons; i++) { polySmoothingGroups[i] = NO_SMOOTHING_GROUP; @@ -1448,7 +1448,7 @@ bool CXRaySkinExport::smoothingAlgorithm(int polyId, MFnMesh& fnMesh) // halfEdge polygons get a smoothing group of // NO_SMOOTHING_GROUP which is equivalent to "s off" // - if (NO_SMOOTHING_GROUP != elem->polyIds[1]) { // Edge not a border + if (NO_SMOOTHING_GROUP != elem->polyIds[1]) { // Edge not a border // We are starting a new smoothing group // @@ -1472,7 +1472,7 @@ bool CXRaySkinExport::smoothingAlgorithm(int polyId, MFnMesh& fnMesh) smoothEdgeFound = true; } else - { // Hard edge so ignore this polygon + { // Hard edge so ignore this polygon continue; } @@ -1512,7 +1512,7 @@ void CXRaySkinExport::addEdgeInfo(int v1, int v2, bool smooth) SXREdgeInfoPtr element = NULL; if (NULL == edgeTable[v1]) { - edgeTable[v1] = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); + edgeTable[v1] = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); element = edgeTable[v1]; } else @@ -1522,7 +1522,7 @@ void CXRaySkinExport::addEdgeInfo(int v1, int v2, bool smooth) { element = element->next; } - element->next = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); + element->next = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); element = element->next; } diff --git a/src/plugins/Maya/Export/SmdMaya.h b/src/plugins/Maya/Export/SmdMaya.h index 463a36c3038..f0500664d61 100644 --- a/src/plugins/Maya/Export/SmdMaya.h +++ b/src/plugins/Maya/Export/SmdMaya.h @@ -42,17 +42,17 @@ class CXRaySkinExport : public MPxFileTranslator private: // these functions are all used to iterate across geometry, filling data structures MStatus gotoBindPose(void); - MStatus getBones(void); // loads geometry from scene - MStatus getBoneData(const MMatrix& locator); // loads bone position per animation frame - MStatus setUpBoneMap(MObject* pSkinObject); // creates data structure to store data + MStatus getBones(void); // loads geometry from scene + MStatus getBoneData(const MMatrix& locator); // loads bone position per animation frame + MStatus setUpBoneMap(MObject* pSkinObject); // creates data structure to store data void parseMesh(MObject& mesh, MDagPath path); MStatus parseBoneGeometry(); MStatus parseShape(MDagPath path); MStatus parsePolySet(MItMeshPolygon& meshPoly, MObjectArray& rgShaders, MIntArray texMap, int weight); MStatus CalculateTriangleVertex( int vt, MVector& pt, float& u, float& v, WBVec& weights, MItMeshPolygon& meshPoly, PtLookupMap& ptMap); - void clearData(void); // call inbetween function calls - // MStatus GetShaderFileName (MString &filename, MObject &set); + void clearData(void); // call inbetween function calls + // MStatus GetShaderFileName (MString &filename, MObject &set); int AppendVertex(MPoint pt, float u, float v, const WBVec& wb); // Edge lookup methods @@ -87,17 +87,17 @@ class CXRaySkinExport : public MPxFileTranslator SmdBoneVec m_boneList; SmdTriVec m_triList; SmdVertVec m_vertList; - MDagPath m_skinPath; // path to the mesh we discover - MDagPathArray m_rgInfs; // array of paths to the bones we discover + MDagPath m_skinPath; // path to the mesh we discover + MDagPathArray m_rgInfs; // array of paths to the bones we discover - VWBVec* m_rgWeights; // for each vertex, store index of influence joint - MString m_strFilename; // filename for file + VWBVec* m_rgWeights; // for each vertex, store index of influence joint + MString m_strFilename; // filename for file // options used to drive export behavior - bool m_bReferenceFile; // true for a reference file, false for an animation file - bool m_fSkinCluster; // true if we should only export the cluster named by "m_strSkinCluster" + bool m_bReferenceFile; // true for a reference file, false for an animation file + bool m_fSkinCluster; // true if we should only export the cluster named by "m_strSkinCluster" MString - m_strSkinCluster; // name of skin cluster selected by user to be exported. if empty, use first cluster in list + m_strSkinCluster; // name of skin cluster selected by user to be exported. if empty, use first cluster in list }; -#endif // SmdMayaH \ No newline at end of file +#endif // SmdMayaH \ No newline at end of file diff --git a/src/plugins/Maya/Export/Stdafx.h b/src/plugins/Maya/Export/Stdafx.h index 767462d3811..68228d3ddf9 100644 --- a/src/plugins/Maya/Export/Stdafx.h +++ b/src/plugins/Maya/Export/Stdafx.h @@ -106,8 +106,8 @@ typedef TMsgDlgBtn TMsgDlgButtons[mbHelp]; #pragma warning(push) #pragma warning(disable : 4995) #include -#include #include +#include #pragma warning(pop) #include diff --git a/src/plugins/Maya/Export/camera_exporter.cpp b/src/plugins/Maya/Export/camera_exporter.cpp index 142d4d4f174..84d78eeb51f 100644 --- a/src/plugins/Maya/Export/camera_exporter.cpp +++ b/src/plugins/Maya/Export/camera_exporter.cpp @@ -113,7 +113,7 @@ MStatus CXRayCameraExport::ExportCamera(const MFileObject& file) tmTemp.setUnit(MTime::uiUnit()); tmTemp2.setUnit(MTime::uiUnit()); tmQuant.setUnit(MTime::uiUnit()); - tmQuant = 5.0; // 10.0; //3 time in sec. temporary + tmQuant = 5.0; // 10.0; //3 time in sec. temporary COMotion M; int frms = (int)(endFrame - startFrame).as(MTime::uiUnit()); diff --git a/src/plugins/Maya/Export/camera_exporter.h b/src/plugins/Maya/Export/camera_exporter.h index 0c8d46ae4a0..bae35f5f1ba 100644 --- a/src/plugins/Maya/Export/camera_exporter.h +++ b/src/plugins/Maya/Export/camera_exporter.h @@ -21,4 +21,4 @@ class CXRayCameraExport : public MPxFileTranslator MStatus ExportCamera(const MFileObject& file); }; -#endif // CAMERA_EXPORTER_H_INCLUDED \ No newline at end of file +#endif // CAMERA_EXPORTER_H_INCLUDED \ No newline at end of file diff --git a/src/plugins/Maya/Export/maTranslator.cpp b/src/plugins/Maya/Export/maTranslator.cpp index a5aec60cbc6..5ed40534484 100644 --- a/src/plugins/Maya/Export/maTranslator.cpp +++ b/src/plugins/Maya/Export/maTranslator.cpp @@ -34,7 +34,7 @@ MStatus CXRayObjectExport::writer(const MFileObject& file, const MString& option // Start parsing. MStringArray optionList; MStringArray theOption; - options.split(';', optionList); // break out all the options. + options.split(';', optionList); // break out all the options. length = optionList.length(); for (i = 0; i < length; ++i) @@ -355,7 +355,7 @@ bool CXRayObjectExport::initializeSetsAndLookupTables(bool exportAll) } if (transformNodeNameArray.length() > 0) { - objectGroupsTablePtr = xr_alloc(objectCount); // (bool**) malloc( sizeof(bool*)*objectCount ); + objectGroupsTablePtr = xr_alloc(objectCount); // (bool**) malloc( sizeof(bool*)*objectCount ); length = transformNodeNameArray.length(); for (i = 0; i < objectCount; i++) { @@ -378,8 +378,8 @@ bool CXRayObjectExport::initializeSetsAndLookupTables(bool exportAll) // Create the vertex/polygon look-up tables. // if (objectCount > 0) { - vertexTablePtr = xr_alloc(objectCount); //(bool**) malloc( sizeof(bool*)*objectCount ); - polygonTablePtr = xr_alloc(objectCount); //(bool**) malloc( sizeof(bool*)*objectCount ); + vertexTablePtr = xr_alloc(objectCount); //(bool**) malloc( sizeof(bool*)*objectCount ); + polygonTablePtr = xr_alloc(objectCount); //(bool**) malloc( sizeof(bool*)*objectCount ); for (i = 0; i < objectCount; i++) { @@ -541,12 +541,12 @@ bool CXRayObjectExport::initializeSetsAndLookupTables(bool exportAll) break; } } - } // end of piter.next() loop - } // end of condition if (object.hasFn(MFn::kMesh)) - } // end of else condifion if (!component.isNull()) - } // end of memberList.getDagPath(m,object,component) - } // end of memberList loop - } // end of for-loop for sets + } // end of piter.next() loop + } // end of condition if (object.hasFn(MFn::kMesh)) + } // end of else condifion if (!component.isNull()) + } // end of memberList.getDagPath(m,object,component) + } // end of memberList loop + } // end of for-loop for sets // Go through all of the group members and mark in the // lookup-table, the group that each shape belongs to. @@ -699,7 +699,7 @@ void CXRayObjectExport::CreateSmoothingGroups(MFnMesh& fnMesh) // Now create a polyId->smoothingGroup table // int numPolygons = fnMesh.numPolygons(); - polySmoothingGroups = xr_alloc(numPolygons); //(int*)malloc( sizeof(int) * numPolygons ); + polySmoothingGroups = xr_alloc(numPolygons); //(int*)malloc( sizeof(int) * numPolygons ); for (int i = 0; i < numPolygons; i++) { polySmoothingGroups[i] = NO_SMOOTHING_GROUP; @@ -789,7 +789,7 @@ bool CXRayObjectExport::smoothingAlgorithm(int polyId, MFnMesh& fnMesh) // halfEdge polygons get a smoothing group of // NO_SMOOTHING_GROUP which is equivalent to "s off" // - if (NO_SMOOTHING_GROUP != elem->polyIds[1]) { // Edge not a border + if (NO_SMOOTHING_GROUP != elem->polyIds[1]) { // Edge not a border // We are starting a new smoothing group // @@ -813,7 +813,7 @@ bool CXRayObjectExport::smoothingAlgorithm(int polyId, MFnMesh& fnMesh) smoothEdgeFound = true; } else - { // Hard edge so ignore this polygon + { // Hard edge so ignore this polygon continue; } @@ -853,7 +853,7 @@ void CXRayObjectExport::addEdgeInfo(int v1, int v2, bool smooth) SXREdgeInfoPtr element = NULL; if (NULL == edgeTable[v1]) { - edgeTable[v1] = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); + edgeTable[v1] = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); element = edgeTable[v1]; } else @@ -863,7 +863,7 @@ void CXRayObjectExport::addEdgeInfo(int v1, int v2, bool smooth) { element = element->next; } - element->next = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); + element->next = xr_alloc(1); //(EdgeInfoPtr)malloc( sizeof(struct EdgeInfo) ); element = element->next; } diff --git a/src/plugins/Maya/Export/maTranslator.h b/src/plugins/Maya/Export/maTranslator.h index 9e899ce7f1b..58e2ccf597b 100644 --- a/src/plugins/Maya/Export/maTranslator.h +++ b/src/plugins/Maya/Export/maTranslator.h @@ -25,7 +25,7 @@ class CXRayObjectExport : public MPxFileTranslator LPCSTR getMaterialName(MDagPath& mdagPath, int cid, int objectIdx); MStatus ExportPart(CEditableObject* O, MDagPath&, MObject&); MStatus set_smoth_flags( - u32& flags, const MIntArray& tri_vert_indeces); // const MFnMesh &fnMesh, const MItMeshPolygon &meshPoly, + u32& flags, const MIntArray& tri_vert_indeces); // const MFnMesh &fnMesh, const MItMeshPolygon &meshPoly, MStatus ExportSelected(CEditableObject* O); MStatus ExportAll(CEditableObject* O); @@ -99,4 +99,4 @@ class CXRayObjectExport : public MPxFileTranslator MStringArray transformNodeNameArray; }; -#endif // maTranslatorH \ No newline at end of file +#endif // maTranslatorH \ No newline at end of file diff --git a/src/plugins/Maya/Material/MNormalMapConverter.cpp b/src/plugins/Maya/Material/MNormalMapConverter.cpp index 5217a6efcd9..652c6ed64c0 100644 --- a/src/plugins/Maya/Material/MNormalMapConverter.cpp +++ b/src/plugins/Maya/Material/MNormalMapConverter.cpp @@ -56,11 +56,11 @@ bool MNormalMapConverter::convertToNormalMap_InPlace(unsigned char* inImagePtr, bool isOK = true; if (outputPixelFormat == RGBA) { - bumpScale /= 255.0f; // will be used on unsignedChar + bumpScale /= 255.0f; // will be used on unsignedChar unsigned int widthMinus1 = width - 1; unsigned int heightMinus1 = height - 1; - unsigned int offset = (4 * width); // = sizeof(rgba) * width + unsigned int offset = (4 * width); // = sizeof(rgba) * width // ================== // Process the texels diff --git a/src/plugins/Maya/Material/MNormalMapConverter.h b/src/plugins/Maya/Material/MNormalMapConverter.h index 75b5f6f1730..3b108dc56d6 100644 --- a/src/plugins/Maya/Material/MNormalMapConverter.h +++ b/src/plugins/Maya/Material/MNormalMapConverter.h @@ -52,4 +52,4 @@ class MNormalMapConverter OutFormatType outputPixelFormat, float bumpScale); }; -#endif // MAYA_API_MNormalMapConverter +#endif // MAYA_API_MNormalMapConverter diff --git a/src/plugins/Maya/Material/MTexture.cpp b/src/plugins/Maya/Material/MTexture.cpp index cf89773a7e2..5ce4cb2ff15 100644 --- a/src/plugins/Maya/Material/MTexture.cpp +++ b/src/plugins/Maya/Material/MTexture.cpp @@ -49,7 +49,7 @@ bool MTexture::load( bool MTexture::set(MImage& image, Type type, bool mipmapped /* = true */, GLenum target /* = GL_TEXTURE_2D) */) { - unsigned int i; // used as a temporary index. + unsigned int i; // used as a temporary index. // Store the type of texture, and derive other parameters. // (Depth is assumed to be 4 bytes per pixel RGBA. diff --git a/src/plugins/Maya/Material/MTexture.h b/src/plugins/Maya/Material/MTexture.h index 6e9929296d3..7da830ed0e7 100644 --- a/src/plugins/Maya/Material/MTexture.h +++ b/src/plugins/Maya/Material/MTexture.h @@ -168,7 +168,7 @@ class MTexture // Pyramid levels (assumes 4 bytes per pixel for now) unsigned char** m_levels; - unsigned int m_numLevels; // Number of mipmaps + base texture + unsigned int m_numLevels; // Number of mipmaps + base texture // Cached variables (Depend on previous private variables) GLint m_internalFormat; @@ -176,4 +176,4 @@ class MTexture GLenum m_componentFormat; }; -#endif // MAYA_API_MTexture +#endif // MAYA_API_MTexture diff --git a/src/plugins/Maya/Material/MTextureCache.h b/src/plugins/Maya/Material/MTextureCache.h index 9d0af497acf..f52a10768b7 100644 --- a/src/plugins/Maya/Material/MTextureCache.h +++ b/src/plugins/Maya/Material/MTextureCache.h @@ -13,7 +13,7 @@ /////////////////////////////////////////////////////////////////// #ifdef WIN32 -#pragma warning(disable : 4786) // Disable stupid STL warnings. +#pragma warning(disable : 4786) // Disable stupid STL warnings. #endif #include @@ -42,7 +42,7 @@ class MTextureCacheElement MTexture* texture() { return m_texture; } private: MTexture* m_texture; - unsigned int lastAccessedTimestamp; // can be used to track when the texture was last used. + unsigned int lastAccessedTimestamp; // can be used to track when the texture was last used. NodeMonitor fMonitor; }; @@ -111,4 +111,4 @@ class MTextureCache : public NodeMonitorManager static MTextureCache* m_instance; }; -#endif // MAYA_API_MTextureCache \ No newline at end of file +#endif // MAYA_API_MTextureCache \ No newline at end of file diff --git a/src/plugins/Maya/Material/NodeMonitor.h b/src/plugins/Maya/Material/NodeMonitor.h index 7f625bdffff..5a637c02c1c 100644 --- a/src/plugins/Maya/Material/NodeMonitor.h +++ b/src/plugins/Maya/Material/NodeMonitor.h @@ -70,4 +70,4 @@ class NodeMonitor NodeMonitorManager* fManager; }; -#endif // MAYA_ShadingConnection \ No newline at end of file +#endif // MAYA_ShadingConnection \ No newline at end of file diff --git a/src/plugins/Maya/Material/ShadingConnection.cpp b/src/plugins/Maya/Material/ShadingConnection.cpp index f38ba594ec8..63d8fe275c9 100644 --- a/src/plugins/Maya/Material/ShadingConnection.cpp +++ b/src/plugins/Maya/Material/ShadingConnection.cpp @@ -89,7 +89,7 @@ ShadingConnection::TYPE ShadingConnection::traverseTripleShadingSwitch(MObject c // This assumption should always be safe, unless some drastic changes occured in the // implementation of the shading switches... in which case this code won't work, so // we would throw an exception. - assert(numChildren >= 2); // "Abnormal hierarchy in switching node." + assert(numChildren >= 2); // "Abnormal hierarchy in switching node." // Go through each row of the switch table. for (unsigned int index = 0; index < numElements; index++) diff --git a/src/plugins/Maya/Material/ShadingConnection.h b/src/plugins/Maya/Material/ShadingConnection.h index 8ba5a7f56ea..82e7b2c10a7 100644 --- a/src/plugins/Maya/Material/ShadingConnection.h +++ b/src/plugins/Maya/Material/ShadingConnection.h @@ -83,4 +83,4 @@ class ShadingConnection bool m_directConnection; }; -#endif // MAYA_ShadingConnection \ No newline at end of file +#endif // MAYA_ShadingConnection \ No newline at end of file diff --git a/src/plugins/Maya/Material/crc16.cpp b/src/plugins/Maya/Material/crc16.cpp index 087e1217f00..29274a4de9e 100644 --- a/src/plugins/Maya/Material/crc16.cpp +++ b/src/plugins/Maya/Material/crc16.cpp @@ -15,7 +15,7 @@ gen16(1) for CCITT and start crc at -1 for SDLC */ static BOOL crc16_ready = FALSE; -static int crc16_table[256]; // Lookup table array +static int crc16_table[256]; // Lookup table array int gen_tab[2][8] = {{0xC0C1, 0xC181, 0xC301, 0xC601, 0xCC01, 0xD801, 0xF001, 0xA001}, {0x1189, 0x2312, 0x4624, 0x8C48, 0x1081, 0x2102, 0x4204, 0x8408}}; diff --git a/src/plugins/Maya/Material/hwUnlitShader.cpp b/src/plugins/Maya/Material/hwUnlitShader.cpp index af71b7c059b..54b41b550d3 100644 --- a/src/plugins/Maya/Material/hwUnlitShader.cpp +++ b/src/plugins/Maya/Material/hwUnlitShader.cpp @@ -38,7 +38,7 @@ using namespace std; #ifdef WIN32 -#pragma warning(disable : 4786) // Disable stupid STL warnings. +#pragma warning(disable : 4786) // Disable stupid STL warnings. #endif #include "ShadingConnection.h" @@ -175,7 +175,7 @@ MStatus CXRayMtl::initialize() MFnNumericAttribute nAttr; MStatus status; - MFnTypedAttribute sAttr; // For string attributes + MFnTypedAttribute sAttr; // For string attributes MFnEnumAttribute eAttr; // Create COLOR input attributes @@ -197,7 +197,7 @@ MStatus CXRayMtl::initialize() color = nAttr.create("color", "c", colorR, colorG, colorB); nAttr.setStorable(true); nAttr.setKeyable(true); - nAttr.setDefault(1.0f, 0.5f, 0.5f); // ugly pink-salmon color. You can't miss it. + nAttr.setDefault(1.0f, 0.5f, 0.5f); // ugly pink-salmon color. You can't miss it. nAttr.setUsedAsColor(true); // Create TRANSPARENCY input attributes @@ -219,7 +219,7 @@ MStatus CXRayMtl::initialize() transparency = nAttr.create("transparency", "it", transparencyR, transparencyG, transparencyB); nAttr.setStorable(true); nAttr.setKeyable(true); - nAttr.setDefault(0.0001f, 0.0001f, 0.0001f); // very light gray. + nAttr.setDefault(0.0001f, 0.0001f, 0.0001f); // very light gray. nAttr.setUsedAsColor(true); // Add the attributes here @@ -363,7 +363,7 @@ void CXRayMtl::updateTransparencyFlags(MString objectPath) fConstantTransparency = (tc.r + tc.g + tc.b) / 3.0f; } else - fConstantTransparency = 0.0f; // will result in alpha=1. + fConstantTransparency = 0.0f; // will result in alpha=1. } /* virtual */ diff --git a/src/plugins/Maya/Material/lambertShader.cpp b/src/plugins/Maya/Material/lambertShader.cpp index d75c5ce37db..95e5e45be92 100644 --- a/src/plugins/Maya/Material/lambertShader.cpp +++ b/src/plugins/Maya/Material/lambertShader.cpp @@ -66,7 +66,7 @@ class CXRayMtl : public MPxNode virtual void postConstructor(); - static MTypeId id; // The IFF type id + static MTypeId id; // The IFF type id protected: // Translucence coefficient @@ -323,7 +323,7 @@ MStatus CXRayMtl::initialize() MFnEnumAttribute eAttr; MFnTypedAttribute tAttr; - MStatus status; // Status will be used to hold the MStatus value + MStatus status; // Status will be used to hold the MStatus value // returned by each api function call. It is important // to check the status returned by a call to aid in // debugging. Failed API calls can result in subtle @@ -870,8 +870,8 @@ MStatus CXRayMtl::compute(const MPlug& plug, MDataBlock& block) CHECK_MSTATUS(status); MFloatVector& outColor = outColorHandle.asFloatVector(); - outColor = resultColor; // Set the output value - outColorHandle.setClean(); // Mark the output value as clean + outColor = resultColor; // Set the output value + outColorHandle.setClean(); // Mark the output value as clean } // Set ouput transparency @@ -886,13 +886,13 @@ MStatus CXRayMtl::compute(const MPlug& plug, MDataBlock& block) CHECK_MSTATUS(status); MFloatVector& outTrans = outTransHandle.asFloatVector(); - outTrans = transparency; // Set the output value - outTransHandle.setClean(); // Mark the output value as clean + outTrans = transparency; // Set the output value + outTransHandle.setClean(); // Mark the output value as clean } } else { - return (MS::kUnknownParameter); // We got an unexpected plug + return (MS::kUnknownParameter); // We got an unexpected plug } return (MS::kSuccess); diff --git a/src/plugins/Maya/Material/phongShader.cpp b/src/plugins/Maya/Material/phongShader.cpp index bbcaa0c66f2..2a5a0a730b0 100644 --- a/src/plugins/Maya/Material/phongShader.cpp +++ b/src/plugins/Maya/Material/phongShader.cpp @@ -440,7 +440,7 @@ MStatus CXRayMtl::compute(const MPlug& plug, MDataBlock& block) if (currentLight.child(aLightDiffuse).asBool()) { float cosln = lightDirection * surfaceNormal; ; - if (cosln > 0.0f) // calculate only if facing light + if (cosln > 0.0f) // calculate only if facing light { diffuseR += lightIntensity[0] * (cosln * diffuseReflectivity); diffuseG += lightIntensity[1] * (cosln * diffuseReflectivity); @@ -449,7 +449,7 @@ MStatus CXRayMtl::compute(const MPlug& plug, MDataBlock& block) CHECK_MSTATUS(cameraPosition.normalize()); - if (cosln > 0.0f) // calculate only if facing light + if (cosln > 0.0f) // calculate only if facing light { float RV = (((2 * surfaceNormal) * cosln) - lightDirection) * cameraPosition; if (RV > 0.0) RV = 0.0; @@ -468,7 +468,7 @@ MStatus CXRayMtl::compute(const MPlug& plug, MDataBlock& block) else { float cosln = MRenderUtil::diffuseReflectance(blindData, lightDirection, point, surfaceNormal, true); - if (cosln > 0.0f) // calculate only if facing light + if (cosln > 0.0f) // calculate only if facing light { diffuseR += lightIntensity[0] * (cosln * diffuseReflectivity); diffuseG += lightIntensity[1] * (cosln * diffuseReflectivity); @@ -538,7 +538,7 @@ MStatus CXRayMtl::compute(const MPlug& plug, MDataBlock& block) MFloatVector l = -direction; float dot = l * normal; if (dot < 0.0) dot = -dot; - MFloatVector refVector = 2 * normal * dot - l; // reflection ray + MFloatVector refVector = 2 * normal * dot - l; // reflection ray float dotRef = refVector * triangleNormal; if (dotRef < 0.0) { const float s = 0.01f; @@ -548,12 +548,12 @@ MStatus CXRayMtl::compute(const MPlug& plug, MDataBlock& block) } CHECK_MSTATUS(refVector.normalize()); - status = MRenderUtil::raytrace(point, // origin - refVector, // direction - objId, // object id - samplerPtr, // sampler info - depth, // ray depth - reflectColor, // output color and transp + status = MRenderUtil::raytrace(point, // origin + refVector, // direction + objId, // object id + samplerPtr, // sampler info + depth, // ray depth + reflectColor, // output color and transp reflectTransparency); // add in the reflection color diff --git a/src/plugins/Shared/GameMaterial.cpp b/src/plugins/Shared/GameMaterial.cpp index 566e83487bf..5e4d8391554 100644 --- a/src/plugins/Shared/GameMaterial.cpp +++ b/src/plugins/Shared/GameMaterial.cpp @@ -20,8 +20,8 @@ class XRayMtlClassDesc : public ClassDesc2 const TCHAR* InternalName() { return _T("S.T.A.L.K.E.R.Mtl"); - } // returns fixed parsable name (scripter-visible name) - HINSTANCE HInstance() { return hInstance; } // returns owning module handle + } // returns fixed parsable name (scripter-visible name) + HINSTANCE HInstance() { return hInstance; } // returns owning module handle }; static XRayMtlClassDesc stdmtl2CD; @@ -157,9 +157,9 @@ static int mtlChannelType[STD2_NMAX_TEXMAPS] = { }; static IReshading::ReshadeRequirements chooseReshade[3][3] = { - {IReshading::RR_None, IReshading::RR_NeedPreshade, IReshading::RR_NeedReshade}, // RR_None - {IReshading::RR_NeedPreshade, IReshading::RR_NeedPreshade, IReshading::RR_NeedPreshade}, // RR_NeedPreshade - {IReshading::RR_NeedReshade, IReshading::RR_NeedPreshade, IReshading::RR_NeedReshade}, // RR_NeedReshade + {IReshading::RR_None, IReshading::RR_NeedPreshade, IReshading::RR_NeedReshade}, // RR_None + {IReshading::RR_NeedPreshade, IReshading::RR_NeedPreshade, IReshading::RR_NeedPreshade}, // RR_NeedPreshade + {IReshading::RR_NeedReshade, IReshading::RR_NeedPreshade, IReshading::RR_NeedReshade}, // RR_NeedReshade }; #define NO_UPDATE -2 @@ -171,7 +171,7 @@ static IReshading::ReshadeRequirements chooseReshade[3][3] = { class ShaderPBAccessor : public PBAccessor { public: - void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v + void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v { XRayMtl* m = (XRayMtl*)owner; switch (id) @@ -205,7 +205,7 @@ class ShaderPBAccessor : public PBAccessor } } - void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // get into v + void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // get into v { XRayMtl* m = (XRayMtl*)owner; switch (id) @@ -268,7 +268,7 @@ static ParamBlockDesc2 std2_shader_blk(std2_shader, _T("newShaderParameters"), 0 class ExtendedPBAccessor : public PBAccessor { public: - void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v + void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v { XRayMtl* m = (XRayMtl*)owner; IParamMap2* map = m->pb_extended ? m->pb_extended->GetMap() : NULL; @@ -337,7 +337,7 @@ static ParamBlockDesc2 std2_extended_blk(std2_extended, _T("extendedParameters") std2_opacity_type, _T("opacityType"), TYPE_INT, 0, IDS_JW_OPACITYTYPE, p_default, 0, p_range, 0, 2, p_ui, TYPE_RADIO, 3, IDC_TR_SUB2, IDC_TR_SUB, IDC_TR_ADD, p_accessor, &extendedPBAccessor, end, std2_opacity, _T("opacity"), TYPE_PCNT_FRAC, P_ANIMATABLE, IDS_DS_OPACITY, p_default, 0.0, p_range, 0.0, - 100.0, // UI us in the shader rollout + 100.0, // UI us in the shader rollout p_accessor, &extendedPBAccessor, end, std2_filter_color, _T("filterColor"), TYPE_RGBA, P_ANIMATABLE, IDS_DS_FILTER, p_default, Color(0, 0, 0), p_ui, TYPE_COLORSWATCH, IDC_FILTER_CS, p_accessor, &extendedPBAccessor, end, std2_ep_filter_map, _T("filterMap"), TYPE_TEXMAP, P_SUBTEX + P_NO_AUTO_LABELS, IDS_JW_FILTERMAP, p_subtexno, ID_FI, @@ -364,7 +364,7 @@ static ParamBlockDesc2 std2_extended_blk(std2_extended, _T("extendedParameters") class SamplingPBAccessor : public PBAccessor { public: - void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v + void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v { XRayMtl* m = (XRayMtl*)owner; macroRecorder->Disable(); @@ -420,7 +420,7 @@ class SamplingPBAccessor : public PBAccessor } macroRecorder->Enable(); } - void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // get into v + void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // get into v { XRayMtl* m = (XRayMtl*)owner; switch (id) @@ -502,7 +502,7 @@ static ParamBlockDesc2 std2_sampling_blk(std2_sampling, _T("samplingParameters") class XRayPBAccessor : public PBAccessor { public: - void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v + void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v { XRayMtl* m = (XRayMtl*)owner; switch (id) @@ -531,7 +531,7 @@ class XRayPBAccessor : public PBAccessor } } - void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // get into v + void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // get into v { XRayMtl* m = (XRayMtl*)owner; switch (id) @@ -718,7 +718,7 @@ class MapsPBAccessor : public PBAccessor // I hope to be able to host the texmap stuff entirely in the paramblock when I get assignable subanim // numbers supported in PB2's (so that the map, map enable and map amount Tab<>s are number in interleaved row // order) - void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v + void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t) // set from v { XRayMtl* m = (XRayMtl*)owner; switch (id) @@ -751,7 +751,7 @@ class MapsPBAccessor : public PBAccessor macroRecorder->Enable(); } if (tex && (tabIndex == m->stdIDToChannel[ID_RL] || tabIndex == m->stdIDToChannel[ID_RR])) { - if (!IsMultipleInstanced(m, tex)) { // DS 4/26/99: keep settings for instanced map + if (!IsMultipleInstanced(m, tex)) { // DS 4/26/99: keep settings for instanced map UVGen* uvg0 = tex->GetTheUVGen(); if (uvg0 && uvg0->IsStdUVGen()) { StdUVGen* uvg = (StdUVGen*)uvg0; @@ -786,7 +786,7 @@ class MapsPBAccessor : public PBAccessor } } - void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // set from v + void Get(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t, Interval& valid) // set from v { XRayMtl* m = (XRayMtl*)owner; switch (id) @@ -828,7 +828,7 @@ static ParamBlockDesc2 std_maps_blk(std_maps, _T("maps"), 0, &stdmtl2CD, P_AUTO_ IDC_MAP_3, IDC_MAP_4, IDC_MAP_5, IDC_MAP_6, IDC_MAP_7, IDC_MAP_8, IDC_MAP_9, IDC_MAP_10, IDC_MAP_11, IDC_MAP_12, IDC_MAP_13, IDC_MAP_14, IDC_MAP_15, IDC_MAP_16, IDC_MAP_17, IDC_MAP_18, IDC_MAP_19, IDC_MAP_20, IDC_MAP_21, IDC_MAP_22, IDC_MAP_23, p_accessor, &mapsPBAccessor, end, std2_map_amnts, _T("mapAmounts"), TYPE_PCNT_FRAC_TAB, - STD2_NMAX_TEXMAPS, 0, IDS_JW_MAPAMOUNTS, p_default, 1.0, // default is given in internal units JBW 10.8.99 + STD2_NMAX_TEXMAPS, 0, IDS_JW_MAPAMOUNTS, p_default, 1.0, // default is given in internal units JBW 10.8.99 p_range, 0.0, 100.0, p_ui, TYPE_SPINNER, EDITTYPE_INT, IDC_AMTEDIT_0, IDC_AMTSPIN_0, IDC_AMTEDIT_1, IDC_AMTSPIN_1, IDC_AMTEDIT_2, IDC_AMTSPIN_2, IDC_AMTEDIT_3, IDC_AMTSPIN_3, IDC_AMTEDIT_4, IDC_AMTSPIN_4, IDC_AMTEDIT_5, IDC_AMTSPIN_5, IDC_AMTEDIT_6, IDC_AMTSPIN_6, IDC_AMTEDIT_7, IDC_AMTSPIN_7, IDC_AMTEDIT_8, IDC_AMTSPIN_8, @@ -902,88 +902,88 @@ static ParamBlockDesc2 std2_dynamics_blk(std2_dynamics, _T("dynamicsParameters") // into two new blocks static ParamBlockDescID extVer10[] = { - {TYPE_FLOAT, NULL, TRUE, std2_opacity}, // opacity - {TYPE_FLOAT, NULL, TRUE, std2_falloff_amnt}, // opfalloff - {TYPE_RGBA, NULL, TRUE, std2_filter_color}, // filter - {TYPE_FLOAT, NULL, TRUE, std2_wire_size}, // wireSize - {TYPE_FLOAT, NULL, TRUE, std2_ior}, // index of refraction - {TYPE_FLOAT, NULL, TRUE, -1}, // bounce - {TYPE_FLOAT, NULL, TRUE, -1}, // static friction - {TYPE_FLOAT, NULL, TRUE, -1}, // sliding friction - {TYPE_FLOAT, NULL, TRUE, std2_dim_lvl}, // reflect dim level - {TYPE_FLOAT, NULL, TRUE, std2_refl_lvl}, // reflect dim multiplier + {TYPE_FLOAT, NULL, TRUE, std2_opacity}, // opacity + {TYPE_FLOAT, NULL, TRUE, std2_falloff_amnt}, // opfalloff + {TYPE_RGBA, NULL, TRUE, std2_filter_color}, // filter + {TYPE_FLOAT, NULL, TRUE, std2_wire_size}, // wireSize + {TYPE_FLOAT, NULL, TRUE, std2_ior}, // index of refraction + {TYPE_FLOAT, NULL, TRUE, -1}, // bounce + {TYPE_FLOAT, NULL, TRUE, -1}, // static friction + {TYPE_FLOAT, NULL, TRUE, -1}, // sliding friction + {TYPE_FLOAT, NULL, TRUE, std2_dim_lvl}, // reflect dim level + {TYPE_FLOAT, NULL, TRUE, std2_refl_lvl}, // reflect dim multiplier }; static ParamBlockDescID dynVer10[] = { - {TYPE_FLOAT, NULL, TRUE, -1}, // opacity - {TYPE_FLOAT, NULL, TRUE, -1}, // opfalloff - {TYPE_RGBA, NULL, TRUE, -1}, // filter - {TYPE_FLOAT, NULL, TRUE, -1}, // wireSize - {TYPE_FLOAT, NULL, TRUE, -1}, // index of refraction - {TYPE_FLOAT, NULL, TRUE, std2_bounce}, // bounce - {TYPE_FLOAT, NULL, TRUE, std2_static_friction}, // static friction - {TYPE_FLOAT, NULL, TRUE, std2_sliding_friction}, // sliding friction - {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim level - {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim multiplier + {TYPE_FLOAT, NULL, TRUE, -1}, // opacity + {TYPE_FLOAT, NULL, TRUE, -1}, // opfalloff + {TYPE_RGBA, NULL, TRUE, -1}, // filter + {TYPE_FLOAT, NULL, TRUE, -1}, // wireSize + {TYPE_FLOAT, NULL, TRUE, -1}, // index of refraction + {TYPE_FLOAT, NULL, TRUE, std2_bounce}, // bounce + {TYPE_FLOAT, NULL, TRUE, std2_static_friction}, // static friction + {TYPE_FLOAT, NULL, TRUE, std2_sliding_friction}, // sliding friction + {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim level + {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim multiplier }; // v10 Param Block Descriptor static ParamBlockDescID stdmtl2PB[NPARAMS] = { - {TYPE_FLOAT, NULL, TRUE, 7}, // opacity - {TYPE_FLOAT, NULL, TRUE, 8}, // opfalloff - {TYPE_RGBA, NULL, TRUE, 9}, // filter - {TYPE_FLOAT, NULL, TRUE, 10}, // wireSize - {TYPE_FLOAT, NULL, TRUE, 11}, // index of refraction - {TYPE_FLOAT, NULL, TRUE, 12}, // bounce - {TYPE_FLOAT, NULL, TRUE, 13}, // static friction - {TYPE_FLOAT, NULL, TRUE, 14}, // sliding friction - {TYPE_FLOAT, NULL, TRUE, 15}, // reflect dim level - {TYPE_FLOAT, NULL, TRUE, 16}, // reflect dim multiplier + {TYPE_FLOAT, NULL, TRUE, 7}, // opacity + {TYPE_FLOAT, NULL, TRUE, 8}, // opfalloff + {TYPE_RGBA, NULL, TRUE, 9}, // filter + {TYPE_FLOAT, NULL, TRUE, 10}, // wireSize + {TYPE_FLOAT, NULL, TRUE, 11}, // index of refraction + {TYPE_FLOAT, NULL, TRUE, 12}, // bounce + {TYPE_FLOAT, NULL, TRUE, 13}, // static friction + {TYPE_FLOAT, NULL, TRUE, 14}, // sliding friction + {TYPE_FLOAT, NULL, TRUE, 15}, // reflect dim level + {TYPE_FLOAT, NULL, TRUE, 16}, // reflect dim multiplier }; #define NPARAMS_O 17 // Old (2.5 and before) Param Block Descriptor static ParamBlockDescID stdmtlPB[NPARAMS_O] = { - {TYPE_RGBA, NULL, TRUE, 1}, // ambient - {TYPE_RGBA, NULL, TRUE, 2}, // diffuse - {TYPE_RGBA, NULL, TRUE, 3}, // specular - {TYPE_FLOAT, NULL, TRUE, 4}, // shininess - {TYPE_FLOAT, NULL, TRUE, 5}, // shini_strength - {TYPE_FLOAT, NULL, TRUE, 6}, // self-illum - {TYPE_FLOAT, NULL, TRUE, 7}, // opacity - {TYPE_FLOAT, NULL, TRUE, 8}, // opfalloff - {TYPE_RGBA, NULL, TRUE, 9}, // filter - {TYPE_FLOAT, NULL, TRUE, 10}, // wireSize - {TYPE_FLOAT, NULL, TRUE, 11}, // index of refraction - {TYPE_FLOAT, NULL, TRUE, 12}, // bounce - {TYPE_FLOAT, NULL, TRUE, 13}, // static friction - {TYPE_FLOAT, NULL, TRUE, 14}, // sliding friction - {TYPE_FLOAT, NULL, TRUE, 15}, // reflect dim level - {TYPE_FLOAT, NULL, TRUE, 16}, // reflect dim multiplier - {TYPE_FLOAT, NULL, TRUE, 17} // soften + {TYPE_RGBA, NULL, TRUE, 1}, // ambient + {TYPE_RGBA, NULL, TRUE, 2}, // diffuse + {TYPE_RGBA, NULL, TRUE, 3}, // specular + {TYPE_FLOAT, NULL, TRUE, 4}, // shininess + {TYPE_FLOAT, NULL, TRUE, 5}, // shini_strength + {TYPE_FLOAT, NULL, TRUE, 6}, // self-illum + {TYPE_FLOAT, NULL, TRUE, 7}, // opacity + {TYPE_FLOAT, NULL, TRUE, 8}, // opfalloff + {TYPE_RGBA, NULL, TRUE, 9}, // filter + {TYPE_FLOAT, NULL, TRUE, 10}, // wireSize + {TYPE_FLOAT, NULL, TRUE, 11}, // index of refraction + {TYPE_FLOAT, NULL, TRUE, 12}, // bounce + {TYPE_FLOAT, NULL, TRUE, 13}, // static friction + {TYPE_FLOAT, NULL, TRUE, 14}, // sliding friction + {TYPE_FLOAT, NULL, TRUE, 15}, // reflect dim level + {TYPE_FLOAT, NULL, TRUE, 16}, // reflect dim multiplier + {TYPE_FLOAT, NULL, TRUE, 17} // soften }; // Descriptor for mapping old (2.5 and before) shader parameters into new stdShader PB2's // Shader::ConvertParamBlock() uses this to extract old mtl shader params into new Shader static ParamBlockDescID stdmtlPB2[NPARAMS_O] = { - {TYPE_RGBA, NULL, TRUE, shdr_ambient}, // ambient - {TYPE_RGBA, NULL, TRUE, shdr_diffuse}, // diffuse - {TYPE_RGBA, NULL, TRUE, shdr_specular}, // specular - {TYPE_FLOAT, NULL, TRUE, shdr_glossiness}, // shininess - {TYPE_FLOAT, NULL, TRUE, shdr_spec_lvl}, // shini_strength - {TYPE_FLOAT, NULL, TRUE, shdr_self_illum_amnt}, // self-illum - {TYPE_FLOAT, NULL, TRUE, -1}, // opacity - {TYPE_FLOAT, NULL, TRUE, -1}, // opfalloff - {TYPE_RGBA, NULL, TRUE, -1}, // filter - {TYPE_FLOAT, NULL, TRUE, -1}, // wireSize - {TYPE_FLOAT, NULL, TRUE, -1}, // index of refraction - {TYPE_FLOAT, NULL, TRUE, -1}, // bounce - {TYPE_FLOAT, NULL, TRUE, -1}, // static friction - {TYPE_FLOAT, NULL, TRUE, -1}, // sliding friction - {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim level - {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim multiplier - {TYPE_FLOAT, NULL, TRUE, shdr_soften} // soften + {TYPE_RGBA, NULL, TRUE, shdr_ambient}, // ambient + {TYPE_RGBA, NULL, TRUE, shdr_diffuse}, // diffuse + {TYPE_RGBA, NULL, TRUE, shdr_specular}, // specular + {TYPE_FLOAT, NULL, TRUE, shdr_glossiness}, // shininess + {TYPE_FLOAT, NULL, TRUE, shdr_spec_lvl}, // shini_strength + {TYPE_FLOAT, NULL, TRUE, shdr_self_illum_amnt}, // self-illum + {TYPE_FLOAT, NULL, TRUE, -1}, // opacity + {TYPE_FLOAT, NULL, TRUE, -1}, // opfalloff + {TYPE_RGBA, NULL, TRUE, -1}, // filter + {TYPE_FLOAT, NULL, TRUE, -1}, // wireSize + {TYPE_FLOAT, NULL, TRUE, -1}, // index of refraction + {TYPE_FLOAT, NULL, TRUE, -1}, // bounce + {TYPE_FLOAT, NULL, TRUE, -1}, // static friction + {TYPE_FLOAT, NULL, TRUE, -1}, // sliding friction + {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim level + {TYPE_FLOAT, NULL, TRUE, -1}, // reflect dim multiplier + {TYPE_FLOAT, NULL, TRUE, shdr_soften} // soften }; #define NUMOLDVER 1 static ParamVersionDesc oldXRayMtlVersions[NUMOLDVER] = { @@ -1002,7 +1002,7 @@ static ParamVersionDesc stdMtlVersion(stdmtlPB, NPARAMS_O, NEWSTDMTL_PBVERSION); #define IDT_MYTIMER 1010 #define DRAGTHRESH 6 -#define DITHER_WHEN_INACTIVE // avoids palette conflict probs +#define DITHER_WHEN_INACTIVE // avoids palette conflict probs //----------------------------------------------------------------------------- // XRayMtl @@ -1034,14 +1034,14 @@ void XRayMtl::Reset() SetShaderIndx(FindShader(Class_ID(DEFAULT_SHADER_CLASS_ID, 0))); // back in 4.28, as it broke reset....fixed in shader.reset so only allocs pb if not there - pShader->Reset(); // mjm - 4.22.99 - fix mem leak (pblock already created through SetShaderIndx() above. + pShader->Reset(); // mjm - 4.22.99 - fix mem leak (pblock already created through SetShaderIndx() above. SetSamplerIndx(FindSampler(Class_ID(DEFAULT_SAMPLER_CLASS_ID, 0))); // HEY!! this should all be done automatically in ParamBlock init... - macroRecorder->Disable(); // don't want to see this parameter reset in macrorecorder + macroRecorder->Disable(); // don't want to see this parameter reset in macrorecorder // ensure all map-related parameters are set up - UpdateMapButtons(); // calls updatetexmaps + UpdateMapButtons(); // calls updatetexmaps UpdateExtendedMapButtons(); pb_shader->SetValue(std2_wire, 0, FALSE); @@ -1082,7 +1082,7 @@ void XRayMtl::Reset() macroRecorder->Enable(); } -XRayMtl::XRayMtl(BOOL loading) : mReshadeRQ(RR_None), mInRQ(RR_None) // mjm - 06.02.00 +XRayMtl::XRayMtl(BOOL loading) : mReshadeRQ(RR_None), mInRQ(RR_None) // mjm - 06.02.00 { texHandle[0] = texHandle[1] = NULL; texHandleValid.SetEmpty(); @@ -1147,7 +1147,7 @@ RefTargetHandle XRayMtl::Clone(RemapDir& remap) // DebugPrint(" Cloning NEWSTDMTL %d \n", ++numNewStdMtls); macroRecorder->Disable(); XRayMtl* mnew = new XRayMtl(TRUE); - *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff + *((MtlBase*)mnew) = *((MtlBase*)this); // copy superclass stuff mnew->ReplaceReference(TEXMAPS_REF, remap.CloneRef(maps)); mnew->ReplaceReference(SHADER_REF, remap.CloneRef(pShader)); mnew->ReplaceReference(XRAY_PB_REF, remap.CloneRef(pb_xray)); @@ -1220,7 +1220,7 @@ ParamDlg* XRayMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams* imp) texmapDlg = stdmtl2CD.CreateParamDlg(std_maps, hwMtlEdit, imp, this); xrayDlg = stdmtl2CD.CreateParamDlg(std2_xray, hwMtlEdit, imp, this); UpdateTexmaps(); - if (pb_dynamics) // not in the VIZ version + if (pb_dynamics) // not in the VIZ version stdmtl2CD.CreateParamDlg(std2_dynamics, hwMtlEdit, imp, this); // restore any saved rollout state stdmtl2CD.RestoreRolloutState(); @@ -1286,7 +1286,7 @@ BOOL XRayMtl::SetDlgThing(ParamDlg* dlg) pShaderDlg->LoadDialog(TRUE); masterDlg->AddDlg(pShaderDlg); - UpdateMapButtons(); // calls update texmaps + UpdateMapButtons(); // calls update texmaps } } else if (dlg == texmapDlg) @@ -1331,7 +1331,7 @@ static int __cdecl classDescListCompare(const void* elem1, const void* elem2) { ClassDesc* s1 = *(ClassDesc**)elem1; ClassDesc* s2 = *(ClassDesc**)elem2; - TSTR sn1 = s1->ClassName(); // need to snap name string, since both use GetString() + TSTR sn1 = s1->ClassName(); // need to snap name string, since both use GetString() TSTR sn2 = s2->ClassName(); return _tcscmp(sn1.data(), sn2.data()); } @@ -1461,9 +1461,9 @@ void XRayMtl::SwitchShader(Shader* newShader, BOOL loadDlg) pb_extended->RemoveController(n, 0); } - theHold.Suspend(); //----------------------------------------------------- + theHold.Suspend(); //----------------------------------------------------- - if (newShaderId == constShaderId) { // constant + if (newShaderId == constShaderId) { // constant SetFlag(NEWSTDMTL_FACETED, TRUE); pb_shader->SetValue(std2_faceted, 0, TRUE); } @@ -1485,16 +1485,16 @@ void XRayMtl::SwitchShader(Shader* newShader, BOOL loadDlg) ShuffleTexMaps(newShader, oldShader); } - theHold.Resume(); //----------------------------------------------------- + theHold.Resume(); //----------------------------------------------------- if (theHold.Holding()) - theHold.Put(new SwitchShaderRestore(this, oldShader, newShader)); // this will make a ref to oldShader + theHold.Put(new SwitchShaderRestore(this, oldShader, newShader)); // this will make a ref to oldShader - theHold.Suspend(); //----------------------------------------------------- + theHold.Suspend(); //----------------------------------------------------- // moved from below, or it crashes on reset if (oldShader) - oldShader->SetParamDlg(NULL); // DS 3/9/99 ( undo may bring oldShader back, have to clear invalid pointer) + oldShader->SetParamDlg(NULL); // DS 3/9/99 ( undo may bring oldShader back, have to clear invalid pointer) if (oldShaderDlg) oldShaderDlg->SetThings(this, NULL); // NB: this deletes the oldShader ( unless it being ref'd by SwitchShaderRestore) @@ -1536,9 +1536,9 @@ void XRayMtl::SwitchShader(Shader* newShader, BOOL loadDlg) UpdateMtlDisplay(); - } // end, oldShaderDlg not NULL + } // end, oldShaderDlg not NULL - theHold.Resume(); //-------------------------------------------------- + theHold.Resume(); //-------------------------------------------------- } ResumeAnimate(); } @@ -1551,7 +1551,7 @@ BOOL XRayMtl::SwitchShader(Class_ID shaderId) if (pCD) { // SS 1/26/2000: fix suggested by Kells // SwitchShader(pCD); - SetShaderIndx(n); // sets pb2 & set calls switchshader w/ a real shader + SetShaderIndx(n); // sets pb2 & set calls switchshader w/ a real shader return TRUE; } return FALSE; @@ -1561,7 +1561,7 @@ void XRayMtl::SwitchShader(ClassDesc* pNewCD) { // create the new shader object Shader* newShader = (Shader*)(pNewCD->Create(0)); - newShader->Reset(); // creates pblock + newShader->Reset(); // creates pblock SwitchShader(newShader); } @@ -1625,7 +1625,7 @@ class SwitchSamplerRestore : public RestoreObj, public ReferenceMaker { Sampler* samp = mtl->pixelSampler; - samp->SetAFlag(A_LOCK_TARGET); // keeps sh from getting auto-deleted + samp->SetAFlag(A_LOCK_TARGET); // keeps sh from getting auto-deleted mtl->SwitchSampler(saveSampler); samp->ClearAFlag(A_LOCK_TARGET); @@ -1662,24 +1662,24 @@ static Class_ID defaultSamplerID(DEFAULT_SAMPLER_CLASS_ID, 0); void XRayMtl::SwitchSampler(Sampler* newSampler) { - theHold.Suspend(); //----------------------------------------------------- + theHold.Suspend(); //----------------------------------------------------- DbgAssert(newSampler); Class_ID oldSamplerId = pixelSampler ? pixelSampler->ClassID() : Class_ID(0, 0); Class_ID newSamplerId = newSampler->ClassID(); if (oldSamplerId != newSamplerId) { - theHold.Resume(); //----------------------------------------------------- + theHold.Resume(); //----------------------------------------------------- if (theHold.Holding()) - theHold.Put(new SwitchSamplerRestore(this, pixelSampler)); // this will make a ref to oldShader - theHold.Suspend(); //----------------------------------------------------- + theHold.Put(new SwitchSamplerRestore(this, pixelSampler)); // this will make a ref to oldShader + theHold.Suspend(); //----------------------------------------------------- SetPixelSampler(newSampler); } if (pb_sampling) UpdateSamplingParams(); - theHold.Resume(); //----------------------------------------------------- + theHold.Resume(); //----------------------------------------------------- } void XRayMtl::SwitchSampler(ClassDesc* pNewCD) @@ -1766,12 +1766,12 @@ void XRayMtl::UpdateTexmaps() channelTypes[i] = pShader->ChannelType(i); pb_maps->DefineParamAlias(chanIntName, std2_maps, i); pb_maps->DefineParamAlias(chanIntName + _T("Enable"), std2_map_enables, - i); // JBW 5/24/99, made non-localizable (as names s/b internal) + i); // JBW 5/24/99, made non-localizable (as names s/b internal) pb_maps->DefineParamAlias(chanIntName + _T("Amount"), std2_map_amnts, i); } } else - { // beyond the end of supported shader channels + { // beyond the end of supported shader channels if (pmap != NULL) { // add the mtls texture channels if (nMtlMapChannels > 0) { @@ -2117,7 +2117,7 @@ void XRayMtl::ShuffleTexMaps(Shader* newShader, Shader* oldShader) if (newName == oldShader->GetTexChannelInternalName(oldChan)) break; } - if (oldChan < nOldShadeMaps) { // found it + if (oldChan < nOldShadeMaps) { // found it maps->txmap[newChan].amtCtrl = oldMaps[oldChan].amtCtrl; maps->txmap[newChan].amount = oldMaps[oldChan].amount; maps->txmap[newChan].map = oldMaps[oldChan].map; @@ -2125,7 +2125,7 @@ void XRayMtl::ShuffleTexMaps(Shader* newShader, Shader* oldShader) maps->txmap[newChan].name = oldMaps[oldChan].name; } - } // end, for each new map + } // end, for each new map // now do the mtl maps for (int n = 0; n < MTL_NTEXMAPS; ++n) @@ -2179,13 +2179,13 @@ void XRayMtl::ShuffleShaderParams(Shader* newShader, Shader* oldShader) if (srcParamDef.type == paramDef.type) { IParamBlock2* oldPB2 = oldShader->GetParamBlockByID(oldPBdesc->ID); newPB2->Assign(paramDef.ID, oldPB2, srcParamDef.ID); - goto nextParam; // found it, outta here... + goto nextParam; // found it, outta here... } } } nextParam:; - } // end, dest param loop - } // end, desk block loop + } // end, dest param loop + } // end, desk block loop Interval v; v.SetInfinite(); newShader->Update(0, v); @@ -2259,7 +2259,7 @@ ULONG XRayMtl::Requirements(int subMtlNum) int XRayMtl::MapSlotType(int i) { - if (i == stdIDToChannel[ID_DP]) return MAPSLOT_DISPLACEMENT; // DS 4/12/99 + if (i == stdIDToChannel[ID_DP]) return MAPSLOT_DISPLACEMENT; // DS 4/12/99 return (i == stdIDToChannel[ID_RL] || i == stdIDToChannel[ID_RR]) ? MAPSLOT_ENVIRON : MAPSLOT_TEXTURE; } @@ -2397,7 +2397,7 @@ RefTargetHandle XRayMtl::GetReference(int i) switch (i) { case OLD_PBLOCK_REF: - return old_pblock; // old pblock, replaced by the 6 new pb2's + return old_pblock; // old pblock, replaced by the 6 new pb2's case TEXMAPS_REF: return maps; case SHADER_REF: return pShader; case SHADER_PB_REF: return pb_shader; @@ -2514,7 +2514,7 @@ RefResult XRayMtl::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, return REF_STOP; } case REFMSG_CHANGE: - UpdateReshadeRequirements(hTarget, partID); // mjm - 06.02.00 + UpdateReshadeRequirements(hTarget, partID); // mjm - 06.02.00 ivalid.SetEmpty(); // ask ClassDesc if any paramblock change caused the notify @@ -2522,7 +2522,7 @@ RefResult XRayMtl::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, // else inval indicated param UI IParamBlock2* cpb; ParamID changing_param = stdmtl2CD.LastNotifyParamID(this, cpb); - if (hTarget != pShader) // && hTarget != maps) + if (hTarget != pShader) // && hTarget != maps) { if (changing_param != -1) { // DS 10/13/00: I needed to add code to check of the dialog for this map was actualy active because @@ -2544,7 +2544,7 @@ RefResult XRayMtl::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, if (curImp) curImp->MtlChanged(); } } - DiscardTexHandles(); // DS 5/22/00 + DiscardTexHandles(); // DS 5/22/00 } break; } @@ -2883,7 +2883,7 @@ int XRayMtl::FindShader(Class_ID& findId, ClassDesc** ppCD) return i; } } - if (ppCD) *ppCD = NULL; // not found + if (ppCD) *ppCD = NULL; // not found return -1; } @@ -2897,7 +2897,7 @@ int XRayMtl::FindSampler(Class_ID findId, ClassDesc** ppCD) return i; } } - if (ppCD) *ppCD = NULL; // not found + if (ppCD) *ppCD = NULL; // not found return -1; } @@ -3027,7 +3027,7 @@ void XRayMtl::OldVerFix(int loadVer) if (loadVer < 10) { // create a shader, note: always a stdshader as it's an old version - if (shaderId < 0 || shaderId > 3) shaderId = 1; // v1 files + if (shaderId < 0 || shaderId > 3) shaderId = 1; // v1 files long cid; switch (shaderId) { @@ -3186,7 +3186,7 @@ class NewStdMtl2BumpFixCB : public PostLoadCallback XRayMtl* m; NewStdMtl2BumpFixCB(XRayMtl* s) { m = s; } - int Priority() { return 7; } // run at lower priority after normal PLCB's are all finished + int Priority() { return 7; } // run at lower priority after normal PLCB's are all finished void proc(ILoad* iload) { m->BumpFix(); @@ -3208,7 +3208,7 @@ class NewStdMtl2CB : public PostLoadCallback // make sure the right indx is selected for shaders & samplers m->SetShaderIndx(m->FindShader(m->pShader->ClassID()), FALSE); - if (m->pixelSampler == NULL) // for some alpha files! + if (m->pixelSampler == NULL) // for some alpha files! m->SetSamplerIndx(m->FindSampler(Class_ID(DEFAULT_SAMPLER_CLASS_ID, 0))); m->SetSamplerIndx(m->FindSampler(m->pixelSampler->ClassID()), FALSE); @@ -3523,7 +3523,7 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI if (sPt.x == xStop && sPt.y == yStop) long junk = -1; #endif - pShader->Update(sc.CurTime(), FOREVER); // mjm - 12.17.99 + pShader->Update(sc.CurTime(), FOREVER); // mjm - 12.17.99 pShader->GetIllumParams(sc, ip); ip.ClearOutputs(); ip.pShader = pShader; @@ -3543,7 +3543,7 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI ULONG trType = (flags & NEWSTDMTL_FILT_TRANSP) ? TRANSP_FILTER : (flags & NEWSTDMTL_ADD_TRANSP) ? TRANSP_ADD : TRANSP_SUB; - P = sc.P(); // position + P = sc.P(); // position ip.stdParams = pShader->SupportStdParams(); @@ -3571,7 +3571,7 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI if (t & MONO_CHANNEL) { // note: r always holds channel data for mono channels ip.channels[i].r = (*maps)[i].LerpMono( - ip.channels[i].r, pFrag->GetFloatChannel(nextTexIndex++)); // mjm - 1.17.00 + ip.channels[i].r, pFrag->GetFloatChannel(nextTexIndex++)); // mjm - 1.17.00 } else { @@ -3586,7 +3586,7 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI { c = pFrag->GetColorChannel(nextTexIndex++); } - c *= (*maps)[i].amount; // mjm - 1.17.00 + c *= (*maps)[i].amount; // mjm - 1.17.00 AlphaCompCol(ip.channels[i], c); } } @@ -3594,16 +3594,16 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI if (i == diffChan && (flags & NEWSTDMTL_LOCK_ADTEX) && ambChan >= 0) { AlphaCompCol(ip.channels[ambChan], c); } - } // end, don't skip - } // end, is active - } // end, for each possible map + } // end, don't skip + } // end, is active + } // end, for each possible map // Evaluate reflection map. if ((*maps)[reflChan].map) ip.hasComponents |= HAS_REFLECT_MAP; if (DOMAP(reflChan)) { ip.hasComponents |= HAS_REFLECT; - AColor rcol; // mjm - 1.17.00 + AColor rcol; // mjm - 1.17.00 if ((*maps)[reflChan].map->IsHighDynamicRange()) { LogLUV32Pixel lc; lc.value = pFrag->GetIntChannel(nextTexIndex++); @@ -3612,7 +3612,7 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI } else { - rcol = pFrag->GetColorChannel(nextTexIndex++); // mjm - 1.17.00 + rcol = pFrag->GetColorChannel(nextTexIndex++); // mjm - 1.17.00 } Color rc(rcol.r, rcol.g, rcol.b); ip.channels[reflChan] = rc; @@ -3625,7 +3625,7 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI if (DOMAP(refrChan)) { // Evaluate refraction map, as yet unfiltered by filter color. ip.refractAmt = (*maps)[refrChan].amount; - AColor rcol; // mjm - 1.17.00 + AColor rcol; // mjm - 1.17.00 if ((*maps)[refrChan].map->IsHighDynamicRange()) { LogLUV32Pixel lc; lc.value = pFrag->GetIntChannel(nextTexIndex++); @@ -3633,16 +3633,16 @@ void XRayMtl::PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexI } else { - rcol = pFrag->GetColorChannel(nextTexIndex++); // mjm - 1.17.00 + rcol = pFrag->GetColorChannel(nextTexIndex++); // mjm - 1.17.00 } Color rc(rcol.r, rcol.g, rcol.b); ip.channels[refrChan] = rc; ip.hasComponents |= HAS_REFRACT; } - } // end, at least one map + } // end, at least one map // get falloff opacity for possible use by shader or compositor - opac = ip.channels[trChan].r; // get (perhaps) textured opacity + opac = ip.channels[trChan].r; // get (perhaps) textured opacity ip.finalOpac = GetEffOpacity(sc, opac); if (ip.finalOpac < 1.0f) ip.hasComponents |= HAS_OPACITY; @@ -3765,7 +3765,7 @@ void XRayMtl::Shade(ShadeContext& sc) else sc.out.t.Black(); return; - } // end, shadow mode + } // end, shadow mode // any shader can be faceted...& bumpmapped as well if (flags & NEWSTDMTL_FACETED) { @@ -3774,7 +3774,7 @@ void XRayMtl::Shade(ShadeContext& sc) sc.SetNormal(N); } - P = sc.P(); // position + P = sc.P(); // position ip.stdParams = pShader->SupportStdParams(); @@ -3866,7 +3866,7 @@ void XRayMtl::Shade(ShadeContext& sc) } // get falloff opacity for possible use by shader or compositor - opac = ip.channels[trChan].r; // get (perhaps) textured opacity + opac = ip.channels[trChan].r; // get (perhaps) textured opacity ip.finalOpac = GetEffOpacity(sc, opac); if (ip.finalOpac < 1.0f) ip.hasComponents |= HAS_OPACITY; @@ -3886,7 +3886,7 @@ void XRayMtl::Shade(ShadeContext& sc) // with shadows off int nEles = sc.NRenderElements(); if (nEles != 0) { - IllumParams* pIp2 = CloneIp(ip); // too late for sdk, eco in progress + IllumParams* pIp2 = CloneIp(ip); // too late for sdk, eco in progress if (sc.shadow) { // get unshadowed ip sc.shadow = FALSE; @@ -3908,7 +3908,7 @@ void XRayMtl::Shade(ShadeContext& sc) xr_delete(pIp2); } - if (bumped) sc.SetNormal(N0); // restore normal + if (bumped) sc.SetNormal(N0); // restore normal } float XRayMtl::EvalDisplacement(ShadeContext& sc) @@ -4174,8 +4174,8 @@ void XRayMtl::SetupGfxMultiMaps(TimeValue t, Material* mtl, MtlMakerCallback& cb // material is assigned to. // If it cannot determine the correct answer, it returns false // -bool XRayMtl::IsOutputConst(ShadeContext& sc, // describes context of evaluation - int stdID // must be ID_AM, ect +bool XRayMtl::IsOutputConst(ShadeContext& sc, // describes context of evaluation + int stdID // must be ID_AM, ect ) { int channelID = StdIDToChannel(stdID); @@ -4197,32 +4197,32 @@ bool XRayMtl::IsOutputConst(ShadeContext& sc, // describes context of evaluatio // For a mono channel, the value is copied in all 3 components of the // output color. // -bool XRayMtl::EvalColorStdChannel(ShadeContext& sc, // describes context of evaluation - int stdID, // must be ID_AM, ect - Color& outClr // output var +bool XRayMtl::EvalColorStdChannel(ShadeContext& sc, // describes context of evaluation + int stdID, // must be ID_AM, ect + Color& outClr // output var ) { switch (stdID) { - case ID_BU: // Bump (value 8) + case ID_BU: // Bump (value 8) { return EvalBump(sc, outClr); } break; - case ID_RL: // Reflection (value 9) + case ID_RL: // Reflection (value 9) { return EvalReflection(sc, outClr); } break; - case ID_RR: // Refraction (value 10) + case ID_RR: // Refraction (value 10) { return EvalRefraction(sc, outClr); } break; - case ID_DP: // Displacement (value 11) + case ID_DP: // Displacement (value 11) { float outVal; bool bRes = EvalDisplacement(sc, outVal); @@ -4234,14 +4234,14 @@ bool XRayMtl::EvalColorStdChannel(ShadeContext& sc, // describes context of eva break; // For everything else, there's a smart method - case ID_AM: // Ambient (value 0) - case ID_DI: // Diffuse (value 1) - case ID_SP: // Specular (value 2) - case ID_SH: // Shininess (value 3). In R3 and later this is called Glossiness. - case ID_SS: // Shininess strength (value 4). In R3 and later this is called Specular Level. - case ID_SI: // Self-illumination (value 5) - case ID_OP: // Opacity (value 6) - case ID_FI: // Filter color (value 7) + case ID_AM: // Ambient (value 0) + case ID_DI: // Diffuse (value 1) + case ID_SP: // Specular (value 2) + case ID_SH: // Shininess (value 3). In R3 and later this is called Glossiness. + case ID_SS: // Shininess strength (value 4). In R3 and later this is called Specular Level. + case ID_SI: // Self-illumination (value 5) + case ID_OP: // Opacity (value 6) + case ID_FI: // Filter color (value 7) { int id = StdIDToChannel(stdID); if (id < 0 || id >= NumSubTexmaps()) return false; @@ -4261,14 +4261,14 @@ bool XRayMtl::EvalColorStdChannel(ShadeContext& sc, // describes context of eva //ЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇЇ // Evaluates the material on a single texmap channel. // -bool XRayMtl::EvalMonoStdChannel(ShadeContext& sc, // describes context of evaluation - int stdID, // must be ID_AM, ect - float& outVal // output var +bool XRayMtl::EvalMonoStdChannel(ShadeContext& sc, // describes context of evaluation + int stdID, // must be ID_AM, ect + float& outVal // output var ) { switch (stdID) { - case ID_BU: // Bump (value 8) + case ID_BU: // Bump (value 8) { Color outClr; bool bRes = EvalBump(sc, outClr); @@ -4277,33 +4277,33 @@ bool XRayMtl::EvalMonoStdChannel(ShadeContext& sc, // describes context of eval } break; - case ID_RL: // Reflection (value 9) + case ID_RL: // Reflection (value 9) { return EvalReflection(sc, outVal); } break; - case ID_RR: // Refraction (value 10) + case ID_RR: // Refraction (value 10) { return EvalRefraction(sc, outVal); } break; - case ID_DP: // Displacement (value 11) + case ID_DP: // Displacement (value 11) { return EvalDisplacement(sc, outVal); } break; // For everything else, there's a smart method - case ID_AM: // Ambient (value 0) - case ID_DI: // Diffuse (value 1) - case ID_SP: // Specular (value 2) - case ID_SH: // Shininess (value 3). In R3 and later this is called Glossiness. - case ID_SS: // Shininess strength (value 4). In R3 and later this is called Specular Level. - case ID_SI: // Self-illumination (value 5) - case ID_OP: // Opacity (value 6) - case ID_FI: // Filter color (value 7) + case ID_AM: // Ambient (value 0) + case ID_DI: // Diffuse (value 1) + case ID_SP: // Specular (value 2) + case ID_SH: // Shininess (value 3). In R3 and later this is called Glossiness. + case ID_SS: // Shininess strength (value 4). In R3 and later this is called Specular Level. + case ID_SI: // Self-illumination (value 5) + case ID_OP: // Opacity (value 6) + case ID_FI: // Filter color (value 7) { int id = StdIDToChannel(stdID); if (id < 0 || id >= NumSubTexmaps()) return false; @@ -4385,7 +4385,7 @@ bool XRayMtl::EvalChannel(ShadeContext& sc, int channelID, Color& outClr) diffColor.g = diffColor.b = diffColor.r; diffColor.a = 0.0f; } - else // if ( (diffChanType & CLR_CHANNEL ) == CLR_CHANNEL ) + else // if ( (diffChanType & CLR_CHANNEL ) == CLR_CHANNEL ) { diffColor = (*maps)[diffChanID].Eval(sc); AlphaCompCol(ip.channels[diffChanID], diffColor); @@ -4396,7 +4396,7 @@ bool XRayMtl::EvalChannel(ShadeContext& sc, int channelID, Color& outClr) ip.channels[channelID].r = (*maps)[diffChanID].LerpEvalMono(sc, ip.channels[diffChanID].r); ip.channels[channelID].g = ip.channels[channelID].b = ip.channels[channelID].r; } - else // if ( (channelType & CLR_CHANNEL ) == CLR_CHANNEL ) + else // if ( (channelType & CLR_CHANNEL ) == CLR_CHANNEL ) AlphaCompCol(ip.channels[channelID], diffColor); } } @@ -4412,7 +4412,7 @@ bool XRayMtl::EvalChannel(ShadeContext& sc, int channelID, Color& outClr) ip.channels[channelID].r = (*maps)[channelID].LerpEvalMono(sc, ip.channels[channelID].r); ip.channels[channelID].g = ip.channels[channelID].b = ip.channels[channelID].r; } - else // if ( (channelType & CLR_CHANNEL ) == CLR_CHANNEL ) + else // if ( (channelType & CLR_CHANNEL ) == CLR_CHANNEL ) { AColor c = (*maps)[channelID].Eval(sc); AlphaCompCol(ip.channels[channelID], c); diff --git a/src/plugins/Shared/GameMaterial.h b/src/plugins/Shared/GameMaterial.h index 11b923989dd..0d98e2272c7 100644 --- a/src/plugins/Shared/GameMaterial.h +++ b/src/plugins/Shared/GameMaterial.h @@ -27,13 +27,13 @@ #define NEWSTDMTL_COLOR_SI (1 << 15) #define NEWSTDMTL_FACETED (1 << 16) -#define NEWSTDMTL_ROLLUP0_OPEN (1 << 27) // shader -#define NEWSTDMTL_ROLLUP1_OPEN (1 << 28) // basic -#define NEWSTDMTL_ROLLUP2_OPEN (1 << 29) // extra -#define NEWSTDMTL_ROLLUP3_OPEN (1 << 30) // maps -#define NEWSTDMTL_ROLLUP4_OPEN (1 << 26) // sampling -#define NEWSTDMTL_ROLLUP5_OPEN (1 << 25) // dynamics -#define NEWSTDMTL_ROLLUP6_OPEN (1 << 24) // effects +#define NEWSTDMTL_ROLLUP0_OPEN (1 << 27) // shader +#define NEWSTDMTL_ROLLUP1_OPEN (1 << 28) // basic +#define NEWSTDMTL_ROLLUP2_OPEN (1 << 29) // extra +#define NEWSTDMTL_ROLLUP3_OPEN (1 << 30) // maps +#define NEWSTDMTL_ROLLUP4_OPEN (1 << 26) // sampling +#define NEWSTDMTL_ROLLUP5_OPEN (1 << 25) // dynamics +#define NEWSTDMTL_ROLLUP6_OPEN (1 << 24) // effects // only needed if the constant shader is included in shaders #define CONSTClassID (STDSHADERS_CLASS_ID + 1) @@ -53,15 +53,15 @@ enum std_maps, std2_dynamics, std2_xray -}; // pblock IDs +}; // pblock IDs enum { std2_eshader_type, std2_cshader_type, - std2_eshader_by_name, // virtual param for accessing shader type by name - std2_cshader_by_name, // virtual param for accessing shader type by name + std2_eshader_by_name, // virtual param for accessing shader type by name + std2_cshader_by_name, // virtual param for accessing shader type by name std2_gamemtl_type, - std2_gamemtl_by_name // virtual param for accessing shader type by name + std2_gamemtl_by_name // virtual param for accessing shader type by name }; // std2_shader param IDs enum @@ -71,7 +71,7 @@ enum std2_two_sided, std2_face_map, std2_faceted, - std2_shader_by_name // virtual param for accessing shader type by name + std2_shader_by_name // virtual param for accessing shader type by name }; // std2_extended param IDs enum @@ -148,7 +148,7 @@ extern TCHAR* GetString(int id); #define NUM_REFS 9 // refs -#define OLD_PBLOCK_REF 0 // reference number assignments +#define OLD_PBLOCK_REF 0 // reference number assignments #define TEXMAPS_REF 1 #define SHADER_REF 2 #define SHADER_PB_REF 3 @@ -208,17 +208,17 @@ class XRayMtl : public StdMat2, public IReshading static LPSTRVec CShaders; static LPSTRVec GameMtls; - IParamBlock* old_pblock; // ref 0, for old version loading - Texmaps* maps; // ref 1 + IParamBlock* old_pblock; // ref 0, for old version loading + Texmaps* maps; // ref 1 Interval ivalid; - ReshadeRequirements mReshadeRQ; // mjm - 06.02.00 - ReshadeRequirements mInRQ; // ca - 12/7/00 + ReshadeRequirements mReshadeRQ; // mjm - 06.02.00 + ReshadeRequirements mInRQ; // ca - 12/7/00 ULONG flags; int shaderId; - Shader* pShader; // ref 2 + Shader* pShader; // ref 2 // new PB2 paramblocks, one per rollout - IParamBlock2* pb_xray; // - IParamBlock2* pb_shader; // ref 3, 4, ... + IParamBlock2* pb_xray; // + IParamBlock2* pb_shader; // ref 3, 4, ... IParamBlock2* pb_extended; IParamBlock2* pb_sampling; IParamBlock2* pb_maps; @@ -240,7 +240,7 @@ class XRayMtl : public StdMat2, public IReshading // sampling int samplerId; - Sampler* pixelSampler; // ref 8 + Sampler* pixelSampler; // ref 8 // composite of shader/mtl channel types int channelTypes[STD2_NMAX_TEXMAPS]; @@ -263,7 +263,7 @@ class XRayMtl : public StdMat2, public IReshading return (id == OPACITY_PARAM) ? pb_extended->KeyFrameAtTime(std2_opacity, t) : FALSE; } BOOL AmtKeyAtTime(int i, TimeValue t); - int GetMapState(int indx); // returns 0 = no map, 1 = disable, 2 = mapon + int GetMapState(int indx); // returns 0 = no map, 1 = disable, 2 = mapon TSTR GetMapName(int indx); void SyncADTexLock(BOOL lockOn); @@ -281,25 +281,25 @@ class XRayMtl : public StdMat2, public IReshading void SetSoften(BOOL onoff) { SetFlag(NEWSTDMTL_SOFTEN, onoff); } void SetTexmapAmt(int imap, float amt, TimeValue t); void LockAmbDiffTex(BOOL onoff) { SetFlag(NEWSTDMTL_LOCK_ADTEX, onoff); } - void SetWire(BOOL onoff) { pb_shader->SetValue(std2_wire, 0, (onoff != 0)); } // SetFlag(NEWSTDMTL_WIRE,onoff); } + void SetWire(BOOL onoff) { pb_shader->SetValue(std2_wire, 0, (onoff != 0)); } // SetFlag(NEWSTDMTL_WIRE,onoff); } void SetWireSize(float s, TimeValue t); void SetWireUnits(BOOL onoff) { pb_extended->SetValue(std2_wire_units, 0, (onoff != 0)); - } // SetFlag(NEWSTDMTL_WIRE_UNITS,onoff); } + } // SetFlag(NEWSTDMTL_WIRE_UNITS,onoff); } void SetFaceMap(BOOL onoff) { pb_shader->SetValue(std2_face_map, 0, (onoff != 0)); - } // SetFlag(NEWSTDMTL_FACEMAP,onoff); } + } // SetFlag(NEWSTDMTL_FACEMAP,onoff); } void SetTwoSided(BOOL onoff) { pb_shader->SetValue(std2_two_sided, 0, (onoff != 0)); - } // SetFlag(NEWSTDMTL_2SIDE,onoff); } + } // SetFlag(NEWSTDMTL_2SIDE,onoff); } void SetFalloffOut(BOOL outOn) { pb_extended->SetValue(std2_falloff_type, 0, (outOn != 0)); - } // SetFlag(NEWSTDMTL_FALLOFF_OUT,onoff); } + } // SetFlag(NEWSTDMTL_FALLOFF_OUT,onoff); } void SetTransparencyType(int type); void SetFilter(Color c, TimeValue t); @@ -408,7 +408,7 @@ class XRayMtl : public StdMat2, public IReshading BOOL GetTwoSided() { return GetFlag(NEWSTDMTL_2SIDE); } BOOL GetWire() { return GetFlag(NEWSTDMTL_WIRE); } BOOL GetWireUnits() { return GetFlag(NEWSTDMTL_WIRE_UNITS); } - BOOL GetFalloffOut() { return GetFlag(NEWSTDMTL_FALLOFF_OUT); } // 1: out, 0: in + BOOL GetFalloffOut() { return GetFlag(NEWSTDMTL_FALLOFF_OUT); } // 1: out, 0: in BOOL GetAmbDiffTexLock() { return GetFlag(NEWSTDMTL_LOCK_ADTEX); } int GetTransparencyType() { @@ -509,8 +509,8 @@ class XRayMtl : public StdMat2, public IReshading // begin - ke/mjm - 03.16.00 - merge reshading code BOOL SupportsRenderElements() { return TRUE; } // BOOL SupportsReShading(ShadeContext& sc); - void UpdateReshadeRequirements(RefTargetHandle hTarget, PartID partID); // mjm - 06.02.00 - ReshadeRequirements GetReshadeRequirements() { return mReshadeRQ; } // mjm - 06.02.00 + void UpdateReshadeRequirements(RefTargetHandle hTarget, PartID partID); // mjm - 06.02.00 + ReshadeRequirements GetReshadeRequirements() { return mReshadeRQ; } // mjm - 06.02.00 void PreShade(ShadeContext& sc, IReshadeFragment* pFrag); void PostShade(ShadeContext& sc, IReshadeFragment* pFrag, int& nextTexIndex, IllumParams* ip); // end - ke/mjm - 03.16.00 - merge reshading code @@ -576,4 +576,4 @@ class XRayMtl : public StdMat2, public IReshading Mtl* CreateXRayMtl(); -#endif // __GAME_MATERIAL__H +#endif // __GAME_MATERIAL__H diff --git a/src/plugins/Shared/GameMaterial.rc b/src/plugins/Shared/GameMaterial.rc index 4d771712ef7..4af18d010f2 100644 --- a/src/plugins/Shared/GameMaterial.rc +++ b/src/plugins/Shared/GameMaterial.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 +#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -187,7 +187,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_DMTL_XRAY, DIALOG BEGIN VERTGUIDE, 8 VERTGUIDE, 206 BOTTOMMARGIN, 46 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -205,7 +205,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 3 TEXTINCLUDE BEGIN "\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -294,7 +294,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US STRINGTABLE BEGIN IDS_DS_AMOUNT "Amount" IDS_JW_GAMEMTLTYPE "Game Mtl Type" IDS_JW_GAMEMTLBYNAME "Game Mtl Name" END -#endif // English (U.S.) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -304,4 +304,4 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/plugins/Shared/TexMaps.cpp b/src/plugins/Shared/TexMaps.cpp index 45f40bfc2bb..59dfceb397d 100644 --- a/src/plugins/Shared/TexMaps.cpp +++ b/src/plugins/Shared/TexMaps.cpp @@ -196,7 +196,7 @@ void Texmaps::RescaleWorldUnits(float f) // This code will be replaced in particular implementations for (int i = 0; i < NumRefs(); i++) { - if ((i & 1) == 0) continue; // skip the amount controllers + if ((i & 1) == 0) continue; // skip the amount controllers ReferenceMaker* srm = GetReference(i); if (srm) { srm->RescaleWorldUnits(f); diff --git a/src/plugins/Shared/TexMaps.h b/src/plugins/Shared/TexMaps.h index d9baedf7a62..42da2085088 100644 --- a/src/plugins/Shared/TexMaps.h +++ b/src/plugins/Shared/TexMaps.h @@ -9,8 +9,8 @@ class TexmapSlot { public: float amount; - Control* amtCtrl; // ref to controller - Texmap* map; // ref to map + Control* amtCtrl; // ref to controller + Texmap* map; // ref to map BOOL mapOn; TSTR name; @@ -36,7 +36,7 @@ class TexmapSlot } // begin - ke/mjm - 03.16.00 - merge reshading code - float LerpMono(float origVal, float texVal) // for reShading, no eval + float LerpMono(float origVal, float texVal) // for reShading, no eval { if (amount < 0.0f) { float b = 1.0f + amount; @@ -90,7 +90,7 @@ class Texmaps : public TexmapContainer BOOL InvisibleProperty() { return TRUE; - } // maps are made visible in scripter by pb_maps paramblock in the material so don't expose them as a subanim + } // maps are made visible in scripter by pb_maps paramblock in the material so don't expose them as a subanim // int NumRefs() { return STD2_NMAX_TEXMAPS*2; } int NumRefs(); diff --git a/src/plugins/lw/Export/EditObjectImport.cpp b/src/plugins/lw/Export/EditObjectImport.cpp index ef3652342a2..84967db5c17 100644 --- a/src/plugins/lw/Export/EditObjectImport.cpp +++ b/src/plugins/lw/Export/EditObjectImport.cpp @@ -61,7 +61,7 @@ bool CEditableObject::Import_LWO(const char* fn, bool bNeedOptimize) for (Isf = I->surf; Isf; Isf = Isf->next) { // UI->ProgressUpdate(i); - Isf->alpha_mode = i; // перетираем для внутренних целей !!! + Isf->alpha_mode = i; // перетираем для внутренних целей !!! CSurface* Osf = xr_new(); m_Surfaces.push_back(Osf); if (Isf->name && Isf->name[0]) @@ -331,7 +331,7 @@ bool CEditableObject::Import_LWO(const char* fn, bool bNeedOptimize) if (Ipv.vm[vm_i].vmap->type != ID_TXUV) continue; vm_lst.push_back(st_VMapPt()); st_VMapPt& pt = vm_lst.back(); - pt.vmap_index = VMIndices[Ipv.vm[vm_i].vmap]; // номер моей VMap + pt.vmap_index = VMIndices[Ipv.vm[vm_i].vmap]; // номер моей VMap names.push_back(Ipv.vm[vm_i].vmap->name); pt.index = Ipv.vm[vm_i].index; } @@ -345,7 +345,7 @@ bool CEditableObject::Import_LWO(const char* fn, bool bNeedOptimize) continue; vm_lst.push_back(st_VMapPt()); st_VMapPt& pt = vm_lst.back(); - pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap + pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap pt.index = Ipt.vm[vm_i].index; } } @@ -359,7 +359,7 @@ bool CEditableObject::Import_LWO(const char* fn, bool bNeedOptimize) if (Ipt.vm[vm_i].vmap->type != ID_WGHT) continue; vm_lst.push_back(st_VMapPt()); st_VMapPt& pt = vm_lst.back(); - pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap + pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap pt.index = Ipt.vm[vm_i].index; } m_vm_lst.count = vm_lst.size(); @@ -379,7 +379,7 @@ bool CEditableObject::Import_LWO(const char* fn, bool bNeedOptimize) // MESH->DumpAdjacency(); if (bNeedOptimize) MESH->Optimize(false); // MESH->DumpAdjacency(); - MESH->RebuildVMaps(); // !!!!!! + MESH->RebuildVMaps(); // !!!!!! } } } diff --git a/src/plugins/lw/Export/EditObjectImportDB.cpp b/src/plugins/lw/Export/EditObjectImportDB.cpp index 2a94598f1b6..6966f16db1e 100644 --- a/src/plugins/lw/Export/EditObjectImportDB.cpp +++ b/src/plugins/lw/Export/EditObjectImportDB.cpp @@ -191,7 +191,7 @@ bool CEditableObject::Import_LWO(st_ObjectDB* I) if (Ipv.vm[vm_i].vmap->type != LWVMAP_TXUV) continue; vm_lst.push_back(st_VMapPt()); st_VMapPt& pt = vm_lst.back(); - pt.vmap_index = VMIndices[Ipv.vm[vm_i].vmap]; // номер моей VMap + pt.vmap_index = VMIndices[Ipv.vm[vm_i].vmap]; // номер моей VMap pt.index = Ipv.vm[vm_i].index; } } @@ -210,7 +210,7 @@ bool CEditableObject::Import_LWO(st_ObjectDB* I) if (Ipt.vm[vm_i].vmap->type != LWVMAP_TXUV) continue; vm_lst.push_back(st_VMapPt()); st_VMapPt& pt = vm_lst.back(); - pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap + pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap pt.index = Ipt.vm[vm_i].index; } } @@ -223,7 +223,7 @@ bool CEditableObject::Import_LWO(st_ObjectDB* I) if (Ipt.vm[vm_i].vmap->type != LWVMAP_WGHT) continue; vm_lst.push_back(st_VMapPt()); st_VMapPt& pt = vm_lst.back(); - pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap + pt.vmap_index = VMIndices[Ipt.vm[vm_i].vmap]; // номер моей VMap pt.index = Ipt.vm[vm_i].index; } } diff --git a/src/plugins/lw/Export/LW_export_object.cpp b/src/plugins/lw/Export/LW_export_object.cpp index 3ba201ae35e..71544e7a618 100644 --- a/src/plugins/lw/Export/LW_export_object.cpp +++ b/src/plugins/lw/Export/LW_export_object.cpp @@ -144,7 +144,7 @@ void __cdecl SaveObject(GlobalFunc* global) } if (!bErr) { LPCSTR lwo_nm = g_objinfo->filename(object); - { // append path + { // append path string_path path, dr, di; _splitpath(lwo_nm, dr, di, 0, 0); strconcat(sizeof(path), path, dr, di); diff --git a/src/plugins/lw/Export/scenscan/objectdb.h b/src/plugins/lw/Export/scenscan/objectdb.h index be00de45281..8dca40777a5 100644 --- a/src/plugins/lw/Export/scenscan/objectdb.h +++ b/src/plugins/lw/Export/scenscan/objectdb.h @@ -15,46 +15,46 @@ Typedefs and function prototypes for an object database. typedef struct st_DBVMapVal { - char* name; // name - LWID type; // type of data (e.g. UVs, weights) - int dim; // dimension (number of values per point) - int nverts; // number of vertices - int* vindex; // array of vertex indexes - int* vdpol; // -1 - point map 0..n-polymap(polygon number) - float** val; // 2D array of vmap values + char* name; // name + LWID type; // type of data (e.g. UVs, weights) + int dim; // dimension (number of values per point) + int nverts; // number of vertices + int* vindex; // array of vertex indexes + int* vdpol; // -1 - point map 0..n-polymap(polygon number) + float** val; // 2D array of vmap values } DBVMap; typedef struct st_DBVMapPt { - DBVMap* vmap; // where the values are stored - int index; // offset into the vmap value arrays + DBVMap* vmap; // where the values are stored + int index; // offset into the vmap value arrays } DBVMapPt; typedef struct st_DBPoint { - LWPntID id; // Layout point ID - LWFVector pos[2]; // initial and final position - int npols; // number of polygons sharing the point - int* pol; // array of polygon indexes - int nvmaps; // number of vmap values - DBVMapPt* vm; // array of vmap values + LWPntID id; // Layout point ID + LWFVector pos[2]; // initial and final position + int npols; // number of polygons sharing the point + int* pol; // array of polygon indexes + int nvmaps; // number of vmap values + DBVMapPt* vm; // array of vmap values } DBPoint; typedef struct st_DBPolVert { - int index; // index into the point array - LWFVector norm[2]; // initial and final normals + int index; // index into the point array + LWFVector norm[2]; // initial and final normals int nvmaps; - DBVMapPt* vm; // array of vmap references + DBVMapPt* vm; // array of vmap references } DBPolVert; typedef struct st_DBPolygon { - LWPolID id; // Layout polygon ID - int sindex; // surface index - LWFVector norm[2]; // initial and final normals - int nverts; // number of vertices - DBPolVert* v; // vertex array + LWPolID id; // Layout polygon ID + int sindex; // surface index + LWFVector norm[2]; // initial and final normals + int nverts; // number of vertices + DBPolVert* v; // vertex array } DBPolygon; typedef struct st_lwPlugin @@ -68,57 +68,57 @@ typedef struct st_lwPlugin typedef struct st_DBSurface { - LWSurfaceID id; // surface ID - char* name; // surface name - char textures[8][64]; // textures + LWSurfaceID id; // surface ID + char* name; // surface name + char textures[8][64]; // textures int tex_cnt; - float colr[3]; // color - float lumi; // luminosity - float diff; // diffuse level - float spec; // specularity - float refl; // reflectivity - float tran; // transparency - float trnl; // translucency - float rind; // index of refraction - float bump; // bump - float glos; // glossiness - float shrp; // diffuse sharpness - float sman; // max smoothing angle (radians) - float rsan; // reflection seam angle - float tsan; // refraction seam angle - float clrf; // color filter - float clrh; // color highlight - float adtr; // additive transparency - float aval; // alpha value - float gval; // glow value - float lcol[3]; // line color - float lsiz; // line size - int alph; // alpha options - int rfop; // reflection options - int trop; // refraction options - int side; // sidedness - int glow; // glow - int line; // render outlines - LWImageID rimg; // reflection image - LWImageID timg; // refraction image - lwPlugin* shader; // linked list of shaders + float colr[3]; // color + float lumi; // luminosity + float diff; // diffuse level + float spec; // specularity + float refl; // reflectivity + float tran; // transparency + float trnl; // translucency + float rind; // index of refraction + float bump; // bump + float glos; // glossiness + float shrp; // diffuse sharpness + float sman; // max smoothing angle (radians) + float rsan; // reflection seam angle + float tsan; // refraction seam angle + float clrf; // color filter + float clrh; // color highlight + float adtr; // additive transparency + float aval; // alpha value + float gval; // glow value + float lcol[3]; // line color + float lsiz; // line size + int alph; // alpha options + int rfop; // reflection options + int trop; // refraction options + int side; // sidedness + int glow; // glow + int line; // render outlines + LWImageID rimg; // reflection image + LWImageID timg; // refraction image + lwPlugin* shader; // linked list of shaders int nshaders; } DBSurface; typedef struct st_ObjectDB { - char* filename; // object filename - LWItemID id; // Layout item ID - int npoints; // number of points - int npolygons; // number of polygons - int nsurfaces; // number of surfaces - int nvertmaps; // number of vertex maps - DBPoint* pt; // point array - int* vsort; // point indexes sorted by point position - int vsortkey; // coordinate for position sort - DBPolygon* pol; // polygon array - DBSurface* surf; // surface array - DBVMap* vmap; // vmap array + char* filename; // object filename + LWItemID id; // Layout item ID + int npoints; // number of points + int npolygons; // number of polygons + int nsurfaces; // number of surfaces + int nvertmaps; // number of vertex maps + DBPoint* pt; // point array + int* vsort; // point indexes sorted by point position + int vsortkey; // coordinate for position sort + DBPolygon* pol; // polygon array + DBSurface* surf; // surface array + DBVMap* vmap; // vmap array } ObjectDB; int findVert(ObjectDB* odb, LWPntID id); diff --git a/src/plugins/lw/Export/scenscan/vecmat.h b/src/plugins/lw/Export/scenscan/vecmat.h index 298e6b7cd27..35d8a2479d6 100644 --- a/src/plugins/lw/Export/scenscan/vecmat.h +++ b/src/plugins/lw/Export/scenscan/vecmat.h @@ -15,4 +15,4 @@ float dot(LWFVector a, LWFVector b); void cross(LWFVector a, LWFVector b, LWFVector c); void normalize(LWFVector v); -#endif //_VECMAT_H_/* +#endif //_VECMAT_H_/* diff --git a/src/plugins/lw/Export/stdafx.h b/src/plugins/lw/Export/stdafx.h index b42de2f69fc..912703bac0f 100644 --- a/src/plugins/lw/Export/stdafx.h +++ b/src/plugins/lw/Export/stdafx.h @@ -71,4 +71,4 @@ DEFINE_VECTOR(AnsiString, AStringVec, AStringIt); #define GAMEMTL_NONE u32(-1) #define _game_data_ "$game_data$" -#endif // StdafxH +#endif // StdafxH diff --git a/src/plugins/lw/Shader/stdafx.h b/src/plugins/lw/Shader/stdafx.h index 43fd5cb426b..d5acd6b931c 100644 --- a/src/plugins/lw/Shader/stdafx.h +++ b/src/plugins/lw/Shader/stdafx.h @@ -64,4 +64,4 @@ DEFINE_VECTOR(AnsiString, AStringVec, AStringIt); #define GAMEMTL_NONE u32(-1) #define _game_data_ "$game_data$" -#endif // StdafxH +#endif // StdafxH diff --git a/src/utils/CompressionTest/CompressionTest.cpp b/src/utils/CompressionTest/CompressionTest.cpp index 8ea6d32f1d8..6890887ade9 100644 --- a/src/utils/CompressionTest/CompressionTest.cpp +++ b/src/utils/CompressionTest/CompressionTest.cpp @@ -30,7 +30,7 @@ class StopWatch QueryPerformanceCounter(&t); return ((t.QuadPart - _start_time.QuadPart) * 1000.0) / _freq.QuadPart; } - double time() const // in milliseconds + double time() const // in milliseconds { return ((_stop_time.QuadPart - _start_time.QuadPart) * 1000.0) / _freq.QuadPart; } @@ -261,7 +261,7 @@ static bool _ProcessFile_PPMd(const char* file_name) delete[] uncomp_data; delete[] comp_data; delete[] src_data; - } // if file open + } // if file open return success; } @@ -362,7 +362,7 @@ static bool _ProcessFile_LZO(const char* file_name) delete[] uncomp_data; delete[] comp_data; delete[] src_data; - } // if file open + } // if file open return success; } @@ -489,7 +489,7 @@ int main(int argc, char* argv[]) printf("LZO : %2.1f%% %u -> %u\n", 100.0f * float(_LZO_TotalCompressed) / float(_LZO_TotalUncompressed), _LZO_TotalUncompressed, _LZO_TotalCompressed); - } // if( argc > 1 ) + } // if( argc > 1 ) return 0; } diff --git a/src/utils/ETools/ArbitraryList.h b/src/utils/ETools/ArbitraryList.h index df2cf3cdc73..f459d27e48c 100644 --- a/src/utils/ETools/ArbitraryList.h +++ b/src/utils/ETools/ArbitraryList.h @@ -19,9 +19,9 @@ template class ArbitraryList { - T* pT; // The list. - u32 iSize; // The current size of the list. - u32 iReservedSize; // The current reserved size of the list. + T* pT; // The list. + u32 iSize; // The current size of the list. + u32 iReservedSize; // The current reserved size of the list. public: // Constructor, with optional initial size setting. ArbitraryList(u32 iInitialSize = 0) @@ -160,4 +160,4 @@ class ArbitraryList } }; -#endif //#ifndef ArbitraryListH +#endif //#ifndef ArbitraryListH diff --git a/src/utils/ETools/DLink.h b/src/utils/ETools/DLink.h index e94150531a0..827a7d37cb8 100644 --- a/src/utils/ETools/DLink.h +++ b/src/utils/ETools/DLink.h @@ -247,4 +247,4 @@ } \ } -#endif //#ifndef DLinkH +#endif //#ifndef DLinkH diff --git a/src/utils/ETools/ETools.cpp b/src/utils/ETools/ETools.cpp index 35d5c891757..59a0000e0db 100644 --- a/src/utils/ETools/ETools.cpp +++ b/src/utils/ETools/ETools.cpp @@ -34,31 +34,31 @@ ETOOLS_API bool __stdcall TestRayTriA( pvec.crossproduct(D, edge2); // if determinant is near zero, ray lies in plane of triangle det = edge1.dotproduct(pvec); - if (bCull) { // define TEST_CULL if culling is desired + if (bCull) { // define TEST_CULL if culling is desired if (det < EPS) return false; - tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec); // calculate U parameter and test bounds + tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec); // calculate U parameter and test bounds if (u < 0.0 || u > det) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec); // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec); // calculate V parameter and test bounds if (v < 0.0 || u + v > det) return false; - range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle + range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle inv_det = 1.0f / det; range *= inv_det; u *= inv_det; v *= inv_det; } else - { // the non-culling branch + { // the non-culling branch if (det > -EPS && det < EPS) return false; inv_det = 1.0f / det; - tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds if (u < 0.0f || u > 1.0f) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle } return true; } @@ -75,31 +75,31 @@ ETOOLS_API bool __stdcall TestRayTriB( pvec.crossproduct(D, edge2); // if determinant is near zero, ray lies in plane of triangle det = edge1.dotproduct(pvec); - if (bCull) { // define TEST_CULL if culling is desired + if (bCull) { // define TEST_CULL if culling is desired if (det < EPS) return false; - tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec); // calculate U parameter and test bounds + tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec); // calculate U parameter and test bounds if (u < 0.0f || u > det) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec); // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec); // calculate V parameter and test bounds if (v < 0.0f || u + v > det) return false; - range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle + range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle inv_det = 1.0f / det; range *= inv_det; u *= inv_det; v *= inv_det; } else - { // the non-culling branch + { // the non-culling branch if (det > -EPS && det < EPS) return false; inv_det = 1.0f / det; - tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds if (u < 0.0f || u > 1.0f) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle } return true; } @@ -122,12 +122,12 @@ ETOOLS_API bool __stdcall TestRayTri2(const Fvector& C, const Fvector& D, Fvecto return false; } inv_det = 1.0f / det; - tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects plane + tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects plane if (u < 0.0f || u > 1.0f) return false; - v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; return true; } diff --git a/src/utils/ETools/ETools.h b/src/utils/ETools/ETools.h index 42be1ec0229..2ebdabe2b74 100644 --- a/src/utils/ETools/ETools.h +++ b/src/utils/ETools/ETools.h @@ -59,4 +59,4 @@ ETOOLS_API bool __stdcall intersect(const Fmatrix& object_transform, const IKine }; }; -#endif // EToolsH \ No newline at end of file +#endif // EToolsH \ No newline at end of file diff --git a/src/utils/ETools/Intersect.cpp b/src/utils/ETools/Intersect.cpp index fe803e27d27..637b000b8f3 100644 --- a/src/utils/ETools/Intersect.cpp +++ b/src/utils/ETools/Intersect.cpp @@ -70,7 +70,7 @@ static bool intersect(const Fvector& start, const Fvector& dir, const Fvector& e clip(+dir.z, -start.z - extent[2], rfT0, rfT1, ax0, ax1, a_nz) && clip(-dir.z, +start.z - extent[2], rfT0, rfT1, ax0, ax1, a_pz); - return bNotEntirelyClipped && (ax0 != a_none || ax1 != a_none); //( rfT0 != fSaveT0 || rfT1 != fSaveT1 ); + return bNotEntirelyClipped && (ax0 != a_none || ax1 != a_none); //( rfT0 != fSaveT0 || rfT1 != fSaveT1 ); } bool intersect(const Fobb& box, const Fvector& origin, const Fvector& direction, float& dist, Fvector& norm) diff --git a/src/utils/ETools/PropSlimTools.h b/src/utils/ETools/PropSlimTools.h index 9218ec84490..f0e3c6e6d58 100644 --- a/src/utils/ETools/PropSlimTools.h +++ b/src/utils/ETools/PropSlimTools.h @@ -16,16 +16,16 @@ #pragma pack(push, 1) struct VIPM_SWR { - u32 offset; // Offset of the first index in the index buffer to start at (note! no retrictions. Can easily be >64k) - u16 num_tris; // Number of tris to render (most cards can't do more than 65536) - u16 num_verts; // Number of vertices to render with (using WORD indices) + u32 offset; // Offset of the first index in the index buffer to start at (note! no retrictions. Can easily be >64k) + u16 num_tris; // Number of tris to render (most cards can't do more than 65536) + u16 num_verts; // Number of vertices to render with (using WORD indices) }; #pragma pack(pop) struct VIPM_Result { ArbitraryList permute_verts; - ArbitraryList swr_records; // The records of the collapses. + ArbitraryList swr_records; // The records of the collapses. ArbitraryList indices; ~VIPM_Result() { @@ -44,4 +44,4 @@ ETOOLS_API VIPM_Result* __stdcall VIPM_Convert( ETOOLS_API void __stdcall VIPM_Destroy(); }; -#endif // PropSlimToolsH \ No newline at end of file +#endif // PropSlimToolsH \ No newline at end of file diff --git a/src/utils/ETools/StdAfx.h b/src/utils/ETools/StdAfx.h index 382d464b1a1..2c8e6dfda28 100644 --- a/src/utils/ETools/StdAfx.h +++ b/src/utils/ETools/StdAfx.h @@ -21,9 +21,9 @@ #pragma comment(lib, "d3dx9.lib") // Warnings -#pragma warning(disable : 4786) // too long names -#pragma warning(disable : 4503) // decorated name length exceeded -#pragma warning(disable : 4251) // object needs DLL interface +#pragma warning(disable : 4786) // too long names +#pragma warning(disable : 4503) // decorated name length exceeded +#pragma warning(disable : 4251) // object needs DLL interface #pragma comment(lib, "xrCore.lib") #pragma comment(lib, "xrQSlim.lib") @@ -31,4 +31,4 @@ //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) +#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) diff --git a/src/utils/ETools/mesh.h b/src/utils/ETools/mesh.h index f469c399c67..a546ebee9ca 100644 --- a/src/utils/ETools/mesh.h +++ b/src/utils/ETools/mesh.h @@ -49,21 +49,21 @@ class MeshTri private: DlinkDefine(MeshTri, List); - DWORD dwListId; // For use when doing consistency checks. + DWORD dwListId; // For use when doing consistency checks. void InternalDelete(BOOL bBinUnusedEdges); public: - MeshPt* pPt1; // Points. + MeshPt* pPt1; // Points. MeshPt* pPt2; MeshPt* pPt3; - MeshEdge* pEdge12; // Edges between point numbers. + MeshEdge* pEdge12; // Edges between point numbers. MeshEdge* pEdge23; MeshEdge* pEdge31; DlinkMethods(MeshTri, List); - MESHTRI_APP_DEFINED // App-defined data. + MESHTRI_APP_DEFINED // App-defined data. MeshTri(void); // Set pEdgeListRoot to non-NULL to autocreate edges. @@ -113,19 +113,19 @@ class MeshEdge private: DlinkDefine(MeshEdge, List); - DWORD dwListId; // For use when doing consistency checks. + DWORD dwListId; // For use when doing consistency checks. public: MeshPt* pPt1; MeshPt* pPt2; - MeshTri* pTri12; // Tri that numbers pt1, pt2 in that order. - MeshTri* pTri21; // Tri that numbers pt2, pt1 in that order. + MeshTri* pTri12; // Tri that numbers pt1, pt2 in that order. + MeshTri* pTri21; // Tri that numbers pt2, pt1 in that order. - MeshEdge* pEdgeProx; // The edge that this is close to, if any. + MeshEdge* pEdgeProx; // The edge that this is close to, if any. DlinkMethods(MeshEdge, List); - MESHEDGE_APP_DEFINED // App-defined data. + MESHEDGE_APP_DEFINED // App-defined data. // BINARY_HEAP_VARS(); // Helper stuff. @@ -177,19 +177,19 @@ class MeshPt friend class MeshTri; private: - ArbitraryList EdgeList; // The list of edges that use this point (in no order). - ArbitraryList TriList; // The list of tris that use this point (in no order). - ArbitraryList ProxPtList; // The list of prox pts (in no order). + ArbitraryList EdgeList; // The list of edges that use this point (in no order). + ArbitraryList TriList; // The list of tris that use this point (in no order). + ArbitraryList ProxPtList; // The list of prox pts (in no order). - int iCurTriNum; // Used with First/NextTri. - int iCurEdgeNum; // Used with First/NextEdge. - int iCurProxNum; // Used with First/NextProx. + int iCurTriNum; // Used with First/NextTri. + int iCurEdgeNum; // Used with First/NextEdge. + int iCurProxNum; // Used with First/NextProx. DlinkDefine(MeshPt, List); - DWORD dwListId; // For use when doing consistency checks. + DWORD dwListId; // For use when doing consistency checks. public: - MESHPT_APP_DEFINED // App-defined data. + MESHPT_APP_DEFINED // App-defined data. DlinkMethods(MeshPt, List); diff --git a/src/utils/ETools/object.cpp b/src/utils/ETools/object.cpp index 8b610c87899..574ce859ae5 100644 --- a/src/utils/ETools/object.cpp +++ b/src/utils/ETools/object.cpp @@ -123,7 +123,7 @@ void Object::CreateEdgeCollapse(MeshPt* pptBinned, MeshPt* pptKept) pGCI->pptBin = pptBinned; pGCI->pptKeep = pptKept; - const int c_iMaxNumTris = 100; // Grow as needed. + const int c_iMaxNumTris = 100; // Grow as needed. MeshTri* pBinnedTris[c_iMaxNumTris]; MeshTri* ptri; @@ -131,7 +131,7 @@ void Object::CreateEdgeCollapse(MeshPt* pptBinned, MeshPt* pptKept) long bNeedNewLevel = FALSE; for (ptri = pptBinned->FirstTri(); ptri != NULL; ptri = pptBinned->NextTri()) { - VERIFY(iNumTrisCollapsed < c_iMaxNumTris); // Grow c_iMaxNumTris as needed. + VERIFY(iNumTrisCollapsed < c_iMaxNumTris); // Grow c_iMaxNumTris as needed. pBinnedTris[iNumTrisCollapsed++] = ptri; if (ptri->mytri.iSlidingWindowLevel != iCurSlidingWindowLevel) { VERIFY(ptri->mytri.iSlidingWindowLevel == iCurSlidingWindowLevel + 1); diff --git a/src/utils/ETools/object.h b/src/utils/ETools/object.h index 206dfb31d87..b12c1607137 100644 --- a/src/utils/ETools/object.h +++ b/src/utils/ETools/object.h @@ -30,7 +30,7 @@ struct MyPt DWORD dwNewIndex; // Temporary data. - MeshPt* pTempPt; // Temporary data. + MeshPt* pTempPt; // Temporary data. }; struct MyEdge @@ -41,7 +41,7 @@ struct MyEdge struct MyTri { // Temporary data. - int iSlidingWindowLevel; // Which sliding window level this tri belongs to. + int iSlidingWindowLevel; // Which sliding window level this tri belongs to. DWORD dwNewIndex; MeshTri* pOriginalTri; @@ -69,15 +69,15 @@ struct GeneralCollapseInfo ArbitraryList TriOriginal; ArbitraryList TriCollapsed; - int iSlidingWindowLevel; // Which sliding window level the binned tris will belong to. + int iSlidingWindowLevel; // Which sliding window level the binned tris will belong to. ArbitraryList - TriNextLevel; // On collapses that change levels, lists the tris that were on the next level. + TriNextLevel; // On collapses that change levels, lists the tris that were on the next level. MeshPt* pptBin; MeshPt* pptKeep; - float fError; // Error of this collapse. - int iNumTris; // Number of tris after this collapse has been made. + float fError; // Error of this collapse. + int iNumTris; // Number of tris after this collapse has been made. DlinkMethods(GeneralCollapseInfo, List); @@ -107,9 +107,9 @@ struct Object // &CollapseRoot = no more collapses to do. GeneralCollapseInfo* pNextCollapse; - int iFullNumTris; // How many tris with no collapses. - int iFullNumPts; // How many pts with no collapses. - int iNumCollapses; // Total number of collapses. + int iFullNumTris; // How many tris with no collapses. + int iFullNumPts; // How many pts with no collapses. + int iNumCollapses; // Total number of collapses. int iCurSlidingWindowLevel; @@ -156,4 +156,4 @@ struct Object bool Valid(void); }; -#endif // objectH +#endif // objectH diff --git a/src/utils/ETools/object_sliding.cpp b/src/utils/ETools/object_sliding.cpp index 94b9fa13721..3cfc29a9737 100644 --- a/src/utils/ETools/object_sliding.cpp +++ b/src/utils/ETools/object_sliding.cpp @@ -66,7 +66,7 @@ BOOL CalculateSW(Object* object, VIPM_Result* result, u32 optimize_vertex_order) int iNumTris = 0; for (tri = object->CurTriRoot.ListNext(); tri != NULL; tri = tri->ListNext()) { - tri->mytri.dwNewIndex = INVALID_INDEX; // Mark them as not being in a collapse. + tri->mytri.dwNewIndex = INVALID_INDEX; // Mark them as not being in a collapse. iNumTris++; } // A lot of cards have this annoying limit - see D3DCAPS8.MaxPrimitiveCount, which is @@ -126,7 +126,7 @@ BOOL CalculateSW(Object* object, VIPM_Result* result, u32 optimize_vertex_order) // Reserve space for the collapse table - this is stored so that // "number of collapses" is the index. So we'll be adding from the // back. - iCurCollapse++; // Implicit "last collapse" is state after last collapse. + iCurCollapse++; // Implicit "last collapse" is state after last collapse. result->swr_records.resize(iCurCollapse); // And add the last one. iCurCollapse--; @@ -164,7 +164,7 @@ BOOL CalculateSW(Object* object, VIPM_Result* result, u32 optimize_vertex_order) int iJustCheckingNumTris = 0; for (tri = object->CurTriRoot.ListNext(); tri != NULL; tri = tri->ListNext()) { - tri->mytri.dwNewIndex = INVALID_INDEX; // Mark them as not being in a collapse. + tri->mytri.dwNewIndex = INVALID_INDEX; // Mark them as not being in a collapse. iJustCheckingNumTris++; } R_ASSERT(iJustCheckingNumTris == iCurNumTris); @@ -191,7 +191,7 @@ BOOL CalculateSW(Object* object, VIPM_Result* result, u32 optimize_vertex_order) MeshTri* tri = pTriInfo->ppt[0]->FindTri(pTriInfo->ppt[1], pTriInfo->ppt[2]); R_ASSERT(tri != NULL); R_ASSERT( - tri->mytri.dwNewIndex == INVALID_INDEX); // Should not have been in a collapse this level. + tri->mytri.dwNewIndex == INVALID_INDEX); // Should not have been in a collapse this level. R_ASSERT(pTriInfo->ppt[0]->mypt.dwNewIndex < wCurIndex); R_ASSERT(pTriInfo->ppt[1]->mypt.dwNewIndex < wCurIndex); @@ -246,7 +246,7 @@ BOOL CalculateSW(Object* object, VIPM_Result* result, u32 optimize_vertex_order) GeneralTriInfo* pTriInfo = pCollapse->TriOriginal.item(i); MeshTri* tri = pTriInfo->ppt[0]->FindTri(pTriInfo->ppt[1], pTriInfo->ppt[2]); R_ASSERT(tri != NULL); - tri->mytri.dwNewIndex = 1; // Mark it has having been in a collapse. + tri->mytri.dwNewIndex = 1; // Mark it has having been in a collapse. R_ASSERT(pTriInfo->ppt[0]->mypt.dwNewIndex < wCurIndex); R_ASSERT(pTriInfo->ppt[1]->mypt.dwNewIndex < wCurIndex); @@ -360,7 +360,7 @@ BOOL CalculateSW(Object* object, VIPM_Result* result, u32 optimize_vertex_order) { R_ASSERT((j + swr->offset) < result->indices.size()); swr->num_verts = - _max(swr->num_verts, *(result->indices.item(j + swr->offset))); // fignya index ne doljen bit bolshe!!! + _max(swr->num_verts, *(result->indices.item(j + swr->offset))); // fignya index ne doljen bit bolshe!!! //. R_ASSERT ( *(result->indices.item(j+swr->offset)) < swr->num_verts ); if (*(result->indices.item(j + swr->offset)) >= swr->num_verts) { bRes = FALSE; diff --git a/src/utils/ETools/object_sliding.h b/src/utils/ETools/object_sliding.h index 069c898833a..df77cb79ed9 100644 --- a/src/utils/ETools/object_sliding.h +++ b/src/utils/ETools/object_sliding.h @@ -5,4 +5,4 @@ BOOL CalculateSW(Object* object, VIPM_Result* result, u32 optimize_vertex_order); -#endif // Object_SlidingH \ No newline at end of file +#endif // Object_SlidingH \ No newline at end of file diff --git a/src/utils/ETools/quad.h b/src/utils/ETools/quad.h index 97b851a14af..b922a2bdd65 100644 --- a/src/utils/ETools/quad.h +++ b/src/utils/ETools/quad.h @@ -114,4 +114,4 @@ struct Quad3 } }; -#endif // quadH +#endif // quadH diff --git a/src/utils/ETools/xrXRC.h b/src/utils/ETools/xrXRC.h index 5ffef643f2a..6600d95630b 100644 --- a/src/utils/ETools/xrXRC.h +++ b/src/utils/ETools/xrXRC.h @@ -76,4 +76,4 @@ class ENGINE_API xrXRC }; ENGINE_API extern xrXRC XRC; -#endif // !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_) +#endif // !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_) diff --git a/src/utils/LWO/StdAfx.h b/src/utils/LWO/StdAfx.h index 0ba8f9a9beb..e474377f51c 100644 --- a/src/utils/LWO/StdAfx.h +++ b/src/utils/LWO/StdAfx.h @@ -8,10 +8,10 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 // Insert your headers here -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include @@ -25,4 +25,4 @@ //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_STDAFX_H__626866A3_43B1_4A3E_ABC5_720F67799F19__INCLUDED_) +#endif // !defined(AFX_STDAFX_H__626866A3_43B1_4A3E_ABC5_720F67799F19__INCLUDED_) diff --git a/src/utils/ctool/PPMTrain.cpp b/src/utils/ctool/PPMTrain.cpp index bcc32b32f00..df49f651cbe 100644 --- a/src/utils/ctool/PPMTrain.cpp +++ b/src/utils/ctool/PPMTrain.cpp @@ -40,8 +40,8 @@ static struct PPM_CONTEXT } * MinContext, *MaxContext; #pragma pack() -static BYTE QTable[260]; // constants -static PPM_CONTEXT::STATE* FoundState; // found next state transition +static BYTE QTable[260]; // constants +static PPM_CONTEXT::STATE* FoundState; // found next state transition static int NumMasked, OrderFall, MaxOrder; static BYTE CharMask[256]; diff --git a/src/utils/ctool/ctool.cpp b/src/utils/ctool/ctool.cpp index 2097ad92460..52c783c2a16 100644 --- a/src/utils/ctool/ctool.cpp +++ b/src/utils/ctool/ctool.cpp @@ -4,8 +4,8 @@ #include "xrCore/_types.h" #undef FLT_MAX #undef FLT_MIN -#include #include +#include #include #include #define WIN32_LEAN_AND_MEAN @@ -269,7 +269,7 @@ static void _BuildDictionary(const char* bins_file, const char* dst_name = "") const char* dic_file = IsEmptyString(dst_name) ? "lzo.dic" : dst_name; FILE* dic = fopen(dic_file, "wb"); - float const lzo_dict_max_size = 5.0f * 1024; // 5 Kb + float const lzo_dict_max_size = 5.0f * 1024; // 5 Kb if (dic) { // unsigned min_sz = 200; diff --git a/src/utils/mp_balancer/iostreams_proxy.cpp b/src/utils/mp_balancer/iostreams_proxy.cpp index ad309d6b0f9..a5d4b2f5b95 100644 --- a/src/utils/mp_balancer/iostreams_proxy.cpp +++ b/src/utils/mp_balancer/iostreams_proxy.cpp @@ -11,4 +11,4 @@ console_output clog; char const* endl = "\n"; } -#endif //#ifdef _STLP_NO_IOSTREAMS \ No newline at end of file +#endif //#ifdef _STLP_NO_IOSTREAMS \ No newline at end of file diff --git a/src/utils/mp_balancer/iostreams_proxy.h b/src/utils/mp_balancer/iostreams_proxy.h index f98618c254d..efb21efe25d 100644 --- a/src/utils/mp_balancer/iostreams_proxy.h +++ b/src/utils/mp_balancer/iostreams_proxy.h @@ -6,7 +6,7 @@ #ifndef _STLP_NO_IOSTREAMS #include -#else //#ifdef _STLP_NO_IOSTREAMS +#else //#ifdef _STLP_NO_IOSTREAMS namespace std { @@ -21,15 +21,15 @@ class console_output printf(str); return *this; } -}; // class console_output +}; // class console_output extern console_output cout; extern console_output cerr; extern console_output clog; extern char const* endl; -}; // namespace std +}; // namespace std -#endif //#ifndef _STLP_NO_IOSTREAMS +#endif //#ifndef _STLP_NO_IOSTREAMS -#endif //#ifndef IOSTREAMS_PROXY_INCLUDED \ No newline at end of file +#endif //#ifndef IOSTREAMS_PROXY_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_balancer/pch.h b/src/utils/mp_balancer/pch.h index 872c23e1af8..2b1a196aaa5 100644 --- a/src/utils/mp_balancer/pch.h +++ b/src/utils/mp_balancer/pch.h @@ -13,4 +13,4 @@ #include -#endif // #define PCH_H_INCLUDED \ No newline at end of file +#endif // #define PCH_H_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_balancer/statistics_collector.hpp b/src/utils/mp_balancer/statistics_collector.hpp index 26ead688fe3..52c94d3cd75 100644 --- a/src/utils/mp_balancer/statistics_collector.hpp +++ b/src/utils/mp_balancer/statistics_collector.hpp @@ -22,4 +22,4 @@ class statistics_collector void load_settings(); }; -#endif //#ifndef STATISTICS_COLLECTOR +#endif //#ifndef STATISTICS_COLLECTOR diff --git a/src/utils/mp_balancer/tools.hpp b/src/utils/mp_balancer/tools.hpp index 0a8ba9241e1..5305073bc27 100644 --- a/src/utils/mp_balancer/tools.hpp +++ b/src/utils/mp_balancer/tools.hpp @@ -24,4 +24,4 @@ inline void get_string_from_collection(xr_vector const& src_collecti } } -#endif //#ifndef TOOLS_HPP \ No newline at end of file +#endif //#ifndef TOOLS_HPP \ No newline at end of file diff --git a/src/utils/mp_balancer/wpn_collection.hpp b/src/utils/mp_balancer/wpn_collection.hpp index 4ebf62e0564..6b3a075e67b 100644 --- a/src/utils/mp_balancer/wpn_collection.hpp +++ b/src/utils/mp_balancer/wpn_collection.hpp @@ -47,6 +47,6 @@ class weapon_collection private: textract_list extract_list; tnew_config_map new_config; -}; // class weapon_collection +}; // class weapon_collection -#endif //#ifndef WEAPON_COLLECTION \ No newline at end of file +#endif //#ifndef WEAPON_COLLECTION \ No newline at end of file diff --git a/src/utils/mp_balancer/xr_ini_ex.cpp b/src/utils/mp_balancer/xr_ini_ex.cpp index d4f8a6c31c7..c4c1db47429 100644 --- a/src/utils/mp_balancer/xr_ini_ex.cpp +++ b/src/utils/mp_balancer/xr_ini_ex.cpp @@ -209,7 +209,7 @@ void CInifileEx::Load(IReader* F, LPCSTR path) } } - if (str[0] && (str[0] == '#') && strstr(str, "#include")) // handle includes + if (str[0] && (str[0] == '#') && strstr(str, "#include")) // handle includes { string_path inc_name; R_ASSERT(path && path[0]); @@ -224,7 +224,7 @@ void CInifileEx::Load(IReader* F, LPCSTR path) FS.r_close(I); } } - else if (str[0] && (str[0] == '[')) // new section ? + else if (str[0] && (str[0] == '[')) // new section ? { // insert previous filled section if (Current) { @@ -259,7 +259,7 @@ void CInifileEx::Load(IReader* F, LPCSTR path) *strchr(str, ']') = 0; Current->Name = strlwr(str + 1); } - else // name = value + else // name = value { if (Current) { string4096 value_raw; @@ -271,7 +271,7 @@ void CInifileEx::Load(IReader* F, LPCSTR path) ++t; strcpy_s(value_raw, sizeof(value_raw), t); bInsideSTR = _parse(str2, value_raw); - if (bInsideSTR) // multiline str value + if (bInsideSTR) // multiline str value { while (bInsideSTR) { @@ -300,7 +300,7 @@ void CInifileEx::Load(IReader* F, LPCSTR path) I.first = (name[0] ? name : NULL); I.second = (str2[0] ? str2 : NULL); #ifdef DEBUG - I.comment = m_flags.test(eReadOnly) ? comment : 0; //:comment; + I.comment = m_flags.test(eReadOnly) ? comment : 0; //:comment; #endif if (m_flags.test(eReadOnly)) { @@ -474,8 +474,8 @@ shared_str CInifileEx::r_string_wb(LPCSTR S, LPCSTR L) strcpy_s(_original, _base); u32 _len = xr_strlen(_original); if (0 == _len) return shared_str(""); - if ('"' == _original[_len - 1]) _original[_len - 1] = 0; // skip end - if ('"' == _original[0]) return shared_str(&_original[0] + 1); // skip begin + if ('"' == _original[_len - 1]) _original[_len - 1] = 0; // skip end + if ('"' == _original[0]) return shared_str(&_original[0] + 1); // skip begin return shared_str(_original); } diff --git a/src/utils/mp_balancer/xr_ini_ex.h b/src/utils/mp_balancer/xr_ini_ex.h index 406850860f6..f53d3130485 100644 --- a/src/utils/mp_balancer/xr_ini_ex.h +++ b/src/utils/mp_balancer/xr_ini_ex.h @@ -78,10 +78,10 @@ class CInifileEx Root& sections() { return DATA; } CLASS_ID r_clsid(LPCSTR S, LPCSTR L); CLASS_ID r_clsid(const shared_str& S, LPCSTR L) { return r_clsid(*S, L); } - LPCSTR r_string(LPCSTR S, LPCSTR L); // оставляет кавычки - LPCSTR r_string(const shared_str& S, LPCSTR L) { return r_string(*S, L); } // оставляет кавычки - shared_str r_string_wb(LPCSTR S, LPCSTR L); // убирает кавычки - shared_str r_string_wb(const shared_str& S, LPCSTR L) { return r_string_wb(*S, L); } // убирает кавычки + LPCSTR r_string(LPCSTR S, LPCSTR L); // оставляет кавычки + LPCSTR r_string(const shared_str& S, LPCSTR L) { return r_string(*S, L); } // оставляет кавычки + shared_str r_string_wb(LPCSTR S, LPCSTR L); // убирает кавычки + shared_str r_string_wb(const shared_str& S, LPCSTR L) { return r_string_wb(*S, L); } // убирает кавычки u8 r_u8(LPCSTR S, LPCSTR L); u8 r_u8(const shared_str& S, LPCSTR L) { return r_u8(*S, L); } u16 r_u16(LPCSTR S, LPCSTR L); @@ -146,4 +146,4 @@ class CInifileEx // Main configuration file extern CInifileEx* pSettingsEx; -#endif //__XR_INI_H__ +#endif //__XR_INI_H__ diff --git a/src/utils/mp_configs_verifyer/configs_common.cpp b/src/utils/mp_configs_verifyer/configs_common.cpp index 6ef479b6f7e..c1a5a459fef 100644 --- a/src/utils/mp_configs_verifyer/configs_common.cpp +++ b/src/utils/mp_configs_verifyer/configs_common.cpp @@ -12,11 +12,11 @@ u8 const p_number[crypto::xr_dsa::public_key_length] = { 0xf6, 0x8d, 0x89, 0x0c, 0xf2, 0xeb, 0xed, 0x94, 0x92, 0x42, 0x27, 0x59, 0x6c, 0xdc, 0x19, 0x72, 0xa4, 0xd1, 0xc2, 0xe7, 0x49, 0x78, 0xa9, 0x31, 0xf6, 0x72, 0xa3, 0xde, 0x95, 0x97, 0x4c, 0xb3, 0x74, 0xa1, 0xb1, 0x43, 0x31, 0x67, 0x51, 0x54, 0xba, 0x03, 0xa4, 0x9d, 0x9c, 0x10, 0x26, 0xeb, 0x28, 0x42, 0x4e, 0x41, -}; // p_number +}; // p_number u8 const q_number[crypto::xr_dsa::private_key_length] = { 0xfb, 0x9b, 0x74, 0x86, 0xb1, 0x44, 0x2f, 0xb3, 0x66, 0x73, 0xb8, 0x6b, 0x67, 0xe7, 0xd8, 0x6c, 0x0a, 0x16, 0x12, 0xd1, -}; // q_number +}; // q_number u8 const g_number[crypto::xr_dsa::public_key_length] = { 0x1e, 0xd2, 0xb7, 0xd6, 0x6b, 0x3b, 0xbb, 0x7a, 0xb9, 0xca, 0xd7, 0x10, 0x39, 0x40, 0x85, 0xdb, 0x97, 0x20, 0xf2, 0xa4, 0xe6, 0x2f, 0x3d, 0x38, 0x95, 0x0a, 0x0b, 0x50, 0xe0, 0xa3, 0xa9, 0xa8, 0x6d, 0x4c, 0x63, 0x76, 0x82, 0x73, @@ -25,7 +25,7 @@ u8 const g_number[crypto::xr_dsa::public_key_length] = { 0x20, 0xf2, 0x79, 0x05, 0x70, 0x60, 0x1e, 0x27, 0xa4, 0xda, 0xf7, 0x7d, 0xa0, 0x49, 0x02, 0xc0, 0xb4, 0x87, 0xd2, 0xa7, 0x7c, 0xad, 0x88, 0xec, 0x5f, 0xe8, 0x5e, 0xee, 0x61, 0x3d, 0x9e, 0x29, 0x72, 0xb4, 0x16, 0x32, 0x13, 0x9d, 0x83, 0x1e, 0x00, 0x2c, 0xb0, 0x89, 0x30, 0xe3, 0xe6, 0xd4, 0x13, 0x05, 0x7e, 0xf4, -}; // g_number +}; // g_number u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x34, 0x7a, 0xe8, 0x4b, 0x69, 0x50, 0xcb, 0x66, 0xc7, 0xd3, 0xf7, 0x43, 0xc8, 0x6c, 0xd2, 0xc7, 0xdb, 0x0e, 0x4e, 0x45, 0xaf, 0xbf, 0xee, 0x5e, 0x98, 0x09, 0x62, 0x11, 0xde, 0xc6, 0x14, 0xf4, 0xc9, 0x4d, 0x83, 0x07, 0xa3, 0x50, @@ -34,6 +34,6 @@ u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x79, 0x6c, 0x5b, 0xb7, 0x03, 0xf1, 0xae, 0x5b, 0x2b, 0xea, 0x79, 0xc3, 0x2a, 0x91, 0xeb, 0xed, 0x2c, 0x66, 0x6f, 0x46, 0x58, 0xb2, 0x02, 0x28, 0x06, 0x63, 0x75, 0xf8, 0x61, 0x70, 0xdf, 0x5f, 0xf8, 0x47, 0xc5, 0x08, 0x1a, 0x38, 0xf6, 0x1d, 0x8d, 0xee, 0x3f, 0xd9, 0x42, 0x54, 0xb6, 0x64, 0x50, 0xb7, 0x04, 0x73, -}; // public_key +}; // public_key -} // namespace mp_anticheat +} // namespace mp_anticheat diff --git a/src/utils/mp_configs_verifyer/configs_common.h b/src/utils/mp_configs_verifyer/configs_common.h index 479b33c35d7..57c0447897d 100644 --- a/src/utils/mp_configs_verifyer/configs_common.h +++ b/src/utils/mp_configs_verifyer/configs_common.h @@ -10,6 +10,6 @@ extern u8 const q_number[crypto::xr_dsa::private_key_length]; extern u8 const g_number[crypto::xr_dsa::public_key_length]; extern u8 const public_key[crypto::xr_dsa::public_key_length]; -} // namespace mp_anticheat +} // namespace mp_anticheat -#endif // CONFIGS_COMMON_INCLUDED \ No newline at end of file +#endif // CONFIGS_COMMON_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_configs_verifyer/configs_dump_verifyer.cpp b/src/utils/mp_configs_verifyer/configs_dump_verifyer.cpp index 3c24670ef38..ef41c0aa68b 100644 --- a/src/utils/mp_configs_verifyer/configs_dump_verifyer.cpp +++ b/src/utils/mp_configs_verifyer/configs_dump_verifyer.cpp @@ -78,7 +78,7 @@ bool const configs_verifyer::verify_dsign(u8* data, u32 data_size, sha_checksum_ shared_str tmp_dsign = tmp_ini.r_string(cd_info_secion, cd_digital_sign_key); xr_strcat(dst_buffer, dst_size, add_str); - src_data_size += xr_strlen(dst_buffer) + 1; // zero ending + src_data_size += xr_strlen(dst_buffer) + 1; // zero ending bool ret = m_verifyer.verify(data, src_data_size, tmp_dsign); if (!ret) return false; @@ -210,4 +210,4 @@ bool const configs_verifyer::verify(u8* data, u32 data_size, string256& diff) return true; } -} // namespace mp_anticheat \ No newline at end of file +} // namespace mp_anticheat \ No newline at end of file diff --git a/src/utils/mp_configs_verifyer/configs_dump_verifyer.h b/src/utils/mp_configs_verifyer/configs_dump_verifyer.h index 74529233582..f11fb6b2dd8 100644 --- a/src/utils/mp_configs_verifyer/configs_dump_verifyer.h +++ b/src/utils/mp_configs_verifyer/configs_dump_verifyer.h @@ -11,7 +11,7 @@ class dump_verifyer : public xr_dsa_verifyer public: dump_verifyer(); ~dump_verifyer(); -}; // class dump_verifyer +}; // class dump_verifyer class configs_verifyer { @@ -32,8 +32,8 @@ class configs_verifyer mp_config_sections m_original_config; mp_active_params m_original_ap; -}; // configs_verifyer +}; // configs_verifyer -} // namespace mp_anticheat +} // namespace mp_anticheat -#endif //#ifndef CONFIGS_DUMP_VERIFYER \ No newline at end of file +#endif //#ifndef CONFIGS_DUMP_VERIFYER \ No newline at end of file diff --git a/src/utils/mp_configs_verifyer/entry_point.cpp b/src/utils/mp_configs_verifyer/entry_point.cpp index 6a8c323ab0c..389d90c96c0 100644 --- a/src/utils/mp_configs_verifyer/entry_point.cpp +++ b/src/utils/mp_configs_verifyer/entry_point.cpp @@ -73,7 +73,7 @@ void create_unpack_name(string_path& dst_src_path) xr_strcat(dst_src_path, ".ltx"); }; -static u32 const max_uncompressed_size = 0x100000; // 1 Mb +static u32 const max_uncompressed_size = 0x100000; // 1 Mb void unpack_file(LPCSTR file_name) { mp_anticheat::configs_verifyer tmp_verifyer; @@ -93,7 +93,7 @@ void unpack_file(LPCSTR file_name) } create_unpack_name(new_file_name); - u32 data_size = tmp_reader->length() - sizeof(u32); // first word is unpacket size ... + u32 data_size = tmp_reader->length() - sizeof(u32); // first word is unpacket size ... u8* data = static_cast(xr_malloc(data_size)); u32 uncomp_size = tmp_reader->r_u32(); tmp_reader->r(data, data_size); diff --git a/src/utils/mp_configs_verifyer/mp_config_sections.cpp b/src/utils/mp_configs_verifyer/mp_config_sections.cpp index 59ce4e96183..3334996a7b8 100644 --- a/src/utils/mp_configs_verifyer/mp_config_sections.cpp +++ b/src/utils/mp_configs_verifyer/mp_config_sections.cpp @@ -103,4 +103,4 @@ void mp_active_params::load_to(LPCSTR sect_name, CInifile& dest_dumper) } } -} // namespace mp_anticheat +} // namespace mp_anticheat diff --git a/src/utils/mp_configs_verifyer/mp_config_sections.h b/src/utils/mp_configs_verifyer/mp_config_sections.h index 89790b32291..fd5c6b3a018 100644 --- a/src/utils/mp_configs_verifyer/mp_config_sections.h +++ b/src/utils/mp_configs_verifyer/mp_config_sections.h @@ -26,7 +26,7 @@ class mp_config_sections mp_sections_t m_mp_sections; mp_sections_t::const_iterator m_current_dump_sect; CInifile m_tmp_dumper; -}; // class mp_config_sections +}; // class mp_config_sections class mp_active_params { @@ -34,10 +34,10 @@ class mp_active_params mp_active_params(); ~mp_active_params(); - void dump(IAnticheatDumpable const* dumpable_obj, LPCSTR sect_name_key, CInifile& dest_dumper); // for cheater - void load_to(LPCSTR sect_name, CInifile& dest_dumper); // for verifyer -}; // class mp_active_params + void dump(IAnticheatDumpable const* dumpable_obj, LPCSTR sect_name_key, CInifile& dest_dumper); // for cheater + void load_to(LPCSTR sect_name, CInifile& dest_dumper); // for verifyer +}; // class mp_active_params -} // namespace mp_anticheat +} // namespace mp_anticheat -#endif //#ifndef MP_CONFIG_SECTIONS_INCLUDED \ No newline at end of file +#endif //#ifndef MP_CONFIG_SECTIONS_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_configs_verifyer/pch.h b/src/utils/mp_configs_verifyer/pch.h index 35a992d7787..5e750ca3af6 100644 --- a/src/utils/mp_configs_verifyer/pch.h +++ b/src/utils/mp_configs_verifyer/pch.h @@ -11,4 +11,4 @@ #include "Common/object_broker.h" #include "xrCore/Containers/AssociativeVector.hpp" -#endif // #define PCH_H_INCLUDED \ No newline at end of file +#endif // #define PCH_H_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_gpprof_server/atlas_stalkercoppc_v1.h b/src/utils/mp_gpprof_server/atlas_stalkercoppc_v1.h index ced0afa008a..81e3b04d20e 100644 --- a/src/utils/mp_gpprof_server/atlas_stalkercoppc_v1.h +++ b/src/utils/mp_gpprof_server/atlas_stalkercoppc_v1.h @@ -23,151 +23,151 @@ extern int ATLAS_GET_STAT_PAGE_BY_NAME(char* statName); // KEYS // Use these key ID's to report match data for your game. -#define KEY_BestScore_KillsInRow 3 // [TYPE: int] [DESC: kills in row] -#define KEY_BestScore_KnifeKillsInRow 4 // [TYPE: int] [DESC: knife kills in row] -#define KEY_BestScore_BackstabsKillsInRow 5 // [TYPE: int] [DESC: knife backstabs kills in row] -#define KEY_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] [DESC: headshots kills in row] -#define KEY_BestScore_EyeKillsInRow 7 // [TYPE: int] [DESC: eye kills in row] -#define KEY_BestScore_BleedKillsInRow 8 // [TYPE: int] [DESC: bleed kills in row] -#define KEY_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] [DESC: explosive kills in row] -#define KEY_AwardMasscare 10 // [TYPE: int] -#define KEY_AwardMasscareLastRewardDate 11 // [TYPE: int] -#define KEY_AwardParanoia 12 // [TYPE: int] -#define KEY_AwardParanoiaLastRewardDate 13 // [TYPE: int] -#define KEY_AwardOverwhelmingSuperiority 14 // [TYPE: int] -#define KEY_AwardOverwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] -#define KEY_AwardBlitzkrieg 16 // [TYPE: int] -#define KEY_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] -#define KEY_AwardDryVictory 18 // [TYPE: int] -#define KEY_AwardDryVictoryLastRewardDate 19 // [TYPE: int] -#define KEY_AwardMultichampion 20 // [TYPE: int] -#define KEY_AwardMultichampionLastRewardDate 21 // [TYPE: int] -#define KEY_AwardMad 22 // [TYPE: int] -#define KEY_AwardMadLastRewardDate 23 // [TYPE: int] -#define KEY_AwardAchillesHeel 24 // [TYPE: int] -#define KEY_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] -#define KEY_AwardFasterThanBullets 26 // [TYPE: int] -#define KEY_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] -#define KEY_AwardHarvestTime 28 // [TYPE: int] -#define KEY_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] -#define KEY_AwardSkewer 30 // [TYPE: int] -#define KEY_AwardSkewerLastRewardDate 31 // [TYPE: int] -#define KEY_AwardDoubleShotDoubleKill 32 // [TYPE: int] -#define KEY_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] -#define KEY_AwardClimber 34 // [TYPE: int] -#define KEY_AwardClimberLastRewardDate 35 // [TYPE: int] -#define KEY_AwardOpener 36 // [TYPE: int] -#define KEY_AwardOpenerLastRewardDate 37 // [TYPE: int] -#define KEY_AwardToughy 38 // [TYPE: int] -#define KEY_AwardToughyLastRewardDate 39 // [TYPE: int] -#define KEY_AwardInvincibleFury 40 // [TYPE: int] -#define KEY_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] -#define KEY_AwardOculist 42 // [TYPE: int] -#define KEY_AwardOculistLastRewardDate 43 // [TYPE: int] -#define KEY_AwardLightingReflexes 44 // [TYPE: int] -#define KEY_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] -#define KEY_AwardSprinterStopper 46 // [TYPE: int] -#define KEY_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] -#define KEY_AwardMarksMan 48 // [TYPE: int] -#define KEY_AwardMarksManLastRewardDate 49 // [TYPE: int] -#define KEY_AwardPeaceAmbassador 50 // [TYPE: int] -#define KEY_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] -#define KEY_AwardDeadlyAccuracy 52 // [TYPE: int] -#define KEY_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] -#define KEY_AwardRemembrance 54 // [TYPE: int] -#define KEY_AwardRemembranceLastRewardDate 55 // [TYPE: int] -#define KEY_AwardAvenger 56 // [TYPE: int] -#define KEY_AwardAvengerLastRewardDate 57 // [TYPE: int] -#define KEY_AwardCherub 58 // [TYPE: int] -#define KEY_AwardCherubLastRewardDate 59 // [TYPE: int] -#define KEY_AwardDignity 60 // [TYPE: int] -#define KEY_AwardDignityLastRewardDate 61 // [TYPE: int] -#define KEY_AwardStalkerFlair 62 // [TYPE: int] -#define KEY_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] -#define KEY_AwardLucky 64 // [TYPE: int] -#define KEY_AwardLuckyLastRewardDate 65 // [TYPE: int] -#define KEY_AwardBlackList 66 // [TYPE: int] -#define KEY_AwardBlackListLastRewardDate 67 // [TYPE: int] -#define KEY_AwardSilentDeath 68 // [TYPE: int] -#define KEY_AwardSilentDeathLastRewardDate 69 // [TYPE: int] -#define KEY_PlayerName 70 // [TYPE: string] +#define KEY_BestScore_KillsInRow 3 // [TYPE: int] [DESC: kills in row] +#define KEY_BestScore_KnifeKillsInRow 4 // [TYPE: int] [DESC: knife kills in row] +#define KEY_BestScore_BackstabsKillsInRow 5 // [TYPE: int] [DESC: knife backstabs kills in row] +#define KEY_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] [DESC: headshots kills in row] +#define KEY_BestScore_EyeKillsInRow 7 // [TYPE: int] [DESC: eye kills in row] +#define KEY_BestScore_BleedKillsInRow 8 // [TYPE: int] [DESC: bleed kills in row] +#define KEY_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] [DESC: explosive kills in row] +#define KEY_AwardMasscare 10 // [TYPE: int] +#define KEY_AwardMasscareLastRewardDate 11 // [TYPE: int] +#define KEY_AwardParanoia 12 // [TYPE: int] +#define KEY_AwardParanoiaLastRewardDate 13 // [TYPE: int] +#define KEY_AwardOverwhelmingSuperiority 14 // [TYPE: int] +#define KEY_AwardOverwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] +#define KEY_AwardBlitzkrieg 16 // [TYPE: int] +#define KEY_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] +#define KEY_AwardDryVictory 18 // [TYPE: int] +#define KEY_AwardDryVictoryLastRewardDate 19 // [TYPE: int] +#define KEY_AwardMultichampion 20 // [TYPE: int] +#define KEY_AwardMultichampionLastRewardDate 21 // [TYPE: int] +#define KEY_AwardMad 22 // [TYPE: int] +#define KEY_AwardMadLastRewardDate 23 // [TYPE: int] +#define KEY_AwardAchillesHeel 24 // [TYPE: int] +#define KEY_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] +#define KEY_AwardFasterThanBullets 26 // [TYPE: int] +#define KEY_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] +#define KEY_AwardHarvestTime 28 // [TYPE: int] +#define KEY_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] +#define KEY_AwardSkewer 30 // [TYPE: int] +#define KEY_AwardSkewerLastRewardDate 31 // [TYPE: int] +#define KEY_AwardDoubleShotDoubleKill 32 // [TYPE: int] +#define KEY_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] +#define KEY_AwardClimber 34 // [TYPE: int] +#define KEY_AwardClimberLastRewardDate 35 // [TYPE: int] +#define KEY_AwardOpener 36 // [TYPE: int] +#define KEY_AwardOpenerLastRewardDate 37 // [TYPE: int] +#define KEY_AwardToughy 38 // [TYPE: int] +#define KEY_AwardToughyLastRewardDate 39 // [TYPE: int] +#define KEY_AwardInvincibleFury 40 // [TYPE: int] +#define KEY_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] +#define KEY_AwardOculist 42 // [TYPE: int] +#define KEY_AwardOculistLastRewardDate 43 // [TYPE: int] +#define KEY_AwardLightingReflexes 44 // [TYPE: int] +#define KEY_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] +#define KEY_AwardSprinterStopper 46 // [TYPE: int] +#define KEY_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] +#define KEY_AwardMarksMan 48 // [TYPE: int] +#define KEY_AwardMarksManLastRewardDate 49 // [TYPE: int] +#define KEY_AwardPeaceAmbassador 50 // [TYPE: int] +#define KEY_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] +#define KEY_AwardDeadlyAccuracy 52 // [TYPE: int] +#define KEY_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] +#define KEY_AwardRemembrance 54 // [TYPE: int] +#define KEY_AwardRemembranceLastRewardDate 55 // [TYPE: int] +#define KEY_AwardAvenger 56 // [TYPE: int] +#define KEY_AwardAvengerLastRewardDate 57 // [TYPE: int] +#define KEY_AwardCherub 58 // [TYPE: int] +#define KEY_AwardCherubLastRewardDate 59 // [TYPE: int] +#define KEY_AwardDignity 60 // [TYPE: int] +#define KEY_AwardDignityLastRewardDate 61 // [TYPE: int] +#define KEY_AwardStalkerFlair 62 // [TYPE: int] +#define KEY_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] +#define KEY_AwardLucky 64 // [TYPE: int] +#define KEY_AwardLuckyLastRewardDate 65 // [TYPE: int] +#define KEY_AwardBlackList 66 // [TYPE: int] +#define KEY_AwardBlackListLastRewardDate 67 // [TYPE: int] +#define KEY_AwardSilentDeath 68 // [TYPE: int] +#define KEY_AwardSilentDeathLastRewardDate 69 // [TYPE: int] +#define KEY_PlayerName 70 // [TYPE: string] /////////////////////////////////////////////////////////////////////////////// // STATS // Use these stat ID's to query aggregate statistics for your game. -#define STAT_AwardAchillesHeel 1 // [TYPE: int] -#define STAT_AwardAchillesHeelLastRewardDate 2 // [TYPE: int] -#define STAT_AwardAvenger 3 // [TYPE: int] -#define STAT_AwardAvengerLastRewardDate 4 // [TYPE: int] -#define STAT_AwardBlackList 5 // [TYPE: int] -#define STAT_AwardBlackListLastRewardDate 6 // [TYPE: int] -#define STAT_AwardBlitzkrieg 7 // [TYPE: int] -#define STAT_AwardBlitzkriegLastRewardDate 8 // [TYPE: int] -#define STAT_AwardCherub 9 // [TYPE: int] -#define STAT_AwardCherubLastRewardDate 10 // [TYPE: int] -#define STAT_AwardClimber 11 // [TYPE: int] -#define STAT_AwardClimberLastRewardDate 12 // [TYPE: int] -#define STAT_AwardDeadlyAccuracy 13 // [TYPE: int] -#define STAT_AwardDeadlyAccuracyLastRewardDate 14 // [TYPE: int] -#define STAT_AwardDignity 15 // [TYPE: int] -#define STAT_AwardDignityLastRewardDate 16 // [TYPE: int] -#define STAT_AwardDoubleShotDoubleKill 17 // [TYPE: int] -#define STAT_AwardDoubleShotDoubleKillLastRewardDate 18 // [TYPE: int] -#define STAT_AwardDryVictory 19 // [TYPE: int] -#define STAT_AwardDryVictoryLastRewardDate 20 // [TYPE: int] -#define STAT_AwardFasterThanBullets 21 // [TYPE: int] -#define STAT_AwardFasterThanBulletsLastRewardDate 22 // [TYPE: int] -#define STAT_AwardHarvestTime 23 // [TYPE: int] -#define STAT_AwardHarvestTimeLastRewardDate 24 // [TYPE: int] -#define STAT_AwardInvincibleFury 25 // [TYPE: int] -#define STAT_AwardInvincibleFuryLastRewardDate 26 // [TYPE: int] -#define STAT_AwardLightingReflexes 27 // [TYPE: int] -#define STAT_AwardLightingReflexesLastRewardDate 28 // [TYPE: int] -#define STAT_AwardLucky 29 // [TYPE: int] -#define STAT_AwardLuckyLastRewardDate 30 // [TYPE: int] -#define STAT_AwardMad 31 // [TYPE: int] -#define STAT_AwardMadLastRewardDate 32 // [TYPE: int] -#define STAT_AwardMarksman 33 // [TYPE: int] -#define STAT_AwardMarksmanLastRewardDate 34 // [TYPE: int] -#define STAT_AwardMasscare 35 // [TYPE: int] -#define STAT_AwardMasscareLastRewardDate 36 // [TYPE: int] -#define STAT_AwardMultichampion 37 // [TYPE: int] -#define STAT_AwardMultichampionLastRewardDate 38 // [TYPE: int] -#define STAT_AwardOculist 39 // [TYPE: int] -#define STAT_AwardOculistLastRewardDate 40 // [TYPE: int] -#define STAT_AwardOpener 41 // [TYPE: int] -#define STAT_AwardOpenerLastRewardDate 42 // [TYPE: int] -#define STAT_AwardOwerwhelmingSuperiority 43 // [TYPE: int] -#define STAT_AwardOwerwhelmingSuperiorityLastRewardDate 44 // [TYPE: int] -#define STAT_AwardParanoia 45 // [TYPE: int] -#define STAT_AwardParanoiaLastRewardDate 46 // [TYPE: int] -#define STAT_AwardPeaceAmbassador 47 // [TYPE: int] -#define STAT_AwardPeaceAmbassadorLastRewardDate 48 // [TYPE: int] -#define STAT_AwardRemembrance 49 // [TYPE: int] -#define STAT_AwardRemembranceLastRewardDate 50 // [TYPE: int] -#define STAT_AwardSilentDeath 51 // [TYPE: int] -#define STAT_AwardSilentDeathLastRewardDate 52 // [TYPE: int] -#define STAT_AwardSkewer 53 // [TYPE: int] -#define STAT_AwardSkewerLastRewardDate 54 // [TYPE: int] -#define STAT_AwardSprinterStopper 55 // [TYPE: int] -#define STAT_AwardSprinterStopperLastRewardDate 56 // [TYPE: int] -#define STAT_AwardStalkerFlair 57 // [TYPE: int] -#define STAT_AwardStalkerFlairLastRewardDate 58 // [TYPE: int] -#define STAT_AwardToughy 59 // [TYPE: int] -#define STAT_AwardToughyLastRewardDate 60 // [TYPE: int] -#define STAT_BestScore_BackstabsKillsInRow 61 // [TYPE: int] -#define STAT_BestScore_BleedKillsInRow 62 // [TYPE: int] -#define STAT_BestScore_ExplosiveKillsInRow 63 // [TYPE: int] -#define STAT_BestScore_EyeKillsInRow 64 // [TYPE: int] -#define STAT_BestScore_HeadshotsKillsInRow 65 // [TYPE: int] -#define STAT_BestScore_KillsInRow 66 // [TYPE: int] -#define STAT_BestScore_KnifeKillsInRow 67 // [TYPE: int] -#define STAT_PlayerName 68 // [TYPE: string] [DESC: contains players name] +#define STAT_AwardAchillesHeel 1 // [TYPE: int] +#define STAT_AwardAchillesHeelLastRewardDate 2 // [TYPE: int] +#define STAT_AwardAvenger 3 // [TYPE: int] +#define STAT_AwardAvengerLastRewardDate 4 // [TYPE: int] +#define STAT_AwardBlackList 5 // [TYPE: int] +#define STAT_AwardBlackListLastRewardDate 6 // [TYPE: int] +#define STAT_AwardBlitzkrieg 7 // [TYPE: int] +#define STAT_AwardBlitzkriegLastRewardDate 8 // [TYPE: int] +#define STAT_AwardCherub 9 // [TYPE: int] +#define STAT_AwardCherubLastRewardDate 10 // [TYPE: int] +#define STAT_AwardClimber 11 // [TYPE: int] +#define STAT_AwardClimberLastRewardDate 12 // [TYPE: int] +#define STAT_AwardDeadlyAccuracy 13 // [TYPE: int] +#define STAT_AwardDeadlyAccuracyLastRewardDate 14 // [TYPE: int] +#define STAT_AwardDignity 15 // [TYPE: int] +#define STAT_AwardDignityLastRewardDate 16 // [TYPE: int] +#define STAT_AwardDoubleShotDoubleKill 17 // [TYPE: int] +#define STAT_AwardDoubleShotDoubleKillLastRewardDate 18 // [TYPE: int] +#define STAT_AwardDryVictory 19 // [TYPE: int] +#define STAT_AwardDryVictoryLastRewardDate 20 // [TYPE: int] +#define STAT_AwardFasterThanBullets 21 // [TYPE: int] +#define STAT_AwardFasterThanBulletsLastRewardDate 22 // [TYPE: int] +#define STAT_AwardHarvestTime 23 // [TYPE: int] +#define STAT_AwardHarvestTimeLastRewardDate 24 // [TYPE: int] +#define STAT_AwardInvincibleFury 25 // [TYPE: int] +#define STAT_AwardInvincibleFuryLastRewardDate 26 // [TYPE: int] +#define STAT_AwardLightingReflexes 27 // [TYPE: int] +#define STAT_AwardLightingReflexesLastRewardDate 28 // [TYPE: int] +#define STAT_AwardLucky 29 // [TYPE: int] +#define STAT_AwardLuckyLastRewardDate 30 // [TYPE: int] +#define STAT_AwardMad 31 // [TYPE: int] +#define STAT_AwardMadLastRewardDate 32 // [TYPE: int] +#define STAT_AwardMarksman 33 // [TYPE: int] +#define STAT_AwardMarksmanLastRewardDate 34 // [TYPE: int] +#define STAT_AwardMasscare 35 // [TYPE: int] +#define STAT_AwardMasscareLastRewardDate 36 // [TYPE: int] +#define STAT_AwardMultichampion 37 // [TYPE: int] +#define STAT_AwardMultichampionLastRewardDate 38 // [TYPE: int] +#define STAT_AwardOculist 39 // [TYPE: int] +#define STAT_AwardOculistLastRewardDate 40 // [TYPE: int] +#define STAT_AwardOpener 41 // [TYPE: int] +#define STAT_AwardOpenerLastRewardDate 42 // [TYPE: int] +#define STAT_AwardOwerwhelmingSuperiority 43 // [TYPE: int] +#define STAT_AwardOwerwhelmingSuperiorityLastRewardDate 44 // [TYPE: int] +#define STAT_AwardParanoia 45 // [TYPE: int] +#define STAT_AwardParanoiaLastRewardDate 46 // [TYPE: int] +#define STAT_AwardPeaceAmbassador 47 // [TYPE: int] +#define STAT_AwardPeaceAmbassadorLastRewardDate 48 // [TYPE: int] +#define STAT_AwardRemembrance 49 // [TYPE: int] +#define STAT_AwardRemembranceLastRewardDate 50 // [TYPE: int] +#define STAT_AwardSilentDeath 51 // [TYPE: int] +#define STAT_AwardSilentDeathLastRewardDate 52 // [TYPE: int] +#define STAT_AwardSkewer 53 // [TYPE: int] +#define STAT_AwardSkewerLastRewardDate 54 // [TYPE: int] +#define STAT_AwardSprinterStopper 55 // [TYPE: int] +#define STAT_AwardSprinterStopperLastRewardDate 56 // [TYPE: int] +#define STAT_AwardStalkerFlair 57 // [TYPE: int] +#define STAT_AwardStalkerFlairLastRewardDate 58 // [TYPE: int] +#define STAT_AwardToughy 59 // [TYPE: int] +#define STAT_AwardToughyLastRewardDate 60 // [TYPE: int] +#define STAT_BestScore_BackstabsKillsInRow 61 // [TYPE: int] +#define STAT_BestScore_BleedKillsInRow 62 // [TYPE: int] +#define STAT_BestScore_ExplosiveKillsInRow 63 // [TYPE: int] +#define STAT_BestScore_EyeKillsInRow 64 // [TYPE: int] +#define STAT_BestScore_HeadshotsKillsInRow 65 // [TYPE: int] +#define STAT_BestScore_KillsInRow 66 // [TYPE: int] +#define STAT_BestScore_KnifeKillsInRow 67 // [TYPE: int] +#define STAT_PlayerName 68 // [TYPE: string] [DESC: contains players name] #ifdef __cplusplus } #endif -#endif // _ATLAS_STALKERCOPPC_V1_H_ +#endif // _ATLAS_STALKERCOPPC_V1_H_ diff --git a/src/utils/mp_gpprof_server/gamespy_sake.h b/src/utils/mp_gpprof_server/gamespy_sake.h index e8d81498790..aefa9b6b03c 100644 --- a/src/utils/mp_gpprof_server/gamespy_sake.h +++ b/src/utils/mp_gpprof_server/gamespy_sake.h @@ -61,7 +61,7 @@ class sake_processor static unsigned int const merged_fields_count = (gamespy_profile::at_awards_count * gamespy_profile::ap_award_params_count) + - gamespy_profile::bst_score_types_count + 1; //+1 = STAT_PlayerName + gamespy_profile::bst_score_types_count + 1; //+1 = STAT_PlayerName static int const max_request_records = 128; typedef char* merged_fields_names_t[merged_fields_count]; typedef std::map players_map_t; @@ -82,6 +82,6 @@ class sake_processor std::string& dest_name); static void request_callback( SAKE sake, SAKERequest request, SAKERequestResult result, void* inputData, void* outputData, void* userData); -}; // class sake_processor +}; // class sake_processor -#endif //#ifndef GAMESPY_SAKE_INCLUDED +#endif //#ifndef GAMESPY_SAKE_INCLUDED diff --git a/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/install-sh b/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/install-sh index 594f5f67a8c..3deabf848ee 100644 --- a/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/install-sh +++ b/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/install-sh @@ -161,7 +161,7 @@ do #Make a temp file name in the proper directory. dsttmp = $dstdir / - #inst.$$ # +#inst.$$ # #Move or copy the file name to the temp name diff --git a/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/ltmain.sh b/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/ltmain.sh index 4f7b597b1c6..5a588b42831 100644 --- a/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/ltmain.sh +++ b/src/utils/mp_gpprof_server/libraries/fcgi-2.4.0/ltmain.sh @@ -3381,13 +3381,14 @@ static const void *lt_preloaded_setup() { "${nlist}T" #Transform the symbol file into the correct name. - compile_command =`$echo "X$compile_command" | $Xsed - e "s%@SYMFILE@%$output_objdir/" - "${outputname}S.${objext}" - "%"` finalize_command =`$echo "X$finalize_command" | - $Xsed - e "s%@SYMFILE@%$" - "output_objdir/" - "${outputname}S.${" - "objext}%"` ; + compile_command =`$echo "X$compile_command" | + $Xsed - e "s%@SYMFILE@%$output_objdir/" + "${outputname}S.${objext}" + "%"` finalize_command =`$echo "X$finalize_command" | + $Xsed - e "s%@SYMFILE@%$" + "output_objdir/" + "${outputname}S.${" + "objext}%"` ; ; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 @@ -3734,14 +3735,13 @@ else ; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 fi else + exit 1 fi else #The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 - echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 fi fi\ -" chmod + x $output fi exit 0; - ; + echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 fi fi\ +" chmod + x $output fi exit 0; ; esac #See if we need to build an old - fashioned archive. @@ -4117,89 +4117,91 @@ relink_command=\"$relink_command\"" *.la) #Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else $echo "$modename: \`$file' is not a valid libtool archive" 1 > & 2 $echo "$help" 1 > & 2 exit 1 fi + else $echo "$modename: \`$file' is not a valid libtool archive" 1 > & 2 $echo + "$help" 1 > & 2 exit 1 fi - library_names = - old_library = relink_command = + library_names = old_library = relink_command = #If there is no directory component, then add one. - case $file in* /* | *\\*) . $file ;; - *) . ./$file ;; - esac + case $file in* /* | *\\*) . $file ;; +*) . ./$file ;; +esac - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi +# Add the libdir to current_libdirs if it is the destination. +if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac +else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac +fi - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" +dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ +test "X$dir" = "X$file/" && dir= +dir="$dir$objdir" - if test -n "$relink_command"; then - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - continue - fi - fi +if test -n "$relink_command"; then + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + continue + fi +fi - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi +# See the names of the shared library. +set dummy $library_names +if test -n "$2"; then + realname="$2" + shift + shift - if test $# -gt 0; then - # Delete the old symlinks, and create new ones. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - fi - done - fi + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test $# -gt 0; then + # Delete the old symlinks, and create new ones. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" +fi - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/ - % %'` instname = "$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval - "$install_prog $instname $destdir/$name" || - exit $ ? +# Install the pseudo-library for information purposes. +name=`$echo "X$file" | $Xsed -e 's%^.*/ + % %'` instname = "$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog " + "$instname " + "$destdir/" + "$name" || + exit $ ? #Maybe install the static library, too. test - n "$old_library" && staticlibs = "$staticlibs $dir/$old_library"; @@ -4297,27 +4299,27 @@ relink_command=\"$relink_command\"" relink_command = #If there is no directory component, then add one. case $file in* /* | *\\*) . $file ;; - *) . ./$file ;; - esac + *) . ./$file ;; + esac - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" - if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : - else - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi - file=`$echo "X$file" | $Xsed -e 's%^.*/ + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" + tmpdir="$tmpdir/libtool-$$" + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : + else + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 + continue + fi + file=`$echo "X$file" | $Xsed -e 's%^.*/ % %'` outputname = "$tmpdir/$file" #Replace the output file specification. - relink_command =`$echo "X$relink_command" | - $Xsed - e 's%@OUTPUT@%' "$outputname" '%g'` + relink_command =`$echo "X$relink_command" | + $Xsed - e 's%@OUTPUT@%' "$outputname" '%g'` - $show "$relink_command" if $run eval "$relink_command"; + $show "$relink_command" if $run eval "$relink_command"; then: else $echo "$modename: error: relink \`$file' with the above command before installing it" 1 > &2 $ { rm }r "$tmpdir" continue @@ -4811,8 +4813,8 @@ This mode accepts the following additional options: COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, - then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ; -; + then substituting the C source code suffix \`.c ' with the library object suffix, \`.lo'." ; + ; execute) $echo \ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.c index c1c78dd64f7..7c358babdb4 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.c @@ -898,7 +898,7 @@ GPResult gpProfileSearchW(GPConnection* connection, const unsigned short nick[GP char firstname_A[GP_NICK_LEN]; char lastname_A[GP_NICK_LEN]; - UCS2ToAsciiString(nick, nick_A); // nicknames are ascii + UCS2ToAsciiString(nick, nick_A); // nicknames are ascii UCS2ToAsciiString(uniquenick, uniquenick_A); UCS2ToAsciiString(email, email_A); UCS2ToAsciiString(firstname, firstname_A); @@ -1524,9 +1524,9 @@ int gpIsBuddyConnectionOpen(GPConnection* connection, GPProfile profile) aPeer = gpiGetPeerByProfile(connection, profile); if (aPeer == NULL || !gpiIsPeerConnected(aPeer)) - return 0; // not connected + return 0; // not connected else - return 1; // connected + return 1; // connected } GPResult gpDeleteBuddy(GPConnection* connection, GPProfile profile) @@ -2206,9 +2206,9 @@ GPResult gpSendBuddyMessageW(GPConnection* connection, GPProfile profile, const GPResult result; assert(message != NULL); - message_A = UCS2ToUTF8StringAlloc(message); // convert to UTF8 - result = gpSendBuddyMessageA(connection, profile, message_A); // send - gsifree(message_A); // free the converted string + message_A = UCS2ToUTF8StringAlloc(message); // convert to UTF8 + result = gpSendBuddyMessageA(connection, profile, message_A); // send + gsifree(message_A); // free the converted string return result; } #endif @@ -2248,9 +2248,9 @@ GPResult gpSendBuddyUTMW(GPConnection* connection, GPProfile profile, const unsi GPResult result; assert(message != NULL); - message_A = UCS2ToUTF8StringAlloc(message); // convert to UTF8 - result = gpSendBuddyUTMA(connection, profile, message_A, sendOption); // send - gsifree(message_A); // free the converted string + message_A = UCS2ToUTF8StringAlloc(message); // convert to UTF8 + result = gpSendBuddyUTMA(connection, profile, message_A, sendOption); // send + gsifree(message_A); // free the converted string return result; } #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.h index b203950e196..d44044be846 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gp.h @@ -103,7 +103,7 @@ typedef enum _GPEnum { GP_CONNECTIONSPEED, GP_HASNETWORK, GP_OSSTRING, - GP_AIMNAME, // PANTS|03.20.01 + GP_AIMNAME, // PANTS|03.20.01 GP_PIC, GP_OCCUPATIONID, GP_INDUSTRYID, @@ -171,22 +171,22 @@ typedef enum _GPEnum { // Transfer callback type. // *** the transfer is ended when these types are received ////////////////////////// - GP_TRANSFER_SEND_REQUEST = 0x800, // arg->num == numFiles + GP_TRANSFER_SEND_REQUEST = 0x800, // arg->num == numFiles GP_TRANSFER_ACCEPTED, - GP_TRANSFER_REJECTED, // *** - GP_TRANSFER_NOT_ACCEPTING, // *** - GP_TRANSFER_NO_CONNECTION, // *** - GP_TRANSFER_DONE, // *** - GP_TRANSFER_CANCELLED, // *** - GP_TRANSFER_LOST_CONNECTION, // *** - GP_TRANSFER_ERROR, // *** - GP_TRANSFER_THROTTLE, // arg->num == Bps + GP_TRANSFER_REJECTED, // *** + GP_TRANSFER_NOT_ACCEPTING, // *** + GP_TRANSFER_NO_CONNECTION, // *** + GP_TRANSFER_DONE, // *** + GP_TRANSFER_CANCELLED, // *** + GP_TRANSFER_LOST_CONNECTION, // *** + GP_TRANSFER_ERROR, // *** + GP_TRANSFER_THROTTLE, // arg->num == Bps GP_FILE_BEGIN, - GP_FILE_PROGRESS, // arg->num == numBytes + GP_FILE_PROGRESS, // arg->num == numBytes GP_FILE_END, GP_FILE_DIRECTORY, GP_FILE_SKIP, - GP_FILE_FAILED, // arg->num == error + GP_FILE_FAILED, // arg->num == error // GP_FILE_FAILED error /////////////////////// @@ -201,14 +201,14 @@ typedef enum _GPEnum { // UTM send options. //////////////////// - GP_DONT_ROUTE = 0xB00, // only send direct + GP_DONT_ROUTE = 0xB00, // only send direct // Quiet mode flags. //////////////////// GP_SILENCE_NONE = 0x00000000, GP_SILENCE_MESSAGES = 0x00000001, GP_SILENCE_UTMS = 0x00000002, - GP_SILENCE_LIST = 0x00000004, // includes requests, auths, and revokes + GP_SILENCE_LIST = 0x00000004, // includes requests, auths, and revokes GP_SILENCE_ALL = 0xFFFFFFFF, // Flags for checking if newer version of status info is supported @@ -396,7 +396,7 @@ typedef enum _GPErrorCode { // Random number seed for PASSWORDENC and CDKEYENC // MUST MATCH SERVER - If you change this, you'll have to // release an updated server -#define GP_XOR_SEED 0x79707367 // "gspy" +#define GP_XOR_SEED 0x79707367 // "gspy" // Well known values for partner ID. #define GP_PARTNERID_GAMESPY 0 @@ -538,9 +538,9 @@ typedef struct int icquin; gsi_char zipcode[GP_ZIPCODE_LEN]; gsi_char countrycode[GP_COUNTRYCODE_LEN]; - float longitude; // negative is west, positive is east. (0, 0) means unknown. - float latitude; // negative is south, positive is north. (0, 0) means unknown. - gsi_char place[GP_PLACE_LEN]; // e.g., "USA|California|Irvine", "South Korea|Seoul", "Turkey" + float longitude; // negative is west, positive is east. (0, 0) means unknown. + float latitude; // negative is south, positive is north. (0, 0) means unknown. + gsi_char place[GP_PLACE_LEN]; // e.g., "USA|California|Irvine", "South Korea|Seoul", "Turkey" int birthday; int birthmonth; int birthyear; @@ -676,7 +676,7 @@ typedef struct { GPResult result; gsi_char email[GP_EMAIL_LEN]; - int numNicks; // If 0, then the email/password did not match. + int numNicks; // If 0, then the email/password did not match. gsi_char** nicks; gsi_char** uniquenicks; } GPGetUserNicksResponseArg; @@ -705,7 +705,7 @@ typedef struct typedef struct { GPResult result; - int productID; // PANTS|06.06.00 - added by request for JED + int productID; // PANTS|06.06.00 - added by request for JED int numMatches; GPFindPlayerMatch* matches; } GPFindPlayersResponseArg; @@ -833,12 +833,12 @@ extern char GPSearchManagerHostname[64]; // gpInitialize /////////////// GPResult gpInitialize(GPConnection* connection, - int productID, // The productID is a unique ID that identifies your product - int namespaceID, // The namespaceID identified which namespace to login under. A namespaceID of 0 indicates that no - // namespace should be used. A namespaceID of 1 represents the default GameSpy namespace - int partnerID // The partnerID identifies the account system being used. - // Use GP_PARTNERID_GAMESPY for GSID accounts. - // Use GP_PARTNERID_IGN for IGN accounts. + int productID, // The productID is a unique ID that identifies your product + int namespaceID, // The namespaceID identified which namespace to login under. A namespaceID of 0 indicates that no + // namespace should be used. A namespaceID of 1 represents the default GameSpy namespace + int partnerID // The partnerID identifies the account system being used. + // Use GP_PARTNERID_GAMESPY for GSID accounts. + // Use GP_PARTNERID_IGN for IGN accounts. ); // gpDestroy @@ -1084,7 +1084,7 @@ GPResult gpSendBuddyMessage(GPConnection* connection, GPProfile profile, const g // gpSendBuddyUTM ///////////////////// GPResult gpSendBuddyUTM(GPConnection* connection, GPProfile profile, const gsi_char* message, - int sendOption // GP_DONT_ROUTE + int sendOption // GP_DONT_ROUTE ); // PANTS|02.15.00 diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpi.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpi.c index 42fd43d242c..ab94b9cb802 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpi.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpi.c @@ -15,8 +15,8 @@ Please see the GameSpy Presence SDK documentation for more information ////////// #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4244) // lines: 345, 362 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4244) // lines: 345, 362 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS #include "gpi.h" #include @@ -281,7 +281,7 @@ GPResult gpiProcessConnectionManager(GPConnection* connection) // Send anything that needs to be sent. /////////////////////////////////////// if (iconnection->outputBuffer.len > 0) - iconnection->kaTransmit = now; // data already being transmitted. We don't need to send keep alives + iconnection->kaTransmit = now; // data already being transmitted. We don't need to send keep alives CHECK_RESULT(gpiSendFromBuffer( connection, iconnection->cmSocket, &iconnection->outputBuffer, &connClosed, GPITrue, "CM")); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.c index 51904a2d538..b907ecc31fb 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.c @@ -12,9 +12,9 @@ Please see the GameSpy Presence SDK documentation for more information **********************************************************************/ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4311) // lines: 977 -#pragma warning(disable : 4312) // lines: 1039, 1064 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4311) // lines: 977 +#pragma warning(disable : 4312) // lines: 1039, 1064 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // INCLUDES ////////// @@ -339,7 +339,7 @@ GPResult gpiProcessRecvBuddyMessage(GPConnection* connection, const char* input) if (str != NULL) strzcpy(strTemp, (str + 3), sizeof(strTemp)); else - strTemp[0] = '\0'; // no location, set to empty string + strTemp[0] = '\0'; // no location, set to empty string // Call the callback. ///////////////////// diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.h index cbadf45a29b..d1c5bba8b75 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuddy.h @@ -24,10 +24,10 @@ Please see the GameSpy Presence SDK documentation for more information ///////////////// #define GPI_BM_MESSAGE 1 #define GPI_BM_REQUEST 2 -#define GPI_BM_REPLY 3 // only used on the backend +#define GPI_BM_REPLY 3 // only used on the backend #define GPI_BM_AUTH 4 #define GPI_BM_UTM 5 -#define GPI_BM_REVOKE 6 // remote buddy removed from local list +#define GPI_BM_REVOKE 6 // remote buddy removed from local list #define GPI_BM_STATUS 100 #define GPI_BM_INVITE 101 #define GPI_BM_PING 102 diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuffer.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuffer.c index dc9b7db1d2b..bcbd20732e1 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuffer.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiBuffer.c @@ -12,8 +12,8 @@ Please see the GameSpy Presence SDK documentation for more information **********************************************************************/ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4244) // lines: 720 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4244) // lines: 720 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // INCLUDES ////////// @@ -434,7 +434,7 @@ GPResult gpiRecvToBuffer( *bytesRead = total; *connClosed = closed; - GSI_UNUSED(id); // to get rid of codewarrior warnings + GSI_UNUSED(id); // to get rid of codewarrior warnings return GP_NO_ERROR; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiConnect.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiConnect.c index 7be1fed7ac7..59ec1a3e349 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiConnect.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiConnect.c @@ -12,8 +12,8 @@ Please see the GameSpy Presence SDK documentation for more information **********************************************************************/ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4267) // lines: 379, 415, 739 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4267) // lines: 379, 415, 739 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // INCLUDES ////////// diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.c index 0ebc0c12910..01a05a278b9 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.c @@ -774,7 +774,7 @@ GPResult gpiSetInfos(GPConnection* connection, GPEnum info, const char* value) strzcpy(buffer, value, GP_NICK_LEN); strzcpy(iconnection->nick, buffer, GP_NICK_LEN); #ifdef GSI_UNICODE - UTF8ToUCS2StringLen(iconnection->nick, iconnection->nick_W, GP_NICK_LEN); // update the UCS2 version + UTF8ToUCS2StringLen(iconnection->nick, iconnection->nick_W, GP_NICK_LEN); // update the UCS2 version #endif CHECK_RESULT(gpiSendLocalInfo(connection, "\\nick\\", buffer)); break; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.h index 5050247cdd8..bdbed04b398 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiInfo.h @@ -33,9 +33,9 @@ typedef struct int icquin; char zipcode[GP_ZIPCODE_LEN]; char countrycode[GP_COUNTRYCODE_LEN]; - float longitude; // negative is west, positive is east. (0, 0) means unknown. - float latitude; // negative is south, positive is north. (0, 0) means unknown. - char place[GP_PLACE_LEN]; // e.g., "USA|California|Irvine", "South Korea|Seoul", "Turkey" + float longitude; // negative is west, positive is east. (0, 0) means unknown. + float latitude; // negative is south, positive is north. (0, 0) means unknown. + char place[GP_PLACE_LEN]; // e.g., "USA|California|Irvine", "South Korea|Seoul", "Turkey" int birthday; int birthmonth; int birthyear; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.c index 7c2fab61f2f..416b8c60822 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.c @@ -53,7 +53,7 @@ GPResult gpiInitializeNpBasic(GPConnection* connection) return GP_MISC_ERROR; } else - iconnection->npBasicGameInitialized = gsi_false; // GP initialized, so destroy after complete + iconnection->npBasicGameInitialized = gsi_false; // GP initialized, so destroy after complete return GP_NO_ERROR; } @@ -104,7 +104,7 @@ GPResult gpiCheckNpStatus(GPConnection* connection) // Note - we ignore error messages here - if something fails we really don't care ///////////////////////////////////////////////////////////////////////////////// if (!iconnection->npBasicGameInitialized) { - ret = sceNpBasicInit(); // obsolete? + ret = sceNpBasicInit(); // obsolete? if (ret < 0) { gsDebugFormat(GSIDebugCat_GP, GSIDebugType_Misc, GSIDebugLevel_HotError, "gpiCheckNpStatus: sceNpBasicInit() failed. ret = 0x%x\n", ret); @@ -195,7 +195,7 @@ GPResult gpiDestroyNpBasic(GPConnection* connection) GPResult gpiSyncNpBuddies(GPConnection* connection) { int ret; - SceNpId npId; // Buffer to store friend list entry's NP ID + SceNpId npId; // Buffer to store friend list entry's NP ID gsi_u32 i, count = 0; GPIConnection* iconnection = (GPIConnection*)*connection; @@ -267,7 +267,7 @@ void gpiSyncNpBuddiesCallback(GPConnection* pconnection, GPProfileSearchResponse GPResult gpiSyncNpBlockList(GPConnection* connection) { int ret; - SceNpId npId; // Buffer to store block list entry's NP ID + SceNpId npId; // Buffer to store block list entry's NP ID gsi_u32 i, count = 0; GPIConnection* iconnection = (GPIConnection*)*connection; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.h index 67108b317fd..bf38c1e97ff 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPS3.h @@ -20,9 +20,9 @@ Please see the GameSpy Presence SDK documentation for more information // DEFINES ///////// -#define GPI_NP_SYNC_DELAY 5000 // wait 5 seconds after login before doing any syncs -#define GPI_NP_STATUS_TIMEOUT 5000 // timeout after 5 second max if NP status is not online -#define GPI_NP_NUM_TRANSACTIONS 32 // Max num of simultaneous NP lookup transactions +#define GPI_NP_SYNC_DELAY 5000 // wait 5 seconds after login before doing any syncs +#define GPI_NP_STATUS_TIMEOUT 5000 // timeout after 5 second max if NP status is not online +#define GPI_NP_NUM_TRANSACTIONS 32 // Max num of simultaneous NP lookup transactions // STRUCTURES //////////// diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPeer.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPeer.c index a56b1c6b1dc..4d894370e53 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPeer.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiPeer.c @@ -11,8 +11,8 @@ devsupport@gamespy.com Please see the GameSpy Presence SDK documentation for more information **********************************************************************/ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4267) // lines: 275 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4267) // lines: 275 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // INCLUDES ////////// diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiProfile.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiProfile.c index 5970e199b55..68c08ca0b2e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiProfile.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiProfile.c @@ -12,9 +12,9 @@ Please see the GameSpy Presence SDK documentation for more information **********************************************************************/ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4312) // lines: 1164, 1186, 1265 -#pragma warning(disable : 4311) // lines: 1231 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4312) // lines: 1164, 1186, 1265 +#pragma warning(disable : 4311) // lines: 1231 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // INCLUDES ////////// diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.c index 81b0b2f5e81..6f55ba839e0 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.c @@ -12,8 +12,8 @@ Please see the GameSpy Presence SDK documentation for more information **********************************************************************/ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4267) // lines: 1363, 1520, 1528, 1529, 1530 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4267) // lines: 1363, 1520, 1528, 1529, 1530 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // INCLUDES ////////// diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.h index 125f68754d7..28ba8bc84bb 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiTransfer.h @@ -77,7 +77,7 @@ typedef struct char* name; #ifdef GSI_UNICODE - unsigned short* name_W; // must have this since developers are given pointers to internal memory + unsigned short* name_W; // must have this since developers are given pointers to internal memory unsigned short* path_W; #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.c index 04bcb3e6821..afa8ed7ce20 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.c @@ -12,9 +12,9 @@ Please see the GameSpy Presence SDK documentation for more information **********************************************************************/ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4244) // lines: 333 -#pragma warning(disable : 4267) // lines: 142 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4244) // lines: 333 +#pragma warning(disable : 4267) // lines: 142 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // INCLUDES ////////// @@ -30,11 +30,11 @@ Please see the GameSpy Presence SDK documentation for more information // Disable compiler warnings for issues that are unavoidable. ///////////////////////////////////////////////////////////// -#if defined(_MSC_VER) // DevStudio +#if defined(_MSC_VER) // DevStudio // Level4, "conditional expression is constant". // Occurs with use of the MS provided macro FD_SET #pragma warning(disable : 4127) -#endif // _MSC_VER +#endif // _MSC_VER // FUNCTIONS /////////// @@ -340,4 +340,4 @@ void gpiEncodeString(const char* unencodedString, char* encodedString) /////////////////////////////////////////////////// #if defined(_MSC_VER) #pragma warning(default : 4127) -#endif // _MSC_VER +#endif // _MSC_VER diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.h index 64978eb6c67..09331eb4017 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpiUtility.h @@ -63,7 +63,7 @@ Please see the GameSpy Presence SDK documentation for more information // FUNCTIONS /////////// void strzcpy(char* dest, const char* src, - size_t len // length of buffer, including space for '\0' + size_t len // length of buffer, including space for '\0' ); void gpiDebug(GPConnection* connection, const char* fmt, ...); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpstress/gpstress.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpstress/gpstress.c index 252c3d357f1..4aa6938fd51 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpstress/gpstress.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gpstress/gpstress.c @@ -71,7 +71,7 @@ typedef enum { OpSetInfo, OpBuddyRequest, OpDeleteBuddy, - OpSetStatus1, // Do setstatus 5x as often as other ops + OpSetStatus1, // Do setstatus 5x as often as other ops OpSetStatus2, OpSetStatus3, OpSetStatus4, @@ -102,19 +102,19 @@ typedef struct // GP stuff. //////////// - GPConnection gp; // The profile's GP object. - bool gpInitialized; // False until gpInitialize is called for this profile. - unsigned long disconnectTime; // Disconnect at this time. - GPProfile others[MAX_OTHERS]; // Remote profiles that this profile knows about. - int numOthers; // The number of others. - unsigned long connectTime; // When the connect attempt was made. - bool connected; // True when gpConnect finished successfully. + GPConnection gp; // The profile's GP object. + bool gpInitialized; // False until gpInitialize is called for this profile. + unsigned long disconnectTime; // Disconnect at this time. + GPProfile others[MAX_OTHERS]; // Remote profiles that this profile knows about. + int numOthers; // The number of others. + unsigned long connectTime; // When the connect attempt was made. + bool connected; // True when gpConnect finished successfully. // Op data. /////////// - Op activeOp; // The active operation, OpNull between operations. - unsigned long nextOpTime; // At this time, pick a new random operation. - int completedOps; // Total number of operations completed. + Op activeOp; // The active operation, OpNull between operations. + unsigned long nextOpTime; // At this time, pick a new random operation. + int completedOps; // Total number of operations completed. } Profile; typedef struct @@ -128,21 +128,21 @@ typedef struct /************ ** GLOBALS ** ************/ -char profilesFile[MAX_PATH]; // The file from which to load the profiles. -Profile profiles[PROFILES_MAX]; // All of the loaded profiles. -int numProfiles; // The number of loaded profiles. -int numConnections; // The number of profiles that are initialized/connected. -int maxConnections; // The maximum number of connected profiles. -int highestConnections; // The highest number of connections. -int totalConnections; // The total number of connections. -int numConnected; // The number of profiles that are actually logged in. -int highestConnected; // The highest simultaneous connected. -int totalConnected; // The total number connected over the entire run. -int connectsPerSecond; // Number of connection attempts per second. -unsigned long lastConnectTime; // The last time there was a connect. -unsigned long startShutdownTime; // When to start shutting down. -bool shuttingDown; // True if we're in the process of shutting down. -unsigned long runTime; // How long to run for. +char profilesFile[MAX_PATH]; // The file from which to load the profiles. +Profile profiles[PROFILES_MAX]; // All of the loaded profiles. +int numProfiles; // The number of loaded profiles. +int numConnections; // The number of profiles that are initialized/connected. +int maxConnections; // The maximum number of connected profiles. +int highestConnections; // The highest number of connections. +int totalConnections; // The total number of connections. +int numConnected; // The number of profiles that are actually logged in. +int highestConnected; // The highest simultaneous connected. +int totalConnected; // The total number connected over the entire run. +int connectsPerSecond; // Number of connection attempts per second. +unsigned long lastConnectTime; // The last time there was a connect. +unsigned long startShutdownTime; // When to start shutting down. +bool shuttingDown; // True if we're in the process of shutting down. +unsigned long runTime; // How long to run for. /******************** ** PROFILE LOADING ** @@ -355,9 +355,9 @@ void MessageOther(Profile* profile, GPProfile other) gpIDFromProfile(&profile->gp, other, &pid); switch (pid) { - case 100001: // Mr. Pants@dan@gamespy.com - case 100002: // walla@bryan@gamespy.com - case 100013: // lumberjack@jason@gamespy.com + case 100001: // Mr. Pants@dan@gamespy.com + case 100002: // walla@bryan@gamespy.com + case 100013: // lumberjack@jason@gamespy.com return; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/StdAfx.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/StdAfx.h index 904119de063..e5975f95adb 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/StdAfx.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/StdAfx.h @@ -8,18 +8,18 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers -#include // MFC support for Internet Explorer 4 Common Controls -#include // MFC extensions -#include // MFC core and standard components +#include // MFC support for Internet Explorer 4 Common Controls +#include // MFC extensions +#include // MFC core and standard components #ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT -#include // MFC socket extensions +#include // MFC socket extensions //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. @@ -27,4 +27,4 @@ #include "../../common/gsAvailable.h" #include "../gp.h" -#endif // !defined(AFX_STDAFX_H__8A9E3741_2C27_4AC4_AB95_C33A19DEB835__INCLUDED_) +#endif // !defined(AFX_STDAFX_H__8A9E3741_2C27_4AC4_AB95_C33A19DEB835__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.h index ed2a4b0df41..847d3af537e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.h @@ -6,13 +6,13 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif -#include "resource.h" // main symbols +#include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CGptestApp: @@ -46,4 +46,4 @@ class CGptestApp : public CWinApp //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_GPTEST_H__FFE82BD6_F31E_4222_818F_A8EE211E15E4__INCLUDED_) +#endif // !defined(AFX_GPTEST_H__FFE82BD6_F31E_4222_818F_A8EE211E15E4__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.rc b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.rc index 8981af0bcaa..43faa9bd616 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.rc +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptest.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 +#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -53,7 +53,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US "#endif\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -214,7 +214,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_GPTEST_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 603 TOPMARGIN, 7 BOTTOMMARGIN, 450 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -234,7 +234,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US STRINGTABLE BEGIN IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed." END -#endif // English (U.S.) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -252,10 +252,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE 9, 1 #pragma code_page(1252) -#endif //_WIN32 -#include "afxres.rc" // Standard components -#include "res\gptest.rc2" // non-Microsoft Visual C++ edited resources +#endif //_WIN32 +#include "afxres.rc" // Standard components +#include "res\gptest.rc2" // non-Microsoft Visual C++ edited resources #endif ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.cpp b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.cpp index 9e7488962c6..816f719310c 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.cpp +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.cpp @@ -1047,8 +1047,8 @@ BOOL CGptestDlg::OnInitDialog() // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog - SetIcon(m_hIcon, TRUE); // Set big icon - SetIcon(m_hIcon, FALSE); // Set small icon + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon dlg = this; m_connection = NULL; @@ -1110,7 +1110,7 @@ BOOL CGptestDlg::OnInitDialog() UpdateData(FALSE); - return TRUE; // return TRUE unless you set the focus to a control + return TRUE; // return TRUE unless you set the focus to a control } void CGptestDlg::OnDestroy() diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.h b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.h index 5154452f941..66855648ed2 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptest/gptestDlg.h @@ -8,7 +8,7 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// // CGptestDlg dialog @@ -17,7 +17,7 @@ class CGptestDlg : public CDialog { // Construction public: - CGptestDlg(CWnd* pParent = NULL); // standard constructor + CGptestDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CGptestDlg) @@ -103,8 +103,8 @@ class CGptestDlg : public CDialog // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CGptestDlg) protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL // Implementation protected: @@ -187,4 +187,4 @@ class CGptestDlg : public CDialog //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_GPTESTDLG_H__AA6A1E3F_9C28_4A6C_902F_328A8707E479__INCLUDED_) +#endif // !defined(AFX_GPTESTDLG_H__AA6A1E3F_9C28_4A6C_902F_328A8707E479__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptestc/gptestc.c b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptestc/gptestc.c index 38eb49699cc..1634be39eec 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptestc/gptestc.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/GP/gptestc/gptestc.c @@ -19,7 +19,7 @@ void RetailOutputA(CHAR* tszErr, ...); #pragma warning(disable : 4127) #endif -#ifdef __MWERKS__ // CodeWarrior will warn if function is not prototyped +#ifdef __MWERKS__ // CodeWarrior will warn if function is not prototyped int test_main(int argc, char** argv); #endif @@ -473,7 +473,7 @@ int test_main(int argc, char** argv) msleep(50); totalTime += 50; if (totalTime > 10000) { - if (appState == -1) // buddy is not actually on our buddy list + if (appState == -1) // buddy is not actually on our buddy list { if (noComLineArgs) printf(" %s is not on our buddy list! Sending him a buddy request and waiting for a response...\n", @@ -501,7 +501,7 @@ int test_main(int argc, char** argv) break; } } - else // buddy is on our buddy list but did not come online and set status to "Ready" + else // buddy is on our buddy list but did not come online and set status to "Ready" { if (noComLineArgs) printf("\n%s never showed up =(\n", GPTC_NICK2); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.c index 6aeba94ee88..0881c81754d 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.c @@ -43,7 +43,7 @@ void _gsDebugAssert(const char* string) #elif defined _WIN32 #include -#pragma warning(disable : 4127) // disable warnings from "conditional expression is constant" +#pragma warning(disable : 4127) // disable warnings from "conditional expression is constant" // ErrorMessage: Displays message and goes into an infinite loop // continues rendering @@ -51,7 +51,7 @@ void _gsDebugAssert(const char* string) { // DebugBreak(); -#ifdef _CONSOLE //,_MBCS +#ifdef _CONSOLE //,_MBCS printf("%s", string); while (1) @@ -99,8 +99,8 @@ void _gsDebugAssert(const char* string) // already included in gsPlatform.h /* -#include #include +#include */ // ErrorMessage: Displays message and goes into an infinite loop diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.h index c7242c52374..2dede08e489 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAssert.h @@ -45,8 +45,8 @@ extern void gsDebugAssert(const char* format, const char* szError, const char* s // be ignored. // ex// BAD: GS_ASSERT( i== FN()) // FN() will never be called, i will never be set in release builds -#define GS_ASSERT(x) {}; // ex// GS_ASSERT( result == GS_OK ) -#define GS_ASSERT_STR(x, t) {}; // ex// GS_ASSERT_STR( result == GS_OK ,"GSFunction failed") +#define GS_ASSERT(x) {}; // ex// GS_ASSERT( result == GS_OK ) +#define GS_ASSERT_STR(x, t) {}; // ex// GS_ASSERT_STR( result == GS_OK ,"GSFunction failed") #define GS_ASSERT_ALIGN_16(x) {}; #define GS_FAIL() #define GS_FAIL_STR(x) @@ -82,7 +82,7 @@ extern void gsDebugAssert(const char* format, const char* szError, const char* s gsDebugAssert("FAIL [%s] ln %s line:%d\n", t, __FILE__, __LINE__); \ }; -#endif // GSI_COMMON_DEBUG +#endif // GSI_COMMON_DEBUG // This is the default assert condition handler typedef void (*gsDebugAssertCallback)(const char* string); @@ -104,4 +104,4 @@ void gsDebugAssertCallbackSet(gsDebugAssertCallback theCallback); } #endif -#endif // __GSIDEBUG_H__ +#endif // __GSIDEBUG_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAvailable.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAvailable.h index fae1773cef2..f4a576bb999 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAvailable.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsAvailable.h @@ -19,10 +19,10 @@ extern char GSIACHostname[64]; // these are possible return types for GSIAvailableCheckThink typedef enum { - GSIACWaiting, // still waiting for a response from the backend - GSIACAvailable, // the game's backend services are available - GSIACUnavailable, // the game's backend services are unavailable - GSIACTemporarilyUnavailable // the game's backend services are temporarily unavailable + GSIACWaiting, // still waiting for a response from the backend + GSIACAvailable, // the game's backend services are available + GSIACUnavailable, // the game's backend services are unavailable + GSIACTemporarilyUnavailable // the game's backend services are temporarily unavailable } GSIACResult; // start an available check for a particular game diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCommon.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCommon.h index 5c7305825de..a321f7a8798 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCommon.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCommon.h @@ -15,7 +15,7 @@ //#define GS_PEER // MUST be defined if you are using Peer SDK #ifdef GS_PEER -#define UNIQUEID // enable unique id support +#define UNIQUEID // enable unique id support #endif /////////////////////////////////////////////////////////////////////////////// @@ -43,4 +43,4 @@ /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __GSCOMMON_H__ +#endif // __GSCOMMON_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.c index 12e65212c50..5d55e329b8d 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.c @@ -46,7 +46,7 @@ void gsCoreInitialize() // Is someone else shutting down the core? while (gsi_is_true(aCore->mIsShuttingDown)) - msleep(GSI_CORE_INIT_YIELD_MS); // yield to other thread + msleep(GSI_CORE_INIT_YIELD_MS); // yield to other thread // If we're the first reference, initialize the core if (gsiInterlockedIncrement(&aCore->mRefCount) == 1) { @@ -360,7 +360,7 @@ void gsiCoreExecuteTask(GSTask* theTask, gsi_time theTimeoutMs) break; } } - GS_ASSERT(anInsertPos != -1); // make sure it got in + GS_ASSERT(anInsertPos != -1); // make sure it got in aCore->mTaskArray[anInsertPos] = theTask; } #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.h index 275c5c5f21a..28bb42fec52 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCore.h @@ -38,7 +38,7 @@ typedef enum { typedef void (*GSTaskExecuteFunc)(void* theTaskData); typedef void (*GSTaskCallbackFunc)(void* theTaskData, GSTaskResult theResult); typedef void (*GSTaskCancelFunc)(void* theTaskData); -typedef gsi_bool (*GSTaskCleanupFunc)(void* theTaskData); // post run cleanup +typedef gsi_bool (*GSTaskCleanupFunc)(void* theTaskData); // post run cleanup typedef GSTaskResult (*GSTaskThinkFunc)(void* theTaskData); /////////////////////////////////////////////////////////////////////////////// @@ -57,7 +57,7 @@ typedef struct gsi_i32 mIsStarted; gsi_i32 mIsRunning; gsi_i32 mIsCanceled; - gsi_i32 mIsCallbackPending; // does the task require a callback? + gsi_i32 mIsCallbackPending; // does the task require a callback? // delegates void* mTaskData; @@ -74,9 +74,9 @@ typedef struct { gsi_u32 mRefCount; - gsi_bool volatile mIsStaticInitComplete; // once per application init - gsi_bool volatile mIsInitialized; // gsi_true when ready to use - gsi_bool volatile mIsShuttingDown; // gsi_true when shutting down + gsi_bool volatile mIsStaticInitComplete; // once per application init + gsi_bool volatile mIsInitialized; // gsi_true when ready to use + gsi_bool volatile mIsShuttingDown; // gsi_true when shutting down GSICriticalSection mQueueCrit; #ifdef GSICORE_DYNAMIC_TASK_LIST @@ -108,4 +108,4 @@ GSTask* gsiCoreCreateTask(void); /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __CORE_H__ +#endif // __CORE_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.c index 6ce7c5ad9d3..0df41e95f43 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.c @@ -52,7 +52,7 @@ gsi_bool gsiCryptRSAMaskData(unsigned char* data, gsi_u32 dataLen, const unsigne int k = 0; // The datablock may be used as the seed - unsigned char hashValue[GS_CRYPT_HASHSIZE]; // in integer form, NOT HEXSTRING + unsigned char hashValue[GS_CRYPT_HASHSIZE]; // in integer form, NOT HEXSTRING // seed should never be larger than the data block size (but it may be less) if (seedLen > GS_CRYPT_RSA_DATABLOCKSIZE) return gsi_false; @@ -65,8 +65,8 @@ gsi_bool gsiCryptRSAMaskData(unsigned char* data, gsi_u32 dataLen, const unsigne gsi_u32 temp = 0; // concatenate byte value of i onto seed - char seedPlusIter[GS_CRYPT_RSA_DATABLOCKSIZE + 4]; // seed||i - char hashHexStr[GS_CRYPT_RSA_DATABLOCKSIZE * 2 + 1]; // hexstr of hash "A1" rather than 0xA1 + char seedPlusIter[GS_CRYPT_RSA_DATABLOCKSIZE + 4]; // seed||i + char hashHexStr[GS_CRYPT_RSA_DATABLOCKSIZE * 2 + 1]; // hexstr of hash "A1" rather than 0xA1 memcpy(&seedPlusIter[0], seed, seedLen); seedPlusIter[GS_CRYPT_RSA_DATABLOCKSIZE + 0] = 0x00; seedPlusIter[GS_CRYPT_RSA_DATABLOCKSIZE + 1] = 0x00; @@ -86,7 +86,7 @@ gsi_bool gsiCryptRSAMaskData(unsigned char* data, gsi_u32 dataLen, const unsigne { gsi_u8 counter[4] = {0x00, 0x00, 0x00, 0x00}; SHA1Context sha; - counter[3] = (gsi_u8)(i / GS_CRYPT_HASHSIZE); // ensure little endian int + counter[3] = (gsi_u8)(i / GS_CRYPT_HASHSIZE); // ensure little endian int SHA1Reset(&sha); SHA1Input(&sha, (const unsigned char*)seed, seedLen); SHA1Input(&sha, counter, 4); @@ -149,10 +149,10 @@ gsi_i32 gsCryptRSAOAEPEncryptBuffer(const gsCryptRSAKey* publicKey, const unsign #if (GS_CRYPT_HASHSIZE == GS_CRYPT_MD5_HASHSIZE) const gsi_u8 lhash[GS_CRYPT_HASHSIZE] = {0xd4, 0x1d, 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, - 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e}; // hash of "" + 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e}; // hash of "" #else const gsi_u8 lhash[GS_CRYPT_HASHSIZE] = {0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, - 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09}; // hash of "" + 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09}; // hash of "" #endif const unsigned int maxPlainTextLen = GS_CRYPT_RSA_BYTE_SIZE - 2 * GS_CRYPT_HASHSIZE - 2; const unsigned int padSize = maxPlainTextLen - len; @@ -167,8 +167,8 @@ gsi_i32 gsCryptRSAOAEPEncryptBuffer(const gsCryptRSAKey* publicKey, const unsign // b. create pad // c. concatenate hash+pad+0x01+plainText memcpy(packet->maskedData, lhash, GS_CRYPT_HASHSIZE); - memset(&packet->maskedData[GS_CRYPT_HASHSIZE], 0, padSize); // pad with zero bytes - packet->maskedData[GS_CRYPT_HASHSIZE + padSize] = 0x01; // RSA encoding format ID (EME-OAEP) + memset(&packet->maskedData[GS_CRYPT_HASHSIZE], 0, padSize); // pad with zero bytes + packet->maskedData[GS_CRYPT_HASHSIZE + padSize] = 0x01; // RSA encoding format ID (EME-OAEP) memcpy(&packet->maskedData[GS_CRYPT_HASHSIZE + padSize + 1], plainText, len); // d. generate random seed (seed isn't masked until h.) @@ -195,7 +195,7 @@ gsi_i32 gsCryptRSAOAEPEncryptBuffer(const gsCryptRSAKey* publicKey, const unsign // 4. return cipher text memcpy(buffer, lintRSAPacket.mData, GS_CRYPT_RSA_BYTE_SIZE); */ - GS_ASSERT(0); // Section above needs revision due to byte order issues + GS_ASSERT(0); // Section above needs revision due to byte order issues return 0; } @@ -207,7 +207,7 @@ gsi_i32 gsCryptRSAPKCS1EncryptBuffer(const gsCryptRSAKey* publicKey, const unsig gsCryptRSAPKCS1Packet* packet = (gsCryptRSAPKCS1Packet*)buf; gsLargeInt_t lintRSAPacket; - if (len > (GS_CRYPT_RSA_BYTE_SIZE - 11)) // 2 byte header, 8 byte pad minimum, 1 byte separator + if (len > (GS_CRYPT_RSA_BYTE_SIZE - 11)) // 2 byte header, 8 byte pad minimum, 1 byte separator return -1; // form the packet @@ -215,7 +215,7 @@ gsi_i32 gsCryptRSAPKCS1EncryptBuffer(const gsCryptRSAKey* publicKey, const unsig packet->headerByte[1] = 0x02; gsiCryptRSAGeneratePad(packet->data, GS_CRYPT_RSA_BYTE_SIZE - len - 3); - packet->data[GS_CRYPT_RSA_BYTE_SIZE - len - 3] = 0x00; // separator + packet->data[GS_CRYPT_RSA_BYTE_SIZE - len - 3] = 0x00; // separator memcpy(&packet->data[GS_CRYPT_RSA_BYTE_SIZE - len - 3 + 1], plainText, len); if (gsi_is_false(gsLargeIntSetFromMemoryStream(&lintRSAPacket, (const gsi_u8*)buf, GS_CRYPT_RSA_BYTE_SIZE)) || @@ -254,9 +254,9 @@ static gsi_i32 gsCryptRSAPKCS1DecryptBuffer(const gsCryptRSAKey* privateKey, lintRSAPacket.mLength = GS_CRYPT_RSA_BYTE_SIZE / GS_LARGEINT_DIGIT_SIZE_BYTES; memcpy(lintRSAPacket.mData, cipherText, GS_CRYPT_RSA_BYTE_SIZE); - if (gsi_is_false(gsLargeIntReverseBytes(&lintRSAPacket)) || // reverse from bytebuffer to lint format + if (gsi_is_false(gsLargeIntReverseBytes(&lintRSAPacket)) || // reverse from bytebuffer to lint format gsi_is_false(gsLargeIntPowerMod(&lintRSAPacket, &privateKey->exponent, &privateKey->modulus, &lintRSAPacket)) || - gsi_is_false(gsLargeIntReverseBytes(&lintRSAPacket)) // reverse back into a bytebuffer + gsi_is_false(gsLargeIntReverseBytes(&lintRSAPacket)) // reverse back into a bytebuffer ) { return -1; @@ -280,13 +280,13 @@ static gsi_i32 gsCryptRSAPKCS1DecryptBuffer(const gsCryptRSAKey* privateKey, { if (temp[i] == 0) break; } - if (i < (2 + 8)) // 2 byte header, 8 byte minimum pad - return -3; // pad too small - if (i == GS_CRYPT_RSA_BYTE_SIZE) return -4; // no payload + if (i < (2 + 8)) // 2 byte header, 8 byte minimum pad + return -3; // pad too small + if (i == GS_CRYPT_RSA_BYTE_SIZE) return -4; // no payload // the rest is the msg - memcpy(plainText, (temp + i + 1), GS_CRYPT_RSA_BYTE_SIZE); // +1 to skip the 0x00 - *lenout = (gsi_u32)(GS_CRYPT_RSA_BYTE_SIZE - (i + 1)); // +1 to skip the 0x00 + memcpy(plainText, (temp + i + 1), GS_CRYPT_RSA_BYTE_SIZE); // +1 to skip the 0x00 + *lenout = (gsi_u32)(GS_CRYPT_RSA_BYTE_SIZE - (i + 1)); // +1 to skip the 0x00 return 0; } @@ -300,18 +300,18 @@ static gsi_i32 gsCryptRSAOAEPDecryptBuffer(const gsCryptRSAKey* privateKey, #if (GS_CRYPT_HASHSIZE == GS_CRYPT_MD5_HASHSIZE) const gsi_u8 lhash[GS_CRYPT_HASHSIZE] = {0xd4, 0x1d, 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, - 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e}; // hash of "" + 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e}; // hash of "" #else const gsi_u8 lhash[GS_CRYPT_HASHSIZE] = {0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, - 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09}; // hash of "" + 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09}; // hash of "" #endif lintRSAPacket.mLength = GS_CRYPT_RSA_BYTE_SIZE / 4; memcpy(lintRSAPacket.mData, cipherText, GS_CRYPT_RSA_BYTE_SIZE); - gsLargeIntReverseBytes(&lintRSAPacket); // reverse from bytebuffer to lint format + gsLargeIntReverseBytes(&lintRSAPacket); // reverse from bytebuffer to lint format gsLargeIntPowerMod(&lintRSAPacket, &privateKey->exponent, &privateKey->modulus, &lintRSAPacket); - gsLargeIntReverseBytes(&lintRSAPacket); // reverse back into a bytebuffer + gsLargeIntReverseBytes(&lintRSAPacket); // reverse back into a bytebuffer // check post exponentiation length if (lintRSAPacket.mLength < (GS_CRYPT_RSA_BYTE_SIZE / 4)) return -1; @@ -323,16 +323,16 @@ static gsi_i32 gsCryptRSAOAEPDecryptBuffer(const gsCryptRSAKey* privateKey, gsiCryptRSAMaskData(packet->maskedData, GS_CRYPT_RSA_DATABLOCKSIZE, packet->maskedSeed, GS_CRYPT_HASHSIZE); // 3. datablock = [lhash][0x00...][0x01][M] if (0 != memcmp(packet->maskedData, lhash, GS_CRYPT_HASHSIZE)) - return -2; // label has doesn't match (mismatched hash algorithms?) + return -2; // label has doesn't match (mismatched hash algorithms?) i = 33; while (i < GS_CRYPT_RSA_BYTE_SIZE && packet->maskedData[i] == 0x00) - i++; // may be zero bytes pad - if (i == GS_CRYPT_RSA_BYTE_SIZE || packet->maskedData[i] != 0x01) return -3; // must be a 0x01 following the pad + i++; // may be zero bytes pad + if (i == GS_CRYPT_RSA_BYTE_SIZE || packet->maskedData[i] != 0x01) return -3; // must be a 0x01 following the pad i++; - if (i == GS_CRYPT_RSA_BYTE_SIZE) return -4; // founnd the separator, but no message! + if (i == GS_CRYPT_RSA_BYTE_SIZE) return -4; // founnd the separator, but no message! memcpy(plainText, &packet->maskedData[i], (size_t)(GS_CRYPT_RSA_DATABLOCKSIZE - i)); - *lenout = (gsi_u32)(GS_CRYPT_RSA_DATABLOCKSIZE - i); // final length = blocksize - pad + *lenout = (gsi_u32)(GS_CRYPT_RSA_DATABLOCKSIZE - i); // final length = blocksize - pad return 0; } #endif @@ -366,7 +366,7 @@ gsi_i32 gsCryptRSASignHash(const gsCryptRSAKey* privateKey, const unsigned char* unsigned char* signedDataOut, gsi_u32* lenOut) { // Encode to PKCS1 signature form - gsi_u32 aKeyByteLength = privateKey->modulus.mLength * GS_LARGEINT_DIGIT_SIZE_BYTES; // key length in bytes + gsi_u32 aKeyByteLength = privateKey->modulus.mLength * GS_LARGEINT_DIGIT_SIZE_BYTES; // key length in bytes gsi_u32 aReservedLength = 3; gsi_u32 anOidLen; @@ -383,11 +383,11 @@ gsi_i32 gsCryptRSASignHash(const gsCryptRSAKey* privateKey, const unsigned char* else if (hashLen == GS_CRYPT_SHA1_HASHSIZE) anOidLen = sizeof(sha1Header); else - return -1; // hash algorithm could not be identified from hashLen + return -1; // hash algorithm could not be identified from hashLen // Make sure the key is large enough to sign this hash GS_ASSERT(hashLen + anOidLen + aReservedLength <= aKeyByteLength); - if (hashLen + anOidLen + aReservedLength > aKeyByteLength) return -2; // key is too small or hash is too large + if (hashLen + anOidLen + aReservedLength > aKeyByteLength) return -2; // key is too small or hash is too large // fill in header bytes writeBuf[0] = 0x00; @@ -405,7 +405,7 @@ gsi_i32 gsCryptRSASignHash(const gsCryptRSAKey* privateKey, const unsigned char* else if (hashLen == GS_CRYPT_SHA1_HASHSIZE) memcpy(&writeBuf[aKeyByteLength - hashLen - anOidLen], sha1Header, sizeof(sha1Header)); else - return -1; // should probably assert here + return -1; // should probably assert here // copy in the hash memcpy(&writeBuf[aKeyByteLength - hashLen], hash, hashLen); @@ -419,7 +419,7 @@ gsi_i32 gsCryptRSASignHash(const gsCryptRSAKey* privateKey, const unsigned char* // length of output data is always the length of the private key's modulus GS_ASSERT(dataToSign.mLength == privateKey->modulus.mLength); - gsLargeIntReverseBytes(&dataToSign); // switch back to rawbuffer byte order + gsLargeIntReverseBytes(&dataToSign); // switch back to rawbuffer byte order memcpy(signedDataOut, dataToSign.mData, aKeyByteLength); *lenOut = aKeyByteLength; @@ -447,7 +447,7 @@ gsi_i32 gsCryptRSAVerifySignedHash(const gsCryptRSAKey* publicKey, const unsigne // check parameters for common errors if (hash == NULL || sig == NULL) return -1; if (sigLen != publicKey->modulus.mLength * GS_LARGEINT_DIGIT_SIZE_BYTES) return -1; - if (hashLen != GS_CRYPT_MD5_HASHSIZE && hashLen != GS_CRYPT_SHA1_HASHSIZE) return -1; // invalid hashsize + if (hashLen != GS_CRYPT_MD5_HASHSIZE && hashLen != GS_CRYPT_SHA1_HASHSIZE) return -1; // invalid hashsize // "decrypt" the signature lintRSASignature.mLength = (l_word)(sigLen / GS_LARGEINT_DIGIT_SIZE_BYTES); @@ -465,7 +465,7 @@ gsi_i32 gsCryptRSAVerifySignedHash(const gsCryptRSAKey* publicKey, const unsigne if (packet[i] == 0x00) break; if (packet[i] != 0xFF) return -3; } - i++; // skip the 0x00 seperator byte + i++; // skip the 0x00 seperator byte // Next should be the hash header (but we don't know which one!) if ((i + sizeof(md5Header) + GS_CRYPT_MD5_HASHSIZE) == (lintRSASignature.mLength * GS_LARGEINT_DIGIT_SIZE_BYTES)) { @@ -489,7 +489,7 @@ gsi_i32 gsCryptRSAVerifySignedHash(const gsCryptRSAKey* publicKey, const unsigne if (0 != memcmp(&packet[i], hash, GS_CRYPT_SHA1_HASHSIZE)) return -5; } else - return -4; // unsupported hash + return -4; // unsupported hash // Signature valid! return 0; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.h index 449f577d336..2a1a13af715 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsCrypt.h @@ -31,7 +31,7 @@ extern "C" { #define GS_CRYPT_RSA_BINARY_SIZE 1024 #endif -#define GS_CRYPT_RSA_BYTE_SIZE (GS_CRYPT_RSA_BINARY_SIZE / 8) // 1024/8 = 128 +#define GS_CRYPT_RSA_BYTE_SIZE (GS_CRYPT_RSA_BINARY_SIZE / 8) // 1024/8 = 128 #define GS_CRYPT_RSA_DATABLOCKSIZE (GS_CRYPT_RSA_BYTE_SIZE - GS_CRYPT_HASHSIZE - 1) @@ -45,15 +45,15 @@ typedef struct typedef struct { - gsi_u8 headerByte; // always 0x00 - gsi_u8 maskedSeed[GS_CRYPT_HASHSIZE]; // not a MD5 hash, but must be same size - gsi_u8 maskedData[GS_CRYPT_RSA_DATABLOCKSIZE]; // data block xor'd + gsi_u8 headerByte; // always 0x00 + gsi_u8 maskedSeed[GS_CRYPT_HASHSIZE]; // not a MD5 hash, but must be same size + gsi_u8 maskedData[GS_CRYPT_RSA_DATABLOCKSIZE]; // data block xor'd } gsCryptRSAOAEPPacket; typedef struct { - gsi_u8 headerByte[2]; // always 0x00 0x02 - gsi_u8 data[GS_CRYPT_RSA_BYTE_SIZE - 2]; // data block xor'd + gsi_u8 headerByte[2]; // always 0x00 0x02 + gsi_u8 data[GS_CRYPT_RSA_BYTE_SIZE - 2]; // data block xor'd } gsCryptRSAPKCS1Packet; // The cipherText must be equal to GS_CRYPT_RSA_BYTE_SIZE @@ -85,4 +85,4 @@ gsi_i32 gsCryptRSASignHash(const gsCryptRSAKey* privateKey, const unsigned char* } #endif -#endif //__GS_CRYPT_H__ +#endif //__GS_CRYPT_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.c index 5646b8b9fbe..574204df2c5 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.c @@ -18,7 +18,7 @@ /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Static debug data -static struct GSIDebugInstance gGSIDebugInstance; // simple singleton "class" +static struct GSIDebugInstance gGSIDebugInstance; // simple singleton "class" // Line prefixes, e.g. "[ cat][type][ lev] text" char* gGSIDebugCatStrings[GSIDebugCat_Count] = { @@ -117,7 +117,7 @@ void gsDebugVaList(GSIDebugCategory theCat, GSIDebugType theType, GSIDebugLevel // Are we currently logging this type and level? aCurLevel = gGSIDebugInstance.mGSIDebugLevel[theCat][theType]; - if (aCurLevel & theLevel) // check the flag + if (aCurLevel & theLevel) // check the flag { #if !defined(_NITRO) // Output line prefix @@ -168,11 +168,11 @@ void gsDebugFormat(GSIDebugCategory theCat, GSIDebugType theType, GSIDebugLevel // 0000 0000 0000 0000 0000 0000 0000 0000 ................ static void HexEncode16(const char* theInStream, char* theOutStream, unsigned int theInLen) { - const int aRowWidth = 64; // width of the output - const char aReplaceChar = '.'; // Replace non print characters - const int aTextOffSet = 41; // text comes after hex bytes - char* aTextOutStream = (theOutStream + aTextOffSet); // set the write ptr - const unsigned int aWriteBit = theInLen & 1; // write on odd or even bytes? + const int aRowWidth = 64; // width of the output + const char aReplaceChar = '.'; // Replace non print characters + const int aTextOffSet = 41; // text comes after hex bytes + char* aTextOutStream = (theOutStream + aTextOffSet); // set the write ptr + const unsigned int aWriteBit = theInLen & 1; // write on odd or even bytes? assert(theInLen <= 16); @@ -336,4 +336,4 @@ void gsSetDebugCallback(GSIDebugCallback theCallback) /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // GSI_COMMON_DEBUG +#endif // GSI_COMMON_DEBUG diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.h index 6d75affbe1b..ac82c0d18ed 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsDebug.h @@ -22,33 +22,33 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////// // Input levels (text is reported at one of these levels) typedef gsi_u8 GSIDebugLevel; -#define GSIDebugLevel_HotError (GSIDebugLevel)(1 << 0) // 1 Unexpected Error -#define GSIDebugLevel_WarmError (GSIDebugLevel)(1 << 1) // 2 Expected Error -#define GSIDebugLevel_Warning (GSIDebugLevel)(1 << 2) // 4 Warnings and Errors -#define GSIDebugLevel_Notice (GSIDebugLevel)(1 << 3) // 8 Usefull debug info -#define GSIDebugLevel_Comment (GSIDebugLevel)(1 << 4) // 16 Debug spam -#define GSIDebugLevel_RawDump (GSIDebugLevel)(1 << 5) // 32 e.g. MemoryBuffer -#define GSIDebugLevel_StackTrace (GSIDebugLevel)(1 << 6) // 64 Important function entries +#define GSIDebugLevel_HotError (GSIDebugLevel)(1 << 0) // 1 Unexpected Error +#define GSIDebugLevel_WarmError (GSIDebugLevel)(1 << 1) // 2 Expected Error +#define GSIDebugLevel_Warning (GSIDebugLevel)(1 << 2) // 4 Warnings and Errors +#define GSIDebugLevel_Notice (GSIDebugLevel)(1 << 3) // 8 Usefull debug info +#define GSIDebugLevel_Comment (GSIDebugLevel)(1 << 4) // 16 Debug spam +#define GSIDebugLevel_RawDump (GSIDebugLevel)(1 << 5) // 32 e.g. MemoryBuffer +#define GSIDebugLevel_StackTrace (GSIDebugLevel)(1 << 6) // 64 Important function entries // add new ones here (update string table in gsiDebug.c!) -#define GSIDebugLevel_Count 7 // 7 reporting levels +#define GSIDebugLevel_Count 7 // 7 reporting levels // Output levels (a mask for the levels you want to receive) // (update string table in gsiDebug.c!) -#define GSIDebugLevel_None (GSIDebugLevel)(0) // No output -#define GSIDebugLevel_Normal (GSIDebugLevel)(0x07) // Warnings and above -#define GSIDebugLevel_Debug (GSIDebugLevel)(0x0F) // Notice and above -#define GSIDebugLevel_Verbose (GSIDebugLevel)(0x1F) // Comment and above -#define GSIDebugLevel_Hardcore (GSIDebugLevel)(0xFF) // Recv all +#define GSIDebugLevel_None (GSIDebugLevel)(0) // No output +#define GSIDebugLevel_Normal (GSIDebugLevel)(0x07) // Warnings and above +#define GSIDebugLevel_Debug (GSIDebugLevel)(0x0F) // Notice and above +#define GSIDebugLevel_Verbose (GSIDebugLevel)(0x1F) // Comment and above +#define GSIDebugLevel_Hardcore (GSIDebugLevel)(0xFF) // Recv all /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Output types typedef enum { - GSIDebugType_Network, // Network activity - GSIDebugType_File, // File output - GSIDebugType_Memory, // Memory allocations - GSIDebugType_State, // State update - GSIDebugType_Misc, // None of the above + GSIDebugType_Network, // Network activity + GSIDebugType_File, // File output + GSIDebugType_Memory, // Memory allocations + GSIDebugType_State, // State update + GSIDebugType_Misc, // None of the above // add new ones here (update string table in gsiDebug.c!) GSIDebugType_Count, @@ -71,8 +71,8 @@ typedef enum { GSIDebugCat_CDKey, // Add new ones here (update string table in gsiDebug.c!) - GSIDebugCat_Common, // Common should be last to prevent display weirdness - // resulting from initialization order + GSIDebugCat_Common, // Common should be last to prevent display weirdness + // resulting from initialization order GSIDebugCat_Count, GSIDebugCat_All = GSIDebugCat_Count } GSIDebugCategory; @@ -175,10 +175,10 @@ void gsSetDebugCallback(GSIDebugCallback theCallback); /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // GSI_COMMON_DEBUG +#endif // GSI_COMMON_DEBUG #if defined(__LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || defined(c_plusplus) } #endif -#endif // __GSIDEBUG_H__ +#endif // __GSIDEBUG_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.c index c850bb7689c..af86ed522bf 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.c @@ -46,15 +46,15 @@ gsi_bool gsiLargeIntInverseMod(const gsLargeInt_t* mod, l_word* modPrimeOut); #ifdef GS_LINT_TIMING typedef enum { - GSLintTimerMult, // "regular" multiplication - GSLintTimerMultM, // montgomery - GSLintTimerKMult, // karatsuba + GSLintTimerMult, // "regular" multiplication + GSLintTimerMultM, // montgomery + GSLintTimerKMult, // karatsuba GSLintTimerAdd, - GSLintTimerSub, // subtract + GSLintTimerSub, // subtract GSLintTimerDiv, - GSLintTimerSubDivide, // atomic divide + GSLintTimerSubDivide, // atomic divide GSLintTimerSquareMod, - GSLintTimerPowerMod, // modular exponentiation + GSLintTimerPowerMod, // modular exponentiation GSLintTimerCount } GSLintTimerID; @@ -64,7 +64,7 @@ typedef struct GSLintTimer gsi_time started; gsi_time total; gsi_u32 entries; - gsi_u32 running; // already entered? + gsi_u32 running; // already entered? } GSLintTimer; static struct GSLintTimer gTimers[GSLintTimerCount]; @@ -114,7 +114,7 @@ gsi_bool gsiLargeIntResize(gsLargeInt_t* lint, l_word length) // strip leading zeroes until length is reached if (lint->mLength >= length) { while (lint->mLength > length && lint->mData[lint->mLength - 1] == 0) - lint->mLength--; // check each digit to make sure it's zero + lint->mLength--; // check each digit to make sure it's zero if (lint->mLength == length) return gsi_true; else @@ -190,7 +190,7 @@ static gsi_i32 gsiLargeIntCompare(const l_word* data1, l_word len1, const l_word len1--; } } - return 0; // equal! + return 0; // equal! } /////////////////////////////////////////////////////////////////////////////// @@ -209,7 +209,7 @@ gsi_bool gsLargeIntAdd(const gsLargeInt_t* src1, const gsLargeInt_t* src2, gsLar { gsi_bool result = gsiLargeIntAdd( src1->mData, src1->mLength, src2->mData, src2->mLength, dest->mData, &dest->mLength, GS_LARGEINT_MAX_DIGITS); - if (gsi_is_false(result)) memset(dest, 0, sizeof(gsLargeInt_t)); // overflow + if (gsi_is_false(result)) memset(dest, 0, sizeof(gsLargeInt_t)); // overflow return result; } @@ -219,7 +219,7 @@ static gsi_bool gsiLargeIntAdd(const l_word* data1, l_word length1, const l_word l_word* lenout, l_word maxlen) { gsi_u32 i = 0; - l_dword carry = 0; // to hold overflow + l_dword carry = 0; // to hold overflow gsi_u32 shorterLen = 0; gsi_u32 longerLen = 0; @@ -228,7 +228,7 @@ static gsi_bool gsiLargeIntAdd(const l_word* data1, l_word length1, const l_word GSLINT_ENTERTIMER(GSLintTimerAdd); - if (maxlen < length1 || maxlen < length2) return gsi_false; // dest not large enough, OVERFLOW + if (maxlen < length1 || maxlen < length2) return gsi_false; // dest not large enough, OVERFLOW if (length1 < length2) { shorterLen = length1; @@ -249,7 +249,7 @@ static gsi_bool gsiLargeIntAdd(const l_word* data1, l_word length1, const l_word { carry += (l_dword)data1[i] + data2[i]; dest[i] = (l_word)carry; - carry = carry >> GS_LARGEINT_DIGIT_SIZE_BITS; // 32; + carry = carry >> GS_LARGEINT_DIGIT_SIZE_BITS; // 32; i++; } @@ -258,15 +258,15 @@ static gsi_bool gsiLargeIntAdd(const l_word* data1, l_word length1, const l_word { carry += (l_dword)longerSrc[i]; dest[i] = (l_word)carry; - carry = carry >> GS_LARGEINT_DIGIT_SIZE_BITS; // 32; + carry = carry >> GS_LARGEINT_DIGIT_SIZE_BITS; // 32; i++; } // Is there still a carry? // do not perform length check here, so that we can support oversized buffers - if (carry > 0) // && i < GS_LARGEINT_INT_SIZE) + if (carry > 0) // && i < GS_LARGEINT_INT_SIZE) { - if (maxlen <= i) return gsi_false; // OVERFLOW, no room for extra digit + if (maxlen <= i) return gsi_false; // OVERFLOW, no room for extra digit dest[i++] = (l_word)carry; carry = 0; } @@ -283,7 +283,7 @@ static gsi_bool gsiLargeIntAdd(const l_word* data1, l_word length1, const l_word GSLINT_EXITTIMER(GSLintTimerAdd); if (carry) - return gsi_false; // overflow + return gsi_false; // overflow else return gsi_true; } @@ -304,7 +304,7 @@ gsi_bool gsLargeIntSub(const gsLargeInt_t* src1, const gsLargeInt_t* src2, gsLar gsi_bool gsiLargeIntSub( const l_word* src1, l_word length1, const l_word* src2, l_word length2, l_word* dest, l_word* lenout) { - l_dword borrow = 0; // to hold overflow + l_dword borrow = 0; // to hold overflow gsi_u32 shorterLen = min(length1, length2); gsi_u32 i = 0; @@ -320,7 +320,7 @@ gsi_bool gsiLargeIntSub( { borrow = (l_dword)src2[i] - src1[i] - borrow; dest[i] = (l_word)borrow; - borrow = borrow >> 63; // shift to last bit. This will be 1 if negative, 0 if positive + borrow = borrow >> 63; // shift to last bit. This will be 1 if negative, 0 if positive i++; } while (i < length2) @@ -336,7 +336,7 @@ gsi_bool gsiLargeIntSub( GSLINT_EXITTIMER(GSLintTimerSub); return gsi_false; } - while (length1 > i) // make sure remaining digits are only leading zeroes + while (length1 > i) // make sure remaining digits are only leading zeroes { if (src1[i] != 0) { GSLINT_EXITTIMER(GSLintTimerSub); @@ -360,7 +360,7 @@ gsi_bool gsLargeIntMult(const gsLargeInt_t* src1, const gsLargeInt_t* src2, gsLa { gsi_bool result = gsiLargeIntMult( src1->mData, src1->mLength, src2->mData, src2->mLength, dest->mData, &dest->mLength, GS_LARGEINT_MAX_DIGITS); - if (gsi_is_false(result)) memset(dest, 0, sizeof(gsLargeInt_t)); // overflow + if (gsi_is_false(result)) memset(dest, 0, sizeof(gsLargeInt_t)); // overflow return result; } @@ -390,7 +390,7 @@ static gsi_bool gsiLargeIntMult(const l_word* data1, l_word length1, const l_wor unsigned int digit = (unsigned int)(i + k); if (digit >= maxlen) { GSLINT_EXITTIMER(GSLintTimerMult); - return gsi_false; // overflow + return gsi_false; // overflow } while (carry) { @@ -400,7 +400,7 @@ static gsi_bool gsiLargeIntMult(const l_word* data1, l_word length1, const l_wor digit++; if ((digit > maxlen) || (digit == maxlen && carry > 0)) { GSLINT_EXITTIMER(GSLintTimerMult); - return gsi_false; // overflow + return gsi_false; // overflow } } if (digit > (gsi_i32)temp.mLength) temp.mLength = (l_word)digit; @@ -409,7 +409,7 @@ static gsi_bool gsiLargeIntMult(const l_word* data1, l_word length1, const l_wor } // copy into destination (calculate length at this time) while (temp.mLength > 0 && temp.mData[temp.mLength - 1] == 0) - temp.mLength--; // strip leading zeroes + temp.mLength--; // strip leading zeroes *lenout = temp.mLength; memcpy(dest, temp.mData, (*lenout) * sizeof(l_word)); @@ -431,8 +431,8 @@ gsi_bool gsLargeIntDiv( static gsi_bool gsiLargeIntDiv( const l_word* src, l_word len, const gsLargeInt_t* div, gsLargeInt_t* dest, gsLargeInt_t* remainder) { - gsi_i32 result = 0; // temp, to store compare result - gsi_i32 divisorHighBit = GS_LARGEINT_DIGIT_SIZE_BITS - 1; // pre-calculate this + gsi_i32 result = 0; // temp, to store compare result + gsi_i32 divisorHighBit = GS_LARGEINT_DIGIT_SIZE_BITS - 1; // pre-calculate this // Bytes used from src1 int readIndex = 0; @@ -441,7 +441,7 @@ static gsi_bool gsiLargeIntDiv( // setup scratch copies gsLargeInt_t quotient; - l_word scopy[GS_LARGEINT_MAX_DIGITS * 2]; // we support double length source for division, when dest is null + l_word scopy[GS_LARGEINT_MAX_DIGITS * 2]; // we support double length source for division, when dest is null l_word scopyLen = len; const l_word* divisorData = div->mData; @@ -480,9 +480,9 @@ static gsi_bool gsiLargeIntDiv( GSLINT_EXITTIMER(GSLintTimerDiv); if (divisorLen == 0) - return gsi_false; // division by zero + return gsi_false; // division by zero else - return gsi_true; // zero divided, this is legal + return gsi_true; // zero divided, this is legal } if (gsiLargeIntCompare(scopy, scopyLen, divisorData, divisorLen) == -1) { // divisor is larger than source @@ -501,7 +501,7 @@ static gsi_bool gsiLargeIntDiv( divisorHighBit--; if (divisorHighBit == -1) { GSLINT_EXITTIMER(GSLintTimerDiv); - return gsi_false; // divide by zero + return gsi_false; // divide by zero } divisorHighBit += (divisorLen - 1) * GS_LARGEINT_DIGIT_SIZE_BITS; @@ -540,7 +540,7 @@ static gsi_bool gsiLargeIntDiv( readLength = 1; if (readIndex < 0) endLoop = gsi_true; - ; // no more digits + ; // no more digits } else { @@ -593,8 +593,8 @@ static gsi_bool gsiLargeIntSubDivide( l_word* src, l_word length, const l_word* divisor, l_word dlen, gsi_u32 highbit, l_word* quotient) { l_dword aboveBits = 0; - gsLargeInt_t temp; // stores temporary product before subtraction - gsLargeInt_t quotientCopy; // copy of quotient, length padded for multiplication + gsLargeInt_t temp; // stores temporary product before subtraction + gsLargeInt_t quotientCopy; // copy of quotient, length padded for multiplication GSLINT_ENTERTIMER(GSLintTimerSubDivide); // assert(src > divisor) @@ -626,7 +626,7 @@ static gsi_bool gsiLargeIntSubDivide( GS_LARGEINT_MAX_DIGITS))) { GSLINT_EXITTIMER(GSLintTimerSubDivide); - return gsi_false; // overflow + return gsi_false; // overflow } // while subtraction amount is larger than src, reduce it @@ -640,7 +640,7 @@ static gsi_bool gsiLargeIntSubDivide( &temp.mLength, GS_LARGEINT_MAX_DIGITS))) { GSLINT_EXITTIMER(GSLintTimerSubDivide); - return gsi_false; // overflow + return gsi_false; // overflow } } // if (gsiLargeIntCompare(temp.mData, temp.mLength, src, length)==1) @@ -667,7 +667,7 @@ gsi_bool gsLargeIntKMult(const gsLargeInt_t* src1, const gsLargeInt_t* src2, gsL l_word len = 0; gsi_bool result = gsi_false; - gsLargeInt_t temp; // to prevent issues if (src1 == src2 == dest) + gsLargeInt_t temp; // to prevent issues if (src1 == src2 == dest) // quick check for multiplication by 0 if (src1->mLength == 0 || src2->mLength == 0) { @@ -786,13 +786,13 @@ static gsi_bool gsiLargeIntKMult( else { gsi_bool result = gsiLargeIntSizePower2(&temp1, &temp2, lenout); - if (gsi_is_false(result)) return gsi_false; // could not resize - gsiLargeIntResize(&temp1, *lenout); // pad to new size - gsiLargeIntResize(&temp2, *lenout); // pad to new size + if (gsi_is_false(result)) return gsi_false; // could not resize + gsiLargeIntResize(&temp1, *lenout); // pad to new size + gsiLargeIntResize(&temp2, *lenout); // pad to new size gsiLargeIntKMult(temp1.mData, temp2.mData, *lenout, &temp3.mData[halfLen], &temp3.mLength, (l_word)(GS_LARGEINT_MAX_DIGITS - halfLen)); } - temp3.mLength = (l_word)(temp3.mLength + halfLen); // fix length for temp3 + temp3.mLength = (l_word)(temp3.mLength + halfLen); // fix length for temp3 // if (temp3.mLength > GS_LARGEINT_INT_SIZE) // _asm {int 3} // this should be at most temp1.mLength+temp2.mLength memset(temp3.mData, 0, halfLen * sizeof(l_word)); @@ -829,15 +829,15 @@ gsi_bool gsLargeIntSquareMod(const gsLargeInt_t* lint, const gsLargeInt_t* mod, { int i = 0; int k = 0; - int len = (int)lint->mLength; // signed version + int len = (int)lint->mLength; // signed version l_dword carry = 0; int oldShiftBit = 0; int newShiftBit = 0; gsi_bool result = gsi_false; unsigned int mask = (unsigned int)1 << (GS_LARGEINT_DIGIT_SIZE_BITS - 1); - l_word squareSums[GS_LARGEINT_MAX_DIGITS * 2]; // temp dest for square sums - l_word otherSums[GS_LARGEINT_MAX_DIGITS * 2]; // temp dest for other sums + l_word squareSums[GS_LARGEINT_MAX_DIGITS * 2]; // temp dest for square sums + l_word otherSums[GS_LARGEINT_MAX_DIGITS * 2]; // temp dest for other sums l_word squareLen = 0; l_word otherLen = 0; @@ -866,8 +866,8 @@ gsi_bool gsLargeIntSquareMod(const gsLargeInt_t* lint, const gsLargeInt_t* mod, // Multiply by 2 (because each internal pair appears twice) for (i = 0; i < (2 * len); i++) { - newShiftBit = (otherSums[i] & mask) == mask ? 1 : 0; // calc next carry 1 or 0 - otherSums[i] = (l_word)((otherSums[i] << 1) + oldShiftBit); // do the shift + newShiftBit = (otherSums[i] & mask) == mask ? 1 : 0; // calc next carry 1 or 0 + otherSums[i] = (l_word)((otherSums[i] << 1) + oldShiftBit); // do the shift oldShiftBit = newShiftBit; } // don't worry about left-overy carry because this can't overflow @@ -911,17 +911,17 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const gsLargeInt_t mod; gsLargeInt_t one; - gsi_u32 expHighBit; // highest bit set in exponent; + gsi_u32 expHighBit; // highest bit set in exponent; - int i = 0; // temp / counter - int k = 0; // binary size of our subdigits - int pow2k = 0; // 2^k - int kmask = 0; // 2^k-1 - int kdigits = 0; // number of k-sized digits in p + int i = 0; // temp / counter + int k = 0; // binary size of our subdigits + int pow2k = 0; // 2^k + int kmask = 0; // 2^k-1 + int kdigits = 0; // number of k-sized digits in p // int leadingZeroBits = 0; // to make p evenly divisible by k l_word modPrime; - gsLargeInt_t R; // "R" as used in the montgomery exponentiation algorithm. + gsLargeInt_t R; // "R" as used in the montgomery exponentiation algorithm. // gsLargeInt_t Rmod; // R mod n // gsLargeInt_t R2mod; // R^2 mod n @@ -985,25 +985,25 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const expHighBit = GS_LARGEINT_DIGIT_SIZE_BITS; while (((1 << (expHighBit - 1)) & power.mData[power.mLength - 1]) == 0) expHighBit--; - expHighBit += ((power.mLength - 1) * GS_LARGEINT_DIGIT_SIZE_BITS); // add in 32 bits for each extra byte + expHighBit += ((power.mLength - 1) * GS_LARGEINT_DIGIT_SIZE_BITS); // add in 32 bits for each extra byte // The previous algorithm used 1-bit digits // This algorithm uses k-bit digits // Determine the optimal size for k - k = 8; // this will support up to 4096 bit encryption (and probably higher) + k = 8; // this will support up to 4096 bit encryption (and probably higher) while ((k > 1) && (gsi_u32)((k - 1) * (k << ((k - 1) << 1)) / ((1 << k) - k - 1)) >= expHighBit - 1) { --k; } pow2k = 1 << k; kmask = pow2k - 1; - kdigits = (expHighBit + (k - 1)) / k; // ceiling(expHighBit/k) + kdigits = (expHighBit + (k - 1)) / k; // ceiling(expHighBit/k) // calculate "R" (if mod=5678, R=10000 e.g. One digit higher) memset(&R, 0, sizeof(R)); R.mLength = (l_word)(mod.mLength + 1); - if (R.mLength > GS_LARGEINT_MAX_DIGITS) return gsi_false; // you need to increase the large int capacity - R.mData[R.mLength - 1] = 1; // set first bit one byte higher than mod + if (R.mLength > GS_LARGEINT_MAX_DIGITS) return gsi_false; // you need to increase the large int capacity + R.mData[R.mLength - 1] = 1; // set first bit one byte higher than mod // find the multiplicative inverse of mod gsiLargeIntInverseMod(&mod, &modPrime); @@ -1039,11 +1039,11 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const // ~32k for 2048-bit RSA exponent // ~64k for 4096-bit RSA exponent int i = 0; - int valuesNeeded = pow2k; //((pow2k/2)-1); + int valuesNeeded = pow2k; //((pow2k/2)-1); int spaceneeded = sizeof(gsLargeInt_t) * valuesNeeded; lut = (gsLargeInt_t*)gsimalloc(spaceneeded); - if (lut == NULL) return gsi_false; // out of memory + if (lut == NULL) return gsi_false; // out of memory memset(lut, 0x00, spaceneeded); // set first values @@ -1071,8 +1071,8 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const } // set starting point - if (gsi_is_false(gsLargeIntMult(&base, &R, dest)) || // Normal multiply - gsi_is_false(gsLargeIntDiv(dest, &mod, NULL, dest))) // A mod operation + if (gsi_is_false(gsLargeIntMult(&base, &R, dest)) || // Normal multiply + gsi_is_false(gsLargeIntDiv(dest, &mod, NULL, dest))) // A mod operation { gsifree(lut); return gsi_false; @@ -1081,30 +1081,30 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const // loop through the k-sized digits for (i = 0; i < kdigits; i++) { - int bitReadIndex = expHighBit - (i * k); // index of the bit we're reading - int l_index; // = ((bitReadIndex-1)/GS_LARGEINT_DIGIT_SIZE_BITS); // -1 to use zero based indexes + int bitReadIndex = expHighBit - (i * k); // index of the bit we're reading + int l_index; // = ((bitReadIndex-1)/GS_LARGEINT_DIGIT_SIZE_BITS); // -1 to use zero based indexes int l_firstbit; l_dword twodigits; l_dword mask; l_word digitval; - l_index = ((bitReadIndex - 1) / GS_LARGEINT_DIGIT_SIZE_BITS); // -1 to use zero based indexes + l_index = ((bitReadIndex - 1) / GS_LARGEINT_DIGIT_SIZE_BITS); // -1 to use zero based indexes // for first digit, use leading zeroes when necessary - if ((bitReadIndex % k) != 0) bitReadIndex += k - (bitReadIndex % k); // round up to next k + if ((bitReadIndex % k) != 0) bitReadIndex += k - (bitReadIndex % k); // round up to next k if (i != 0) { if (bitReadIndex - (l_index * GS_LARGEINT_DIGIT_SIZE_BITS) > GS_LARGEINT_DIGIT_SIZE_BITS) l_index++; } if (i == 0) { // first digit - l_firstbit = l_index * GS_LARGEINT_DIGIT_SIZE_BITS; // first bit of this digit + l_firstbit = l_index * GS_LARGEINT_DIGIT_SIZE_BITS; // first bit of this digit twodigits = p->mData[l_index]; } else if (l_index > 0) { // middle digits - l_firstbit = (l_index - 1) * GS_LARGEINT_DIGIT_SIZE_BITS; // first bit of this digit + l_firstbit = (l_index - 1) * GS_LARGEINT_DIGIT_SIZE_BITS; // first bit of this digit twodigits = (l_dword)((l_dword)p->mData[l_index] << GS_LARGEINT_DIGIT_SIZE_BITS) | p->mData[l_index - 1]; } else if (l_index == 0 && p->mLength > 1) @@ -1116,7 +1116,7 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const else { // final digit, no proceeding digits - l_firstbit = l_index * GS_LARGEINT_DIGIT_SIZE_BITS; // first bit of this digit + l_firstbit = l_index * GS_LARGEINT_DIGIT_SIZE_BITS; // first bit of this digit twodigits = p->mData[l_index]; } mask = (l_dword)kmask << (bitReadIndex - l_firstbit - k); @@ -1164,7 +1164,7 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const else if (digitval != 0) { int counter = 0; - int lutindex = oddtab[digitval]; // we only precalculate the odd powers + int lutindex = oddtab[digitval]; // we only precalculate the odd powers // int lutindex = (oddtab[digitval]+1)/2; // we only precalculate the odd powers for (counter = (int)(k - twotab[digitval]); counter > 0; counter--) @@ -1223,19 +1223,19 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const // (below 65535 is a security risk, so don't go too small) gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const gsLargeInt_t* m, gsLargeInt_t* dest) { - int i = 0; // temp/counter - int digitNum = 0; // temp/counter + int i = 0; // temp/counter + int digitNum = 0; // temp/counter int digitBit = 0; l_word modPrime; - gsi_u32 expHighBit; // highest bit set in exponent; + gsi_u32 expHighBit; // highest bit set in exponent; - gsLargeInt_t R; // "R" as used in the montgomery exponentiation algorithm. - gsLargeInt_t Rmod; // R%mod - gsLargeInt_t R2mod; // R^2%mod + gsLargeInt_t R; // "R" as used in the montgomery exponentiation algorithm. + gsLargeInt_t Rmod; // R%mod + gsLargeInt_t R2mod; // R^2%mod gsLargeInt_t temp; - gsLargeInt_t xwiggle; // montgomery mult of (x,R2mod) + gsLargeInt_t xwiggle; // montgomery mult of (x,R2mod) gsLargeInt_t base; gsLargeInt_t power; @@ -1306,7 +1306,7 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const expHighBit = GS_LARGEINT_DIGIT_SIZE_BITS; while (((1 << (expHighBit - 1)) & power.mData[power.mLength - 1]) == 0) expHighBit--; - expHighBit += ((power.mLength - 1) * GS_LARGEINT_DIGIT_SIZE_BITS); // add in 32 bits for each extra byte + expHighBit += ((power.mLength - 1) * GS_LARGEINT_DIGIT_SIZE_BITS); // add in 32 bits for each extra byte // On to the tricky tricky! // 1) We can't compute B^P and later apply the mod; B^P is just too big @@ -1320,8 +1320,8 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const // calculate "R" (if mod=5678, R=10000 e.g. One digit higher) memset(&R, 0, sizeof(R)); R.mLength = (l_word)(mod.mLength + 1); - if (R.mLength > GS_LARGEINT_MAX_DIGITS) return gsi_false; // you need to increase the large int capacity - R.mData[R.mLength - 1] = 1; // set first bit one byte higher than mod + if (R.mLength > GS_LARGEINT_MAX_DIGITS) return gsi_false; // you need to increase the large int capacity + R.mData[R.mLength - 1] = 1; // set first bit one byte higher than mod // find the multiplicative inverse of mod gsiLargeIntInverseMod(&mod, &modPrime); @@ -1347,13 +1347,13 @@ gsi_bool gsLargeIntPowerMod(const gsLargeInt_t* b, const gsLargeInt_t* p, const // loop through the BITS of power // if the bit is 1, perform a multiplication by xwiggle? (11/2/2006) // TODO: THIS DOESN'T WORK IF THE HIGHBIT IS EVER ABOVE GS_LARGEINT_DIGIT_SIZE_BITS - memcpy(dest, &Rmod, sizeof(gsLargeInt_t)); // start dest at Rmod + memcpy(dest, &Rmod, sizeof(gsLargeInt_t)); // start dest at Rmod for (i = (int)(expHighBit - 1); i >= 0; i--) { // mont square the current total gsiLargeIntMultM(dest, dest, &mod, modPrime, dest); - digitNum = (gsi_i32)(i / GS_LARGEINT_DIGIT_SIZE_BITS); // which digit to extract a bit from? - digitBit = (gsi_i32)(i % GS_LARGEINT_DIGIT_SIZE_BITS); // which bit to extract from that digit? + digitNum = (gsi_i32)(i / GS_LARGEINT_DIGIT_SIZE_BITS); // which digit to extract a bit from? + digitBit = (gsi_i32)(i % GS_LARGEINT_DIGIT_SIZE_BITS); // which bit to extract from that digit? // if ((power.mData[k] & (1<mLength; i++) { - xiy0 = (l_dword)x->mData[i] * y->mData[0]; // y[0], NOT y[i] !! - u = (l_word)((xiy0 + A.mData[0]) * modPrime); // strip bits over the first digit + xiy0 = (l_dword)x->mData[i] * y->mData[0]; // y[0], NOT y[i] !! + u = (l_word)((xiy0 + A.mData[0]) * modPrime); // strip bits over the first digit // A = (A+x[i]*y + u[i]*m)/b // compute x[i]*y - memset(temp.mData, 0, y->mLength * sizeof(l_word)); // clear out a portion of temp + memset(temp.mData, 0, y->mLength * sizeof(l_word)); // clear out a portion of temp temp.mData[0] = x->mData[i]; - temp.mLength = y->mLength; // xi padded with zeroes + temp.mLength = y->mLength; // xi padded with zeroes if (gsi_is_false(gsiLargeIntMult( temp.mData, temp.mLength, y->mData, y->mLength, xiy.mData, &xiy.mLength, GS_LARGEINT_MAX_DIGITS))) { @@ -1547,7 +1547,7 @@ gsi_bool gsiLargeIntMultM(gsLargeInt_t* x, gsLargeInt_t* y, const gsLargeInt_t* return gsi_false; } // compute u[i]*m - memset(temp.mData, 0, m->mLength * sizeof(l_word)); // clear out a portion of temp + memset(temp.mData, 0, m->mLength * sizeof(l_word)); // clear out a portion of temp temp.mData[0] = u; temp.mLength = m->mLength; // if (gsi_is_false(gsiLargeIntMult(temp.mData, temp.mLength, m->mData, m->mLength, temp.mData, &temp.mLength))) @@ -1686,14 +1686,14 @@ gsi_bool gsLargeIntSetFromHexString(gsLargeInt_t* lint, const char* hexstream) // 2 characters per byte, 4 bytes per integer lint->mLength = (l_word)((len + (2 * GS_LARGEINT_DIGIT_SIZE_BYTES - 1)) / (2 * GS_LARGEINT_DIGIT_SIZE_BYTES)); - lint->mData[lint->mLength - 1] = 0; // set last byte to zero for left over characters + lint->mData[lint->mLength - 1] = 0; // set last byte to zero for left over characters while (len > 0) { if (len >= 2) - sscanf((char*)(hexstream + len - 2), "%02x", &temp); // sscanf requires a 4 byte dest + sscanf((char*)(hexstream + len - 2), "%02x", &temp); // sscanf requires a 4 byte dest else - sscanf((char*)(hexstream + len - 1), "%01x", &temp); // sscanf requires a 4 byte dest + sscanf((char*)(hexstream + len - 1), "%01x", &temp); // sscanf requires a 4 byte dest if (byteIndex == 0) *writePos = 0; *writePos |= (temp << (byteIndex * 8)); if (++byteIndex == GS_LARGEINT_DIGIT_SIZE_BYTES) { @@ -1747,7 +1747,7 @@ void gsLargeIntAddToMD5(const gsLargeInt_t* _lint, MD5_CTX* md5) // first, calculate the byte length byteLength = (int)gsLargeIntGetByteLength(&lint); - if (byteLength == 0) return; // no data + if (byteLength == 0) return; // no data dataStart = (gsi_u8*)lint.mData; if ((byteLength % GS_LARGEINT_DIGIT_SIZE_BYTES) != 0) @@ -1772,7 +1772,7 @@ gsi_u32 gsLargeIntGetByteLength(const gsLargeInt_t* lint) // skip leading zeroes while (intSize > 0 && lint->mData[intSize - 1] == 0) intSize--; - if (intSize == 0) return 0; // no data + if (intSize == 0) return 0; // no data byteSize = intSize * (gsi_i32)sizeof(l_word); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.h index fcd16da62f8..cdb5d02ec04 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsLargeInt.h @@ -17,7 +17,7 @@ extern "C" { // for simplicity, set the binary size to a value > gsCrypt.h binary size #ifndef GS_LARGEINT_BINARY_SIZE -#define GS_LARGEINT_BINARY_SIZE (2048) // *BIT* size (divide by 8 for byte size) +#define GS_LARGEINT_BINARY_SIZE (2048) // *BIT* size (divide by 8 for byte size) #endif // !!!!!!WARNING!!!!!! Encryption is fastest when digit type is the default system type, (ex: gsi_u32 on 32bit @@ -83,4 +83,4 @@ gsi_bool gsLargeIntWriteToMemoryStream(const gsLargeInt_t* lint, gsi_u8* data); } #endif -#endif // __GSLARGEINT_H__ +#endif // __GSLARGEINT_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.c index 5e0260d114f..807f1d7a790 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.c @@ -36,7 +36,7 @@ typedef gsi_u32 gsi_uint; // Small block optimization using fixed size mempool. // add multi-threaded support -#define MEM_PROFILE (1) // if on additional memprofiling code will be enabled for such things as high water mark calcs +#define MEM_PROFILE (1) // if on additional memprofiling code will be enabled for such things as high water mark calcs #if defined(MEM_PROFILE) #define IF_MEM_PROFILE_ISON(a) a #else @@ -45,12 +45,12 @@ typedef gsi_u32 gsi_uint; // Disable compiler warnings for issues that are unavoidable. ///////////////////////////////////////////////////////////// -#if defined(_MSC_VER) // DevStudio +#if defined(_MSC_VER) // DevStudio // Level4, "conditional expression is constant". // Occurs with use of the MS provided macro FD_SET #pragma warning(disable : 4127) #include -#endif // _MSC_VER +#endif // _MSC_VER #ifdef _WIN32 #define MEM_MANAGER_CALL _cdecl @@ -114,9 +114,9 @@ static MemManagerCallbacks memmanagercallbacks = { #ifdef MEM_MANAGER_DIRECT &malloc, &free, &realloc, #if defined(_PS2) || defined(_PSP) || defined(_PS3) - &memalign, // a version already exists on this platform + &memalign, // a version already exists on this platform #else - &_gsi_memalign, // wrote our own + &_gsi_memalign, // wrote our own #endif #else &_gsi_malloc, &_gsi_free, &_gsi_realloc, &_gsi_memalign @@ -161,13 +161,13 @@ void* gsimemalign(size_t boundary, size_t size) /***************************************************************************/ // Context Stack -#define MEM_CONTEXT_STACK_MAX 10 // max stack depth +#define MEM_CONTEXT_STACK_MAX 10 // max stack depth static gsMemMgrContext MemTypeStack[MEM_CONTEXT_STACK_MAX] = {gsMemMgrContext_Default}; static gsi_u32 MemTypeStackIndex = 0; extern gsMemMgrContext gsMemMgrContextCurrent; // Memtype Tag stack -#define MEM_TAG_STACK_MAX 10 // max stack depth +#define MEM_TAG_STACK_MAX 10 // max stack depth static gsi_u8 MemTagStack[MEM_TAG_STACK_MAX] = {0}; static gsi_u32 MemTagStackIndex = 0; @@ -180,7 +180,7 @@ static gsi_u32 MemTagStackIndex = 0; #define MEM_IS_POWER_OF_2(x) (((x) & ((x)-1)) == 0) #define MEMALIGN_POWEROF2(x, a) (((gsi_uint)(x) + (a - 1)) & ~(((gsi_uint)(a)) - 1)) -#if (1) // enable assert, otherwise this runs faster +#if (1) // enable assert, otherwise this runs faster #define MP_ASSERT(x) GS_ASSERT(x) #else #define MP_ASSERT(x) @@ -194,14 +194,14 @@ typedef struct gsi_u32 MemAvail; gsi_u32 MemUsed; gsi_u32 MemUsed_At_HighWater; - gsi_u32 MemWasted; // overhead memory + memory lost due to fragmentation. + gsi_u32 MemWasted; // overhead memory + memory lost due to fragmentation. - gsi_u32 ChunksCount; // number of ChunkHeaders in linked list. - gsi_u32 ChunksFreeCount; // number of free ChunkHeaders in linked list. + gsi_u32 ChunksCount; // number of ChunkHeaders in linked list. + gsi_u32 ChunksFreeCount; // number of free ChunkHeaders in linked list. gsi_u32 ChunksFreeLargestAvail; // these are the same as handles - gsi_u32 ChunksUsedCount; // number of ChunkHeaders which are in use. - gsi_u32 ChunksUsedCount_At_HighWater; // the most handles used at any one time + gsi_u32 ChunksUsedCount; // number of ChunkHeaders which are in use. + gsi_u32 ChunksUsedCount_At_HighWater; // the most handles used at any one time // memtype specifics gsi_u32 MemType_ChunksCount[MEM_TYPES_MAX]; @@ -221,7 +221,7 @@ typedef struct tMEM_CHUNK // private union { - gsi_uint MemUsed; // size used by application. ex// malloc(size) + gsi_uint MemUsed; // size used by application. ex// malloc(size) #ifdef GS_BIG_ENDIAN struct { @@ -246,16 +246,16 @@ typedef struct tMEM_CHUNK // public: // double linked list of all chunks struct tMEM_CHUNK* prev; - struct tMEM_CHUNK* next; // next chunk + struct tMEM_CHUNK* next; // next chunk // single linked list of free chunks - struct tMEM_CHUNK* NextFree; // next free chunk + struct tMEM_CHUNK* NextFree; // next free chunk } MEM_CHUNK; /***************************************/ // flag as in use, set size, memtype void MEM_CHUNKAlloc(MEM_CHUNK* _this, gsi_u8 _MemType, size_t _UsedSize) { - _UsedSize = MEMALIGN_POWEROF2(_UsedSize, 4); // The lower 2 bits are zero, so we don't store them. + _UsedSize = MEMALIGN_POWEROF2(_UsedSize, 4); // The lower 2 bits are zero, so we don't store them. GS_ASSERT_STR(_UsedSize < 0x3FFFFFC, "Alloc Memory size is too big."); _this->MEM_UsageStat.MemUsed = _UsedSize << 6; _this->MEM_UsageStat.MEM_TypeStruct.MemType = _MemType; @@ -332,7 +332,7 @@ void* MEM_CHUNKMemPtrGet(MEM_CHUNK* _this) typedef struct MEM_CHUNK_POOL { // public: - char Name[20]; // name of this pool. Used for debug purposes + char Name[20]; // name of this pool. Used for debug purposes // private: MEM_CHUNK* HeaderStart; MEM_CHUNK* HeaderEnd; @@ -350,7 +350,7 @@ MEM_CHUNK* MEM_CHUNK_POOLFindNextFreeChunk(MEM_CHUNK_POOL* _this, MEM_CHUNK* hea void MEM_CHUNK_POOLSplitChunk(MEM_CHUNK_POOL* _this, MEM_CHUNK* header, gsi_bool ReAlloc); void MEM_CHUNK_POOLFreeChunk(MEM_CHUNK_POOL* _this, MEM_CHUNK* header); MEM_CHUNK* MEM_CHUNK_POOLAllocChunk(MEM_CHUNK_POOL* _this, size_t Size, int Alignment, - gsi_bool Backwards); // int Alignment = PTR_ALIGNMENT, gsi_bool Backwards = gsi_false); + gsi_bool Backwards); // int Alignment = PTR_ALIGNMENT, gsi_bool Backwards = gsi_false); // move a chunk within the limits of prev + prev_size and next - this_size void MEM_CHUNK_POOLChunkMove(MEM_CHUNK_POOL* _this, MEM_CHUNK* oldpos, MEM_CHUNK* newpos); @@ -365,9 +365,9 @@ gsi_bool MEM_CHUNK_POOLIsValid(MEM_CHUNK_POOL* _this) } /***************************************/ -void* MEM_CHUNK_POOLmalloc(MEM_CHUNK_POOL* _this, size_t Size, gsi_i32 Alignment); //= PTR_ALIGNMENT); +void* MEM_CHUNK_POOLmalloc(MEM_CHUNK_POOL* _this, size_t Size, gsi_i32 Alignment); //= PTR_ALIGNMENT); // allocated backwards from top of heap -void* MEM_CHUNK_POOLmalloc_backwards(MEM_CHUNK_POOL* _this, size_t Size, gsi_i32 Alignment); //= PTR_ALIGNMENT); +void* MEM_CHUNK_POOLmalloc_backwards(MEM_CHUNK_POOL* _this, size_t Size, gsi_i32 Alignment); //= PTR_ALIGNMENT); void* MEM_CHUNK_POOLrealloc(MEM_CHUNK_POOL* _this, void* oldmem, size_t newSize); void MEM_CHUNK_POOLfree(MEM_CHUNK_POOL* _this, void* mem); @@ -494,13 +494,13 @@ void MEM_CHUNK_POOLCreate(MEM_CHUNK_POOL* _this, const char* szNameIn, char* ptr { int len; MEM_CHUNK* HeaderMid; - MP_ASSERT(((gsi_uint)ptr & 15) == 0) // ensure 16 byte alignment + MP_ASSERT(((gsi_uint)ptr & 15) == 0) // ensure 16 byte alignment // Copy limited length name len = strlen(szNameIn) + 1; if (len > 20) len = 20; memcpy(_this->Name, szNameIn, len); - _this->Name[19] = '\0'; // in case str is too long. + _this->Name[19] = '\0'; // in case str is too long. // create two nubs, at start, and end, with a chunk in between MP_ASSERT(size > 48 + 3 * sizeof(MEM_CHUNK)) @@ -513,7 +513,7 @@ void MEM_CHUNK_POOLCreate(MEM_CHUNK_POOL* _this, const char* szNameIn, char* ptr _this->HeaderStart->prev = NULL; _this->HeaderStart->next = HeaderMid; _this->HeaderStart->NextFree = HeaderMid; - MEM_CHUNKAlloc(_this->HeaderStart, 0, sizeof(MEM_CHUNK)); // don't mark as free + MEM_CHUNKAlloc(_this->HeaderStart, 0, sizeof(MEM_CHUNK)); // don't mark as free // Here is our real heap, after before and after overhead HeaderMid->prev = _this->HeaderStart; @@ -525,7 +525,7 @@ void MEM_CHUNK_POOLCreate(MEM_CHUNK_POOL* _this, const char* szNameIn, char* ptr _this->HeaderEnd->prev = HeaderMid; _this->HeaderEnd->next = NULL; _this->HeaderEnd->NextFree = NULL; - MEM_CHUNKAlloc(_this->HeaderEnd, 0, sizeof(MEM_CHUNK)); // don't mark as free + MEM_CHUNKAlloc(_this->HeaderEnd, 0, sizeof(MEM_CHUNK)); // don't mark as free _this->HeapSize = size; _this->pFirstFree = HeaderMid; @@ -692,10 +692,10 @@ MEM_CHUNK* MEM_CHUNK_POOLAllocChunk(MEM_CHUNK_POOL* _this, size_t Size, gsi_i32 MEM_CHUNK* header; gsi_u32 SizeNeeded = Size + sizeof(MEM_CHUNK); - SizeNeeded = MEMALIGN_POWEROF2(SizeNeeded, sizeof(MEM_CHUNK)); // must be aligned to this at least!!! + SizeNeeded = MEMALIGN_POWEROF2(SizeNeeded, sizeof(MEM_CHUNK)); // must be aligned to this at least!!! MP_ASSERT(Size) - MP_ASSERT(MEM_IS_POWER_OF_2(Alignment)) // must be power of two!!! + MP_ASSERT(MEM_IS_POWER_OF_2(Alignment)) // must be power of two!!! MP_ASSERT(Alignment >= PTR_ALIGNMENT) // Backwards = gsi_false; @@ -781,7 +781,7 @@ MEM_CHUNK* MEM_CHUNK_POOLAllocChunk(MEM_CHUNK_POOL* _this, size_t Size, gsi_i32 } // not crashing here. gsDebugFormat(GSIDebugCat_App, GSIDebugType_Misc, GSIDebugLevel_Notice, " Could not allocate %i bytes\n", Size); - GS_ASSERT_STR(0, "Out of memory"); //(_this->Name); + GS_ASSERT_STR(0, "Out of memory"); //(_this->Name); return NULL; } @@ -965,12 +965,12 @@ gsi_u32 MEM_CHUNK_POOLWalkForType(MEM_CHUNK_POOL* _this, int type, gsi_bool _Log while (header) { MP_ASSERT( - (header->next == NULL) || ((gsi_uint)header < (gsi_uint)header->next)) // infinite loop or out of place + (header->next == NULL) || ((gsi_uint)header < (gsi_uint)header->next)) // infinite loop or out of place MP_ASSERT( - (header->prev == NULL) || ((gsi_uint)header->prev < (gsi_uint)header)) // infinite loop or out of place - MP_ASSERT((header->prev == NULL) || (header->prev->next == header)) // previous linked correctly to us - MP_ASSERT((header->next == NULL) || (header->next->prev == header)) // next linked correctly to us - MP_ASSERT(MEM_CHUNKMemUsedGet(header) <= MEM_CHUNKChunkSizeGet(header)) // using too much mem + (header->prev == NULL) || ((gsi_uint)header->prev < (gsi_uint)header)) // infinite loop or out of place + MP_ASSERT((header->prev == NULL) || (header->prev->next == header)) // previous linked correctly to us + MP_ASSERT((header->next == NULL) || (header->next->prev == header)) // next linked correctly to us + MP_ASSERT(MEM_CHUNKMemUsedGet(header) <= MEM_CHUNKChunkSizeGet(header)) // using too much mem if (!MEM_CHUNKIsFree(header) && (MEM_CHUNKMemTypeGet(header) == type)) { // Don't log a message for the HeaderStart and HeaderEnd blocks. @@ -1009,12 +1009,12 @@ void MEM_CHUNK_POOLMemStatsGet(MEM_CHUNK_POOL* _this, MEM_STATS* pS) while (header) { MP_ASSERT( - (header->next == NULL) || ((gsi_uint)header < (gsi_uint)header->next)) // infinite loop or out of place + (header->next == NULL) || ((gsi_uint)header < (gsi_uint)header->next)) // infinite loop or out of place MP_ASSERT( - (header->prev == NULL) || ((gsi_uint)header->prev < (gsi_uint)header)) // infinite loop or out of place - MP_ASSERT((header->prev == NULL) || (header->prev->next == header)) // previous linked correctly to us - MP_ASSERT((header->next == NULL) || (header->next->prev == header)) // next linked correctly to us - MP_ASSERT(MEM_CHUNKMemUsedGet(header) <= MEM_CHUNKChunkSizeGet(header)) // using too much mem + (header->prev == NULL) || ((gsi_uint)header->prev < (gsi_uint)header)) // infinite loop or out of place + MP_ASSERT((header->prev == NULL) || (header->prev->next == header)) // previous linked correctly to us + MP_ASSERT((header->next == NULL) || (header->next->prev == header)) // next linked correctly to us + MP_ASSERT(MEM_CHUNKMemUsedGet(header) <= MEM_CHUNKChunkSizeGet(header)) // using too much mem pS->MemTotal += MEM_CHUNKTotalSizeGet(header); if (!MEM_CHUNKIsFree(header)) { @@ -1035,11 +1035,11 @@ void MEM_CHUNK_POOLMemStatsGet(MEM_CHUNK_POOL* _this, MEM_STATS* pS) { // free chunk MP_ASSERT((header->NextFree == NULL) || - ((gsi_uint)header < (gsi_uint)header->NextFree)) // infinite loop or out of place + ((gsi_uint)header < (gsi_uint)header->NextFree)) // infinite loop or out of place // make sure we aren't fragmented, as this ruins some algorithm assumptions - MP_ASSERT((header->next == NULL) || (!MEM_CHUNKIsFree(header->next))) // infinite loop or out of place - MP_ASSERT((header->prev == NULL) || (!MEM_CHUNKIsFree(header->prev))) // infinite loop or out of place + MP_ASSERT((header->next == NULL) || (!MEM_CHUNKIsFree(header->next))) // infinite loop or out of place + MP_ASSERT((header->prev == NULL) || (!MEM_CHUNKIsFree(header->prev))) // infinite loop or out of place // previous free chunk linked correctly to us, we aren't a lost chunk MP_ASSERT(header == NextFree) @@ -1090,7 +1090,7 @@ void MEM_CHUNK_POOLMemStatsGet(MEM_CHUNK_POOL* _this, MEM_STATS* pS) pS->MemType_MemUsed_At_HighWater[i] = pS->MemType_MemUsed[i]; } - MP_ASSERT(ChunksFreeLostCount == 0) // lost free blocks + MP_ASSERT(ChunksFreeLostCount == 0) // lost free blocks } //-------------------------------------------------------------------------- @@ -1253,7 +1253,7 @@ gsMemMgrContext gsMemMgrCreate(gsMemMgrContext context, const char* PoolName, vo // Warn!!!! gsDebugFormat(GSIDebugCat_App, GSIDebugType_Memory, GSIDebugLevel_Comment, "Out of memory context handles!\n"); GS_ASSERT(0); - return gsMemMgrContext_Invalid; // ran out of context slots + return gsMemMgrContext_Invalid; // ran out of context slots } MEM_CHUNK_POOLCreate(&gChunkPool[context], PoolName, ptr, thePoolSize); @@ -1501,11 +1501,11 @@ void gsMemMgrDumpAllocations() gsiLeaveCriticalSection(&gMemCrit); - GSI_UNUSED(aStartTime); // may be unused if common debug is not defined + GSI_UNUSED(aStartTime); // may be unused if common debug is not defined #endif } -#if (1) // test stuff +#if (1) // test stuff #define PTR_TABLE_SIZE 2048 static int PtrTableCount = 0; @@ -1582,7 +1582,7 @@ void gsMemMgrSelfText() } } else - continue; // skip count + continue; // skip count c++; MEM_CHUNK_POOLCheckValidity(&gChunkPool); @@ -1593,4 +1593,4 @@ void gsMemMgrSelfText() /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // GSI_MEM_MANAGED +#endif // GSI_MEM_MANAGED diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.h index ec05a8ef828..b8cb328f705 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsMemory.h @@ -45,7 +45,7 @@ typedef enum { void* gsimalloc(size_t size); void* gsirealloc(void* ptr, size_t size); void gsifree(void* ptr); -void* gsimemalign(size_t boundary, size_t size); // TODO +void* gsimemalign(size_t boundary, size_t size); // TODO //-------------------------------------------------------------------------- // Customer supplied memory manager customization interface @@ -76,7 +76,7 @@ void gsiMemoryCallbacksSet(gsMallocCB p_malloc, gsFreeCB p_free, gsReallocCB p_r typedef enum { gsMemMgrContext_Invalid = -1, gsMemMgrContext_Default = 0, - gsMemMgrContext_Count = 16 // max number of mempools + gsMemMgrContext_Count = 16 // max number of mempools } gsMemMgrContext; // call this to enable GameSpy's provided memory manager @@ -125,7 +125,7 @@ void gsMemMgrDestroy(gsMemMgrContext context); // These functions all run on the current mempool context. void gsMemMgrDumpStats(); void gsMemMgrDumpAllocations(); -void gsMemMgrValidateMemoryPool(); // walk heap and check integrity +void gsMemMgrValidateMemoryPool(); // walk heap and check integrity // -------------Tool use ------------------------ // find which mempool context this ptr is part of, if any. @@ -164,4 +164,4 @@ void gsMemMgrSelfText(); } #endif -#endif // __GSIMEMORY_H__ +#endif // __GSIMEMORY_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatform.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatform.h index d526844fe7f..c463acc8186 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatform.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatform.h @@ -64,9 +64,9 @@ // WIN32 #elif defined(_WIN32) #define WIN32_LEAN_AND_MEAN -#include #include #include +#include #if defined(GSI_WINSOCK2) #include @@ -81,30 +81,30 @@ #elif defined(_PS2) // EENet headers must be included before common PS2 headers #ifdef EENET -#include +#include #include #include -#include -#include -#include -#include +#include +#include #include +#include +#include #include -#include +#include -#endif // EENET +#endif // EENET // Common PS2 headers #include -#include -#include -#include -#include -#include #include #include #include #include +#include +#include +#include +#include +#include #ifdef SN_SYSTEMS // undefine socket defines from sys/types.h @@ -117,30 +117,30 @@ #undef FD_ISSET #undef FD_SETSIZE #undef fd_set +#include "sneeutil.h" #include "snskdefs.h" -#include "sntypes.h" #include "snsocket.h" -#include "sneeutil.h" #include "sntcutil.h" -#endif // SN_SYSTEMS +#include "sntypes.h" +#endif // SN_SYSTEMS #ifdef INSOCK #include "libinsck.h" #include "libnet.h" #include "sys/errno.h" //#include "libmrpc.h" -#endif // INSOCK +#endif // INSOCK // LINUX and MACOSX #elif defined(_UNIX) -#include -#include -#include +#include #include -#include -#include #include -#include +#include +#include +#include +#include +#include // MACOSX Warning!! netdb.h has it's own NOFILE define. // GameSpy uses NOFILE to determine if an HD is available @@ -155,8 +155,8 @@ #include #include -#include #include +#include //#include #include @@ -166,59 +166,59 @@ // Nintendo DS #elif defined(_NITRO) #include -#define NINET_NWBASE_MD5_H_ // resolves md5 conflicts -#include -#include // mwerks +#define NINET_NWBASE_MD5_H_ // resolves md5 conflicts +#include // mwerks #include +#include // Raw sockets are undefined on Nitro #define SB_NO_ICMP_SUPPORT // Sony PSP #elif defined(_PSP) +#include #include #include +#include +#include +#include #include #include -#include #include -#include -#include #include -#include #include -#include #include +#include #include -#include #include +#include // PS3 #elif defined(_PS3) +#include +#include +#include #include +#include +#include +#include #include -#include -#include #include #include #include +#include #include -#include -#include -#include -#include -#include -#include +#include // #include #include #include // Nintendo Wii #elif defined(_REVOLUTION) +#include #include -#include #include -#include +#include // Raw sockets are undefined on Revolution #define SB_NO_ICMP_SUPPORT @@ -227,7 +227,7 @@ #else #error "The GameSpy SDKs do not support this operating system" -#endif //(platform switch) +#endif //(platform switch) //---------- __cdecl fix for __fastcall conventions ---------- #if defined(_WIN32) @@ -237,7 +237,7 @@ #endif //---------- Handle Endianess ---------------------- -#if defined(_PS3) || defined(_REVOLUTION) || defined(_X360) // defined(_MACOSX) +#if defined(_PS3) || defined(_REVOLUTION) || defined(_X360) // defined(_MACOSX) #define GSI_BIG_ENDIAN #endif #ifndef GSI_BIG_ENDIAN @@ -275,11 +275,11 @@ typedef short gsi_i16; typedef unsigned short gsi_u16; typedef int gsi_i32; typedef unsigned int gsi_u32; -typedef unsigned int gsi_time; // must be 32 bits +typedef unsigned int gsi_time; // must be 32 bits // decprecated -typedef gsi_i32 goa_int32; // 2003.Oct.04.JED - typename deprecated -typedef gsi_u32 goa_uint32; // these types will be removed once all SDK's are updated +typedef gsi_i32 goa_int32; // 2003.Oct.04.JED - typename deprecated +typedef gsi_u32 goa_uint32; // these types will be removed once all SDK's are updated typedef int gsi_bool; #define gsi_false ((gsi_bool)0) @@ -315,16 +315,16 @@ typedef uint64_t gsi_u64; #elif defined(_REVOLUTION) typedef signed long long gsi_i64; typedef unsigned long long gsi_u64; -#else /* _UNIX */ +#else /* _UNIX */ typedef long long gsi_i64; typedef unsigned long long gsi_u64; -#endif // 64 bit types +#endif // 64 bit types #ifndef GSI_UNICODE #define gsi_char char #else #define gsi_char unsigned short -#endif // goa_char +#endif // goa_char // expected ranges for integer types #define GSI_MIN_I8 CHAR_MIN @@ -412,11 +412,11 @@ extern "C" { #else #define _tsnprintf snprintf #endif -#endif // GSI_UNICODE +#endif // GSI_UNICODE #if defined(_WIN32) #define snprintf _snprintf -#endif // _WIN32 +#endif // _WIN32 #if defined(_WIN32) #define strcasecmp _stricmp @@ -444,18 +444,18 @@ static char _mempool[MEMPOOL_SIZE] POST_ALIGN(16); */ #if defined _WIN32 -#define PRE_ALIGN(x) __declspec(align(x)) // ignore Win32 directive -#define POST_ALIGN(x) // ignore +#define PRE_ALIGN(x) __declspec(align(x)) // ignore Win32 directive +#define POST_ALIGN(x) // ignore #elif defined(_PS2) || defined(_PSP) || defined(_PS3) -#define PRE_ALIGN(x) // ignored this on psp/ps2 -#define POST_ALIGN(x) __attribute__((aligned(x))) // +#define PRE_ALIGN(x) // ignored this on psp/ps2 +#define POST_ALIGN(x) __attribute__((aligned(x))) // #elif defined(_REVOLUTION) -#define PRE_ALIGN(x) // not needed +#define PRE_ALIGN(x) // not needed #define POST_ALIGN(x) __attribute__((aligned(32))) #else // #warning "Platform not supported" -#define PRE_ALIGN(x) // ignore -#define POST_ALIGN(x) // ignore +#define PRE_ALIGN(x) // ignore +#define POST_ALIGN(x) // ignore #endif #define DIM(x) (sizeof(x) / sizeof((x)[0])) @@ -472,4 +472,4 @@ extern gsi_u64 gsiByteOrderSwap64(gsi_u64); /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __GSPLATFORM_H__ +#endif // __GSPLATFORM_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.c index 69b294b0c5e..e2f359e54a7 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.c @@ -24,8 +24,8 @@ #elif defined(_PS2) #include "ps2/gsSocketPs2.c" #elif defined(_PS3) -#include "ps3/gsSocketPs3.c" #include +#include "ps3/gsSocketPs3.c" #elif defined(_PSP) #include "psp/gsSocketPSP.c" #elif defined(_REVOLUTION) @@ -36,11 +36,11 @@ // Disable compiler warnings for issues that are unavoidable. ///////////////////////////////////////////////////////////// -#if defined(_MSC_VER) // DevStudio +#if defined(_MSC_VER) // DevStudio // Level4, "conditional expression is constant". // Occurs with use of the MS provided macro FD_SET #pragma warning(disable : 4127) -#endif // _MSC_VER +#endif // _MSC_VER /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -99,7 +99,7 @@ int SetSockBlocking(SOCKET sock, int isblocking) if (isblocking) argp = -1; else - argp = 5; // added longer timeout to 5ms + argp = 5; // added longer timeout to 5ms sceInsockSetRecvTimeout(sock, argp); sceInsockSetSendTimeout(sock, argp); sceInsockSetShutdownTimeout(sock, argp); @@ -152,7 +152,7 @@ int DisableNagle(SOCKET sock) // not supported return 0; -#endif // moved this to here to silence VC warning +#endif // moved this to here to silence VC warning } #ifndef INSOCK @@ -285,9 +285,9 @@ int GSISocketSelect(SOCKET theSocket, int* theReadFlag, int* theWriteFlag, int* else *theExceptFlag = 0; } - return aResult; // 0 or 1 at this point + return aResult; // 0 or 1 at this point } -#endif // !nitro && !revolution && !insock +#endif // !nitro && !revolution && !insock // Return 1 for immediate recv, otherwise 0 int CanReceiveOnSocket(SOCKET sock) @@ -413,7 +413,7 @@ HOSTENT* getlocalhost(void) localhost.h_addr_list = ipPtrs; // Look up each address and copy into the HOSTENT structure - aCount = 0; // count of valid interfaces + aCount = 0; // count of valid interfaces for (aInterfaceNum = 0; aInterfaceNum < aNumInterfaces; aInterfaceNum++) { sceInetAddress_t anAddr; @@ -627,4 +627,4 @@ gsi_u32 gsiGetBroadcastIP(void) /////////////////////////////////////////////////// #if defined(_MSC_VER) #pragma warning(default : 4127) -#endif // _MSC_VER +#endif // _MSC_VER diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.h index e01be8b10a3..e447236e508 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformSocket.h @@ -133,9 +133,9 @@ gsiSocketGethostbyaddr(a, l, t) SOC_GetHostByAddr(a, l, t) gsiSocketGethostbynam #define SO_KEEPALIVE SCE_NET_INET_SO_KEEPALIVE #define SO_REUSEADDR SCE_NET_INET_SO_REUSEADDR -#define IPPROTO_TCP SCE_NET_INET_IPPROTO_TCP // protocol defined by SOCK_STREAM -#define IPPROTO_UDP SCE_NET_INET_IPPROTO_UDP // protocol defined by SOCK_DGRAM -#define IPPROTO_ICMP SCE_NET_INET_IPPROTO_ICMP // protocol for ICMP pings +#define IPPROTO_TCP SCE_NET_INET_IPPROTO_TCP // protocol defined by SOCK_STREAM +#define IPPROTO_UDP SCE_NET_INET_IPPROTO_UDP // protocol defined by SOCK_DGRAM +#define IPPROTO_ICMP SCE_NET_INET_IPPROTO_ICMP // protocol for ICMP pings // structures #define in_addr SceNetInetInAddr @@ -186,7 +186,7 @@ gsiSocketGethostbyaddr(a, l, t) SOC_GetHostByAddr(a, l, t) gsiSocketGethostbynam #define inet_addr sceNetInetInetAddr // This is not the correct function for gethostname, it should get the string name of the local host // not the sockaddr_in struct -#define gethostname // sceNetInetGetsockname +#define gethostname // sceNetInetGetsockname #define getsockname(s, n, l) sceNetInetGetsockname(s, n, (SceNetInetSocklen_t*)l) #define GOAGetLastError(s) sceNetInetGetErrno() @@ -196,7 +196,7 @@ gsiSocketGethostbyaddr(a, l, t) SOC_GetHostByAddr(a, l, t) gsiSocketGethostbynam { char* h_name; char** h_aliases; - gsi_u16 h_addrtype; // AF_INET + gsi_u16 h_addrtype; // AF_INET gsi_u16 h_length; char** h_addr_list; }; @@ -204,13 +204,13 @@ gsiSocketGethostbyaddr(a, l, t) SOC_GetHostByAddr(a, l, t) gsiSocketGethostbynam #define gethostbyname gsSocketGetHostByName #define inet_ntoa gsSocketInetNtoa -#define GSI_RESOLVER_TIMEOUT (5 * 1000 * 1000) // 5 seconds +#define GSI_RESOLVER_TIMEOUT (5 * 1000 * 1000) // 5 seconds #define GSI_RESOLVER_RETRY (2) -struct hostent* gsSocketGetHostByName(const char* name); // gsSocketPSP.c +struct hostent* gsSocketGetHostByName(const char* name); // gsSocketPSP.c const char* gsSocketInetNtoa(struct in_addr in); -#endif // _PSP +#endif // _PSP // XBOX doesn't have host lookup #if defined(_XBOX) @@ -220,7 +220,7 @@ struct hostent { char* h_name; char** h_aliases; - gsi_u16 h_addrtype; // AF_INET + gsi_u16 h_addrtype; // AF_INET gsi_u16 h_length; char** h_addr_list; }; @@ -241,7 +241,7 @@ char* inet_ntoa(IN_ADDR in_addr); #endif // SOCKET ERROR CODES -#if defined(_REVOLUTION) // not sure if Wii uses this or _REV +#if defined(_REVOLUTION) // not sure if Wii uses this or _REV #define WSAEWOULDBLOCK SO_EWOULDBLOCK #define WSAEINPROGRESS SO_EINPROGRESS #define WSAEALREADY SO_EALREADY @@ -305,7 +305,7 @@ char* inet_ntoa(IN_ADDR in_addr); #define WSAEINVAL SOC_EINVAL #elif defined(_PS3) #define WSAEWOULDBLOCK SYS_NET_EWOULDBLOCK -#define WSAEINPROGRESS SYS_NET_EINPROGRESS // SYS_NET_ERROR_EINPROGRESS +#define WSAEINPROGRESS SYS_NET_EINPROGRESS // SYS_NET_ERROR_EINPROGRESS #define WSAEALREADY SYS_NET_EALREADY #define WSAENOTSOCK SYS_NET_ENOTSOCK #define WSAEDESTADDRREQ SYS_NET_EDESTADDRREQ @@ -323,8 +323,8 @@ char* inet_ntoa(IN_ADDR in_addr); #define WSAENETUNREACH SYS_NET_ENETUNREACH #define WSAENETRESET SYS_NET_ENETRESET #define WSAECONNABORTED SYS_NET_ECONNABORTED -#define WSAECONNRESET SYS_NET_ECONNRESET // SYS_NET_ERROR_ECONNRESET -#define WSAENOBUFS SYS_NET_ENOBUFS // SYS_NET_ERROR_ENOBUFS +#define WSAECONNRESET SYS_NET_ECONNRESET // SYS_NET_ERROR_ECONNRESET +#define WSAENOBUFS SYS_NET_ENOBUFS // SYS_NET_ERROR_ENOBUFS #define WSAEISCONN SYS_NET_EISCONN #define WSAENOTCONN SYS_NET_ENOTCONN #define WSAESHUTDOWN SYS_NET_ESHUTDOWN @@ -384,7 +384,7 @@ char* inet_ntoa(IN_ADDR in_addr); #endif // make caps types interchangeable on all platforms -#if !defined(_WIN32) && !defined(_NITRO) && !defined(_REVOLUTION) // necessary for Wii?? +#if !defined(_WIN32) && !defined(_NITRO) && !defined(_REVOLUTION) // necessary for Wii?? typedef int SOCKET; typedef struct sockaddr SOCKADDR; typedef struct sockaddr_in SOCKADDR_IN; @@ -400,12 +400,12 @@ typedef struct timeval TIMEVAL; #ifdef INSOCK //#define NETBUFSIZE (sceLIBNET_BUFFERSIZE) -#define NETBUFSIZE (32768) // buffer size for our samples +#define NETBUFSIZE (32768) // buffer size for our samples // used in place of shutdown function to avoid blocking shutdown call int gsiShutdown(SOCKET s, int how); -#define GOAGetLastError(s) sceInsockErrno // not implemented +#define GOAGetLastError(s) sceInsockErrno // not implemented #define closesocket(s) gsiShutdown(s, SCE_INSOCK_SHUT_RDWR) #undef shutdown #define shutdown(s, h) gsiShutdown(s, h) @@ -413,7 +413,7 @@ int gsiShutdown(SOCKET s, int how); #ifdef _UNIX #define GOAGetLastError(s) errno -#define closesocket close // on unix +#define closesocket close // on unix #endif #if !defined(_WIN32) @@ -632,4 +632,4 @@ gsi_u32 gsiGetBroadcastIP(void); } #endif -#endif // __GSSOCKET_H__ +#endif // __GSSOCKET_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.c index c317247e685..ec17c240d6d 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.c @@ -44,4 +44,4 @@ extern "C" { } #endif -#endif // GSI_NO_THREADS +#endif // GSI_NO_THREADS diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.h index 4f0dc8b2769..9500dbc1605 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformThread.h @@ -26,8 +26,8 @@ typedef struct // A critical section is a re-entrant semaphore GSISemaphoreID mSemaphore; GSIThreadID mOwnerThread; - gsi_u32 mEntryCount; // track re-entry - gsi_u32 mPad; // make 16bytes + gsi_u32 mEntryCount; // track re-entry + gsi_u32 mPad; // make 16bytes } GSICriticalSection; typedef void (*GSThreadFunc)(void* arg); @@ -66,8 +66,8 @@ typedef struct // A critical section is a re-entrant semaphore GSISemaphoreID mSemaphore; GSIThreadID mOwnerThread; - gsi_u32 mEntryCount; // track re-entry - gsi_u32 mPad; // make 16bytes + gsi_u32 mEntryCount; // track re-entry + gsi_u32 mPad; // make 16bytes } GSICriticalSection; typedef void (*GSThreadFunc)(void* arg); @@ -81,12 +81,12 @@ typedef struct // A critical section is a re-entrant semaphore GSISemaphoreID mSemaphore; GSIThreadID mOwnerThread; - gsi_u32 mEntryCount; // track re-entry - gsi_u32 mPad; // make 16bytes + gsi_u32 mEntryCount; // track re-entry + gsi_u32 mPad; // make 16bytes } GSICriticalSection; typedef void (*GSThreadFunc)(void* arg); -#elif defined(_UNIX) //_LINUX || _MACOSX +#elif defined(_UNIX) //_LINUX || _MACOSX typedef pthread_mutex_t GSICriticalSection; typedef struct { @@ -163,12 +163,12 @@ void gsiCloseSemaphore(GSISemaphoreID theSemaphore); #else // NO THREADS - stub everything to unused -#define gsiStartThread(a, b, c, d) (-1) // must return something +#define gsiStartThread(a, b, c, d) (-1) // must return something #define gsiCancelThread(a) #define gsiExitThread(a) #define gsiCleanupThread(a) -#define gsiHasThreadShutdown(a) (1) // must return something +#define gsiHasThreadShutdown(a) (1) // must return something #define gsiInitializeCriticalSection(a) #define gsiEnterCriticalSection(a) @@ -180,7 +180,7 @@ void gsiCloseSemaphore(GSISemaphoreID theSemaphore); #define gsiReleaseSemaphore(a, b) #define gsiCloseSemaphore(a) -#endif // GSI_NO_THREADS +#endif // GSI_NO_THREADS /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -188,4 +188,4 @@ void gsiCloseSemaphore(GSISemaphoreID theSemaphore); } #endif -#endif // __GSPLATFORMTHREAD_H__ +#endif // __GSPLATFORMTHREAD_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.c index 142af66e952..6c1fd770931 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.c @@ -4,9 +4,9 @@ #include "gsCommon.h" #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4244) // lines: 1368, 1372 -#pragma warning(disable : 4267) // lines: 1861 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4244) // lines: 1368, 1372 +#pragma warning(disable : 4267) // lines: 1861 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS // Include platform separated functions #if defined(_X360) @@ -112,7 +112,7 @@ DWORD WINAPI gsiResolveHostnameThread(void* arg) return 0; #endif } -#endif // defined _WIN32 +#endif // defined _WIN32 //////////////////////////////////////////////////////////////////////////////// #ifdef _REVOLUTION @@ -156,7 +156,7 @@ static void* gsiResolveHostnameThread(void* arg) gsiLeaveCriticalSection(&aHostnameCrit); } -#endif // _REVOLUTION +#endif // _REVOLUTION //////////////////////////////////////////////////////////////////////////////// // @@ -210,7 +210,7 @@ static void gsiResolveHostnameThread(void* arg) // explicitly exit the thread to free resources gsiExitThread(handle->threadID); } -#endif //_UNIX +#endif //_UNIX //////////////////////////////////////////////////////////////////////////////// int gsiStartResolvingHostname(const char* hostname, GSIResolveHostnameHandle* handle) @@ -286,7 +286,7 @@ unsigned int gsiGetResolvedIP(GSIResolveHostnameHandle handle) return ip; } -#else // if * not a supported platform OR * no threads allowed OR * no async lookup allowed +#else // if * not a supported platform OR * no threads allowed OR * no async lookup allowed /////////////////////////////////////////////////////////////////////////////////// // if !(_WIN32 ||_PS2 || _LINUX || _MACOSX || _REVOLUTION) || GSI_NO_THREADS || GSI_NO_ASYNC_DNS @@ -341,17 +341,17 @@ unsigned int gsiGetResolvedIP(GSIResolveHostnameHandle handle) } /////////////////////////////////////////////////////////////////////////////// -#endif // synch DNS lookup +#endif // synch DNS lookup /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// char* goastrdup(const char* src) { char* res; - if (src == NULL) // PANTS|02.11.00|check for NULL before strlen + if (src == NULL) // PANTS|02.11.00|check for NULL before strlen return NULL; res = (char*)gsimalloc(strlen(src) + 1); - if (res != NULL) // PANTS|02.02.00|check for NULL before strcpy + if (res != NULL) // PANTS|02.02.00|check for NULL before strcpy strcpy(res, src); return res; } @@ -513,7 +513,7 @@ time_t time(time_t* timer) /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -gsi_time current_time() // returns current time in milliseconds +gsi_time current_time() // returns current time in milliseconds { #if defined(_WIN32) return (GetTickCount()); @@ -557,9 +557,9 @@ gsi_time current_time() // returns current time in milliseconds if (result < 0) { ScePspDateTime time; result = sceRtcGetCurrentClock(&time, 0); - if (result < 0) return 0; // um...error handling? //Nope, should return zero since time cannot be zero + if (result < 0) return 0; // um...error handling? //Nope, should return zero since time cannot be zero result = sceRtcGetTick(&time, &ticks); - if (result < 0) return 0; // Nope, should return zero since time cannot be zero + if (result < 0) return 0; // Nope, should return zero since time cannot be zero } return (gsi_time)(ticks.tick / 1000); @@ -577,7 +577,7 @@ gsi_time current_time() // returns current time in milliseconds #endif } -gsi_time current_time_hires() // returns current time in microseconds +gsi_time current_time_hires() // returns current time in microseconds { #ifdef _WIN32 #if (!defined(_M_IX86) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)) @@ -632,9 +632,9 @@ gsi_time current_time_hires() // returns current time in microseconds if (result < 0) { ScePspDateTime time; result = sceRtcGetCurrentClock(&time, 0); - if (result < 0) return 0; // um...error handling? //Nope, should return zero since time cannot be zero + if (result < 0) return 0; // um...error handling? //Nope, should return zero since time cannot be zero result = sceRtcGetTick(&time, &ticks); - if (result < 0) return 0; // Nope, should return zero since time cannot be zero + if (result < 0) return 0; // Nope, should return zero since time cannot be zero } return (gsi_time)(ticks.tick); @@ -691,7 +691,7 @@ void msleep(gsi_time msec) #elif defined(_REVOLUTION) OSSleepMilliseconds(msec); #else - assert(0); // missing platform handler, contact devsupport + assert(0); // missing platform handler, contact devsupport #endif } @@ -740,7 +740,7 @@ static char* store_dt(char* p, int val) *p++ = (char)(_T('0') + val % 10); return (p); } -#endif //_NITRO || _REVOLUTION +#endif //_NITRO || _REVOLUTION ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// @@ -1021,8 +1021,8 @@ char* gsiSecondsToString(const time_t* timp) /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Cross platform random number generator -#define RANa 16807 // multiplier -#define LONGRAND_MAX 2147483647L // 2**31 - 1 +#define RANa 16807 // multiplier +#define LONGRAND_MAX 2147483647L // 2**31 - 1 static long randomnum = 1; @@ -1069,7 +1069,7 @@ int Util_RandInt(int low, int high) unsigned int range = (unsigned int)high - low; int num; - if (range == 0) return (low); // Prevent divide by zero + if (range == 0) return (low); // Prevent divide by zero num = (int)(longrand() % range); @@ -1097,7 +1097,7 @@ static void TripToQuart(const char* trip, char* quart, int inlen) { triptemp[i] = (unsigned char)trip[i]; } - while (i < 3) // fill the rest with 0 + while (i < 3) // fill the rest with 0 { triptemp[i] = 0; i++; @@ -1169,11 +1169,11 @@ void B64Decode(const char* input, char* output, int inlen, int* outlen, int enco // (assert(0)); //bad input data if (outlen) *outlen = 0; output[0] = '\0'; - return; // invaid data + return; // invaid data } // every 4 bytes, convert QuartToTrip into destination - if (readpos % 4 == 3) // zero based, so (3%4) means four bytes, 0-1-2-3 + if (readpos % 4 == 3) // zero based, so (3%4) means four bytes, 0-1-2-3 { QuartToTrip(block, &output[writepos], 4); writepos += 3; @@ -1229,11 +1229,11 @@ void B64Encode(const char* input, char* output, int inlen, int encodingType) lastchar -= 2; else if (inlen % 3 == 2) lastchar -= 1; - *output = 0; // null terminate! + *output = 0; // null terminate! while (output > holdout) { output--; - if (output >= lastchar) // pad the end + if (output >= lastchar) // pad the end *output = encoding[2]; else if (*output <= 25) *output = (char)(*output + 65); @@ -1355,12 +1355,12 @@ char* gsiXxteaAlg(const char* sIn, int nIn, char key[XXTEA_KEY_SIZE], int bEnc, // Convert stream length to a round number of 32-bit words // Convert byte count to 32-bit word count - if (nIn % 4 == 0) // Fix for null terminated strings divisible by 4 + if (nIn % 4 == 0) // Fix for null terminated strings divisible by 4 nIn = (nIn / 4) + 1; else nIn = (nIn + 3) / 4; - if (nIn <= 1) // XXTEA requires at least 64 bits + if (nIn <= 1) // XXTEA requires at least 64 bits nIn = 2; // Load and zero-pad first 16 characters (128 bits) of key @@ -1379,7 +1379,7 @@ char* gsiXxteaAlg(const char* sIn, int nIn, char key[XXTEA_KEY_SIZE], int bEnc, y = v[0]; i = (int)(6 + 52 / nIn); - if (bEnc == 1) // Encrypt + if (bEnc == 1) // Encrypt { unsigned int sum = 0; while (i-- != 0) @@ -1394,7 +1394,7 @@ char* gsiXxteaAlg(const char* sIn, int nIn, char key[XXTEA_KEY_SIZE], int bEnc, } } } - else if (bEnc == 0) // Decrypt + else if (bEnc == 0) // Decrypt { unsigned int sum = (unsigned int)i * 0x9E3779B9; while (sum != 0) @@ -1484,9 +1484,9 @@ void gsiCheckStack(void) } } #endif -#endif // nitro +#endif // nitro } -#endif // _DEBUG +#endif // _DEBUG /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -1496,7 +1496,7 @@ int GOAGetLastError(SOCKET s) int val = 0; int soval = sizeof(val); if (0 != getsockopt(s, SOL_SOCKET, SO_ERROR, &val, &soval)) - return 0; // getsockopt failed + return 0; // getsockopt failed else return val; } @@ -1637,8 +1637,8 @@ static const char* GOAGetUniqueID_Internal(void) return keyval; } -#endif // UNIQUEID -#endif // _PS2 +#endif // UNIQUEID +#endif // _PS2 #if ((defined(_WIN32) && !defined(_XBOX)) || defined(_UNIX)) @@ -1703,7 +1703,7 @@ const char* GOAGetUniqueID_Internal(void) } #endif - if (ret != 0 || strlen(keyval) != 19) // need to generate a new key + if (ret != 0 || strlen(keyval) != 19) // need to generate a new key { GenerateID(keyval); #ifdef _WIN32 @@ -1719,7 +1719,7 @@ const char* GOAGetUniqueID_Internal(void) fclose(f); } else - keyval[0] = 0; // don't generate one each time!! + keyval[0] = 0; // don't generate one each time!! #endif } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.h index ea9a2bd5f85..69fc6a29f73 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsPlatformUtil.h @@ -50,8 +50,8 @@ unsigned int gsiGetResolvedIP(GSIResolveHostnameHandle handle); /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Cross platform random number generator -void Util_RandSeed(unsigned long seed); // to seed it -int Util_RandInt(int low, int high); // retrieve a random int +void Util_RandSeed(unsigned long seed); // to seed it +int Util_RandInt(int low, int high); // retrieve a random int /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -95,14 +95,14 @@ void gsiCheckStack(void); /////////////////////////////////////////////////////////////////////////////// // time functions -gsi_time current_time(); // milliseconds -gsi_time current_time_hires(); // microseconds -void msleep(gsi_time msec); // milliseconds +gsi_time current_time(); // milliseconds +gsi_time current_time_hires(); // microseconds +void msleep(gsi_time msec); // milliseconds // GSI equivalent of common C-lib time functions -struct tm* gsiSecondsToDate(const time_t* timp); // gmtime -time_t gsiDateToSeconds(struct tm* tb); // mktime -char* gsiSecondsToString(const time_t* timp); // ctime +struct tm* gsiSecondsToDate(const time_t* timp); // gmtime +time_t gsiDateToSeconds(struct tm* tb); // mktime +char* gsiSecondsToString(const time_t* timp); // ctime /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -147,4 +147,4 @@ void gsiInt64ToString(char theNumberStr[33], gsi_i64 theNumber); } #endif -#endif //__GSUTILITY_H__ +#endif //__GSUTILITY_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.c index 0af34e498a8..9af97b7b370 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.c @@ -47,8 +47,8 @@ void RC4Encrypt(RC4Context* context, const unsigned char* src, unsigned char* de int i = 0; for (i = 0; i < len; i++) { - context->x = (unsigned char)(context->x + 1); // ok to wrap around from overflow - context->y = (unsigned char)(context->y + context->state[context->x]); // ditto + context->x = (unsigned char)(context->x + 1); // ok to wrap around from overflow + context->y = (unsigned char)(context->y + context->state[context->x]); // ditto swap_byte(&context->state[context->x], &context->state[context->y]); dest[i] = (unsigned char)(src[i] ^ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.h index d11ffd7a03a..04e19a67b9c 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsRC4.h @@ -28,4 +28,4 @@ void RC4Encrypt(RC4Context* context, const unsigned char* src, unsigned char* de #if defined(__cplusplus) } #endif -#endif // __GSRC4_H__ +#endif // __GSRC4_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSHA1.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSHA1.h index 45143cbc329..3f65d1eca75 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSHA1.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSHA1.h @@ -81,6 +81,6 @@ int SHA1Result(SHA1Context*, uint8_t Message_Digest[SHA1HashSize]); #if defined(__cplusplus) } -#endif // extern "C" +#endif // extern "C" #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSSL.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSSL.h index 5721d08c3f7..73374937346 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSSL.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSSL.h @@ -24,10 +24,10 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // SSL content types -#define GS_SSL_CONTENT_CHANGECIPHERSPEC (0x14) // 20 -#define GS_SSL_CONTENT_ALERT (0x15) // 21 Not sure if this is the correct value -#define GS_SSL_CONTENT_HANDSHAKE (0x16) // 22 -#define GS_SSL_CONTENT_APPLICATIONDATA (0x17) // 23 +#define GS_SSL_CONTENT_CHANGECIPHERSPEC (0x14) // 20 +#define GS_SSL_CONTENT_ALERT (0x15) // 21 Not sure if this is the correct value +#define GS_SSL_CONTENT_HANDSHAKE (0x16) // 22 +#define GS_SSL_CONTENT_APPLICATIONDATA (0x17) // 23 // SSL handshake message types //#define GS_SSL_HANDSHAKE_HELLOREQUEST (0) @@ -64,13 +64,13 @@ extern "C" { #define GS_SSL_MAX_MAC_SECRET_SIZE (20) #define GS_SSL_MAX_SYMMETRIC_KEY_SIZE (16) #define GS_SSL_MAX_IV_SIZE (16) -#define GS_SSL_NUM_CIPHER_SUITES (1) // cipher suite list defined in gsSSL.c +#define GS_SSL_NUM_CIPHER_SUITES (1) // cipher suite list defined in gsSSL.c #define GS_SSL_MASTERSECRET_LEN (48) -#define GS_SSL_PAD_ONE "666666666666666666666666666666666666666666666666" // 48 bytes +#define GS_SSL_PAD_ONE "666666666666666666666666666666666666666666666666" // 48 bytes #define GS_SSL_PAD_TWO \ - "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // 48 bytes + "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // 48 bytes #define GS_SSL_MD5_PAD_LEN (48) -#define GS_SSL_SHA1_PAD_LEN (40) // use only 40 of the 48 bytes +#define GS_SSL_SHA1_PAD_LEN (40) // use only 40 of the 48 bytes #define GS_SSL_CLIENT_FINISH_VALUE "CLNT" #define GS_SSL_SERVER_FINISH_VALUE "SRVR" @@ -80,13 +80,13 @@ extern "C" { typedef struct gsSSL { int sessionLen; - unsigned char sessionData[255]; // up to 256 bytes + unsigned char sessionData[255]; // up to 256 bytes unsigned short cipherSuite; // DArray certificateArray; gsCryptRSAKey serverpub; - unsigned char sendSeqNBO[8]; // incrementing sequence number (for messages sent) - unsigned char receiveSeqNBO[8]; // ditto (for messages received) + unsigned char sendSeqNBO[8]; // incrementing sequence number (for messages sent) + unsigned char receiveSeqNBO[8]; // ditto (for messages received) // Key buffers // Actual data may be smaller than array size @@ -105,17 +105,17 @@ typedef struct gsSSL int clientWriteIVLen; int clientReadIVLen; - RC4Context sendRC4; // initialized ONCE per key exchange - RC4Context recvRC4; // initialized ONCE per key exchange + RC4Context sendRC4; // initialized ONCE per key exchange + RC4Context recvRC4; // initialized ONCE per key exchange // these are unused once the handshake is complete // todo: dynamically allocate or remove to free space MD5_CTX finishHashMD5; SHA1Context finishHashSHA1; - unsigned char serverRandom[32]; // server random for key generation, sent plain text - unsigned char clientRandom[32]; // client random for key generation, sent plain text + unsigned char serverRandom[32]; // server random for key generation, sent plain text + unsigned char clientRandom[32]; // client random for key generation, sent plain text unsigned char - premastersecret[GS_SSL_MASTERSECRET_LEN]; // client random for key generation, sent encrypted with serverpub + premastersecret[GS_SSL_MASTERSECRET_LEN]; // client random for key generation, sent encrypted with serverpub unsigned char mastersecret[GS_SSL_MASTERSECRET_LEN]; } gsSSL; @@ -123,10 +123,10 @@ typedef struct gsSSL // SSL messages (like the ClientHello) are wrapped in a "record" struct typedef struct gsSSLRecordHeaderMsg { - unsigned char contentType; // = GS_SSL_CONTENT_HANDSHAKE; - unsigned char versionMajor; // = GS_SSL_VERSION_MAJOR; - unsigned char versionMinor; // = GS_SSL_VERSION_MINOR; - unsigned char lengthNBO[2]; // length of msg, limited to 2^14 + unsigned char contentType; // = GS_SSL_CONTENT_HANDSHAKE; + unsigned char versionMajor; // = GS_SSL_VERSION_MAJOR; + unsigned char versionMinor; // = GS_SSL_VERSION_MINOR; + unsigned char lengthNBO[2]; // length of msg, limited to 2^14 // WARNING: lengthNBO can NOT be an unsigned short // This would create alignment issues from the previous 3 parameters @@ -135,26 +135,26 @@ typedef struct gsSSLRecordHeaderMsg typedef struct gsSSLClientHelloMsg { - gsSSLRecordHeaderMsg header; // include the header for easier packing - unsigned char handshakeType; // 0x01 - unsigned char lengthNBO[3]; // 3 byte length, NBO integer! 61 = 0x00 00 3d - unsigned char versionMajor; // = GS_SSL_VERSION_MAJOR; - unsigned char versionMinor; // = GS_SSL_VERSION_MINOR; - unsigned char time[4]; // 4 byte random (spec says set to current unix-time) - unsigned char random[28]; // 28 byte random, total of 32 random bytes - unsigned char sessionIdLen; // how many of the bytes that follow are session info? (def:0) + gsSSLRecordHeaderMsg header; // include the header for easier packing + unsigned char handshakeType; // 0x01 + unsigned char lengthNBO[3]; // 3 byte length, NBO integer! 61 = 0x00 00 3d + unsigned char versionMajor; // = GS_SSL_VERSION_MAJOR; + unsigned char versionMinor; // = GS_SSL_VERSION_MINOR; + unsigned char time[4]; // 4 byte random (spec says set to current unix-time) + unsigned char random[28]; // 28 byte random, total of 32 random bytes + unsigned char sessionIdLen; // how many of the bytes that follow are session info? (def:0) // ALIGNMENT: 44 bytes prior to this, alignment should be OK - unsigned short cipherSuitesLength; // 2* number of cipher suites + unsigned short cipherSuitesLength; // 2* number of cipher suites unsigned short cipherSuites[GS_SSL_NUM_CIPHER_SUITES]; - unsigned char compressionMethodLen; // no standard methods, set to 1 - unsigned char compressionMethodList; // set to 0 + unsigned char compressionMethodLen; // no standard methods, set to 1 + unsigned char compressionMethodList; // set to 0 } gsSSLClientHelloMsg; typedef struct gsSSLClientKeyExchangeMsg { - gsSSLRecordHeaderMsg header; // included here for easier packing - unsigned char handshakeType; // 0x10 + gsSSLRecordHeaderMsg header; // included here for easier packing + unsigned char handshakeType; // 0x10 unsigned char lengthNBO[3]; // The next lengthNBO bytes are the client contribution to the key } gsSSLClientKeyExchangeMsg; @@ -176,7 +176,7 @@ extern const unsigned char gsSslRsaOid[9]; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if defined(__cplusplus) -} // extern "C" +} // extern "C" #endif -#endif // __GSSSL_H__ +#endif // __GSSSL_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.c index bdb6be20cf8..4266d1e097e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.c @@ -32,7 +32,7 @@ GSSoapTask* gsiExecuteSoap(const char* theURL, const char* theService, GSXmlStre GSTask* aCoreTask = NULL; aSoapTask = (GSSoapTask*)gsimalloc(sizeof(GSSoapTask)); - if (aSoapTask == NULL) return NULL; // out of memory + if (aSoapTask == NULL) return NULL; // out of memory aSoapTask->mCallbackFunc = theCallbackFunc; aSoapTask->mCustomFunc = NULL; @@ -49,7 +49,7 @@ GSSoapTask* gsiExecuteSoap(const char* theURL, const char* theService, GSXmlStre aCoreTask = gsiCoreCreateTask(); if (aCoreTask == NULL) { gsifree(aSoapTask); - return NULL; // out of memory + return NULL; // out of memory } aCoreTask->mCallbackFunc = gsiSoapTaskCallback; @@ -152,7 +152,7 @@ static GHTTPBool gsiSoapTaskHttpCompletedCallback( GSI_UNUSED(request); - return GHTTPFalse; // don't let http free the buffer + return GHTTPFalse; // don't let http free the buffer } /////////////////////////////////////////////////////////////////////////////// @@ -242,7 +242,7 @@ static gsi_bool gsiSoapTaskCleanup(void* theTask) if (aSoapTask->mResponseSoap != NULL) gsXmlFreeReader(aSoapTask->mResponseSoap); if (aSoapTask->mResponseBuffer != NULL) gsifree(aSoapTask->mResponseBuffer); - if (aSoapTask->mPostData != NULL) ghttpFreePost(aSoapTask->mPostData); // this also frees the request soap xml + if (aSoapTask->mPostData != NULL) ghttpFreePost(aSoapTask->mPostData); // this also frees the request soap xml gsifree(aSoapTask); return gsi_true; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.h index 3e0fb3129f8..ed417c7f985 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsSoap.h @@ -32,8 +32,8 @@ typedef struct GSXmlStreamWriter mRequestSoap; GSXmlStreamReader mResponseSoap; - char* mResponseBuffer; // so we can free it later - GHTTPPost mPostData; // so we can free it later + char* mResponseBuffer; // so we can free it later + GHTTPPost mPostData; // so we can free it later void* mUserData; GSTask* mCoreTask; @@ -59,7 +59,7 @@ void gsiCancelSoap(GSSoapTask* theTask); /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if defined(__cplusplus) -} // extern "C" +} // extern "C" #endif -#endif // __SOAP_H__ +#endif // __SOAP_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.c index 82ed55f3120..f1106a5e698 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.c @@ -43,7 +43,7 @@ int _ReadUCS2CharFromUTF8String(const UTF8String theUTF8String, UCS2Char* theUni if (theMaxLength == 0) { // assert? *theUnicodeChar = (UCS2Char)REPLACE_INVALID_CHAR; - return 0; // not enough data + return 0; // not enough data } // Check for normal ascii range (includes NULL terminator) @@ -58,7 +58,7 @@ int _ReadUCS2CharFromUTF8String(const UTF8String theUTF8String, UCS2Char* theUni { if (theMaxLength < 2) { *theUnicodeChar = (UCS2Char)REPLACE_INVALID_CHAR; - return 0; // not enough data + return 0; // not enough data } // Make sure the second byte is valid @@ -78,7 +78,7 @@ int _ReadUCS2CharFromUTF8String(const UTF8String theUTF8String, UCS2Char* theUni { if (theMaxLength < 3) { *theUnicodeChar = (UCS2Char)REPLACE_INVALID_CHAR; - return 0; // not enough data + return 0; // not enough data } // Make sure the second and third bytes are valid @@ -133,9 +133,9 @@ int _UCS2CharToUTF8String(UCS2Char theUCS2Char, UTF8String theUTF8String) // :00000ABC DEFGHIJK // :110ABCDE 10FGHIJK theUTF8String[0] = - (char)(UTF8ByteType)(UTF8_TWO_BYTE_TAG | (theUCS2Char >> 6)); // Store the upper 5/11 bits as 0x110xxxxx + (char)(UTF8ByteType)(UTF8_TWO_BYTE_TAG | (theUCS2Char >> 6)); // Store the upper 5/11 bits as 0x110xxxxx theUTF8String[1] = (char)(UTF8ByteType)( - UTF8_FOLLOW_BYTE_TAG | (theUCS2Char & UTF8_FOLLOW_BYTE_MASK)); // Store the lower 6 bits as 0x10xxxxxx + UTF8_FOLLOW_BYTE_TAG | (theUCS2Char & UTF8_FOLLOW_BYTE_MASK)); // Store the lower 6 bits as 0x10xxxxxx return 2; } else @@ -144,12 +144,12 @@ int _UCS2CharToUTF8String(UCS2Char theUCS2Char, UTF8String theUTF8String) // :ABCDEFGH IJKLMNOP // :1110ABCD 10EFGHIJ 10KLMNOP theUTF8String[0] = - (char)(UTF8ByteType)(UTF8_THREE_BYTE_TAG | (theUCS2Char >> 12)); // Store the upper 4/16 bits as 0x1110xxxx - theUTF8String[1] = (char)(UTF8ByteType)( - UTF8_FOLLOW_BYTE_TAG | - ((theUCS2Char >> 6) & UTF8_FOLLOW_BYTE_MASK)); // Store the 5th-10th bits as 0x10xxxxxx + (char)(UTF8ByteType)(UTF8_THREE_BYTE_TAG | (theUCS2Char >> 12)); // Store the upper 4/16 bits as 0x1110xxxx + theUTF8String[1] = + (char)(UTF8ByteType)(UTF8_FOLLOW_BYTE_TAG | + ((theUCS2Char >> 6) & UTF8_FOLLOW_BYTE_MASK)); // Store the 5th-10th bits as 0x10xxxxxx theUTF8String[2] = (char)(UTF8ByteType)( - UTF8_FOLLOW_BYTE_TAG | ((theUCS2Char)&UTF8_FOLLOW_BYTE_MASK)); // Store the last 6 bits as 0x10xxxxxx + UTF8_FOLLOW_BYTE_TAG | ((theUCS2Char)&UTF8_FOLLOW_BYTE_MASK)); // Store the last 6 bits as 0x10xxxxxx return 3; } } @@ -561,7 +561,7 @@ int AsciiToUCS2String(const char* theAsciiString, UCS2String theUCS2String) // Convert each character until a '\0' is reached while (*aReadPos != '\0') { - (*aWritePos++) = (unsigned short)(0x00FF & (*aReadPos++)); // copy and strip extra byte + (*aWritePos++) = (unsigned short)(0x00FF & (*aReadPos++)); // copy and strip extra byte length++; } @@ -650,5 +650,5 @@ int UTF8ToUCS2StringLen(const UTF8String theUTF8String, UCS2String theUCS2String /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus -} // extern "C" +} // extern "C" #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.h index 81d29f8e7d2..6977e6a9ad7 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsStringUtil.h @@ -18,27 +18,27 @@ extern "C" { #endif #define UCS2Char unsigned short -#define UCS2String unsigned short* // null terminated -#define UTF8ByteType unsigned char // For type casting -#define UTF8String char* // may not be NULL terminated when treated as a single character +#define UCS2String unsigned short* // null terminated +#define UTF8ByteType unsigned char // For type casting +#define UTF8String char* // may not be NULL terminated when treated as a single character /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#define UTF8_FOLLOW_BYTE_TAG 0x80 //:1000 0000 // Identifies 2nd or 3rd byte of UTF8String -#define UTF8_TWO_BYTE_TAG 0xC0 //:1100 0000 // Identifies start of Two-byte UTF8String -#define UTF8_THREE_BYTE_TAG 0xE0 //:1110 0000 // Identifies start of Three-byte UTF8String -#define UTF8_FOUR_BYTE_TAG 0xF0 //:1111 0000 // Unsupported tag, need USC4 to store this +#define UTF8_FOLLOW_BYTE_TAG 0x80 //:1000 0000 // Identifies 2nd or 3rd byte of UTF8String +#define UTF8_TWO_BYTE_TAG 0xC0 //:1100 0000 // Identifies start of Two-byte UTF8String +#define UTF8_THREE_BYTE_TAG 0xE0 //:1110 0000 // Identifies start of Three-byte UTF8String +#define UTF8_FOUR_BYTE_TAG 0xF0 //:1111 0000 // Unsupported tag, need USC4 to store this -#define UTF8_FOLLOW_BYTE_MASK 0x3F //:0011 1111 // The value bits in a follow byte -#define UTF8_TWO_BYTE_MASK 0x1F //:0001 1111 // The value bits in a two byte tag -#define UTF8_THREE_BYTE_MASK 0x0F //:0000 1111 // The value bits in a three byte tag +#define UTF8_FOLLOW_BYTE_MASK 0x3F //:0011 1111 // The value bits in a follow byte +#define UTF8_TWO_BYTE_MASK 0x1F //:0001 1111 // The value bits in a two byte tag +#define UTF8_THREE_BYTE_MASK 0x0F //:0000 1111 // The value bits in a three byte tag #define UTF8_IS_THREE_BYTE(a) (((UTF8ByteType)a & UTF8_FOUR_BYTE_TAG) == UTF8_THREE_BYTE_TAG) #define UTF8_IS_TWO_BYTE(a) (((UTF8ByteType)a & UTF8_THREE_BYTE_TAG) == UTF8_TWO_BYTE_TAG) #define UTF8_IS_FOLLOW_BYTE(a) (((UTF8ByteType)a & UTF8_TWO_BYTE_TAG) == UTF8_FOLLOW_BYTE_TAG) -#define UTF8_IS_SINGLE_BYTE(a) ((UTF8ByteType)a <= 0x7F) // 0-127 +#define UTF8_IS_SINGLE_BYTE(a) ((UTF8ByteType)a <= 0x7F) // 0-127 -#define REPLACE_INVALID_CHAR '?' // Replace invalid UTF8 chars with this +#define REPLACE_INVALID_CHAR '?' // Replace invalid UTF8 chars with this /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -73,7 +73,7 @@ UCS2String* UTF8ToUCS2StringArrayAlloc(const UTF8String* theUTF8StringArray, int /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus -} // extern "C" +} // extern "C" #endif -#endif // __STRINGUTIL_H__ +#endif // __STRINGUTIL_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.c index baaf679e82c..ebb34597cc7 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.c @@ -573,8 +573,8 @@ GSUdpErrorCode gsUdpEngineStartTalkingToPeer( return GS_UDP_PARAMETER_ERROR; } - aRemotePeer.mAddr = theIp; // In Network Byte Order for GT2 - aRemotePeer.mPort = thePort; // In Host Byte Order for GT2 + aRemotePeer.mAddr = theIp; // In Network Byte Order for GT2 + aRemotePeer.mPort = thePort; // In Host Byte Order for GT2 index = ArraySearch(aUdp->mRemotePeers, &aRemotePeer, gsUdpRemotePeerCompare, 0, 0); if (index != NOT_FOUND) { diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.h index fae4a0a64f1..ad6dc27907d 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsUdpEngine.h @@ -70,7 +70,7 @@ typedef enum _GSUdpCloseReason { GS_UDP_CLOSED_LOCALLY, GS_UDP_CLOSED_REMOTELY, // errors: - GS_UDP_CLOSED_BY_COMM_ERROR, // An invalid message was received (it was either unexpected or wrongly formatted). + GS_UDP_CLOSED_BY_COMM_ERROR, // An invalid message was received (it was either unexpected or wrongly formatted). GS_UDP_CLOSED_BY_LOW_MEM, // Add new reasons before here GS_UDP_CLOSED_NUM diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.c index 2998cb237b5..15ed1cf27e0 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.c @@ -7,9 +7,9 @@ #include "gsStringUtil.h" #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4267) // lines: 155, 156, 161, 162 -#pragma warning(disable : 4244) // lines: 128, 720, 752 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4267) // lines: 155, 156, 161, 162 +#pragma warning(disable : 4244) // lines: 128, 720, 752 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -64,7 +64,7 @@ typedef struct GSIXmlAttribute typedef struct GSIXmlElement { GSIXmlString mName; - GSIXmlString mValue; // most do not have a value + GSIXmlString mValue; // most do not have a value int mIndex; int mParentIndex; @@ -75,8 +75,8 @@ typedef struct GSIXmlStreamReader DArray mElementArray; DArray mAttributeArray; - int mElemReadIndex; // current index - int mValueReadIndex; // current child parsing index + int mElemReadIndex; // current index + int mValueReadIndex; // current child parsing index } GSIXmlStreamReader; typedef struct GSIXmlStreamWriter @@ -84,7 +84,7 @@ typedef struct GSIXmlStreamWriter char* mBuffer; int mLen; int mCapacity; - gsi_bool mClosed; // footer has been written, append not allowed + gsi_bool mClosed; // footer has been written, append not allowed } GSIXmlStreamWriter; /////////////////////////////////////////////////////////////////////////////// @@ -139,20 +139,20 @@ GSXmlStreamWriter gsXmlCreateStreamWriter(const char** namespaces, int count) if (newStream == NULL) { gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Memory, GSIDebugLevel_HotError, "Out of memory in gsXmlCreateStreamWriter, needed %d bytes", sizeof(GSIXmlStreamWriter)); - return NULL; // OOM + return NULL; // OOM } // do this to prevent an immediately reallocation due to long namespace string for (i = 0; i < GS_XML_SOAP_DEFAULT_NAMESPACE_COUNT; i++) { GS_ASSERT(GS_XML_SOAP_DEFAULT_NAMESPACES[i] != NULL); - namespaceLen += strlen(GS_XML_SOAP_NAMESPACE_PREFIX) + 1; // +1 for space + namespaceLen += strlen(GS_XML_SOAP_NAMESPACE_PREFIX) + 1; // +1 for space namespaceLen += strlen(GS_XML_SOAP_DEFAULT_NAMESPACES[i]); } for (i = 0; i < count; i++) { GS_ASSERT(namespaces[i] != NULL); - namespaceLen += strlen(GS_XML_SOAP_NAMESPACE_PREFIX) + 1; // +1 for space + namespaceLen += strlen(GS_XML_SOAP_NAMESPACE_PREFIX) + 1; // +1 for space namespaceLen += strlen(namespaces[i]); } while (initialCapacity < namespaceLen) @@ -163,7 +163,7 @@ GSXmlStreamWriter gsXmlCreateStreamWriter(const char** namespaces, int count) if (newStream->mBuffer == NULL) { gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Memory, GSIDebugLevel_HotError, "Out of memory in gsXmlCreateStreamWriter, needed %d bytes", initialCapacity); - return NULL; // OOM + return NULL; // OOM } newStream->mCapacity = initialCapacity; newStream->mLen = 0; @@ -174,7 +174,7 @@ GSXmlStreamWriter gsXmlCreateStreamWriter(const char** namespaces, int count) if (gsi_is_false(gsiXmlUtilWriteString(newStream, GS_XML_SOAP_HEADER))) { gsifree(newStream->mBuffer); gsifree(newStream); - return NULL; // OOM + return NULL; // OOM } for (i = 0; i < GS_XML_SOAP_DEFAULT_NAMESPACE_COUNT; i++) { @@ -184,7 +184,7 @@ GSXmlStreamWriter gsXmlCreateStreamWriter(const char** namespaces, int count) { gsifree(newStream->mBuffer); gsifree(newStream); - return NULL; // OOM + return NULL; // OOM } } for (i = 0; i < count; i++) @@ -195,7 +195,7 @@ GSXmlStreamWriter gsXmlCreateStreamWriter(const char** namespaces, int count) { gsifree(newStream->mBuffer); gsifree(newStream); - return NULL; // OOM + return NULL; // OOM } } if (gsi_is_false(gsiXmlUtilWriteChar(newStream, '>')) || @@ -203,7 +203,7 @@ GSXmlStreamWriter gsXmlCreateStreamWriter(const char** namespaces, int count) { gsifree(newStream->mBuffer); gsifree(newStream); - return NULL; // OOM + return NULL; // OOM } return (GSXmlStreamWriter)newStream; @@ -219,7 +219,7 @@ GSXmlStreamReader gsXmlCreateStreamReader() if (newStream == NULL) { gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Memory, GSIDebugLevel_HotError, "Out of memory in gsXmlCreateStream, needed %d bytes", sizeof(GSIXmlStreamReader)); - return NULL; // OOM + return NULL; // OOM } newStream->mElementArray = @@ -228,7 +228,7 @@ GSXmlStreamReader gsXmlCreateStreamReader() gsDebugFormat(GSIDebugCat_Common, GSIDebugType_Memory, GSIDebugLevel_HotError, "Out of memory in gsXmlCreateStream with mElementArray=ArrayNew()"); gsifree(newStream); - return NULL; // OOM + return NULL; // OOM } newStream->mAttributeArray = @@ -238,7 +238,7 @@ GSXmlStreamReader gsXmlCreateStreamReader() "Out of memory in gsXmlCreateStream with mElementArray=ArrayNew()"); ArrayFree(newStream->mElementArray); gsifree(newStream); - return NULL; // OOM + return NULL; // OOM } gsXmlMoveToStart(newStream); @@ -358,7 +358,7 @@ static gsi_bool gsiXmlUtilSkipWhiteSpace(GSIXmlStreamReader* stream, const char* while (*pos < len) { if (NULL == strchr(GS_XML_WHITESPACE, buffer[*pos])) return gsi_true; - (*pos)++; // move to next character + (*pos)++; // move to next character } GSI_UNUSED(stream); @@ -379,7 +379,7 @@ static gsi_bool gsiXmlUtilParseElement(GSIXmlStreamReader* stream, char* buffer, GS_ASSERT(*pos < len); gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos); - if (*pos >= len) return gsi_true; // legal EOF + if (*pos >= len) return gsi_true; // legal EOF memset(&newElem, 0, sizeof(newElem)); @@ -396,7 +396,7 @@ static gsi_bool gsiXmlUtilParseElement(GSIXmlStreamReader* stream, char* buffer, startPos = (*pos) - 2; } else - startPos = (*pos) - 1; // store the position of '<' + startPos = (*pos) - 1; // store the position of '<' // should be a name (type) next GS_XML_CHECK(gsiXmlUtilParseName(stream, buffer, len, pos, &newElem.mName)); @@ -418,7 +418,7 @@ static gsi_bool gsiXmlUtilParseElement(GSIXmlStreamReader* stream, char* buffer, GS_XML_CHECK(gsiXmlUtilParseName(stream, buffer, len, pos, &newAttr.mName)); GS_XML_CHECK(gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos)); if (buffer[*pos] != '=') return gsi_false; - (*pos)++; // skip the '=' + (*pos)++; // skip the '=' GS_XML_CHECK(gsiXmlUtilParseString(stream, buffer, len, pos, &newAttr.mValue)); GS_XML_CHECK(gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos)); @@ -443,9 +443,9 @@ static gsi_bool gsiXmlUtilParseElement(GSIXmlStreamReader* stream, char* buffer, if ((!isalnum(buffer[startPos + 1]) && buffer[*pos] == buffer[startPos + 1]) || buffer[*pos] == '/') { (*pos)++; GS_XML_CHECK(gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos)); - if (buffer[*pos] != '>') return gsi_false; // only legal character here is closing brace + if (buffer[*pos] != '>') return gsi_false; // only legal character here is closing brace (*pos)++; - return gsi_true; // legal termination + return gsi_true; // legal termination } // make sure we've found the end of the start tag @@ -473,9 +473,9 @@ static gsi_bool gsiXmlUtilParseElement(GSIXmlStreamReader* stream, char* buffer, // close tags are in the form: (*pos)++; GS_XML_CHECK(gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos)); - if ((*pos) + newElem.mName.mLen >= len) return gsi_false; // EOF before tag close + if ((*pos) + newElem.mName.mLen >= len) return gsi_false; // EOF before tag close if (0 != strncmp((const char*)newElem.mName.mData, &buffer[*pos], (size_t)newElem.mName.mLen)) - return gsi_false; // close tag mismatch + return gsi_false; // close tag mismatch (*pos) += newElem.mName.mLen; GS_XML_CHECK(gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos)); if (buffer[*pos] != '>') return gsi_false; @@ -484,7 +484,7 @@ static gsi_bool gsiXmlUtilParseElement(GSIXmlStreamReader* stream, char* buffer, } else { - if (newElem.mValue.mData != NULL) return gsi_false; // elements with value cannot have children + if (newElem.mValue.mData != NULL) return gsi_false; // elements with value cannot have children // move read position to start of child element, then parse *pos = childStartPos; @@ -492,7 +492,7 @@ static gsi_bool gsiXmlUtilParseElement(GSIXmlStreamReader* stream, char* buffer, gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos); } } - return gsi_false; // EOF before tag close + return gsi_false; // EOF before tag close } /////////////////////////////////////////////////////////////////////////////// @@ -523,11 +523,11 @@ static gsi_bool gsiXmlUtilParseName( { // only alpha numeric and '_' characters are allowed, plus one namespace separator ':' if (buffer[*pos] == ':') { - if (gsi_is_true(haveNamespace)) return gsi_false; // already have a namespace! + if (gsi_is_true(haveNamespace)) return gsi_false; // already have a namespace! haveNamespace = gsi_true; } else if ((buffer[*pos] != '_') && (buffer[*pos] != '-') && (!isalnum(buffer[*pos]))) - return gsi_true; // treat all others as a new token example '=' + return gsi_true; // treat all others as a new token example '=' strOut->mLen++; (*pos)++; @@ -552,20 +552,20 @@ static gsi_bool gsiXmlUtilParseString(GSIXmlStreamReader* stream, char* buffer, if (startCh != '\"' && startCh != '\'') return gsi_false; (*pos)++; - strStart = &buffer[*pos]; // remember this for easier processing below + strStart = &buffer[*pos]; // remember this for easier processing below strOut->mLen = 0; - if (*pos >= len) return gsi_false; // EOF when looking for string terminator + if (*pos >= len) return gsi_false; // EOF when looking for string terminator if (buffer[*pos] == startCh) { // empty string ? strOut->mData = (const gsi_u8*)strStart; - (*pos)++; // skip the terminating character + (*pos)++; // skip the terminating character return gsi_true; } while (buffer[*pos] != startCh) { - if (*pos >= len) return gsi_false; // EOF when looking for string terminator + if (*pos >= len) return gsi_false; // EOF when looking for string terminator // if (buffer[*pos] == '&') // hasMarkup = gsi_true; @@ -573,7 +573,7 @@ static gsi_bool gsiXmlUtilParseString(GSIXmlStreamReader* stream, char* buffer, (*pos)++; strOut->mLen++; } - (*pos)++; // skip the terminating character + (*pos)++; // skip the terminating character // decode the string if necessary if (gsi_is_false(gsiXmlUtilDecodeString(strStart, &strOut->mLen))) return gsi_false; @@ -636,8 +636,8 @@ static gsi_bool gsiXmlUtilDecodeString(char* buffer, int* len) unsigned int mask = 0xFF000000; char* digitEnd = strchr(&buffer[readPos + 3], ';'); - if (digitEnd == NULL) return gsi_false; // missing ';' - if (digitEnd - &buffer[readPos + 3] > 8) return gsi_false; // too many digits before end + if (digitEnd == NULL) return gsi_false; // missing ';' + if (digitEnd - &buffer[readPos + 3] > 8) return gsi_false; // too many digits before end // scan digits into memory, do this as a block so that ť = 01 65 sscanf(&buffer[readPos + 3], "%08x", &digitValue); @@ -645,7 +645,7 @@ static gsi_bool gsiXmlUtilDecodeString(char* buffer, int* len) // write the digit back as a character array for (i = 0; i < 4; i++) { - ch = (char)((digitValue & mask) >> ((3 - i) * 8)); // make 0x00006500 into 0x65 + ch = (char)((digitValue & mask) >> ((3 - i) * 8)); // make 0x00006500 into 0x65 if (haveWritten || ch != 0x00) { buffer[readPos++] = ch; haveWritten = gsi_true; @@ -654,7 +654,7 @@ static gsi_bool gsiXmlUtilDecodeString(char* buffer, int* len) } // remove everything between the current read position and the semicolon - charsToRemove = digitEnd - &buffer[readPos] + 1; // remove the semicolon + charsToRemove = digitEnd - &buffer[readPos] + 1; // remove the semicolon } else if (strncmp(&buffer[readPos], "&#", 2) == 0) { @@ -667,7 +667,7 @@ static gsi_bool gsiXmlUtilDecodeString(char* buffer, int* len) unsigned int mask = 0xFF000000; char* digitEnd = strchr(&buffer[readPos + 2], ';'); - if (digitEnd == NULL) return gsi_false; // missing ';' + if (digitEnd == NULL) return gsi_false; // missing ';' // scan digits into memory, do this as a block so that ť = 0165h = 01 65 digitValue = (unsigned int)atoi(&buffer[readPos + 2]); @@ -675,7 +675,7 @@ static gsi_bool gsiXmlUtilDecodeString(char* buffer, int* len) // write the digit back as a character array for (i = 0; i < 4; i++) { - ch = (char)((digitValue & mask) >> ((3 - i) * 8)); // make 0x00006500 into 0x65 + ch = (char)((digitValue & mask) >> ((3 - i) * 8)); // make 0x00006500 into 0x65 if (haveWritten || ch != 0x00) { buffer[readPos++] = ch; haveWritten = gsi_true; @@ -684,10 +684,10 @@ static gsi_bool gsiXmlUtilDecodeString(char* buffer, int* len) } // remove everything between the current read position and the semicolon - charsToRemove = digitEnd - &buffer[readPos] + 1; // remove the semicolon + charsToRemove = digitEnd - &buffer[readPos] + 1; // remove the semicolon } else - return gsi_false; // unhandle '&' type + return gsi_false; // unhandle '&' type // remove characters by compressing buffer and adding whitespace at the end // "&&" becomes "&& " after one iteration @@ -711,7 +711,7 @@ static gsi_bool gsiXmlUtilParseValue(GSIXmlStreamReader* stream, char* buffer, i GS_XML_CHECK(gsiXmlUtilSkipWhiteSpace(stream, buffer, len, pos)); if (buffer[*pos] != '<') { - strStart = &buffer[*pos]; // store this so we can find it later + strStart = &buffer[*pos]; // store this so we can find it later strOut->mData = (const gsi_u8*)strStart; } @@ -720,12 +720,12 @@ static gsi_bool gsiXmlUtilParseValue(GSIXmlStreamReader* stream, char* buffer, i if (buffer[*pos] == '<') { // decode the string if necessary if (gsi_is_false(gsiXmlUtilDecodeString(strStart, &strOut->mLen))) return gsi_false; - return gsi_true; // extracted and decoded + return gsi_true; // extracted and decoded } (*pos)++; strOut->mLen++; } - return gsi_false; // EOF before tag end + return gsi_false; // EOF before tag end } /////////////////////////////////////////////////////////////////////////////// @@ -887,12 +887,12 @@ gsi_bool gsXmlWriteUnicodeStringElement( // check values less than 0x20 if (value[i] < 0x0020) { if ((value[i] != 0x0009) && (value[i] != 0x0A) && (value[i] != 0x0D)) - return gsi_false; // contains illegal (and unencodable) characters. + return gsi_false; // contains illegal (and unencodable) characters. } else if (value[i] > 0xD7FF && value[i] < 0xE000) - return gsi_false; // contains illegal (and unencodable) characters. + return gsi_false; // contains illegal (and unencodable) characters. else if (value[i] > 0xFFFD) - return gsi_false; // contains illegal (and unencodable) characters. + return gsi_false; // contains illegal (and unencodable) characters. } if (gsi_is_false(gsXmlWriteOpenTag(stream, namespaceName, tag)) || @@ -997,7 +997,7 @@ gsi_bool gsXmlWriteHexBinaryElement( while (pos < len) { - temp = data[pos]; // sprintf requires an int parameter for %02x operation + temp = data[pos]; // sprintf requires an int parameter for %02x operation sprintf(hex, "%02x", temp); pos++; if (gsi_is_false(gsiXmlUtilWriteChar(writer, hex[0]))) return gsi_false; @@ -1124,7 +1124,7 @@ static gsi_bool gsiXmlUtilWriteChar(GSIXmlStreamWriter* stream, char ch) GS_ASSERT(gsi_is_false(stream->mClosed)); if (stream->mLen >= stream->mCapacity) { - if (gsi_is_false(gsiXmlUtilGrowBuffer(stream))) return gsi_false; // OOM + if (gsi_is_false(gsiXmlUtilGrowBuffer(stream))) return gsi_false; // OOM } stream->mBuffer[stream->mLen] = ch; stream->mLen++; @@ -1148,7 +1148,7 @@ static gsi_bool gsiXmlUtilWriteString(GSIXmlStreamWriter* stream, const char* st // grow the buffer if necessary while ((stream->mCapacity - stream->mLen) <= strLen) { - if (gsi_is_false(gsiXmlUtilGrowBuffer(stream))) return gsi_false; // OOM + if (gsi_is_false(gsiXmlUtilGrowBuffer(stream))) return gsi_false; // OOM } strcpy(&stream->mBuffer[stream->mLen], str); @@ -1173,7 +1173,7 @@ static gsi_bool gsiXmlUtilWriteAsciiString(GSIXmlStreamWriter* stream, const gsi // grow the buffer if necessary while ((stream->mCapacity - stream->mLen) <= strLen) { - if (gsi_is_false(gsiXmlUtilGrowBuffer(stream))) return gsi_false; // OOM + if (gsi_is_false(gsiXmlUtilGrowBuffer(stream))) return gsi_false; // OOM } UCS2ToAsciiString(str, &stream->mBuffer[stream->mLen]); @@ -1201,7 +1201,7 @@ static gsi_bool gsiXmlUtilWriteUnicodeString(GSIXmlStreamWriter* stream, const u for (pos = 0; pos < strLen; pos++) { utf8Len = _UCS2CharToUTF8String(str[pos], utf8String); - utf8String[utf8Len] = '\0'; // null terminate it + utf8String[utf8Len] = '\0'; // null terminate it if (gsi_is_false(gsiXmlUtilWriteXmlSafeString(stream, utf8String))) return gsi_false; } return gsi_true; @@ -1269,7 +1269,7 @@ static gsi_bool gsiXmlUtilGrowBuffer(GSIXmlStreamWriter* stream) gsi_bool gsXmlMoveToStart(GSXmlStreamReader stream) { GSIXmlStreamReader* reader = (GSIXmlStreamReader*)stream; - reader->mElemReadIndex = -1; // start BEFORE first element + reader->mElemReadIndex = -1; // start BEFORE first element reader->mValueReadIndex = -1; return gsi_true; } @@ -1304,13 +1304,13 @@ gsi_bool gsXmlMoveToParent(GSXmlStreamReader stream) // check for invalid position if (reader->mElemReadIndex >= ArrayLength(reader->mElementArray) || reader->mElemReadIndex == -1) { - return gsi_false; // current position invalid + return gsi_false; // current position invalid } else { GSIXmlElement* elem = (GSIXmlElement*)ArrayNth(reader->mElementArray, reader->mElemReadIndex); - if (elem->mParentIndex == -1) return gsi_false; // current elem is at highest level - if (elem->mParentIndex >= ArrayLength(reader->mElementArray)) return gsi_false; // parent is invalid! + if (elem->mParentIndex == -1) return gsi_false; // current elem is at highest level + if (elem->mParentIndex >= ArrayLength(reader->mElementArray)) return gsi_false; // parent is invalid! reader->mElemReadIndex = elem->mParentIndex; reader->mValueReadIndex = -1; return gsi_true; @@ -1393,7 +1393,7 @@ gsi_bool gsXmlReadChildAsString(GSXmlStreamReader stream, const char* matchtag, int i = 0; // Do we have a valid value position already? - if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element + if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element for (i = (reader->mValueReadIndex + 1); i < ArrayLength(reader->mElementArray); i++) { @@ -1507,7 +1507,7 @@ gsi_bool gsXmlReadChildAsHexBinary( int i = 0; // Do we have a valid value position already? - if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element + if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element for (i = (reader->mValueReadIndex + 1); i < ArrayLength(reader->mElementArray); i++) { @@ -1540,23 +1540,23 @@ gsi_bool gsXmlReadChildAsHexBinary( while (bytesleft > 1) { sscanf((char*)(&searchValueElem->mValue.mData[readpos]), "%02x", - &temp); // sscanf requires a 4 byte dest - valueOut[writepos] = (gsi_u8)temp; // then we convert to byte, to ensure correct byte order + &temp); // sscanf requires a 4 byte dest + valueOut[writepos] = (gsi_u8)temp; // then we convert to byte, to ensure correct byte order readpos += 2; writepos += 1; bytesleft -= 2; } if (bytesleft == 1) { sscanf((char*)(&searchValueElem->mValue.mData[readpos]), "%01x", - &temp); // sscanf requires a 4 byte dest - valueOut[writepos] = (gsi_u8)temp; // then we convert to byte, to ensure correct byte order + &temp); // sscanf requires a 4 byte dest + valueOut[writepos] = (gsi_u8)temp; // then we convert to byte, to ensure correct byte order readpos += 1; writepos += 1; bytesleft -= 1; } if (lenOut != NULL) *lenOut = writepos; - reader->mValueReadIndex = i; // mark that this element was read + reader->mValueReadIndex = i; // mark that this element was read return gsi_true; } } @@ -1575,7 +1575,7 @@ gsi_bool gsXmlReadChildAsBase64Binary(GSXmlStreamReader stream, const char* matc int i = 0; // Do we have a valid value position already? - if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element + if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element for (i = (reader->mValueReadIndex + 1); i < ArrayLength(reader->mElementArray); i++) { @@ -1616,7 +1616,7 @@ gsi_bool gsXmlReadChildAsInt(GSXmlStreamReader stream, const char* matchtag, int int i = 0; // Do we have a valid value position already? - if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element + if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element for (i = (reader->mValueReadIndex + 1); i < ArrayLength(reader->mElementArray); i++) { @@ -1625,7 +1625,7 @@ gsi_bool gsXmlReadChildAsInt(GSXmlStreamReader stream, const char* matchtag, int // check match if (gsi_is_true(gsiXmlUtilTagMatches(matchtag, &searchValueElem->mName))) { reader->mValueReadIndex = i; - if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! + if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! *valueOut = atoi((const char*)searchValueElem->mValue.mData); return gsi_true; } @@ -1645,7 +1645,7 @@ gsi_bool gsXmlReadChildAsInt64(GSXmlStreamReader stream, const char* matchtag, g int i = 0; // Do we have a valid value position already? - if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element + if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element for (i = (reader->mValueReadIndex + 1); i < ArrayLength(reader->mElementArray); i++) { @@ -1654,7 +1654,7 @@ gsi_bool gsXmlReadChildAsInt64(GSXmlStreamReader stream, const char* matchtag, g // check match if (gsi_is_true(gsiXmlUtilTagMatches(matchtag, &searchValueElem->mName))) { reader->mValueReadIndex = i; - if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! + if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! *valueOut = gsiStringToInt64((const char*)searchValueElem->mValue.mData); return gsi_true; } @@ -1675,7 +1675,7 @@ gsi_bool gsXmlReadChildAsDateTimeElement(GSXmlStreamReader stream, const char* m struct tm timePtr; // Do we have a valid value position already? - if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element + if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element for (i = (reader->mValueReadIndex + 1); i < ArrayLength(reader->mElementArray); i++) { @@ -1684,7 +1684,7 @@ gsi_bool gsXmlReadChildAsDateTimeElement(GSXmlStreamReader stream, const char* m // check match if (gsi_is_true(gsiXmlUtilTagMatches(matchtag, &searchValueElem->mName))) { reader->mValueReadIndex = i; - if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! + if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! // convert the time to from a string to a time struct sscanf((const char*)searchValueElem->mValue.mData, "%i-%02d-%02dT%02d:%02d:%02d", &timePtr.tm_year, @@ -1713,7 +1713,7 @@ gsi_bool gsXmlReadChildAsFloat(GSXmlStreamReader stream, const char* matchtag, f int i = 0; // Do we have a valid value position already? - if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element + if (reader->mValueReadIndex == -1) reader->mValueReadIndex = reader->mElemReadIndex; // start at current element for (i = (reader->mValueReadIndex + 1); i < ArrayLength(reader->mElementArray); i++) { @@ -1722,7 +1722,7 @@ gsi_bool gsXmlReadChildAsFloat(GSXmlStreamReader stream, const char* matchtag, f // check match if (gsi_is_true(gsiXmlUtilTagMatches(matchtag, &searchValueElem->mName))) { reader->mValueReadIndex = i; - if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! + if (searchValueElem->mValue.mData == NULL) return gsi_false; // invalid type! *valueOut = (float)atof((const char*)searchValueElem->mValue.mData); return gsi_true; } @@ -1745,7 +1745,7 @@ static gsi_bool gsiXmlUtilTagMatches(const char* matchtag, GSIXmlString* xmlstr) GS_ASSERT(xmlstr != NULL); if (matchtag == NULL) return gsi_true; - if (matchtag[strlen(matchtag) - 1] == ':') return gsi_false; // illegal to end with ':' + if (matchtag[strlen(matchtag) - 1] == ':') return gsi_false; // illegal to end with ':' // find post-namespace positions matchNoNamespace = strchr(matchtag, ':'); @@ -1756,7 +1756,7 @@ static gsi_bool gsiXmlUtilTagMatches(const char* matchtag, GSIXmlString* xmlstr) if (xmlNamespacePos == xmlstr->mLen) xmlNamespacePos = 0; else - xmlNamespacePos++; // add one more to skip over the ':' + xmlNamespacePos++; // add one more to skip over the ':' xmlNoNamespace.mData = xmlstr->mData + xmlNamespacePos; xmlNoNamespace.mLen = xmlstr->mLen - xmlNamespacePos; @@ -1800,7 +1800,7 @@ gsi_bool gsXmlReadChildAsLargeInt(GSXmlStreamReader stream, const char* matchtag gsi_bool gsXmlResetChildReadPosition(GSXmlStreamReader stream) { GSIXmlStreamReader* reader = (GSIXmlStreamReader*)stream; - reader->mValueReadIndex = -1; // no current child position means start at first + reader->mValueReadIndex = -1; // no current child position means start at first return gsi_true; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.h index b250908a064..93fd201264a 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/gsXML.h @@ -3,7 +3,7 @@ #ifndef __GSXML_H__ #define __GSXML_H__ -#include "gsLargeInt.h" // so that it can write large ints +#include "gsLargeInt.h" // so that it can write large ints #include "gsPlatform.h" #if defined(__cplusplus) @@ -39,7 +39,7 @@ extern "C" { typedef void* GSXmlStreamReader; typedef void* GSXmlStreamWriter; -struct gsLargeInt_s; // forward declare in case of header order problems +struct gsLargeInt_s; // forward declare in case of header order problems /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -48,7 +48,7 @@ GSXmlStreamReader gsXmlCreateStreamReader(); void gsXmlFreeReader(GSXmlStreamReader stream); void gsXmlFreeWriter(GSXmlStreamWriter stream); -void gsXmlResetReader(GSXmlStreamReader stream); // prepare reader for re-use +void gsXmlResetReader(GSXmlStreamReader stream); // prepare reader for re-use // Write utilities const char* gsXmlWriterGetData(GSXmlStreamWriter stream); @@ -93,7 +93,7 @@ gsi_bool gsXmlReadChildAsInt64(GSXmlStreamReader stream, const char* matchtag, g gsi_bool gsXmlReadChildAsFloat(GSXmlStreamReader stream, const char* matchtag, float* valueOut); gsi_bool gsXmlReadChildAsDateTimeElement(GSXmlStreamReader stream, const char* matchtag, time_t* valueOut); gsi_bool gsXmlResetChildReadPosition( - GSXmlStreamReader stream); // reset child read position to first child of current element + GSXmlStreamReader stream); // reset child read position to first child of current element // NOTE: HexStrings are BIG-endian, the valueout will also be BIG-endian. // NOTE: Call with NULL valueOut to get the lenOut. Doing this will not move read position. @@ -123,7 +123,7 @@ int gsXmlCountChildren(GSXmlStreamReader stream, const char* matchtag); /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if defined(__cplusplus) -} // extern "C" +} // extern "C" #endif -#endif // __GSXML_H__ +#endif // __GSXML_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/font.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/font.c index e86fc6ccd2d..f00bbcd8f01 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/font.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/font.c @@ -25,283 +25,283 @@ /*---------------------------------------------------------------------------* Character data *---------------------------------------------------------------------------*/ -const u32 d_CharData[8 * 256] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h - 0x00011010, 0x01100010, 0x00000010, 0x00000010, 0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h - 0x00100010, 0x00100010, 0x00100001, 0x00100001, 0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h - 0x00000001, 0x00000001, 0x00000001, 0x01111110, 0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h - 0x00100000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h - 0x00010001, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h - 0x00001000, 0x00101010, 0x01001010, 0x01001001, 0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h - 0x00010010, 0x00010010, 0x00010010, 0x00001001, 0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h - 0x00011111, 0x00001000, 0x00000001, 0x00011110, 0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h - 0x00000001, 0x00000110, 0x00011000, 0x00100000, 0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah - 0x00010001, 0x00010001, 0x00010001, 0x00001010, 0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh - 0x00000000, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch - 0x00010000, 0x00000001, 0x00000001, 0x00011110, 0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh - 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh - 0x00010100, 0x00010100, 0x00011000, 0x00001100, 0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh - 0x00010010, 0x00000010, 0x00000010, 0x00111100, 0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h - 0x00111111, 0x00000100, 0x00000100, 0x00011000, 0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h - 0x01110100, 0x00000010, 0x00001010, 0x01110010, 0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h - 0x00011110, 0x00100001, 0x00100000, 0x00011110, 0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h - 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h - 0x00001000, 0x00001000, 0x00001000, 0x00110000, 0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h - 0x00000010, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h - 0x00010001, 0x00111001, 0x01010101, 0x00011001, 0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h - 0x00010001, 0x00010001, 0x00001010, 0x00000100, 0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h - 0x00101001, 0x01010001, 0x01010001, 0x00001100, 0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h - 0x00010010, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah - 0x00010001, 0x00011001, 0x00110101, 0x00001001, 0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh - 0x00010001, 0x00111001, 0x01010101, 0x00011001, 0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch - 0x00010001, 0x00010001, 0x00001010, 0x00000100, 0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh - 0x00101001, 0x01010001, 0x01010001, 0x00001100, 0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh - 0x00010010, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh - 0x00010001, 0x00011001, 0x00110101, 0x00001001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h - 0x00001000, 0x00001000, 0x00000000, 0x00001000, 0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h - 0x00100100, 0x01111111, 0x00010010, 0x00010010, 0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h - 0x00111110, 0x01001000, 0x00111111, 0x00001000, 0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h - 0x00001000, 0x00100100, 0x01010010, 0x00100001, 0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h - 0x01000110, 0x00101001, 0x00110001, 0x01001110, 0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h - 0x00000100, 0x00000100, 0x00001000, 0x01110000, 0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h - 0x00010000, 0x00010000, 0x00001000, 0x00000111, 0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah - 0x00011100, 0x00101010, 0x01001001, 0x00001000, 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh - 0x01111111, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch - 0x00000000, 0x00001100, 0x00001000, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh - 0x01111111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh - 0x00000000, 0x00000000, 0x00000000, 0x00001100, 0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh - 0x00001000, 0x00000100, 0x00000010, 0x00000001, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h - 0x01000001, 0x01000001, 0x01000001, 0x00111110, 0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h - 0x00010000, 0x00010000, 0x00010000, 0x00010000, 0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h - 0x00111110, 0x00000001, 0x00000001, 0x01111111, 0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h - 0x00111110, 0x01000000, 0x01000001, 0x00111110, 0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h - 0x00100100, 0x00100010, 0x01111111, 0x00100000, 0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h - 0x01000000, 0x01000000, 0x01000001, 0x00111110, 0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h - 0x01000001, 0x01000001, 0x01000001, 0x00111110, 0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h - 0x00010000, 0x00010000, 0x00001000, 0x00001000, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h - 0x00111110, 0x01000001, 0x01000001, 0x00111110, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h - 0x01000001, 0x01111110, 0x01000000, 0x00111110, 0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah - 0x00000000, 0x00000000, 0x00001100, 0x00000000, 0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh - 0x00000000, 0x00001100, 0x00001000, 0x00000100, 0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch - 0x00000001, 0x00000110, 0x00011000, 0x01100000, 0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh - 0x00000000, 0x00000000, 0x01111111, 0x00000000, 0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh - 0x01000000, 0x00110000, 0x00001100, 0x00000011, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh - 0x00110000, 0x00001000, 0x00000000, 0x00001000, 0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h - 0x01010101, 0x01010101, 0x01010101, 0x00111010, 0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h - 0x00100010, 0x00111110, 0x01000001, 0x01000001, 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h - 0x00111111, 0x01000001, 0x01000001, 0x00111111, 0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h - 0x00000001, 0x00000001, 0x01000010, 0x00111100, 0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h - 0x01000001, 0x01000001, 0x00100001, 0x00011111, 0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h - 0x01111111, 0x00000001, 0x00000001, 0x01111111, 0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h - 0x00111111, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h - 0x01111001, 0x01000001, 0x01000010, 0x00111100, 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h - 0x01111111, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h - 0x00001000, 0x00001000, 0x00001000, 0x00111110, 0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah - 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh - 0x00000011, 0x00000101, 0x00011001, 0x01100001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch - 0x00000001, 0x00000001, 0x00000001, 0x01111111, 0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh - 0x01001001, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh - 0x01001001, 0x01010001, 0x01100001, 0x01000001, 0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh - 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h - 0x00111111, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h - 0x01000001, 0x01011001, 0x00100010, 0x01011100, 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h - 0x00111111, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h - 0x00111110, 0x01000000, 0x01000001, 0x00111110, 0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h - 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h - 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h - 0x00100010, 0x00010100, 0x00010100, 0x00001000, 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h - 0x01001001, 0x01010101, 0x01100011, 0x01000001, 0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h - 0x00001000, 0x00010100, 0x00100010, 0x01000001, 0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h - 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah - 0x00001000, 0x00000100, 0x00000010, 0x01111111, 0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh - 0x00000100, 0x00000100, 0x00000100, 0x01111100, 0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch - 0x00001000, 0x00111110, 0x00001000, 0x00001000, 0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh - 0x00010000, 0x00010000, 0x00010000, 0x00011111, 0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh - 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h - 0x00111110, 0x00100001, 0x00100001, 0x01011110, 0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h - 0x01000001, 0x01000001, 0x01000001, 0x00111111, 0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h - 0x00000001, 0x00000001, 0x01000010, 0x00111100, 0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h - 0x01000001, 0x01000001, 0x01000001, 0x01111110, 0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h - 0x01111111, 0x00000001, 0x01000001, 0x00111110, 0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h - 0x01111111, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h - 0x01000001, 0x01111110, 0x01000000, 0x00111110, 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h - 0x00111111, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h - 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah - 0x00100000, 0x00100001, 0x00100001, 0x00011110, 0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh - 0x00011001, 0x00000111, 0x00011001, 0x01100001, 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch - 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh - 0x01001001, 0x01001001, 0x01001001, 0x01001001, 0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh - 0x01000001, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh - 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h - 0x01000001, 0x01000011, 0x00111101, 0x00000001, 0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h - 0x01000001, 0x01100001, 0x01011110, 0x01000000, 0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h - 0x00000011, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h - 0x00001110, 0x00110000, 0x01000001, 0x00111110, 0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h - 0x00000100, 0x00000100, 0x00000100, 0x01111000, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h - 0x01000001, 0x01000001, 0x01000001, 0x01111110, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h - 0x00100010, 0x00100010, 0x00010100, 0x00001000, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h - 0x01001001, 0x00101010, 0x00101010, 0x00010100, 0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h - 0x00001100, 0x00001100, 0x00010010, 0x00100001, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h - 0x00100010, 0x00011100, 0x00001000, 0x00000110, 0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah - 0x00001000, 0x00000100, 0x00000010, 0x00111111, 0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh - 0x00011000, 0x00100100, 0x00000100, 0x01111000, 0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch - 0x00011110, 0x00110101, 0x00101101, 0x00010010, 0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh - 0x00100001, 0x00100001, 0x00000001, 0x00000010, 0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh - 0x00011110, 0x00100000, 0x00100000, 0x00011100, 0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh - 0x00111110, 0x00010000, 0x00001100, 0x00110010, 0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h - 0x01000100, 0x00011110, 0x00100101, 0x00010110, 0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h - 0x00101011, 0x00100010, 0x00010100, 0x00000100, 0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h - 0x00101011, 0x00101001, 0x00011001, 0x00000100, 0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h - 0x00001000, 0x00011110, 0x00101001, 0x00000110, 0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h - 0x00100011, 0x00100000, 0x00100000, 0x00011100, 0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h - 0x00111110, 0x01010101, 0x01001101, 0x00100110, 0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h - 0x01000001, 0x01000001, 0x00000001, 0x00000010, 0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h - 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h - 0x00010000, 0x00001000, 0x00010100, 0x01100010, 0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah - 0x00111110, 0x01000101, 0x01000101, 0x00100010, 0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh - 0x01010010, 0x00010010, 0x00010010, 0x00001001, 0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch - 0x00111110, 0x00010000, 0x00000010, 0x00111100, 0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh - 0x00000001, 0x00000110, 0x00011000, 0x00100000, 0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh - 0x00100001, 0x00100001, 0x00100001, 0x00010010, 0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh - 0x00000000, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h - 0x00100000, 0x00000010, 0x00000010, 0x00111100, 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h - 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h - 0x00010100, 0x00010100, 0x00011000, 0x00001100, 0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h - 0x00100010, 0x00000010, 0x00000010, 0x01111100, 0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h - 0x01111111, 0x00001000, 0x00001000, 0x00110000, 0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h - 0x01110100, 0x00000010, 0x00001010, 0x01110010, 0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h - 0x00111100, 0x01000010, 0x01000000, 0x00111100, 0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h - 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h - 0x00001000, 0x00001000, 0x00001000, 0x00110000, 0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h - 0x00000010, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah - 0x00010001, 0x00111100, 0x00010010, 0x00001100, 0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh - 0x00000010, 0x00000010, 0x00001010, 0x01110010, 0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch - 0x01001011, 0x01101101, 0x01010101, 0x00110010, 0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh - 0x01000110, 0x01110010, 0x01001011, 0x00110010, 0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh - 0x01001001, 0x01000101, 0x01000101, 0x00110010, 0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh - 0x00100001, 0x00111001, 0x01100101, 0x00011001, 0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h - 0x00100001, 0x00100001, 0x00010010, 0x00001100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h - 0x00000000, 0x00000100, 0x00001010, 0x00000100, 0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h - 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h - 0x00001000, 0x00001000, 0x00001000, 0x00001110, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h - 0x00000000, 0x00000010, 0x00000100, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h - 0x00011000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h - 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h - 0x00010100, 0x00001100, 0x00000100, 0x00000010, 0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h - 0x00010000, 0x00001111, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h - 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah - 0x00001000, 0x00001000, 0x00001000, 0x01111111, 0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh - 0x00011000, 0x00010100, 0x00010010, 0x00011001, 0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach - 0x00100010, 0x00010010, 0x00000100, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh - 0x00100000, 0x00100000, 0x00100000, 0x01111111, 0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh - 0x00111110, 0x00100000, 0x00100000, 0x00111110, 0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh - 0x00101010, 0x00100000, 0x00010000, 0x00001110, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h - 0x01111111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h - 0x00011000, 0x00001000, 0x00001000, 0x00000100, 0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h - 0x00010111, 0x00010000, 0x00010000, 0x00010000, 0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h - 0x01000001, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h - 0x00001000, 0x00001000, 0x00001000, 0x01111111, 0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h - 0x00101000, 0x00100100, 0x00100010, 0x00110001, 0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h - 0x01000100, 0x01000100, 0x01000010, 0x00100001, 0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h - 0x01111111, 0x00010000, 0x00010000, 0x00010000, 0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h - 0x01000010, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h - 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah - 0x01000000, 0x01000000, 0x01000000, 0x01111110, 0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh - 0x00100010, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch - 0x01000100, 0x00100000, 0x00011000, 0x00000111, 0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh - 0x00010000, 0x00011000, 0x00100100, 0x01000011, 0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh - 0x00100010, 0x00000010, 0x00000010, 0x01111100, 0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh - 0x00100000, 0x00100000, 0x00011000, 0x00000110, 0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h - 0x01110001, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h - 0x01111111, 0x00010000, 0x00010000, 0x00001100, 0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h - 0x01000000, 0x00100000, 0x00010000, 0x00001110, 0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h - 0x00010000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h - 0x00011010, 0x01100010, 0x00000010, 0x00000010, 0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h - 0x00010000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h - 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h - 0x00101000, 0x00010000, 0x00101000, 0x01000110, 0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h - 0x00010000, 0x00011100, 0x01101011, 0x00001000, 0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h - 0x00100000, 0x00100000, 0x00011000, 0x00000111, 0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah - 0x01000010, 0x01000010, 0x01000001, 0x01000001, 0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh - 0x00000001, 0x00000001, 0x00000001, 0x01111110, 0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch - 0x01000000, 0x00100000, 0x00010000, 0x00001110, 0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh - 0x00010001, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh - 0x00001000, 0x00101010, 0x01001010, 0x01001001, 0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh - 0x00100010, 0x00010100, 0x00001000, 0x00010000, 0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h - 0x01110000, 0x00000110, 0x00011000, 0x01100000, 0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h - 0x00000100, 0x00100010, 0x01000010, 0x01111111, 0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h - 0x00101000, 0x00010000, 0x00101100, 0x01000011, 0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h - 0x00000100, 0x00000100, 0x00000100, 0x01111000, 0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h - 0x00100010, 0x00010100, 0x00000100, 0x00000100, 0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h - 0x00100000, 0x00100000, 0x00100000, 0x01111111, 0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h - 0x01111110, 0x01000000, 0x01000000, 0x01111110, 0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h - 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h - 0x01000010, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h - 0x01001010, 0x01001010, 0x00101010, 0x00011001, 0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah - 0x01000010, 0x00100010, 0x00010010, 0x00001110, 0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh - 0x01000001, 0x01000001, 0x01000001, 0x01111111, 0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch - 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh - 0x01000000, 0x00100000, 0x00010000, 0x00001111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00deh - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00dfh - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00011110, 0x00001000, 0x00000100, // 00e0h - 0x00101001, 0x01010001, 0x01010001, 0x00001100, 0x00000000, 0x00000000, 0x00001100, 0x00010010, // 00e1h - 0x00010010, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01111101, 0x00100001, 0x01111101, // 00e2h - 0x00100001, 0x00111001, 0x01100101, 0x00011001, 0x00000000, 0x00111100, 0x00010000, 0x00111100, // 00e3h - 0x00010000, 0x00011100, 0x00110010, 0x00001100, 0x00000000, 0x00001110, 0x00101000, 0x00101000, // 00e4h - 0x00111110, 0x01100101, 0x00100101, 0x00010010, 0x00000000, 0x00000100, 0x00101111, 0x01000100, // 00e5h - 0x00000110, 0x01000101, 0x01000101, 0x00111110, 0x00000000, 0x00100010, 0x00100010, 0x00111110, // 00e6h - 0x01010010, 0x01010101, 0x01001101, 0x00100110, 0x00000000, 0x00000100, 0x00011111, 0x00000010, // 00e7h - 0x00011111, 0x01000010, 0x01000010, 0x00111100, 0x00000000, 0x00010010, 0x00111110, 0x01010011, // 00e8h - 0x01000010, 0x00100100, 0x00000100, 0x00000100, 0x00000000, 0x00001000, 0x00111101, 0x01001011, // 00e9h - 0x01001001, 0x01001001, 0x00111000, 0x00000100, 0x00000000, 0x00001000, 0x00111000, 0x00001000, // 00eah - 0x00001000, 0x00011110, 0x00101001, 0x00000110, 0x00000000, 0x00011000, 0x00100000, 0x00000100, // 00ebh - 0x00111010, 0x01000110, 0x01000000, 0x00111000, 0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00ech - 0x01000110, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00edh - 0x01000011, 0x01001100, 0x01010010, 0x00111100, 0x00000000, 0x00100010, 0x00110011, 0x00101010, // 00eeh - 0x00100110, 0x00100010, 0x00100011, 0x01000010, 0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00efh - 0x01000011, 0x01000000, 0x01000010, 0x00111100, 0x00000000, 0x00000010, 0x00111011, 0x01000110, // 00f0h - 0x01000010, 0x01000011, 0x01000010, 0x00110010, 0x00000000, 0x00000100, 0x00000100, 0x00000010, // 00f1h - 0x01000110, 0x01000101, 0x01000101, 0x00111001, 0x00000000, 0x01010100, 0x01111111, 0x00100100, // 00f2h - 0x00100100, 0x00100100, 0x00100010, 0x00010001, 0x00000000, 0x01010100, 0x01011111, 0x00000100, // 00f3h - 0x00111111, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x01011110, 0x01100010, 0x00100010, // 00f4h - 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01010010, 0x01111110, 0x00100010, // 00f5h - 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01010000, 0x01111111, 0x00100000, // 00f6h - 0x00100000, 0x00100000, 0x00100000, 0x00111111, 0x00000000, 0x01010010, 0x01010010, 0x00111111, // 00f7h - 0x00010010, 0x00010000, 0x00010000, 0x00001100, 0x00000000, 0x01010011, 0x01010100, 0x00100011, // 00f8h - 0x00100100, 0x00010000, 0x00001000, 0x00000111, 0x00000000, 0x01010000, 0x01011111, 0x00010000, // 00f9h - 0x00001000, 0x00001100, 0x00010010, 0x00100001, 0x00000000, 0x01010010, 0x01111111, 0x00100010, // 00fah - 0x00010010, 0x00000010, 0x00000010, 0x00111100, 0x00000000, 0x01010001, 0x01010010, 0x00100000, // 00fbh - 0x00100000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x01011110, 0x01010010, 0x00100110, // 00fch - 0x00111001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01010000, 0x01011110, 0x00010000, // 00fdh - 0x01111111, 0x00010000, 0x00010000, 0x00001100, 0x00000000, 0x00100101, 0x01001010, 0x00101010, // 00feh - 0x00100000, 0x00010000, 0x00001000, 0x00000111, 0x00000000, 0x01011110, 0x01010000, 0x00111111, // 00ffh +const u32 d_CharData[8 * 256] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0000h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01010010, 0x01010010, 0x00000110, // 0001h + 0x00011010, 0x01100010, 0x00000010, 0x00000010, 0x00000000, 0x01011010, 0x01010010, 0x00010010, // 0002h + 0x00100010, 0x00100010, 0x00100001, 0x00100001, 0x00000000, 0x01010001, 0x01010001, 0x01111111, // 0003h + 0x00000001, 0x00000001, 0x00000001, 0x01111110, 0x00000000, 0x01010000, 0x01111111, 0x00100000, // 0004h + 0x00100000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x01010000, 0x01010100, 0x00001010, // 0005h + 0x00010001, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01011000, 0x01011000, 0x01111111, // 0006h + 0x00001000, 0x00101010, 0x01001010, 0x01001001, 0x00000000, 0x01010010, 0x01101111, 0x01010010, // 0007h + 0x00010010, 0x00010010, 0x00010010, 0x00001001, 0x00000000, 0x01010010, 0x01011111, 0x00000100, // 0008h + 0x00011111, 0x00001000, 0x00000001, 0x00011110, 0x00000000, 0x01010000, 0x01011000, 0x00000110, // 0009h + 0x00000001, 0x00000110, 0x00011000, 0x00100000, 0x00000000, 0x01010000, 0x01111101, 0x00010001, // 000ah + 0x00010001, 0x00010001, 0x00010001, 0x00001010, 0x00000000, 0x01010000, 0x01011110, 0x00100000, // 000bh + 0x00000000, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x01010100, 0x01011111, 0x00001000, // 000ch + 0x00010000, 0x00000001, 0x00000001, 0x00011110, 0x00000000, 0x01010001, 0x01010001, 0x00000001, // 000dh + 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x01010000, 0x01111111, 0x00011000, // 000eh + 0x00010100, 0x00010100, 0x00011000, 0x00001100, 0x00000000, 0x01010010, 0x01111111, 0x00010010, // 000fh + 0x00010010, 0x00000010, 0x00000010, 0x00111100, 0x00000000, 0x00001110, 0x01010100, 0x01010010, // 0010h + 0x00111111, 0x00000100, 0x00000100, 0x00011000, 0x00000000, 0x01010100, 0x01011111, 0x00000100, // 0011h + 0x01110100, 0x00000010, 0x00001010, 0x01110010, 0x00000000, 0x01010100, 0x01011111, 0x00000010, // 0012h + 0x00011110, 0x00100001, 0x00100000, 0x00011110, 0x00000000, 0x01010000, 0x01011100, 0x00100011, // 0013h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01010000, 0x01111111, 0x00010000, // 0014h + 0x00001000, 0x00001000, 0x00001000, 0x00110000, 0x00000000, 0x01010010, 0x01010010, 0x00001100, // 0015h + 0x00000010, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x01010001, 0x01111101, 0x00010001, // 0016h + 0x00010001, 0x00111001, 0x01010101, 0x00011001, 0x00000000, 0x01010100, 0x01010011, 0x01110010, // 0017h + 0x00010001, 0x00010001, 0x00001010, 0x00000100, 0x00000000, 0x01011110, 0x01011000, 0x00000100, // 0018h + 0x00101001, 0x01010001, 0x01010001, 0x00001100, 0x00000000, 0x01010000, 0x01011100, 0x00010010, // 0019h + 0x00010010, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01011101, 0x01010001, 0x00111101, // 001ah + 0x00010001, 0x00011001, 0x00110101, 0x00001001, 0x00000000, 0x01110001, 0x01011101, 0x00110001, // 001bh + 0x00010001, 0x00111001, 0x01010101, 0x00011001, 0x00000000, 0x01110100, 0x01010011, 0x00110010, // 001ch + 0x00010001, 0x00010001, 0x00001010, 0x00000100, 0x00000000, 0x01101110, 0x01011000, 0x00100100, // 001dh + 0x00101001, 0x01010001, 0x01010001, 0x00001100, 0x00000000, 0x01110000, 0x01011100, 0x00110010, // 001eh + 0x00010010, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01111101, 0x01010001, 0x00111101, // 001fh + 0x00010001, 0x00011001, 0x00110101, 0x00001001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 0020h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 0021h + 0x00001000, 0x00001000, 0x00000000, 0x00001000, 0x00000000, 0x01101100, 0x01001000, 0x00100100, // 0022h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00100100, 0x01111111, 0x00100100, // 0023h + 0x00100100, 0x01111111, 0x00010010, 0x00010010, 0x00000000, 0x00001000, 0x01111110, 0x00001001, // 0024h + 0x00111110, 0x01001000, 0x00111111, 0x00001000, 0x00000000, 0x01000010, 0x00100101, 0x00010010, // 0025h + 0x00001000, 0x00100100, 0x01010010, 0x00100001, 0x00000000, 0x00001110, 0x00010001, 0x00001001, // 0026h + 0x01000110, 0x00101001, 0x00110001, 0x01001110, 0x00000000, 0x00011000, 0x00010000, 0x00001000, // 0027h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01110000, 0x00001000, 0x00000100, // 0028h + 0x00000100, 0x00000100, 0x00001000, 0x01110000, 0x00000000, 0x00000111, 0x00001000, 0x00010000, // 0029h + 0x00010000, 0x00010000, 0x00001000, 0x00000111, 0x00000000, 0x00001000, 0x01001001, 0x00101010, // 002ah + 0x00011100, 0x00101010, 0x01001001, 0x00001000, 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 002bh + 0x01111111, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002ch + 0x00000000, 0x00001100, 0x00001000, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002dh + 0x01111111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 002eh + 0x00000000, 0x00000000, 0x00000000, 0x00001100, 0x00000000, 0x01000000, 0x00100000, 0x00010000, // 002fh + 0x00001000, 0x00000100, 0x00000010, 0x00000001, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0030h + 0x01000001, 0x01000001, 0x01000001, 0x00111110, 0x00000000, 0x00011100, 0x00010000, 0x00010000, // 0031h + 0x00010000, 0x00010000, 0x00010000, 0x00010000, 0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0032h + 0x00111110, 0x00000001, 0x00000001, 0x01111111, 0x00000000, 0x00111110, 0x01000001, 0x01000000, // 0033h + 0x00111110, 0x01000000, 0x01000001, 0x00111110, 0x00000000, 0x00100000, 0x00110000, 0x00101000, // 0034h + 0x00100100, 0x00100010, 0x01111111, 0x00100000, 0x00000000, 0x01111111, 0x00000001, 0x00111111, // 0035h + 0x01000000, 0x01000000, 0x01000001, 0x00111110, 0x00000000, 0x00111110, 0x00000001, 0x00111111, // 0036h + 0x01000001, 0x01000001, 0x01000001, 0x00111110, 0x00000000, 0x01111111, 0x00100000, 0x00100000, // 0037h + 0x00010000, 0x00010000, 0x00001000, 0x00001000, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0038h + 0x00111110, 0x01000001, 0x01000001, 0x00111110, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 0039h + 0x01000001, 0x01111110, 0x01000000, 0x00111110, 0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003ah + 0x00000000, 0x00000000, 0x00001100, 0x00000000, 0x00000000, 0x00000000, 0x00001100, 0x00000000, // 003bh + 0x00000000, 0x00001100, 0x00001000, 0x00000100, 0x00000000, 0x01100000, 0x00011000, 0x00000110, // 003ch + 0x00000001, 0x00000110, 0x00011000, 0x01100000, 0x00000000, 0x00000000, 0x01111111, 0x00000000, // 003dh + 0x00000000, 0x00000000, 0x01111111, 0x00000000, 0x00000000, 0x00000011, 0x00001100, 0x00110000, // 003eh + 0x01000000, 0x00110000, 0x00001100, 0x00000011, 0x00000000, 0x00111110, 0x01000001, 0x01000001, // 003fh + 0x00110000, 0x00001000, 0x00000000, 0x00001000, 0x00000000, 0x00011100, 0x00100010, 0x01001001, // 0040h + 0x01010101, 0x01010101, 0x01010101, 0x00111010, 0x00000000, 0x00001000, 0x00010100, 0x00010100, // 0041h + 0x00100010, 0x00111110, 0x01000001, 0x01000001, 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0042h + 0x00111111, 0x01000001, 0x01000001, 0x00111111, 0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0043h + 0x00000001, 0x00000001, 0x01000010, 0x00111100, 0x00000000, 0x00011111, 0x00100001, 0x01000001, // 0044h + 0x01000001, 0x01000001, 0x00100001, 0x00011111, 0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0045h + 0x01111111, 0x00000001, 0x00000001, 0x01111111, 0x00000000, 0x01111111, 0x00000001, 0x00000001, // 0046h + 0x00111111, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00111100, 0x01000010, 0x00000001, // 0047h + 0x01111001, 0x01000001, 0x01000010, 0x00111100, 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0048h + 0x01111111, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00111110, 0x00001000, 0x00001000, // 0049h + 0x00001000, 0x00001000, 0x00001000, 0x00111110, 0x00000000, 0x01000000, 0x01000000, 0x01000000, // 004ah + 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x01100001, 0x00011001, 0x00000101, // 004bh + 0x00000011, 0x00000101, 0x00011001, 0x01100001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 004ch + 0x00000001, 0x00000001, 0x00000001, 0x01111111, 0x00000000, 0x01000001, 0x01100011, 0x01010101, // 004dh + 0x01001001, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x01000001, 0x01000011, 0x01000101, // 004eh + 0x01001001, 0x01010001, 0x01100001, 0x01000001, 0x00000000, 0x00011100, 0x00100010, 0x01000001, // 004fh + 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0050h + 0x00111111, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00011100, 0x00100010, 0x01000001, // 0051h + 0x01000001, 0x01011001, 0x00100010, 0x01011100, 0x00000000, 0x00111111, 0x01000001, 0x01000001, // 0052h + 0x00111111, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00111110, 0x01000001, 0x00000001, // 0053h + 0x00111110, 0x01000000, 0x01000001, 0x00111110, 0x00000000, 0x01111111, 0x00001000, 0x00001000, // 0054h + 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0055h + 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x01000001, 0x01000001, 0x00100010, // 0056h + 0x00100010, 0x00010100, 0x00010100, 0x00001000, 0x00000000, 0x01000001, 0x01000001, 0x01000001, // 0057h + 0x01001001, 0x01010101, 0x01100011, 0x01000001, 0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0058h + 0x00001000, 0x00010100, 0x00100010, 0x01000001, 0x00000000, 0x01000001, 0x00100010, 0x00010100, // 0059h + 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x01111111, 0x00100000, 0x00010000, // 005ah + 0x00001000, 0x00000100, 0x00000010, 0x01111111, 0x00000000, 0x01111100, 0x00000100, 0x00000100, // 005bh + 0x00000100, 0x00000100, 0x00000100, 0x01111100, 0x00000000, 0x00100010, 0x00010100, 0x00111110, // 005ch + 0x00001000, 0x00111110, 0x00001000, 0x00001000, 0x00000000, 0x00011111, 0x00010000, 0x00010000, // 005dh + 0x00010000, 0x00010000, 0x00010000, 0x00011111, 0x00000000, 0x00001000, 0x00010100, 0x00100010, // 005eh + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 005fh + 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x00000000, 0x00010000, 0x00001000, 0x00011000, // 0060h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00011110, 0x00100001, // 0061h + 0x00111110, 0x00100001, 0x00100001, 0x01011110, 0x00000000, 0x00000001, 0x00000001, 0x00111111, // 0062h + 0x01000001, 0x01000001, 0x01000001, 0x00111111, 0x00000000, 0x00000000, 0x00111100, 0x01000010, // 0063h + 0x00000001, 0x00000001, 0x01000010, 0x00111100, 0x00000000, 0x01000000, 0x01000000, 0x01111110, // 0064h + 0x01000001, 0x01000001, 0x01000001, 0x01111110, 0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0065h + 0x01111111, 0x00000001, 0x01000001, 0x00111110, 0x00000000, 0x00110000, 0x00001000, 0x00001000, // 0066h + 0x01111111, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x01111110, 0x01000001, // 0067h + 0x01000001, 0x01111110, 0x01000000, 0x00111110, 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0068h + 0x00111111, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00001000, 0x00000000, 0x00001000, // 0069h + 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00100000, 0x00000000, 0x00100000, // 006ah + 0x00100000, 0x00100001, 0x00100001, 0x00011110, 0x00000000, 0x00000001, 0x00000001, 0x01100001, // 006bh + 0x00011001, 0x00000111, 0x00011001, 0x01100001, 0x00000000, 0x00001000, 0x00001000, 0x00001000, // 006ch + 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x00110111, 0x01001001, // 006dh + 0x01001001, 0x01001001, 0x01001001, 0x01001001, 0x00000000, 0x00000000, 0x00111111, 0x01000001, // 006eh + 0x01000001, 0x01000001, 0x01000001, 0x01000001, 0x00000000, 0x00000000, 0x00011100, 0x00100010, // 006fh + 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x00000000, 0x00111101, 0x01000011, // 0070h + 0x01000001, 0x01000011, 0x00111101, 0x00000001, 0x00000000, 0x00000000, 0x01011110, 0x01100001, // 0071h + 0x01000001, 0x01100001, 0x01011110, 0x01000000, 0x00000000, 0x00000000, 0x00110001, 0x00001101, // 0072h + 0x00000011, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00111110, 0x01000001, // 0073h + 0x00001110, 0x00110000, 0x01000001, 0x00111110, 0x00000000, 0x00000100, 0x00000100, 0x01111111, // 0074h + 0x00000100, 0x00000100, 0x00000100, 0x01111000, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0075h + 0x01000001, 0x01000001, 0x01000001, 0x01111110, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0076h + 0x00100010, 0x00100010, 0x00010100, 0x00001000, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0077h + 0x01001001, 0x00101010, 0x00101010, 0x00010100, 0x00000000, 0x00000000, 0x00100001, 0x00010010, // 0078h + 0x00001100, 0x00001100, 0x00010010, 0x00100001, 0x00000000, 0x00000000, 0x01000001, 0x01000001, // 0079h + 0x00100010, 0x00011100, 0x00001000, 0x00000110, 0x00000000, 0x00000000, 0x00111111, 0x00010000, // 007ah + 0x00001000, 0x00000100, 0x00000010, 0x00111111, 0x00000000, 0x00001000, 0x00011110, 0x01100100, // 007bh + 0x00011000, 0x00100100, 0x00000100, 0x01111000, 0x00000000, 0x00000000, 0x00011110, 0x00000100, // 007ch + 0x00011110, 0x00110101, 0x00101101, 0x00010010, 0x00000000, 0x00000000, 0x00000000, 0x00010001, // 007dh + 0x00100001, 0x00100001, 0x00000001, 0x00000010, 0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007eh + 0x00011110, 0x00100000, 0x00100000, 0x00011100, 0x00000000, 0x00000000, 0x00011100, 0x00000000, // 007fh + 0x00111110, 0x00010000, 0x00001100, 0x00110010, 0x00000000, 0x00000000, 0x00000100, 0x00101111, // 0080h + 0x01000100, 0x00011110, 0x00100101, 0x00010110, 0x00000000, 0x00000000, 0x00001010, 0x00011110, // 0081h + 0x00101011, 0x00100010, 0x00010100, 0x00000100, 0x00000000, 0x00000000, 0x00001000, 0x00011101, // 0082h + 0x00101011, 0x00101001, 0x00011001, 0x00000100, 0x00000000, 0x00000000, 0x00001000, 0x00111000, // 0083h + 0x00001000, 0x00011110, 0x00101001, 0x00000110, 0x00000000, 0x00000000, 0x00000000, 0x00011100, // 0084h + 0x00100011, 0x00100000, 0x00100000, 0x00011100, 0x00000000, 0x00000110, 0x01001001, 0x00110000, // 0085h + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00111111, 0x00000100, // 0086h + 0x00111110, 0x01010101, 0x01001101, 0x00100110, 0x00000000, 0x00000000, 0x00100001, 0x01000001, // 0087h + 0x01000001, 0x01000001, 0x00000001, 0x00000010, 0x00000000, 0x00111100, 0x00000000, 0x00111110, // 0088h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x00011100, 0x00000000, 0x00111110, // 0089h + 0x00010000, 0x00001000, 0x00010100, 0x01100010, 0x00000000, 0x00100100, 0x01011111, 0x00000100, // 008ah + 0x00111110, 0x01000101, 0x01000101, 0x00100010, 0x00000000, 0x00100010, 0x01001111, 0x01010010, // 008bh + 0x01010010, 0x00010010, 0x00010010, 0x00001001, 0x00000000, 0x00000100, 0x00111110, 0x00001000, // 008ch + 0x00111110, 0x00010000, 0x00000010, 0x00111100, 0x00000000, 0x00100000, 0x00011000, 0x00000110, // 008dh + 0x00000001, 0x00000110, 0x00011000, 0x00100000, 0x00000000, 0x00100000, 0x01111101, 0x00100001, // 008eh + 0x00100001, 0x00100001, 0x00100001, 0x00010010, 0x00000000, 0x00011110, 0x00100000, 0x00000000, // 008fh + 0x00000000, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x00001000, 0x01111111, 0x00010000, // 0090h + 0x00100000, 0x00000010, 0x00000010, 0x00111100, 0x00000000, 0x00000001, 0x00000001, 0x00000001, // 0091h + 0x01000001, 0x01000001, 0x00100010, 0x00011100, 0x00000000, 0x00010000, 0x01111111, 0x00011000, // 0092h + 0x00010100, 0x00010100, 0x00011000, 0x00001100, 0x00000000, 0x00100010, 0x01111111, 0x00100010, // 0093h + 0x00100010, 0x00000010, 0x00000010, 0x01111100, 0x00000000, 0x00111100, 0x00010000, 0x00001100, // 0094h + 0x01111111, 0x00001000, 0x00001000, 0x00110000, 0x00000000, 0x00000100, 0x00011111, 0x00000100, // 0095h + 0x01110100, 0x00000010, 0x00001010, 0x01110010, 0x00000000, 0x00001000, 0x01111111, 0x00000100, // 0096h + 0x00111100, 0x01000010, 0x01000000, 0x00111100, 0x00000000, 0x00000000, 0x00011100, 0x00100011, // 0097h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01111111, 0x00010000, 0x00001000, // 0098h + 0x00001000, 0x00001000, 0x00001000, 0x00110000, 0x00000000, 0x00000010, 0x00110010, 0x00001100, // 0099h + 0x00000010, 0x00000001, 0x00000001, 0x00111110, 0x00000000, 0x00100100, 0x01001111, 0x01000010, // 009ah + 0x00010001, 0x00111100, 0x00010010, 0x00001100, 0x00000000, 0x00000010, 0x01111010, 0x01000010, // 009bh + 0x00000010, 0x00000010, 0x00001010, 0x01110010, 0x00000000, 0x00100010, 0x00111110, 0x01010010, // 009ch + 0x01001011, 0x01101101, 0x01010101, 0x00110010, 0x00000000, 0x00110010, 0x01001011, 0x01000110, // 009dh + 0x01000110, 0x01110010, 0x01001011, 0x00110010, 0x00000000, 0x00011100, 0x00101010, 0x01001001, // 009eh + 0x01001001, 0x01000101, 0x01000101, 0x00110010, 0x00000000, 0x00100001, 0x01111101, 0x00100001, // 009fh + 0x00100001, 0x00111001, 0x01100101, 0x00011001, 0x00000000, 0x00000100, 0x00100011, 0x01100010, // 00a0h + 0x00100001, 0x00100001, 0x00010010, 0x00001100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a1h + 0x00000000, 0x00000100, 0x00001010, 0x00000100, 0x00000000, 0x01110000, 0x00010000, 0x00010000, // 00a2h + 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a3h + 0x00001000, 0x00001000, 0x00001000, 0x00001110, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00a4h + 0x00000000, 0x00000010, 0x00000100, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00011000, // 00a5h + 0x00011000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x01000000, 0x01111111, // 00a6h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x00000000, 0x00111111, 0x00100000, // 00a7h + 0x00010100, 0x00001100, 0x00000100, 0x00000010, 0x00000000, 0x00000000, 0x00100000, 0x00100000, // 00a8h + 0x00010000, 0x00001111, 0x00001000, 0x00001000, 0x00000000, 0x00000000, 0x00000100, 0x00111111, // 00a9h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00aah + 0x00001000, 0x00001000, 0x00001000, 0x01111111, 0x00000000, 0x00000000, 0x00010000, 0x00111111, // 00abh + 0x00011000, 0x00010100, 0x00010010, 0x00011001, 0x00000000, 0x00000000, 0x00000010, 0x00111111, // 00ach + 0x00100010, 0x00010010, 0x00000100, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00111110, // 00adh + 0x00100000, 0x00100000, 0x00100000, 0x01111111, 0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00aeh + 0x00111110, 0x00100000, 0x00100000, 0x00111110, 0x00000000, 0x00000000, 0x00100101, 0x00101010, // 00afh + 0x00101010, 0x00100000, 0x00010000, 0x00001110, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00b0h + 0x01111111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x01000000, 0x00101000, // 00b1h + 0x00011000, 0x00001000, 0x00001000, 0x00000100, 0x00000000, 0x01000000, 0x00100000, 0x00011000, // 00b2h + 0x00010111, 0x00010000, 0x00010000, 0x00010000, 0x00000000, 0x00001000, 0x01111111, 0x01000001, // 00b3h + 0x01000001, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00000000, 0x00111110, 0x00001000, // 00b4h + 0x00001000, 0x00001000, 0x00001000, 0x01111111, 0x00000000, 0x00100000, 0x01111111, 0x00110000, // 00b5h + 0x00101000, 0x00100100, 0x00100010, 0x00110001, 0x00000000, 0x00000100, 0x01111111, 0x01000100, // 00b6h + 0x01000100, 0x01000100, 0x01000010, 0x00100001, 0x00000000, 0x00000100, 0x00111111, 0x00001000, // 00b7h + 0x01111111, 0x00010000, 0x00010000, 0x00010000, 0x00000000, 0x01111100, 0x01000100, 0x01000100, // 00b8h + 0x01000010, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00000010, 0x01111110, 0x00100010, // 00b9h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00bah + 0x01000000, 0x01000000, 0x01000000, 0x01111110, 0x00000000, 0x00100010, 0x01111111, 0x00100010, // 00bbh + 0x00100010, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x00000011, 0x00000100, 0x01000011, // 00bch + 0x01000100, 0x00100000, 0x00011000, 0x00000111, 0x00000000, 0x01111111, 0x01000000, 0x00100000, // 00bdh + 0x00010000, 0x00011000, 0x00100100, 0x01000011, 0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00beh + 0x00100010, 0x00000010, 0x00000010, 0x01111100, 0x00000000, 0x01000001, 0x01000010, 0x01000000, // 00bfh + 0x00100000, 0x00100000, 0x00011000, 0x00000110, 0x00000000, 0x01111110, 0x01000010, 0x01001110, // 00c0h + 0x01110001, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x01100000, 0x00011110, 0x00010000, // 00c1h + 0x01111111, 0x00010000, 0x00010000, 0x00001100, 0x00000000, 0x01000101, 0x01001010, 0x01001010, // 00c2h + 0x01000000, 0x00100000, 0x00010000, 0x00001110, 0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00c3h + 0x00010000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x00000010, 0x00000010, 0x00000110, // 00c4h + 0x00011010, 0x01100010, 0x00000010, 0x00000010, 0x00000000, 0x00010000, 0x00010000, 0x01111111, // 00c5h + 0x00010000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x00000000, 0x00111110, 0x00000000, // 00c6h + 0x00000000, 0x00000000, 0x00000000, 0x01111111, 0x00000000, 0x01111110, 0x01000000, 0x01000100, // 00c7h + 0x00101000, 0x00010000, 0x00101000, 0x01000110, 0x00000000, 0x00001000, 0x01111111, 0x00100000, // 00c8h + 0x00010000, 0x00011100, 0x01101011, 0x00001000, 0x00000000, 0x01000000, 0x01000000, 0x01000000, // 00c9h + 0x00100000, 0x00100000, 0x00011000, 0x00000111, 0x00000000, 0x00010010, 0x00100010, 0x00100010, // 00cah + 0x01000010, 0x01000010, 0x01000001, 0x01000001, 0x00000000, 0x00000001, 0x00000001, 0x01111111, // 00cbh + 0x00000001, 0x00000001, 0x00000001, 0x01111110, 0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cch + 0x01000000, 0x00100000, 0x00010000, 0x00001110, 0x00000000, 0x00000000, 0x00000100, 0x00001010, // 00cdh + 0x00010001, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x00001000, 0x00001000, 0x01111111, // 00ceh + 0x00001000, 0x00101010, 0x01001010, 0x01001001, 0x00000000, 0x01111111, 0x01000000, 0x01000000, // 00cfh + 0x00100010, 0x00010100, 0x00001000, 0x00010000, 0x00000000, 0x00001110, 0x01110000, 0x00001110, // 00d0h + 0x01110000, 0x00000110, 0x00011000, 0x01100000, 0x00000000, 0x00001000, 0x00001000, 0x00000100, // 00d1h + 0x00000100, 0x00100010, 0x01000010, 0x01111111, 0x00000000, 0x01000000, 0x01000000, 0x00100100, // 00d2h + 0x00101000, 0x00010000, 0x00101100, 0x01000011, 0x00000000, 0x01111111, 0x00000100, 0x01111111, // 00d3h + 0x00000100, 0x00000100, 0x00000100, 0x01111000, 0x00000000, 0x00000010, 0x01111111, 0x01000010, // 00d4h + 0x00100010, 0x00010100, 0x00000100, 0x00000100, 0x00000000, 0x00000000, 0x00111110, 0x00100000, // 00d5h + 0x00100000, 0x00100000, 0x00100000, 0x01111111, 0x00000000, 0x01111110, 0x01000000, 0x01000000, // 00d6h + 0x01111110, 0x01000000, 0x01000000, 0x01111110, 0x00000000, 0x00111110, 0x00000000, 0x01111111, // 00d7h + 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00d8h + 0x01000010, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00001010, 0x00001010, 0x00001010, // 00d9h + 0x01001010, 0x01001010, 0x00101010, 0x00011001, 0x00000000, 0x00000010, 0x00000010, 0x01000010, // 00dah + 0x01000010, 0x00100010, 0x00010010, 0x00001110, 0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dbh + 0x01000001, 0x01000001, 0x01000001, 0x01111111, 0x00000000, 0x01111111, 0x01000001, 0x01000001, // 00dch + 0x01000000, 0x01000000, 0x00100000, 0x00011100, 0x00000000, 0x01000011, 0x01000100, 0x01000000, // 00ddh + 0x01000000, 0x00100000, 0x00010000, 0x00001111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00deh + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // 00dfh + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00011110, 0x00001000, 0x00000100, // 00e0h + 0x00101001, 0x01010001, 0x01010001, 0x00001100, 0x00000000, 0x00000000, 0x00001100, 0x00010010, // 00e1h + 0x00010010, 0x00100001, 0x01000000, 0x00000000, 0x00000000, 0x01111101, 0x00100001, 0x01111101, // 00e2h + 0x00100001, 0x00111001, 0x01100101, 0x00011001, 0x00000000, 0x00111100, 0x00010000, 0x00111100, // 00e3h + 0x00010000, 0x00011100, 0x00110010, 0x00001100, 0x00000000, 0x00001110, 0x00101000, 0x00101000, // 00e4h + 0x00111110, 0x01100101, 0x00100101, 0x00010010, 0x00000000, 0x00000100, 0x00101111, 0x01000100, // 00e5h + 0x00000110, 0x01000101, 0x01000101, 0x00111110, 0x00000000, 0x00100010, 0x00100010, 0x00111110, // 00e6h + 0x01010010, 0x01010101, 0x01001101, 0x00100110, 0x00000000, 0x00000100, 0x00011111, 0x00000010, // 00e7h + 0x00011111, 0x01000010, 0x01000010, 0x00111100, 0x00000000, 0x00010010, 0x00111110, 0x01010011, // 00e8h + 0x01000010, 0x00100100, 0x00000100, 0x00000100, 0x00000000, 0x00001000, 0x00111101, 0x01001011, // 00e9h + 0x01001001, 0x01001001, 0x00111000, 0x00000100, 0x00000000, 0x00001000, 0x00111000, 0x00001000, // 00eah + 0x00001000, 0x00011110, 0x00101001, 0x00000110, 0x00000000, 0x00011000, 0x00100000, 0x00000100, // 00ebh + 0x00111010, 0x01000110, 0x01000000, 0x00111000, 0x00000000, 0x01000010, 0x01000010, 0x01000010, // 00ech + 0x01000110, 0x01000000, 0x00100000, 0x00011000, 0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00edh + 0x01000011, 0x01001100, 0x01010010, 0x00111100, 0x00000000, 0x00100010, 0x00110011, 0x00101010, // 00eeh + 0x00100110, 0x00100010, 0x00100011, 0x01000010, 0x00000000, 0x00111110, 0x00010000, 0x00111100, // 00efh + 0x01000011, 0x01000000, 0x01000010, 0x00111100, 0x00000000, 0x00000010, 0x00111011, 0x01000110, // 00f0h + 0x01000010, 0x01000011, 0x01000010, 0x00110010, 0x00000000, 0x00000100, 0x00000100, 0x00000010, // 00f1h + 0x01000110, 0x01000101, 0x01000101, 0x00111001, 0x00000000, 0x01010100, 0x01111111, 0x00100100, // 00f2h + 0x00100100, 0x00100100, 0x00100010, 0x00010001, 0x00000000, 0x01010100, 0x01011111, 0x00000100, // 00f3h + 0x00111111, 0x00001000, 0x00001000, 0x00001000, 0x00000000, 0x01011110, 0x01100010, 0x00100010, // 00f4h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01010010, 0x01111110, 0x00100010, // 00f5h + 0x00100001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01010000, 0x01111111, 0x00100000, // 00f6h + 0x00100000, 0x00100000, 0x00100000, 0x00111111, 0x00000000, 0x01010010, 0x01010010, 0x00111111, // 00f7h + 0x00010010, 0x00010000, 0x00010000, 0x00001100, 0x00000000, 0x01010011, 0x01010100, 0x00100011, // 00f8h + 0x00100100, 0x00010000, 0x00001000, 0x00000111, 0x00000000, 0x01010000, 0x01011111, 0x00010000, // 00f9h + 0x00001000, 0x00001100, 0x00010010, 0x00100001, 0x00000000, 0x01010010, 0x01111111, 0x00100010, // 00fah + 0x00010010, 0x00000010, 0x00000010, 0x00111100, 0x00000000, 0x01010001, 0x01010010, 0x00100000, // 00fbh + 0x00100000, 0x00010000, 0x00001000, 0x00000110, 0x00000000, 0x01011110, 0x01010010, 0x00100110, // 00fch + 0x00111001, 0x00100000, 0x00010000, 0x00001100, 0x00000000, 0x01010000, 0x01011110, 0x00010000, // 00fdh + 0x01111111, 0x00010000, 0x00010000, 0x00001100, 0x00000000, 0x00100101, 0x01001010, 0x00101010, // 00feh + 0x00100000, 0x00010000, 0x00001000, 0x00000111, 0x00000000, 0x01011110, 0x01010000, 0x00111111, // 00ffh 0x00001000, 0x00001000, 0x00001000, 0x00000110}; /*---------------------------------------------------------------------------* Palette data *---------------------------------------------------------------------------*/ -const u32 d_PaletteData[8 * 16] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, // black - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x001f0000, 0x00000000, 0x00000000, 0x00000000, // red - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00180000, 0x00000000, 0x00000000, 0x00000000, // dark red - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white +const u32 d_PaletteData[8 * 16] = {0x00000000, 0x00000000, 0x00000000, 0x00000000, // black + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x001f0000, 0x00000000, 0x00000000, 0x00000000, // red + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03e00000, 0x00000000, 0x00000000, 0x00000000, // green + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7c000000, 0x00000000, 0x00000000, 0x00000000, // blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03ff0000, 0x00000000, 0x00000000, 0x00000000, // yellow + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7c1f0000, 0x00000000, 0x00000000, 0x00000000, // purple + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7fe00000, 0x00000000, 0x00000000, 0x00000000, // light blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00180000, 0x00000000, 0x00000000, 0x00000000, // dark red + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03000000, 0x00000000, 0x00000000, 0x00000000, // dark green + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60000000, 0x00000000, 0x00000000, 0x00000000, // dark blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x03180000, 0x00000000, 0x00000000, 0x00000000, // dark yellow + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60180000, 0x00000000, 0x00000000, 0x00000000, // dark purple + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x63000000, 0x00000000, 0x00000000, 0x00000000, // dark light blue + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x56b50000, 0x00000000, 0x00000000, 0x00000000, // gray + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2d6b0000, 0x00000000, 0x00000000, 0x00000000, // dark gray + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7fff0000, 0x00000000, 0x00000000, 0x00000000, // white 0x00000000, 0x00000000, 0x00000000, 0x00000000}; /*---------------------------------------------------------------------------* diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/gsSocketNitro.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/gsSocketNitro.c index 46bb1f0c89c..aa5d49ac5c4 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/gsSocketNitro.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/gsSocketNitro.c @@ -178,4 +178,4 @@ int GSISocketSelect(SOCKET theSocket, int* theReadFlag, int* theWriteFlag, int* /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // _NITRO \ No newline at end of file +#endif // _NITRO \ No newline at end of file diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.c index 15d0bee4eec..b306547d4b0 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.c @@ -1,8 +1,8 @@ #include "key.h" #include "..\nonport.h" -#define KEY_REPEAT_START 25 // Number of frames before start of key repeat -#define KEY_REPEAT_SPAN 10 // Number of frames of key repeat interval +#define KEY_REPEAT_START 25 // Number of frames before start of key repeat +#define KEY_REPEAT_SPAN 10 // Number of frames of key repeat interval static KeyInformation KeyInfo; @@ -27,13 +27,13 @@ const KeyInformation* KeyRead(void) { if (r & (0x0001 << i)) { if (!(KeyInfo.cnt & (0x0001 << i))) { - KeyInfo.trg |= (0x0001 << i); // Pressing trigger input + KeyInfo.trg |= (0x0001 << i); // Pressing trigger input repeat_count[i] = 1; } else { if (repeat_count[i] > KEY_REPEAT_START) { - KeyInfo.rep |= (0x0001 << i); // Pressing hold repeat + KeyInfo.rep |= (0x0001 << i); // Pressing hold repeat repeat_count[i] = KEY_REPEAT_START - KEY_REPEAT_SPAN; } else @@ -45,11 +45,11 @@ const KeyInformation* KeyRead(void) else { if (KeyInfo.cnt & (0x0001 << i)) { - KeyInfo.up |= (0x0001 << i); // Releasing trigger input + KeyInfo.up |= (0x0001 << i); // Releasing trigger input } } } - KeyInfo.cnt = r; // Unprocessed key input + KeyInfo.cnt = r; // Unprocessed key input return &KeyInfo; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.h index 52042e7c638..2e39d7ee8d0 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/key.h @@ -4,10 +4,10 @@ // Key input information typedef struct KeyInformation { - u16 cnt; // Unprocessed input value - u16 trg; // Pressing trigger input - u16 up; // Releasing trigger input - u16 rep; // Pressing hold repeat input + u16 cnt; // Unprocessed input value + u16 trg; // Pressing trigger input + u16 up; // Releasing trigger input + u16 rep; // Pressing hold repeat input } KeyInformation; void KeyInit(void); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/menu.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/menu.h index b8b1aba320a..aa329de0171 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/menu.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/menu.h @@ -34,7 +34,7 @@ typedef struct MenuScreen struct MenuScreenConfiguration* configuration; char extraText[MAX_EXTRA_TEXT_STRINGS][MAX_EXTRA_TEXT_STRING_LEN + 1]; char list[MAX_LIST_STRINGS][MAX_LIST_STRING_LEN + 1]; - int listSelection; // default -1, no selection + int listSelection; // default -1, no selection char keyboardText[MAX_KEYBOARD_TEXT_LEN + 1]; int numChoices; } MenuScreen; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.c index f7e83b5eccf..a30108d2938 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.c @@ -196,8 +196,8 @@ void ScreenInit(void) // g2 GX_SetBankForBG(GX_VRAM_BG_128_A); G2_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, - GX_BG_SCRBASE_0xf800, // SCR base block 31 - GX_BG_CHARBASE_0x00000, // CHR base block 0 + GX_BG_SCRBASE_0xf800, // SCR base block 31 + GX_BG_CHARBASE_0x00000, // CHR base block 0 GX_BG_EXTPLTT_01); G2_SetBG0Priority(0); G2_BG0Mosaic(FALSE); @@ -209,8 +209,8 @@ void ScreenInit(void) // g2s GX_SetBankForSubBG(GX_VRAM_SUB_BG_128_C); G2S_SetBG0Control(GX_BG_SCRSIZE_TEXT_256x256, GX_BG_COLORMODE_16, - GX_BG_SCRBASE_0xf800, // SCR base block 31 - GX_BG_CHARBASE_0x00000, // CHR base block 0 + GX_BG_SCRBASE_0xf800, // SCR base block 31 + GX_BG_CHARBASE_0x00000, // CHR base block 0 GX_BG_EXTPLTT_01); G2S_SetBG0Priority(0); G2S_BG0Mosaic(FALSE); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.h index 65b5bd6d193..f75a749945e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/screen.h @@ -24,7 +24,7 @@ typedef enum { } ScreenColor; // can be combined -#define PRINT_TO_SCREEN 1 // default +#define PRINT_TO_SCREEN 1 // default #define PRINT_TO_DEBUGGER 2 void ScreenInit(void); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/wireless.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/wireless.c index 1a326e033f4..a6d76879a63 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/wireless.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/nitro/wireless.c @@ -251,34 +251,34 @@ static void soFree(u32 name, void* ptr, s32 size) } SOConfig SocketsConfig = { - SOC_VENDOR_NINTENDO, // vendor - SOC_VERSION, // version + SOC_VENDOR_NINTENDO, // vendor + SOC_VERSION, // version - soAlloc, // alloc - soFree, // free + soAlloc, // alloc + soFree, // free #if defined(USE_DHCP) - SOC_FLAG_DHCP, // flag - SOC_HtoNl(SOC_INADDR_ANY), // addr - SOC_HtoNl(SOC_INADDR_ANY), // netmask - SOC_HtoNl(SOC_INADDR_ANY), // router - SOC_HtoNl(SOC_INADDR_ANY), // dns1 - SOC_HtoNl(SOC_INADDR_ANY), // dns2 + SOC_FLAG_DHCP, // flag + SOC_HtoNl(SOC_INADDR_ANY), // addr + SOC_HtoNl(SOC_INADDR_ANY), // netmask + SOC_HtoNl(SOC_INADDR_ANY), // router + SOC_HtoNl(SOC_INADDR_ANY), // dns1 + SOC_HtoNl(SOC_INADDR_ANY), // dns2 #else - 0, // flag - SOC_HtoNl(0xC0A8000C), // addr 192.168. 0. 12 - SOC_HtoNl(0xFFFFFF00), // netmask 255.255.255. 0 - SOC_HtoNl(0xC0A80001), // router 192.168. 0. 1 - SOC_HtoNl(0xC0A80001), // dns1 192.168. 0. 1 - SOC_HtoNl(SOC_INADDR_ANY), // dns2 + 0, // flag + SOC_HtoNl(0xC0A8000C), // addr 192.168. 0. 12 + SOC_HtoNl(0xFFFFFF00), // netmask 255.255.255. 0 + SOC_HtoNl(0xC0A80001), // router 192.168. 0. 1 + SOC_HtoNl(0xC0A80001), // dns1 192.168. 0. 1 + SOC_HtoNl(SOC_INADDR_ANY), // dns2 #endif - 4096, // timeWaitBuffer - 4096, // reassemblyBuffer - 0, // maximum transmission unit size + 4096, // timeWaitBuffer + 4096, // reassemblyBuffer + 0, // maximum transmission unit size // TCP - 0, // default TCP receive window size (default 2 x MSS) - 0, // default TCP total retransmit timeout value (default 100 sec) + 0, // default TCP receive window size (default 2 x MSS) + 0, // default TCP total retransmit timeout value (default 100 sec) // PPP NULL, NULL, @@ -287,12 +287,12 @@ SOConfig SocketsConfig = { NULL, // DHCP - "NintendoDS", // DHCP host name - 50, // TCP total retransmit times (default 4) + "NintendoDS", // DHCP host name + 50, // TCP total retransmit times (default 4) // UDP - 0, // default UDP send buffer size (default 1472) - 0 // defualt UDP receive buffer size (default 4416) + 0, // default UDP send buffer size (default 1472) + 0 // defualt UDP receive buffer size (default 4416) }; static const char* IWResultToString(int result) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsSocketPs2.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsSocketPs2.c index a1d1bf70058..0d911073934 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsSocketPs2.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsSocketPs2.c @@ -6,7 +6,7 @@ /////////////////////////////////////////////////////////////////////////////// // INSOCK #if defined(INSOCK) -#define INSOCK_MAX_UDP_BUFSIZE 8000000 // default max +#define INSOCK_MAX_UDP_BUFSIZE 8000000 // default max #define INSOCK_MAX_TCP_BUFSIZE 32000 extern sceSifMClientData gGSIInsockClientData; @@ -52,9 +52,9 @@ int GSISocketSelect(SOCKET theSocket, int* theReadFlag, int* theWriteFlag, int* if ((theExceptFlag != NULL)) *theExceptFlag = 0; // Setup the fd set - aPollFdSet.cid = theSocket; // the socket - aPollFdSet.events = 0; // events in - aPollFdSet.revents = 0; // events out + aPollFdSet.cid = theSocket; // the socket + aPollFdSet.events = 0; // events in + aPollFdSet.revents = 0; // events out if (theReadFlag != NULL) aPollFdSet.events |= sceINET_POLLIN; if (theWriteFlag != NULL) aPollFdSet.events |= sceINET_POLLOUT; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsThreadPs2.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsThreadPs2.c index a3d38e4f01c..b4c450dee4e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsThreadPs2.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/gsThreadPs2.c @@ -73,9 +73,9 @@ gsi_u32 gsiHasThreadShutdown(GSIThreadID theThreadID) struct ThreadParam aStatus; ReferThreadStatus(theThreadID, &aStatus); if (aStatus.status == THS_DORMANT) - return 1; // dead + return 1; // dead else - return 0; // still kicking; + return 0; // still kicking; } GSISemaphoreID gsiCreateSemaphore(gsi_i32 theInitialCount, gsi_i32 theMaxCount, char* theName) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2common.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2common.c index 2c3ca5bfd63..36d5a5386cb 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2common.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2common.c @@ -234,7 +234,7 @@ static void do_shutdown(void) // deregister this thread with the socket API sockAPIderegthr(); } -#endif // SN_SYSTEMS +#endif // SN_SYSTEMS #ifdef EENET @@ -776,10 +776,10 @@ static void do_shutdown(void) sceSifMExitRpc(); } -#endif // INSOCK +#endif // INSOCK #ifdef GSI_VOICE -void load_voice_modules(void); // prototype so codewarrior will be happy +void load_voice_modules(void); // prototype so codewarrior will be happy void load_voice_modules(void) { // this is the maximum size of a raw frame, in bytes diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2pad.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2pad.c index d6d1fa63359..9925a8c7336 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2pad.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps2/ps2pad.c @@ -95,13 +95,13 @@ int PadInit(void) if (0 >= sceSifLoadModule(ROOT_DIR "padman.irx", 0, NULL)) return 0; // Misc init - sceDmaReset(1); // reset DMA - sceGsResetPath(); // reset GS - sceGsSyncPath(0, 0); // wait for completion + sceDmaReset(1); // reset DMA + sceGsResetPath(); // reset GS + sceGsSyncPath(0, 0); // wait for completion // Open the pad port scePadInit(0); - if (0 == scePadPortOpen(0, 0, mPadDMABuf)) return 0; // couldn't initialize pad + if (0 == scePadPortOpen(0, 0, mPadDMABuf)) return 0; // couldn't initialize pad return 1; } @@ -119,7 +119,7 @@ void PadReadInput(int events[NumPadEvents]) mPadState = scePadGetState(0, 0); // if (mPadState >= 0 && state <= 7) // scePadStateIntToStr(state, buf); // get error string - if (mPadState == scePadStateDiscon) mPadPhase = 0; // lost pad + if (mPadState == scePadStateDiscon) mPadPhase = 0; // lost pad switch (mPadPhase) { @@ -162,14 +162,14 @@ void PadReadInput(int events[NumPadEvents]) // 2nd step special processing for "standard" controller case 41: - if (scePadGetReqState(0, 0) == scePadReqStateFaild) mPadPhase--; // failed, go back a phase + if (scePadGetReqState(0, 0) == scePadReqStateFaild) mPadPhase--; // failed, go back a phase if (scePadGetReqState(0, 0) == scePadReqStateComplete) - mPadPhase = 0; // completed, go back to beginning to try again + mPadPhase = 0; // completed, go back to beginning to try again break; // 1st step special processing for "analog" controller case 70: - if (scePadInfoAct(0, 0, -1, 0) == 0) mPadPhase = 99; // done + if (scePadInfoAct(0, 0, -1, 0) == 0) mPadPhase = 99; // done mActAlign[0] = 0; mActAlign[1] = 1; for (i = 2; i < 6; i++) @@ -180,7 +180,7 @@ void PadReadInput(int events[NumPadEvents]) // 2nd step special processing for "analog" controller case 71: if (scePadGetReqState(0, 0) == scePadReqStateFaild) mPadPhase--; - if (scePadGetReqState(0, 0) == scePadReqStateComplete) mPadPhase = 99; // finished, jump to end + if (scePadGetReqState(0, 0) == scePadReqStateComplete) mPadPhase = 99; // finished, jump to end case 99: default: diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/CellVectorMath.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/CellVectorMath.h index 5dd632c10d9..e767300870e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/CellVectorMath.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/CellVectorMath.h @@ -10,14 +10,14 @@ class vec_float4 __attribute__((aligned(16))); #else __declspec(align(16)); -#endif // __GNUC__ -#endif // __CELLOS_LV2__ +#endif // __GNUC__ +#endif // __CELLOS_LV2__ #ifdef __CELLOS_LV2__ #include "vectormath_soa.h" #else #include "vectormath_scalar/vectormath_aos.h" -#endif // __CELLOS_LV2__ +#endif // __CELLOS_LV2__ using namespace Vectormath; using namespace Vectormath::Aos; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/PS3Types.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/PS3Types.h index fd0c3c64566..74d76dede5b 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/PS3Types.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/PS3Types.h @@ -3,4 +3,4 @@ //#include "CellVectorMath.h" -#endif // PS3_TYPES_H +#endif // PS3_TYPES_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SPUAssert.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SPUAssert.h index 5edd4483ab3..be9eb30b38d 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SPUAssert.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SPUAssert.h @@ -18,11 +18,11 @@ spu_hcmpeq((cond), 0); \ } \ } while (0) -#else // __CELLOS_LV2__ +#else // __CELLOS_LV2__ #define SPU_ASSERT(cond) assert(cond) -#endif //__CELLOS_LV2__ +#endif //__CELLOS_LV2__ -#else // _DEBUG +#else // _DEBUG #ifdef __CELLOS_LV2__ #include @@ -38,11 +38,11 @@ // Sauce // Later on we'll want no asserts in release builds //#define SPU_ASSERT(cond) do {} while (0) -#else // __CELLOS_LV2__ +#else // __CELLOS_LV2__ #define SPU_ASSERT(cond) assert(cond) -#endif // __CELLOS_LV2__ +#endif // __CELLOS_LV2__ -#endif // _DEBUG +#endif // _DEBUG // Usage: // SPU_COMPILE_TIME_ASSERT(sizeof(MyStructure) <= 128); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuFakeDma.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuFakeDma.h index 7f6b0b622b4..592c543ea92 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuFakeDma.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuFakeDma.h @@ -24,9 +24,9 @@ int cellDmaGet(void* ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, int cellDmaLargePut(const void* ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid); /// cellDmaWaitTagStatusAll Win32 replacements for Cell DMA to allow simulating most of the SPU code (just memcpy) void cellDmaWaitTagStatusAll(int ignore); -#endif // WIN32 +#endif // WIN32 /// stallingUnalignedDmaSmallGet internally uses DMA_TAG(1) int stallingUnalignedDmaSmallGet(void* ls, uint64_t ea, uint32_t size); -#endif // FAKE_DMA_H +#endif // FAKE_DMA_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuSpeexTaskOutput.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuSpeexTaskOutput.h index 89b1a057492..6a2977b7ecb 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuSpeexTaskOutput.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpuSpeexTaskOutput.h @@ -30,4 +30,4 @@ struct SpursSpeexTaskOutput } #endif -#endif //__SPEEX_TASK_OUTPUT_H +#endif //__SPEEX_TASK_OUTPUT_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexCInterface.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexCInterface.h index 83c5fd953d1..352527fcb2b 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexCInterface.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexCInterface.h @@ -51,4 +51,4 @@ int shutdownSpursTask(); } #endif -#endif // SPU_TASK_C_INTERFACE_H +#endif // SPU_TASK_C_INTERFACE_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.cpp b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.cpp index f12d7f7da2e..3bc4f18b9b2 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.cpp +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.cpp @@ -72,7 +72,7 @@ int SpursSpeexTaskManager::initialize() { #ifdef DEBUG_SPU_TASK_SCHEDULING printf("SpuSampleTaskProcess::initialize()\n"); -#endif // DEBUG_SPU_TASK_SCHEDULING +#endif // DEBUG_SPU_TASK_SCHEDULING for (int i = 0; (unsigned int)i < m_maxNumOutstandingTasks; i++) { @@ -184,7 +184,7 @@ int SpursSpeexTaskManager::issueTask(SpursSpeexTaskDesc& taskDesc, uint32_t uiCo { #ifdef DEBUG_SPU_TASK_SCHEDULING printf("SpuSampleTaskProcess::issueTask (m_currentTask= %d\)n", m_currentTask); -#endif // DEBUG_SPU_TASK_SCHEDULING +#endif // DEBUG_SPU_TASK_SCHEDULING // some bookkeeping to recognize finished tasks taskDesc.mTaskId = m_currentTask; @@ -231,7 +231,7 @@ int SpursSpeexTaskManager::flush() { #ifdef DEBUG_SPU_TASK_SCHEDULING printf("\nSpuCollisionTaskProcess::flush()\n"); -#endif // DEBUG_SPU_TASK_SCHEDULING +#endif // DEBUG_SPU_TASK_SCHEDULING // all tasks are issued, wait for all tasks to be complete while (m_numBusyTasks > 0) @@ -248,4 +248,4 @@ int SpursSpeexTaskManager::flush() } return 0; } -#endif // USE_SAMPLE_PROCESS +#endif // USE_SAMPLE_PROCESS diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.h index bb9a33b433d..a4aaeb1c6de 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/SpursSpeexTaskManager.h @@ -39,7 +39,7 @@ struct SpursSpeexTaskDesc int mQuality; int mSamplesPerSecond; int mEncodedFrameSize; - void* mInputBuffer; // make it + void* mInputBuffer; // make it unsigned int mInputBufferSize; SpursSpeexTaskOutput* mSpeexTaskOutput; @@ -112,4 +112,4 @@ class SpursSpeexTaskManager int flush(); }; -#endif // SPU_SAMPLE_TASK_PROCESS_H +#endif // SPU_SAMPLE_TASK_PROCESS_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedAllocator.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedAllocator.h index 0415e2734ea..172bb6e2266 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedAllocator.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedAllocator.h @@ -79,4 +79,4 @@ class spursAlignedAllocator friend bool operator==(const self_type&, const self_type&) { return true; } }; -#endif // BT_ALIGNED_ALLOCATOR +#endif // BT_ALIGNED_ALLOCATOR diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedObjectArray.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedObjectArray.h index 6802525cef0..1224eb0be48 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedObjectArray.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursAlignedObjectArray.h @@ -23,7 +23,7 @@ software. #define BT_OBJECT_ARRAY__ #include "spursAlignedAllocator.h" -#include "spursScalar.h" // has definitions like SIMD_FORCE_INLINE +#include "spursScalar.h" // has definitions like SIMD_FORCE_INLINE /// If the platform doesn't support placement new, you can disable BT_USE_PLACEMENT_NEW /// then the btAlignedObjectArray doesn't support objects with virtual methods, and non-trivial constructors/destructors @@ -33,16 +33,16 @@ software. #define BT_USE_PLACEMENT_NEW 1 //#define BT_USE_MEMCPY 1 //disable, because it is cumbersome to find out for each platform where memcpy is defined. It -//can be in or or otherwise... +// can be in or or otherwise... #ifdef BT_USE_MEMCPY #include #include -#endif // BT_USE_MEMCPY +#endif // BT_USE_MEMCPY #ifdef BT_USE_PLACEMENT_NEW -#include //for placement new -#endif // BT_USE_PLACEMENT_NEW +#include //for placement new +#endif // BT_USE_PLACEMENT_NEW /// btAlignedObjectArray uses a subset of the stl::vector interface for its methods /// It is developed to replace stl::vector to avoid STL alignment issues to add SIMD/SSE data @@ -66,7 +66,7 @@ class spursAlignedObjectArray new (&dest[i]) T(m_data[i]); #else dest[i] = m_data[i]; -#endif // BT_USE_PLACEMENT_NEW +#endif // BT_USE_PLACEMENT_NEW } SIMD_FORCE_INLINE void init() @@ -102,12 +102,12 @@ class spursAlignedObjectArray spursAlignedObjectArray() { init(); } ~spursAlignedObjectArray() { clear(); } SIMD_FORCE_INLINE int capacity() const - { // return current length of allocated storage + { // return current length of allocated storage return m_capacity; } SIMD_FORCE_INLINE int size() const - { // return length of sequence + { // return length of sequence return m_size; } @@ -148,7 +148,7 @@ class spursAlignedObjectArray { new (&m_data[i]) T(fillData); } -#endif // BT_USE_PLACEMENT_NEW +#endif // BT_USE_PLACEMENT_NEW } m_size = newsize; @@ -162,7 +162,7 @@ class spursAlignedObjectArray } m_size++; #ifdef BT_USE_PLACEMENT_NEW - new (&m_data[sz]) T(fillValue); // use the in-place new (not really allocating heap memory) + new (&m_data[sz]) T(fillValue); // use the in-place new (not really allocating heap memory) #endif return m_data[sz]; @@ -179,14 +179,14 @@ class spursAlignedObjectArray new (&m_data[m_size]) T(_Val); #else m_data[size()] = _Val; -#endif // BT_USE_PLACEMENT_NEW +#endif // BT_USE_PLACEMENT_NEW m_size++; } SIMD_FORCE_INLINE void reserve(int _Count) - { // determine new minimum length of allocated storage - if (capacity() < _Count) { // not enough room, reallocate + { // determine new minimum length of allocated storage + if (capacity() < _Count) { // not enough room, reallocate T* s = (T*)allocate(_Count); copy(0, size(), s); @@ -248,7 +248,7 @@ class spursAlignedObjectArray T temp = m_data[index0]; m_data[index0] = m_data[index1]; m_data[index1] = temp; -#endif // BT_USE_PLACEMENT_NEW +#endif // BT_USE_PLACEMENT_NEW } template @@ -282,15 +282,15 @@ class spursAlignedObjectArray // assume sorted array while (first <= last) { - int mid = (first + last) / 2; // compute mid point. + int mid = (first + last) / 2; // compute mid point. if (key > m_data[mid]) - first = mid + 1; // repeat search in top half. + first = mid + 1; // repeat search in top half. else if (key < m_data[mid]) - last = mid - 1; // repeat search in bottom half. + last = mid - 1; // repeat search in bottom half. else - return mid; // found it. return position ///// + return mid; // found it. return position ///// } - return size(); // failed to find key + return size(); // failed to find key } int findLinearSearch(const T& key) const @@ -318,4 +318,4 @@ class spursAlignedObjectArray } }; -#endif // BT_OBJECT_ARRAY__ +#endif // BT_OBJECT_ARRAY__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursConfiguration.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursConfiguration.h index 5525dd7e01c..e86b9f84111 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursConfiguration.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursConfiguration.h @@ -94,4 +94,4 @@ bool spursConfiguration_isSpursInitialized(); } #endif -#endif //__CELL_SPU_CONFIG +#endif //__CELL_SPU_CONFIG diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursPlatformDefinitions.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursPlatformDefinitions.h index 89392fd4103..6a77aaed8ea 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursPlatformDefinitions.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursPlatformDefinitions.h @@ -8,6 +8,6 @@ #include #include -#include //for memcpy +#include //for memcpy -#endif // TYPE_DEFINITIONS_H +#endif // TYPE_DEFINITIONS_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursScalar.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursScalar.h index 442623c5dbe..39a517f3506 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursScalar.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursScalar.h @@ -168,4 +168,4 @@ SIMD_FORCE_INLINE btScalar btFsel(btScalar a, btScalar b, btScalar c) #define btFsels(a,b,c) (btScalar)btFsel(a,b,c) */ -#endif // SIMD___SCALAR_H +#endif // SIMD___SCALAR_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.cpp b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.cpp index 2deefb9f9ed..6f256d4d03c 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.cpp +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.cpp @@ -43,7 +43,7 @@ void* g_SpursTaskElfStart = _binary_spu_SpeexSpursTaskDebug_elf_start; #else extern char _binary_spu_SpeexSpursTaskRelease_elf_start[]; void* g_SpursTaskElfStart = _binary_spu_SpeexSpursTaskRelease_elf_start; -#endif //#ifdef _DEBUG +#endif //#ifdef _DEBUG /* BulletSpursElf _g_aSPURSElfs[]={ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.h index 2c549ef903b..2eec0f2b4f5 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursSupportInterface.h @@ -19,12 +19,12 @@ #if CELL_SDK_VERSION < 0x081000 #define CELL_SPURS_TASK_ERROR_AGAIN CELL_SPURS_EAGAIN #define CELL_SPURS_TASK_ERROR_BUSY CELL_SPURS_EBUSY -#endif // CELL_SDK_VERSION < 0x081000 +#endif // CELL_SDK_VERSION < 0x081000 -#else // __SPU__ +#else // __SPU__ #include -#endif // __SPU__ +#endif // __SPU__ #define CELL_SPURS_RESPONSE_QUEUE_SIZE 128 @@ -104,7 +104,7 @@ static inline void sendResponseToPPUAndExit( cellSpursExit(); } -#elif __PPU__ // not __SPU__ +#elif __PPU__ // not __SPU__ class SpursSupportInterface : public spursThreadSupportInterface { @@ -124,6 +124,6 @@ class SpursSupportInterface : public spursThreadSupportInterface bool m_bQueueInitialized; }; -#endif // __SPU__ / __PPU__ +#endif // __SPU__ / __PPU__ -#endif // CELL_SPURS_SUPPORT_H +#endif // CELL_SPURS_SUPPORT_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursUtilityMacros.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursUtilityMacros.h index a0ec4dedd51..c87a4dd57ad 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursUtilityMacros.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursUtilityMacros.h @@ -8,14 +8,14 @@ #ifdef __SPU__ #define CELL_PPU_POINTER(x) CELL_PPU_PTR_TYPE -#else // __SPU__ +#else // __SPU__ #define CELL_PPU_POINTER(x) x* // Hope we never switch away from 32 bits... // But this is here just in case... // NX_COMPILE_TIME_ASSERT(sizeof(void *)==sizeof(CELL_PPU_PTR_TYPE)); -#endif // __SPU__ -#endif // CELL_PPU_POINTER +#endif // __SPU__ +#endif // CELL_PPU_POINTER #endif // end __CELL_UTILITY_MACROS_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursthreadsupportinterface.h b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursthreadsupportinterface.h index 0c886bdc2bf..91845c71e42 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursthreadsupportinterface.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/SpeexSpursTaskManager/spursthreadsupportinterface.h @@ -42,4 +42,4 @@ class spursThreadSupportInterface virtual int stopSPU() = 0; }; -#endif // THREAD_SUPPORT_INTERFACE_H +#endif // THREAD_SUPPORT_INTERFACE_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsSocketPS3.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsSocketPS3.c index 349781ebbfe..14a03ba7ed3 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsSocketPS3.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsSocketPS3.c @@ -6,7 +6,7 @@ // ToDo: Move this to PS3 implemenation HOSTENT* getlocalhost(void) -{ // Global storage +{ // Global storage #define MAX_IPS 10 static HOSTENT localhost; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsUtilPS3.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsUtilPS3.c index b30bcffeca2..58bfa74361b 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsUtilPS3.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/ps3/gsUtilPS3.c @@ -21,7 +21,7 @@ static const char* GetMAC(void) r = cellNetCtlGetInfo(CELL_NET_CTL_INFO_ETHER_ADDR, &gCellNetInfo); if (r == CELL_OK) { return (const char*)&gCellNetInfo.ether_addr; - } // else error + } // else error return NULL; } @@ -64,4 +64,4 @@ void gsiInt64ToString(char theNumberStr[33], gsi_i64 theNumber) } /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // _PS3 only +#endif // _PS3 only diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsSocketPSP.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsSocketPSP.c index c51285e1a5e..a162980dc60 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsSocketPSP.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsSocketPSP.c @@ -20,7 +20,7 @@ #include "../gsCommon.h" #include "../gsPlatformSocket.h" -#if (0) // enable after remove from platform socket +#if (0) // enable after remove from platform socket int SetSockBlocking(SOCKET sock, int isblocking) { int rcode; @@ -59,7 +59,7 @@ struct hostent* gsSocketGetHostByName(const char* name) // mj taking this off the stack 04/05/06 #define GetHostByNameBufferSize 1024 char* buf = - gsimalloc(GetHostByNameBufferSize); //[GetHostByNameBufferSize]; // PSP documentation recommends 1024 + gsimalloc(GetHostByNameBufferSize); //[GetHostByNameBufferSize]; // PSP documentation recommends 1024 struct in_addr ip; static struct hostent ahostent; @@ -81,7 +81,7 @@ struct hostent* gsSocketGetHostByName(const char* name) } // this will block until completed result = sceNetResolverStartNtoA(resolverID, name, &ip, GSI_RESOLVER_TIMEOUT, GSI_RESOLVER_RETRY); - sceNetResolverDelete(resolverID); // delete right away, result is stored in ip + sceNetResolverDelete(resolverID); // delete right away, result is stored in ip if (result < 0) { gsifree(buf); return NULL; @@ -138,8 +138,8 @@ HOSTENT* getlocalhost(void) } // fill in the hostent structure - addr = inet_addr(info.ip_address); // NBO - memcpy(&ips[0], &addr, sizeof(addr)); // still NBO + addr = inet_addr(info.ip_address); // NBO + memcpy(&ips[0], &addr, sizeof(addr)); // still NBO localhost.h_length = (gsi_u16)sizeof(addr); return &localhost; @@ -164,7 +164,7 @@ int _NetworkAdHocSocketCreate(gsi_u16 port) ret = sceWlanGetEtherAddr(&tmp_local); if (ret < 0) { // Error handling - return -1; // INVALID_SOCKET + return -1; // INVALID_SOCKET } memcpy(&addr, &tmp_local.addr, sizeof(struct SceNetEtherAddr)); #ifdef _PSPNET_LOG @@ -177,7 +177,7 @@ int _NetworkAdHocSocketCreate(gsi_u16 port) if (id < 0) { // SCE_ERROR_NET_ADHOC_INVALID_ADDR // ToDo: Error handling - return -1; // INVALID_SOCKET + return -1; // INVALID_SOCKET } return id; } @@ -194,13 +194,13 @@ void _NetworkAdHocSocketDestroy(int socket) int _NetworkAdHocSocketBroadcast(int socketid, const void* data, int len, int flags, gsi_u16 dest_port) { const static gsi_u8 broadcast_addr[SCE_NET_ETHER_ADDR_LEN] = {0xff}; - int ret = sceNetAdhocPdpSend(socketid, // id Socket ID - broadcast_addr, // daddr Destination MAC address - dest_port, // dport Destination port number - data, // data Pointer to send data - len, // len Length of send data - 10, // timeout Timeout (µsec) - flags // flag Send options + int ret = sceNetAdhocPdpSend(socketid, // id Socket ID + broadcast_addr, // daddr Destination MAC address + dest_port, // dport Destination port number + data, // data Pointer to send data + len, // len Length of send data + 10, // timeout Timeout (µsec) + flags // flag Send options ); // todo: translate return value to GSI specific @@ -210,25 +210,25 @@ int _NetworkAdHocSocketBroadcast(int socketid, const void* data, int len, int fl int _NetworkAdHocSocketSendTo( int socketid, const void* data, int len, int flags, const char* dest_addr, gsi_u16 dest_port) { -#if (0) // test +#if (0) // test const static gsi_u8 broadcast_addr[SCE_NET_ETHER_ADDR_LEN] = {0xff}; - int ret = sceNetAdhocPdpSend(socketid, // id Socket ID - broadcast_addr, // daddr Destination MAC address - dest_port, // dport Destination port number - data, // data Pointer to send data - len, // len Length of send data - 10, // timeout Timeout (µsec) - flags // flag Send options + int ret = sceNetAdhocPdpSend(socketid, // id Socket ID + broadcast_addr, // daddr Destination MAC address + dest_port, // dport Destination port number + data, // data Pointer to send data + len, // len Length of send data + 10, // timeout Timeout (µsec) + flags // flag Send options ); #else - int ret = sceNetAdhocPdpSend(socketid, // id Socket ID - dest_addr, // daddr Destination MAC address - dest_port, // dport Destination port number - data, // data Pointer to send data - len, // len Length of send data - 10, // timeout Timeout (µsec) - flags // flag Send options + int ret = sceNetAdhocPdpSend(socketid, // id Socket ID + dest_addr, // daddr Destination MAC address + dest_port, // dport Destination port number + data, // data Pointer to send data + len, // len Length of send data + 10, // timeout Timeout (µsec) + flags // flag Send options ); #endif #ifdef _PSPNET_LOG @@ -279,22 +279,22 @@ int _NetworkAdHocCanReceiveOnSocket(int socket_id) return 0; } - return stat.rcv_sb_cc; // valid date to read + return stat.rcv_sb_cc; // valid date to read } // return length if successful // <=0 on error int _NetworkAdHocSocketRecv(int socket_id, char* buf, int bufferlen, int flags, - char* saddr, // struct SceNetEtherAddr = char[6]; + char* saddr, // struct SceNetEtherAddr = char[6]; u_int16* sport) { - int ret = sceNetAdhocPdpRecv(socket_id, // id Socket ID - saddr, // saddr Sender’s MAC address - sport, // sport Sender port number - buf, // buf Pointer to receive buffer - &bufferlen, // len Receive buffer size (IN), receive data length (OUT) - 0, // timeout Timeout (µsec) - SCE_NET_ADHOC_F_NONBLOCK // flag Receive options + int ret = sceNetAdhocPdpRecv(socket_id, // id Socket ID + saddr, // saddr Sender’s MAC address + sport, // sport Sender port number + buf, // buf Pointer to receive buffer + &bufferlen, // len Receive buffer size (IN), receive data length (OUT) + 0, // timeout Timeout (µsec) + SCE_NET_ADHOC_F_NONBLOCK // flag Receive options ); // translate return values to gsi standard diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsUtilPSP.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsUtilPSP.c index 14c7a0a6a99..7a99c922493 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsUtilPSP.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/gsUtilPSP.c @@ -11,7 +11,7 @@ static void gsiResolveHostnameThread(void* arg) { int result = 0; int resolverID = 0; - char buf[1024]; // PSP documentation recommends 1024 + char buf[1024]; // PSP documentation recommends 1024 in_addr addr; GSIResolveHostnameHandle* info = (GSIResolveHostnameHandle)arg; @@ -65,7 +65,7 @@ int gsiStartResolvingHostname(const char* hostname, GSIResolveHostnameHandle* ha void gsiCancelResolvingHostname(GSIResolveHostnameHandle handle) { if (0 == handle->finishedResolving) { - sceNetResolverStop(handle->resolverID); // safe to call from separate thread + sceNetResolverStop(handle->resolverID); // safe to call from separate thread gsiCancelThread(handle->threadID); } } @@ -75,7 +75,7 @@ unsigned int gsiGetResolvedIP(GSIResolveHostnameHandle handle) return handle->ip; } -#endif // (GSI_NO_THREADS) +#endif // (GSI_NO_THREADS) /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -139,8 +139,8 @@ gsi_i64 gsiStringToInt64(const char* theNumberStr) // Added for compatibility reasons int ibase = 10; - p = theNumberStr; // p is our scanning pointer - number = 0; // start with zero + p = theNumberStr; // p is our scanning pointer + number = 0; // start with zero // read char c = *p++; @@ -150,7 +150,7 @@ gsi_i64 gsiStringToInt64(const char* theNumberStr) c = *p++; if (c == '-') { - flags |= FL_NEG; // remember minus sign + flags |= FL_NEG; // remember minus sign c = *p++; } // skip sign @@ -248,4 +248,4 @@ void gsiInt64ToString(char theNumberStr[33], gsi_i64 theNumber) } /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // _PSP only +#endif // _PSP only diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/pspcommon.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/pspcommon.c index c4c8acb1f78..72310409914 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/pspcommon.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/psp/pspcommon.c @@ -271,7 +271,7 @@ int gsiPspStartNetworkModules() ret = sceNetApDialogDummyInit(); if (ret < 0) { printf("sceNetApDialogDummyInit() failed. ret = 0x%x\n", ret); - gsiPspnetErrorHandler(serviceToShutDown); // called with 31 + gsiPspnetErrorHandler(serviceToShutDown); // called with 31 return ret; } @@ -280,7 +280,7 @@ int gsiPspStartNetworkModules() ret = sceWlanGetSwitchState(); if (ret == SCE_WLAN_SWITCH_STATE_OFF) { printf("Wireless LAN switch has been turned off.\n"); - gsiPspnetErrorHandler(serviceToShutDown); // called with 63 + gsiPspnetErrorHandler(serviceToShutDown); // called with 63 return ret; } @@ -291,7 +291,7 @@ int gsiPspStartNetworkModules() ret = sceNetApDialogDummyConnect(&gApDialogDummyParam); if (ret < 0) { printf("sceNetApDialogDummyConnect() failed. ret = 0x%x\n", ret); - gsiPspnetErrorHandler(serviceToShutDown); // called with 63 + gsiPspnetErrorHandler(serviceToShutDown); // called with 63 return ret; } @@ -308,7 +308,7 @@ int gsiPspStartNetworkModules() if (ap_dialog_dummy_state.state == SceNetApDialogDummyState_Disconnected) { printf("failed to Join or Get IP addr. error = 0x%x\n", ap_dialog_dummy_state.error_code); - gsiPspnetErrorHandler(serviceToShutDown); // called with 63 + gsiPspnetErrorHandler(serviceToShutDown); // called with 63 return ap_dialog_dummy_state.error_code; } @@ -316,7 +316,7 @@ int gsiPspStartNetworkModules() ret = sceNetApctlGetInfo(SCE_NET_APCTL_INFO_IP_ADDRESS, &apctl_info); if (ret < 0) { printf("sceNetApctlGetInfo() failed. ret = 0x%x\n", ret); - gsiPspnetErrorHandler(serviceToShutDown); // called with 127 + gsiPspnetErrorHandler(serviceToShutDown); // called with 127 return ret; } printf("obtained IP addr: %s\n", apctl_info.ip_address); @@ -368,4 +368,4 @@ int main(int argc, char** argp) /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // _PSP only +#endif // _PSP only diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/gsSocketRevolution.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/gsSocketRevolution.c index bca8d1207e7..9777566b3fb 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/gsSocketRevolution.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/gsSocketRevolution.c @@ -183,4 +183,4 @@ int GSISocketSelect(SOCKET theSocket, int* theReadFlag, int* theWriteFlag, int* /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // _REVOLUTION \ No newline at end of file +#endif // _REVOLUTION \ No newline at end of file diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/revolutionCommon.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/revolutionCommon.c index 6eb97006a93..deffc764a70 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/revolutionCommon.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/revolution/revolutionCommon.c @@ -42,7 +42,7 @@ static void SetDefaultIpConfig(NCDIpConfig* theIpConfig) theIpConfig->useDhcp = TRUE; - theIpConfig->adjust.maxTransferUnit = 1300; // Value can be 1460 depending on network library + theIpConfig->adjust.maxTransferUnit = 1300; // Value can be 1460 depending on network library theIpConfig->adjust.tcpRetransTimeout = 100; theIpConfig->adjust.dhcpRetransCount = 4; } @@ -189,7 +189,7 @@ void main(int argc, char** argv) void* arenaLo; void* arenaHi; - DEMOInit(NULL); // Init the OS, game pad, graphics and video. + DEMOInit(NULL); // Init the OS, game pad, graphics and video. // Initialize heap for socket allocations // Nintendo samples say this must be in MEM2 diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/win32/gsThreadWin32.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/win32/gsThreadWin32.c index 51905e4de41..d4783bc25de 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/win32/gsThreadWin32.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/win32/gsThreadWin32.c @@ -26,9 +26,9 @@ gsi_u32 gsiHasThreadShutdown(GSIThreadID theThreadID) { DWORD result = WaitForSingleObject(theThreadID, 0); if (result == WAIT_ABANDONED || result == WAIT_OBJECT_0) - return 1; // thread is dead + return 1; // thread is dead else - return 0; // keep waiting + return 0; // keep waiting } GSISemaphoreID gsiCreateSemaphore(gsi_i32 theInitialCount, gsi_i32 theMaxCount, char* theName) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/common/x360/gsThreadX360.c b/src/utils/mp_gpprof_server/libraries/gamespy/common/x360/gsThreadX360.c index e0107226e25..93162c35af2 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/common/x360/gsThreadX360.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/common/x360/gsThreadX360.c @@ -26,9 +26,9 @@ gsi_u32 gsiHasThreadShutdown(GSIThreadID theThreadID) { DWORD result = WaitForSingleObject(theThreadID, 0); if (result == WAIT_ABANDONED || result == WAIT_OBJECT_0) - return 1; // thread is dead + return 1; // thread is dead else - return 0; // keep waiting + return 0; // keep waiting } GSISemaphoreID gsiCreateSemaphore(gsi_i32 theInitialCount, gsi_i32 theMaxCount, char* theName) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/darray.c b/src/utils/mp_gpprof_server/libraries/gamespy/darray.c index 848b1750424..0dc4b127c36 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/darray.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/darray.c @@ -12,8 +12,8 @@ #include #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4244) // lines: 202, 260 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4244) // lines: 202, 260 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS #ifdef _MFC_MEM_DEBUG #define _CRTDBG_MAP_ALLOC 1 @@ -28,7 +28,7 @@ #define gsirealloc realloc #include "common/gsAssert.h" #else -#include "nonport.h" //for gsimalloc/realloc/free/GS_ASSERT +#include "nonport.h" //for gsimalloc/realloc/free/GS_ASSERT #endif // STRUCTURES @@ -38,7 +38,7 @@ struct DArrayImplementation int elemsize; int growby; ArrayElementFreeFn elemfreefn; - void* list; // array of elements + void* list; // array of elements }; // PROTOTYPES @@ -59,7 +59,7 @@ static void FreeElement(DArray array, int n) */ static void ArrayGrow(DArray array) { - GS_ASSERT(array->elemsize) // sanity check -mj Oct 31st + GS_ASSERT(array->elemsize) // sanity check -mj Oct 31st array->capacity += array->growby; array->list = gsirealloc(array->list, (size_t)array->capacity * array->elemsize); GS_ASSERT(array->list); @@ -70,7 +70,7 @@ static void ArrayGrow(DArray array) */ static void SetElement(DArray array, const void* elem, int pos) { - GS_ASSERT(array) // safety check -mj Oct 31st + GS_ASSERT(array) // safety check -mj Oct 31st GS_ASSERT(elem) GS_ASSERT(array->elemsize) @@ -171,7 +171,7 @@ void ArrayInsertAt(DArray array, const void* newElem, int n) if (array->count == array->capacity) ArrayGrow(array); array->count++; - if (n < array->count - 1) // if we aren't appending + if (n < array->count - 1) // if we aren't appending memmove(ArrayNth(array, n + 1), ArrayNth(array, n), (size_t)(array->count - 1 - n) * array->elemsize); SetElement(array, newElem, n); } @@ -195,7 +195,7 @@ void ArrayRemoveAt(DArray array, int n) GS_ASSERT(array) GS_ASSERT((n >= 0) && (n < array->count)); - if (n < array->count - 1) // if not last element + if (n < array->count - 1) // if not last element memmove(ArrayNth(array, n), ArrayNth(array, n + 1), (size_t)(array->count - 1 - n) * array->elemsize); array->count--; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/darray.h b/src/utils/mp_gpprof_server/libraries/gamespy/darray.h index 07dfb581e21..0a1f172dda8 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/darray.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/darray.h @@ -223,7 +223,7 @@ void ArrayReplaceAt(DArray array, const void* newElem, int n); */ void ArraySort(DArray array, ArrayCompareFn comparator); -#define NOT_FOUND -1 // returned when a search fails to find the key +#define NOT_FOUND -1 // returned when a search fails to find the key /* ArraySearch * ----------- @@ -301,4 +301,4 @@ void ArraySetDataPtr(DArray array, void* ptr, int count, int capacity); } #endif -#endif //_DARRAY_ +#endif //_DARRAY_ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttp.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttp.h index 8f4d58b6b07..7441f287c0c 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttp.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttp.h @@ -65,52 +65,52 @@ typedef gsi_i32 GHTTPByteCount; // The current state of an http request. //////////////////////////////////////// typedef enum { - GHTTPSocketInit, // Socket creation and initialization. - GHTTPHostLookup, // Resolving hostname to IP (asynchronously if possible). - GHTTPLookupPending, // Asychronous DNS lookup pending. - GHTTPConnecting, // Waiting for socket connect to complete. - GHTTPSecuringSession, // Setup secure channel. - GHTTPSendingRequest, // Sending the request. - GHTTPPosting, // Positing data (skipped if not posting). - GHTTPWaiting, // Waiting for a response. - GHTTPReceivingStatus, // Receiving the response status. - GHTTPReceivingHeaders, // Receiving the headers. - GHTTPReceivingFile // Receiving the file. + GHTTPSocketInit, // Socket creation and initialization. + GHTTPHostLookup, // Resolving hostname to IP (asynchronously if possible). + GHTTPLookupPending, // Asychronous DNS lookup pending. + GHTTPConnecting, // Waiting for socket connect to complete. + GHTTPSecuringSession, // Setup secure channel. + GHTTPSendingRequest, // Sending the request. + GHTTPPosting, // Positing data (skipped if not posting). + GHTTPWaiting, // Waiting for a response. + GHTTPReceivingStatus, // Receiving the response status. + GHTTPReceivingHeaders, // Receiving the headers. + GHTTPReceivingFile // Receiving the file. } GHTTPState; // The result of an http request. ///////////////////////////////// typedef enum { - GHTTPSuccess, // 0: Successfully retrieved file. - GHTTPOutOfMemory, // 1: A memory allocation failed. - GHTTPBufferOverflow, // 2: The user-supplied buffer was too small to hold the file. - GHTTPParseURLFailed, // 3: There was an error parsing the URL. - GHTTPHostLookupFailed, // 4: Failed looking up the hostname. - GHTTPSocketFailed, // 5: Failed to create/initialize/read/write a socket. - GHTTPConnectFailed, // 6: Failed connecting to the http server. - GHTTPBadResponse, // 7: Error understanding a response from the server. - GHTTPRequestRejected, // 8: The request has been rejected by the server. - GHTTPUnauthorized, // 9: Not authorized to get the file. - GHTTPForbidden, // 10: The server has refused to send the file. - GHTTPFileNotFound, // 11: Failed to find the file on the server. - GHTTPServerError, // 12: The server has encountered an internal error. - GHTTPFileWriteFailed, // 13: An error occured writing to the local file (for ghttpSaveFile[Ex]). - GHTTPFileReadFailed, // 14: There was an error reading from a local file (for posting files from disk). - GHTTPFileIncomplete, // 15: Download started but was interrupted. Only reported if file size is known. - GHTTPFileToBig, // 16: The file is to big to be downloaded (size exceeds range of interal data types) - GHTTPEncryptionError, // 17: Error with encryption engine. - GHTTPRequestCancelled // 18: User requested cancel and/or graceful close. + GHTTPSuccess, // 0: Successfully retrieved file. + GHTTPOutOfMemory, // 1: A memory allocation failed. + GHTTPBufferOverflow, // 2: The user-supplied buffer was too small to hold the file. + GHTTPParseURLFailed, // 3: There was an error parsing the URL. + GHTTPHostLookupFailed, // 4: Failed looking up the hostname. + GHTTPSocketFailed, // 5: Failed to create/initialize/read/write a socket. + GHTTPConnectFailed, // 6: Failed connecting to the http server. + GHTTPBadResponse, // 7: Error understanding a response from the server. + GHTTPRequestRejected, // 8: The request has been rejected by the server. + GHTTPUnauthorized, // 9: Not authorized to get the file. + GHTTPForbidden, // 10: The server has refused to send the file. + GHTTPFileNotFound, // 11: Failed to find the file on the server. + GHTTPServerError, // 12: The server has encountered an internal error. + GHTTPFileWriteFailed, // 13: An error occured writing to the local file (for ghttpSaveFile[Ex]). + GHTTPFileReadFailed, // 14: There was an error reading from a local file (for posting files from disk). + GHTTPFileIncomplete, // 15: Download started but was interrupted. Only reported if file size is known. + GHTTPFileToBig, // 16: The file is to big to be downloaded (size exceeds range of interal data types) + GHTTPEncryptionError, // 17: Error with encryption engine. + GHTTPRequestCancelled // 18: User requested cancel and/or graceful close. } GHTTPResult; // Encryption engines typedef enum { GHTTPEncryptionEngine_None, - GHTTPEncryptionEngine_GameSpy, // must add /common/gsSSL.h and /common/gsSSL.c to project - GHTTPEncryptionEngine_MatrixSsl, // must define MATRIXSSL and include matrixssl source files - GHTTPEncryptionEngine_RevoEx, // must define REVOEXSSL and include RevoEX SSL source files + GHTTPEncryptionEngine_GameSpy, // must add /common/gsSSL.h and /common/gsSSL.c to project + GHTTPEncryptionEngine_MatrixSsl, // must define MATRIXSSL and include matrixssl source files + GHTTPEncryptionEngine_RevoEx, // must define REVOEXSSL and include RevoEX SSL source files - GHTTPEncryptionEngine_Default // Will use GameSpy unless another engine is defined - // using MATRIXSSL or REVOEXSSL + GHTTPEncryptionEngine_Default // Will use GameSpy unless another engine is defined + // using MATRIXSSL or REVOEXSSL } GHTTPEncryptionEngine; // Represents an http file request. @@ -164,13 +164,13 @@ typedef struct GHIPost* GHTTPPost; // returns, and should be copied if it needs to be saved. bufferSize // is the number of bytes in the current block of data. ////////////////////////////////////////////////////////////////////////////// -typedef void (*ghttpProgressCallback)(GHTTPRequest request, // The request. - GHTTPState state, // The current state of the request. - const char* buffer, // The file's bytes so far, NULL if state 0); - assert(buffer->fixed == GHTTPFalse); // implied by sizeIncrement > 0 + assert(buffer->fixed == GHTTPFalse); // implied by sizeIncrement > 0 // Check args. ////////////// @@ -118,10 +118,10 @@ GHTTPBool ghiInitFixedBuffer(struct GHIConnection* connection, GHIBuffer* buffer return GHTTPTrue; } -GHTTPBool ghiInitReadOnlyBuffer(struct GHIConnection* connection, // The connection. - GHIBuffer* buffer, // The buffer to init. - const char* userBuffer, // The user-buffer to use. - int size // The size of the buffer. +GHTTPBool ghiInitReadOnlyBuffer(struct GHIConnection* connection, // The connection. + GHIBuffer* buffer, // The buffer to init. + const char* userBuffer, // The user-buffer to use. + int size // The size of the buffer. ) { assert(connection); @@ -139,7 +139,7 @@ GHTTPBool ghiInitReadOnlyBuffer(struct GHIConnection* connection, // The connec // Init the struct. /////////////////// buffer->connection = connection; - buffer->data = (char*)userBuffer; // cast away const + buffer->data = (char*)userBuffer; // cast away const buffer->size = size; buffer->pos = 0; buffer->sizeIncrement = 0; @@ -249,7 +249,7 @@ GHTTPBool ghiEncryptDataToBuffer(GHIBuffer* buffer, const char* data, int dataLe // Get the string length if needed. /////////////////////////////////// if (dataLen == 0) dataLen = (int)strlen(data); - if (dataLen == 0) return GHTTPTrue; // no data and strlen == 0 + if (dataLen == 0) return GHTTPTrue; // no data and strlen == 0 bufSpace = buffer->size - buffer->len; do @@ -397,9 +397,9 @@ GHTTPBool ghiSendBufferedData(struct GHIConnection* connection) } // Read data from a buffer -GHTTPBool ghiReadDataFromBuffer(GHIBuffer* bufferIn, // the GHIBuffer to read from - char bufferOut[], // the raw buffer to write to - int* len // max number of bytes to append, becomes actual length written +GHTTPBool ghiReadDataFromBuffer(GHIBuffer* bufferIn, // the GHIBuffer to read from + char bufferOut[], // the raw buffer to write to + int* len // max number of bytes to append, becomes actual length written ) { int bytesAvailable = 0; @@ -428,9 +428,9 @@ GHTTPBool ghiReadDataFromBuffer(GHIBuffer* bufferIn, // the GHIBuffer to read f } // Read data from a buffer with a garunteed length -GHTTPBool ghiReadDataFromBufferFixed(GHIBuffer* bufferIn, // the GHIBuffer to read from - char bufferOut[], // the raw buffer to write to - int bytesToCopy // number of bytes to read +GHTTPBool ghiReadDataFromBufferFixed(GHIBuffer* bufferIn, // the GHIBuffer to read from + char bufferOut[], // the raw buffer to write to + int bytesToCopy // number of bytes to read ) { // Verify parameters diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpBuffer.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpBuffer.h index 77b8a573614..03e848c849f 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpBuffer.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpBuffer.h @@ -22,40 +22,40 @@ extern "C" { ///////////////// typedef struct GHIBuffer { - struct GHIConnection* connection; // The connection. - char* data; // The actual bytes of data. - int size; // The number of bytes allocated for data. - int len; // The number of actual data bytes filled in. - int pos; // A marker to keep track of position. - int sizeIncrement; // How much to increment the buffer by when needed. - GHTTPBool fixed; // If true, don't resize the buffer. - GHTTPBool dontFree; // Don't free the data when the buffer is cleaned up. - GHTTPBool readOnly; // Read Only, write operations will fail + struct GHIConnection* connection; // The connection. + char* data; // The actual bytes of data. + int size; // The number of bytes allocated for data. + int len; // The number of actual data bytes filled in. + int pos; // A marker to keep track of position. + int sizeIncrement; // How much to increment the buffer by when needed. + GHTTPBool fixed; // If true, don't resize the buffer. + GHTTPBool dontFree; // Don't free the data when the buffer is cleaned up. + GHTTPBool readOnly; // Read Only, write operations will fail } GHIBuffer; // Initializes a buffer and allocates the initial data bytes. // The initialSize and sizeIncrement must both be >0. ///////////////////////////////////////////////////////////// -GHTTPBool ghiInitBuffer(struct GHIConnection* connection, // The connection. - GHIBuffer* buffer, // The buffer to init. - int initialSize, // The initial size of the buffer. - int sizeIncrement // The size increment for the buffer. +GHTTPBool ghiInitBuffer(struct GHIConnection* connection, // The connection. + GHIBuffer* buffer, // The buffer to init. + int initialSize, // The initial size of the buffer. + int sizeIncrement // The size increment for the buffer. ); // Initializes a fixed-size buffer. This will not get resized. /////////////////////////////////////////////////////////////// -GHTTPBool ghiInitFixedBuffer(struct GHIConnection* connection, // The connection. - GHIBuffer* buffer, // The buffer to init. - char* userBuffer, // The user-buffer to use. - int size // The size of the buffer. +GHTTPBool ghiInitFixedBuffer(struct GHIConnection* connection, // The connection. + GHIBuffer* buffer, // The buffer to init. + char* userBuffer, // The user-buffer to use. + int size // The size of the buffer. ); // Initializes a read-only fixed-size buffer. This will not get resized. /////////////////////////////////////////////////////////////// -GHTTPBool ghiInitReadOnlyBuffer(struct GHIConnection* connection, // The connection. - GHIBuffer* buffer, // The buffer to init. - const char* userBuffer, // The user-buffer to use. - int size // The size of the buffer. +GHTTPBool ghiInitReadOnlyBuffer(struct GHIConnection* connection, // The connection. + GHIBuffer* buffer, // The buffer to init. + const char* userBuffer, // The user-buffer to use. + int size // The size of the buffer. ); // Free's a buffer's allocated memory (does @@ -67,9 +67,9 @@ void ghiFreeBuffer(GHIBuffer* buffer); // If data is a NUL-terminated string, 0 can be // used for dataLen to use the length of the string. //////////////////////////////////////////////////// -GHTTPBool ghiAppendDataToBuffer(GHIBuffer* buffer, // The buffer to append to. - const char* data, // The data to append. - int dataLen // The number of bytes of data to append, 0 for NUL-terminated string. +GHTTPBool ghiAppendDataToBuffer(GHIBuffer* buffer, // The buffer to append to. + const char* data, // The data to append. + int dataLen // The number of bytes of data to append, 0 for NUL-terminated string. ); // Appends data to the buffer, wrapped in an SSL record @@ -77,9 +77,9 @@ GHTTPBool ghiAppendDataToBuffer(GHIBuffer* buffer, // The buffer to append to. // used for dataLen to use the length of the string. // Encryption has some size overhead, so call this sparingly. //////////////////////////////////////////////////// -GHTTPBool ghiEncryptDataToBuffer(GHIBuffer* buffer, // The buffer to append to. - const char* data, // The data to append. - int dataLen // The number of bytes of data to append, 0 for NUL-terminated string. +GHTTPBool ghiEncryptDataToBuffer(GHIBuffer* buffer, // The buffer to append to. + const char* data, // The data to append. + int dataLen // The number of bytes of data to append, 0 for NUL-terminated string. ); // Appends a header to the buffer. @@ -87,21 +87,21 @@ GHTTPBool ghiEncryptDataToBuffer(GHIBuffer* buffer, // The buffer to append to. // The header will be added to the buffer as: // : \n ////////////////////////////////////////////////// -GHTTPBool ghiAppendHeaderToBuffer(GHIBuffer* buffer, // The buffer to append to. - const char* name, // The name of the header. - const char* value // The value of the header. +GHTTPBool ghiAppendHeaderToBuffer(GHIBuffer* buffer, // The buffer to append to. + const char* name, // The name of the header. + const char* value // The value of the header. ); // Appends a single character to the buffer. //////////////////////////////////////////// -GHTTPBool ghiAppendCharToBuffer(GHIBuffer* buffer, // The buffer to append to. - int c // The char to append. +GHTTPBool ghiAppendCharToBuffer(GHIBuffer* buffer, // The buffer to append to. + int c // The char to append. ); // Read data from a buffer -GHTTPBool ghiReadDataFromBuffer(GHIBuffer* bufferIn, // the GHIBuffer to read from - char bufferOut[], // the raw buffer to write to - int* len // max number of bytes to append, becomes actual length written +GHTTPBool ghiReadDataFromBuffer(GHIBuffer* bufferIn, // the GHIBuffer to read from + char bufferOut[], // the raw buffer to write to + int* len // max number of bytes to append, becomes actual length written ); // Read a fixed number of bytes from a buffer @@ -109,14 +109,14 @@ GHTTPBool ghiReadDataFromBufferFixed(GHIBuffer* bufferIn, char bufferOut[], int // Converts the int to a string and appends it to the buffer. ///////////////////////////////////////////////////////////// -GHTTPBool ghiAppendIntToBuffer(GHIBuffer* buffer, // The buffer to append to. - int i // The int to append. +GHTTPBool ghiAppendIntToBuffer(GHIBuffer* buffer, // The buffer to append to. + int i // The int to append. ); // Resets a buffer. // Does this by setting both len and pos to 0. ////////////////////////////////////////////// -void ghiResetBuffer(GHIBuffer* buffer // The buffer to reset. +void ghiResetBuffer(GHIBuffer* buffer // The buffer to reset. ); // Sends as much buffer data as it can. diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.c b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.c index 3770ea7e3c6..9eebcc86180 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.c @@ -12,11 +12,11 @@ devsupport@gamespy.com // Disable compiler warnings for issues that are unavoidable. ///////////////////////////////////////////////////////////// -#if defined(_MSC_VER) // DevStudio +#if defined(_MSC_VER) // DevStudio // Level4, "conditional expression is constant". // Occurs with use of the MS provided macro FD_SET #pragma warning(disable : 4127) -#endif // _MSC_VER +#endif // _MSC_VER #ifdef WIN32 // A lock. @@ -191,14 +191,14 @@ GHTTPBool ghiDecryptReceivedData(struct GHIConnection* connection) aReadPos = connection->decodeBuffer.data + connection->decodeBuffer.pos; aReadLen = connection->decodeBuffer.len - connection->decodeBuffer.pos; aWritePos = connection->recvBuffer.data + connection->recvBuffer.len; - aWriteLen = connection->recvBuffer.size - connection->recvBuffer.len; // the amount of room in recvbuffer + aWriteLen = connection->recvBuffer.size - connection->recvBuffer.len; // the amount of room in recvbuffer aResult = (connection->encryptor.mDecryptFunc)( connection, &connection->encryptor, aReadPos, &aReadLen, aWritePos, &aWriteLen); if (aResult == GHIEncryptionResult_BufferTooSmall) { // Make some more room if (GHTTPFalse == ghiResizeBuffer(&connection->recvBuffer, connection->recvBuffer.sizeIncrement)) - return GHTTPFalse; // error + return GHTTPFalse; // error } else if (aResult == GHIEncryptionResult_Error) { @@ -279,7 +279,7 @@ GHIRecvResult ghiDoReceive(GHIConnection* connection, char buffer[], int* buffer if (result == GHIEncryptionResult_Success) rcode = recvLength; else - rcode = -1; // signal termination of connection + rcode = -1; // signal termination of connection } else { @@ -354,7 +354,7 @@ int ghiDoSend(struct GHIConnection* connection, const char* buffer, int len) // Check for an error. ////////////////////// if (result != GHIEncryptionResult_Success) - rcode = -1; // signal termination of connection + rcode = -1; // signal termination of connection else rcode = bytesSent; } @@ -404,7 +404,7 @@ GHITrySendResult ghiTrySendThenBuffer(GHIConnection* connection, const char* buf if (ghiSendBufferedData(connection) == GHTTPFalse) return GHITrySendError; if (connection->sendBuffer.pos >= connection->sendBuffer.len) { ghiResetBuffer(&connection->sendBuffer); - return GHITrySendSent; // everything sent + return GHITrySendSent; // everything sent } return GHITrySendBuffered; } @@ -431,8 +431,8 @@ GHITrySendResult ghiTrySendThenBuffer(GHIConnection* connection, const char* buf } static GHTTPBool ghiParseProxyServer(const char* server, - char** proxyAddress, // [out] the proxy address - unsigned short* proxyPort // [out] the proxy port + char** proxyAddress, // [out] the proxy address + unsigned short* proxyPort // [out] the proxy port ) { char* strPort; @@ -517,4 +517,4 @@ void ghiThrottleSettings(int bufferSize, gsi_time timeDelay) /////////////////////////////////////////////////// #if defined(_MSC_VER) #pragma warning(default : 4127) -#endif // _MSC_VER +#endif // _MSC_VER diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.h index 038b40b9c61..9d7b09fdd60 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpCommon.h @@ -67,10 +67,10 @@ void ghiLogToFile(const char* buffer, int len, const char* fileName); // Possible results from ghiDoReceive. ////////////////////////////////////// typedef enum { - GHIRecvData, // Data was received. - GHINoData, // No data was available. - GHIConnClosed, // The connection was closed. - GHIError // There was a socket error. + GHIRecvData, // Data was received. + GHINoData, // No data was available. + GHIConnClosed, // The connection was closed. + GHIError // There was a socket error. } GHIRecvResult; // Receive some data. @@ -86,9 +86,9 @@ int ghiDoSend(GHIConnection* connection, const char* buffer, int len); // Results for ghtTrySendThenBuffer. //////////////////////////////////// typedef enum { - GHITrySendError, // There was an error sending. - GHITrySendSent, // Everything was sent. - GHITrySendBuffered // Some or all of the data was buffered. + GHITrySendError, // There was an error sending. + GHITrySendSent, // Everything was sent. + GHITrySendBuffered // Some or all of the data was buffered. } GHITrySendResult; // Sends whatever it can on the socket. diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.c b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.c index 176ccc7de0c..9978f65de4a 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.c @@ -129,7 +129,7 @@ GHIConnection* ghiNewConnection(void) connection->throttle = GHTTPFalse; connection->lastThrottleRecv = 0; connection->post = NULL; - connection->maxRecvTime = 500; // Prevent blocking in async mode with systems that never generate WSAEWOULDBLOCK + connection->maxRecvTime = 500; // Prevent blocking in async mode with systems that never generate WSAEWOULDBLOCK connection->proxyOverridePort = GHI_DEFAULT_PORT; connection->proxyOverrideServer = NULL; connection->encryptor.mInterface = NULL; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.h index 7a732889592..f291daf7997 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpConnection.h @@ -52,20 +52,20 @@ extern "C" { // The type of request made. //////////////////////////// typedef enum { - GHIGET, // Buffer the file. - GHISAVE, // Save the file to disk. - GHISTREAM, // Stream the file. - GHIHEAD, // Get just the headers for a request. - GHIPOST // Only posting data (all types can post). + GHIGET, // Buffer the file. + GHISAVE, // Save the file to disk. + GHISTREAM, // Stream the file. + GHIHEAD, // Get just the headers for a request. + GHIPOST // Only posting data (all types can post). } GHIRequestType; // Chunk-reading states. //////////////////////// typedef enum { - CRHeader, // Reading a chunk header. - CRChunk, // Reading chunk (actual content). - CRCRLF, // Reading the CRLF at the end of a chunk. - CRFooter // Reading the footer at the end of the file (chunk with size of 0). + CRHeader, // Reading a chunk header. + CRChunk, // Reading chunk (actual content). + CRCRLF, // Reading the CRLF at the end of a chunk. + CRFooter // Reading the footer at the end of the file (chunk with size of 0). } CRState; // Protocol. @@ -76,85 +76,85 @@ typedef enum { GHIHttp, GHIHttps } GHIProtocol; ///////////////////////////////////////////////// typedef struct GHIConnection { - GHTTPBool inUse; // If true, this connection object is being used. - GHTTPRequest request; // This object's request index. - int uniqueID; // Every connection object has a unqiue ID. + GHTTPBool inUse; // If true, this connection object is being used. + GHTTPRequest request; // This object's request index. + int uniqueID; // Every connection object has a unqiue ID. - GHIRequestType type; // The type of request this connection is for. + GHIRequestType type; // The type of request this connection is for. - GHTTPState state; // The state of the request. + GHTTPState state; // The state of the request. - char* URL; // The URL for the file. - char* serverAddress; // The address of the server as contained in the URL. - unsigned int serverIP; // The server's IP. - unsigned short serverPort; // The server's port. - char* requestPath; // The path as contained in the URL. + char* URL; // The URL for the file. + char* serverAddress; // The address of the server as contained in the URL. + unsigned int serverIP; // The server's IP. + unsigned short serverPort; // The server's port. + char* requestPath; // The path as contained in the URL. - GHIProtocol protocol; // Protocol used for this connection. + GHIProtocol protocol; // Protocol used for this connection. - char* sendHeaders; // Optional headers to pass with the request. + char* sendHeaders; // Optional headers to pass with the request. - FILE* saveFile; // If saving to disk, the file being saved to. + FILE* saveFile; // If saving to disk, the file being saved to. - GHTTPBool blocking; // Blocking flag. + GHTTPBool blocking; // Blocking flag. - GHTTPBool persistConnection; // If TRUE, Connection: close will not be sent in the headers and the connection will - // be left open + GHTTPBool persistConnection; // If TRUE, Connection: close will not be sent in the headers and the connection will + // be left open - GHTTPResult result; // The result of the request. - ghttpProgressCallback progressCallback; // Called periodically with progress updates. - ghttpCompletedCallback completedCallback; // Called when the file has been received. - void* callbackParam; // User-data to be passed to the callbacks. + GHTTPResult result; // The result of the request. + ghttpProgressCallback progressCallback; // Called periodically with progress updates. + ghttpCompletedCallback completedCallback; // Called when the file has been received. + void* callbackParam; // User-data to be passed to the callbacks. - SOCKET socket; // The socket for this connection. - int socketError; // If there was a socket error, the last error code is stored here. + SOCKET socket; // The socket for this connection. + int socketError; // If there was a socket error, the last error code is stored here. - GHIBuffer sendBuffer; // The buffer for outgoing data. - GHIBuffer encodeBuffer; // The buffer for outgoing data. (will be encrypted; only used with https) - GHIBuffer recvBuffer; // The buffer for incoming data. (plain text) - GHIBuffer decodeBuffer; // The buffer for incoming data. (encrypted)(only used with https) + GHIBuffer sendBuffer; // The buffer for outgoing data. + GHIBuffer encodeBuffer; // The buffer for outgoing data. (will be encrypted; only used with https) + GHIBuffer recvBuffer; // The buffer for incoming data. (plain text) + GHIBuffer decodeBuffer; // The buffer for incoming data. (encrypted)(only used with https) - GHIBuffer getFileBuffer; // ghttpGetFile[Ex] uses this buffer (which may be user-supplied). - GHTTPBool userBufferSupplied; // True if a user buffer was supplied. + GHIBuffer getFileBuffer; // ghttpGetFile[Ex] uses this buffer (which may be user-supplied). + GHTTPBool userBufferSupplied; // True if a user buffer was supplied. - int statusMajorVersion; // The major-version number from the server's response. - int statusMinorVersion; // The minor-version number from the server's response. - int statusCode; // The status-code from the server's response. - int statusStringIndex; // Index in the recvBuffer where the status string starts. + int statusMajorVersion; // The major-version number from the server's response. + int statusMinorVersion; // The minor-version number from the server's response. + int statusCode; // The status-code from the server's response. + int statusStringIndex; // Index in the recvBuffer where the status string starts. - int headerStringIndex; // Index in the recvBuffer where the headers begin + int headerStringIndex; // Index in the recvBuffer where the headers begin - GHTTPBool completed; // This connection is completed - call the callback and kill it. + GHTTPBool completed; // This connection is completed - call the callback and kill it. - GHTTPByteCount fileBytesReceived; // Number of file bytes received. - GHTTPByteCount totalSize; // Total size of the file, -1 if unknown. + GHTTPByteCount fileBytesReceived; // Number of file bytes received. + GHTTPByteCount totalSize; // Total size of the file, -1 if unknown. - char* redirectURL; // If this is not NULL, we need to redirect the download to this URL. - int redirectCount; // Number of redirections done for this request. + char* redirectURL; // If this is not NULL, we need to redirect the download to this URL. + int redirectCount; // Number of redirections done for this request. - GHTTPBool chunkedTransfer; // The body of the response is chunky ("Transfer-Encoding: chunked"). - char chunkHeader[CHUNK_HEADER_SIZE + 1]; // Partial chunk headers are stored in here. - int chunkHeaderLen; // The number of bytes in chunkHeader. - int chunkBytesLeft; // Number of bytes left in the chunk (only valid for CRChunk). - CRState chunkReadingState; // Determines if a chunk header or chunk data is being read. + GHTTPBool chunkedTransfer; // The body of the response is chunky ("Transfer-Encoding: chunked"). + char chunkHeader[CHUNK_HEADER_SIZE + 1]; // Partial chunk headers are stored in here. + int chunkHeaderLen; // The number of bytes in chunkHeader. + int chunkBytesLeft; // Number of bytes left in the chunk (only valid for CRChunk). + CRState chunkReadingState; // Determines if a chunk header or chunk data is being read. - GHTTPBool processing; // If true, being processed. Used to prevent recursive processing. - GHTTPBool connectionClosed; // If true, the connection has been closed (orderly or abortive) + GHTTPBool processing; // If true, being processed. Used to prevent recursive processing. + GHTTPBool connectionClosed; // If true, the connection has been closed (orderly or abortive) - GHTTPBool throttle; // If true, throttle this connection. - gsi_time lastThrottleRecv; // The last time we received on a throttled connection. + GHTTPBool throttle; // If true, throttle this connection. + gsi_time lastThrottleRecv; // The last time we received on a throttled connection. - GHTTPPost post; // If not NULL, a reference to a post object to upload with the request. - GHIPostingState postingState; // If posting, the state of the upload. + GHTTPPost post; // If not NULL, a reference to a post object to upload with the request. + GHIPostingState postingState; // If posting, the state of the upload. - gsi_time maxRecvTime; // Max time spent receiving per call to "Think" - Prevents blocking on ultrafast connections - char* proxyOverrideServer; // Allows use of a different proxy than the global proxy + gsi_time maxRecvTime; // Max time spent receiving per call to "Think" - Prevents blocking on ultrafast connections + char* proxyOverrideServer; // Allows use of a different proxy than the global proxy unsigned short proxyOverridePort; struct GHIEncryptor encryptor; #if !defined(GSI_NO_THREADS) - GSIResolveHostnameHandle handle; // handle used for asychronous DNS lookups + GSIResolveHostnameHandle handle; // handle used for asychronous DNS lookups #endif } GHIConnection; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.c b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.c index f95e366c432..4e4e184729e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.c @@ -41,7 +41,7 @@ GHTTPBool ghttpSetRequestEncryptionEngine(GHTTPRequest request, GHTTPEncryptionE if (engine == GHTTPEncryptionEngine_None) { connection->encryptor.mInterface = NULL; - return GHTTPTrue; // this is the default, just return + return GHTTPTrue; // this is the default, just return } else { @@ -125,10 +125,10 @@ GHIEncryptionResult ghiEncryptorSslInitFunc(struct GHIConnection* connection, st helloWrapper.buf = connection->sendBuffer.data; helloWrapper.size = connection->sendBuffer.size; helloWrapper.start = connection->sendBuffer.data + connection->sendBuffer.pos; - helloWrapper.end = helloWrapper.start; // start writing here + helloWrapper.end = helloWrapper.start; // start writing here - ecodeResult = matrixSslEncodeClientHello((ssl_t*)theEncryptor->mInterface, &helloWrapper, 0); // 0 = cipher - if (ecodeResult != 0) return GHIEncryptionResult_Error; // error! + ecodeResult = matrixSslEncodeClientHello((ssl_t*)theEncryptor->mInterface, &helloWrapper, 0); // 0 = cipher + if (ecodeResult != 0) return GHIEncryptionResult_Error; // error! // Adjust the sendBuffer to account for the new data connection->sendBuffer.len += (int)(helloWrapper.end - helloWrapper.start); @@ -153,10 +153,10 @@ GHIEncryptionResult ghiEncryptorSslEncryptFunc(struct GHIConnection* connection, // SSL buffer wrapper // Append to theDecryptedBuffer sslBuf_t encryptedBuf; - encryptedBuf.buf = theEncryptedBuffer; // buf starts here - encryptedBuf.start = theEncryptedBuffer; // readpos, set to start - encryptedBuf.end = theEncryptedBuffer; // writepos, set to start - encryptedBuf.size = *theEncryptedLength; // total size of buf + encryptedBuf.buf = theEncryptedBuffer; // buf starts here + encryptedBuf.start = theEncryptedBuffer; // readpos, set to start + encryptedBuf.end = theEncryptedBuffer; // writepos, set to start + encryptedBuf.size = *theEncryptedLength; // total size of buf // perform the encryption encodeResult = matrixSslEncode( @@ -197,10 +197,10 @@ GHIEncryptionResult ghiEncryptorSslDecryptFunc(struct GHIConnection* connection, inBuf.size = *theEncryptedLength; // Append to theDecryptedBuffer - decryptedBuf.buf = theDecryptedBuffer; // buf starts here - decryptedBuf.start = theDecryptedBuffer; // readpos, set to start - decryptedBuf.end = theDecryptedBuffer; // writepos, set to start - decryptedBuf.size = *theDecryptedLength; // total size of buf + decryptedBuf.buf = theDecryptedBuffer; // buf starts here + decryptedBuf.start = theDecryptedBuffer; // readpos, set to start + decryptedBuf.end = theDecryptedBuffer; // writepos, set to start + decryptedBuf.size = *theDecryptedLength; // total size of buf // Perform the decode operation // - may require multiple tries @@ -240,7 +240,7 @@ GHIEncryptionResult ghiEncryptorSslDecryptFunc(struct GHIConnection* connection, theEncryptor->mSessionEstablished = GHTTPTrue; // Remove the bytes from the decrypted buffer (we don't want to return them to the app) - decryptedBuf.end = decryptedBuf.start; // bug? + decryptedBuf.end = decryptedBuf.start; // bug? break; } @@ -296,7 +296,7 @@ typedef struct gsRevoExInterface SSLId mId; SSLClientCertId mClientCertId; SSLRootCAId mRootCAId; - GHTTPBool mConnected; // means "connected to socket", not "connected to remote machine" + GHTTPBool mConnected; // means "connected to socket", not "connected to remote machine" } gsRevoExInterface; // Init the engine @@ -590,7 +590,7 @@ GHIEncryptionResult ghiEncryptorSslDecryptRecv(struct GHIConnection* connection, GHIEncryptionResult ghiEncryptorSslEncryptFunc(struct GHIConnection* connection, struct GHIEncryptor* theEncryptor, const char* thePlainTextBuffer, int thePlainTextLength, char* theEncryptedBuffer, int* theEncryptedLength) { - GS_FAIL(); // Should never call this for RevoEx SSL! It uses encrypt on send + GS_FAIL(); // Should never call this for RevoEx SSL! It uses encrypt on send GSI_UNUSED(connection); GSI_UNUSED(theEncryptor); @@ -605,7 +605,7 @@ GHIEncryptionResult ghiEncryptorSslEncryptFunc(struct GHIConnection* connection, GHIEncryptionResult ghiEncryptorSslDecryptFunc(struct GHIConnection* connection, struct GHIEncryptor* theEncryptor, const char* theEncryptedBuffer, int* theEncryptedLength, char* theDecryptedBuffer, int* theDecryptedLength) { - GS_FAIL(); // Should never call this for RevoEx SSL! It uses decrypt on recv + GS_FAIL(); // Should never call this for RevoEx SSL! It uses decrypt on recv GSI_UNUSED(connection); GSI_UNUSED(theEncryptor); @@ -643,7 +643,7 @@ static void ghiEncryptorWriteNBOLength(unsigned char* buf, int value, int size) unsigned char* NBOData = (unsigned char*)&NBO; assert(size <= sizeof(NBO)); - if (size > sizeof(NBO)) return; // can't write more than 4 bytes! + if (size > sizeof(NBO)) return; // can't write more than 4 bytes! // this won't work if NBO ever changes from big-endian memcpy(buf, NBOData + (sizeof(int) - size), (size_t)size); @@ -663,7 +663,7 @@ static GHTTPBool ghiEncryptorParseASN1Sequence(GHIBuffer* data, int* lenOut) char tempChar = '\0'; if (GHTTPFalse == ghiReadDataFromBufferFixed(data, &tempChar, 1)) return GHTTPFalse; - if (tempChar != 0x30) // sequence start byte + if (tempChar != 0x30) // sequence start byte return GHTTPFalse; if (GHTTPFalse == ghiReadDataFromBufferFixed(data, &tempChar, 1)) return GHTTPFalse; @@ -708,7 +708,7 @@ static void ghiEncryptorGenerateEncryptionKeys(gsSSL* sslInterface) unsigned char temp[SHA1HashSize]; unsigned int randomSize = 32; - unsigned char keyblock[64]; // todo: support different key sizes + unsigned char keyblock[64]; // todo: support different key sizes // master_secret "A" SHA1Reset(&sha1); @@ -905,7 +905,7 @@ GHIEncryptionResult ghiEncryptorSslStartFunc(struct GHIConnection* connection, s ghiEncryptorWriteNBOLength(helloMsg.lengthNBO, sizeof(gsSSLClientHelloMsg) - sizeof(gsSSLRecordHeaderMsg) - 4, 3); // ghttpEncryptorSetNBOBytesFromHBOInt(helloMsg.time, (gsi_u32)current_time(), 4); // 4 byte time value (for // randomness) - ghiEncryptorWriteNBOLength(helloMsg.time, 0, 4); // test code: no randomness + ghiEncryptorWriteNBOLength(helloMsg.time, 0, 4); // test code: no randomness // fill in the [rest of the] random // Security Note: If a hacker is able to discern the current_time() they may be able to @@ -915,7 +915,7 @@ GHIEncryptionResult ghiEncryptorSslStartFunc(struct GHIConnection* connection, s { #if defined(GS_CRYPT_NO_RANDOM) #pragma message("!!!WARNING: SSL Random disable for debug purposes. SSL not secured!!!") - helloMsg.random[i] = 0; // test code: no randomness + helloMsg.random[i] = 0; // test code: no randomness #else helloMsg.random[i] = (unsigned char)Util_RandInt(0, 0xff); #endif @@ -970,7 +970,7 @@ GHIEncryptionResult ghiEncryptorSslEncryptFunc(struct GHIConnection* connection, // not secured yet, send as plain text if (thePlainTextLength > *theEncryptedLength) return GHIEncryptionResult_BufferTooSmall; memcpy(theEncryptedBuffer, thePlainTextBuffer, (size_t)thePlainTextLength); - *theEncryptedLength += thePlainTextLength; // number of bytes written + *theEncryptedLength += thePlainTextLength; // number of bytes written } else { @@ -1002,17 +1002,17 @@ GHIEncryptionResult ghiEncryptorSslEncryptFunc(struct GHIConnection* connection, MD5Update(&md5, sslInterface->clientWriteMACSecret, (unsigned int)sslInterface->clientWriteMACLen); MD5Update(&md5, (unsigned char*)GS_SSL_PAD_ONE, GS_SSL_MD5_PAD_LEN); MD5Update(&md5, sslInterface->sendSeqNBO, sizeof(sslInterface->sendSeqNBO)); - MD5Update(&md5, (unsigned char*)"\x17", 1); // content type application data + MD5Update(&md5, (unsigned char*)"\x17", 1); // content type application data MD5Update(&md5, (unsigned char*)&lengthNBO, sizeof(lengthNBO)); MD5Update( - &md5, (unsigned char*)thePlainTextBuffer, (unsigned int)thePlainTextLength); // **cast-away const** - MD5Final(MAC, &md5); // first half of MAC + &md5, (unsigned char*)thePlainTextBuffer, (unsigned int)thePlainTextLength); // **cast-away const** + MD5Final(MAC, &md5); // first half of MAC MD5Init(&md5); MD5Update(&md5, sslInterface->clientWriteMACSecret, (unsigned int)sslInterface->clientWriteMACLen); MD5Update(&md5, (unsigned char*)GS_SSL_PAD_TWO, GS_SSL_MD5_PAD_LEN); MD5Update(&md5, MAC, GS_CRYPT_MD5_HASHSIZE); - MD5Final(MAC, &md5); // complete MAC + MD5Final(MAC, &md5); // complete MAC // apply stream cipher to data + MAC RC4Encrypt(&sslInterface->sendRC4, (const unsigned char*)thePlainTextBuffer, @@ -1028,11 +1028,11 @@ GHIEncryptionResult ghiEncryptorSslEncryptFunc(struct GHIConnection* connection, *theEncryptedLength -= pos; // Update the sequence number for the next message (8-byte, NBO) - pos = 7; // **changing the semantic of variable "pos" + pos = 7; // **changing the semantic of variable "pos" do { // int carry = 0; - if (sslInterface->sendSeqNBO[pos] == 0xFF) // wraparound means carry + if (sslInterface->sendSeqNBO[pos] == 0xFF) // wraparound means carry { // carry = 1; sslInterface->sendSeqNBO[pos] = 0; @@ -1041,7 +1041,7 @@ GHIEncryptionResult ghiEncryptorSslEncryptFunc(struct GHIConnection* connection, else { sslInterface->sendSeqNBO[pos] += 1; - pos = 0; // end addition + pos = 0; // end addition } } while (pos >= 0); } @@ -1070,7 +1070,7 @@ GHIEncryptionResult ghiEncryptorSslDecryptFunc(struct GHIConnection* connection, // no encryption set? copy as plain text memcpy(theDecryptedBuffer, theEncryptedBuffer, (size_t)(*theEncryptedLength)); *theDecryptedLength = *theEncryptedLength; - *theEncryptedLength = 0; // no bytes remaining + *theEncryptedLength = 0; // no bytes remaining return GHIEncryptionResult_Success; } @@ -1094,13 +1094,13 @@ GHIEncryptionResult ghiEncryptorSslDecryptFunc(struct GHIConnection* connection, // length = (unsigned short)(header->lengthNBO[0] | (header->lengthNBO[1] << 8)); memcpy(&length, &header->lengthNBO[0], sizeof(length)); length = ntohs(length); - if (*theEncryptedLength < (readPos + length + (int)sizeof(gsSSLRecordHeaderMsg))) break; // wait for more data + if (*theEncryptedLength < (readPos + length + (int)sizeof(gsSSLRecordHeaderMsg))) break; // wait for more data // if we have to decrypt, make sure there is room in the decrypt buffer if (connection->encryptor.mSessionEstablished) { if ((*theDecryptedLength - writePos) < length) { - *theEncryptedLength = readPos; // bytes read *NOT* bytes remaining - *theDecryptedLength = writePos; // bytes written + *theEncryptedLength = readPos; // bytes read *NOT* bytes remaining + *theDecryptedLength = writePos; // bytes written if (*theDecryptedLength > 0) return GHIEncryptionResult_Success; @@ -1130,7 +1130,7 @@ GHIEncryptionResult ghiEncryptorSslDecryptFunc(struct GHIConnection* connection, GSIDebugCat_HTTP, GSIDebugType_Misc, GSIDebugLevel_Debug, "SSL handshake message received\r\n"); result = ghiEncryptorProcessSSLHandshake(connection, theEncryptor, &data); - if (result != GHIEncryptionResult_Success) return result; // error! + if (result != GHIEncryptionResult_Success) return result; // error! break; } @@ -1180,15 +1180,15 @@ GHIEncryptionResult ghiEncryptorSslDecryptFunc(struct GHIConnection* connection, default: readPos += sizeof(gsSSLRecordHeaderMsg); - return GHIEncryptionResult_Error; // unhandled content type + return GHIEncryptionResult_Error; // unhandled content type }; readPos += length; }; // remove read bytes from the stream - *theEncryptedLength = readPos; // bytes read *NOT* bytes remaining - *theDecryptedLength = writePos; // bytes written + *theEncryptedLength = readPos; // bytes read *NOT* bytes remaining + *theDecryptedLength = writePos; // bytes written if (*theEncryptedLength < 0) return GHIEncryptionResult_Error; @@ -1227,18 +1227,18 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( CHECK(ghiReadDataFromBufferFixed(data, &messageType, 1)); if (messageType == GS_SSL_HANDSHAKE_SERVERHELLO) { - int totalMsgLen = 0; // length of header + data - int msgDataLen = 0; // length of data + int totalMsgLen = 0; // length of header + data + int msgDataLen = 0; // length of data int tempInt = 0; char tempChar = '\0'; // make sure we don't have a session already (e.g. dupe hello message) - if (sslInterface->sessionLen != 0) return GHIEncryptionResult_Error; // abort connection + if (sslInterface->sessionLen != 0) return GHIEncryptionResult_Error; // abort connection CHECK(ghiEncryptorReadNBOLength(data, &msgDataLen, 3)); // check reported size against the actual bytes remaining - if (msgDataLen > (data->len - data->pos)) return GHIEncryptionResult_Error; // abort connection + if (msgDataLen > (data->len - data->pos)) return GHIEncryptionResult_Error; // abort connection // skip SSL version // (length check not required because we did that above) @@ -1269,9 +1269,9 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( } else if (messageType == GS_SSL_HANDSHAKE_CERTIFICATE) { - int msgLength = 0; // combined length of the message (size in SSL message header) - int certListLen = 0; // combined length of all certificates - int totalMsgLen = 0; // our calculated msg length (for handshake hashing) + int msgLength = 0; // combined length of the message (size in SSL message header) + int certListLen = 0; // combined length of all certificates + int totalMsgLen = 0; // our calculated msg length (for handshake hashing) int certCount = 0; int certListEndPos = 0; @@ -1301,13 +1301,13 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( CHECK(ghiEncryptorReadNBOLength(data, &certLength, 3)); // Make sure we have enough data to cover this certificate - if (certLength > (data->len - data->pos)) return GHIEncryptionResult_Error; // certificate too big + if (certLength > (data->len - data->pos)) return GHIEncryptionResult_Error; // certificate too big // 0xFFFF is max message size in SSL v3.0, we don't currently support // split messages if (certLength > 0xFFFF) return GHIEncryptionResult_Error; - certStartPos = data->pos; // remember this for a shortcut later + certStartPos = data->pos; // remember this for a shortcut later certCount++; // make a copy of the certificate data @@ -1350,25 +1350,25 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( // Serial Number (variable length, with 2-byte length field) if ((unsigned char)data->data[data->pos++] != 0x02) return GHIEncryptionResult_Error; - temp = (unsigned char)data->data[data->pos++]; // len of serial number + temp = (unsigned char)data->data[data->pos++]; // len of serial number if (data->pos + temp > certListEndPos) return GHIEncryptionResult_Error; - data->pos += temp; // skip the serial number + data->pos += temp; // skip the serial number // Signature algorithm identifier SEQUENCE CHECK(ghiEncryptorParseASN1Sequence(data, &seqLen)); - data->pos += seqLen; // skip algorithm ID (todo: verify signatures) + data->pos += seqLen; // skip algorithm ID (todo: verify signatures) // Issuer Name CHECK(ghiEncryptorParseASN1Sequence(data, &seqLen)); - data->pos += seqLen; // skip the issuer name sequence + data->pos += seqLen; // skip the issuer name sequence // Validity CHECK(ghiEncryptorParseASN1Sequence(data, &seqLen)); - data->pos += seqLen; // skip the validity sequence + data->pos += seqLen; // skip the validity sequence // Subject Name CHECK(ghiEncryptorParseASN1Sequence(data, &seqLen)); - data->pos += seqLen; // skip the subject name sequence + data->pos += seqLen; // skip the subject name sequence // Subject Public Key Info CHECK(ghiEncryptorParseASN1Sequence(data, &seqLen)); @@ -1378,18 +1378,18 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( if ((unsigned char)data->data[data->pos++] != 0x06) return GHIEncryptionResult_Error; if ((unsigned char)data->data[data->pos++] != 0x09) return GHIEncryptionResult_Error; if (0 != memcmp(&data->data[data->pos], gsSslRsaOid, sizeof(gsSslRsaOid))) - return GHIEncryptionResult_Error; // only RSA certs are supported + return GHIEncryptionResult_Error; // only RSA certs are supported data->pos += sizeof(gsSslRsaOid); if ((unsigned char)data->data[data->pos++] != 0x05) return GHIEncryptionResult_Error; if ((unsigned char)data->data[data->pos++] != 0x00) return GHIEncryptionResult_Error; // Bitstring (subject public key) if (2 > (certListEndPos - data->pos)) return GHIEncryptionResult_Error; - if ((unsigned char)data->data[data->pos++] != 0x03) return GHIEncryptionResult_Error; // bitstring + if ((unsigned char)data->data[data->pos++] != 0x03) return GHIEncryptionResult_Error; // bitstring if ((unsigned char)data->data[data->pos++] != 0x81) - return GHIEncryptionResult_Error; // 1 byte len field + return GHIEncryptionResult_Error; // 1 byte len field if (temp > (certListEndPos - data->pos)) return GHIEncryptionResult_Error; - temp = (unsigned char)data->data[data->pos++]; // remaining data size (check or ignore) + temp = (unsigned char)data->data[data->pos++]; // remaining data size (check or ignore) if ((unsigned char)data->data[data->pos++] != 0x00) return GHIEncryptionResult_Error; @@ -1397,8 +1397,8 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( CHECK(ghiEncryptorParseASN1Sequence(data, &seqLen)); // Read out the public key modulus - if (data->data[data->pos++] != 0x02) return GHIEncryptionResult_Error; // integer tag - if ((data->data[data->pos] & 0x80) == 0x80) // ASN1 variable length field + if (data->data[data->pos++] != 0x02) return GHIEncryptionResult_Error; // integer tag + if ((data->data[data->pos] & 0x80) == 0x80) // ASN1 variable length field { int lensize = data->data[data->pos++] & 0x7f; if (lensize > 4) return GHIEncryptionResult_Error; @@ -1411,17 +1411,17 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( temp = (unsigned char)data->data[data->pos++]; } if (data->pos + temp > certListEndPos) return GHIEncryptionResult_Error; - if (data->data[data->pos++] != 0x00) return GHIEncryptionResult_Error; // ignore bits must be 0x00 + if (data->data[data->pos++] != 0x00) return GHIEncryptionResult_Error; // ignore bits must be 0x00 if (temp - 1 > GS_LARGEINT_BINARY_SIZE / sizeof(char)) return GHIEncryptionResult_Error; sslInterface->serverpub.modulus.mLength = (unsigned int)((temp - 1) / - GS_LARGEINT_DIGIT_SIZE_BYTES); //-1 to subtract the previous 0x00 byte + GS_LARGEINT_DIGIT_SIZE_BYTES); //-1 to subtract the previous 0x00 byte gsLargeIntSetFromMemoryStream( &sslInterface->serverpub.modulus, (const gsi_u8*)&data->data[data->pos], (gsi_u32)temp - 1); data->pos += temp - 1; // Read out the public key exponent - if (data->data[data->pos++] != 0x02) return GHIEncryptionResult_Error; // integer + if (data->data[data->pos++] != 0x02) return GHIEncryptionResult_Error; // integer if ((data->data[data->pos] & 0x80) == 0x80) { int lensize = data->data[data->pos++] & 0x7f; if (lensize > 4) return GHIEncryptionResult_Error; @@ -1434,10 +1434,10 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( temp = (unsigned char)data->data[data->pos++]; } if (data->pos + temp > certListEndPos) return GHIEncryptionResult_Error; - if (temp == 0) return GHIEncryptionResult_Error; // no exponent? + if (temp == 0) return GHIEncryptionResult_Error; // no exponent? if (temp > GS_LARGEINT_BINARY_SIZE / sizeof(char)) return GHIEncryptionResult_Error; sslInterface->serverpub.exponent.mLength = - (unsigned int)(((temp - 1) / GS_LARGEINT_DIGIT_SIZE_BYTES) + 1); // ceiling of temp/4 + (unsigned int)(((temp - 1) / GS_LARGEINT_DIGIT_SIZE_BYTES) + 1); // ceiling of temp/4 gsLargeIntSetFromMemoryStream( &sslInterface->serverpub.exponent, (const gsi_u8*)&data->data[data->pos], (gsi_u32)temp); data->pos += temp; @@ -1448,7 +1448,7 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( GSI_UNUSED(version); } - if (data->pos != certListEndPos) return GHIEncryptionResult_Error; // bytes hanging off the end! + if (data->pos != certListEndPos) return GHIEncryptionResult_Error; // bytes hanging off the end! // todo: verify certificate chain // first certificate is the server's, the rest likely belong to CA @@ -1509,10 +1509,10 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( #pragma message("!!!WARNING: SSL Random disable for debug purposes. SSL not secured!!!") // Use zero as the random so we can packet sniff for debug // warning! : this compromises the SSL security - sslInterface->premastersecret[i] = 0; // rand() + sslInterface->premastersecret[i] = 0; // rand() #else Util_RandSeed(current_time()); - sslInterface->premastersecret[i] = (unsigned char)(Util_RandInt(0, 0x0100)); // range = [0...FF] + sslInterface->premastersecret[i] = (unsigned char)(Util_RandInt(0, 0x0100)); // range = [0...FF] #endif } @@ -1545,9 +1545,9 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( changeCipherSpec->versionMajor = GS_SSL_VERSION_MAJOR; changeCipherSpec->versionMinor = GS_SSL_VERSION_MINOR; changeCipherSpec->lengthNBO[0] = 0; - changeCipherSpec->lengthNBO[1] = 1; // always one byte length + changeCipherSpec->lengthNBO[1] = 1; // always one byte length connection->sendBuffer.len += sizeof(gsSSLRecordHeaderMsg); - connection->sendBuffer.data[connection->sendBuffer.len++] = 0x01; // always set to 0x01 + connection->sendBuffer.data[connection->sendBuffer.len++] = 0x01; // always set to 0x01 // DO NOT add it to the running handshake hash (its content is not GS_SSL_CONTENT_HANDSHAKE) // Calculate the encryption keys @@ -1559,7 +1559,7 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( finalHandshake->versionMajor = GS_SSL_VERSION_MAJOR; finalHandshake->versionMinor = GS_SSL_VERSION_MINOR; finalHandshake->lengthNBO[0] = 0; - finalHandshake->lengthNBO[1] = 56; // handshake type(1)+handshake lenNBO(3)+SHA1(20)+MD5(16)+MAC(16) + finalHandshake->lengthNBO[1] = 56; // handshake type(1)+handshake lenNBO(3)+SHA1(20)+MD5(16)+MAC(16) connection->sendBuffer.len += sizeof(gsSSLRecordHeaderMsg); connection->sendBuffer.data[connection->sendBuffer.len++] = GS_SSL_HANDSHAKE_FINISHED; ghiEncryptorWriteNBOLength((unsigned char*)&connection->sendBuffer.data[connection->sendBuffer.len], 36, 3); @@ -1614,15 +1614,15 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( temp[2] = (unsigned char)((GS_CRYPT_MD5_HASHSIZE + GS_CRYPT_SHA1_HASHSIZE + 4)); // temp[1] = (unsigned char)(htons(GS_CRYPT_MD5_HASHSIZE+GS_CRYPT_SHA1_HASHSIZE)); // temp[2] = (unsigned char)(htons(GS_CRYPT_MD5_HASHSIZE+GS_CRYPT_SHA1_HASHSIZE+4)>>8); - temp[3] = 0x14; // 20-bytes of data (MD5+SHA1) - temp[4] = 0x00; // 3-byte length NBO - temp[5] = 0x00; // .. - temp[6] = 0x24; // .. + temp[3] = 0x14; // 20-bytes of data (MD5+SHA1) + temp[4] = 0x00; // 3-byte length NBO + temp[5] = 0x00; // .. + temp[6] = 0x24; // .. MD5Update(&sslInterface->finishHashMD5, (unsigned char*)&temp, 7); - MD5Update(&sslInterface->finishHashMD5, hashTempMD5, GS_CRYPT_MD5_HASHSIZE); // content part 1 - MD5Update(&sslInterface->finishHashMD5, hashTempSHA1, GS_CRYPT_SHA1_HASHSIZE); // content part 2 + MD5Update(&sslInterface->finishHashMD5, hashTempMD5, GS_CRYPT_MD5_HASHSIZE); // content part 1 + MD5Update(&sslInterface->finishHashMD5, hashTempSHA1, GS_CRYPT_SHA1_HASHSIZE); // content part 2 MD5Final(hashTempMD5, &sslInterface->finishHashMD5); - MD5Init(&sslInterface->finishHashMD5); // reset for outer hash + MD5Init(&sslInterface->finishHashMD5); // reset for outer hash MD5Update(&sslInterface->finishHashMD5, (unsigned char*)sslInterface->clientWriteMACSecret, GS_CRYPT_MD5_HASHSIZE); MD5Update(&sslInterface->finishHashMD5, (unsigned char*)GS_SSL_PAD_TWO, GS_SSL_MD5_PAD_LEN); @@ -1652,7 +1652,7 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( { gsDebugFormat(GSIDebugCat_HTTP, GSIDebugType_Network, GSIDebugLevel_WarmError, "SSL received unexpected handshake message type: %d\r\n", messageType); - return GHIEncryptionResult_Error; // abort connection + return GHIEncryptionResult_Error; // abort connection } } @@ -1661,13 +1661,13 @@ GHIEncryptionResult ghiEncryptorProcessSSLHandshake( if (data->pos == data->len) return GHIEncryptionResult_Success; else - return GHIEncryptionResult_Error; // too many or too few bytes, protocol error! + return GHIEncryptionResult_Error; // too many or too few bytes, protocol error! } GHIEncryptionResult ghiEncryptorSslEncryptSend(struct GHIConnection* connection, struct GHIEncryptor* theEncryptor, const char* thePlainTextBuffer, int thePlainTextLength, int* theBytesSentOut) { - GS_FAIL(); // Should never call this for GameSpy SSL! It uses encrypt on buffer + GS_FAIL(); // Should never call this for GameSpy SSL! It uses encrypt on buffer GSI_UNUSED(connection); GSI_UNUSED(theEncryptor); @@ -1681,7 +1681,7 @@ GHIEncryptionResult ghiEncryptorSslEncryptSend(struct GHIConnection* connection, GHIEncryptionResult ghiEncryptorSslDecryptRecv(struct GHIConnection* connection, struct GHIEncryptor* theEncryptor, char* theDecryptedBuffer, int* theDecryptedLength) { - GS_FAIL(); // Should never call this for GameSpy SSL! It uses decrypt on buffer + GS_FAIL(); // Should never call this for GameSpy SSL! It uses decrypt on buffer GSI_UNUSED(connection); GSI_UNUSED(theEncryptor); @@ -1693,4 +1693,4 @@ GHIEncryptionResult ghiEncryptorSslDecryptRecv(struct GHIConnection* connection, /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // encryption engine switch +#endif // encryption engine switch diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.h index 2d3ae4d8712..b1cb67867da 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpEncryption.h @@ -12,21 +12,21 @@ // Encryption method typedef enum { GHIEncryptionMethod_None, - GHIEncryptionMethod_Encrypt, // encrypt raw data written to buffer - GHIEncryptionMethod_Decrypt // decrypt raw data written to buffer + GHIEncryptionMethod_Encrypt, // encrypt raw data written to buffer + GHIEncryptionMethod_Decrypt // decrypt raw data written to buffer } GHIEncryptionMethod; // Encryption results typedef enum { GHIEncryptionResult_None, - GHIEncryptionResult_Success, // successfully encrypted/decrypted - GHIEncryptionResult_BufferTooSmall, // buffer was too small to hold converted data - GHIEncryptionResult_Error // some other kind of error + GHIEncryptionResult_Success, // successfully encrypted/decrypted + GHIEncryptionResult_BufferTooSmall, // buffer was too small to hold converted data + GHIEncryptionResult_Error // some other kind of error } GHIEncryptionResult; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -struct GHIEncryptor; // forward declare for callbacks +struct GHIEncryptor; // forward declare for callbacks struct GHIConnection; // Called to init the encryption engine @@ -49,34 +49,34 @@ typedef GHIEncryptionResult (*GHTTPEncryptorCleanupFunc)( // - entire plain text buffer will be encrypted typedef GHIEncryptionResult (*GHTTPEncryptorEncryptFunc)(struct GHIConnection* theConnection, struct GHIEncryptor* theEncryptor, const char* thePlainTextBuffer, - int thePlainTextLength, // [in] + int thePlainTextLength, // [in] char* theEncryptedBuffer, - int* theEncryptedLength); // [in/out] + int* theEncryptedLength); // [in/out] // Called when data needs to be decrypted // - encrypted data may be left in the buffer // - decrypted buffer is appended to, not overwritten typedef GHIEncryptionResult (*GHTTPEncryptorDecryptFunc)(struct GHIConnection* theConnection, struct GHIEncryptor* theEncryptor, const char* theEncryptedBuffer, - int* theEncryptedLength, // [in/out] + int* theEncryptedLength, // [in/out] char* theDecryptedBuffer, - int* theDecryptedLength); // [in/out] + int* theDecryptedLength); // [in/out] /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// typedef struct GHIEncryptor { - void* mInterface; // only SSL is currently supported + void* mInterface; // only SSL is currently supported GHTTPEncryptionEngine mEngine; GHTTPBool mInitialized; - GHTTPBool mSessionStarted; // handshake started? - GHTTPBool mSessionEstablished; // handshake completed? + GHTTPBool mSessionStarted; // handshake started? + GHTTPBool mSessionEstablished; // handshake completed? // (As coded, these two are exclusive!) // pattern 1 = manually encrypt the buffer, then send using normal socket functions // pattern 2 = send plain text through the encryption engine, it will send - GHTTPBool mEncryptOnBuffer; // engine encrypts when writing to a buffer? (pattern 1) - GHTTPBool mEncryptOnSend; // engine encrypts when sending over socket? (pattern 2) + GHTTPBool mEncryptOnBuffer; // engine encrypts when writing to a buffer? (pattern 1) + GHTTPBool mEncryptOnSend; // engine encrypts when sending over socket? (pattern 2) // If GHTTPTrue, the SSL library handles sending/receiving handshake messages GHTTPBool mLibSendsHandshakeMessages; @@ -84,7 +84,7 @@ typedef struct GHIEncryptor // Functions for engine use GHTTPEncryptorInitFunc mInitFunc; GHTTPEncryptorCleanupFunc mCleanupFunc; - GHTTPEncryptorStartFunc mStartFunc; // start the handshake process + GHTTPEncryptorStartFunc mStartFunc; // start the handshake process GHTTPEncryptorEncryptFunc mEncryptFunc; GHTTPEncryptorDecryptFunc mDecryptFunc; } GHIEncryptor; @@ -108,4 +108,4 @@ GHIEncryptionResult ghiEncryptorSslDecryptRecv(struct GHIConnection* connection, /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __GHTTPENCRYPTION_H__ +#endif // __GHTTPENCRYPTION_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpMain.c b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpMain.c index e23bccacd54..2f9f389762a 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpMain.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpMain.c @@ -49,13 +49,13 @@ static void ghiHandleStatus(GHIConnection* connection) ///////////////////////// switch (connection->statusCode / 100) { - case 1: // Informational. + case 1: // Informational. return; - case 2: // Successful. + case 2: // Successful. return; - case 3: // Redirection. + case 3: // Redirection. return; - case 4: // Client Error. + case 4: // Client Error. switch (connection->statusCode) { case 401: connection->result = GHTTPUnauthorized; break; @@ -65,7 +65,7 @@ static void ghiHandleStatus(GHIConnection* connection) default: connection->result = GHTTPRequestRejected; break; } return; - case 5: // Internal Server Error. + case 5: // Internal Server Error. connection->result = GHTTPServerError; return; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.c b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.c index 14cda018a83..5bc886eda22 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.c @@ -9,8 +9,8 @@ devsupport@gamespy.com */ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4267) // lines: 1334, 1344, 1400, 1410 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4267) // lines: 1334, 1344, 1400, 1410 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS #include "ghttpPost.h" #include "ghttpCommon.h" @@ -34,7 +34,7 @@ devsupport@gamespy.com // DIME header settings // first byte is a combination of VERSION + first/last/chunked -#define GHI_DIME_VERSION (0x1 << 3) // 5th bit (from the left) +#define GHI_DIME_VERSION (0x1 << 3) // 5th bit (from the left) #define GHI_DIMEFLAG_FIRSTRECORD (1 << 2) #define GHI_DIMEFLAG_LASTRECORD (1 << 1) #define GHI_DIMEFLAG_CHUNKED (1 << 0) @@ -43,7 +43,7 @@ devsupport@gamespy.com #define GHI_DIMETYPE_T_MEDIA (0x1 << 4) #define GHI_DIMETYPE_T_URI (0x2 << 4) #define GHI_DIMETYPE_T_UNKNOWN (0x3 << 4) -#define GHI_DIMETYPE_T_EMPTY (0x4 << 4) // lengths must be set to 0 +#define GHI_DIMETYPE_T_EMPTY (0x4 << 4) // lengths must be set to 0 //#define GHI_DIME_SOAPID "gsi:soap" #define GHI_DIME_SOAPID "cid:id0" @@ -66,10 +66,10 @@ typedef struct GSIDimeHeader // POST TYPES. ////////////// typedef enum { - GHIString, // A regular string. - GHIFileDisk, // A file from disk. - GHIFileMemory, // A file from memory. - GHIXmlData // XML Soap. (long string) + GHIString, // A regular string. + GHIFileDisk, // A file from disk. + GHIFileMemory, // A file from memory. + GHIXmlData // XML Soap. (long string) } GHIPostDataType; // POST OBJECT. @@ -472,17 +472,17 @@ static int ghiPostGetNoFilesContentLength(struct GHIConnection* connection) total += (int)strlen(data->name); total += data->data.string.len; total += (data->data.string.extendedChars * 2); - total++; // '=' + total++; // '=' } else if (data->type == GHIXmlData) { - GS_ASSERT(foundSoapAlready == 0); // only support one soap object per request + GS_ASSERT(foundSoapAlready == 0); // only support one soap object per request foundSoapAlready = 1; total += gsXmlWriterGetDataLength(data->data.xml.xml); } } - total += (num - 1); // '&' + total += (num - 1); // '&' GSI_UNUSED(foundSoapAlready); return total; @@ -516,9 +516,9 @@ static int ghiPostGetHasFilesContentLength(struct GHIConnection* connection) { GS_ASSERT(!post->hasSoap); boundaryLen = (int)strlen(GHI_MULTIPART_BOUNDARY_BASE); - stringBaseLen = (boundaryLen + 47); // + name + string - fileBaseLen = (boundaryLen + 76); // + name + filename + content-type + file - xmlBaseLen = 0; // no boundaries for text/xml type soap + stringBaseLen = (boundaryLen + 47); // + name + string + fileBaseLen = (boundaryLen + 76); // + name + filename + content-type + file + xmlBaseLen = 0; // no boundaries for text/xml type soap endLen = (boundaryLen + 4); } } @@ -584,8 +584,8 @@ static int ghiPostGetHasFilesContentLength(struct GHIConnection* connection) { int padBytes = 0; - GS_ASSERT(foundSoapAlready == 0); // only one soap envelope per request - GS_ASSERT(post->useDIME); // soap+file = use DIME + GS_ASSERT(foundSoapAlready == 0); // only one soap envelope per request + GS_ASSERT(post->useDIME); // soap+file = use DIME foundSoapAlready = 1; total += xmlBaseLen; total += gsXmlWriterGetDataLength(data->data.xml.xml); @@ -924,7 +924,7 @@ static GHIPostingResult ghiPostXmlStateDoPosting(GHIPostState* state, GHIConnect connection->encryptor.mEncryptOnBuffer == GHTTPTrue) { // Copy to encode buffer before encrypting - GS_ASSERT(connection->encodeBuffer.len >= 0); // there must be a header for this soap data! + GS_ASSERT(connection->encodeBuffer.len >= 0); // there must be a header for this soap data! if (!ghiAppendDataToBuffer(&connection->encodeBuffer, gsXmlWriterGetData(xml), gsXmlWriterGetDataLength(xml)) || !ghiAppendDataToBuffer(&connection->encodeBuffer, pad, padlen) || !ghiEncryptDataToBuffer( @@ -1056,7 +1056,7 @@ static GHIPostingResult ghiPostFileMemoryStateDoPosting(GHIPostState* state, GHI return GHIPostingDone; } } while (rcode); - return GHIPostingPosting; // (rcode == 0) ? + return GHIPostingPosting; // (rcode == 0) ? } else { @@ -1401,7 +1401,7 @@ GHIPostingResult ghiPostDoPosting(struct GHIConnection* connection) // -- for example, when posting string data we don't encrypt until we have the entire string (for efficiency only) if (connection->encryptor.mEngine != GHTTPEncryptionEngine_None) { if (connection->encodeBuffer.len > 0) { - GS_ASSERT(connection->encodeBuffer.pos == 0); // if you hit this, it means you forgot the clear the buffer + GS_ASSERT(connection->encodeBuffer.pos == 0); // if you hit this, it means you forgot the clear the buffer if (GHTTPFalse == ghiEncryptDataToBuffer( &connection->sendBuffer, connection->encodeBuffer.data, connection->encodeBuffer.len)) { diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.h index b96529c7b79..156233db06e 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpPost.h @@ -29,8 +29,8 @@ typedef struct GHIPostingState int totalBytes; ghttpPostCallback callback; void* param; - GHTTPBool waitPostContinue; // does DIME need to wait for continue? - GHTTPBool completed; // prevent re-post in the event of a redirect. + GHTTPBool waitPostContinue; // does DIME need to wait for continue? + GHTTPBool completed; // prevent re-post in the event of a redirect. } GHIPostingState; GHTTPPost ghiNewPost(void); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpProcess.c b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpProcess.c index 5f233a56e39..aa9901c3726 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpProcess.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpProcess.c @@ -9,9 +9,9 @@ devsupport@gamespy.com */ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4244) // lines: 980, 1202, 1207, 1298, 1447, 1451 -#pragma warning(disable : 4267) // lines: 1071 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4244) // lines: 980, 1202, 1207, 1298, 1447, 1451 +#pragma warning(disable : 4267) // lines: 1071 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS #include "ghttpProcess.h" #include "ghttpCallbacks.h" @@ -190,7 +190,7 @@ void ghiDoHostLookup(GHIConnection* connection) // Check for using a proxy. /////////////////////////// - if (connection->proxyOverrideServer) // request specific proxy + if (connection->proxyOverrideServer) // request specific proxy server = connection->proxyOverrideServer; else if (ghiProxyAddress) server = ghiProxyAddress; @@ -456,7 +456,7 @@ void ghiDoSecuringSession(GHIConnection* connection) // Continue to send and receive handshake messages until the session has been secured // Send any session messages if (connection->sendBuffer.pos < connection->sendBuffer.len) { - if (!ghiSendBufferedData(connection)) return; // Todo: handle error? + if (!ghiSendBufferedData(connection)) return; // Todo: handle error? // Check for data still buffered. ///////////////////////////////// @@ -785,11 +785,11 @@ static GHTTPBool ghiParseStatus(GHIConnection* connection) // Check what we got. ///////////////////// - if ((rcode != 3) || // Not all fields read. + if ((rcode != 3) || // Not all fields read. //!*statusString || // No status string. PANTS|9.16.02 - apparently some servers don't return a status string - (majorVersion < 1) || // Major version is less than 1. - (statusCode < 100) || // 1xx is lowest status code. - (statusCode >= 600)) // 5xx is highest status code. + (majorVersion < 1) || // Major version is less than 1. + (statusCode < 100) || // 1xx is lowest status code. + (statusCode >= 600)) // 5xx is highest status code. { connection->completed = GHTTPTrue; connection->result = GHTTPBadResponse; @@ -890,7 +890,7 @@ void ghiDoReceivingStatus(GHIConnection* connection) if (connection->statusCode == 100 && connection->postingState.waitPostContinue) { // DIME uploads must wait for initial continue before posting connection->postingState.waitPostContinue = GHTTPFalse; - ghiResetBuffer(&connection->recvBuffer); // clear the continue + ghiResetBuffer(&connection->recvBuffer); // clear the continue connection->state = GHTTPPosting; ghiCallProgressCallback(connection, NULL, 0); @@ -1266,7 +1266,7 @@ void ghiDoReceivingHeaders(GHIConnection* connection) } if (!endOfHeaders) { endOfHeaders = - strstr(headers, "\xA\xA"); // some servers seem to use LFs only?! Seen in 302 redirect. (28may01/bgw) + strstr(headers, "\xA\xA"); // some servers seem to use LFs only?! Seen in 302 redirect. (28may01/bgw) } if (endOfHeaders) { char* fileStart; @@ -1406,9 +1406,9 @@ void ghiDoReceivingHeaders(GHIConnection* connection) // Verify that the download size is something we can handle /////////////////////////////////////////////////////////// #if (GSI_MAX_INTEGRAL_BITS >= 64) - char szMaxSize[] = "9223372036854775807"; // == GSI_MAX_I64 + char szMaxSize[] = "9223372036854775807"; // == GSI_MAX_I64 #else - char szMaxSize[] = "2147483647"; // == GSI_MAX_I32 + char szMaxSize[] = "2147483647"; // == GSI_MAX_I32 #endif char* pStart = contentLength + 16; char* pEnd = pStart; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpc/ghttpc.c b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpc/ghttpc.c index 58a87723690..519ce0f86ff 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpc/ghttpc.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpc/ghttpc.c @@ -43,7 +43,7 @@ static gsi_char* resultStrings[] = {_T("GHTTPSuccess"), _T("GHTTPOutOfMemory"), _T("GHTTPFileNotFound"), _T("GHTTPServerError"), _T("GHTTPFileWriteFailed"), _T("GHTTPFileReadFailed"), _T("GHTTPFileIncomplete"), _T("GHTTPFileToBig"), _T("GHTTPEncryptionError"), _T("GHTTPRequestCancelled")}; -#ifdef __MWERKS__ // CodeWarrior will warn if function not prototyped +#ifdef __MWERKS__ // CodeWarrior will warn if function not prototyped int test_main(int argc, char** argv); #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/StdAfx.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/StdAfx.h index 614e8dbf5e0..abb6fc339b8 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/StdAfx.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/StdAfx.h @@ -8,20 +8,20 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers -#include // MFC support for Internet Explorer 4 Common Controls -#include // MFC extensions -#include // MFC core and standard components +#include // MFC support for Internet Explorer 4 Common Controls +#include // MFC extensions +#include // MFC core and standard components #ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT #include "../ghttp.h" //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_STDAFX_H__5ED40F92_A7FA_40E2_B911_E0DA573FB72A__INCLUDED_) +#endif // !defined(AFX_STDAFX_H__5ED40F92_A7FA_40E2_B911_E0DA573FB72A__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.h index 34090f4b2ef..69458bad9b4 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.h @@ -6,13 +6,13 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif -#include "resource.h" // main symbols +#include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CGhttpmfcApp: @@ -45,4 +45,4 @@ class CGhttpmfcApp : public CWinApp //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_GHTTPMFC_H__30518F92_6CEC_4512_AC74_EF31A5DE2D1C__INCLUDED_) +#endif // !defined(AFX_GHTTPMFC_H__30518F92_6CEC_4512_AC74_EF31A5DE2D1C__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.rc b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.rc index 406c94f4752..39fea160ca8 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.rc +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfc.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 +#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -53,7 +53,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US "#endif\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -125,7 +125,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US "1, 0, 0, 1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END -#endif // !_MAC +#endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // @@ -135,9 +135,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_GHTTPMFC_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 313 TOPMARGIN, 7 BOTTOMMARGIN, 255 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -155,10 +155,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE 9, 1 #pragma code_page(1252) -#endif //_WIN32 -#include "afxres.rc" // Standard components -#include "res\ghttpmfc.rc2" // non-Microsoft Visual C++ edited resources +#endif //_WIN32 +#include "afxres.rc" // Standard components +#include "res\ghttpmfc.rc2" // non-Microsoft Visual C++ edited resources #endif ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.cpp b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.cpp index 1eecbf00000..50b4b9a6089 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.cpp +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.cpp @@ -117,14 +117,14 @@ BOOL CGhttpmfcDlg::OnInitDialog() // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog - SetIcon(m_hIcon, TRUE); // Set big icon - SetIcon(m_hIcon, FALSE); // Set small icon + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon m_request = -1; m_memFile = NULL; SetTimer(50, 50, NULL); - return TRUE; // return TRUE unless you set the focus to a control + return TRUE; // return TRUE unless you set the focus to a control } // If you add a minimize button to your dialog, you will need the code below @@ -134,7 +134,7 @@ BOOL CGhttpmfcDlg::OnInitDialog() void CGhttpmfcDlg::OnPaint() { if (IsIconic()) { - CPaintDC dc(this); // device context for painting + CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM)dc.GetSafeHdc(), 0); @@ -447,7 +447,7 @@ void CGhttpmfcDlg::OnIeSettings() else { nStart = -1; - nEnd = 0; // won't be used; need to initialize to prevent compiler warning + nEnd = 0; // won't be used; need to initialize to prevent compiler warning } if ((nStart != -1) && (nStart != nEnd)) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.h b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.h index 1a660a7f636..90f44a74fac 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/ghttp/ghttpmfc/ghttpmfcDlg.h @@ -6,7 +6,7 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// // CGhttpmfcDlg dialog @@ -15,7 +15,7 @@ class CGhttpmfcDlg : public CDialog { // Construction public: - CGhttpmfcDlg(CWnd* pParent = NULL); // standard constructor + CGhttpmfcDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CGhttpmfcDlg) @@ -52,8 +52,8 @@ class CGhttpmfcDlg : public CDialog // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CGhttpmfcDlg) protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL // Implementation protected: @@ -79,4 +79,4 @@ class CGhttpmfcDlg : public CDialog //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_GHTTPMFCDLG_H__14B35CAF_3960_4669_972D_59B741AA032C__INCLUDED_) +#endif // !defined(AFX_GHTTPMFCDLG_H__14B35CAF_3960_4669_972D_59B741AA032C__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2.h index 41f607e6af5..fcdca2a65ad 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2.h @@ -52,36 +52,36 @@ typedef unsigned short GT2MessageID; // check individual function definitions to see possible results // TODO: list possible results wherever this is used typedef enum { - GT2Success, // success - // errors: - GT2OutOfMemory, // ran out of memory - GT2Rejected, // attempt rejected - GT2NetworkError, // networking error (could be local or remote) - GT2AddressError, // invalid or unreachable address - GT2DuplicateAddress, // a connection was attempted to an address that already has a connection on the socket - GT2TimedOut, // time out reached - GT2NegotiationError, // there was an error negotiating with the remote side - GT2InvalidConnection, // the connection didn't exist - GT2InvalidMessage, // used for vdp reliable messages containing voice data, no voice data in reliable messages - GT2SendFailed // the send failed, + GT2Success, // success + // errors: + GT2OutOfMemory, // ran out of memory + GT2Rejected, // attempt rejected + GT2NetworkError, // networking error (could be local or remote) + GT2AddressError, // invalid or unreachable address + GT2DuplicateAddress, // a connection was attempted to an address that already has a connection on the socket + GT2TimedOut, // time out reached + GT2NegotiationError, // there was an error negotiating with the remote side + GT2InvalidConnection, // the connection didn't exist + GT2InvalidMessage, // used for vdp reliable messages containing voice data, no voice data in reliable messages + GT2SendFailed // the send failed, } GT2Result; // possible states for any GT2Connection typedef enum { - GT2Connecting, // negotiating the connection - GT2Connected, // the connection is active - GT2Closing, // the connection is being closed - GT2Closed // the connection has been closed and can no longer be used + GT2Connecting, // negotiating the connection + GT2Connected, // the connection is active + GT2Closing, // the connection is being closed + GT2Closed // the connection has been closed and can no longer be used } GT2ConnectionState; // The cause of the connection being closed. typedef enum { - GT2LocalClose, // The connection was closed with gt2CloseConnection. - GT2RemoteClose, // The connection was closed remotely. - // errors: - GT2CommunicationError, // An invalid message was received (it was either unexpected or wrongly formatted). - GT2SocketError, // An error with the socket forced the connection to close. - GT2NotEnoughMemory // There wasn't enough memory to store an incoming or outgoing message. + GT2LocalClose, // The connection was closed with gt2CloseConnection. + GT2RemoteClose, // The connection was closed remotely. + // errors: + GT2CommunicationError, // An invalid message was received (it was either unexpected or wrongly formatted). + GT2SocketError, // An error with the socket forced the connection to close. + GT2NotEnoughMemory // There wasn't enough memory to store an incoming or outgoing message. } GT2CloseReason; /************ @@ -116,24 +116,24 @@ typedef void (*gt2SocketErrorCallback)(GT2Socket socket); // and it needs to hold any messages that arrive out of order. if either buffer runs out // of space the connection will be dropped. GT2Result gt2CreateSocket( - GT2Socket* socket, // if the result is GT2Success, the socket object handle will be stored at this address - const char* localAddress, // the local address to bind to - int outgoingBufferSize, // size of per-connection buffer where sent messages waiting to be confirmed are held, use - // 0 for default - int incomingBufferSize, // size of per-connection buffer where out-of-order received messages are held, use 0 for - // default - gt2SocketErrorCallback callback // a callback that is called if there is an error with the socket + GT2Socket* socket, // if the result is GT2Success, the socket object handle will be stored at this address + const char* localAddress, // the local address to bind to + int outgoingBufferSize, // size of per-connection buffer where sent messages waiting to be confirmed are held, use + // 0 for default + int incomingBufferSize, // size of per-connection buffer where out-of-order received messages are held, use 0 for + // default + gt2SocketErrorCallback callback // a callback that is called if there is an error with the socket ); // AdHoc Sockets use MAC address instead of IP address. GT2Result gt2CreateAdHocSocket( - GT2Socket* socket, // if the result is GT2Success, the socket object handle will be stored at this address - const char* localAddress, // the local address to bind to - int outgoingBufferSize, // size of per-connection buffer where sent messages waiting to be confirmed are held, use - // 0 for default - int incomingBufferSize, // size of per-connection buffer where out-of-order received messages are held, use 0 for - // default - gt2SocketErrorCallback callback // a callback that is called if there is an error with the socket + GT2Socket* socket, // if the result is GT2Success, the socket object handle will be stored at this address + const char* localAddress, // the local address to bind to + int outgoingBufferSize, // size of per-connection buffer where sent messages waiting to be confirmed are held, use + // 0 for default + int incomingBufferSize, // size of per-connection buffer where out-of-order received messages are held, use 0 for + // default + gt2SocketErrorCallback callback // a callback that is called if there is an error with the socket ); #ifdef _XBOX @@ -145,13 +145,13 @@ GT2Result gt2CreateAdHocSocket( // and it needs to hold any messages that arrive out of order. if either buffer runs out // of space the connection will be dropped. GT2Result gt2CreateVDPSocket( - GT2Socket* socket, // if the result is GT2Success, the socket object handle will be stored at this address - const char* localAddress, // the local address to bind to - int outgoingBufferSize, // size of per-connection buffer where sent messages waiting to be confirmed are held, use - // 0 for default - int incomingBufferSize, // size of per-connection buffer where out-of-order received messages are held, use 0 for - // default - gt2SocketErrorCallback callback // a callback that is called if there is an error with the socket + GT2Socket* socket, // if the result is GT2Success, the socket object handle will be stored at this address + const char* localAddress, // the local address to bind to + int outgoingBufferSize, // size of per-connection buffer where sent messages waiting to be confirmed are held, use + // 0 for default + int incomingBufferSize, // size of per-connection buffer where out-of-order received messages are held, use 0 for + // default + gt2SocketErrorCallback callback // a callback that is called if there is an error with the socket ); #endif @@ -168,10 +168,10 @@ void gt2Think(GT2Socket socket); // this function bypasses the normal connection logic // note that all messages sent this way will be unreliable // to broadcast a datagram, omit the IP from the remoteAddress (e.g., ":12345") -GT2Result gt2SendRawUDP(GT2Socket socket, // the socket through which to send the raw UDP datagram - const char* remoteAddress, // the address to which to send the datagram - const GT2Byte* message, // the message to send, or NULL for an empty datagram - int len // the len of the message (0 for an empty message, ignored if message==NULL) +GT2Result gt2SendRawUDP(GT2Socket socket, // the socket through which to send the raw UDP datagram + const char* remoteAddress, // the address to which to send the datagram + const GT2Byte* message, // the message to send, or NULL for an empty datagram + int len // the len of the message (0 for an empty message, ignored if message==NULL) ); /************************* @@ -184,30 +184,30 @@ GT2Result gt2SendRawUDP(GT2Socket socket, // the socket through which to send t // listener passed to gt2Reject. If the // result is anything else, then message // is NULL and len is 0. -typedef void (*gt2ConnectedCallback)(GT2Connection connection, // The connection object. - GT2Result result, // Result from connect attempt. - GT2Byte* message, // If result==GT2Rejected, the reason. Otherwise, NULL. - int len // If result==GT2Rejected, the length of the reason. Otherwise, 0. +typedef void (*gt2ConnectedCallback)(GT2Connection connection, // The connection object. + GT2Result result, // Result from connect attempt. + GT2Byte* message, // If result==GT2Rejected, the reason. Otherwise, NULL. + int len // If result==GT2Rejected, the length of the reason. Otherwise, 0. ); // Called when a message is received. -typedef void (*gt2ReceivedCallback)(GT2Connection connection, // The connection the message was received on. - GT2Byte* message, // The message that was received. Will be NULL if an empty message. - int len, // The length of the message in bytes. Will be 0 if an empty message. - GT2Bool reliable // True if this is was sent reliably. +typedef void (*gt2ReceivedCallback)(GT2Connection connection, // The connection the message was received on. + GT2Byte* message, // The message that was received. Will be NULL if an empty message. + int len, // The length of the message in bytes. Will be 0 if an empty message. + GT2Bool reliable // True if this is was sent reliably. ); // Called when the connection is closed (remotely or locally). // The connection can no longer be used after this callback returns. -typedef void (*gt2ClosedCallback)(GT2Connection connection, // The connection that was closed. - GT2CloseReason reason // The reason the connection was closed. +typedef void (*gt2ClosedCallback)(GT2Connection connection, // The connection that was closed. + GT2CloseReason reason // The reason the connection was closed. ); // When a reply is received for a ping that was sent, this callback is called. // The latency reported here is the amount of time between when the ping // was first sent with gt2Ping and when the pong was received. -typedef void (*gt2PingCallback)(GT2Connection connection, // the connection the ping was sent on - int latency // the round-trip time for the ping, in milliseconds +typedef void (*gt2PingCallback)(GT2Connection connection, // the connection the ping was sent on + int latency // the round-trip time for the ping, in milliseconds ); // Callbacks set for each connection. @@ -215,10 +215,10 @@ typedef void (*gt2PingCallback)(GT2Connection connection, // the connection the // when this is passed to gt2Accept. typedef struct { - gt2ConnectedCallback connected; // Called when gt2Connect is complete. - gt2ReceivedCallback received; // Called when a message is received. - gt2ClosedCallback closed; // Called when the connection is closed (remotely or locally). - gt2PingCallback ping; // Called when a ping reply is received. + gt2ConnectedCallback connected; // Called when gt2Connect is complete. + gt2ReceivedCallback received; // Called when a message is received. + gt2ClosedCallback closed; // Called when the connection is closed (remotely or locally). + gt2PingCallback ping; // Called when a ping reply is received. } GT2ConnectionCallbacks; /************************* @@ -232,15 +232,15 @@ typedef struct // if blocking is false, the return value signals the current status of the attempt // GT2Success means the connection is being attempted // anything else means there was an error and the connection attempt has been aborted -GT2Result gt2Connect(GT2Socket socket, // the local socket to use for the connection +GT2Result gt2Connect(GT2Socket socket, // the local socket to use for the connection GT2Connection* - connection, // if the result is GT2Success, and blocking is false, the connection object handle is stored here - const char* remoteAddress, // the address to connect to - const GT2Byte* message, // an optional initial message (may be NULL) - int len, // length of the initial message (may be 0, or -1 for strlen) - int timeout, // timeout in milliseconds (may be 0 for infinite retries) - GT2ConnectionCallbacks* callbacks, // callbacks for connection related stuff - GT2Bool blocking // if true, don't return until complete (successfuly or unsuccessfuly) + connection, // if the result is GT2Success, and blocking is false, the connection object handle is stored here + const char* remoteAddress, // the address to connect to + const GT2Byte* message, // an optional initial message (may be NULL) + int len, // length of the initial message (may be 0, or -1 for strlen) + int timeout, // timeout in milliseconds (may be 0 for infinite retries) + GT2ConnectionCallbacks* callbacks, // callbacks for connection related stuff + GT2Bool blocking // if true, don't return until complete (successfuly or unsuccessfuly) ); // sends data reliably or unreliably @@ -248,10 +248,10 @@ GT2Result gt2Connect(GT2Socket socket, // the local socket to use for the conne // unreliable messages are not guaranteed to arrive, arrive in order, or arrive only once. // because messages may be held in the outgoing buffer (even unreliable messages may need // to be put in the buffer), the message size cannot exceed -GT2Result gt2Send(GT2Connection connection, // the connection to send the message on - const GT2Byte* message, // the message to send, or NULL for an empty message0 - int len, // the len of the message (0 for an empty message, ignored if message==NULL) - GT2Bool reliable // if true, send the message reliably +GT2Result gt2Send(GT2Connection connection, // the connection to send the message on + const GT2Byte* message, // the message to send, or NULL for an empty message0 + int len, // the len of the message (0 for an empty message, ignored if message==NULL) + GT2Bool reliable // if true, send the message reliably ); // sends a ping on a connection in an attempt to determine latency @@ -285,13 +285,13 @@ void gt2CloseAllConnectionsHard(GT2Socket socket); // to be called from inside the callback, however they should be called in a timely manner so that the // remote side does not need to sit around indefinitely waiting for a response. // the latency is an estimate of the round trip time between connections. -typedef void (*gt2ConnectAttemptCallback)(GT2Socket socket, // the socket the attempt came in on - GT2Connection connection, // a connection object for the incoming connection attempt - unsigned int ip, // the IP being used remotely for the connection attempt - unsigned short port, // the port being used remotely for the connection attempt - int latency, // the approximate latency on the connection - GT2Byte* message, // an optional message sent with the attempt. Will be NULL if an empty message. - int len // the length of the message, in characters. Will be 0 if an empty message. +typedef void (*gt2ConnectAttemptCallback)(GT2Socket socket, // the socket the attempt came in on + GT2Connection connection, // a connection object for the incoming connection attempt + unsigned int ip, // the IP being used remotely for the connection attempt + unsigned short port, // the port being used remotely for the connection attempt + int latency, // the approximate latency on the connection + GT2Byte* message, // an optional message sent with the attempt. Will be NULL if an empty message. + int len // the length of the message, in characters. Will be 0 if an empty message. ); /********************* @@ -350,11 +350,11 @@ GT2Bool gt2WasMessageIDConfirmed(GT2Connection connection, GT2MessageID messageI // the message points to the same memory location as the message passed to gt2Send (or gt2FilteredSend). // so if the call to gt2FilteredSend is delayed, it is the filter's responsibility to make sure the // data is still around when and if it is needed. -typedef void (*gt2SendFilterCallback)(GT2Connection connection, // The connection on which the message is being sent. - int filterID, // Pass this ID to gt2FilteredSend. - const GT2Byte* message, // The message being sent. Will be NULL if an empty message. - int len, // The length of the message being sent, in bytes. Will be 0 if an empty message. - GT2Bool reliable // If the message is being sent reliably. +typedef void (*gt2SendFilterCallback)(GT2Connection connection, // The connection on which the message is being sent. + int filterID, // Pass this ID to gt2FilteredSend. + const GT2Byte* message, // The message being sent. Will be NULL if an empty message. + int len, // The length of the message being sent, in bytes. Will be 0 if an empty message. + GT2Bool reliable // If the message is being sent reliably. ); // Callback for filtering incoming data. @@ -363,11 +363,11 @@ typedef void (*gt2SendFilterCallback)(GT2Connection connection, // The connecti // the message may point to a memory location supplied to gt2FilteredReceive by a previous filter. // so if this filter's call to gt2FilteredReceive is delayed, it is the filter's responsibility // to make sure the data is still around when and if it is needed. -typedef void (*gt2ReceiveFilterCallback)(GT2Connection connection, // The connection the message was received on. - int filterID, // Pass this ID to gtFilteredReceive. - GT2Byte* message, // The message that was received. Will be NULL if an empty message. - int len, // The length of the message in bytes. Will be 0 if an empty message. - GT2Bool reliable // True if this is a reliable message. +typedef void (*gt2ReceiveFilterCallback)(GT2Connection connection, // The connection the message was received on. + int filterID, // Pass this ID to gtFilteredReceive. + GT2Byte* message, // The message that was received. Will be NULL if an empty message. + int len, // The length of the message in bytes. Will be 0 if an empty message. + GT2Bool reliable // True if this is a reliable message. ); /********************* @@ -376,44 +376,44 @@ typedef void (*gt2ReceiveFilterCallback)(GT2Connection connection, // The conne // Adds a filter to the connection's outgoing data. // Returns GT2False if there was an error adding the filter (due to no free memory) -GT2Bool gt2AddSendFilter(GT2Connection connection, // The connection on which to add the filter. - gt2SendFilterCallback callback // The callback the outgoing data is filtered through. +GT2Bool gt2AddSendFilter(GT2Connection connection, // The connection on which to add the filter. + gt2SendFilterCallback callback // The callback the outgoing data is filtered through. ); // Removes a filter from the connection's outgoing data. // if callback is NULL, all send filters are removed -void gt2RemoveSendFilter(GT2Connection connection, // The connection on which to remove the filter. - gt2SendFilterCallback callback // The callback to remove. +void gt2RemoveSendFilter(GT2Connection connection, // The connection on which to remove the filter. + gt2SendFilterCallback callback // The callback to remove. ); // Called in response to a gt2SendFilterCallback being called. // It can be called from within the callback, or at any later time. -void gt2FilteredSend(GT2Connection connection, // The connection on which the message is being sent. - int filterID, // The ID passed to the gt2SendFilterCallback. - const GT2Byte* message, // The message being sent. May be NULL. - int len, // The lengt2h of the message being sent, in bytes. May be 0 or -1. - GT2Bool reliable // If the message should be sent reliably. +void gt2FilteredSend(GT2Connection connection, // The connection on which the message is being sent. + int filterID, // The ID passed to the gt2SendFilterCallback. + const GT2Byte* message, // The message being sent. May be NULL. + int len, // The lengt2h of the message being sent, in bytes. May be 0 or -1. + GT2Bool reliable // If the message should be sent reliably. ); // Adds a filter to the connection's incoming data. // Returns GT2False if there was an error adding the filter (due to no free memory) -GT2Bool gt2AddReceiveFilter(GT2Connection connection, // The connection on which to add the filter. - gt2ReceiveFilterCallback callback // The callback the incoming data is filtered through. +GT2Bool gt2AddReceiveFilter(GT2Connection connection, // The connection on which to add the filter. + gt2ReceiveFilterCallback callback // The callback the incoming data is filtered through. ); // Removes a filter from the connection's incoming data. // if callback is NULL, all receive filters are removed -void gt2RemoveReceiveFilter(GT2Connection connection, // The connection on which to remove the filter. - gt2ReceiveFilterCallback callback // The callback to remove. +void gt2RemoveReceiveFilter(GT2Connection connection, // The connection on which to remove the filter. + gt2ReceiveFilterCallback callback // The callback to remove. ); // Called in response to a gt2ReceiveFilterCallback being called. // It can be called from within the callback, or at any later time. -void gt2FilteredReceive(GT2Connection connection, // The connection the message was received on. - int filterID, // The ID passed to the gt2ReceiveFilterCallback. - GT2Byte* message, // The message that was received. May be NULL. - int len, // The lengt2h of the message in bytes. May be 0. - GT2Bool reliable // True if this is a reliable message. +void gt2FilteredReceive(GT2Connection connection, // The connection the message was received on. + int filterID, // The ID passed to the gt2ReceiveFilterCallback. + GT2Byte* message, // The message that was received. May be NULL. + int len, // The lengt2h of the message in bytes. May be 0. + GT2Bool reliable // True if this is a reliable message. ); /***************************** @@ -424,11 +424,11 @@ void gt2FilteredReceive(GT2Connection connection, // The connection the message // connection. if the callback recognizes the message and handles it, it should return GT2True, which // will tell the socket to ignore the message. if the callback does not recognize the message, it // should return GT2False, which tells the socket to let the other side know there is no connection. -typedef GT2Bool (*gt2UnrecognizedMessageCallback)(GT2Socket socket, // the socket the message was received on - unsigned int ip, // the ip of the remote machine the message came from (in network byte order) - unsigned short port, // the port on the remote machine (in host byte order) - GT2Byte* message, // the message (may be NULL for an empty message) - int len // the length of the message (may be 0) +typedef GT2Bool (*gt2UnrecognizedMessageCallback)(GT2Socket socket, // the socket the message was received on + unsigned int ip, // the ip of the remote machine the message came from (in network byte order) + unsigned short port, // the port on the remote machine (in host byte order) + GT2Byte* message, // the message (may be NULL for an empty message) + int len // the length of the message (may be 0) ); /***************************** @@ -515,9 +515,9 @@ unsigned short gt2NetworkToHostShort(unsigned short s); // If both the IP and port are zero, the string will be an empty string ("") // The string is returned. If the string paramater is NULL, then an internal static string will be // used. There are two internal strings that are alternated between. -const char* gt2AddressToString(unsigned int ip, // IP in network byte order. Can be 0. - unsigned short port, // Port in host byte order. Can be 0. - char string[22] // String will be placed in here. Can be NULL. +const char* gt2AddressToString(unsigned int ip, // IP in network byte order. Can be 0. + unsigned short port, // Port in host byte order. Can be 0. + char string[22] // String will be placed in here. Can be NULL. ); // Converts a string address into an IP and a port. The IP is stored in network byte order, and the port @@ -537,9 +537,9 @@ const char* gt2AddressToString(unsigned int ip, // IP in network byte order. C // If this function needs to resolve a hostname ("host.com") it may need to contact a DNS server, which can // cause the function to block for an indefinite period of time. Usually it is < 2 seconds, but on certain // systems, and under certain circumstances, it can take 30 seconds or longer. -GT2Bool gt2StringToAddress(const char* string, // The string to convert. - unsigned int* ip, // The IP is stored here, in network byte order. Can be NULL. - unsigned short* port // The port is stored here, in host byte order. Can be NULL. +GT2Bool gt2StringToAddress(const char* string, // The string to convert. + unsigned int* ip, // The IP is stored here, in network byte order. Can be NULL. + unsigned short* port // The port is stored here, in host byte order. Can be NULL. ); // Gets the host information for a machine on the Internet. The first version takes an IP in network byte order, @@ -590,13 +590,13 @@ gsi_u32 gt2MacToIp(const char* mac); // called with either sent or received data // trying to send a message from within the send dump callback, or letting the socket think from within the receive // dump callback can cause serious problems, and should not be done. -typedef void (*gt2DumpCallback)(GT2Socket socket, // the socket the message was on - GT2Connection connection, // the connection the message was on, or NULL if there is no connection for this message - unsigned int ip, // the remote ip, in network byte order - unsigned short port, // the remote port, in host byte order - GT2Bool reset, // if true, the connection has been reset (only used by the receive callback) - const GT2Byte* message, // the message (should not be modified) - int len // the length of the message +typedef void (*gt2DumpCallback)(GT2Socket socket, // the socket the message was on + GT2Connection connection, // the connection the message was on, or NULL if there is no connection for this message + unsigned int ip, // the remote ip, in network byte order + unsigned short port, // the remote port, in host byte order + GT2Bool reset, // if true, the connection has been reset (only used by the receive callback) + const GT2Byte* message, // the message (should not be modified) + int len // the length of the message ); /******************* diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Auth.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Auth.c index e96ead76c80..1190b6d5641 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Auth.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Auth.c @@ -25,7 +25,7 @@ static int gti2VerifyChallenge(const GT2Byte* buffer) for (i = 1; i < GTI2_CHALLENGE_LEN; i++) { oddmode = CALCULATEODDMODE(buffer, i, oddmode); - if ((oddmode && (buffer[i] & 1) == 0) || (!oddmode && ((buffer[i] & 1) == 1))) return 0; // failed!! + if ((oddmode && (buffer[i] & 1) == 0) || (!oddmode && ((buffer[i] & 1) == 1))) return 0; // failed!! } return 1; } @@ -37,12 +37,12 @@ GT2Byte* gti2GetChallenge(GT2Byte* buffer) assert(buffer); srand((unsigned int)current_time()); - buffer[0] = (GT2Byte)(33 + rand() % 93); // use chars in the range 33 - 125 + buffer[0] = (GT2Byte)(33 + rand() % 93); // use chars in the range 33 - 125 oddmode = 0; for (i = 1; i < GTI2_CHALLENGE_LEN; i++) { oddmode = CALCULATEODDMODE(buffer, i, oddmode); - buffer[i] = (GT2Byte)(33 + rand() % 93); // use chars in the range 33 - 125 + buffer[i] = (GT2Byte)(33 + rand() % 93); // use chars in the range 33 - 125 // if oddmode make sure the char is odd, otherwise make sure it's even if ((oddmode && (buffer[i] & 1) == 0) || (!oddmode && ((buffer[i] & 1) == 1))) buffer[i]++; } @@ -56,15 +56,15 @@ GT2Byte* gti2GetResponse(GT2Byte* buffer, const GT2Byte* challenge) char cchar; int keylen = (int)strlen(GT2ChallengeKey); int chalrand; - valid = gti2VerifyChallenge(challenge); // it's an invalid challenge, give them a bogus response + valid = gti2VerifyChallenge(challenge); // it's an invalid challenge, give them a bogus response // assert(GTI2_RESPONSE_LEN <= GTI2_CHALLENGE_LEN); for (i = 0; i < GTI2_RESPONSE_LEN; i++) { // use random vals for spots 0 and 13 if (!valid || i == 0 || i == 13) - buffer[i] = (GT2Byte)(33 + rand() % 93); // use chars in the range 33 - 125 + buffer[i] = (GT2Byte)(33 + rand() % 93); // use chars in the range 33 - 125 else - { // set the character to look back at, never use the random ones! + { // set the character to look back at, never use the random ones! if (i == 1 || i == 14) cchar = (char)challenge[i]; else @@ -80,7 +80,7 @@ GT2Byte* gti2GetResponse(GT2Byte* buffer, const GT2Byte* challenge) GT2Bool gti2CheckResponse(const GT2Byte* response1, const GT2Byte* response2) { - int i; // when comparing ignore the ones that are random + int i; // when comparing ignore the ones that are random for (i = 0; i < GTI2_RESPONSE_LEN; i++) { if (i != 0 && i != 13 && response1[i] != response2[i]) return GT2False; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.c index 4f3820de96a..bb4f526ce7a 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.c @@ -351,7 +351,7 @@ static int gtiDecodeSingle(char elemType, char* inBuffer, int inLength, va_list* if (inLength < sizeof(*len)) return -1; holdlen = *len; memcpy(len, inBuffer, sizeof(*len)); - if (*len > holdlen) // there isn't enough room in their dest! + if (*len > holdlen) // there isn't enough room in their dest! return -1; if (inLength < (int)sizeof(*len) + *len) return -1; memcpy(data, inBuffer + sizeof(*len), (unsigned int)*len); @@ -368,7 +368,7 @@ static int gtiDecodeSingle(char elemType, char* inBuffer, int inLength, va_list* } // break; } - return -1; // bad type! + return -1; // bad type! } static int gtiEncodeSingle(char elemType, char* outBuffer, int outLength, va_list* args) @@ -393,7 +393,7 @@ static int gtiEncodeSingle(char elemType, char* outBuffer, int outLength, va_lis case GT_UCHAR: GT_ENCODE_ELEM(GT_UCHAR_TYPE, outBuffer, outLength, args); // break; - case GT_FLOAT: // floats are promoted to double in varargs, need to demote + case GT_FLOAT: // floats are promoted to double in varargs, need to demote { double temp; float f; @@ -470,7 +470,7 @@ static int gtiEncodeSingle(char elemType, char* outBuffer, int outLength, va_lis return len + (int)sizeof(len); } } - return -1; // bad type! + return -1; // bad type! } static int gtInternalEncodeV( @@ -491,7 +491,7 @@ static int gtInternalEncodeV( } while (*fmtString) { - if (*fmtString == GT_BIT) // see how many + if (*fmtString == GT_BIT) // see how many { for (bitCounter = fmtString; *bitCounter == GT_BIT && bitCounter - fmtString <= 8; bitCounter++) { @@ -501,7 +501,7 @@ static int gtInternalEncodeV( } else elemSize = gtiEncodeSingle(*fmtString, outBuffer, outLength, args); - if (elemSize < 0) return -1; // out of space + if (elemSize < 0) return -1; // out of space outBuffer += elemSize; outLength -= elemSize; fmtString++; @@ -559,7 +559,7 @@ static int gtDecodeInternalV(int usetype, const char* fmtString, char* inBuffer, while (*fmtString) { - if (*fmtString == GT_BIT) // see how many + if (*fmtString == GT_BIT) // see how many { for (bitCounter = fmtString; *bitCounter == GT_BIT && bitCounter - fmtString <= 8; bitCounter++) { @@ -569,7 +569,7 @@ static int gtDecodeInternalV(int usetype, const char* fmtString, char* inBuffer, } else elemSize = gtiDecodeSingle(*fmtString, inBuffer, inLength, args); - if (elemSize < 0) return -1; // out of space + if (elemSize < 0) return -1; // out of space inBuffer += elemSize; inLength -= elemSize; fmtString++; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.h index 78d4ebd16e4..633291c2385 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Encode.h @@ -159,8 +159,8 @@ you set) #define GT_CSTR_ARRAY_PTR 'A' #define GT_CSTR_ARRAY_PTR_ "A" #define GT_CSTR_ARRAY_PTR_TYPE char** -#define GT_RAW 'r' // two parameters! (data, then length) -#define GT_RAW_ "r" // two parameters! +#define GT_RAW 'r' // two parameters! (data, then length) +#define GT_RAW_ "r" // two parameters! #define GT_RAW_TYPE char* #define GT_RAW_PTR 'R' #define GT_RAW_PTR_ "R" diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Main.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Main.h index 4e585147c9b..ea827809105 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Main.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Main.h @@ -45,11 +45,11 @@ devsupport@gamespy.com // note, this buffer size only needs to be slighty larger than the largest message that will be sent ("slighty // larger" due to overhead with reliable messages, and unreliable messages starting with the magic string). #if defined(_PS2) && defined(INSOCK) -#define GTI2_STACK_RECV_BUFFER_SIZE NETBUFSIZE // Max for Insock. Otherwise SOCKET_ERROR +#define GTI2_STACK_RECV_BUFFER_SIZE NETBUFSIZE // Max for Insock. Otherwise SOCKET_ERROR #elif defined(_NITRO) #define GTI2_STACK_RECV_BUFFER_SIZE 1500 -#elif defined(_XBOX) // Xbox packets are 1304, -#define GTI2_STACK_RECV_BUFFER_SIZE 4096 // when using VDP sockets, 2 bytes are used for data length +#elif defined(_XBOX) // Xbox packets are 1304, +#define GTI2_STACK_RECV_BUFFER_SIZE 4096 // when using VDP sockets, 2 bytes are used for data length #else #define GTI2_STACK_RECV_BUFFER_SIZE 65535 #endif @@ -70,9 +70,9 @@ devsupport@gamespy.com // happen on a high packet loss connection. //#define GTI2_DROP_SEND_RATE 30 typedef enum { - GTI2UdpProtocol, // UDP socket type for standard sockets - GTI2VdpProtocol = 2, // VDP socket type only used for Xbox VDP sockets - GTI2AdHocProtocol = 3 // socket type only used for PSP Adhoc sockets + GTI2UdpProtocol, // UDP socket type for standard sockets + GTI2VdpProtocol = 2, // VDP socket type only used for Xbox VDP sockets + GTI2AdHocProtocol = 3 // socket type only used for PSP Adhoc sockets } GTI2ProtocolType; // The Maximum offset of eiter UDP or VDP @@ -86,18 +86,18 @@ typedef enum { typedef enum { // client-only states - GTI2AwaitingServerChallenge, // sent challenge, waiting for server's challenge - GTI2AwaitingAcceptance, // sent response, waiting for accept/reject from server + GTI2AwaitingServerChallenge, // sent challenge, waiting for server's challenge + GTI2AwaitingAcceptance, // sent response, waiting for accept/reject from server // server-only states - GTI2AwaitingClientChallenge, // receiving challenge from a new client - GTI2AwaitingClientResponse, // sent challenge, waiting for client's response - GTI2AwaitingAcceptReject, // got client's response, waiting for app to accept/reject + GTI2AwaitingClientChallenge, // receiving challenge from a new client + GTI2AwaitingClientResponse, // sent challenge, waiting for client's response + GTI2AwaitingAcceptReject, // got client's response, waiting for app to accept/reject // post-negotiation states - GTI2Connected, // connected - GTI2Closing, // sent a close message (GTI2Close or GTI2Reject), waiting for confirmation - GTI2Closed // connection has been closed, free it as soon as possible + GTI2Connected, // connected + GTI2Closing, // sent a close message (GTI2Close or GTI2Reject), waiting for confirmation + GTI2Closed // connection has been closed, free it as soon as possible } GTI2ConnectionState; // message types @@ -105,24 +105,24 @@ typedef enum { // reliable messages // all start with // type is 1 bytes, SN and ESN are 2 bytes each - GTI2MsgAppReliable, // reliable application message - GTI2MsgClientChallenge, // client's challenge to the server (initial connection request) - GTI2MsgServerChallenge, // server's response to the client's challenge, and his challenge to the client - GTI2MsgClientResponse, // client's response to the server's challenge - GTI2MsgAccept, // server accepting client's connection attempt - GTI2MsgReject, // server rejecting client's connection attempt - GTI2MsgClose, // message indicating the connection is closing - GTI2MsgKeepAlive, // keep-alive used to help detect dropped connections + GTI2MsgAppReliable, // reliable application message + GTI2MsgClientChallenge, // client's challenge to the server (initial connection request) + GTI2MsgServerChallenge, // server's response to the client's challenge, and his challenge to the client + GTI2MsgClientResponse, // client's response to the server's challenge + GTI2MsgAccept, // server accepting client's connection attempt + GTI2MsgReject, // server rejecting client's connection attempt + GTI2MsgClose, // message indicating the connection is closing + GTI2MsgKeepAlive, // keep-alive used to help detect dropped connections GTI2NumReliableMessages, // unreliable messages - GTI2MsgAck = 100, // acknowledge receipt of reliable message(s) - GTI2MsgNack, // alert sender to missing reliable message(s) - GTI2MsgPing, // used to determine latency - GTI2MsgPong, // a reply to a ping - GTI2MsgClosed // confirmation of connection closure (GTI2MsgClose or GTI2MsgReject) - also sent in response to bad - // messages from unknown addresses + GTI2MsgAck = 100, // acknowledge receipt of reliable message(s) + GTI2MsgNack, // alert sender to missing reliable message(s) + GTI2MsgPing, // used to determine latency + GTI2MsgPong, // a reply to a ping + GTI2MsgClosed // confirmation of connection closure (GTI2MsgClose or GTI2MsgReject) - also sent in response to bad + // messages from unknown addresses // unreliable messages don't really have a message type, just the magic string repeated at the start } GTI2MessageType; @@ -133,111 +133,111 @@ typedef enum { typedef struct GTI2Buffer { - GT2Byte* buffer; // The buffer's bytes. - int size; // Number of bytes in buffer. - int len; // Length of actual data in buffer. + GT2Byte* buffer; // The buffer's bytes. + int size; // Number of bytes in buffer. + int len; // Length of actual data in buffer. } GTI2Buffer; typedef struct GTI2IncomingBufferMessage { - int start; // the start of the message - int len; // the length of the message - GTI2MessageType type; // the type - unsigned short serialNumber; // the serial number + int start; // the start of the message + int len; // the length of the message + GTI2MessageType type; // the type + unsigned short serialNumber; // the serial number } GTI2IncomingBufferMessage; typedef struct GTI2OutgoingBufferMessage { - int start; // the start of the message - int len; // the length of the message - unsigned short serialNumber; // the serial number - gsi_time lastSend; // last time this message was sent + int start; // the start of the message + int len; // the length of the message + unsigned short serialNumber; // the serial number + gsi_time lastSend; // last time this message was sent } GTI2OutgoingBufferMessage; typedef struct GTI2Socket { - SOCKET socket; // the network socket used for all network communication + SOCKET socket; // the network socket used for all network communication - unsigned int ip; // the ip this socket is bound to - unsigned short port; // the port this socket is bound to + unsigned int ip; // the ip this socket is bound to + unsigned short port; // the port this socket is bound to - HashTable connections; // the connections that are using this socket - DArray closedConnections; // connections that are closed no longer get a spot in the hash table + HashTable connections; // the connections that are using this socket + DArray closedConnections; // connections that are closed no longer get a spot in the hash table - GT2Bool close; // if true, a close was attempted inside a callback, and it should be closed as soon as possible - GT2Bool error; // if true, there was a socket error using this socket + GT2Bool close; // if true, a close was attempted inside a callback, and it should be closed as soon as possible + GT2Bool error; // if true, there was a socket error using this socket - int callbackLevel; // if >0, then we're inside a callback (or recursive callbacks) - gt2ConnectAttemptCallback connectAttemptCallback; // if set, callback used to handle incoming connection attempts - gt2SocketErrorCallback socketErrorCallback; // if set, call this in case of an error - gt2DumpCallback sendDumpCallback; // if set, gets called for every datagram sent - gt2DumpCallback receiveDumpCallback; // if set, gets called for every datagram and connection reset received - gt2UnrecognizedMessageCallback unrecognizedMessageCallback; // if set, gets called for all unrecognized messages + int callbackLevel; // if >0, then we're inside a callback (or recursive callbacks) + gt2ConnectAttemptCallback connectAttemptCallback; // if set, callback used to handle incoming connection attempts + gt2SocketErrorCallback socketErrorCallback; // if set, call this in case of an error + gt2DumpCallback sendDumpCallback; // if set, gets called for every datagram sent + gt2DumpCallback receiveDumpCallback; // if set, gets called for every datagram and connection reset received + gt2UnrecognizedMessageCallback unrecognizedMessageCallback; // if set, gets called for all unrecognized messages - void* data; // user data + void* data; // user data - int outgoingBufferSize; // per-connection buffer sizes + int outgoingBufferSize; // per-connection buffer sizes int incomingBufferSize; - GTI2ProtocolType protocolType; // set to UDP or VDP protocol depending on the call to create socket - // also used as an offset for VDP sockets + GTI2ProtocolType protocolType; // set to UDP or VDP protocol depending on the call to create socket + // also used as an offset for VDP sockets int protocolOffset; - GT2Bool broadcastEnabled; // set to true if the socket has already been broadcast enabled + GT2Bool broadcastEnabled; // set to true if the socket has already been broadcast enabled } GTI2Socket; typedef struct GTI2Connection { // ip and port uniquely identify this connection on this socket - unsigned int ip; // the ip on the other side of this connection (network byte order) - unsigned short port; // the port on the other side of this connection (host byte order) + unsigned int ip; // the ip on the other side of this connection (network byte order) + unsigned short port; // the port on the other side of this connection (host byte order) - GTI2Socket* socket; // the parent socket + GTI2Socket* socket; // the parent socket - GTI2ConnectionState state; // connection state + GTI2ConnectionState state; // connection state - GT2Bool initiated; // if true, the local side of the connection initiated the connection (client) + GT2Bool initiated; // if true, the local side of the connection initiated the connection (client) - GT2Bool freeAtAcceptReject; // if true, don't free the connection until accept/reject is called + GT2Bool freeAtAcceptReject; // if true, don't free the connection until accept/reject is called - GT2Result connectionResult; // the result of the connect attempt + GT2Result connectionResult; // the result of the connect attempt - gsi_time startTime; // the time the connection was created - gsi_time timeout; // the timeout value passed into gt2Connect + gsi_time startTime; // the time the connection was created + gsi_time timeout; // the timeout value passed into gt2Connect - int callbackLevel; // if >0, then we're inside a callback (or recursive callbacks) - GT2ConnectionCallbacks callbacks; // connection callbacks + int callbackLevel; // if >0, then we're inside a callback (or recursive callbacks) + GT2ConnectionCallbacks callbacks; // connection callbacks - char* initialMessage; // this is the initial message for the client - int initialMessageLen; // the initial message length + char* initialMessage; // this is the initial message for the client + int initialMessageLen; // the initial message length - void* data; // user data + void* data; // user data - GTI2Buffer incomingBuffer; // buffer for incoming data - GTI2Buffer outgoingBuffer; // buffer for outgoing data - DArray incomingBufferMessages; // identifies incoming messages stored in the buffer - DArray outgoingBufferMessages; // identifies outgoing messages stored in the buffer + GTI2Buffer incomingBuffer; // buffer for incoming data + GTI2Buffer outgoingBuffer; // buffer for outgoing data + DArray incomingBufferMessages; // identifies incoming messages stored in the buffer + DArray outgoingBufferMessages; // identifies outgoing messages stored in the buffer - unsigned short serialNumber; // serial number of the next message to be sent out - unsigned short expectedSerialNumber; // the next serial number we're expecting from the remote side + unsigned short serialNumber; // serial number of the next message to be sent out + unsigned short expectedSerialNumber; // the next serial number we're expecting from the remote side - char response[GTI2_RESPONSE_LEN]; // after the challenge is sent during negotiation, this is the response we're - // expecting + char response[GTI2_RESPONSE_LEN]; // after the challenge is sent during negotiation, this is the response we're + // expecting - gsi_time lastSend; // the last time something was sent on this connection - gsi_time challengeTime; // the time the challenge was sent + gsi_time lastSend; // the last time something was sent on this connection + gsi_time challengeTime; // the time the challenge was sent GT2Bool - pendingAck; // if true, there is an ack waiting to go out, either on its own or as part of a reliable message + pendingAck; // if true, there is an ack waiting to go out, either on its own or as part of a reliable message - gsi_time pendingAckTime; // the time at which the pending ack was first set + gsi_time pendingAckTime; // the time at which the pending ack was first set - DArray sendFilters; // filters that apply to outgoing data - DArray receiveFilters; // filters that apply to incoming data + DArray sendFilters; // filters that apply to outgoing data + DArray receiveFilters; // filters that apply to incoming data } GTI2Connection; // store last 32 ip's in a ring buffer -#define MAC_TABLE_SIZE 32 // must be power of 2 +#define MAC_TABLE_SIZE 32 // must be power of 2 typedef struct { gsi_u32 ip; @@ -247,6 +247,6 @@ typedef struct #ifdef GSI_ADHOC static int lastmactableentry = 0; static GTI2MacEntry MacTable[MAC_TABLE_SIZE]; -#endif // GSI_ADHOC +#endif // GSI_ADHOC #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Message.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Message.c index 7e9007083b7..f2d83e932f0 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Message.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Message.c @@ -577,7 +577,7 @@ static GT2Bool gti2HandleReliableMessage(GT2Connection connection, GTI2MessageTy // check if it's long enough if (len < - (connection->socket->protocolOffset + GTI2_MAGIC_STRING_LEN + 1 + 2 + 2)) // magic string + type + SN + ESN + (connection->socket->protocolOffset + GTI2_MAGIC_STRING_LEN + 1 + 2 + 2)) // magic string + type + SN + ESN { if (!gti2ConnectionCommunicationError(connection)) return GT2False; @@ -957,7 +957,7 @@ GT2Bool gti2HandleHostUnreachable(GT2Socket socket, unsigned int ip, unsigned sh // return length if successful // <=0 on error gsi_bool _NetworkAdHocSocketRecv(int socket_id, char* buf, int bufferlen, int flags, - char* saddr, // struct SceNetEtherAddr = char[6]; + char* saddr, // struct SceNetEtherAddr = char[6]; gsi_u16* sport); // return 0 if no data, -1 if error, >0 if data to read @@ -967,19 +967,19 @@ GT2Bool gti2ReceiveAdHocMessages(GT2Socket socket, char* buffer, int buffersize) { int rcode; SOCKADDR_IN address; - int addressLen; //, datasize; + int addressLen; //, datasize; // check for messages while (1) { int datasize = _NetworkAdHocCanReceiveOnSocket(socket->socket); - if (datasize < 0) // error + if (datasize < 0) // error { gti2SocketError(socket); return GT2False; } - if (datasize == 0) break; // no data + if (datasize == 0) break; // no data { // We have data to recv // receive the message @@ -990,10 +990,10 @@ GT2Bool gti2ReceiveAdHocMessages(GT2Socket socket, char* buffer, int buffersize) addressLen = sizeof(address); rcode = _NetworkAdHocSocketRecv(socket->socket, buffer, buffersize, 0, mac, &port); - if (rcode < 0) // fatal socket error + if (rcode < 0) // fatal socket error { -#if (0) // notes - if (0) // rcode == WSAECONNRESET) +#if (0) // notes + if (0) // rcode == WSAECONNRESET) { // handle the reset if (!gti2HandleConnectionReset(socket, address.sin_addr.s_addr, ntohs(address.sin_port))) @@ -1011,7 +1011,7 @@ GT2Bool gti2ReceiveAdHocMessages(GT2Socket socket, char* buffer, int buffersize) return GT2False; } } - if (rcode == 0) // no data + if (rcode == 0) // no data { return GT2False; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Socket.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Socket.c index 4bb02ee7d9b..824bd41d469 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Socket.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Socket.c @@ -329,7 +329,7 @@ GT2Bool gti2SocketSend(GT2Socket socket, unsigned int ip, unsigned short port, c gti2MessageCheck(&message, &len); if (socket->protocolType != GTI2AdHocProtocol) { -#ifndef INSOCK // insock never sets write flag for UDP sockets +#ifndef INSOCK // insock never sets write flag for UDP sockets // check if we can't send if (!CanSendOnSocket(socket->socket)) return GT2True; #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Utility.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Utility.c index 10fede8e5ee..ca81ee48d3f 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Utility.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2Utility.c @@ -9,8 +9,8 @@ devsupport@gamespy.com */ #ifdef XRAY_DISABLE_GAMESPY_WARNINGS -#pragma warning(disable : 4244) // lines: 130 -#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS +#pragma warning(disable : 4244) // lines: 130 +#endif //#ifdef XRAY_DISABLE_GAMESPY_WARNINGS #include "gt2Utility.h" #include @@ -85,7 +85,7 @@ const char* gt2AddressToString(unsigned int ip, unsigned short port, char string GT2Bool gt2StringToAddress(const char* string, unsigned int* ip, unsigned short* port) { - unsigned int srcIP = 0; // avoid use uninit condition + unsigned int srcIP = 0; // avoid use uninit condition unsigned short srcPort = 0; if (!string || !string[0]) { @@ -175,13 +175,13 @@ gsi_u32 gti2MacToIp(const char* mac) GTI2MacEntry* entry; int i; gsi_u32 ip; - memcpy(&ip, mac, 4); // store rest in table + memcpy(&ip, mac, 4); // store rest in table // find match in table for (i = 0; i < MAC_TABLE_SIZE; i++) { if (MacTable[i].ip == ip) { - return ip; // already there, don't add to the table. + return ip; // already there, don't add to the table. } } @@ -338,7 +338,7 @@ unsigned int** gt2StringToIPs(const char* string) ** INTERNAL FUNCTIONS ** ***********************/ -#ifdef __MWERKS__ // CodeWarrior will warn if not prototyped +#ifdef __MWERKS__ // CodeWarrior will warn if not prototyped void gti2MessageCheck(const GT2Byte** message, int* len); #endif diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/TGAFile.cpp b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/TGAFile.cpp index ccc0d9a15be..d200889b0e5 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/TGAFile.cpp +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/TGAFile.cpp @@ -20,133 +20,133 @@ #include -#pragma pack(1) // Align the structure on byte boundries... +#pragma pack(1) // Align the structure on byte boundries... // Possible Image Types -#define TGA_NOIMAGETYPE 0 // No Image Data Included in Image -#define TGA_MAPRGBTYPE 1 // Colormapped Image Data - No Compression -#define TGA_RAWRGBTYPE 2 // Truecolor Image Data - No Compression -#define TGA_RAWMONOTYPE 3 // Monochrome Image Data - No Compression -#define TGA_MAPENCODETYPE 9 // Colormapped Image Data - Compressed RLE -#define TGA_RAWENCODETYPE 10 // Truecolor Image Data - Compressed RLE -#define TGA_MONOENCODETYPE 11 // Monochrome Image Data - Compressed RLE +#define TGA_NOIMAGETYPE 0 // No Image Data Included in Image +#define TGA_MAPRGBTYPE 1 // Colormapped Image Data - No Compression +#define TGA_RAWRGBTYPE 2 // Truecolor Image Data - No Compression +#define TGA_RAWMONOTYPE 3 // Monochrome Image Data - No Compression +#define TGA_MAPENCODETYPE 9 // Colormapped Image Data - Compressed RLE +#define TGA_RAWENCODETYPE 10 // Truecolor Image Data - Compressed RLE +#define TGA_MONOENCODETYPE 11 // Monochrome Image Data - Compressed RLE // Version Macro -#define TGA_VERSIONONE 1 // Version 1 File Format -#define TGA_VERSIONTWO 2 // Version 2 File Format +#define TGA_VERSIONONE 1 // Version 1 File Format +#define TGA_VERSIONTWO 2 // Version 2 File Format // File Read Write Modes -const int GREYSC = 0; // Image is Greyscale -const int COLOUR = 1; // Image is Color -const int MAPPED = 2; // Image has a Color Map -const int RLENCO = 4; // Image is RLE Encoded +const int GREYSC = 0; // Image is Greyscale +const int COLOUR = 1; // Image is Color +const int MAPPED = 2; // Image has a Color Map +const int RLENCO = 4; // Image is RLE Encoded // 18 Byte Sturcture representin the basic definitions of // the image typedef struct _aTGAHEADER { - BYTE IDLength; // 00h Size of ID Field - BYTE ColorMapType; // 01h Color Map Type - BYTE ImageType; // 02h Image Type Code - WORD CMapStart; // 03h Color Map Origin - WORD CMapLength; // 05h Color Map Length - BYTE CMapDepth; // 07h Color Map Depth - WORD XOffset; // 08h X origin of Image - WORD YOffset; // 0Ah Y origin of Image - WORD Width; // 0Ch Width of Image - WORD Height; // 0Eh Height of Image - BYTE PixelDepth; // 10h Image Pixel Size - BYTE ImageDescriptor; // 11h Image Description Byte + BYTE IDLength; // 00h Size of ID Field + BYTE ColorMapType; // 01h Color Map Type + BYTE ImageType; // 02h Image Type Code + WORD CMapStart; // 03h Color Map Origin + WORD CMapLength; // 05h Color Map Length + BYTE CMapDepth; // 07h Color Map Depth + WORD XOffset; // 08h X origin of Image + WORD YOffset; // 0Ah Y origin of Image + WORD Width; // 0Ch Width of Image + WORD Height; // 0Eh Height of Image + BYTE PixelDepth; // 10h Image Pixel Size + BYTE ImageDescriptor; // 11h Image Description Byte } TGAHEADER; // The footer is 26 Bytes in length and is always at the end of a // TGA v2.0 file. typedef struct _aTGAFOOTER { - DWORD ExtensionOffset; // Extension Area Offset - DWORD DeveloperOffset; // Developer Directory Offset - CHAR Signature[18]; // TGA Signature + DWORD ExtensionOffset; // Extension Area Offset + DWORD DeveloperOffset; // Developer Directory Offset + CHAR Signature[18]; // TGA Signature } TGAFOOTER; typedef struct _aTGATAG { - WORD TagNumber; // ID Number of the Tag - DWORD DataOffset; // Offset Location of the Tag - DWORD DataSize; // Size of the Tag Data in Bytes + WORD TagNumber; // ID Number of the Tag + DWORD DataOffset; // Offset Location of the Tag + DWORD DataSize; // Size of the Tag Data in Bytes } TGATAG; // The extension area is basically the second header in the TGA v2.0 // file format. typedef struct _aTGAEXTENSION { - WORD Size; // Extension Size - CHAR AuthorName[41]; // Author Name - CHAR AuthorComment[324]; // Author Comment - WORD StampMonth; // Date/Time Stamp: Month - WORD StampDay; // Date/Time Stamp: Day - WORD StampYear; // Date/Time Stamp: Year - WORD StampHour; // Date/Time Stamp: Hour - WORD StampMinute; // Date/Time Stamp: Minute - WORD StampSecond; // Date/Time Stamp: Second - CHAR JobName[41]; // Job Name/ID - WORD JobHour; // Job Time: Hours - WORD JobMinute; // Job Time: Minutes - WORD JobSecond; // Job Time: Seconds - CHAR SoftwareId[41]; // Software ID - WORD VersionNumber; // Version Number of Software - BYTE VersionLetter; // Version Letter of Software - DWORD KeyColor; // Key Color - WORD PixelNumerator; // Pixel Aspect Ratio - WORD PixelDenominator; // Pixel Aspect Ratio - WORD GammaNumerator; // Gamma Value - WORD GammaDenominator; // Gamma Value - DWORD ColorOffset; // Color Correction Offset - DWORD StampOffset; // Postage Stamp Offset - DWORD ScanOffset; // Scanline Table Offset - BYTE AttributesType; // Attributes Type + WORD Size; // Extension Size + CHAR AuthorName[41]; // Author Name + CHAR AuthorComment[324]; // Author Comment + WORD StampMonth; // Date/Time Stamp: Month + WORD StampDay; // Date/Time Stamp: Day + WORD StampYear; // Date/Time Stamp: Year + WORD StampHour; // Date/Time Stamp: Hour + WORD StampMinute; // Date/Time Stamp: Minute + WORD StampSecond; // Date/Time Stamp: Second + CHAR JobName[41]; // Job Name/ID + WORD JobHour; // Job Time: Hours + WORD JobMinute; // Job Time: Minutes + WORD JobSecond; // Job Time: Seconds + CHAR SoftwareId[41]; // Software ID + WORD VersionNumber; // Version Number of Software + BYTE VersionLetter; // Version Letter of Software + DWORD KeyColor; // Key Color + WORD PixelNumerator; // Pixel Aspect Ratio + WORD PixelDenominator; // Pixel Aspect Ratio + WORD GammaNumerator; // Gamma Value + WORD GammaDenominator; // Gamma Value + DWORD ColorOffset; // Color Correction Offset + DWORD StampOffset; // Postage Stamp Offset + DWORD ScanOffset; // Scanline Table Offset + BYTE AttributesType; // Attributes Type } TGAEXTENSION; // The Color Correction Table is an array of 2048 Bytes in length, which // contians 256 entries used to store the values used for color remapping. typedef struct _aTGACOLORCORRECTIONTABLE { - SHORT Alpha; // Alpha Channel Seldom Used - SHORT Red; // Red Value of Correction - SHORT Green; // Green Value of Correction - SHORT Blue; // Green Value of Correction + SHORT Alpha; // Alpha Channel Seldom Used + SHORT Red; // Red Value of Correction + SHORT Green; // Green Value of Correction + SHORT Blue; // Green Value of Correction } TGACOLORCORRECTIONTABLE; -#define TRIALVERSION -1 // LIB was not initialized with a registered key - -#define IMGOK 0 // no err -#define MEMERR 1 // out of mem -#define FILEOPENERR 2 // error on file open -#define FILEREADERR 3 // error on file read -#define FILEWRITEERR 4 // error on file write -#define BADPARAMERR 5 // bad user param -#define INVALIDBMPERR 6 // bad BMP file -#define BMPRLEERR 7 // we don't do compressed (RLE) BMP files -#define INVALIDGIFERR 8 // bad GIF file -#define INVALIDJPGERR 9 // bad JPG file -#define IMGDCERR 10 // error with device context -#define IMGDIBERR 11 // problem with a GetDIBits call -#define NOGIFERR 12 // GIF support disabled -#define IMGNORESOURCE 13 // resource not found -#define CALLBACKCANCEL 14 // callback returned FALSE - operation aborted -#define INVALIDPNGERR 15 // bad PNG file -#define PNGCREATEERR 16 // internal PNG lib behavior - contact smaller animals s.w. -#define IMGDLLINTERNAL 17 // misc unexpected behavior error - contact smaller animals s.w. -#define IMGFONTERR 18 // trouble creating a font object -#define INTTIFFERR 19 // misc internal TIFF error -#define INVALIDTIFFERR 20 // invalid TIFF file -#define TIFFLZWNOTSUPPORTED 21 // this will not read TIFF-LZW iamges -#define INVALIDPCXERR 22 // invalid PCX image -#define CREATEBMPERR 23 // a call to the fn CreateCompatibleBitmap failed -#define IMGNOLINES 24 // end of an image while using single-line de/compression -#define GETDIBERR 25 // error during a call to GetDIBits -#define DEVOPNOSUPPORT 26 // device does not support an operation required by this function -#define INVALIDWMF 27 // invalid windows metafile -#define DEPTHMISMATCHERR 28 // the file was not of the requested bit-depth -#define INVALIDTGAERR 35 // Invalid TGA File -#define NOTGATHUMBNAIL 36 // No TGA Thumbnail in the file +#define TRIALVERSION -1 // LIB was not initialized with a registered key + +#define IMGOK 0 // no err +#define MEMERR 1 // out of mem +#define FILEOPENERR 2 // error on file open +#define FILEREADERR 3 // error on file read +#define FILEWRITEERR 4 // error on file write +#define BADPARAMERR 5 // bad user param +#define INVALIDBMPERR 6 // bad BMP file +#define BMPRLEERR 7 // we don't do compressed (RLE) BMP files +#define INVALIDGIFERR 8 // bad GIF file +#define INVALIDJPGERR 9 // bad JPG file +#define IMGDCERR 10 // error with device context +#define IMGDIBERR 11 // problem with a GetDIBits call +#define NOGIFERR 12 // GIF support disabled +#define IMGNORESOURCE 13 // resource not found +#define CALLBACKCANCEL 14 // callback returned FALSE - operation aborted +#define INVALIDPNGERR 15 // bad PNG file +#define PNGCREATEERR 16 // internal PNG lib behavior - contact smaller animals s.w. +#define IMGDLLINTERNAL 17 // misc unexpected behavior error - contact smaller animals s.w. +#define IMGFONTERR 18 // trouble creating a font object +#define INTTIFFERR 19 // misc internal TIFF error +#define INVALIDTIFFERR 20 // invalid TIFF file +#define TIFFLZWNOTSUPPORTED 21 // this will not read TIFF-LZW iamges +#define INVALIDPCXERR 22 // invalid PCX image +#define CREATEBMPERR 23 // a call to the fn CreateCompatibleBitmap failed +#define IMGNOLINES 24 // end of an image while using single-line de/compression +#define GETDIBERR 25 // error during a call to GetDIBits +#define DEVOPNOSUPPORT 26 // device does not support an operation required by this function +#define INVALIDWMF 27 // invalid windows metafile +#define DEPTHMISMATCHERR 28 // the file was not of the requested bit-depth +#define INVALIDTGAERR 35 // Invalid TGA File +#define NOTGATHUMBNAIL 36 // No TGA Thumbnail in the file #pragma pack() @@ -165,71 +165,71 @@ class TGAFile BOOL IsFileTGA(const char* fileName); - LPVOID LoadTGA(const char* fileName, // Name of file - UINT32* width, // Width in Pixel - UINT32* height); // Height + LPVOID LoadTGA(const char* fileName, // Name of file + UINT32* width, // Width in Pixel + UINT32* height); // Height - HGLOBAL LoadTGA8Bit(const char* fileName, // Name of File - UINT32* width, // Width in pixels - UINT32* height, // Height - RGBQUAD* pal); // Palette of RGBQUADS + HGLOBAL LoadTGA8Bit(const char* fileName, // Name of File + UINT32* width, // Width in pixels + UINT32* height, // Height + RGBQUAD* pal); // Palette of RGBQUADS BOOL GetTGADims(const char* fileName, UINT32* width, UINT32* height); - BOOL SaveTGA32(const char* fileName, // output path - BYTE* inBuf, // RGB buffer - UINT32 width, // size + BOOL SaveTGA32(const char* fileName, // output path + BYTE* inBuf, // RGB buffer + UINT32 width, // size UINT32 height); - BOOL Save8BitTGA(const char* fileName, // output path - BYTE* colormappedbuffer, // one BYTE per pixel colomapped image - UINT32 width, // Width of image - UINT32 height, // Height of image - __int32 colors, // number of colors (number of RGBQUADs) - RGBQUAD* colormap); // array of RGBQUADs + BOOL Save8BitTGA(const char* fileName, // output path + BYTE* colormappedbuffer, // one BYTE per pixel colomapped image + UINT32 width, // Width of image + UINT32 height, // Height of image + __int32 colors, // number of colors (number of RGBQUADs) + RGBQUAD* colormap); // array of RGBQUADs - HGLOBAL LoadTGAThumbnail(const char* fileName, // Name of file - UINT32* width, // Width in Pixel - UINT32* height); // Height + HGLOBAL LoadTGAThumbnail(const char* fileName, // Name of file + UINT32* width, // Width in Pixel + UINT32* height); // Height private: // Parameters - char TGA_ImageIDFeild[256]; // Text in file - BYTE TGA_Attribute; // Number of attribute bytes per pixel - // i.e. 1 for T16 and 8 for T32 - UINT32 mode; // Mode of current Read or Write + char TGA_ImageIDFeild[256]; // Text in file + BYTE TGA_Attribute; // Number of attribute bytes per pixel + // i.e. 1 for T16 and 8 for T32 + UINT32 mode; // Mode of current Read or Write // RLE Decompression Variables - BYTE Red, // Stores pixel value for - Grn, // RLE series of oixels + BYTE Red, // Stores pixel value for + Grn, // RLE series of oixels Blu, Alpha; - UINT32 l; // Used when 8 bit files use RLE - __int32 RLECount, RLEFlag; // Indicates whether the RLE series - // is still going or is finished + UINT32 l; // Used when 8 bit files use RLE + __int32 RLECount, RLEFlag; // Indicates whether the RLE series + // is still going or is finished private: // Operations - __int32 TGA_GetFileVersion(FILE* fp); // Determines whether this is a V1.0 - // or V2.0 TGA File - BOOL TGA_GetMapEntry(BYTE* Red, // Get the Color Values out of the - BYTE* Green, // Color map in the TGA File - BYTE* Blue, // Return TRUE on Success + __int32 TGA_GetFileVersion(FILE* fp); // Determines whether this is a V1.0 + // or V2.0 TGA File + BOOL TGA_GetMapEntry(BYTE* Red, // Get the Color Values out of the + BYTE* Green, // Color map in the TGA File + BYTE* Blue, // Return TRUE on Success BYTE* Alpha, FILE* fp, UINT32 Depth); // version that takes a file ptr - BOOL TGA_GetPixelValue(BYTE* Red, // Get and parse a single pixel value - BYTE* Grn, // from the TGA file. Handles Unencoding - BYTE* Blu, // of RLE encoded files. - BYTE* Alp, // plus Alpha (08jan00/bgw) + BOOL TGA_GetPixelValue(BYTE* Red, // Get and parse a single pixel value + BYTE* Grn, // from the TGA file. Handles Unencoding + BYTE* Blu, // of RLE encoded files. + BYTE* Alp, // plus Alpha (08jan00/bgw) FILE* fp, UINT32 PixelDepth, RGBQUAD* CMap); // version that takes a buffer ptr - BOOL TGA_GetPixelValue(BYTE* Red, // Get and parse a single pixel value - BYTE* Grn, // from the TGA file. Handles Unencoding - BYTE* Blu, // of RLE encoded files. - BYTE* Alp, // plus Alpha (08jan00/bgw) + BOOL TGA_GetPixelValue(BYTE* Red, // Get and parse a single pixel value + BYTE* Grn, // from the TGA file. Handles Unencoding + BYTE* Blu, // of RLE encoded files. + BYTE* Alp, // plus Alpha (08jan00/bgw) BYTE** ppTGAData, UINT32 PixelDepth, RGBQUAD* CMap); }; @@ -345,9 +345,9 @@ BOOL TGAFile::IsFileTGA(const char* fileName) long rc = fread(&tgahd, 1, sizeof(TGAHEADER), fp); fclose(fp); - if ((rc == sizeof(TGAHEADER)) && // must be big enough for a header... - (tgahd.PixelDepth == 32) && // 32-bit TGAs only - (tgahd.ImageType == TGA_RAWRGBTYPE)) // Raw RGBA format only + if ((rc == sizeof(TGAHEADER)) && // must be big enough for a header... + (tgahd.PixelDepth == 32) && // 32-bit TGAs only + (tgahd.ImageType == TGA_RAWRGBTYPE)) // Raw RGBA format only return (TRUE); return (FALSE); @@ -580,7 +580,7 @@ TGAFile::LoadTGA(const char* fileName, UINT32* width, UINT32* height) *(pRGB + destOffset + 3) = Alp; destOffset += 4; } -#if 0 // even faster! +#if 0 // even faster! // Red = *(gpImageReadBufPos++); // Grn = *(gpImageReadBufPos++); // Blu = *(gpImageReadBufPos++); @@ -623,10 +623,10 @@ TGAFile::LoadTGA(const char* fileName, UINT32* width, UINT32* height) // associated with that buffer, if the image is 8 Bit, else // it sets global error to DEPTHMISMATCHERR HGLOBAL -TGAFile::LoadTGA8Bit(const char* fileName, // Name of File - UINT32* width, // Width in pixels - UINT32* height, // Height - RGBQUAD* pal) // Palette of RGBQUADS +TGAFile::LoadTGA8Bit(const char* fileName, // Name of File + UINT32* width, // Width in pixels + UINT32* height, // Height + RGBQUAD* pal) // Palette of RGBQUADS { HGLOBAL hNew = NULL; BYTE* pRGB = NULL; @@ -767,12 +767,12 @@ TGAFile::LoadTGA8Bit(const char* fileName, // Name of File TGA_GetPixelValue(&Red, &Grn, &Blu, &Alp, fp, tgahd.PixelDepth, pal); // Invert if the image origin is in Bottom left - if (TGA_Origin == 0) { // Bottom Left Origin + if (TGA_Origin == 0) { // Bottom Left Origin *(pRGB + destOffset) = Red; destOffset = ((tgahd.Height - 1) - row) * tgahd.Width + col; } else - { // Top Left Origin + { // Top Left Origin *(pRGB + destOffset) = Red; destOffset++; } @@ -797,9 +797,9 @@ TGAFile::LoadTGA8Bit(const char* fileName, // Name of File // Reads and returns it in a 24 Bit RGB Buffer if a thumbnail // exists. Returns NULL if there isn't one sets TGANOTHUMBNAIL HGLOBAL -TGAFile::LoadTGAThumbnail(const char* fileName, // Name of file - UINT32* width, // Width in Pixel - UINT32* height // Height +TGAFile::LoadTGAThumbnail(const char* fileName, // Name of file + UINT32* width, // Width in Pixel + UINT32* height // Height ) { HGLOBAL hNew = NULL; @@ -958,9 +958,9 @@ TGAFile::LoadTGAThumbnail(const char* fileName, // Name of file /////////////////////////////////////////////////////////////////////////////////// // SaveTGA32 // Saves the buffer as a 32 bit True Color Image in TGA format -BOOL TGAFile::SaveTGA32(const char* fileName, // output path - BYTE* inBuf, // BGR buffer - UINT32 width, // size in pixels +BOOL TGAFile::SaveTGA32(const char* fileName, // output path + BYTE* inBuf, // BGR buffer + UINT32 width, // size in pixels UINT32 height) { long lResult = 0; @@ -1063,12 +1063,12 @@ BOOL TGAFile::SaveTGA32(const char* fileName, // output path // Save8BitTGA // Save's to an 8 Bit Color mapped file using the Palette // passed in to the function. -BOOL TGAFile::Save8BitTGA(const char* fileName, // output path - BYTE* inBuf, // one BYTE per pixel colomapped image - UINT32 width, // Width of Image - UINT32 height, // Height of Image - __int32 colors, // number of colors (number of RGBQUADs) - RGBQUAD* colormap) // array of RGBQUADs +BOOL TGAFile::Save8BitTGA(const char* fileName, // output path + BYTE* inBuf, // one BYTE per pixel colomapped image + UINT32 width, // Width of Image + UINT32 height, // Height of Image + __int32 colors, // number of colors (number of RGBQUADs) + RGBQUAD* colormap) // array of RGBQUADs { long lResult = 0; @@ -1170,7 +1170,7 @@ BOOL TGAFile::TGA_GetMapEntry(BYTE* Red, BYTE* Green, BYTE* Blue, BYTE* Alpha, F switch (Depth) { - case 8: // Greyscale Read and Triplicate + case 8: // Greyscale Read and Triplicate lResult = fread(&i, 1, 1, fp); // Check for error @@ -1185,9 +1185,9 @@ BOOL TGAFile::TGA_GetMapEntry(BYTE* Red, BYTE* Green, BYTE* Blue, BYTE* Alpha, F b = i; break; - case 16: // 5 bits each of Red, Green, and Blue + case 16: // 5 bits each of Red, Green, and Blue - case 15: // Watch for the Byte order + case 15: // Watch for the Byte order lResult = fread(&j, 1, 1, fp); lResult = lResult + fread(&k, 1, 1, fp); @@ -1202,9 +1202,9 @@ BOOL TGAFile::TGA_GetMapEntry(BYTE* Red, BYTE* Green, BYTE* Blue, BYTE* Alpha, F r = (BYTE)((l & 31) << 3); break; - case 32: // Read the Alpha bit a Throw it away + case 32: // Read the Alpha bit a Throw it away - case 24: // Eight bits for each Red, Green and Blue + case 24: // Eight bits for each Red, Green and Blue lResult = fread(&i, 1, 1, fp); r = i; lResult = lResult + fread(&i, 1, 1, fp); @@ -1328,7 +1328,7 @@ BOOL TGAFile::TGA_GetPixelValue( // Check for Run Length Encoding if ((mode & RLENCO) != 0) { - if (RLECount == 0) { // Restrat the rum + if (RLECount == 0) { // Restrat the rum lResult = fread(&i, 1, 1, fp); if (lResult != 1) { @@ -1337,14 +1337,14 @@ BOOL TGAFile::TGA_GetPixelValue( } RLEFlag = (i & 0x80) >> 7; - if (RLEFlag == 0) { // Stream of unencoded pixels + if (RLEFlag == 0) { // Stream of unencoded pixels RLECount = i + 1; } else - { // Single Pixel Replicated + { // Single Pixel Replicated RLECount = i - 127; } - RLECount--; // ecrement count and get pixel + RLECount--; // ecrement count and get pixel } else { @@ -1361,7 +1361,7 @@ BOOL TGAFile::TGA_GetPixelValue( // Rea the appropiate number of BYTES and break into RGB switch (PixelDepth) { - case 8: // Greyscale Read 1 Byte and Triplicate + case 8: // Greyscale Read 1 Byte and Triplicate lResult = fread(&i, 1, 1, fp); if (lResult != 1) { @@ -1374,9 +1374,9 @@ BOOL TGAFile::TGA_GetPixelValue( l = i; break; - case 16: // 1 Bit alpha not used + case 16: // 1 Bit alpha not used - case 15: // Five bits each for RGB watch byte ordering + case 15: // Five bits each for RGB watch byte ordering lResult = fread(&j, 1, 1, fp); lResult = lResult + fread(&k, 1, 1, fp); @@ -1391,7 +1391,7 @@ BOOL TGAFile::TGA_GetPixelValue( Red = (BYTE)((l & 31) << 3); break; - case 24: // Eight bits each for RGB + case 24: // Eight bits each for RGB lResult = fread(&i, 1, 1, fp); Red = i; lResult = lResult + fread(&i, 1, 1, fp); @@ -1409,7 +1409,7 @@ BOOL TGAFile::TGA_GetPixelValue( } break; - case 32: // With alpha (08jan00/bgw) + case 32: // With alpha (08jan00/bgw) lResult = fread(&i, 1, 1, fp); Red = i; lResult = lResult + fread(&i, 1, 1, fp); @@ -1426,19 +1426,19 @@ BOOL TGAFile::TGA_GetPixelValue( } break; - default: // Unknown number of bis per pixel + default: // Unknown number of bis per pixel m_error = INVALIDTGAERR; return NULL; } -PixelEncode: // Set the actual pixel values +PixelEncode: // Set the actual pixel values if ((mode & MAPPED) == MAPPED) { // Remap Color Mapped Pixels *rRed = CColMap[l].rgbRed; *rGrn = CColMap[l].rgbGreen; *rBlu = CColMap[l].rgbBlue; - *rAlp = 0xFF; // opaque always (08jan00/bgw) + *rAlp = 0xFF; // opaque always (08jan00/bgw) } else { diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.c index c76a779d504..bb2973b1a04 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.c @@ -18,23 +18,23 @@ Copyright 2000 GameSpy Industries, Inc #define CLIENT_THINK_TIME 30 -static GT2Socket Socket; // The socket used to connect to the server -static GT2Connection Connection; // The connection to the server. -float localRotation; // The local rotation, >=0, <360. -char serverAddress[128]; // Address of the server. -int localMotion; // STILL, FORWARD, BACKWARD. -int localTurning; // STILL, LEFT, RIGHT. -Player players[MAX_PLAYERS]; // The list of players. -GT2Bool connected; // True once we received the start message. -int localIndex = -1; // The local player's index into the players table. -unsigned long lastServerUpdate; // The last time we received an update from the server. -char localNick[MAX_NICK] = "Player"; // The local player's nick. -CObject cObjects[MAX_OBJECTS]; // The list of objects. -UpdateInfo updateHistory[UPDATE_HISTORY_LEN]; // Time diff for past updates -int updateHistoryStart; // The starting index of the history. -int ClientNumAsteroids; // The number of asteroids we're holding. -static unsigned short nextServerUpdateID; // The expected ID of the next update. -static unsigned short nextClientUpdateID; // The ID of our next update. +static GT2Socket Socket; // The socket used to connect to the server +static GT2Connection Connection; // The connection to the server. +float localRotation; // The local rotation, >=0, <360. +char serverAddress[128]; // Address of the server. +int localMotion; // STILL, FORWARD, BACKWARD. +int localTurning; // STILL, LEFT, RIGHT. +Player players[MAX_PLAYERS]; // The list of players. +GT2Bool connected; // True once we received the start message. +int localIndex = -1; // The local player's index into the players table. +unsigned long lastServerUpdate; // The last time we received an update from the server. +char localNick[MAX_NICK] = "Player"; // The local player's nick. +CObject cObjects[MAX_OBJECTS]; // The list of objects. +UpdateInfo updateHistory[UPDATE_HISTORY_LEN]; // Time diff for past updates +int updateHistoryStart; // The starting index of the history. +int ClientNumAsteroids; // The number of asteroids we're holding. +static unsigned short nextServerUpdateID; // The expected ID of the next update. +static unsigned short nextClientUpdateID; // The ID of our next update. // Stats. ///////// diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.h index fb172ef941f..e898147c149 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aClient.h @@ -18,30 +18,30 @@ Copyright 2000 GameSpy Industries, Inc typedef struct Player { - GT2Bool used; // If this slot is in use or not. - V2f position; // The current position (0 <= x,y < MAP_MAX). - float rotation; // Client's view angle (0 <= rotation < 360). - int motion; // The client's current motion (STILL, FORWARD, BACKWARD). - int turning; // The client's current tunring direction (STILL, LEFT, RIGHT). - char nick[MAX_NICK]; // The client's nick. - int score; // The client's score. - GT2Bool dead; // True if this client is currently dead. - float roll; // How much to roll them (-1->0->1). + GT2Bool used; // If this slot is in use or not. + V2f position; // The current position (0 <= x,y < MAP_MAX). + float rotation; // Client's view angle (0 <= rotation < 360). + int motion; // The client's current motion (STILL, FORWARD, BACKWARD). + int turning; // The client's current tunring direction (STILL, LEFT, RIGHT). + char nick[MAX_NICK]; // The client's nick. + int score; // The client's score. + GT2Bool dead; // True if this client is currently dead. + float roll; // How much to roll them (-1->0->1). } Player; typedef struct CObject { - GT2Bool used; // If this slot is in use or not. - ObjectType type; // The type of object. - V2f position; // The object's position. - float rotation; // The object's rotation. - unsigned long totalTime; // The amount of time this object has existed. + GT2Bool used; // If this slot is in use or not. + ObjectType type; // The type of object. + V2f position; // The object's position. + float rotation; // The object's rotation. + unsigned long totalTime; // The amount of time this object has existed. } CObject; typedef struct UpdateInfo { - int diff; // Time since the last update was received. - int len; // Length of the update, in bytes. + int diff; // Time since the last update was received. + int len; // Length of the update, in bytes. } UpdateInfo; extern float localRotation; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aInput.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aInput.c index c6ed1258c78..d8a93a7d96b 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aInput.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aInput.c @@ -43,7 +43,7 @@ static void KeyboardPress(unsigned char key, int x, int y) switch (key) { - case 0x1B: // esc + case 0x1B: // esc ShutdownDisplay(); exit(1); @@ -189,14 +189,14 @@ static void ChatKeyboardPress(unsigned char key, int x, int y) { switch (key) { - case 0x1B: // esc + case 0x1B: // esc // Back to normal keyboard handling. //////////////////////////////////// SetKeyboardNormal(); return; - case 0x0D: // enter + case 0x0D: // enter // Send the current chat message. ///////////////////////////////// ChatSend(); @@ -207,8 +207,8 @@ static void ChatKeyboardPress(unsigned char key, int x, int y) return; - case 0x08: // backspace - case 0x7F: // delete + case 0x08: // backspace + case 0x7F: // delete ChatBackspace(); break; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aLogic.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aLogic.h index 66dbf1d64ae..880cffa5d65 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aLogic.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aLogic.h @@ -13,20 +13,20 @@ Copyright 2000 GameSpy Industries, Inc #include "gt2aServer.h" -#define PLAYER_SPEED 7000 // units/second -#define PLAYER_TURN_SPEED 0.14 // degrees/millisecond +#define PLAYER_SPEED 7000 // units/second +#define PLAYER_TURN_SPEED 0.14 // degrees/millisecond #define PLAYER_RADIUS 200 #define PLAYER_MAX_ASTEROIDS 50 #define DEATH_TIME 1000 -#define PRESS_TIME 100 // time between presses +#define PRESS_TIME 100 // time between presses #define MAX_OBJECTS 256 #define ROCKET_RADIUS 250 #define ROCKET_SPEED 10500 #define MINE_TIME 30000 #define MINE_ARM_TIME 1000 -#define MINE_TURN_SPEED 0.36 // degrees/millisecond -#define MINE_RADIUS 200 // 141 +#define MINE_TURN_SPEED 0.36 // degrees/millisecond +#define MINE_RADIUS 200 // 141 #define NUM_ASTEROIDS 50 #define ASTEROID_TURN_SPEED 0.18 #define ASTEROID_TURN_RANGE 0.24 @@ -51,23 +51,23 @@ typedef void (*TouchClient)(struct SObject* self, struct Client* client); typedef struct SObject { - GT2Bool used; // If this slot is in use or not. - ObjectType type; // The type of object. - int owner; // The client that owns this object, or -1. - V2f position; // The object's position. - float rotation; // The object's rotation. - unsigned long startTime; // The time this object was created. - Think think; // This object's think function. - TouchObject touchObject; // Called when touching another object. - TouchClient touchClient; // Called when touching a client. - Die die; // Called when the object dies. - int count; // Generic counter. - float radius; // This object's radius (for collision). - GT2Bool explode; // Explode this object when done thinking. - GT2Bool remove; // Remove this object when done thinking. - - float heading; // The direction the object is moving - float speed; // The speed of the object + GT2Bool used; // If this slot is in use or not. + ObjectType type; // The type of object. + int owner; // The client that owns this object, or -1. + V2f position; // The object's position. + float rotation; // The object's rotation. + unsigned long startTime; // The time this object was created. + Think think; // This object's think function. + TouchObject touchObject; // Called when touching another object. + TouchClient touchClient; // Called when touching a client. + Die die; // Called when the object dies. + int count; // Generic counter. + float radius; // This object's radius (for collision). + GT2Bool explode; // Explode this object when done thinking. + GT2Bool remove; // Remove this object when done thinking. + + float heading; // The direction the object is moving + float speed; // The speed of the object } SObject; extern SObject sObjects[MAX_OBJECTS]; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aServer.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aServer.h index 4d79f01d751..530d1d51bb3 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aServer.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aServer.h @@ -15,20 +15,20 @@ Copyright 2000 GameSpy Industries, Inc typedef struct Client { - GT2Bool used; // If this slot is in use or not. - int index; // This client's clientIndex. - GT2Connection connection; // The GT2Connection for this client. - V2f position; // The current position (0 <= x,y < MAP_MAX). - float rotation; // Client's view angle (0 <= rotation < 360). - int motion; // Client's current motion (STILL, FORWARD, BACKWARD). - int turning; // Client's current turning direction (STILL, LEFT, RIGHT). - unsigned long lastUpdate; // Last update received from this client. - char nick[MAX_NICK]; // The client's nick. - int score; // The client's score. - GT2Bool dead; // True if this client was killed and not respawned. - unsigned long spawnTime; // If dead, spawn at this time. - unsigned long lastPress; // When the last press event was received. - int numAsteroids; // The number of asteroids being held by this player. + GT2Bool used; // If this slot is in use or not. + int index; // This client's clientIndex. + GT2Connection connection; // The GT2Connection for this client. + V2f position; // The current position (0 <= x,y < MAP_MAX). + float rotation; // Client's view angle (0 <= rotation < 360). + int motion; // Client's current motion (STILL, FORWARD, BACKWARD). + int turning; // Client's current turning direction (STILL, LEFT, RIGHT). + unsigned long lastUpdate; // Last update received from this client. + char nick[MAX_NICK]; // The client's nick. + int score; // The client's score. + GT2Bool dead; // True if this client was killed and not respawned. + unsigned long spawnTime; // If dead, spawn at this time. + unsigned long lastPress; // When the last press event was received. + int numAsteroids; // The number of asteroids being held by this player. } Client; extern Client clients[MAX_CLIENTS]; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aSound.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aSound.c index ea8f7eff9ac..ae81d87eaef 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aSound.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2action/gt2aSound.c @@ -37,8 +37,8 @@ const char* soundFiles[] = { /////////////////////////////////////////////// static HRESULT ReadMMIO(HMMIO hmmioIn, MMCKINFO* pckInRIFF, WAVEFORMATEX** ppwfxInfo) { - MMCKINFO ckIn; // chunk info. for general use. - PCMWAVEFORMAT pcmWaveFormat; // Temp PCM structure to load in. + MMCKINFO ckIn; // chunk info. for general use. + PCMWAVEFORMAT pcmWaveFormat; // Temp PCM structure to load in. *ppwfxInfo = NULL; @@ -134,7 +134,7 @@ static HRESULT WaveStartDataRead(HMMIO* phmmioIn, MMCKINFO* pckIn, MMCKINFO* pck /////////////////////////////////////////////// static HRESULT WaveReadFile(HMMIO hmmioIn, UINT cbRead, BYTE* pbDest, MMCKINFO* pckIn, UINT* cbActualRead) { - MMIOINFO mmioinfoIn; // current status of + MMIOINFO mmioinfoIn; // current status of UINT cbDataIn; DWORD cT; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2hostmig/gt2hostmig.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2hostmig/gt2hostmig.c index 9b6e9942fd9..b3974b7b7c9 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2hostmig/gt2hostmig.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2hostmig/gt2hostmig.c @@ -30,7 +30,7 @@ Copyright 2000 GameSpy Industries, Inc #define PORT 12345 #define MAX_CLIENTS 8 #define TIMEOUT (30 * 1000) -#define SEND_TIME 500 // (10 * 1000) +#define SEND_TIME 500 // (10 * 1000) #define REPORT diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/StdAfx.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/StdAfx.h index 16fd79a1909..2de7ada7bfd 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/StdAfx.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/StdAfx.h @@ -8,17 +8,17 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers -#include // MFC Automation classes -#include // MFC support for Internet Explorer 4 Common Controls -#include // MFC extensions -#include // MFC core and standard components +#include // MFC Automation classes +#include // MFC support for Internet Explorer 4 Common Controls +#include // MFC extensions +#include // MFC core and standard components #ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT #include "../../darray.h" #include "../gt2.h" @@ -26,4 +26,4 @@ //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_STDAFX_H__7F1931C4_E9E9_49E1_A6DC_8ACC78E87145__INCLUDED_) +#endif // !defined(AFX_STDAFX_H__7F1931C4_E9E9_49E1_A6DC_8ACC78E87145__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.h index 491e510da8e..8dd92591d17 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.h @@ -6,13 +6,13 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif -#include "resource.h" // main symbols +#include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CGt2testApp: @@ -45,4 +45,4 @@ class CGt2testApp : public CWinApp //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_GT2TEST_H__BDC522B0_AA93_4D1B_8271_A3CFD716E950__INCLUDED_) +#endif // !defined(AFX_GT2TEST_H__BDC522B0_AA93_4D1B_8271_A3CFD716E950__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.rc b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.rc index 32c6b676d89..50053688dbb 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.rc +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2test.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 +#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -53,7 +53,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US "#endif\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -146,7 +146,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US "1, 0, 0, 1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END -#endif // !_MAC +#endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // @@ -156,9 +156,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_GT2TEST_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 340 VERTGUIDE, 15 VERTGUIDE, 332 TOPMARGIN, 7 BOTTOMMARGIN, 324 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -176,10 +176,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE 9, 1 #pragma code_page(1252) -#endif //_WIN32 -#include "afxres.rc" // Standard components -#include "res\gt2test.rc2" // non-Microsoft Visual C++ edited resources +#endif //_WIN32 +#include "afxres.rc" // Standard components +#include "res\gt2test.rc2" // non-Microsoft Visual C++ edited resources #endif ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.cpp b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.cpp index 3014e097285..701baaeca01 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.cpp +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.cpp @@ -584,7 +584,7 @@ void CGt2testDlg::SetActiveConnection(GT2Connection connection, int nIndex) void CGt2testDlg::SetActiveConnection(GT2Connection connection) { int nIndex = GetConnectionIndex(connection); - ASSERT(nIndex != -1); // tried to activate a bad connection + ASSERT(nIndex != -1); // tried to activate a bad connection if (nIndex == -1) return; SetActiveConnection(connection, nIndex); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.h b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.h index a47082a5b36..f825cc5150c 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2test/gt2testDlg.h @@ -6,7 +6,7 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// // CGt2testDlg dialog @@ -57,7 +57,7 @@ class CGt2testDlg : public CDialog void EnableSocketControls(BOOL enable = TRUE); void EnableListenControls(BOOL enable = TRUE); void EnableConnectionControls(BOOL enable = TRUE); - CGt2testDlg(CWnd* pParent = NULL); // standard constructor + CGt2testDlg(CWnd* pParent = NULL); // standard constructor DArray m_delayedSends; DArray m_delayedReceives; @@ -112,8 +112,8 @@ class CGt2testDlg : public CDialog virtual BOOL PreTranslateMessage(MSG* pMsg); protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL // Implementation protected: @@ -163,4 +163,4 @@ class CGt2testDlg : public CDialog //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_GT2TESTDLG_H__0E64F324_FFA4_4A94_A87D_75652134DC2D__INCLUDED_) +#endif // !defined(AFX_GT2TESTDLG_H__0E64F324_FFA4_4A94_A87D_75652134DC2D__INCLUDED_) diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2testc/gt2testc.c b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2testc/gt2testc.c index d85e8158747..1e0a07aaa9d 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2testc/gt2testc.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/gt2/gt2testc/gt2testc.c @@ -35,10 +35,10 @@ GT2Connection Connection; Message initialMessage = {GT2True, "123456789012345", -1}; -Message messageList[] = {{GT2True, NULL, 0, GT2True}, // empty - {GT2True, "1", 1, GT2True}, // 1 byte XXX - {GT2True, "1234567", 7, GT2True}, // 7 bytes XXX - {GT2True, "12345678901234567890123456789012345678901234567890", 50, GT2True}, // 50 bytes +Message messageList[] = {{GT2True, NULL, 0, GT2True}, // empty + {GT2True, "1", 1, GT2True}, // 1 byte XXX + {GT2True, "1234567", 7, GT2True}, // 7 bytes XXX + {GT2True, "12345678901234567890123456789012345678901234567890", 50, GT2True}, // 50 bytes {GT2True, FILL_IN, 128, GT2True}, {GT2True, FILL_IN, 256, GT2True}, {GT2True, FILL_IN, 512, GT2True}, {GT2True, FILL_IN, 768, GT2True}, {GT2True, FILL_IN, 1024, GT2True}, {GT2True, FILL_IN, 1400, GT2True}, #if !defined(_NITRO) @@ -47,18 +47,18 @@ Message messageList[] = {{GT2True, NULL, 0, GT2True}, {GT2True, FILL_IN, (5 * 1024) - 1, GT2True}, {GT2True, FILL_IN, (7 * 1024) - 1, GT2True}, #if !defined(_PS2) && !defined(_PSP) {GT2True, FILL_IN, (8 * 1024) + 1017, GT2True}, -#if !defined(_MACOSX) && !defined(_PS3) // Maximum send size for PS3 is 9216 +#if !defined(_MACOSX) && !defined(_PS3) // Maximum send size for PS3 is 9216 {GT2True, FILL_IN, (9 * 1024) - 1, GT2True}, {GT2True, FILL_IN, (32 * 1024) - 1, GT2True}, #endif #endif #endif #endif #if !defined(_NITRO) && !defined(_REVOLUTION) - {GT2True, NULL, 0, GT2False}, // empty + {GT2True, NULL, 0, GT2False}, // empty #endif - {GT2True, "1", 1, GT2False}, // 1 byte XXX - {GT2True, "1234567", 7, GT2False}, // 7 bytes XXX - {GT2True, "12345678901234567890123456789012345678901234567890", 50, GT2False}, // 50 bytes + {GT2True, "1", 1, GT2False}, // 1 byte XXX + {GT2True, "1234567", 7, GT2False}, // 7 bytes XXX + {GT2True, "12345678901234567890123456789012345678901234567890", 50, GT2False}, // 50 bytes {GT2True, FILL_IN, 128, GT2False}, {GT2True, FILL_IN, 256, GT2False}, {GT2True, FILL_IN, 512, GT2False}, {GT2True, FILL_IN, 768, GT2False}, {GT2True, FILL_IN, 1024, GT2False}, {GT2True, FILL_IN, 1400, GT2False}, #if !defined(_NITRO) @@ -67,7 +67,7 @@ Message messageList[] = {{GT2True, NULL, 0, GT2True}, {GT2True, FILL_IN, (5 * 1024) - 1, GT2False}, {GT2True, FILL_IN, (7 * 1024) - 1, GT2False}, #if !defined(_PS2) && !defined(_PSP) {GT2True, FILL_IN, (9 * 1024), GT2False}, -#if !defined(_MACOSX) && !defined(_PS3) // Maximum send size for PS3 is 9216 +#if !defined(_MACOSX) && !defined(_PS3) // Maximum send size for PS3 is 9216 {GT2True, FILL_IN, (9 * 1024) + 1, GT2False}, #endif #endif @@ -283,7 +283,7 @@ static void EncodeTest() } #endif -#ifdef __MWERKS__ // CodeWarrior will warn if function not prototyped +#ifdef __MWERKS__ // CodeWarrior will warn if function not prototyped int test_main(int argc, char** argv); #endif @@ -378,7 +378,7 @@ int test_main(int argc, char** argv) gt2Listen(socket, ConnectAttemptCallback); printf("Listening for incoming connections [%s]...\n", localAddress); - while (gsi_true) /// now we just think forever! + while (gsi_true) /// now we just think forever! { gt2Think(socket); if (hardcore) @@ -436,8 +436,8 @@ int test_main(int argc, char** argv) { sendTime = current_time(); maxWait = (unsigned long)((message->reliable) ? 120000 : 20000); - while (sendTime != 0 && current_time() - sendTime < maxWait && - !quit) // wait a max of 20 sec for the reply + while ( + sendTime != 0 && current_time() - sendTime < maxWait && !quit) // wait a max of 20 sec for the reply { gt2Think(socket); msleep(5); @@ -450,7 +450,7 @@ int test_main(int argc, char** argv) } } if (Connection) gt2CloseConnection(Connection); - } while (!server && (++count < 3)); // if client do the sequence 3 times + } while (!server && (++count < 3)); // if client do the sequence 3 times gt2CloseSocket(socket); diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.c b/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.c index 7c1db05e17d..f322ce0a9cc 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.c @@ -26,7 +26,7 @@ #define gsirealloc realloc #include #else -#include "nonport.h" //for gsimalloc/realloc/free/assert +#include "nonport.h" //for gsimalloc/realloc/free/assert #endif struct HashImplementation @@ -58,7 +58,7 @@ HashTable TableNew2( table->buckets = (DArray*)gsimalloc(nBuckets * sizeof(DArray)); assert(table->buckets); - for (i = 0; i < nBuckets; i++) // ArrayNew will assert if allocation fails + for (i = 0; i < nBuckets; i++) // ArrayNew will assert if allocation fails table->buckets[i] = ArrayNew(elemSize, nChains, freeFn); table->nbuckets = nBuckets; table->freefn = freeFn; diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.h b/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.h index 0bc959610bd..21e8ece2425 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/hashtable.h @@ -215,4 +215,4 @@ void TableClear(HashTable table); } #endif -#endif //_HASHTABLE_H +#endif //_HASHTABLE_H diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sake.h b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sake.h index e89c6eacf06..74cc461069f 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sake.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sake.h @@ -339,9 +339,9 @@ gsi_bool SAKE_CALL sakeGetFileIdFromHeaders(const char* headers, int* fileId); /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if defined(__cplusplus) -} // extern "C" +} // extern "C" #endif /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __SAKE_H__ +#endif // __SAKE_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeMain.h b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeMain.h index 00899e1e96c..3e3f7acff75 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeMain.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeMain.h @@ -38,9 +38,9 @@ typedef struct SAKEInternal /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if defined(__cplusplus) -} // extern "C" +} // extern "C" #endif /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __SAKEMAIN_H__ +#endif // __SAKEMAIN_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequest.h b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequest.h index 6555c023b3f..cb50098b870 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequest.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequest.h @@ -73,9 +73,9 @@ SAKEStartRequestResult SAKE_CALL sakeiStartGetRecordCountRequest(SAKERequest req /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if defined(__cplusplus) -} // extern "C" +} // extern "C" #endif /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __SAKEREQUEST_H__ +#endif // __SAKEREQUEST_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestInternal.h b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestInternal.h index 5a7e462bd7b..c9ff0400b18 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestInternal.h +++ b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestInternal.h @@ -50,9 +50,9 @@ SAKEStartRequestResult SAKE_CALL sakeiStartRequest(SAKERequest request, SAKEIReq /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if defined(__cplusplus) -} // extern "C" +} // extern "C" #endif /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#endif // __SAKEREQUESTINTERNAL_H__ +#endif // __SAKEREQUESTINTERNAL_H__ diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestRead.c b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestRead.c index b1a4f19568e..e6c4b5899e8 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestRead.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/sake/sakeRequestRead.c @@ -209,7 +209,7 @@ static SAKERequestResult SAKE_CALL sakeiReadOutputRecords( boolval = (strcmp(value, "true") == 0) ? gsi_true : gsi_false; } else - boolval = gsi_false; // if returned a NULL value, set bool to false + boolval = gsi_false; // if returned a NULL value, set bool to false outputField->mType = SAKEFieldType_BOOLEAN; outputField->mValue.mBoolean = boolval; } diff --git a/src/utils/mp_gpprof_server/libraries/gamespy/sake/saketest/saketest.c b/src/utils/mp_gpprof_server/libraries/gamespy/sake/saketest/saketest.c index 35afabb01b5..1a6bc93da76 100644 --- a/src/utils/mp_gpprof_server/libraries/gamespy/sake/saketest/saketest.c +++ b/src/utils/mp_gpprof_server/libraries/gamespy/sake/saketest/saketest.c @@ -1022,7 +1022,7 @@ static void LoginAndAuthenticate(SAKE sake) #include #endif -int test_main(int argc, char* argv[]); // CW needs this prototyped +int test_main(int argc, char* argv[]); // CW needs this prototyped int test_main(int argc, char* argv[]) { diff --git a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread.h b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread.h index 7645b9aca17..963dfc038dd 100644 --- a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread.h +++ b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread.h @@ -1223,8 +1223,8 @@ PTW32_DLLPORT DWORD PTW32_CDECL ptw32_get_exception_services_code(void); * Redefine the SEH __except keyword to ensure that applications * propagate our internal exceptions up to the library's internal handlers. */ -#define __except (E) \ - __except ((GetExceptionCode() == ptw32_get_exception_services_code()) ? EXCEPTION_CONTINUE_SEARCH : (E)) +#define __except \ + (E) __except ((GetExceptionCode() == ptw32_get_exception_services_code()) ? EXCEPTION_CONTINUE_SEARCH : (E)) #endif /* __CLEANUP_SEH */ diff --git a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_key_delete.c b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_key_delete.c index 9b4c7600308..443fd138471 100644 --- a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_key_delete.c +++ b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_key_delete.c @@ -110,7 +110,7 @@ int pthread_key_delete(pthread_key_t key) /* A thread could be holding the keyLock */ while (EBUSY == pthread_mutex_destroy(&(key->keyLock))) { - Sleep(1); // Ugly. + Sleep(1); // Ugly. } } diff --git a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_win32_attach_detach_np.c b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_win32_attach_detach_np.c index f5cb21e68ce..5f7189ea20d 100644 --- a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_win32_attach_detach_np.c +++ b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/pthread_win32_attach_detach_np.c @@ -244,7 +244,7 @@ BOOL pthread_win32_thread_detach_np() */ ptw32_thread_t* sp = (ptw32_thread_t*)pthread_getspecific(ptw32_selfThreadKey); - if (sp != NULL) // otherwise Win32 thread with no implicit POSIX handle. + if (sp != NULL) // otherwise Win32 thread with no implicit POSIX handle. { ptw32_callUserDestroyRoutines(sp->ptHandle); diff --git a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/ptw32_callUserDestroyRoutines.c b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/ptw32_callUserDestroyRoutines.c index 87bfae04462..bee18d86a50 100644 --- a/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/ptw32_callUserDestroyRoutines.c +++ b/src/utils/mp_gpprof_server/libraries/pthreads-w32-2-8-0-release/ptw32_callUserDestroyRoutines.c @@ -124,7 +124,7 @@ void ptw32_callUserDestroyRoutines(pthread_t thread) */ if (pthread_mutex_trylock(&(assoc->key->keyLock)) == EBUSY) { pthread_mutex_unlock(&(sp->threadLock)); - Sleep(1); // Ugly but necessary to avoid priority effects. + Sleep(1); // Ugly but necessary to avoid priority effects. /* * Go around again. * If pthread_key_delete has removed this assoc in the meantime, diff --git a/src/utils/mp_gpprof_server/profile_data_types.cpp b/src/utils/mp_gpprof_server/profile_data_types.cpp index 2ccaafcbfd1..a9f9cd293c0 100644 --- a/src/utils/mp_gpprof_server/profile_data_types.cpp +++ b/src/utils/mp_gpprof_server/profile_data_types.cpp @@ -17,37 +17,37 @@ static char const* awards_names[at_awards_count] = { }; static unsigned short award_atlas_stats_map[at_awards_count][ap_award_params_count] = { - {STAT_AwardMasscare, STAT_AwardMasscareLastRewardDate}, // mp_award_massacre - {STAT_AwardParanoia, STAT_AwardParanoiaLastRewardDate}, // mp_award_paranoia + {STAT_AwardMasscare, STAT_AwardMasscareLastRewardDate}, // mp_award_massacre + {STAT_AwardParanoia, STAT_AwardParanoiaLastRewardDate}, // mp_award_paranoia {STAT_AwardOwerwhelmingSuperiority, - STAT_AwardOwerwhelmingSuperiorityLastRewardDate}, // mp_award_overwhelming_superiority - {STAT_AwardBlitzkrieg, STAT_AwardBlitzkriegLastRewardDate}, // mp_award_blitzkrieg - {STAT_AwardDryVictory, STAT_AwardDryVictoryLastRewardDate}, // mp_award_dry_victory - {STAT_AwardMultichampion, STAT_AwardMultichampionLastRewardDate}, // mp_award_multichampion - {STAT_AwardMad, STAT_AwardMadLastRewardDate}, // mp_award_mad - {STAT_AwardAchillesHeel, STAT_AwardAchillesHeelLastRewardDate}, // mp_award_achilles_heel - {STAT_AwardFasterThanBullets, STAT_AwardFasterThanBulletsLastRewardDate}, // mp_award_fater_than_bullets - {STAT_AwardHarvestTime, STAT_AwardHarvestTimeLastRewardDate}, // mp_award_harvest_time - {STAT_AwardSkewer, STAT_AwardSkewerLastRewardDate}, // mp_award_skewer - {STAT_AwardDoubleShotDoubleKill, STAT_AwardDoubleShotDoubleKillLastRewardDate}, // mp_award_double_shot_double_kill - {STAT_AwardClimber, STAT_AwardClimberLastRewardDate}, // mp_award_climber - {STAT_AwardOpener, STAT_AwardOpenerLastRewardDate}, // mp_award_opener - {STAT_AwardToughy, STAT_AwardToughyLastRewardDate}, // mp_award_toughy - {STAT_AwardInvincibleFury, STAT_AwardInvincibleFuryLastRewardDate}, // mp_award_invincible_fury - {STAT_AwardOculist, STAT_AwardOculistLastRewardDate}, // mp_award_oculist - {STAT_AwardLightingReflexes, STAT_AwardLightingReflexesLastRewardDate}, // mp_award_lightning_reflexes - {STAT_AwardSprinterStopper, STAT_AwardSprinterStopperLastRewardDate}, // mp_award_sprinter_stopper - {STAT_AwardMarksman, STAT_AwardMarksmanLastRewardDate}, // mp_award_marksman - {STAT_AwardPeaceAmbassador, STAT_AwardPeaceAmbassadorLastRewardDate}, // mp_award_peace_ambassador - {STAT_AwardDeadlyAccuracy, STAT_AwardDeadlyAccuracyLastRewardDate}, // mp_award_deadly_accuracy - {STAT_AwardRemembrance, STAT_AwardRemembranceLastRewardDate}, // mp_award_remembrance - {STAT_AwardAvenger, STAT_AwardAvengerLastRewardDate}, // mp_award_avenger - {STAT_AwardCherub, STAT_AwardCherubLastRewardDate}, // mp_award_cherub - {STAT_AwardDignity, STAT_AwardDignityLastRewardDate}, // mp_award_dignity - {STAT_AwardStalkerFlair, STAT_AwardStalkerFlairLastRewardDate}, // mp_award_stalker_flair - {STAT_AwardLucky, STAT_AwardLuckyLastRewardDate}, // mp_award_lucky - {STAT_AwardBlackList, STAT_AwardBlackListLastRewardDate}, // mp_award_black_list - {STAT_AwardSilentDeath, STAT_AwardSilentDeathLastRewardDate}, // mp_award_silent_death + STAT_AwardOwerwhelmingSuperiorityLastRewardDate}, // mp_award_overwhelming_superiority + {STAT_AwardBlitzkrieg, STAT_AwardBlitzkriegLastRewardDate}, // mp_award_blitzkrieg + {STAT_AwardDryVictory, STAT_AwardDryVictoryLastRewardDate}, // mp_award_dry_victory + {STAT_AwardMultichampion, STAT_AwardMultichampionLastRewardDate}, // mp_award_multichampion + {STAT_AwardMad, STAT_AwardMadLastRewardDate}, // mp_award_mad + {STAT_AwardAchillesHeel, STAT_AwardAchillesHeelLastRewardDate}, // mp_award_achilles_heel + {STAT_AwardFasterThanBullets, STAT_AwardFasterThanBulletsLastRewardDate}, // mp_award_fater_than_bullets + {STAT_AwardHarvestTime, STAT_AwardHarvestTimeLastRewardDate}, // mp_award_harvest_time + {STAT_AwardSkewer, STAT_AwardSkewerLastRewardDate}, // mp_award_skewer + {STAT_AwardDoubleShotDoubleKill, STAT_AwardDoubleShotDoubleKillLastRewardDate}, // mp_award_double_shot_double_kill + {STAT_AwardClimber, STAT_AwardClimberLastRewardDate}, // mp_award_climber + {STAT_AwardOpener, STAT_AwardOpenerLastRewardDate}, // mp_award_opener + {STAT_AwardToughy, STAT_AwardToughyLastRewardDate}, // mp_award_toughy + {STAT_AwardInvincibleFury, STAT_AwardInvincibleFuryLastRewardDate}, // mp_award_invincible_fury + {STAT_AwardOculist, STAT_AwardOculistLastRewardDate}, // mp_award_oculist + {STAT_AwardLightingReflexes, STAT_AwardLightingReflexesLastRewardDate}, // mp_award_lightning_reflexes + {STAT_AwardSprinterStopper, STAT_AwardSprinterStopperLastRewardDate}, // mp_award_sprinter_stopper + {STAT_AwardMarksman, STAT_AwardMarksmanLastRewardDate}, // mp_award_marksman + {STAT_AwardPeaceAmbassador, STAT_AwardPeaceAmbassadorLastRewardDate}, // mp_award_peace_ambassador + {STAT_AwardDeadlyAccuracy, STAT_AwardDeadlyAccuracyLastRewardDate}, // mp_award_deadly_accuracy + {STAT_AwardRemembrance, STAT_AwardRemembranceLastRewardDate}, // mp_award_remembrance + {STAT_AwardAvenger, STAT_AwardAvengerLastRewardDate}, // mp_award_avenger + {STAT_AwardCherub, STAT_AwardCherubLastRewardDate}, // mp_award_cherub + {STAT_AwardDignity, STAT_AwardDignityLastRewardDate}, // mp_award_dignity + {STAT_AwardStalkerFlair, STAT_AwardStalkerFlairLastRewardDate}, // mp_award_stalker_flair + {STAT_AwardLucky, STAT_AwardLuckyLastRewardDate}, // mp_award_lucky + {STAT_AwardBlackList, STAT_AwardBlackListLastRewardDate}, // mp_award_black_list + {STAT_AwardSilentDeath, STAT_AwardSilentDeathLastRewardDate}, // mp_award_silent_death }; char const* get_award_name(enum_awards_t award) @@ -92,12 +92,12 @@ enum_awards_t get_award_by_stat_rdate_name(char const* stat_name) static char const* best_score_names[bst_score_types_count] = {"mp_bst_kills_in_row", "mp_bst_kinife_kills_in_row", "mp_bst_backstabs_in_row", "mp_bst_head_shots_in_row", "mp_bst_eye_kills_in_row", "mp_bst_bleed_kills_in_row", - "mp_bst_explosive_kills_in_row"}; // static char const * best_score_names[bst_score_types_count] + "mp_bst_explosive_kills_in_row"}; // static char const * best_score_names[bst_score_types_count] static unsigned short best_scores_atlas_stats_map[bst_score_types_count] = {STAT_BestScore_KillsInRow, STAT_BestScore_KnifeKillsInRow, STAT_BestScore_BackstabsKillsInRow, STAT_BestScore_HeadshotsKillsInRow, STAT_BestScore_EyeKillsInRow, STAT_BestScore_BleedKillsInRow, - STAT_BestScore_ExplosiveKillsInRow}; // static u16 best_scores_atlas_stats_map[bst_score_types_count] + STAT_BestScore_ExplosiveKillsInRow}; // static u16 best_scores_atlas_stats_map[bst_score_types_count] char const* get_best_score_name(enum_best_score_type bst) { @@ -122,4 +122,4 @@ enum_best_score_type get_best_score_type_by_sname(char const* stat_name) return static_cast(bst_score_types_count); } -} // namespace gamespy_profile +} // namespace gamespy_profile diff --git a/src/utils/mp_gpprof_server/profile_data_types.h b/src/utils/mp_gpprof_server/profile_data_types.h index e3d157a96da..aa56af8e216 100644 --- a/src/utils/mp_gpprof_server/profile_data_types.h +++ b/src/utils/mp_gpprof_server/profile_data_types.h @@ -43,14 +43,14 @@ enum enum_awards_t at_award_silent_death, // at_award_okulist = 0x00, at_awards_count -}; // enum enum_awards_t +}; // enum enum_awards_t enum enum_award_params { ap_award_id = 0x00, ap_award_rdate, ap_award_params_count -}; // enum enum_award_params +}; // enum enum_award_params struct award_data { @@ -76,7 +76,7 @@ enum enum_best_score_type bst_bleed_kills_in_row, bst_explosive_kills_in_row, bst_score_types_count -}; // enum enum_best_score_type +}; // enum enum_best_score_type char const* get_best_score_name(enum_best_score_type bst); unsigned short get_best_score_id_stat(enum_best_score_type bst); @@ -98,6 +98,6 @@ struct profile_data bestscores_map_t m_best_scores; }; -} // namespace gamespy_profile +} // namespace gamespy_profile -#endif //#ifndef PLAYER_AWARDS +#endif //#ifndef PLAYER_AWARDS diff --git a/src/utils/mp_gpprof_server/profile_printer.h b/src/utils/mp_gpprof_server/profile_printer.h index be4f92a509b..68a4a654c0a 100644 --- a/src/utils/mp_gpprof_server/profile_printer.h +++ b/src/utils/mp_gpprof_server/profile_printer.h @@ -30,4 +30,4 @@ inline std::basic_ostream& operator<<( return ostr; } -#endif //#ifndef PROFILE_PRINTER_INCLUDED \ No newline at end of file +#endif //#ifndef PROFILE_PRINTER_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_gpprof_server/profile_request.cpp b/src/utils/mp_gpprof_server/profile_request.cpp index d57806f282c..9890744baa3 100644 --- a/src/utils/mp_gpprof_server/profile_request.cpp +++ b/src/utils/mp_gpprof_server/profile_request.cpp @@ -42,7 +42,7 @@ char* extract_username(char const* uri, char const* root_path, user_name_t& dst_ { typedef char url_string_t[256]; url_string_t tmp_format; - sprintf(tmp_format, "%s/%%255s", root_path); // for url_string_t[256]; + sprintf(tmp_format, "%s/%%255s", root_path); // for url_string_t[256]; url_string_t tmp_uname; strcpy(tmp_uname, ""); diff --git a/src/utils/mp_gpprof_server/profile_request.h b/src/utils/mp_gpprof_server/profile_request.h index 3fc981040f0..302cf84f090 100644 --- a/src/utils/mp_gpprof_server/profile_request.h +++ b/src/utils/mp_gpprof_server/profile_request.h @@ -32,6 +32,6 @@ class fetch_profile_request fcgi_istream m_in; fcgi_ostream m_out; fcgi_ostream m_err; -}; // class fetch_profile_request +}; // class fetch_profile_request -#endif //#ifndef PROFILE_REQUEST_INCLUDED \ No newline at end of file +#endif //#ifndef PROFILE_REQUEST_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_gpprof_server/profiles_cache.h b/src/utils/mp_gpprof_server/profiles_cache.h index 12676fe1864..510e22ea677 100644 --- a/src/utils/mp_gpprof_server/profiles_cache.h +++ b/src/utils/mp_gpprof_server/profiles_cache.h @@ -30,7 +30,7 @@ class profiles_cache struct cache_item_less_p { bool const operator()(cache_item const& left, cache_item const& right) const; - }; // struct cache_item_less_predicate + }; // struct cache_item_less_predicate struct cache_item_expired_p { cache_item_expired_p(){}; @@ -48,6 +48,6 @@ class profiles_cache cache_t::size_type m_items_allowed; cache_t::size_type get_free_space(); -}; // class profiles_cache +}; // class profiles_cache -#endif //#ifndef PROFILES_CACHE_INCLUDED \ No newline at end of file +#endif //#ifndef PROFILES_CACHE_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_gpprof_server/requests_processor.cpp b/src/utils/mp_gpprof_server/requests_processor.cpp index 97f94cda6b2..c4095d0a56e 100644 --- a/src/utils/mp_gpprof_server/requests_processor.cpp +++ b/src/utils/mp_gpprof_server/requests_processor.cpp @@ -5,8 +5,8 @@ extern char const* root_path; static gsi_time const gamespy_think_time = 100; static unsigned int wait_train_time_ms = 100; -static unsigned int profiles_cache_size = 1024 * 1024 * 32; // 32 Mb -unsigned int cache_expire_time = 1000 * 60 * 5; // 5 min +static unsigned int profiles_cache_size = 1024 * 1024 * 32; // 32 Mb +unsigned int cache_expire_time = 1000 * 60 * 5; // 5 min requests_poll::requests_poll() : m_profiles_cache(profiles_cache_size) { diff --git a/src/utils/mp_gpprof_server/requests_processor.h b/src/utils/mp_gpprof_server/requests_processor.h index 040da3e43cd..762f433c5d0 100644 --- a/src/utils/mp_gpprof_server/requests_processor.h +++ b/src/utils/mp_gpprof_server/requests_processor.h @@ -33,6 +33,6 @@ class requests_poll requests_t m_active_requests; profiles_cache m_profiles_cache; sake_worker m_sake_worker; -}; // class requests_poll +}; // class requests_poll -#endif //#ifndef REQUESTS_PROCESSOR_INCLUDED \ No newline at end of file +#endif //#ifndef REQUESTS_PROCESSOR_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_gpprof_server/sake_worker.h b/src/utils/mp_gpprof_server/sake_worker.h index db06733d7dd..e8dcdcc579e 100644 --- a/src/utils/mp_gpprof_server/sake_worker.h +++ b/src/utils/mp_gpprof_server/sake_worker.h @@ -29,6 +29,6 @@ class sake_worker void* worker_thread(); static bool thread_stopper(void*, sake_processor*) { return false; }; -}; // class sake_worker +}; // class sake_worker -#endif //#ifndef SAKE_WORKER_INCLUDED +#endif //#ifndef SAKE_WORKER_INCLUDED diff --git a/src/utils/mp_gpprof_server/threads.cpp b/src/utils/mp_gpprof_server/threads.cpp index 03de4a139fb..15012dbfdb6 100644 --- a/src/utils/mp_gpprof_server/threads.cpp +++ b/src/utils/mp_gpprof_server/threads.cpp @@ -58,4 +58,4 @@ void sleep(unsigned int const ms) nanosleep(&tmp_ts, &tmp_tsrem); } -} // namespace xray +} // namespace xray diff --git a/src/utils/mp_gpprof_server/threads.h b/src/utils/mp_gpprof_server/threads.h index 5675c789455..5c7896f1c57 100644 --- a/src/utils/mp_gpprof_server/threads.h +++ b/src/utils/mp_gpprof_server/threads.h @@ -21,7 +21,7 @@ class mutex pthread_mutex_t* get() { return &m_mutex; } private: pthread_mutex_t m_mutex; -}; // class mutex +}; // class mutex class condition { @@ -33,7 +33,7 @@ class condition private: pthread_cond_t m_cond; -}; // class condition +}; // class condition template class thread_method @@ -100,11 +100,11 @@ class thread_method pthread_exit(ret_value); return ret_value; }; -}; // class thread_method +}; // class thread_method unsigned int const get_clock_ms(); void sleep(unsigned int const ms); -} // namespace xray +} // namespace xray -#endif //#ifndef THREADS_H_INCLUDED +#endif //#ifndef THREADS_H_INCLUDED diff --git a/src/utils/mp_screenshots_info/entry_point.cpp b/src/utils/mp_screenshots_info/entry_point.cpp index 0fd64a01398..637b05774b7 100644 --- a/src/utils/mp_screenshots_info/entry_point.cpp +++ b/src/utils/mp_screenshots_info/entry_point.cpp @@ -46,7 +46,7 @@ void debug_sign_screenshot(IReader* screenshot) void screenshot_info(IReader* screenshot) { - using namespace screenshots; // for reader + using namespace screenshots; // for reader reader tmp_reader(screenshot); if (!tmp_reader.is_valid()) { Msg("ERROR: screenshot not valid or corrupted."); diff --git a/src/utils/mp_screenshots_info/pch.h b/src/utils/mp_screenshots_info/pch.h index 6ce57686543..e01a8adbd20 100644 --- a/src/utils/mp_screenshots_info/pch.h +++ b/src/utils/mp_screenshots_info/pch.h @@ -7,4 +7,4 @@ #include -#endif // #define PCH_H_INCLUDED \ No newline at end of file +#endif // #define PCH_H_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_screenshots_info/screenshots_common.cpp b/src/utils/mp_screenshots_info/screenshots_common.cpp index 2a6db9a57b4..53bca270cb1 100644 --- a/src/utils/mp_screenshots_info/screenshots_common.cpp +++ b/src/utils/mp_screenshots_info/screenshots_common.cpp @@ -12,11 +12,11 @@ u8 const p_number[crypto::xr_dsa::public_key_length] = { 0xcd, 0x02, 0x37, 0xa0, 0xda, 0x6a, 0xfe, 0x02, 0x82, 0x54, 0x9b, 0x5d, 0xcd, 0x71, 0xbf, 0x69, 0xc8, 0x77, 0x4c, 0x7e, 0x5e, 0x4e, 0x7a, 0xff, 0x0f, 0x12, 0x62, 0xd5, 0xf5, 0xca, 0x0a, 0x76, 0x26, 0x6d, 0x16, 0x0b, 0x4f, 0x09, 0x3b, 0x41, 0x09, 0x80, 0xff, 0x65, 0x15, 0xce, 0x29, 0x0f, 0x04, 0x45, 0xb0, 0xb1, -}; // p_number +}; // p_number u8 const q_number[crypto::xr_dsa::private_key_length] = { 0xfb, 0xe4, 0x9a, 0x95, 0x31, 0x49, 0xcb, 0xda, 0xf1, 0x91, 0x36, 0x82, 0xa8, 0x80, 0xfd, 0xcb, 0x4e, 0x38, 0x85, 0x45, -}; // q_number +}; // q_number u8 const g_number[crypto::xr_dsa::public_key_length] = { 0xdc, 0x38, 0x96, 0xb4, 0x81, 0xf2, 0x2d, 0x60, 0x20, 0x7e, 0x9a, 0xe5, 0x74, 0x45, 0x7f, 0xa4, 0x9d, 0x71, 0xb8, 0x94, 0x0a, 0xc5, 0xfb, 0x50, 0x71, 0xd9, 0xae, 0xb4, 0x74, 0xeb, 0x09, 0x93, 0x41, 0xd3, 0x70, 0x00, 0x60, 0x4b, @@ -25,7 +25,7 @@ u8 const g_number[crypto::xr_dsa::public_key_length] = { 0x8f, 0xbc, 0xcc, 0x8b, 0xdd, 0x12, 0x21, 0x86, 0xa6, 0x4d, 0x90, 0x9a, 0xbd, 0xfe, 0x8a, 0x05, 0x39, 0xad, 0xb4, 0x45, 0xf6, 0xf9, 0x0f, 0xe5, 0x91, 0x5c, 0x2c, 0x19, 0xa0, 0xf1, 0x2e, 0x06, 0x02, 0x92, 0x68, 0xaa, 0xbc, 0x7c, 0xf4, 0x4c, 0x85, 0x8b, 0x8c, 0x0b, 0x09, 0x83, 0xe6, 0x15, 0x24, 0xe3, 0x10, 0xa9, -}; // g_number +}; // g_number u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x0a, 0x0b, 0xe5, 0x02, 0x1c, 0xc6, 0x6c, 0xeb, 0xbd, 0xa2, 0xe6, 0xcd, 0x6d, 0x96, 0x64, 0xa9, 0x19, 0xe7, 0x81, 0x94, 0x0c, 0xb2, 0x98, 0x5c, 0x7c, 0x3c, 0x68, 0xb6, 0xb6, 0x20, 0xa9, 0xab, 0x0f, 0xc0, 0xb9, 0x5a, 0xe5, 0xe7, @@ -34,6 +34,6 @@ u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x29, 0xd2, 0x60, 0x3d, 0x68, 0x23, 0xf1, 0x34, 0xea, 0xbf, 0x4e, 0x38, 0x66, 0x72, 0x0d, 0xf1, 0xc7, 0x33, 0x35, 0xf7, 0xc5, 0xe0, 0x59, 0x57, 0x42, 0x36, 0x83, 0x20, 0xff, 0x14, 0x03, 0xea, 0x2f, 0x0b, 0x0c, 0xa6, 0x98, 0x11, 0xd5, 0xb2, 0x96, 0x51, 0x6b, 0x08, 0x38, 0x98, 0x3a, 0xb6, 0x96, 0xa7, 0xad, 0xe3, -}; // public_key +}; // public_key -} // namespace screenshots \ No newline at end of file +} // namespace screenshots \ No newline at end of file diff --git a/src/utils/mp_screenshots_info/screenshots_common.h b/src/utils/mp_screenshots_info/screenshots_common.h index 66993aaae1b..640753f5d95 100644 --- a/src/utils/mp_screenshots_info/screenshots_common.h +++ b/src/utils/mp_screenshots_info/screenshots_common.h @@ -8,6 +8,6 @@ extern u8 const q_number[crypto::xr_dsa::private_key_length]; extern u8 const g_number[crypto::xr_dsa::public_key_length]; extern u8 const public_key[crypto::xr_dsa::public_key_length]; -} // namespace screenshots +} // namespace screenshots -#endif //#ifndef SCREENSHOTS_COMMON_INCLUDED \ No newline at end of file +#endif //#ifndef SCREENSHOTS_COMMON_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_screenshots_info/screenshots_reader.cpp b/src/utils/mp_screenshots_info/screenshots_reader.cpp index 4311fe058dc..5a7f7d341bc 100644 --- a/src/utils/mp_screenshots_info/screenshots_reader.cpp +++ b/src/utils/mp_screenshots_info/screenshots_reader.cpp @@ -54,7 +54,7 @@ reader::reader(IReader* freader) Msg("Can't find info section"); return; } - --tmp_info_begin; //- '[' + --tmp_info_begin; //- '[' u32 m_info_size = xr_strlen(tmp_info_begin); m_info_pos = static_cast((u8*)tmp_info_begin - m_jpeg_data); @@ -106,10 +106,10 @@ bool const reader::verify() // xr_strcat(jpeg_info_start, m_info_size, admin_name().c_str()); xr_strcat(jpeg_info_start, m_info_size, creation_date().c_str()); - u32 jpeg_info_size = xr_strlen(jpeg_info_start) + 1; // ending zero + u32 jpeg_info_size = xr_strlen(jpeg_info_start) + 1; // ending zero u32 jpeg_full_size = m_info_pos + jpeg_info_size; return m_verifyer.verify(m_jpeg_data, jpeg_full_size, tmp_sign); } -} // namespace screenshots \ No newline at end of file +} // namespace screenshots \ No newline at end of file diff --git a/src/utils/mp_screenshots_info/screenshots_reader.h b/src/utils/mp_screenshots_info/screenshots_reader.h index 5be9b30edc8..8c1d4a291de 100644 --- a/src/utils/mp_screenshots_info/screenshots_reader.h +++ b/src/utils/mp_screenshots_info/screenshots_reader.h @@ -36,8 +36,8 @@ class reader CInifile* m_info_section; sign_verifyer m_verifyer; -}; // class reader +}; // class reader -} // namespace screenshots +} // namespace screenshots -#endif //#ifndef SCREENSHOT_READER_INCLUDED \ No newline at end of file +#endif //#ifndef SCREENSHOT_READER_INCLUDED \ No newline at end of file diff --git a/src/utils/mp_screenshots_info/screenshots_writer.h b/src/utils/mp_screenshots_info/screenshots_writer.h index f2ab9d22ad3..63d0d47fb08 100644 --- a/src/utils/mp_screenshots_info/screenshots_writer.h +++ b/src/utils/mp_screenshots_info/screenshots_writer.h @@ -44,8 +44,8 @@ class writer CInifile m_info_data; signer m_signer; -}; // class writer +}; // class writer -} // namespace screenshots +} // namespace screenshots -#endif //#ifndef SCREENSHOT_WRITER_INCLUDED \ No newline at end of file +#endif //#ifndef SCREENSHOT_WRITER_INCLUDED \ No newline at end of file diff --git a/src/utils/xrAI/AIMapExport.h b/src/utils/xrAI/AIMapExport.h index 63fd5bcda62..65ef28086de 100644 --- a/src/utils/xrAI/AIMapExport.h +++ b/src/utils/xrAI/AIMapExport.h @@ -4,10 +4,10 @@ //---------------------------------------------------- struct SAIParams { - float fPatchSize; // patch size - float fTestHeight; // test height (center of the "tester") - float fCanUP; // can reach point in up (dist) - float fCanDOWN; // can reach point down (dist) + float fPatchSize; // patch size + float fTestHeight; // test height (center of the "tester") + float fCanUP; // can reach point in up (dist) + float fCanDOWN; // can reach point down (dist) SAIParams() { diff --git a/src/utils/xrAI/ETextureParams.h b/src/utils/xrAI/ETextureParams.h index 0d998daab4b..29fc3bb9e3a 100644 --- a/src/utils/xrAI/ETextureParams.h +++ b/src/utils/xrAI/ETextureParams.h @@ -132,7 +132,7 @@ struct ECORE_API STextureParams // исходная текстура содержит альфа канал return flags.is(flHasAlpha); } - IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал + IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал { switch (fmt) { diff --git a/src/utils/xrAI/StdAfx.h b/src/utils/xrAI/StdAfx.h index c7037d65adf..711a1652339 100644 --- a/src/utils/xrAI/StdAfx.h +++ b/src/utils/xrAI/StdAfx.h @@ -78,4 +78,4 @@ IC xr_string string2xr_string(LPCSTR s) //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7) +#endif // !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7) diff --git a/src/utils/xrAI/compiler.h b/src/utils/xrAI/compiler.h index d9fe4168267..f0b9db160c3 100644 --- a/src/utils/xrAI/compiler.h +++ b/src/utils/xrAI/compiler.h @@ -14,26 +14,26 @@ const u32 InvalidNode = (1 << 24) - 1; const u32 UnkonnectedNode = 0xfffffff0; const WORD InvalidSector = 0xff; -struct vertex // definition of "patch" or "node" +struct vertex // definition of "patch" or "node" { union { struct { - u32 n1, n2, n3, n4; // neighbourh patches (Left,Forward,Right,Backward) + u32 n1, n2, n3, n4; // neighbourh patches (Left,Forward,Right,Backward) }; u32 n[4]; }; - Fplane Plane; // plane of patch - Fvector Pos; // position of patch center - WORD Sector; // + Fplane Plane; // plane of patch + Fvector Pos; // position of patch center + WORD Sector; // u32 Group; float LightLevel; - float high_cover[4]; // cover in four directions - float low_cover[4]; // cover in four directions + float high_cover[4]; // cover in four directions + float low_cover[4]; // cover in four directions vertex() { @@ -63,17 +63,17 @@ void Compress(CLevelGraph::CVertex& Dest, vertex& Src); struct R_Light { - u32 type; // Type of light source - float amount; // Diffuse color of light - Fvector position; // Position in world space - Fvector direction; // Direction in world space - float range; // Cutoff range - float range2; // ^2 - float attenuation0; // Constant attenuation - float attenuation1; // Linear attenuation - float attenuation2; // Quadratic attenuation - - Fvector tri[3]; // Cached triangle for ray-testing + u32 type; // Type of light source + float amount; // Diffuse color of light + Fvector position; // Position in world space + Fvector direction; // Direction in world space + float range; // Cutoff range + float range2; // ^2 + float attenuation0; // Constant attenuation + float attenuation1; // Linear attenuation + float attenuation2; // Quadratic attenuation + + Fvector tri[3]; // Cached triangle for ray-testing }; struct SCover diff --git a/src/utils/xrAI/compiler_cover.cpp b/src/utils/xrAI/compiler_cover.cpp index b026cbd5644..43f1e653cf6 100644 --- a/src/utils/xrAI/compiler_cover.cpp +++ b/src/utils/xrAI/compiler_cover.cpp @@ -44,7 +44,7 @@ IC float getLastRP_Scale(CDB::COLLIDER* DB, RayCache& C) b_material& M = g_materials[F.dwMaterial]; b_texture& T = g_textures[M.surfidx]; Shader_xrLCVec& LIB = g_shaders_xrlc->Library(); - if (M.shader_xrlc >= LIB.size()) return 0; //. hack + if (M.shader_xrlc >= LIB.size()) return 0; //. hack Shader_xrLC& SH = LIB[M.shader_xrlc]; if (!SH.flags.bLIGHT_CastShadow) continue; @@ -263,7 +263,7 @@ class CoverThread : public CThread // raytrace int sector = calcSphereSector(Dir); c_total[sector] += 1.f; - c_passed[sector] += rayTrace(&DB, TestPos, Dir, range, cache[ID].C); // + c_passed[sector] += rayTrace(&DB, TestPos, Dir, range, cache[ID].C); // } Q.Clear(); @@ -284,13 +284,13 @@ class CoverThread : public CThread } cover[0] = (value[2] + value[3] + value[4] + value[5]) / 4.f; - clamp(cover[0], 0.f, 1.f); // left + clamp(cover[0], 0.f, 1.f); // left cover[1] = (value[0] + value[1] + value[2] + value[3]) / 4.f; - clamp(cover[1], 0.f, 1.f); // forward + clamp(cover[1], 0.f, 1.f); // forward cover[2] = (value[6] + value[7] + value[0] + value[1]) / 4.f; - clamp(cover[2], 0.f, 1.f); // right + clamp(cover[2], 0.f, 1.f); // right cover[3] = (value[4] + value[5] + value[6] + value[7]) / 4.f; - clamp(cover[3], 0.f, 1.f); // back + clamp(cover[3], 0.f, 1.f); // back } virtual void Execute() diff --git a/src/utils/xrAI/game_spawn_constructor.cpp b/src/utils/xrAI/game_spawn_constructor.cpp index c08b7999ce6..69a4aab730a 100644 --- a/src/utils/xrAI/game_spawn_constructor.cpp +++ b/src/utils/xrAI/game_spawn_constructor.cpp @@ -25,7 +25,7 @@ CGameSpawnConstructor::CGameSpawnConstructor(LPCSTR name, LPCSTR output, LPCSTR : #ifdef CONFIG_PROFILE_LOCKS m_critical_section(MUTEX_PROFILE_ID(CGameSpawnConstructor)), -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS m_thread_manager(ProxyStatus, ProxyProgress) { load_spawns(name, no_separator_check); diff --git a/src/utils/xrAI/guid_generator.cpp b/src/utils/xrAI/guid_generator.cpp index 56f8f04b11d..848f5e30b6a 100644 --- a/src/utils/xrAI/guid_generator.cpp +++ b/src/utils/xrAI/guid_generator.cpp @@ -11,8 +11,8 @@ #include "guid_generator.h" #ifdef WINVER -#include #include +#include #pragma comment(lib, "rpcrt4.lib") #endif @@ -59,5 +59,5 @@ LPCSTR generate_guid(const xrGUID& guid, LPSTR buffer, const u32& buffer_size) return (buffer); #else NODEFAULT; -#endif // WINVER +#endif // WINVER } diff --git a/src/utils/xrAI/guid_generator.h b/src/utils/xrAI/guid_generator.h index 1a27fc16933..fdbfaee3396 100644 --- a/src/utils/xrAI/guid_generator.h +++ b/src/utils/xrAI/guid_generator.h @@ -15,4 +15,4 @@ ENGINE_API extern xrGUID generate_guid(); ENGINE_API extern LPCSTR generate_guid(const xrGUID& guid, LPSTR buffer, const u32& buffer_size); -#endif // guid_generatorH +#endif // guid_generatorH diff --git a/src/utils/xrAI/level_spawn_constructor.cpp b/src/utils/xrAI/level_spawn_constructor.cpp index 5bdbb50a4cf..d89a494b97b 100644 --- a/src/utils/xrAI/level_spawn_constructor.cpp +++ b/src/utils/xrAI/level_spawn_constructor.cpp @@ -161,7 +161,8 @@ void CLevelSpawnConstructor::add_free_object(CSE_Abstract* abstract) m_game_spawn_constructor->add_object(abstract); } -// void CLevelSpawnConstructor::add_group_object (CSE_Abstract *abstract, shared_str group_section, +// void CLevelSpawnConstructor::add_group_object (CSE_Abstract *abstract, shared_str +// group_section, // bool) //{ // SPAWN_GRPOUP_OBJECTS::iterator I = m_spawn_objects.find(group_section); @@ -275,7 +276,7 @@ void CLevelSpawnConstructor::load_objects() // if (J == m_spawn_groups.end()) // clMsg ("! ERROR (spawn group not found!) : %s",*(*I).first); // R_ASSERT3 (J != m_spawn_groups.end(),"Specified group control not -//found!",(*(*I).second)[0]->name_replace()); +// found!",(*(*I).second)[0]->name_replace()); // // GROUP_OBJECTS::iterator i = (*I).second->begin(); // GROUP_OBJECTS::iterator e = (*I).second->end(); @@ -510,7 +511,7 @@ void CLevelSpawnConstructor::generate_artefact_spawn_positions() m_level_points.resize(zone->m_artefact_position_offset + zone->m_artefact_spawn_count); // Msg ("%s %f [%f][%f][%f] : artefact spawn - //positions",zone->name_replace(),zone->m_fRadius,VPUSH(zone->o_Position)); + // positions",zone->name_replace(),zone->m_fRadius,VPUSH(zone->o_Position)); LEVEL_POINT_STORAGE::iterator I = m_level_points.begin() + zone->m_artefact_position_offset; LEVEL_POINT_STORAGE::iterator E = m_level_points.end(); @@ -586,7 +587,8 @@ void CLevelSpawnConstructor::update_artefact_spawn_positions() { CSE_Abstract* abstract = *I; CSE_ALifeObject* alife_object = smart_cast(abstract); - // R_ASSERT3 (level_graph().valid_vertex_id(alife_object->m_tNodeID),"Invalid node for object + // R_ASSERT3 (level_graph().valid_vertex_id(alife_object->m_tNodeID),"Invalid node for + //object //",alife_object->name_replace()); R_ASSERT2(alife_object, "Non-ALife object!"); VERIFY(game_graph().vertex(alife_object->m_tGraphID)->level_id() == m_level.id()); @@ -596,7 +598,7 @@ void CLevelSpawnConstructor::update_artefact_spawn_positions() zone->m_artefact_position_offset = level_point_count; level_point_count += zone->m_artefact_spawn_count; // Msg ("%s %f [%f][%f][%f] : artefact spawn - //positions",zone->name_replace(),zone->m_fRadius,VPUSH(zone->o_Position)); + // positions",zone->name_replace(),zone->m_fRadius,VPUSH(zone->o_Position)); // for (u32 i=zone->m_artefact_position_offset; io_Position.distance_to(m_level_points[i].tPoint)); diff --git a/src/utils/xrAI/level_spawn_constructor.h b/src/utils/xrAI/level_spawn_constructor.h index 5b24a618064..8900b430e3f 100644 --- a/src/utils/xrAI/level_spawn_constructor.h +++ b/src/utils/xrAI/level_spawn_constructor.h @@ -70,10 +70,12 @@ class CLevelSpawnConstructor : public CThread void add_story_object(CSE_ALifeDynamicObject* dynamic_object); void add_space_restrictor(CSE_ALifeDynamicObject* dynamic_object); void add_free_object(CSE_Abstract* abstract); - // void add_group_object (CSE_Abstract *abstract, shared_str group_section, - //bool); // void add_group_object (CSE_Abstract *abstract, shared_str - //group_section); + //group_section, + // bool); + // void add_group_object (CSE_Abstract *abstract, + //shared_str + // group_section); void add_level_changer(CSE_Abstract* abstract); void update_artefact_spawn_positions(); // IC void normalize_probability (CSE_ALifeAnomalousZone *zone); diff --git a/src/utils/xrAI/resource.rc b/src/utils/xrAI/resource.rc index e779e6ccfed..de49cf9aeae 100644 --- a/src/utils/xrAI/resource.rc +++ b/src/utils/xrAI/resource.rc @@ -35,9 +35,9 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT 3 TEXTINCLUDE BEGIN "\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // Ukrainian (Ukraine) resources +#endif // Ukrainian (Ukraine) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// @@ -73,9 +73,9 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_NVIEW, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 773 TOPMARGIN, 7 BOTTOMMARGIN, 528 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // English (United States) resources +#endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -85,4 +85,4 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT // ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/utils/xrAI/spawn_patcher.cpp b/src/utils/xrAI/spawn_patcher.cpp index ae8b9f2088c..c1ff12bbac7 100644 --- a/src/utils/xrAI/spawn_patcher.cpp +++ b/src/utils/xrAI/spawn_patcher.cpp @@ -9,10 +9,10 @@ #include "stdafx.h" #if 0 -#include "spawn_patcher.h" #include "game_graph.h" #include "game_spawn_constructor.h" #include "patrol_path_storage.h" +#include "spawn_patcher.h" struct reader_guard { IReader *m_reader; diff --git a/src/utils/xrAI/spawn_patcher.h b/src/utils/xrAI/spawn_patcher.h index 550320b02be..08c14bda6fe 100644 --- a/src/utils/xrAI/spawn_patcher.h +++ b/src/utils/xrAI/spawn_patcher.h @@ -24,4 +24,4 @@ class spawn_patcher spawn_patcher(LPCSTR new_spawn_id, LPCSTR previous_spawn_id); }; -#endif // SPAWN_PATCHER_H \ No newline at end of file +#endif // SPAWN_PATCHER_H \ No newline at end of file diff --git a/src/utils/xrCompress/xrCompress.cpp b/src/utils/xrCompress/xrCompress.cpp index 3d71e2e0dc6..5e200037d7a 100644 --- a/src/utils/xrCompress/xrCompress.cpp +++ b/src/utils/xrCompress/xrCompress.cpp @@ -14,7 +14,7 @@ xrCompressor::xrCompressor() c_heap = NULL; dwTimeStart = 0; - XRP_MAX_SIZE = 1024 * 1024 * 640; // bytes (640Mb) + XRP_MAX_SIZE = 1024 * 1024 * 640; // bytes (640Mb) } xrCompressor::~xrCompressor() @@ -208,7 +208,7 @@ void xrCompressor::CompressOne(LPCSTR path) Msg("%-80s - VFS", path); } else - { // if(testVFS(path)) + { // if(testVFS(path)) // Compress into BaseFS c_ptr = fs_pack_writer->tell(); c_size_real = src->length(); @@ -248,7 +248,7 @@ void xrCompressor::CompressOne(LPCSTR path) R_ASSERT(LZO_E_OK == lzo1x_optimize(c_data, c_size_compressed, c_out, &c_orig, NULL)); R_ASSERT(c_orig == c_size_real); xr_free(c_out); - } // bFast + } // bFast fs_pack_writer->w(c_data, c_size_compressed); printf("%3.1f%%", 100.f * float(c_size_compressed) / float(src->length())); Msg("%-80s - OK (%3.1f%%)", path, 100.f * float(c_size_compressed) / float(src->length())); @@ -258,14 +258,14 @@ void xrCompressor::CompressOne(LPCSTR path) xr_free(c_data); } else - { // 0!=c_size_real + { // 0!=c_size_real filesVFS++; c_size_compressed = c_size_real; printf("VFS (R)"); Msg("%-80s - EMPTY FILE", path); } - } // test VFS - } //(A) + } // test VFS + } //(A) // Write description write_file_header(path, c_crc32, c_ptr, c_size_real, c_size_compressed); @@ -533,7 +533,7 @@ void xrCompressor::ProcessLTX(CInifile& ltx) Msg("-F: %s", path); } } - } // if(ltx.section_exist("include_folders")) + } // if(ltx.section_exist("include_folders")) if (ltx.section_exist("include_files")) { CInifile::Sect& if_sect = ltx.r_section("include_files"); diff --git a/src/utils/xrDO_Light/StdAfx.h b/src/utils/xrDO_Light/StdAfx.h index 8759d12c6c3..649d76c2824 100644 --- a/src/utils/xrDO_Light/StdAfx.h +++ b/src/utils/xrDO_Light/StdAfx.h @@ -78,4 +78,4 @@ IC xr_string string2xr_string(LPCSTR s) //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7) +#endif // !defined(AFX_STDAFX_H__81632403_DFD8_4A42_A4D3_0AFDD8EA0D25__INCLUDED_7) diff --git a/src/utils/xrDXT/ETextureParams.h b/src/utils/xrDXT/ETextureParams.h index b06a3447481..9cec255149c 100644 --- a/src/utils/xrDXT/ETextureParams.h +++ b/src/utils/xrDXT/ETextureParams.h @@ -128,7 +128,7 @@ struct ECORE_API STextureParams return flags.is(flHasAlpha); } - IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал + IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал { switch (fmt) { diff --git a/src/utils/xrDXT/Image_DXTC.cpp b/src/utils/xrDXT/Image_DXTC.cpp index 5d5dc10f026..76fee495b0a 100644 --- a/src/utils/xrDXT/Image_DXTC.cpp +++ b/src/utils/xrDXT/Image_DXTC.cpp @@ -27,7 +27,7 @@ from the use or inability to use this file or items derived from it. #ifndef MAKEFOURCC #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) -#endif // defined(MAKEFOURCC) +#endif // defined(MAKEFOURCC) // Defined in this module: WORD GetNumberOfBits(DWORD dwMask); @@ -185,7 +185,7 @@ void Image_DXTC::Decompress() { VERIFY(m_pCompBytes); AllocateDecompBytes(); - VERIFY(m_pDecompBytes); // must already have allocated memory + VERIFY(m_pDecompBytes); // must already have allocated memory switch (m_CompFormat) { case PF_DXT1: @@ -244,16 +244,16 @@ struct DXTAlphaBlock3BitLinear // use cast to struct instead of RGBA_MAKE as struct is much struct Color8888 { - BYTE r; // change the order of names to change the - BYTE g; // order of the output ARGB or BGRA, etc... - BYTE b; // Last one is MSB, 1st is LSB. + BYTE r; // change the order of names to change the + BYTE g; // order of the output ARGB or BGRA, etc... + BYTE b; // Last one is MSB, 1st is LSB. BYTE a; }; struct Color565 { - unsigned nBlue : 5; // order of names changes - unsigned nGreen : 6; // byte order of output to 32 bit + unsigned nBlue : 5; // order of names changes + unsigned nGreen : 6; // byte order of output to 32 bit unsigned nRed : 5; }; @@ -274,7 +274,7 @@ inline void GetColorBlockColors( pCol = (Color565*)&pBlock->col0; col_0->a = 0xff; col_0->r = pCol->nRed; - col_0->r <<= 3; // shift to full precision + col_0->r <<= 3; // shift to full precision col_0->g = pCol->nGreen; col_0->g <<= 2; col_0->b = pCol->nBlue; @@ -282,7 +282,7 @@ inline void GetColorBlockColors( pCol = (Color565*)&pBlock->col1; col_1->a = 0xff; col_1->r = pCol->nRed; - col_1->r <<= 3; // shift to full precision + col_1->r <<= 3; // shift to full precision col_1->g = pCol->nGreen; col_1->g <<= 2; col_1->b = pCol->nBlue; @@ -325,12 +325,12 @@ inline void GetColorBlockColors( wrd = ((WORD)col_0->b + (WORD)col_1->b) / 2; col_2->b = (BYTE)wrd; col_2->a = 0xff; - col_3->r = 0x00; // random color to indicate alpha + col_3->r = 0x00; // random color to indicate alpha col_3->g = 0xff; col_3->b = 0xff; col_3->a = 0x00; } -} // Get color block colors (...) +} // Get color block colors (...) inline void DecodeColorBlock( DWORD* pImPos, DXTColBlock* pColorBlock, int width, DWORD* col_0, DWORD* col_1, DWORD* col_2, DWORD* col_3) @@ -342,7 +342,7 @@ inline void DecodeColorBlock( const DWORD masks[] = {3, 12, 3 << 4, 3 << 6}; const int shift[] = {0, 2, 4, 6}; // r steps through lines in y - for (r = 0; r < 4; r++, pImPos += width - 4) // no width*4 as DWORD ptr inc will *4 + for (r = 0; r < 4; r++, pImPos += width - 4) // no width*4 as DWORD ptr inc will *4 { // width * 4 bytes per pixel per line // each j dxtc row is 4 lines of pixels @@ -356,7 +356,7 @@ inline void DecodeColorBlock( { case 0: *pImPos = *col_0; - pImPos++; // increment to next DWORD + pImPos++; // increment to next DWORD break; case 1: *pImPos = *col_1; @@ -400,7 +400,7 @@ inline void DecodeAlphaExplicit(DWORD* pImPos, DXTAlphaBlockExplicit* pAlphaBloc { // zero the alpha bits of image pixel *pImPos &= alphazero; - col.a = wrd & 0x000f; // get only low 4 bits + col.a = wrd & 0x000f; // get only low 4 bits // col.a <<= 4; // shift to full byte precision // NOTE: with just a << 4 you'll never have alpha // of 0xff, 0xf0 is max so pure shift doesn't quite @@ -408,12 +408,12 @@ inline void DecodeAlphaExplicit(DWORD* pImPos, DXTAlphaBlockExplicit* pAlphaBloc // It's much cheaper than divide & scale though. // To correct for this, and get 0xff for max alpha, // or the low bits back in after left shifting - col.a = col.a | (col.a << 4); // This allows max 4 bit alpha to be 0xff alpha + col.a = col.a | (col.a << 4); // This allows max 4 bit alpha to be 0xff alpha // in final image, and is crude approach to full // range scale - *pImPos |= *(DWORD*)&col; // or the bits into the prev. nulled alpha - wrd >>= 4; // move next bits to lowest 4 - pImPos++; // move to next pixel in the row + *pImPos |= *(DWORD*)&col; // or the bits into the prev. nulled alpha + wrd >>= 4; // move next bits to lowest 4 + pImPos++; // move to next pixel in the row } } } @@ -430,28 +430,28 @@ inline void DecodeAlpha3BitLinear(DWORD* pImPos, DXTAlphaBlock3BitLinear* pAlpha if (gAlphas[0] > gAlphas[1]) { // 8-alpha block: derive the other 6 alphas. // 000 = alpha_0, 001 = alpha_1, others are interpolated - gAlphas[2] = (6 * gAlphas[0] + gAlphas[1]) / 7; // bit code 010 - gAlphas[3] = (5 * gAlphas[0] + 2 * gAlphas[1]) / 7; // Bit code 011 - gAlphas[4] = (4 * gAlphas[0] + 3 * gAlphas[1]) / 7; // Bit code 100 - gAlphas[5] = (3 * gAlphas[0] + 4 * gAlphas[1]) / 7; // Bit code 101 - gAlphas[6] = (2 * gAlphas[0] + 5 * gAlphas[1]) / 7; // Bit code 110 - gAlphas[7] = (gAlphas[0] + 6 * gAlphas[1]) / 7; // Bit code 111 + gAlphas[2] = (6 * gAlphas[0] + gAlphas[1]) / 7; // bit code 010 + gAlphas[3] = (5 * gAlphas[0] + 2 * gAlphas[1]) / 7; // Bit code 011 + gAlphas[4] = (4 * gAlphas[0] + 3 * gAlphas[1]) / 7; // Bit code 100 + gAlphas[5] = (3 * gAlphas[0] + 4 * gAlphas[1]) / 7; // Bit code 101 + gAlphas[6] = (2 * gAlphas[0] + 5 * gAlphas[1]) / 7; // Bit code 110 + gAlphas[7] = (gAlphas[0] + 6 * gAlphas[1]) / 7; // Bit code 111 } else { // 6-alpha block: derive the other alphas. // 000 = alpha_0, 001 = alpha_1, others are interpolated - gAlphas[2] = (4 * gAlphas[0] + gAlphas[1]) / 5; // Bit code 010 - gAlphas[3] = (3 * gAlphas[0] + 2 * gAlphas[1]) / 5; // Bit code 011 - gAlphas[4] = (2 * gAlphas[0] + 3 * gAlphas[1]) / 5; // Bit code 100 - gAlphas[5] = (gAlphas[0] + 4 * gAlphas[1]) / 5; // Bit code 101 - gAlphas[6] = 0; // Bit code 110 - gAlphas[7] = 255; // Bit code 111 + gAlphas[2] = (4 * gAlphas[0] + gAlphas[1]) / 5; // Bit code 010 + gAlphas[3] = (3 * gAlphas[0] + 2 * gAlphas[1]) / 5; // Bit code 011 + gAlphas[4] = (2 * gAlphas[0] + 3 * gAlphas[1]) / 5; // Bit code 100 + gAlphas[5] = (gAlphas[0] + 4 * gAlphas[1]) / 5; // Bit code 101 + gAlphas[6] = 0; // Bit code 110 + gAlphas[7] = 255; // Bit code 111 } // Decode 3-bit fields into array of 16 BYTES with same value // first two rows of 4 pixels each: // pRows = (Alpha3BitRows*) & ( pAlphaBlock->stuff[0] ); - const DWORD mask = 0x00000007; // bits = 00 00 01 11 + const DWORD mask = 0x00000007; // bits = 00 00 01 11 DWORD bits = *(DWORD*)&pAlphaBlock->stuff[0]; gBits[0][0] = (BYTE)(bits & mask); bits >>= 3; @@ -469,7 +469,7 @@ inline void DecodeAlpha3BitLinear(DWORD* pImPos, DXTAlphaBlock3BitLinear* pAlpha bits >>= 3; gBits[1][3] = (BYTE)(bits & mask); // now for last two rows: - bits = *(DWORD*)&pAlphaBlock->stuff[3]; // last 3 bytes + bits = *(DWORD*)&pAlphaBlock->stuff[3]; // last 3 bytes gBits[2][0] = (BYTE)(bits & mask); bits >>= 3; gBits[2][1] = (BYTE)(bits & mask); @@ -518,8 +518,8 @@ void Image_DXTC::DecompressDXT1() int xblocks = m_DDSD.dwWidth / 4; int yblocks = m_DDSD.dwHeight / 4; DWORD* pBase = (DWORD*)m_pDecompBytes; - DWORD* pImPos = (DWORD*)pBase; // pos in decompressed data - WORD* pPos = (WORD*)m_pCompBytes; // pos in compressed data + DWORD* pImPos = (DWORD*)pBase; // pos in decompressed data + WORD* pPos = (WORD*)m_pCompBytes; // pos in compressed data DXTColBlock* pBlock; Color8888 col_0, col_1, col_2, col_3; WORD wrd; @@ -536,7 +536,7 @@ void Image_DXTC::DecompressDXT1() // inline func: pImPos = (DWORD*)((DWORD)pBase + i * 16 + (j * 4) * m_nWidth * 4); DecodeColorBlock(pImPos, pBlock, m_nWidth, (DWORD*)&col_0, (DWORD*)&col_1, (DWORD*)&col_2, (DWORD*)&col_3); - if (false) // Set to RGB test pattern + if (false) // Set to RGB test pattern { pImPos = (DWORD*)((DWORD)pBase + i * 4 + j * m_nWidth * 4); *pImPos = ((i * 4) << 16) | ((j * 4) << 8) | ((63 - i) * 4); @@ -563,8 +563,8 @@ void Image_DXTC::DecompressDXT3() int xblocks = m_DDSD.dwWidth / 4; int yblocks = m_DDSD.dwHeight / 4; DWORD* pBase = (DWORD*)m_pDecompBytes; - DWORD* pImPos = (DWORD*)pBase; // pos in decompressed data - WORD* pPos = (WORD*)m_pCompBytes; // pos in compressed data + DWORD* pImPos = (DWORD*)pBase; // pos in decompressed data + WORD* pPos = (WORD*)m_pCompBytes; // pos in compressed data DXTColBlock* pBlock; DXTAlphaBlockExplicit* pAlphaBlock; Color8888 col_0, col_1, col_2, col_3; @@ -613,8 +613,8 @@ void Image_DXTC::DecompressDXT5() int xblocks = m_DDSD.dwWidth / 4; int yblocks = m_DDSD.dwHeight / 4; DWORD* pBase = (DWORD*)m_pDecompBytes; - DWORD* pImPos = (DWORD*)pBase; // pos in decompressed data - WORD* pPos = (WORD*)m_pCompBytes; // pos in compressed data + DWORD* pImPos = (DWORD*)pBase; // pos in decompressed data + WORD* pPos = (WORD*)m_pCompBytes; // pos in compressed data Color8888 col_0, col_1, col_2, col_3; // fill alphazero with appropriate value to zero out alpha when // alphazero is ANDed with the image color 32 bit DWORD: @@ -645,7 +645,7 @@ void Image_DXTC::DecompressDXT5() DecodeAlpha3BitLinear(pImPos, pAlphaBlock, m_nWidth, alphazero); } } -} // dxt5 +} // dxt5 //----------------------------------------------------------------------------- // Name: PixelFormatToString() @@ -701,7 +701,7 @@ inline void GetColorBlockColors_m2( pCol = (Color565*)&pBlock->col0; col_0->a = 0xff; col_0->r = pCol->nRed; - col_0->r <<= 3; // shift to full precision + col_0->r <<= 3; // shift to full precision col_0->g = pCol->nGreen; col_0->g <<= 2; col_0->b = pCol->nBlue; @@ -709,7 +709,7 @@ inline void GetColorBlockColors_m2( pCol = (Color565*)&pBlock->col1; col_1->a = 0xff; col_1->r = pCol->nRed; - col_1->r <<= 3; // shift to full precision + col_1->r <<= 3; // shift to full precision col_1->g = pCol->nGreen; col_1->g <<= 2; col_1->b = pCol->nBlue; @@ -752,7 +752,7 @@ inline void GetColorBlockColors_m2( wrd = ((WORD)col_0->b + (WORD)col_1->b) / 2; col_2->b = (BYTE)wrd; col_2->a = 0xff; - col_3->r = 0x00; // random color to indicate alpha + col_3->r = 0x00; // random color to indicate alpha col_3->g = 0xff; col_3->b = 0xff; col_3->a = 0x00; @@ -770,7 +770,7 @@ inline void GetColorBlockColors_m3( // or overflow!! =) Color565* pCol; pCol = (Color565*)&pBlock->col0; - col_0->a = 0x00; // must set to 0 to avoid overflow in DWORD add + col_0->a = 0x00; // must set to 0 to avoid overflow in DWORD add col_0->r = pCol->nRed; col_0->g = pCol->nGreen; col_0->b = pCol->nBlue; @@ -789,7 +789,7 @@ inline void GetColorBlockColors_m3( col_3->r = ((WORD)col_3->r << 3) / (WORD)3; col_3->g = ((WORD)col_3->g << 2) / (WORD)3; col_3->b = ((WORD)col_3->b << 3) / (WORD)3; - col_0->a = 0xff; // now set appropriate alpha + col_0->a = 0xff; // now set appropriate alpha col_1->a = 0xff; col_2->a = 0xff; col_3->a = 0xff; @@ -805,7 +805,7 @@ inline void GetColorBlockColors_m3( col_2->b = ((WORD)col_2->b << 2); col_2->a = 0xff; col_3->a = 0x00; - col_3->r = 0x00; // random color to indicate alpha + col_3->r = 0x00; // random color to indicate alpha col_3->g = 0xff; col_3->b = 0xff; } @@ -824,16 +824,16 @@ inline void GetColorBlockColors_m4( // m1 color extraction from 5-6-5 // m3 color math on DWORD before bit shift to full precision wrd = pBlock->col0; - col_0->a = 0x00; // must set to 0 to avoid possible overflow & carry to next field in DWORD add + col_0->a = 0x00; // must set to 0 to avoid possible overflow & carry to next field in DWORD add // extract r,g,b bits - col_0->b = (unsigned char)wrd & 0x1f; // 0x1f = 0001 1111 to mask out upper 3 bits + col_0->b = (unsigned char)wrd & 0x1f; // 0x1f = 0001 1111 to mask out upper 3 bits wrd >>= 5; - col_0->g = (unsigned char)wrd & 0x3f; // 0x3f = 0011 1111 to mask out upper 2 bits + col_0->g = (unsigned char)wrd & 0x3f; // 0x3f = 0011 1111 to mask out upper 2 bits wrd >>= 6; col_0->r = (unsigned char)wrd & 0x1f; // same for col # 2: wrd = pBlock->col1; - col_1->a = 0x00; // must set to 0 to avoid possible overflow in DWORD add + col_1->a = 0x00; // must set to 0 to avoid possible overflow in DWORD add // extract r,g,b bits col_1->b = (unsigned char)wrd & 0x1f; wrd >>= 5; @@ -850,7 +850,7 @@ inline void GetColorBlockColors_m4( col_3->r = ((WORD)col_3->r << 3) / (WORD)3; col_3->g = ((WORD)col_3->g << 2) / (WORD)3; col_3->b = ((WORD)col_3->b << 3) / (WORD)3; - col_0->a = 0xff; // set appropriate alpha + col_0->a = 0xff; // set appropriate alpha col_1->a = 0xff; col_2->a = 0xff; col_3->a = 0xff; @@ -866,7 +866,7 @@ inline void GetColorBlockColors_m4( col_2->b = ((WORD)col_2->b << 2); col_2->a = 0xff; col_3->a = 0x00; - col_3->r = 0x00; // random color to indicate alpha + col_3->r = 0x00; // random color to indicate alpha col_3->g = 0xff; col_3->b = 0xff; } @@ -888,25 +888,25 @@ inline void GetColorBlockColors_m1( col_0->a = 0xff; // extract r,g,b bits col_0->b = (unsigned char)wrd; - col_0->b <<= 3; // shift to full precision + col_0->b <<= 3; // shift to full precision wrd >>= 5; col_0->g = (unsigned char)wrd; - col_0->g <<= 2; // shift to full precision + col_0->g <<= 2; // shift to full precision wrd >>= 6; col_0->r = (unsigned char)wrd; - col_0->r <<= 3; // shift to full precision + col_0->r <<= 3; // shift to full precision // same for col # 2: wrd = pBlock->col1; col_1->a = 0xff; // extract r,g,b bits col_1->b = (unsigned char)wrd; - col_1->b <<= 3; // shift to full precision + col_1->b <<= 3; // shift to full precision wrd >>= 5; col_1->g = (unsigned char)wrd; - col_1->g <<= 2; // shift to full precision + col_1->g <<= 2; // shift to full precision wrd >>= 6; col_1->r = (unsigned char)wrd; - col_1->r <<= 3; // shift to full precision + col_1->r <<= 3; // shift to full precision // use this for all but the super-freak math method if (pBlock->col0 > pBlock->col1) { // Four-color block: derive the other two colors. @@ -946,12 +946,12 @@ inline void GetColorBlockColors_m1( wrd = ((WORD)col_0->b + (WORD)col_1->b) / 2; col_2->b = (BYTE)wrd; col_2->a = 0xff; - col_3->r = 0x00; // random color to indicate alpha + col_3->r = 0x00; // random color to indicate alpha col_3->g = 0xff; col_3->b = 0xff; col_3->a = 0x00; } -} // Get color block colors (...) +} // Get color block colors (...) //----------------------------------------------------------------------------- // Name: GetNumberOfBits() diff --git a/src/utils/xrDXT/Image_DXTC.h b/src/utils/xrDXT/Image_DXTC.h index 58a9b7cecf6..68f5caab7a3 100644 --- a/src/utils/xrDXT/Image_DXTC.h +++ b/src/utils/xrDXT/Image_DXTC.h @@ -38,15 +38,15 @@ enum PixFormat class Image_DXTC { - BYTE* m_pCompBytes; // compressed image bytes + BYTE* m_pCompBytes; // compressed image bytes BYTE* m_pDecompBytes; int m_nCompSize; int m_nCompLineSz; string256 m_strFormat; PixFormat m_CompFormat; - DDS_HEADER m_DDSD; // read from dds file - bool m_bMipTexture; // texture has mipmaps? - int m_nWidth; // in pixels of uncompressed image + DDS_HEADER m_DDSD; // read from dds file + bool m_bMipTexture; // texture has mipmaps? + int m_nWidth; // in pixels of uncompressed image int m_nHeight; private: @@ -62,9 +62,9 @@ class Image_DXTC Image_DXTC(); virtual ~Image_DXTC(); - bool LoadFromFile(LPCSTR filename); // true if success + bool LoadFromFile(LPCSTR filename); // true if success void Decompress(); - void SaveAsRaw(); // save decompressed bits + void SaveAsRaw(); // save decompressed bits BYTE* GetCompDataPointer() { return m_pCompBytes; }; BYTE* GetDecompDataPointer() { return m_pDecompBytes; }; int Width() { return m_nWidth; } diff --git a/src/utils/xrDXT/NVI_Convolution.h b/src/utils/xrDXT/NVI_Convolution.h index c5caa7e3c86..6f30e4093d7 100644 --- a/src/utils/xrDXT/NVI_Convolution.h +++ b/src/utils/xrDXT/NVI_Convolution.h @@ -21,9 +21,9 @@ namespace xray_nvi { struct ConvolutionKernelElement { - int x_offset; // Coordinates of sample point - int y_offset; // relative to center - float weight; // Weight to multiply sample point by + int x_offset; // Coordinates of sample point + int y_offset; // relative to center + float weight; // Weight to multiply sample point by }; // Kernel with arbitrary sample placement - @@ -65,4 +65,4 @@ class Convolver }; }; -#endif // __NVIMAGELIB_CONVOLUTION_H +#endif // __NVIMAGELIB_CONVOLUTION_H diff --git a/src/utils/xrDXT/NVI_Image.cpp b/src/utils/xrDXT/NVI_Image.cpp index 1f6b832f107..a14da3c393a 100644 --- a/src/utils/xrDXT/NVI_Image.cpp +++ b/src/utils/xrDXT/NVI_Image.cpp @@ -18,7 +18,7 @@ class NVI_ImageBordered #include "stdafx.h" -#include // for UINT_MAX +#include // for UINT_MAX #include "NVI_Image.h" using namespace xray_nvi; diff --git a/src/utils/xrDXT/NVI_Image.h b/src/utils/xrDXT/NVI_Image.h index 96805ba7807..aab795539de 100644 --- a/src/utils/xrDXT/NVI_Image.h +++ b/src/utils/xrDXT/NVI_Image.h @@ -29,10 +29,10 @@ enum NVI_PIXEL_FORMAT IMAGE_NOT_INITIALIZED, NVI_A8, //@ NVI_R8_G8_B8_A8, // unsigned integer - A is most sig byte - NVI_A8_R8_G8_B8, // unsigned integer - A is most sig byte (0xAARRGGBB) + NVI_A8_R8_G8_B8, // unsigned integer - A is most sig byte (0xAARRGGBB) NVI_A1_R5_G5_B5, NVI_R5_G6_B5, - NVI_A16, // 16-bit unsigned integer + NVI_A16, // 16-bit unsigned integer //@ NVI_R16_G16_B16, NVI_R16_G16_B16_A16, NVI_FMT_FORCEDWORD = 0xFFFFFFFF @@ -62,7 +62,7 @@ class NVI_Image BYTE* GetImageDataPointer() { return m_pArray; } bool IsDataValid(); void FlipTopToBottom(); - void AverageRGBToAlpha(); // write each pixels' avg r,g,b to alpha + void AverageRGBToAlpha(); // write each pixels' avg r,g,b to alpha void ABGR8_To_ARGB8(); private: @@ -120,16 +120,16 @@ __forceinline void NVI_Image::SetPixel_ARGB8(UINT index, DWORD pix) class NVI_ImageBordered : public NVI_Image { private: - int m_nBorderXLow; // ** Negative or zero ** + int m_nBorderXLow; // ** Negative or zero ** // This is the offset from source images' 0,0 // that marks the left border. // Border width on the left = -m_nBorderXLow; // x = 0 that pixels can be addressed - int m_nBorderXHigh; // Size of border to 'right' of image. >= 0 - int m_nBorderYLow; // Same thing for Y borders + int m_nBorderXHigh; // Size of border to 'right' of image. >= 0 + int m_nBorderYLow; // Same thing for Y borders int m_nBorderYHigh; - NVI_Image** m_hSrcImage; // Image from which this was created - bool m_bWrap; // Wrap or clamp the border pixels + NVI_Image** m_hSrcImage; // Image from which this was created + bool m_bWrap; // Wrap or clamp the border pixels void CopyDataFromSource(); @@ -154,4 +154,4 @@ __forceinline void NVI_ImageBordered::GetPixel(DWORD* outColor, int i, int j) } }; -#endif // __NVIMAGELIB_NVI_IMAGE_H +#endif // __NVIMAGELIB_NVI_IMAGE_H diff --git a/src/utils/xrDXT/NormalMapGen.cpp b/src/utils/xrDXT/NormalMapGen.cpp index f29ea1ac9b6..9acd4ec95f9 100644 --- a/src/utils/xrDXT/NormalMapGen.cpp +++ b/src/utils/xrDXT/NormalMapGen.cpp @@ -145,7 +145,7 @@ void ConvertAlphaToNormalMap_4x(NVI_Image* pSrc, float scale, bool wrap) // 0 1/2 0 // 0 0 0 // 0 -1/2 0 - int numelem = 2; // num elements in each kernel + int numelem = 2; // num elements in each kernel ConvolutionKernelElement du_elem[] = {{-1, 0, -1.0f / 2.0f}, {1, 0, 1.0f / 2.0f}}; ConvolutionKernelElement dv_elem[] = {{0, 1, 1.0f / 2.0f}, {0, -1, -1.0f / 2.0f}}; int num_kernels = 2; @@ -164,7 +164,7 @@ void ConvertAlphaToNormalMap_3x3(NVI_Image* pSrc, float scale, bool wrap) // height + kernel heigh - 1 ) to make wrap code easy for arbitrary // kernels. Edge texels are duplicated into the border regions or // copied from the other side of the source image if wrapping is on. - int numelem = 6; // num elements in each kernel + int numelem = 6; // num elements in each kernel float wt = 1.0f / 6.0f; // Kernel for change of height in u axis: // -1/6 0 1/6 @@ -195,7 +195,7 @@ void ConvertAlphaToNormalMap_5x5(NVI_Image* pSrc, float scale, bool wrap) // height + kernel heigh - 1 ) to make wrap code easy for arbitrary // kernels. Edge texels are duplicated into the border regions or // copied from the other side of the source image if wrapping is on. - int numelem; // num elements in each kernel + int numelem; // num elements in each kernel float wt1 = 1.0f / 6.0f; float wt2 = 1.0f / 48.0f; /* @@ -349,7 +349,7 @@ void ConvertAlphaToNormalMap_7x7(NVI_Image* pSrc, float scale, bool wrap) // height + kernel heigh - 1 ) to make wrap code easy for arbitrary // kernels. Edge texels are duplicated into the border regions or // copied from the other side of the source image if wrapping is on. - int numelem; // num elements in each kernel + int numelem; // num elements in each kernel // Kernel for change of height in u axis: // A Sobel filter kernel numelem = 49; @@ -390,7 +390,7 @@ void ConvertAlphaToNormalMap_9x9(NVI_Image* pSrc, float scale, bool wrap) // height + kernel heigh - 1 ) to make wrap code easy for arbitrary // kernels. Edge texels are duplicated into the border regions or // copied from the other side of the source image if wrapping is on. - int numelem; // num elements in each kernel + int numelem; // num elements in each kernel // Kernel for change of height in u axis: // A Sobel filter kernel numelem = 81; @@ -450,18 +450,18 @@ IC u32 it_gloss_rev(u32 d, u32 s) IC u32 it_difference(u32 d, u32 orig, u32 ucomp) { - return color_rgba(128 + 2 * (int(color_get_R(orig)) - int(color_get_R(ucomp))) / 3, // R-error - 128 + 2 * (int(color_get_G(orig)) - int(color_get_G(ucomp))) / 3, // G-error - 128 + 2 * (int(color_get_B(orig)) - int(color_get_B(ucomp))) / 3, // B-error - 128 + 2 * (int(color_get_A(orig)) - int(color_get_A(ucomp))) / 3); // A-error + return color_rgba(128 + 2 * (int(color_get_R(orig)) - int(color_get_R(ucomp))) / 3, // R-error + 128 + 2 * (int(color_get_G(orig)) - int(color_get_G(ucomp))) / 3, // G-error + 128 + 2 * (int(color_get_B(orig)) - int(color_get_B(ucomp))) / 3, // B-error + 128 + 2 * (int(color_get_A(orig)) - int(color_get_A(ucomp))) / 3); // A-error } IC u32 it_height_rev(u32 d, u32 s) { - return color_rgba(color_get_A(d), // diff x - color_get_B(d), // diff y - color_get_G(d), // diff z - color_get_R(s)); // height + return color_rgba(color_get_A(d), // diff x + color_get_B(d), // diff y + color_get_G(d), // diff z + color_get_R(s)); // height } template @@ -571,7 +571,7 @@ int DXTCompressBump( .SaveTGA(XR_DXT_DBG_BUMP_STAGES_DIR "\\4-normal_1D.tga", true); #endif // Rescale by virtual height - float h_scale = powf(fmt->bump_virtual_height / 0.05f, 0.75f); // move towards 1.0f + float h_scale = powf(fmt->bump_virtual_height / 0.05f, 0.75f); // move towards 1.0f if (h_scale > 1.f) { h_scale = _sqrt(h_scale); } @@ -580,7 +580,7 @@ int DXTCompressBump( for (u32 x = 0; x < w; x++) { u32& sh = *((u32*)(T_height_gloss + y * pitch) + x); - u32 h = color_get_R(sh); // height -> R-channel + u32 h = color_get_R(sh); // height -> R-channel h = iFloor(float(h) * h_scale + EPS_S); sh = color_rgba(h, color_get_G(sh), color_get_B(sh), color_get_A(sh)); } @@ -593,7 +593,7 @@ int DXTCompressBump( for (u32 x = 0; x < w; x++) { u32 sh = *((u32*)(T_height_gloss + y * pitch) + x); - u32 h = color_get_R(sh); // height -> R-channel + u32 h = color_get_R(sh); // height -> R-channel h_average += h; if (h < h_min) { h_min = h; @@ -609,7 +609,7 @@ int DXTCompressBump( h_median /= 10; s32 h_correction = s32(127) - s32(h_median); // Calculate filtered and corrected height - u8* T_height_pf = (u8*)calloc(w * h, sizeof(u32)); // filtered for parallax + u8* T_height_pf = (u8*)calloc(w * h, sizeof(u32)); // filtered for parallax for (s32 y = 0; y < s32(h); y++) { u32 p = pitch; diff --git a/src/utils/xrDXT/StdAfx.h b/src/utils/xrDXT/StdAfx.h index d511bc3bfc9..247e7867b85 100644 --- a/src/utils/xrDXT/StdAfx.h +++ b/src/utils/xrDXT/StdAfx.h @@ -23,7 +23,7 @@ #ifndef MAKEFOURCC #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) -#endif // defined(MAKEFOURCC) +#endif // defined(MAKEFOURCC) #pragma comment(lib, "xrCore.lib") #pragma warning(disable : 4995) diff --git a/src/utils/xrDXT/dds.h b/src/utils/xrDXT/dds.h index 5ec5efbd1e0..fd622e69909 100644 --- a/src/utils/xrDXT/dds.h +++ b/src/utils/xrDXT/dds.h @@ -8,9 +8,9 @@ #ifndef _DDS_H_ #define _DDS_H_ -#define DDS_FOURCC 0x00000004 // DDPF_FOURCC -#define DDS_RGB 0x00000040 // DDPF_RGB -#define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS +#define DDS_FOURCC 0x00000004 // DDPF_FOURCC +#define DDS_RGB 0x00000040 // DDPF_RGB +#define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS const DDS_PIXELFORMAT DDSPF_DXT1 = {sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('D', 'X', 'T', '1'), 0, 0, 0, 0, 0}; @@ -37,28 +37,28 @@ const DDS_PIXELFORMAT DDSPF_R8G8B8 = { const DDS_PIXELFORMAT DDSPF_R5G6B5 = { sizeof(DDS_PIXELFORMAT), DDS_RGB, 0, 16, 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000}; -#define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT -#define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT -#define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH -#define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH -#define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE +#define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT +#define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT +#define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH +#define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH +#define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE -#define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE -#define DDS_SURFACE_FLAGS_MIPMAP 0x00400008 // DDSCAPS_COMPLEX | DDSCAPS_MIPMAP -#define DDS_SURFACE_FLAGS_CUBEMAP 0x00000008 // DDSCAPS_COMPLEX +#define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE +#define DDS_SURFACE_FLAGS_MIPMAP 0x00400008 // DDSCAPS_COMPLEX | DDSCAPS_MIPMAP +#define DDS_SURFACE_FLAGS_CUBEMAP 0x00000008 // DDSCAPS_COMPLEX -#define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX -#define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX -#define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY -#define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY -#define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ -#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ +#define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX +#define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX +#define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY +#define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY +#define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ +#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ #define DDS_CUBEMAP_ALLFACES \ (DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX | DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY | \ DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ) -#define DDS_FLAGS_VOLUME 0x00200000 // DDSCAPS2_VOLUME +#define DDS_FLAGS_VOLUME 0x00200000 // DDSCAPS2_VOLUME struct DDS_HEADER { @@ -67,7 +67,7 @@ struct DDS_HEADER DWORD dwHeight; DWORD dwWidth; DWORD dwPitchOrLinearSize; - DWORD dwDepth; // only if DDS_HEADER_FLAGS_VOLUME is set in dwHeaderFlags + DWORD dwDepth; // only if DDS_HEADER_FLAGS_VOLUME is set in dwHeaderFlags DWORD dwMipMapCount; DWORD dwReserved1[11]; DDS_PIXELFORMAT ddspf; diff --git a/src/utils/xrDXT/dds/ConvertColor.h b/src/utils/xrDXT/dds/ConvertColor.h index 191634f4fec..093d3748f07 100644 --- a/src/utils/xrDXT/dds/ConvertColor.h +++ b/src/utils/xrDXT/dds/ConvertColor.h @@ -53,9 +53,9 @@ class nvColorConvert int FloatToUnsignedPS(float pixel, int depth); int FloatToSignedPS(float pixel, int depth, int plane); // format to float - static float UnsignedToFloat(int channel); // unsigned, 8 bits - static float UnsignedToFloat(int channel, int nBits); // unsigned - static float SignedToFloat(int channel); // 8 bits + static float UnsignedToFloat(int channel); // unsigned, 8 bits + static float UnsignedToFloat(int channel, int nBits); // unsigned + static float SignedToFloat(int channel); // 8 bits static float SignedToFloat(int channel, int nBits); static void RGBAToFloat(int r, int g, int b, int a, fpPixel& fp) @@ -93,7 +93,7 @@ class nvColorConvert else if (h.ieee.e == 0 && h.ieee.m != 0) { // denorm -- denorm half will fit in non-denorm single - const float half_denorm = 1.0f / 16384.0f; // 2^-14 + const float half_denorm = 1.0f / 16384.0f; // 2^-14 float mantissa = (float)h.ieee.m / 1024.0f; float sgn = (h.ieee.s) ? -1.0f : 1.0f; sng.f = sgn * mantissa * half_denorm; @@ -119,9 +119,9 @@ class nvColorConvert } /// float to format - static unsigned long FloatToUnsigned(float channel); // 8 bits + static unsigned long FloatToUnsigned(float channel); // 8 bits static unsigned long FloatToUnsigned(float channel, int nBits); - static long FloatToSigned(float channel); // 8 bits + static long FloatToSigned(float channel); // 8 bits static long FloatToSigned(float channel, int nBits); static unsigned long NormalToUnsigned(float inColor) { return FloatToUnsigned(inColor * 0.5f + 0.5f); } @@ -234,14 +234,14 @@ class nvColorConvert { // regular number int new_exp = f.ieee.e - 127; - if (new_exp < -24) { // this maps to 0 + if (new_exp < -24) { // this maps to 0 h.ieee.m = 0; h.ieee.e = 0; } if (new_exp < -14) { // this maps to a denorm h.ieee.e = 0; - unsigned int exp_val = (unsigned int)(-14 - new_exp); // 2^-exp_val + unsigned int exp_val = (unsigned int)(-14 - new_exp); // 2^-exp_val switch (exp_val) { case 0: @@ -261,7 +261,7 @@ class nvColorConvert } } else if (new_exp > 15) - { // map this value to infinity + { // map this value to infinity h.ieee.m = 0; h.ieee.e = 31; } diff --git a/src/utils/xrDXT/dds/ddsTypes.h b/src/utils/xrDXT/dds/ddsTypes.h index 65b3a38271e..57bfac0f55b 100644 --- a/src/utils/xrDXT/dds/ddsTypes.h +++ b/src/utils/xrDXT/dds/ddsTypes.h @@ -3,7 +3,7 @@ #include #if defined(WIN32_LEAN_AND_MEAN) -#include // MAKEFOURCC +#include // MAKEFOURCC #endif #include @@ -82,13 +82,13 @@ typedef enum nvD3DFORMAT { } nvD3DFORMAT; typedef enum nvRescaleTypes { - kRescaleNone, // no rescale - kRescaleNearestPower2, // rescale to nearest power of two - kRescaleBiggestPower2, // rescale to next bigger power of 2 - kRescaleSmallestPower2, // rescale to smaller power of 2 - kRescaleNextSmallestPower2, // rescale to next smaller power of 2 - kRescalePreScale, // rescale to this size - kRescaleRelScale, // relative rescale + kRescaleNone, // no rescale + kRescaleNearestPower2, // rescale to nearest power of two + kRescaleBiggestPower2, // rescale to next bigger power of 2 + kRescaleSmallestPower2, // rescale to smaller power of 2 + kRescaleNextSmallestPower2, // rescale to next smaller power of 2 + kRescalePreScale, // rescale to this size + kRescaleRelScale, // relative rescale } RescaleTypes; typedef enum nvSharpenFilterTypes { @@ -118,7 +118,7 @@ typedef enum nvMipMapGeneration { kGenerateMipMaps = 30, kUseExistingMipMaps = 31, kNoMipMaps = 32, - kCompleteMipMapChain = 33, // fill in missing MIP maps + kCompleteMipMapChain = 33, // fill in missing MIP maps }; typedef enum nvMipFilterTypes { @@ -141,31 +141,31 @@ typedef enum nvMipFilterTypes { enum nvTextureFormats { kDXT1, - kDXT1a, // DXT1 with one bit alpha - kDXT3, // explicit alpha - kDXT5, // interpolated alpha - k4444, // a4 r4 g4 b4 - k1555, // a1 r5 g5 b5 - k565, // a0 r5 g6 b5 - k8888, // a8 r8 g8 b8 - k888, // a0 r8 g8 b8 - k555, // a0 r5 g5 b5 - kP8c, // paletted color only - kV8U8, // DuDv - kCxV8U8, // normal map - kA8, // alpha only - kP4c, // 16 bit color palette + kDXT1a, // DXT1 with one bit alpha + kDXT3, // explicit alpha + kDXT5, // interpolated alpha + k4444, // a4 r4 g4 b4 + k1555, // a1 r5 g5 b5 + k565, // a0 r5 g6 b5 + k8888, // a8 r8 g8 b8 + k888, // a0 r8 g8 b8 + k555, // a0 r5 g5 b5 + kP8c, // paletted color only + kV8U8, // DuDv + kCxV8U8, // normal map + kA8, // alpha only + kP4c, // 16 bit color palette kQ8W8V8U8, kA8L8, kR32F, kA32B32G32R32F, kA16B16G16R16F, - kL8, // luminance - kP8a, // paletted with alpha - kP4a, // 16 bit color palette with alpha - kR16F, // single component fp16 - kDXT5_NM, // normal map compression. G = Y, A = X - kX888, // aX r8 g8 b8 + kL8, // luminance + kP8a, // paletted with alpha + kP4a, // 16 bit color palette with alpha + kR16F, // single component fp16 + kDXT5_NM, // normal map compression. G = Y, A = X + kX888, // aX r8 g8 b8 kV16U16, kG16R16, kG16R16F, @@ -187,7 +187,7 @@ enum nvCompressionWeighting kGreyScaleWeighting, kTangentSpaceNormalMapWeighting, kObjectSpaceNormalMapWeighting, - kUserDefinedWeighting, // used values stored in 'weight' + kUserDefinedWeighting, // used values stored in 'weight' }; enum nvNormalMapFilters @@ -226,7 +226,7 @@ enum nvQualitySetting { kQualityFastest = 68, kQualityNormal = 69, - kQualityProduction = 71, // typical value + kQualityProduction = 71, // typical value kQualityHighest = 72, }; @@ -255,20 +255,20 @@ class nvImageContainer // loaded directly from the .dds header DDS_PIXELFORMAT m_ddpfPixelFormat; // in file read - size_t width; // of MIP 0 - size_t height; // of MIP 0 - size_t depth; // for volume maps + size_t width; // of MIP 0 + size_t height; // of MIP 0 + size_t depth; // for volume maps size_t actualMipMapCount; size_t nMIPMapsToLoad; - bool bFoundAlphaInRead; // is alpha field present and non-zero + bool bFoundAlphaInRead; // is alpha field present and non-zero // in the input file DWORD dwCubeMapFlags; size_t bits_per_component; - size_t nPlanes; // number of planes in the file format - bool bCompressed; // is file a compressed format - size_t paletteSize; // 16 or 256 entries + size_t nPlanes; // number of planes in the file format + bool bCompressed; // is file a compressed format + size_t paletteSize; // 16 or 256 entries rgba_t palette[256]; - DWORD fmt; // D3DFORMAT specified in .dds file + DWORD fmt; // D3DFORMAT specified in .dds file nvTextureFormats textureFormat; nvTextureTypes textureType; fpMipMappedImage fpMIPImage; @@ -280,11 +280,11 @@ class nvImageContainer nvImageContainer() { - bits_per_component = 0; // image's resolution in bits per pixel per plane + bits_per_component = 0; // image's resolution in bits per pixel per plane paletteSize = 0; bFoundAlphaInRead = false; bCompressed = false; - fmt = 0; // nvD3DFMT_UNKNOWN + fmt = 0; // nvD3DFMT_UNKNOWN dwCubeMapFlags = 0; actualMipMapCount = 1; nMIPMapsToLoad = 1; diff --git a/src/utils/xrDXT/dds/nvErrorCodes.h b/src/utils/xrDXT/dds/nvErrorCodes.h index 7d332036a5a..cc632eff737 100644 --- a/src/utils/xrDXT/dds/nvErrorCodes.h +++ b/src/utils/xrDXT/dds/nvErrorCodes.h @@ -2,7 +2,7 @@ typedef enum NV_ERROR_CODE { NV_OK = 0, - NV_FAIL = -1, // generic + NV_FAIL = -1, // generic NV_CANT_OPEN_INPUT_FILE = -2, NV_CANT_OPEN_OUTPUT_FILE = -3, NV_BAD_OPTION = -4, @@ -13,7 +13,7 @@ typedef enum NV_ERROR_CODE { NV_BAD_LIST_FILE_CONTENTS = -9, NV_IMAGE_NOT_SQUARE = -10, NV_IMAGES_NOT_SAME_SIZE = -11, - NV_UNKNOWN_CONVERSION = -12, // for normal map generation + NV_UNKNOWN_CONVERSION = -12, // for normal map generation NV_CANT_OPEN_PROFILE = -13, NV_IMAGE_NOT_MULT4 = -14, NV_OUTPUT_FILE_IS_READ_ONLY = -15, diff --git a/src/utils/xrDXT/dds/nvdxt_options.h b/src/utils/xrDXT/dds/nvdxt_options.h index dcffdc41cf6..916d198697b 100644 --- a/src/utils/xrDXT/dds/nvdxt_options.h +++ b/src/utils/xrDXT/dds/nvdxt_options.h @@ -27,7 +27,7 @@ inline char* GetDXTCVersion() // max mip maps #define MAX_MIP_MAPS 17 -typedef unsigned char nvBoolean; // for photoshop scripting +typedef unsigned char nvBoolean; // for photoshop scripting typedef struct nvNormalMap { @@ -42,13 +42,13 @@ typedef struct nvNormalMap nvNormalMapFilters filterKernel; // method to convert color to height nvHeightConversionMethods heightConversionMethod; - nvAlphaResult alphaResult; // what to do with the alpha channel when done + nvAlphaResult alphaResult; // what to do with the alpha channel when done nvBoolean bWrap; - nvBoolean bInvertX; // flip the x direction - nvBoolean bInvertY; // flip the y direction - nvBoolean bInvertZ; // flip the z direction + nvBoolean bInvertX; // flip the x direction + nvBoolean bInvertY; // flip the y direction + nvBoolean bInvertZ; // flip the z direction nvBoolean bAddHeightMap; - nvBoolean bNormalMapSwapRGB; // swap color channels + nvBoolean bNormalMapSwapRGB; // swap color channels nvNormalMap() { @@ -86,39 +86,39 @@ class nvCompressionOptions bClampScale = false; clampScaleX = 4096; clampScaleY = 4096; - mipMapGeneration = kGenerateMipMaps; // dNoMipMaps, dUseExistingMipMaps, dGenerateMipMaps - numMipMapsToWrite = 0; // (number of mipmaps to write out) - mipFilterType = kMipFilterTriangle; // for MIP maps - bBinaryAlpha = false; // zero or one alpha channel + mipMapGeneration = kGenerateMipMaps; // dNoMipMaps, dUseExistingMipMaps, dGenerateMipMaps + numMipMapsToWrite = 0; // (number of mipmaps to write out) + mipFilterType = kMipFilterTriangle; // for MIP maps + bBinaryAlpha = false; // zero or one alpha channel bRGBE = false; - bAlphaBorder = false; // make an alpha border + bAlphaBorder = false; // make an alpha border bAlphaBorderLeft = false; bAlphaBorderRight = false; bAlphaBorderTop = false; bAlphaBorderBottom = false; - bBorder = false; // make a color border - borderColor32F.r = 0.0f; // color of border - borderColor32F.g = 0.0f; // color of border - borderColor32F.b = 0.0f; // color of border - borderColor32F.a = 0.0f; // alpha of border - bFadeColor = false; // fade color over MIP maps - bFadeAlpha = false; // fade alpha over MIP maps - fadeToColor32F.r = 0.0f; // color to fade to - fadeToColor32F.g = 0.0f; // color to fade to - fadeToColor32F.b = 0.0f; // color to fade to - fadeToColor32F.a = 0.0f; // alpha to fade to - fadeToDelay = 0; // start fading after 'n' MIP maps - fadeAmount32F = 0.15f; // percentage of color to fade in %15 - alphaThreshold32F = 0.5; // When Binary Alpha is selected, below this value, alpha is zero - bDitherColor = false; // enable dithering during 16 bit conversion - bDitherMip0 = false; // enable dithering during 16 bit conversion for each MIP level (after filtering) - bForceDXT1FourColors = false; // do not let DXT1 use 3 color representation + bBorder = false; // make a color border + borderColor32F.r = 0.0f; // color of border + borderColor32F.g = 0.0f; // color of border + borderColor32F.b = 0.0f; // color of border + borderColor32F.a = 0.0f; // alpha of border + bFadeColor = false; // fade color over MIP maps + bFadeAlpha = false; // fade alpha over MIP maps + fadeToColor32F.r = 0.0f; // color to fade to + fadeToColor32F.g = 0.0f; // color to fade to + fadeToColor32F.b = 0.0f; // color to fade to + fadeToColor32F.a = 0.0f; // alpha to fade to + fadeToDelay = 0; // start fading after 'n' MIP maps + fadeAmount32F = 0.15f; // percentage of color to fade in %15 + alphaThreshold32F = 0.5; // When Binary Alpha is selected, below this value, alpha is zero + bDitherColor = false; // enable dithering during 16 bit conversion + bDitherMip0 = false; // enable dithering during 16 bit conversion for each MIP level (after filtering) + bForceDXT1FourColors = false; // do not let DXT1 use 3 color representation sharpenFilterType = kSharpenFilterNone; bErrorDiffusion = false; errorDiffusionWidth = 1; weightType = kLuminanceWeighting; bNormalizeTexels = false; - weight[0] = 0.3086f; // luminance conversion values + weight[0] = 0.3086f; // luminance conversion values weight[1] = 0.6094f; weight[2] = 0.0820f; // gamma value for all filters @@ -129,11 +129,11 @@ class nvCompressionOptions // width of filter filterWidth = 10.0f; bOverrideFilterWidth = false; - textureType = kTextureTypeTexture2D; // regular decal, cube or volume + textureType = kTextureTypeTexture2D; // regular decal, cube or volume textureFormat = kDXT1; - bSwapRG = false; // swap color positions R and G - bSwapRB = false; // swap color positions R and G - user_data = NULL; // user supplied point passed down to write functions + bSwapRG = false; // swap color positions R and G + bSwapRB = false; // swap color positions R and G + user_data = NULL; // user supplied point passed down to write functions float default_filter[5][5] = { 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, -2, 11, -2, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, }; @@ -144,13 +144,13 @@ class nvCompressionOptions custom_filter_data.filter[i][j] = default_filter[i][j]; } } - custom_filter_data.div = 3; // div - custom_filter_data.bias = 0; // bias - unsharp_data.radius32F = 5.0; // radius - unsharp_data.amount32F = 0.5; // amount - unsharp_data.threshold32F = 0; // threshold - xsharp_data.strength32F = 1.0f; // xsharp strength - xsharp_data.threshold32F = 1.0f; // xsharp threshold + custom_filter_data.div = 3; // div + custom_filter_data.bias = 0; // bias + unsharp_data.radius32F = 5.0; // radius + unsharp_data.amount32F = 0.5; // amount + unsharp_data.threshold32F = 0; // threshold + xsharp_data.strength32F = 1.0f; // xsharp strength + xsharp_data.threshold32F = 1.0f; // xsharp threshold sharpening_passes_per_mip_level[0] = 0; for (int i = 1; i < MAX_MIP_MAPS; i++) sharpening_passes_per_mip_level[i] = 1; @@ -164,39 +164,39 @@ class nvCompressionOptions color_palette[i].b = 0; color_palette[i].a = 0; } - paletteSize = 0; // this will be set by the format read or write + paletteSize = 0; // this will be set by the format read or write autoGeneratePalette = false; - outputScale.r = 1.0f; // scale and bias when writing output values - outputScale.g = 1.0f; // scale and bias when writing output values - outputScale.b = 1.0f; // scale and bias when writing output values - outputScale.a = 1.0f; // scale and bias when writing output values + outputScale.r = 1.0f; // scale and bias when writing output values + outputScale.g = 1.0f; // scale and bias when writing output values + outputScale.b = 1.0f; // scale and bias when writing output values + outputScale.a = 1.0f; // scale and bias when writing output values outputBias.r = 0.0f; outputBias.g = 0.0f; outputBias.b = 0.0f; outputBias.a = 0.0f; - inputScale.r = 1.0f; // scale and bias after loading data - inputScale.g = 1.0f; // scale and bias - inputScale.b = 1.0f; // scale and bias - inputScale.a = 1.0f; // scale and bias + inputScale.r = 1.0f; // scale and bias after loading data + inputScale.g = 1.0f; // scale and bias + inputScale.b = 1.0f; // scale and bias + inputScale.a = 1.0f; // scale and bias inputBias.r = 0.0f; inputBias.g = 0.0f; inputBias.b = 0.0f; inputBias.a = 0.0f; bConvertToGreyScale = false; - greyScaleWeight.r = 0.3086f; // scale and bias after loading data - greyScaleWeight.g = 0.6094f; // scale and bias - greyScaleWeight.b = 0.0820f; // scale and bias - greyScaleWeight.a = 0.0f; // scale and bias - brightness.r = 0.0; // adjust brightness = 0 none - brightness.g = 0.0; // - brightness.b = 0.0; // - brightness.a = 0.0; // - contrast.r = 1; // contrast 1 == none + greyScaleWeight.r = 0.3086f; // scale and bias after loading data + greyScaleWeight.g = 0.6094f; // scale and bias + greyScaleWeight.b = 0.0820f; // scale and bias + greyScaleWeight.a = 0.0f; // scale and bias + brightness.r = 0.0; // adjust brightness = 0 none + brightness.g = 0.0; // + brightness.b = 0.0; // + brightness.a = 0.0; // + contrast.r = 1; // contrast 1 == none contrast.g = 1; contrast.b = 1; contrast.a = 1; - bCalcLuminance = false; // do not convert to luminance by default - bOutputWrap = false; // wrap the values when outputting to the desired format + bCalcLuminance = false; // do not convert to luminance by default + bOutputWrap = false; // wrap the values when outputting to the desired format bCreateOnePalette = false; } @@ -214,8 +214,8 @@ class nvCompressionOptions } /////////////////////////////// COMPRESSION WEIGHTING ////////////////////////////// - nvCompressionWeighting weightType; // weighting type for DXT compressop - float weight[3]; // weights used for compress + nvCompressionWeighting weightType; // weighting type for DXT compressop + float weight[3]; // weights used for compress void SetCompressionWeighting(nvCompressionWeighting type, float new_weight[3]) { @@ -226,13 +226,13 @@ class nvCompressionOptions weight[2] = new_weight[2]; } - nvNormalMap normalMap; // filled when processing normal maps - nvBoolean bNormalizeTexels; // normalize the texels + nvNormalMap normalMap; // filled when processing normal maps + nvBoolean bNormalizeTexels; // normalize the texels /////////////////////////// SCALING IMAGE ///////////////////////////////// - nvRescaleTypes rescaleImageType; // rescaling type before image before compression - nvMipFilterTypes rescaleImageFilter; // rescaling filter - float scaleX; // scale to this if we are prescaling images before compressing + nvRescaleTypes rescaleImageType; // rescaling type before image before compression + nvMipFilterTypes rescaleImageFilter; // rescaling filter + float scaleX; // scale to this if we are prescaling images before compressing float scaleY; // scale the image to this size first @@ -278,8 +278,8 @@ class nvCompressionOptions } /////////////////// CLAMPING IMAGE SIZE /////////////////////////////////// - nvBoolean bClamp; // Clamp to max size - float clampX; // clamping values + nvBoolean bClamp; // Clamp to max size + float clampX; // clamping values float clampY; // image no bigger than... @@ -290,8 +290,8 @@ class nvCompressionOptions clampY = maxY; } - nvBoolean bClampScale; // maximum value of h or w (retain scale) - float clampScaleX; // clamping values + nvBoolean bClampScale; // maximum value of h or w (retain scale) + float clampScaleX; // clamping values float clampScaleY; // clamp max image size and maintain image proportions. @@ -304,8 +304,8 @@ class nvCompressionOptions } ///////////////////////////// MIP MAPS /////////////////////////////////// - nvMipMapGeneration mipMapGeneration; // changed MIPMaptype to an enum - long numMipMapsToWrite; // max number of Mip maps to generate + nvMipMapGeneration mipMapGeneration; // changed MIPMaptype to an enum + long numMipMapsToWrite; // max number of Mip maps to generate // 0 = all void GenerateMIPMaps(int n) @@ -328,10 +328,10 @@ class nvCompressionOptions numMipMapsToWrite = n; } - nvMipFilterTypes mipFilterType; // for MIP map, select from MIPFilterTypes + nvMipFilterTypes mipFilterType; // for MIP map, select from MIPFilterTypes /////////////////// ALPHA ////////////////////////////////////////// - nvBoolean bBinaryAlpha; // zero or one alpha channel + nvBoolean bBinaryAlpha; // zero or one alpha channel // [0,1] // threshold for alpha transparency DXT1 // or when Binary Alpha is selected, below this value, alpha is zero @@ -345,13 +345,13 @@ class nvCompressionOptions ////////////////////////// BORDERS ///////////////////////////////////////// // set any of these to generate an alpha border - nvBoolean bAlphaBorder; // make an alpha border - nvBoolean bAlphaBorderLeft; // make an alpha border on just the left - nvBoolean bAlphaBorderRight; // make an alpha border on just the right - nvBoolean bAlphaBorderTop; // make an alpha border on just the top - nvBoolean bAlphaBorderBottom; // make an alpha - nvBoolean bBorder; // make a color border - fpPixel borderColor32F; // color of border [0,1] + nvBoolean bAlphaBorder; // make an alpha border + nvBoolean bAlphaBorderLeft; // make an alpha border on just the left + nvBoolean bAlphaBorderRight; // make an alpha border on just the right + nvBoolean bAlphaBorderTop; // make an alpha border on just the top + nvBoolean bAlphaBorderBottom; // make an alpha + nvBoolean bBorder; // make a color border + fpPixel borderColor32F; // color of border [0,1] void SetBorderColor(fpPixel& color) { @@ -361,11 +361,11 @@ class nvCompressionOptions void NoBorderColor() { bBorder = false; } /////////////////////// FADING MIP LEVELS //////////////////////////// - nvBoolean bFadeColor; // fade color over MIP maps - nvBoolean bFadeAlpha; // fade alpha over MIP maps - fpPixel fadeToColor32F; // color and alpha to fade to - long fadeToDelay; // start fading after 'n' MIP maps - float fadeAmount32F; // percentage of color to fade in + nvBoolean bFadeColor; // fade color over MIP maps + nvBoolean bFadeAlpha; // fade alpha over MIP maps + fpPixel fadeToColor32F; // color and alpha to fade to + long fadeToDelay; // start fading after 'n' MIP maps + float fadeAmount32F; // percentage of color to fade in nvBoolean bUserSpecifiedFadingAmounts; float userFadingAmounts[MAX_MIP_MAPS]; @@ -417,9 +417,9 @@ class nvCompressionOptions // used when unsharpen sharping filter is used struct { - float radius32F; // radius - float amount32F; // amount - float threshold32F; // threshold [0,1] + float radius32F; // radius + float amount32F; // amount + float threshold32F; // threshold [0,1] } unsharp_data; @@ -432,7 +432,7 @@ class nvCompressionOptions } xsharp_data; int sharpening_passes_per_mip_level[MAX_MIP_MAPS]; - nvSharpenFilterTypes sharpenFilterType; // post filtering image sharpening + nvSharpenFilterTypes sharpenFilterType; // post filtering image sharpening void SetNumberOfSharpeningPassesPerMIPLevel(int passes[MAX_MIP_MAPS]) { @@ -473,8 +473,8 @@ class nvCompressionOptions } } - nvBoolean bErrorDiffusion; // diffuse error, used for helping gradient images - int errorDiffusionWidth; // number of texel to include + nvBoolean bErrorDiffusion; // diffuse error, used for helping gradient images + int errorDiffusionWidth; // number of texel to include void EnableErrorDiffusion(int width) { @@ -485,10 +485,10 @@ class nvCompressionOptions ///////////////////// FILTERING //////////////////////////////////////// // convert to gamma space before filtering nvBoolean bEnableFilterGamma; - float filterGamma; // gamma value for filtering (MIP map generation) - float filterBlur; // sharpness or blurriness of filtering - nvBoolean bOverrideFilterWidth; // use the specified width in FilterWidth,instead of the default - float filterWidth; // override fiter width with this value + float filterGamma; // gamma value for filtering (MIP map generation) + float filterBlur; // sharpness or blurriness of filtering + nvBoolean bOverrideFilterWidth; // use the specified width in FilterWidth,instead of the default + float filterWidth; // override fiter width with this value // 0 is no gamma correction void EnableGammaFiltering(float gamma) @@ -504,8 +504,8 @@ class nvCompressionOptions } void SetFilterSharpness(float sharp) { filterBlur = sharp; } - nvTextureTypes textureType; // what type of texture is this? - nvTextureFormats textureFormat; // format to convert to + nvTextureTypes textureType; // what type of texture is this? + nvTextureFormats textureFormat; // format to convert to void SetTextureFormat(nvTextureTypes type, nvTextureFormats format) { @@ -515,7 +515,7 @@ class nvCompressionOptions size_t paletteSize; rgba_t color_palette[256]; - nvBoolean autoGeneratePalette; // generate palette for p8 and p4 formats + nvBoolean autoGeneratePalette; // generate palette for p8 and p4 formats // for P4 and P8 formats // set 16 for P4 format and 256 for P8 format @@ -529,7 +529,7 @@ class nvCompressionOptions } ////////////////// DATA SCALING ////////////////////// - fpPixel outputScale; // scale and bias when writing output values + fpPixel outputScale; // scale and bias when writing output values fpPixel outputBias; void ScaleBiasOutput(fpPixel& scale, fpPixel& bias) @@ -538,7 +538,7 @@ class nvCompressionOptions outputBias = bias; } - fpPixel inputScale; // scale and bias on input to compressor + fpPixel inputScale; // scale and bias on input to compressor fpPixel inputBias; void ScaleBiasInput(fpPixel& scale, fpPixel& bias) @@ -566,21 +566,21 @@ class nvCompressionOptions } /////////// general enables //////////////////////////////// - nvBoolean bOutputWrap; // wrap the values (before clamping to the format range) - // when outputting to the desired format - nvBoolean bCalcLuminance; // convert color to luminance for 'L' formats - nvBoolean bSwapRB; // swap color positions R and G - nvBoolean bSwapRG; // swap color positions R and G - nvBoolean bForceDXT1FourColors; // do not let DXT1 use 3 color representation - nvBoolean bRGBE; // rgba_t is in RGBE format - nvBoolean bCreateOnePalette; // All 4x4 compression blocks share the same palette + nvBoolean bOutputWrap; // wrap the values (before clamping to the format range) + // when outputting to the desired format + nvBoolean bCalcLuminance; // convert color to luminance for 'L' formats + nvBoolean bSwapRB; // swap color positions R and G + nvBoolean bSwapRG; // swap color positions R and G + nvBoolean bForceDXT1FourColors; // do not let DXT1 use 3 color representation + nvBoolean bRGBE; // rgba_t is in RGBE format + nvBoolean bCreateOnePalette; // All 4x4 compression blocks share the same palette /////////////////// DISABLED //////////////////////////////// - nvBoolean bDitherColor; // enable dithering during 16 bit conversion - nvBoolean bDitherMip0; // enable dithering during 16 bit conversion for each MIP level (after filtering) - nvBoolean bPreModulateColorWithAlpha; // modulate color by alpha - nvBoolean bAlphaFilterModulate; // modulate color by alpha for filtering only + nvBoolean bDitherColor; // enable dithering during 16 bit conversion + nvBoolean bDitherMip0; // enable dithering during 16 bit conversion for each MIP level (after filtering) + nvBoolean bPreModulateColorWithAlpha; // modulate color by alpha + nvBoolean bAlphaFilterModulate; // modulate color by alpha for filtering only ///////////////////////// USER DATA ///////////////////////// - void* user_data; // user supplied values passed down to write functions + void* user_data; // user supplied values passed down to write functions }; diff --git a/src/utils/xrDXT/dds/tPixel.h b/src/utils/xrDXT/dds/tPixel.h index 1e64fa7fa47..fa9c2fae2a6 100644 --- a/src/utils/xrDXT/dds/tPixel.h +++ b/src/utils/xrDXT/dds/tPixel.h @@ -93,7 +93,7 @@ inline size_t calcMaxMipmap(size_t w, size_t h, size_t d) // get next mip level size inline size_t NextMip(size_t m) { - size_t next = m / 2; // round down + size_t next = m / 2; // round down if (next == 0) return 1; else @@ -150,7 +150,7 @@ class v16u16_t }; }; - v16u16_t& operator+=(const v16u16_t& v); // incrementation by a Vec4f + v16u16_t& operator+=(const v16u16_t& v); // incrementation by a Vec4f void set(unsigned short _u, unsigned short _v) { @@ -172,7 +172,7 @@ class r12g12b8_t }; }; - r12g12b8_t& operator+=(const r12g12b8_t& v); // incrementation by a Vec4f + r12g12b8_t& operator+=(const r12g12b8_t& v); // incrementation by a Vec4f void set(unsigned long _r, unsigned long _g, unsigned long _b) { @@ -212,7 +212,7 @@ class rgba_t return (unsigned long)a << 24 | (unsigned long)r << 16 | (unsigned long)g << 8 | (unsigned long)b; } - rgba_t& operator+=(const rgba_t& v) // incrementation by a rgba_t + rgba_t& operator+=(const rgba_t& v) // incrementation by a rgba_t { r = (unsigned char)nv::Clamp((int)((int)r + (int)v.r), 0, 255); g = (unsigned char)nv::Clamp((int)g + (int)v.g, 0, 255); @@ -221,9 +221,9 @@ class rgba_t return *this; } - rgba_t& operator-=(const rgba_t& v); // decrementation by a rgba_t - rgba_t& operator*=(const float d); // multiplication by a constant - rgba_t& operator/=(const float d); // division by a constant + rgba_t& operator-=(const rgba_t& v); // decrementation by a rgba_t + rgba_t& operator*=(const float d); // multiplication by a constant + rgba_t& operator/=(const float d); // division by a constant rgba_t& operator=(const rgba_t& v) { @@ -290,7 +290,7 @@ class rgba16_t b = _b; } - rgba16_t& operator+=(const rgba16_t& v) // incrementation by a rgba_t + rgba16_t& operator+=(const rgba16_t& v) // incrementation by a rgba_t { r = (unsigned char)nv::Clamp((int)r + (int)v.r, 0, 65535); g = (unsigned char)nv::Clamp((int)g + (int)v.g, 0, 65535); @@ -299,9 +299,9 @@ class rgba16_t return *this; } - rgba16_t& operator-=(const rgba16_t& v); // decrementation by a rgba_t - rgba16_t& operator*=(const float d); // multiplication by a constant - rgba16_t& operator/=(const float d); // division by a constant + rgba16_t& operator-=(const rgba16_t& v); // decrementation by a rgba_t + rgba16_t& operator*=(const float d); // multiplication by a constant + rgba16_t& operator/=(const float d); // division by a constant rgba16_t& operator=(const rgba16_t& v) { @@ -358,7 +358,7 @@ class urgba_t }; }; - urgba_t& operator+=(const urgba_t& v); // incrementation by a Vec4f + urgba_t& operator+=(const urgba_t& v); // incrementation by a Vec4f void set(char _r, char _g, char _b, char _a) { @@ -384,7 +384,7 @@ class q8w8v8u8_t }; }; - q8w8v8u8_t& operator+=(const q8w8v8u8_t& v); // incrementation by a Vec4f + q8w8v8u8_t& operator+=(const q8w8v8u8_t& v); // incrementation by a Vec4f void set(char _r, char _g, char _b, char _a) { @@ -487,7 +487,7 @@ class fpPixel b = v.b; } - fpPixel& operator+=(const fpPixel& v) // incrementation by a rgba_t + fpPixel& operator+=(const fpPixel& v) // incrementation by a rgba_t { r += v.r; g += v.g; @@ -496,7 +496,7 @@ class fpPixel return *this; } - fpPixel& operator-=(const fpPixel& v) // incrementation by a rgba_t + fpPixel& operator-=(const fpPixel& v) // incrementation by a rgba_t { r -= v.r; g -= v.g; @@ -505,7 +505,7 @@ class fpPixel return *this; } - fpPixel& operator*=(const fpPixel& v) // incrementation by a rgba_t + fpPixel& operator*=(const fpPixel& v) // incrementation by a rgba_t { r *= v.r; g *= v.g; @@ -514,7 +514,7 @@ class fpPixel return *this; } - fpPixel& operator/=(const fpPixel& v) // incrementation by a rgba_t + fpPixel& operator/=(const fpPixel& v) // incrementation by a rgba_t { r /= v.r; g /= v.g; @@ -523,7 +523,7 @@ class fpPixel return *this; } - fpPixel& operator/=(const float& s) // incrementation by a rgba_t + fpPixel& operator/=(const float& s) // incrementation by a rgba_t { r /= s; g /= s; @@ -532,7 +532,7 @@ class fpPixel return *this; } - fpPixel& operator=(const fpPixel& v); // assignment of a Vec3f + fpPixel& operator=(const fpPixel& v); // assignment of a Vec3f friend fpPixel operator+(const fpPixel& v1, const fpPixel& v2) { @@ -545,7 +545,7 @@ class fpPixel NV_ERROR_CODE normalize() { double u = x * x + y * y + z * z; - if (fabs(u - 1.0) < 1e-12) return NV_OK; // already normalized + if (fabs(u - 1.0) < 1e-12) return NV_OK; // already normalized if (fabs((double)u) < 1e-12) { x = y = z = 0.0f; return NV_CANT_NORMALIZE; @@ -614,11 +614,11 @@ class fpPixel3 b = v.b; } - fpPixel3& operator+=(const fpPixel3& v); // incrementation by a Vec4f - fpPixel3& operator=(const fpPixel3& v); // assignment of a Vec3f - fpPixel3& operator-=(const fpPixel3& v); // decrementation by a Vec3f - fpPixel3& operator*=(const float d); // multiplication by a constant - fpPixel3& operator/=(const float d); // division by a constant + fpPixel3& operator+=(const fpPixel3& v); // incrementation by a Vec4f + fpPixel3& operator=(const fpPixel3& v); // assignment of a Vec3f + fpPixel3& operator-=(const fpPixel3& v); // decrementation by a Vec3f + fpPixel3& operator*=(const float d); // multiplication by a constant + fpPixel3& operator/=(const float d); // division by a constant friend fpPixel3 operator+(const fpPixel3& v1, const fpPixel3& v2) { @@ -631,7 +631,7 @@ class fpPixel3 NV_ERROR_CODE normalize() { double u = x * x + y * y + z * z; - if (fabs(u - 1.0) < 1e-12) return NV_OK; // already normalized + if (fabs(u - 1.0) < 1e-12) return NV_OK; // already normalized if (fabs((double)u) < 1e-12) { x = y = z = 0.0f; return NV_CANT_NORMALIZE; @@ -890,7 +890,7 @@ typedef nvVector RGBAImageArray; class RGBAMipMappedImage { private: - RGBAImageArray mipArray; // array of images, one for each MIP map RGBA + RGBAImageArray mipArray; // array of images, one for each MIP map RGBA public: void resize(size_t width, size_t height, size_t nMIPMaps) @@ -931,7 +931,7 @@ class RGBAMipMappedImage class RGBAMipMappedCubeMap { private: - RGBAMipMappedImage cubeFaces[6]; // array of images, one for each MIP map RGBA + RGBAMipMappedImage cubeFaces[6]; // array of images, one for each MIP map RGBA public: void resize(size_t width, size_t height, size_t nMIPMaps) @@ -966,7 +966,7 @@ typedef nvVector RGBAVolume; class RGBAMipMappedVolumeMap { private: - RGBAVolume volumeArray; // array of MIP mapped images + RGBAVolume volumeArray; // array of MIP mapped images public: void resize(size_t width, size_t height, size_t depth, size_t nMIPMaps) @@ -1049,7 +1049,7 @@ typedef nvVector fpImageArray; class fpMipMappedImage { - fpImageArray mipArray; // array of images, one for each MIP map RGBA + fpImageArray mipArray; // array of images, one for each MIP map RGBA public: fpMipMappedImage() {} @@ -1112,7 +1112,7 @@ class fpMipMappedImage class fpMipMappedCubeMap { private: - fpMipMappedImage cubeFaces[6]; // array of images, one for each MIP map RGBA + fpMipMappedImage cubeFaces[6]; // array of images, one for each MIP map RGBA public: void resize(size_t width, size_t height, size_t nMIPMaps) diff --git a/src/utils/xrDXT/dds/tVector.h b/src/utils/xrDXT/dds/tVector.h index 28cd1b64fe3..c56f1b0e1e7 100644 --- a/src/utils/xrDXT/dds/tVector.h +++ b/src/utils/xrDXT/dds/tVector.h @@ -333,10 +333,10 @@ class nvVector // Destruct old elements (if we're shrinking). for (size_t i = new_size; i < old_size; i++) { - (m_buffer + i)->~T(); // Explicit call to the destructor + (m_buffer + i)->~T(); // Explicit call to the destructor } if (m_size == 0) { - if (false) // Don't shrink automatically. + if (false) // Don't shrink automatically. { allocate(0); } @@ -364,7 +364,7 @@ class nvVector // Call default constructors for (size_t i = old_size; i < new_size; i++) { - new (m_buffer + i) T(); // placement new + new (m_buffer + i) T(); // placement new } } @@ -377,11 +377,11 @@ class nvVector // Destruct old elements (if we're shrinking). for (size_t i = new_size; i < old_size; i++) { - (m_buffer + i)->~T(); // Explicit call to the destructor + (m_buffer + i)->~T(); // Explicit call to the destructor } if (m_size == 0) { - if (false) // Don't shrink automatically. + if (false) // Don't shrink automatically. { allocate(0); } @@ -408,7 +408,7 @@ class nvVector // Call copy constructors for (size_t i = old_size; i < new_size; i++) { - new (m_buffer + i) T(elem); // placement new + new (m_buffer + i) T(elem); // placement new } } @@ -444,7 +444,7 @@ class nvVector m_buffer = NULL; } } - else // realloc the buffer + else // realloc the buffer { m_buffer = (T*)::realloc(m_buffer, sizeof(T) * m_buffer_size); } diff --git a/src/utils/xrDXT/ddsTypes.h b/src/utils/xrDXT/ddsTypes.h index 6556b592c21..01a9f2fb9f2 100644 --- a/src/utils/xrDXT/ddsTypes.h +++ b/src/utils/xrDXT/ddsTypes.h @@ -1,13 +1,13 @@ #pragma once typedef enum RescaleTypes { - RESCALE_NONE, // no rescale - RESCALE_NEAREST_POWER2, // rescale to nearest power of two - RESCALE_BIGGEST_POWER2, // rescale to next bigger power of 2 - RESCALE_SMALLEST_POWER2, // rescale to smaller power of 2 - RESCALE_NEXT_SMALLEST_POWER2, // rescale to next smaller power of 2 - RESCALE_PRESCALE, // rescale to this size - RESCALE_RELSCALE, // relative rescale - RESCALE_LAST, // + RESCALE_NONE, // no rescale + RESCALE_NEAREST_POWER2, // rescale to nearest power of two + RESCALE_BIGGEST_POWER2, // rescale to next bigger power of 2 + RESCALE_SMALLEST_POWER2, // rescale to smaller power of 2 + RESCALE_NEXT_SMALLEST_POWER2, // rescale to next smaller power of 2 + RESCALE_PRESCALE, // rescale to this size + RESCALE_RELSCALE, // relative rescale + RESCALE_LAST, // } RescaleTypes; @@ -59,26 +59,26 @@ typedef enum MIPFilterTypes { enum TextureFormats { kDXT1, - kDXT1a, // DXT1 with one bit alpha - kDXT3, // explicit alpha - kDXT5, // interpolated alpha - k4444, // a4 r4 g4 b4 - k1555, // a1 r5 g5 b5 - k565, // a0 r5 g6 b5 - k8888, // a8 r8 g8 b8 - k888, // a0 r8 g8 b8 - k555, // a0 r5 g5 b5 - k8, // paletted - kV8U8, // DuDv - kCxV8U8, // normal map - kA8, // alpha only - k4, // 16 bit color + kDXT1a, // DXT1 with one bit alpha + kDXT3, // explicit alpha + kDXT5, // interpolated alpha + k4444, // a4 r4 g4 b4 + k1555, // a1 r5 g5 b5 + k565, // a0 r5 g6 b5 + k8888, // a8 r8 g8 b8 + k888, // a0 r8 g8 b8 + k555, // a0 r5 g5 b5 + k8, // paletted + kV8U8, // DuDv + kCxV8U8, // normal map + kA8, // alpha only + k4, // 16 bit color kQ8W8V8U8, kA8L8, kR32F, kA32B32G32R32F, kA16B16G16R16F, - kL8, // luminance + kL8, // luminance kTextureFormatLast }; @@ -104,5 +104,5 @@ enum CompressionWeighting kGreyScaleWeighting, kTangentSpaceNormalMapWeighting, kObjectSpaceNormalMapWeighting, - kUserDefinedWeighting, // used values stored in 'weight' + kUserDefinedWeighting, // used values stored in 'weight' }; diff --git a/src/utils/xrDXT/dxtlib.h b/src/utils/xrDXT/dxtlib.h index f2f967b647e..6d0915b38be 100644 --- a/src/utils/xrDXT/dxtlib.h +++ b/src/utils/xrDXT/dxtlib.h @@ -27,15 +27,15 @@ struct MIPMapData size_t mipLevel; size_t width; size_t height; - int faceNumber; // current face number for this image - int numFaces; // total number of faces (depth for volume textures, 6 for cube maps) + int faceNumber; // current face number for this image + int numFaces; // total number of faces (depth for volume textures, 6 for cube maps) }; // Write callback function. typedef NV_ERROR_CODE (*DXTReadCallback)(void* buffer, size_t count, void* userData); typedef NV_ERROR_CODE (*DXTWriteCallback)(const void* buffer, size_t count, - const MIPMapData* mipMapData, // if nz, this is MIP data + const MIPMapData* mipMapData, // if nz, this is MIP data void* userData); // Compresses an image with a user supplied callback with the data for each MIP level created @@ -44,35 +44,35 @@ typedef enum nvPixelOrder { nvBGRA, nvRGB, nvBGR, - nvGREY, // one plance copied to RGB + nvGREY, // one plance copied to RGB }; namespace nvDDS { DXTLIB_API NV_ERROR_CODE nvDXTcompress(const nvImageContainer& imageContainer, nvCompressionOptions* options, - DXTWriteCallback fileWriteRoutine, // call to .dds write routine + DXTWriteCallback fileWriteRoutine, // call to .dds write routine const RECT* rect = 0); DXTLIB_API NV_ERROR_CODE nvDXTcompress(const RGBAImage& srcImage, nvCompressionOptions* options, - DXTWriteCallback fileWriteRoutine, // call to .dds write routine + DXTWriteCallback fileWriteRoutine, // call to .dds write routine const RECT* rect = 0); DXTLIB_API NV_ERROR_CODE nvDXTcompress(const unsigned char* srcImage, size_t width, size_t height, size_t byte_pitch, nvPixelOrder pixelOrder, nvCompressionOptions* options, - DXTWriteCallback fileWriteRoutine, // call to .dds write routine + DXTWriteCallback fileWriteRoutine, // call to .dds write routine const RECT* rect = 0); // image with MIP maps DXTLIB_API NV_ERROR_CODE nvDXTcompress(const RGBAMipMappedImage& srcMIPImage, nvCompressionOptions* options, - DXTWriteCallback fileWriteRoutine, // call to .dds write routine + DXTWriteCallback fileWriteRoutine, // call to .dds write routine const RECT* rect = 0); DXTLIB_API NV_ERROR_CODE nvDXTcompress(const RGBAMipMappedCubeMap& srcMIPCubeMap, nvCompressionOptions* options, - DXTWriteCallback fileWriteRoutine, // call to .dds write routine + DXTWriteCallback fileWriteRoutine, // call to .dds write routine const RECT* rect = 0); DXTLIB_API NV_ERROR_CODE nvDXTcompress(const RGBAMipMappedVolumeMap& srcMIPVolumeMap, nvCompressionOptions* options, - DXTWriteCallback fileWriteRoutine, // call to .dds write routine + DXTWriteCallback fileWriteRoutine, // call to .dds write routine const RECT* rect = 0); DXTLIB_API NV_ERROR_CODE nvDXTcompress( diff --git a/src/utils/xrDXT/tPixel.h b/src/utils/xrDXT/tPixel.h index a16a8ac3286..4485f9a1eef 100644 --- a/src/utils/xrDXT/tPixel.h +++ b/src/utils/xrDXT/tPixel.h @@ -20,7 +20,7 @@ class u16v16_t unsigned short g; }; }; - u16v16_t& operator+=(const u16v16_t& v); // incrementation by a Vec4f + u16v16_t& operator+=(const u16v16_t& v); // incrementation by a Vec4f void set(unsigned short _r, unsigned short _g) { @@ -41,7 +41,7 @@ class r12g12b8_t unsigned long b : 8; }; }; - r12g12b8_t& operator+=(const r12g12b8_t& v); // incrementation by a Vec4f + r12g12b8_t& operator+=(const r12g12b8_t& v); // incrementation by a Vec4f void set(unsigned long _r, unsigned long _g, unsigned long _b) { @@ -89,7 +89,7 @@ class rgba_t b = _b; } - rgba_t& operator+=(const rgba_t& v) // incrementation by a rgba_t + rgba_t& operator+=(const rgba_t& v) // incrementation by a rgba_t { r = iClamp((int)r + (int)v.r, 0, 255); g = iClamp((int)g + (int)v.g, 0, 255); @@ -99,9 +99,9 @@ class rgba_t return *this; } - rgba_t& operator-=(const rgba_t& v); // decrementation by a rgba_t - rgba_t& operator*=(const float d); // multiplication by a constant - rgba_t& operator/=(const float d); // division by a constant + rgba_t& operator-=(const rgba_t& v); // decrementation by a rgba_t + rgba_t& operator*=(const float d); // multiplication by a constant + rgba_t& operator/=(const float d); // division by a constant rgba_t& operator=(const rgba_t& v) { @@ -159,7 +159,7 @@ class rgba16_t b = _b; } - rgba16_t& operator+=(const rgba16_t& v) // incrementation by a rgba_t + rgba16_t& operator+=(const rgba16_t& v) // incrementation by a rgba_t { r = iClamp((int)r + (int)v.r, 0, 65535); g = iClamp((int)g + (int)v.g, 0, 65535); @@ -169,9 +169,9 @@ class rgba16_t return *this; } - rgba16_t& operator-=(const rgba16_t& v); // decrementation by a rgba_t - rgba16_t& operator*=(const float d); // multiplication by a constant - rgba16_t& operator/=(const float d); // division by a constant + rgba16_t& operator-=(const rgba16_t& v); // decrementation by a rgba_t + rgba16_t& operator*=(const float d); // multiplication by a constant + rgba16_t& operator/=(const float d); // division by a constant rgba16_t& operator=(const rgba16_t& v) { @@ -219,7 +219,7 @@ class urgba_t char a; }; }; - urgba_t& operator+=(const urgba_t& v); // incrementation by a Vec4f + urgba_t& operator+=(const urgba_t& v); // incrementation by a Vec4f void set(char _r, char _g, char _b, char _a) { @@ -244,7 +244,7 @@ class q8w8v8u8_t char u; }; }; - q8w8v8u8_t& operator+=(const q8w8v8u8_t& v); // incrementation by a Vec4f + q8w8v8u8_t& operator+=(const q8w8v8u8_t& v); // incrementation by a Vec4f void set(char _r, char _g, char _b, char _a) { @@ -297,7 +297,7 @@ class fpPixel r = v.r; g = v.g; b = v.b; - } // copy constructor + } // copy constructor void set(const float _r, const float _g, const float _b, const float _a) { @@ -315,12 +315,12 @@ class fpPixel b = v.b; } - fpPixel& operator+=(const fpPixel& v); // incrementation by a Vec4f + fpPixel& operator+=(const fpPixel& v); // incrementation by a Vec4f - fpPixel& operator=(const fpPixel& v); // assignment of a Vec3f - fpPixel& operator-=(const fpPixel& v); // decrementation by a Vec3f - fpPixel& operator*=(const float d); // multiplication by a constant - fpPixel& operator/=(const float d); // division by a constant + fpPixel& operator=(const fpPixel& v); // assignment of a Vec3f + fpPixel& operator-=(const fpPixel& v); // decrementation by a Vec3f + fpPixel& operator*=(const float d); // multiplication by a constant + fpPixel& operator/=(const float d); // division by a constant friend fpPixel operator+(const fpPixel& v1, const fpPixel& v2) { @@ -328,14 +328,14 @@ class fpPixel } friend fpPixel operator/(const fpPixel& v, float s) { return fpPixel(v.r / s, v.g / s, v.b / s, v.a / s); } - friend int operator==(const fpPixel& v1, const fpPixel& v2); // v1 == v2 ? + friend int operator==(const fpPixel& v1, const fpPixel& v2); // v1 == v2 ? int normalize() { double u; u = x * x + y * y + z * z; - if (fabs(u - 1.0) < 1e-12) return 0; // already normalized + if (fabs(u - 1.0) < 1e-12) return 0; // already normalized if (fabs((double)u) < 1e-12) { x = y = z = 0.0; diff --git a/src/utils/xrLC/ArbitraryList.h b/src/utils/xrLC/ArbitraryList.h index df2cf3cdc73..f459d27e48c 100644 --- a/src/utils/xrLC/ArbitraryList.h +++ b/src/utils/xrLC/ArbitraryList.h @@ -19,9 +19,9 @@ template class ArbitraryList { - T* pT; // The list. - u32 iSize; // The current size of the list. - u32 iReservedSize; // The current reserved size of the list. + T* pT; // The list. + u32 iSize; // The current size of the list. + u32 iReservedSize; // The current reserved size of the list. public: // Constructor, with optional initial size setting. ArbitraryList(u32 iInitialSize = 0) @@ -160,4 +160,4 @@ class ArbitraryList } }; -#endif //#ifndef ArbitraryListH +#endif //#ifndef ArbitraryListH diff --git a/src/utils/xrLC/Build.h b/src/utils/xrLC/Build.h index 33461b1a1a8..ef0c4fea1d8 100644 --- a/src/utils/xrLC/Build.h +++ b/src/utils/xrLC/Build.h @@ -17,9 +17,9 @@ extern "C" XRLC_LIGHT_API xrLC_GlobalData* lc_global_data(); ////////////////////////////////////////////////////////////////////////// // tesselator callbacks -typedef int tesscb_estimator(const Face* F); // -1 = none, 0,1,2 = edge-number -typedef void tesscb_face(Face* F); // new face -typedef void tesscb_vertex(Vertex* V); // new vertex +typedef int tesscb_estimator(const Face* F); // -1 = none, 0,1,2 = edge-number +typedef void tesscb_face(Face* F); // new face +typedef void tesscb_vertex(Vertex* V); // new vertex class base_lighting; class INetReader; diff --git a/src/utils/xrLC/ELight_def.h b/src/utils/xrLC/ELight_def.h index fdcc952e9a4..7b7ad345f17 100644 --- a/src/utils/xrLC/ELight_def.h +++ b/src/utils/xrLC/ELight_def.h @@ -5,9 +5,9 @@ #ifndef ELightDefH #define ELightDefH -#define LCONTROL_HEMI "$hemi" // hemisphere -#define LCONTROL_SUN "$sun" // sun -#define LCONTROL_STATIC "$static" // all other static lights +#define LCONTROL_HEMI "$hemi" // hemisphere +#define LCONTROL_SUN "$sun" // sun +#define LCONTROL_STATIC "$static" // all other static lights namespace ELight { diff --git a/src/utils/xrLC/NvMender2002/NVMeshMender.cpp b/src/utils/xrLC/NvMender2002/NVMeshMender.cpp index 2c3742058a6..6931469cf2a 100644 --- a/src/utils/xrLC/NvMender2002/NVMeshMender.cpp +++ b/src/utils/xrLC/NvMender2002/NVMeshMender.cpp @@ -490,21 +490,21 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe // No new indices are created, just vertex attributes if (output[att].Name_ != "indices") { if (output[att].Name_ == "tex0") { - output[att].floatVector_.push_back((float)newS); // y + output[att].floatVector_.push_back((float)newS); // y output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 1]); // x + output[att].floatVector_[indices[theOneToChange] * 3 + 1]); // x output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z + output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z } else { // *3 b/c we are looking up 3vectors in an array of floats output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 0]); // x + output[att].floatVector_[indices[theOneToChange] * 3 + 0]); // x output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 1]); // y + output[att].floatVector_[indices[theOneToChange] * 3 + 1]); // y output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z + output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z } } } @@ -518,7 +518,7 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe indices[theOneToChange] = theNewIndex; } - } // for v + } // for v { for (int v = 0; v < 3; ++v) @@ -559,20 +559,20 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe if (output[att].Name_ != "indices") { if (output[att].Name_ == "tex0") { output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 0]); // x - output[att].floatVector_.push_back((float)newT); // y + output[att].floatVector_[indices[theOneToChange] * 3 + 0]); // x + output[att].floatVector_.push_back((float)newT); // y output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z + output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z } else { // *3 b/c we are looking up 3vectors in an array of floats output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 0]); // x + output[att].floatVector_[indices[theOneToChange] * 3 + 0]); // x output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 1]); // y + output[att].floatVector_[indices[theOneToChange] * 3 + 1]); // y output[att].floatVector_.push_back( - output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z + output[att].floatVector_[indices[theOneToChange] * 3 + 2]); // z } } } @@ -587,10 +587,10 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe } } - } // for v + } // for v - } // for f - } // if fix texgen + } // for f + } // if fix texgen if (pTextureMatrix) { const mat4 M(pTextureMatrix[0], pTextureMatrix[1], pTextureMatrix[2], pTextureMatrix[3], pTextureMatrix[4], pTextureMatrix[5], pTextureMatrix[6], pTextureMatrix[7], pTextureMatrix[8], pTextureMatrix[9], @@ -779,18 +779,18 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe if (output[att].Name_ != "indices") { // *3 b/c we are looking up 3vectors in an array of floats output[att].floatVector_.push_back( - output[att].floatVector_[indices[start] * 3 + 0]); // x + output[att].floatVector_[indices[start] * 3 + 0]); // x output[att].floatVector_.push_back( - output[att].floatVector_[indices[start] * 3 + 1]); // y + output[att].floatVector_[indices[start] * 3 + 1]); // y output[att].floatVector_.push_back( - output[att].floatVector_[indices[start] * 3 + 2]); // z + output[att].floatVector_[indices[start] * 3 + 2]); // z output[att].floatVector_.push_back( - output[att].floatVector_[indices[end] * 3 + 0]); // x + output[att].floatVector_[indices[end] * 3 + 0]); // x output[att].floatVector_.push_back( - output[att].floatVector_[indices[end] * 3 + 1]); // y + output[att].floatVector_[indices[end] * 3 + 1]); // y output[att].floatVector_.push_back( - output[att].floatVector_[indices[end] * 3 + 2]); // z + output[att].floatVector_[indices[end] * 3 + 2]); // z } } @@ -806,7 +806,7 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe // because the two faces will sum their tangent basis vectors into separate indices } } - } // if fixtangents + } // if fixtangents } // Allocate std::vector & Zero out average basis for tangent space smoothing @@ -815,8 +815,8 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe for (unsigned int p = 0; p < positions.size(); p += 3) { - avgS.push_back(vec3_null); // do S - avgT.push_back(vec3_null); // now t + avgS.push_back(vec3_null); // do S + avgT.push_back(vec3_null); // now t } // go through faces and add up the bases for each vertex @@ -854,8 +854,8 @@ bool NVMeshMender::Munge(const NVMeshMender::VAVector& input, NVMeshMender::VAVe // now renormalize for (unsigned int b = 0; b < positions.size(); b += 3) { - *reinterpret_cast(&output[(*tangent).second].floatVector_[b]) = normalize(avgS[b / 3]); // s - *reinterpret_cast(&output[(*binormal).second].floatVector_[b]) = normalize(avgT[b / 3]); // T + *reinterpret_cast(&output[(*tangent).second].floatVector_[b]) = normalize(avgS[b / 3]); // s + *reinterpret_cast(&output[(*binormal).second].floatVector_[b]) = normalize(avgT[b / 3]); // T } } diff --git a/src/utils/xrLC/NvMender2002/NVMeshMender.h b/src/utils/xrLC/NvMender2002/NVMeshMender.h index 4ef3901030c..5e844da3913 100644 --- a/src/utils/xrLC/NvMender2002/NVMeshMender.h +++ b/src/utils/xrLC/NvMender2002/NVMeshMender.h @@ -216,4 +216,4 @@ class NVMeshMender const Option _WeightNormalsByFaceSize = WeightNormalsByFaceSize); }; -#endif //_NVMeshMender_H_ +#endif //_NVMeshMender_H_ diff --git a/src/utils/xrLC/NvMender2002/nv_algebra.cpp b/src/utils/xrLC/NvMender2002/nv_algebra.cpp index 9d749d98e20..f7747e03309 100644 --- a/src/utils/xrLC/NvMender2002/nv_algebra.cpp +++ b/src/utils/xrLC/NvMender2002/nv_algebra.cpp @@ -1260,8 +1260,8 @@ nv_scalar tb_project_to_sphere(nv_scalar r, nv_scalar x, nv_scalar y) */ quat& trackball(quat& q, vec2& pt1, vec2& pt2, nv_scalar trackballsize) { - vec3 a; // Axis of rotation - nv_scalar phi; // how much to rotate about axis + vec3 a; // Axis of rotation + nv_scalar phi; // how much to rotate about axis vec3 d; nv_scalar t; diff --git a/src/utils/xrLC/NvMender2002/nv_algebra.h b/src/utils/xrLC/NvMender2002/nv_algebra.h index 2b326182a09..eb624d935bf 100644 --- a/src/utils/xrLC/NvMender2002/nv_algebra.h +++ b/src/utils/xrLC/NvMender2002/nv_algebra.h @@ -53,13 +53,13 @@ struct DECLSPEC_NV_MATH vec2 { struct { - nv_scalar x, y; // standard names for components + nv_scalar x, y; // standard names for components }; struct { - nv_scalar s, t; // standard names for components + nv_scalar s, t; // standard names for components }; - nv_scalar vec_array[2]; // array access + nv_scalar vec_array[2]; // array access }; }; @@ -143,13 +143,13 @@ struct vec3t { struct { - _T x, y, z; // standard names for components + _T x, y, z; // standard names for components }; struct { - _T s, t, r; // standard names for components + _T s, t, r; // standard names for components }; - _T vec_array[3]; // array access + _T vec_array[3]; // array access }; const _T operator[](int i) const { return vec_array[i]; } @@ -241,13 +241,13 @@ struct DECLSPEC_NV_MATH vec4 { struct { - nv_scalar x, y, z, w; // standard names for components + nv_scalar x, y, z, w; // standard names for components }; struct { - nv_scalar s, t, r, q; // standard names for components + nv_scalar s, t, r, q; // standard names for components }; - nv_scalar vec_array[4]; // array access + nv_scalar vec_array[4]; // array access }; }; @@ -330,11 +330,11 @@ struct DECLSPEC_NV_MATH mat3 { struct { - nv_scalar a00, a10, a20; // standard names for components - nv_scalar a01, a11, a21; // standard names for components - nv_scalar a02, a12, a22; // standard names for components + nv_scalar a00, a10, a20; // standard names for components + nv_scalar a01, a11, a21; // standard names for components + nv_scalar a02, a12, a22; // standard names for components }; - nv_scalar mat_array[9]; // array access + nv_scalar mat_array[9]; // array access }; }; @@ -396,29 +396,29 @@ struct DECLSPEC_NV_MATH mat4 { struct { - nv_scalar a00, a10, a20, a30; // standard names for components - nv_scalar a01, a11, a21, a31; // standard names for components - nv_scalar a02, a12, a22, a32; // standard names for components - nv_scalar a03, a13, a23, a33; // standard names for components + nv_scalar a00, a10, a20, a30; // standard names for components + nv_scalar a01, a11, a21, a31; // standard names for components + nv_scalar a02, a12, a22, a32; // standard names for components + nv_scalar a03, a13, a23, a33; // standard names for components }; struct { - nv_scalar _11, _12, _13, _14; // standard names for components - nv_scalar _21, _22, _23, _24; // standard names for components - nv_scalar _31, _32, _33, _34; // standard names for components - nv_scalar _41, _42, _43, _44; // standard names for components + nv_scalar _11, _12, _13, _14; // standard names for components + nv_scalar _21, _22, _23, _24; // standard names for components + nv_scalar _31, _32, _33, _34; // standard names for components + nv_scalar _41, _42, _43, _44; // standard names for components }; union { struct { - nv_scalar b00, b10, b20, p; // standard names for components - nv_scalar b01, b11, b21, q; // standard names for components - nv_scalar b02, b12, b22, r; // standard names for components - nv_scalar x, y, z, w; // standard names for components + nv_scalar b00, b10, b20, p; // standard names for components + nv_scalar b01, b11, b21, q; // standard names for components + nv_scalar b02, b12, b22, r; // standard names for components + nv_scalar x, y, z, w; // standard names for components }; }; - nv_scalar mat_array[16]; // array access + nv_scalar mat_array[16]; // array access }; }; @@ -696,4 +696,4 @@ nv_scalar det(const mat3& A); extern void nv_is_valid(const vec3& v); extern void nv_is_valid(nv_scalar lambda); -#endif // nv_algebraH +#endif // nv_algebraH diff --git a/src/utils/xrLC/NvMender2002/nv_math.h b/src/utils/xrLC/NvMender2002/nv_math.h index 00ef017172f..fc8859f70f3 100644 --- a/src/utils/xrLC/NvMender2002/nv_math.h +++ b/src/utils/xrLC/NvMender2002/nv_math.h @@ -17,7 +17,7 @@ from the use or inability to use this file or items derived from it. #ifndef _nv_mathdecl_h_ #include "nv_mathdecl.h" -#endif // _nv_mathdecl_h_ +#endif // _nv_mathdecl_h_ #include @@ -49,6 +49,6 @@ struct vec4; #ifndef _nv_algebra_h_ #include "nv_algebra.h" -#endif // _nv_algebra_h_ +#endif // _nv_algebra_h_ -#endif //_nv_math_h_ +#endif //_nv_math_h_ diff --git a/src/utils/xrLC/NvMender2002/nv_mathdecl.h b/src/utils/xrLC/NvMender2002/nv_mathdecl.h index b23f758aceb..e2f2c7c0af2 100644 --- a/src/utils/xrLC/NvMender2002/nv_mathdecl.h +++ b/src/utils/xrLC/NvMender2002/nv_mathdecl.h @@ -28,4 +28,4 @@ from the use or inability to use this file or items derived from it. #define DECLSPEC_NV_MATH #endif -#endif // _nv_mathdecl_h_ +#endif // _nv_mathdecl_h_ diff --git a/src/utils/xrLC/NvMeshMenderLayer.h b/src/utils/xrLC/NvMeshMenderLayer.h index 11760b7ce0e..7681c3d70f9 100644 --- a/src/utils/xrLC/NvMeshMenderLayer.h +++ b/src/utils/xrLC/NvMeshMenderLayer.h @@ -6,4 +6,4 @@ IC void set_vertex(MeshMender::Vertex& out_vertex, const Vertex& in_veretex, const Fvector2 Ftc); IC void set_face(Face& out_face, const MeshMender::Vertex in_vertices[3]); #include "NvMeshMenderLayerInline.h" -#endif //__NVMESHMENDERLAYER_H__ \ No newline at end of file +#endif //__NVMESHMENDERLAYER_H__ \ No newline at end of file diff --git a/src/utils/xrLC/OGF_Face.cpp b/src/utils/xrLC/OGF_Face.cpp index ffa556400d7..c9d97a1e80d 100644 --- a/src/utils/xrLC/OGF_Face.cpp +++ b/src/utils/xrLC/OGF_Face.cpp @@ -68,7 +68,7 @@ u16 OGF::_BuildVertex(OGF_Vertex& V1) } void OGF::x_BuildFace(OGF_Vertex& V1, OGF_Vertex& V2, OGF_Vertex& V3, bool _tc_) { - if (_tc_) return; // make empty-list for stuff that has relevant TCs + if (_tc_) return; // make empty-list for stuff that has relevant TCs x_face F; u32 VertCount = (u32)fast_path_data.vertices.size(); F.v[0] = x_BuildVertex(x_vertex(V1)); @@ -117,7 +117,7 @@ void OGF::adjacent_select(xr_vector& dest, xr_vector& vmark, xr_vecto for (u32 fit = 0; fit < data.faces.size(); fit++) { OGF_Face& F = data.faces[fit]; - if (fmark[fit]) continue; // already registered + if (fmark[fit]) continue; // already registered // new face - if empty - just put it in, else check connectivity if (dest.empty()) { @@ -135,11 +135,11 @@ void OGF::adjacent_select(xr_vector& dest, xr_vector& vmark, xr_vecto BOOL bConnected = FALSE; for (u32 vid = 0; vid < 3; vid++) { - u32 id = F.v[vid]; // search in already registered verts + u32 id = F.v[vid]; // search in already registered verts for (u32 sid = 0; sid < dest.size(); sid++) { if (id == dest[sid]) { - bConnected = TRUE; // this face shares at least one vertex with already selected faces + bConnected = TRUE; // this face shares at least one vertex with already selected faces break; } } @@ -258,7 +258,7 @@ void OGF::Optimize() u32 _old = selection.size(); adjacent_select(selection, vmarker, fmarker); u32 _new = selection.size(); - if (_old == _new) break; // group selected ! + if (_old == _new) break; // group selected ! } if (selection.empty()) break; @@ -301,7 +301,7 @@ void OGF::Optimize() Lock progressive_cs #ifdef CONFIG_PROFILE_LOCKS (MUTEX_PROFILE_ID(progressive_cs)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ; void OGF::MakeProgressive(float metric_limit) { diff --git a/src/utils/xrLC/OGF_Face.h b/src/utils/xrLC/OGF_Face.h index eff51fb7950..a02210388d1 100644 --- a/src/utils/xrLC/OGF_Face.h +++ b/src/utils/xrLC/OGF_Face.h @@ -17,9 +17,9 @@ struct OGF; struct OGF_Vertex { Fvector P; - Fvector N; // normal - base_basis T; // tangent - base_basis B; // binormal + Fvector N; // normal + base_basis T; // tangent + base_basis B; // binormal base_color Color; svector UV; @@ -29,7 +29,7 @@ struct OGF_Vertex typedef xr_vector vecOGF_V; typedef vecOGF_V::iterator itOGF_V; typedef vecOGF_V::const_iterator citOGF_V; -struct x_vertex // "fast" geometry, 16b/vertex +struct x_vertex // "fast" geometry, 16b/vertex { Fvector P; x_vertex(const OGF_Vertex& c) { P = c.P; } @@ -261,7 +261,7 @@ struct OGF_LOD : public OGF_Node { Fvector v; Fvector2 t; - u32 c_rgb_hemi; // rgb,hemi + u32 c_rgb_hemi; // rgb,hemi u8 c_sun; }; struct _face diff --git a/src/utils/xrLC/OGF_Face_Save.cpp b/src/utils/xrLC/OGF_Face_Save.cpp index ee0adefb102..5e7e5b52bd0 100644 --- a/src/utils/xrLC/OGF_Face_Save.cpp +++ b/src/utils/xrLC/OGF_Face_Save.cpp @@ -26,7 +26,7 @@ u32 u8_vec4(base_basis N, u8 A = 0) { return color_rgba(N.x, N.y, N.z, A); } -std::pair s24_tc_base(float uv) // [-32 .. +32] +std::pair s24_tc_base(float uv) // [-32 .. +32] { const u32 max_tile = 32; const s32 quant = 32768 / max_tile; @@ -39,7 +39,7 @@ std::pair s24_tc_base(float uv) // [-32 .. +32] return mk_pair(s16(_primary), u8(_secondary)); } -s16 s16_tc_lmap(float uv) // [-1 .. +1] +s16 s16_tc_lmap(float uv) // [-1 .. +1] { const u32 max_tile = 1; const s32 quant = 32768 / max_tile; @@ -49,21 +49,21 @@ s16 s16_tc_lmap(float uv) // [-1 .. +1] return s16(t); } -D3DVERTEXELEMENT9 r1_decl_lmap[] = // 12+4+4+4+4+4 = 32 +D3DVERTEXELEMENT9 r1_decl_lmap[] = // 12+4+4+4+4+4 = 32 {{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0}, {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0}, {0, 20, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, 0}, {0, 24, D3DDECLTYPE_SHORT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, {0, 28, D3DDECLTYPE_SHORT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, D3DDECL_END()}; -D3DVERTEXELEMENT9 r1_decl_vert[] = // 12+4+4+4+4+4 = 32 +D3DVERTEXELEMENT9 r1_decl_vert[] = // 12+4+4+4+4+4 = 32 {{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0}, {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0}, {0, 20, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, 0}, {0, 24, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, {0, 28, D3DDECLTYPE_SHORT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END()}; -D3DVERTEXELEMENT9 x_decl_vert[] = // 12 +D3DVERTEXELEMENT9 x_decl_vert[] = // 12 {{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, D3DDECL_END()}; #pragma pack(push, 1) struct x_vert @@ -312,8 +312,8 @@ void read_ogf_container(IReader& fs_, const ogf_data_type& ogf_cnt) ogf_cnt.ib_id = fs.r_u32(); ogf_cnt.ib_start = fs.r_u32(); - u32 faces_size = fs.r_u32(); //(u32)ogf_cnt.faces.size()*3 - // ogf_cnt.faces.resize( vertises_size ); + u32 faces_size = fs.r_u32(); //(u32)ogf_cnt.faces.size()*3 + // ogf_cnt.faces.resize( vertises_size ); // fs.close_chunk ( ); } @@ -352,7 +352,7 @@ void write_ogf_fastpath(IWriter& fs, const OGF& ogf, BOOL progresive) write_ogf_container(fs, ogf.fast_path_data); // progressive-data, if need it - if (progresive) // H.type == MT_PROGRESSIVE + if (progresive) // H.type == MT_PROGRESSIVE write_ogf_swidata(fs, ogf.fast_path_data.m_SWI); } fs.close_chunk(); @@ -366,7 +366,7 @@ void OGF::Save_Normal_PM(IWriter& fs, ogf_header& H, BOOL bVertexColored) write_ogf_container(fs, data); // progressive-data, if need it - if (H.type == MT_PROGRESSIVE) write_ogf_swidata(fs, data.m_SWI); // SW + if (H.type == MT_PROGRESSIVE) write_ogf_swidata(fs, data.m_SWI); // SW // if has x-vertices/x-faces if (!fast_path_data.vertices.empty() && !fast_path_data.faces.empty()) diff --git a/src/utils/xrLC/OGF_Face_Stripify.cpp b/src/utils/xrLC/OGF_Face_Stripify.cpp index e6843b9cbaa..3e58d716197 100644 --- a/src/utils/xrLC/OGF_Face_Stripify.cpp +++ b/src/utils/xrLC/OGF_Face_Stripify.cpp @@ -59,7 +59,7 @@ void xrStripify(xr_vector& indices, xr_vector& perturb, int iCacheSize void OGF::Stripify() { - if (progressive_test()) return; // Mesh already progressive - don't stripify it + if (progressive_test()) return; // Mesh already progressive - don't stripify it // fast verts if (fast_path_data.vertices.size() && fast_path_data.faces.size()) diff --git a/src/utils/xrLC/Sector.cpp b/src/utils/xrLC/Sector.cpp index e8ef932112e..cbe482efe68 100644 --- a/src/utils/xrLC/Sector.cpp +++ b/src/utils/xrLC/Sector.cpp @@ -28,7 +28,7 @@ IC BOOL ValidateMerge(Fbox& bb_base, Fbox& bb, float& volume, float SLimit) Fvector sz; merge.getsize(sz); sz.add(EPS_L); - if (sz.x > SLimit) return FALSE; // Don't exceed limits (4/3 GEOM) + if (sz.x > SLimit) return FALSE; // Don't exceed limits (4/3 GEOM) if (sz.y > SLimit) return FALSE; if (sz.z > SLimit) return FALSE; @@ -60,7 +60,7 @@ void CSector::BuildHierrarhy() int iLevel = 2; float SizeLimit = c_SS_maxsize / 4.f; if (SizeLimit < 4.f) SizeLimit = 4.f; - if (delimiter <= SizeLimit) delimiter *= 2; // just very small level + if (delimiter <= SizeLimit) delimiter *= 2; // just very small level for (; SizeLimit <= delimiter; SizeLimit *= 2) { diff --git a/src/utils/xrLC/Sector.h b/src/utils/xrLC/Sector.h index 63b15d3f498..c0071299ef0 100644 --- a/src/utils/xrLC/Sector.h +++ b/src/utils/xrLC/Sector.h @@ -29,4 +29,4 @@ class CSector extern xr_vector g_sectors; -#endif // !defined(AFX_SECTOR_H__751706E5_383E_40CB_9F3D_6A4D1BB8F3CD__INCLUDED_) +#endif // !defined(AFX_SECTOR_H__751706E5_383E_40CB_9F3D_6A4D1BB8F3CD__INCLUDED_) diff --git a/src/utils/xrLC/StdAfx.h b/src/utils/xrLC/StdAfx.h index e59b601e9ea..46c790e2620 100644 --- a/src/utils/xrLC/StdAfx.h +++ b/src/utils/xrLC/StdAfx.h @@ -1,10 +1,10 @@ #pragma once #include "utils/xrLC_Light/xrLC_Light.h" -#define ENGINE_API // fake, to enable sharing with engine +#define ENGINE_API // fake, to enable sharing with engine // comment - ne figa oni ne sharyatsya -#define ECORE_API // fake, to enable sharing with editors +#define ECORE_API // fake, to enable sharing with editors #define XR_EPROPS_API #include "xrCore/clsid.h" diff --git a/src/utils/xrLC/b_globals.h b/src/utils/xrLC/b_globals.h index 35b143c78aa..580114945e5 100644 --- a/src/utils/xrLC/b_globals.h +++ b/src/utils/xrLC/b_globals.h @@ -1,13 +1,13 @@ #pragma once -const u32 c_VB_maxVertices = 65535; // count -const u32 c_vCacheSize = 24; // entries -const u32 c_SS_LowVertLimit = 64; // polys -const u32 c_SS_HighVertLimit = 2 * 1024; // polys -const u32 c_SS_maxsize = 32; // meters -const u32 c_PM_FaceLimit = 128; // face-limit -const float c_PM_MetricLimit_static = 0.10f; // vertex-count-simplification-limit -const float c_PM_MetricLimit_mu = 0.05f; // vertex-count-simplification-limit +const u32 c_VB_maxVertices = 65535; // count +const u32 c_vCacheSize = 24; // entries +const u32 c_SS_LowVertLimit = 64; // polys +const u32 c_SS_HighVertLimit = 2 * 1024; // polys +const u32 c_SS_maxsize = 32; // meters +const u32 c_PM_FaceLimit = 128; // face-limit +const float c_PM_MetricLimit_static = 0.10f; // vertex-count-simplification-limit +const float c_PM_MetricLimit_mu = 0.05f; // vertex-count-simplification-limit BOOL exact_normalize(Fvector3& a); BOOL exact_normalize(float* a); diff --git a/src/utils/xrLC/calculate_normals.h b/src/utils/xrLC/calculate_normals.h index 53f16842bac..2d0376fbadb 100644 --- a/src/utils/xrLC/calculate_normals.h +++ b/src/utils/xrLC/calculate_normals.h @@ -56,7 +56,7 @@ class calculate_normals { vecFace new_adj; itterate_adjacents_type::recurse_tri_params p(pTestVertex, new_adj, sm_cos); - itterate_adjacents_type::RecurseTri(0, p); // pTestVertex, new_adj, sm_cos ); + itterate_adjacents_type::RecurseTri(0, p); // pTestVertex, new_adj, sm_cos ); VERIFY(!new_adj.empty()); type_vertex* pNewVertex = pTestVertex->CreateCopy_NOADJ(vertices); @@ -88,4 +88,4 @@ class calculate_normals (*it)->flags.bSplitted = false; } }; -#endif //__CALCULATE_NORMALS_H__ \ No newline at end of file +#endif //__CALCULATE_NORMALS_H__ \ No newline at end of file diff --git a/src/utils/xrLC/fmesh.cpp b/src/utils/xrLC/fmesh.cpp index 5a2989c11ec..8f43b3c638a 100644 --- a/src/utils/xrLC/fmesh.cpp +++ b/src/utils/xrLC/fmesh.cpp @@ -1,14 +1,14 @@ #include "stdafx.h" static u32 dwPositionPart[8] = { - 0, // no position - 3, // x,y,z - 4, // sx,sy,sz,rhw - 4, // x,y,z,b1 - 5, // x,y,z,b1,b2 - 6, // x,y,z,b1,b2,b3 - 7, // x,y,z,b1,b2,b3,b4 - 8 // x,y,z,b1,b2,b3,b4,b5 + 0, // no position + 3, // x,y,z + 4, // sx,sy,sz,rhw + 4, // x,y,z,b1 + 5, // x,y,z,b1,b2 + 6, // x,y,z,b1,b2,b3 + 7, // x,y,z,b1,b2,b3,b4 + 8 // x,y,z,b1,b2,b3,b4,b5 }; #define FAKES 0xffffffff @@ -46,51 +46,51 @@ void ConvertVertices(u32 dwTypeDest, void* pDest, u32 dwTypeSrc, void* pSource, } // ---------------------- "Reserved" property - if ((dwTypeDest & D3DFVF_PSIZE) && (dwTypeSrc & D3DFVF_PSIZE)) { // DEST & SRC + if ((dwTypeDest & D3DFVF_PSIZE) && (dwTypeSrc & D3DFVF_PSIZE)) { // DEST & SRC TransferMask[tmPos++] = tmPosSrc++; } - if ((dwTypeDest & D3DFVF_PSIZE) && !(dwTypeSrc & D3DFVF_PSIZE)) { // DEST & !SRC - TransferMask[tmPos++] = FAKEZ; // fake data + if ((dwTypeDest & D3DFVF_PSIZE) && !(dwTypeSrc & D3DFVF_PSIZE)) { // DEST & !SRC + TransferMask[tmPos++] = FAKEZ; // fake data } - if (!(dwTypeDest & D3DFVF_PSIZE) && (dwTypeSrc & D3DFVF_PSIZE)) { // !DEST & SRC - tmPosSrc++; // skip it + if (!(dwTypeDest & D3DFVF_PSIZE) && (dwTypeSrc & D3DFVF_PSIZE)) { // !DEST & SRC + tmPosSrc++; // skip it } // ---------------------- "Normal" property - if ((dwTypeDest & D3DFVF_NORMAL) && (dwTypeSrc & D3DFVF_NORMAL)) { // DEST & SRC + if ((dwTypeDest & D3DFVF_NORMAL) && (dwTypeSrc & D3DFVF_NORMAL)) { // DEST & SRC TransferMask[tmPos++] = tmPosSrc++; TransferMask[tmPos++] = tmPosSrc++; TransferMask[tmPos++] = tmPosSrc++; } - if ((dwTypeDest & D3DFVF_NORMAL) && !(dwTypeSrc & D3DFVF_NORMAL)) { // DEST & !SRC + if ((dwTypeDest & D3DFVF_NORMAL) && !(dwTypeSrc & D3DFVF_NORMAL)) { // DEST & !SRC VERIFY2(0, "Source format doesn't have NORMAL but destination HAS"); } - if (!(dwTypeDest & D3DFVF_NORMAL) && (dwTypeSrc & D3DFVF_NORMAL)) { // !DEST & SRC - tmPosSrc++; // skip it - tmPosSrc++; // skip it - tmPosSrc++; // skip it + if (!(dwTypeDest & D3DFVF_NORMAL) && (dwTypeSrc & D3DFVF_NORMAL)) { // !DEST & SRC + tmPosSrc++; // skip it + tmPosSrc++; // skip it + tmPosSrc++; // skip it } // ---------------------- "Diffuse" property - if ((dwTypeDest & D3DFVF_DIFFUSE) && (dwTypeSrc & D3DFVF_DIFFUSE)) { // DEST & SRC + if ((dwTypeDest & D3DFVF_DIFFUSE) && (dwTypeSrc & D3DFVF_DIFFUSE)) { // DEST & SRC TransferMask[tmPos++] = tmPosSrc++; } - if ((dwTypeDest & D3DFVF_DIFFUSE) && !(dwTypeSrc & D3DFVF_DIFFUSE)) { // DEST & !SRC - TransferMask[tmPos++] = FAKES; // fake data - white + if ((dwTypeDest & D3DFVF_DIFFUSE) && !(dwTypeSrc & D3DFVF_DIFFUSE)) { // DEST & !SRC + TransferMask[tmPos++] = FAKES; // fake data - white } - if (!(dwTypeDest & D3DFVF_DIFFUSE) && (dwTypeSrc & D3DFVF_DIFFUSE)) { // !DEST & SRC - tmPosSrc++; // skip it + if (!(dwTypeDest & D3DFVF_DIFFUSE) && (dwTypeSrc & D3DFVF_DIFFUSE)) { // !DEST & SRC + tmPosSrc++; // skip it } // ---------------------- "Specular" property - if ((dwTypeDest & D3DFVF_SPECULAR) && (dwTypeSrc & D3DFVF_SPECULAR)) { // DEST & SRC + if ((dwTypeDest & D3DFVF_SPECULAR) && (dwTypeSrc & D3DFVF_SPECULAR)) { // DEST & SRC TransferMask[tmPos++] = tmPosSrc++; } - if ((dwTypeDest & D3DFVF_SPECULAR) && !(dwTypeSrc & D3DFVF_SPECULAR)) { // DEST & !SRC - TransferMask[tmPos++] = FAKES; // fake data - white + if ((dwTypeDest & D3DFVF_SPECULAR) && !(dwTypeSrc & D3DFVF_SPECULAR)) { // DEST & !SRC + TransferMask[tmPos++] = FAKES; // fake data - white } - if (!(dwTypeDest & D3DFVF_SPECULAR) && (dwTypeSrc & D3DFVF_SPECULAR)) { // !DEST & SRC - tmPosSrc++; // skip it + if (!(dwTypeDest & D3DFVF_SPECULAR) && (dwTypeSrc & D3DFVF_SPECULAR)) { // !DEST & SRC + tmPosSrc++; // skip it } // ---------------------- "Texture coords" property diff --git a/src/utils/xrLC/nv_library/NvTriStrip.cpp b/src/utils/xrLC/nv_library/NvTriStrip.cpp index f356a72573a..2f572ceb3bb 100644 --- a/src/utils/xrLC/nv_library/NvTriStrip.cpp +++ b/src/utils/xrLC/nv_library/NvTriStrip.cpp @@ -142,8 +142,8 @@ void GenerateStrips(const u16* in_indices, const s32 in_numIndices, xr_vector(tempFaces.size() * 3); primGroups[faceGroupLoc].numIndices = tempFaces.size() * 3; @@ -250,7 +250,7 @@ void RemapIndices( for (int j = 0; j < numIndices; j++) { int cachedIndex = indexCache[in_primGroups[i].indices[j]]; - if (cachedIndex == -1) // we haven't seen this index before + if (cachedIndex == -1) // we haven't seen this index before { // point to "last" vertex in VB remappedGroups[i].indices[j] = u16(indexCtr); diff --git a/src/utils/xrLC/nv_library/NvTriStripObjects.cpp b/src/utils/xrLC/nv_library/NvTriStripObjects.cpp index d79648b46fd..04cd96af324 100644 --- a/src/utils/xrLC/nv_library/NvTriStripObjects.cpp +++ b/src/utils/xrLC/nv_library/NvTriStripObjects.cpp @@ -368,7 +368,7 @@ IC void NvStripInfo::MarkTriangle(NvFaceInfo* faceInfo) bool NvStripInfo::Unique(NvFaceInfoVec& faceVec, NvFaceInfo* face) { - bool bv0, bv1, bv2; // bools to indicate whether a vertex is in the faceVec or not + bool bv0, bv1, bv2; // bools to indicate whether a vertex is in the faceVec or not bv0 = bv1 = bv2 = false; for (int i = 0; i < faceVec.size(); i++) @@ -604,7 +604,7 @@ bool NvStripifier::FindTraversal( startInfo.m_startEdge = edgeIter; if (edgeIter != NULL) { if (strip->SharesEdge(startInfo.m_startFace, edgeInfos)) - startInfo.m_toV1 = (edgeIter->m_v0 == v); // note! used to be m_v1 + startInfo.m_toV1 = (edgeIter->m_v0 == v); // note! used to be m_v1 else startInfo.m_toV1 = (edgeIter->m_v1 == v); } @@ -621,7 +621,7 @@ bool NvStripifier::FindTraversal( void NvStripifier::RemoveSmallStrips(NvStripInfoVec& allStrips, NvStripInfoVec& allBigStrips, NvFaceInfoVec& faceList) { faceList.clear(); - allBigStrips.clear(); // make sure these are empty + allBigStrips.clear(); // make sure these are empty NvFaceInfoVec tempFaceList; for (int i = 0; i < allStrips.size(); i++) @@ -822,7 +822,7 @@ void NvStripifier::Stripify(const WordVec& in_indices, const int in_cacheSize, c NvStripInfoVec& outStrips, NvFaceInfoVec& outFaceList) { meshJump = 0.0f; - bFirstTimeResetPoint = true; // used in FindGoodResetPoint() + bFirstTimeResetPoint = true; // used in FindGoodResetPoint() // the number of times to run the experiments int numSamples = 10; @@ -830,7 +830,7 @@ void NvStripifier::Stripify(const WordVec& in_indices, const int in_cacheSize, c // the cache size, clamped to one cacheSize = _max(1, in_cacheSize - CACHE_INEFFICIENCY); - minStripLength = in_minStripLength; // this is the strip size threshold below which we dump the strip into a list + minStripLength = in_minStripLength; // this is the strip size threshold below which we dump the strip into a list indices = in_indices; diff --git a/src/utils/xrLC/nv_library/NvTriStripObjects.h b/src/utils/xrLC/nv_library/NvTriStripObjects.h index fa30fb5d3aa..4f8f0d7c9f0 100644 --- a/src/utils/xrLC/nv_library/NvTriStripObjects.h +++ b/src/utils/xrLC/nv_library/NvTriStripObjects.h @@ -41,9 +41,9 @@ class NvFaceInfo // data members are left public int m_v0, m_v1, m_v2; - int m_stripId; // real strip Id - int m_testStripId; // strip Id in an experiment - int m_experimentId; // in what experiment was it given an experiment Id? + int m_stripId; // real strip Id + int m_testStripId; // strip Id in an experiment + int m_experimentId; // in what experiment was it given an experiment Id? }; // nice and dumb edge class that points knows its diff --git a/src/utils/xrLC/vbm.h b/src/utils/xrLC/vbm.h index 59251ed8662..d49da5034bd 100644 --- a/src/utils/xrLC/vbm.h +++ b/src/utils/xrLC/vbm.h @@ -3,7 +3,7 @@ #include "xrCore/FMesh.hpp" #include "xrCore/fs.h" -static const u32 c_VB_maxSize = 4096 * 1024; // bytes +static const u32 c_VB_maxSize = 4096 * 1024; // bytes // Vertex containers class VBContainer { @@ -88,8 +88,8 @@ class VBContainer R_ASSERT(dwVertCount * dwOneSize == dwTotalSize); - fs.w(vDcl[i].begin(), vDcl[i].size() * sizeof(D3DVERTEXELEMENT9)); // Vertex format - fs.w_u32(dwVertCount); // Number of vertices + fs.w(vDcl[i].begin(), vDcl[i].size() * sizeof(D3DVERTEXELEMENT9)); // Vertex format + fs.w_u32(dwVertCount); // Number of vertices fs.w(&*vContainers[i].begin(), dwTotalSize); } vDcl.clear(); diff --git a/src/utils/xrLC/xrBuildCForm.cpp b/src/utils/xrLC/xrBuildCForm.cpp index 5579e4193bb..e35fae1dc09 100644 --- a/src/utils/xrLC/xrBuildCForm.cpp +++ b/src/utils/xrLC/xrBuildCForm.cpp @@ -142,7 +142,7 @@ void CBuild::BuildCForm() CL.add_face( T->v[0]->P, T->v[1]->P, T->v[2]->P, T->dwMaterialGame, materials()[T->dwMaterial].sector, T->sm_group); - Logger.Progress(p_total += p_cost); // progress + Logger.Progress(p_total += p_cost); // progress } if (bCriticalErrCnt) { err_save(); diff --git a/src/utils/xrLC/xrFlex2OGF.cpp b/src/utils/xrLC/xrFlex2OGF.cpp index fd36c80fcfb..112b397d111 100644 --- a/src/utils/xrLC/xrFlex2OGF.cpp +++ b/src/utils/xrLC/xrFlex2OGF.cpp @@ -86,8 +86,8 @@ void CBuild::Flex2OGF() u32 MODEL_ID = u32(it - g_XSplit.begin()); OGF* pOGF = new OGF(); - Face* F = *((*it)->begin()); // first face - b_material* M = &(materials()[F->dwMaterial]); // and it's material + Face* F = *((*it)->begin()); // first face + b_material* M = &(materials()[F->dwMaterial]); // and it's material R_ASSERT(F && M); try @@ -112,7 +112,7 @@ void CBuild::Flex2OGF() string_path tn; strconcat(sizeof(tn), tn, *T.name, "_lm.dds"); T.name = tn; - T.pBuildSurface = T.pBuildSurface; // Leave surface intact + T.pBuildSurface = T.pBuildSurface; // Leave surface intact R_ASSERT(pOGF); pOGF->textures.push_back(T); } @@ -127,7 +127,7 @@ void CBuild::Flex2OGF() T.pBuildSurface = &(LM->lm_texture); R_ASSERT(T.pBuildSurface); R_ASSERT(pOGF); - pOGF->textures.push_back(T); //. + pOGF->textures.push_back(T); //. xr_sprintf(fn, "%s_2", LM->lm_texture.name); T.name = fn; pOGF->textures.push_back(T); diff --git a/src/utils/xrLC/xrLight.cpp b/src/utils/xrLC/xrLight.cpp index 012b9b340aa..8b95a5de559 100644 --- a/src/utils/xrLC/xrLight.cpp +++ b/src/utils/xrLC/xrLight.cpp @@ -14,7 +14,7 @@ Lock task_CS #ifdef CONFIG_PROFILE_LOCKS (MUTEX_PROFILE_ID(task_C_S)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ; xr_vector task_pool; diff --git a/src/utils/xrLC/xrMU_Model_Calc_ogf.cpp b/src/utils/xrLC/xrMU_Model_Calc_ogf.cpp index c271cd41878..7fd1e771ae4 100644 --- a/src/utils/xrLC/xrMU_Model_Calc_ogf.cpp +++ b/src/utils/xrLC/xrMU_Model_Calc_ogf.cpp @@ -46,7 +46,7 @@ void calc_ogf(xrMU_Model& mu_model) for (xrMU_Model::v_subdivs_it it = mu_model.m_subdivs.begin(); it != mu_model.m_subdivs.end(); it++) { OGF* pOGF = new OGF(); - b_material* M = &(pBuild->materials()[it->material]); // and it's material + b_material* M = &(pBuild->materials()[it->material]); // and it's material R_ASSERT(M); try diff --git a/src/utils/xrLC/xrMU_Model_export_OGF.cpp b/src/utils/xrLC/xrMU_Model_export_OGF.cpp index fd6b465116c..dbd7525a70f 100644 --- a/src/utils/xrLC/xrMU_Model_export_OGF.cpp +++ b/src/utils/xrLC/xrMU_Model_export_OGF.cpp @@ -25,7 +25,7 @@ void export_ogf(xrMU_Reference& mu_reference) for (xrMU_Model::v_subdivs_it it = model->m_subdivs.begin(); it != model->m_subdivs.end(); it++) { OGF_Reference* pOGF = new OGF_Reference(); - b_material* M = &(pBuild->materials()[it->material]); // and it's material + b_material* M = &(pBuild->materials()[it->material]); // and it's material R_ASSERT(M); // Common data diff --git a/src/utils/xrLC/xrMU_Model_export_geometry.cpp b/src/utils/xrLC/xrMU_Model_export_geometry.cpp index 584f3ad0dc6..73f67f70cfe 100644 --- a/src/utils/xrLC/xrMU_Model_export_geometry.cpp +++ b/src/utils/xrLC/xrMU_Model_export_geometry.cpp @@ -12,7 +12,7 @@ s16 QC(float v) return s16(t); } -D3DVERTEXELEMENT9 decl[] = // 12+4+4+4+8=32 +D3DVERTEXELEMENT9 decl[] = // 12+4+4+4+8=32 {{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0}, {0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0}, diff --git a/src/utils/xrLC/xrOptimizeCFORM_qslim.cpp b/src/utils/xrLC/xrOptimizeCFORM_qslim.cpp index 46d18b5cc49..54c41309335 100644 --- a/src/utils/xrLC/xrOptimizeCFORM_qslim.cpp +++ b/src/utils/xrLC/xrOptimizeCFORM_qslim.cpp @@ -110,8 +110,8 @@ void SimplifyCFORM(CDB::CollectorPacked& CL) slim->boundary_weight = 1000000.f; slim->compactness_ratio = COMPACTNESS_RATIO; slim->meshing_penalty = 1000000.f; - slim->placement_policy = MX_PLACE_ENDPOINTS; // MX_PLACE_ENDPOINTS;//MX_PLACE_ENDORMID;//MX_PLACE_OPTIMAL; - slim->weighting_policy = MX_WEIGHT_UNIFORM; // MX_WEIGHT_UNIFORM;//MX_WEIGHT_AREA; + slim->placement_policy = MX_PLACE_ENDPOINTS; // MX_PLACE_ENDPOINTS;//MX_PLACE_ENDORMID;//MX_PLACE_OPTIMAL; + slim->weighting_policy = MX_WEIGHT_UNIFORM; // MX_WEIGHT_UNIFORM;//MX_WEIGHT_AREA; slim->initialize(); // constraint material§or vertex diff --git a/src/utils/xrLC/xrPhase_AdaptiveHT.cpp b/src/utils/xrLC/xrPhase_AdaptiveHT.cpp index a15f1f7c66e..9a8dfc8af1f 100644 --- a/src/utils/xrLC/xrPhase_AdaptiveHT.cpp +++ b/src/utils/xrLC/xrPhase_AdaptiveHT.cpp @@ -10,7 +10,7 @@ #include "utils/xrLCUtil/xrThread.hpp" #include "xrCDB/xrCDB.h" -const float aht_max_edge = c_SS_maxsize / 2.5f; // 2.0f; // 2 m +const float aht_max_edge = c_SS_maxsize / 2.5f; // 2.0f; // 2 m // const float aht_min_edge = .2f; // 20 cm // const float aht_min_err = 16.f/255.f; // ~10% error @@ -31,7 +31,7 @@ int callback_edge_longest(const Face* F) { Vertex *V1, *V2; F->EdgeVerts(e, &V1, &V2); - float len = V1->P.distance_to(V2->P); // len + float len = V1->P.distance_to(V2->P); // len if (len < aht_max_edge) continue; if (len > max_err) { max_err = len; @@ -164,12 +164,12 @@ void CBuild::xrPhase_AdaptiveHT() Logger.Status("Tesselating..."); if (1) { for (u32 fit = 0; fit < lc_global_data()->g_faces().size(); fit++) - { // clear split flag from all faces + calculate normals + { // clear split flag from all faces + calculate normals lc_global_data()->g_faces()[fit]->flags.bSplitted = false; lc_global_data()->g_faces()[fit]->flags.bLocked = true; lc_global_data()->g_faces()[fit]->CalcNormal(); } - u_Tesselate(callback_edge_longest, 0, 0); // tesselate + u_Tesselate(callback_edge_longest, 0, 0); // tesselate } // Tesselate + calculate @@ -194,7 +194,7 @@ void CBuild::xrPhase_AdaptiveHT() // Vertex* V = lc_global_data()->g_vertices()[vit]; // V->normalFromAdj (); // LightPoint (&DB, lc_global_data()->RCAST_Model(), vC, V->P, V->N, pBuild->L_static(), - //LP_dont_rgb+LP_dont_sun,0); + // LP_dont_rgb+LP_dont_sun,0); // vC.mul (0.5f); // V->C._set (vC); //} @@ -265,15 +265,15 @@ bool check_and_destroy_splited(u32 face_it) VERIFY(F); if (F->flags.bSplitted) { if (!F->flags.bLocked) lc_global_data()->destroy_face(lc_global_data()->g_faces()[face_it]); - return false; // continue; + return false; // continue; } return true; } bool do_tesselate_face(const Face& F, tesscb_estimator* cb_E, int& max_id) { - if (F.CalcArea() < EPS_L) return false; // continue; + if (F.CalcArea() < EPS_L) return false; // continue; max_id = cb_E(&F); - if (max_id < 0) return false; // continue; // nothing selected + if (max_id < 0) return false; // continue; // nothing selected return true; } diff --git a/src/utils/xrLC/xrPhase_GI.cpp b/src/utils/xrLC/xrPhase_GI.cpp index 15da476964b..fec73415e8f 100644 --- a/src/utils/xrLC/xrPhase_GI.cpp +++ b/src/utils/xrLC/xrPhase_GI.cpp @@ -19,7 +19,7 @@ static xr_vector* task; Lock task_cs #ifdef CONFIG_PROFILE_LOCKS (MUTEX_PROFILE_ID(task_cs)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ; static u32 task_it; @@ -34,7 +34,7 @@ static Fvector GetPixel_7x7(CDB::RESULT& rpinf) if (0 == F) return R; const Shader_xrLC& SH = F->Shader(); if (!SH.flags.bLIGHT_CastShadow) return R; - if (!F->flags.bOpaque) return R; // don't use transparency + if (!F->flags.bOpaque) return R; // don't use transparency b_material& M = pBuild->materials()[F->dwMaterial]; b_texture& T = pBuild->textures()[M.surfidx]; @@ -118,12 +118,12 @@ class CGI : public CThread // analyze CRandom random; random.seed(0x12071980); - float factor = _sqrt(src.range / gi_optimal_range); // smaller lights get smaller amount of photons + float factor = _sqrt(src.range / gi_optimal_range); // smaller lights get smaller amount of photons if (factor > 1) factor = 1; if (LT_SECONDARY == src.type) - factor /= powf(2.f, float(src.level)); // secondary lights get half the photons - factor *= _sqrt(src.energy); // 2.f is optimal energy = baseline - // factor = _sqrt (factor); // move towards 1.0 (one) + factor /= powf(2.f, float(src.level)); // secondary lights get half the photons + factor *= _sqrt(src.energy); // 2.f is optimal energy = baseline + // factor = _sqrt (factor); // move towards 1.0 (one) int count = iCeil(factor * float(gi_num_photons)); // count = gi_num_photons; float _clip = (_sqrt(src.energy) / 10.f + gi_clip) / 2.f; @@ -139,11 +139,11 @@ class CGI : public CThread { case LT_POINT: dir.random_dir(random).normalize(); break; case LT_SECONDARY: - dir.random_dir(src.direction, PI_DIV_2, random); //. or PI ? + dir.random_dir(src.direction, PI_DIV_2, random); //. or PI ? s = src.direction.dotproduct(dir.normalize()); break; default: - continue; // continue loop + continue; // continue loop } xrc.ray_query(model, src.position, dir, src.range); if (!xrc.r_count()) continue; @@ -155,7 +155,7 @@ class CGI : public CThread float dot = TN.dotproduct(idir.invert(dir)); dst.position.mad(src.position, dir, R->range); - dst.position.mad(TN, 0.01f); // 1cm away from surface + dst.position.mad(TN, 0.01f); // 1cm away from surface dst.direction.reflect(dir, TN); dst.energy = src.energy * dot * gi_reflect * (1 - R->range / src.range) * _scale; if (dst.energy < _clip) continue; @@ -182,7 +182,7 @@ class CGI : public CThread float _r1 = src.range * _sqrt(dst.energy / src.energy); float _r2 = (dst.energy - _clip) / _clip; float _r3 = src.range; - dst.range = 1 * ((1.f * _r1 + 3.f * _r2 + 3.f * _r3) / 7.f); // empirical + dst.range = 1 * ((1.f * _r1 + 3.f * _r2 + 3.f * _r3) / 7.f); // empirical // clMsg ("submit: level[%d],type[%d], energy[%f]",dst.level,dst.type,dst.energy); // submit answer diff --git a/src/utils/xrLC/xrPhase_MergeGeometry.cpp b/src/utils/xrLC/xrPhase_MergeGeometry.cpp index 1c88c7eb08c..fe819245407 100644 --- a/src/utils/xrLC/xrPhase_MergeGeometry.cpp +++ b/src/utils/xrLC/xrPhase_MergeGeometry.cpp @@ -27,7 +27,7 @@ BOOL NeedMerge(vecFace& subdiv, Fbox& bb_base) bb_base.modify(F->v[1]->P); bb_base.modify(F->v[2]->P); } - bb_base.grow(EPS_S); // Enshure non-zero volume + bb_base.grow(EPS_S); // Enshure non-zero volume Fvector sz_base; bb_base.getsize(sz_base); @@ -74,7 +74,7 @@ IC BOOL ValidateMergeLinearSize(const Fvector& merged, const Fvector& orig1, con IC BOOL ValidateMerge(u32 f1, const Fbox& bb_base, const Fbox& bb_base_orig, u32 f2, const Fbox& bb, float& volume) { // Polygons - if ((f1 + f2) > u32(4 * c_SS_HighVertLimit / 3)) return FALSE; // Don't exceed limits (4/3 max POLY) + if ((f1 + f2) > u32(4 * c_SS_HighVertLimit / 3)) return FALSE; // Don't exceed limits (4/3 max POLY) // Size Fbox merge; @@ -89,7 +89,7 @@ IC BOOL ValidateMerge(u32 f1, const Fbox& bb_base, const Fbox& bb_base_orig, u32 // if (sz.y>(4*c_SS_maxsize/3)) return FALSE; // if (sz.z>(4*c_SS_maxsize/3)) return FALSE; - if (!ValidateMergeLinearSize(sz, orig1, orig2, 0)) return FALSE; // Don't exceed limits (4/3 GEOM) + if (!ValidateMergeLinearSize(sz, orig1, orig2, 0)) return FALSE; // Don't exceed limits (4/3 GEOM) if (!ValidateMergeLinearSize(sz, orig1, orig2, 1)) return FALSE; if (!ValidateMergeLinearSize(sz, orig1, orig2, 2)) return FALSE; @@ -99,8 +99,8 @@ IC BOOL ValidateMerge(u32 f1, const Fbox& bb_base, const Fbox& bb_base_orig, u32 float v1 = bb0.getvolume(); MakeCube(bb1, bb); float v2 = bb1.getvolume(); - volume = merge.getvolume(); // / Cuboid(merge); - if (volume > 2 * 2 * 2 * (v1 + v2)) return FALSE; // Don't merge too distant groups (8 vol) + volume = merge.getvolume(); // / Cuboid(merge); + if (volume > 2 * 2 * 2 * (v1 + v2)) return FALSE; // Don't merge too distant groups (8 vol) // OK return TRUE; @@ -118,7 +118,7 @@ typedef struct MERGEGM_PARAMS vecFace* subdiv; Fbox* bb_base_orig; Fbox* bb_base; - HANDLE hEvents[3]; // 0=start,1=terminate,2=ready + HANDLE hEvents[3]; // 0=start,1=terminate,2=ready } * LP_MERGEGM_PARAMS; static CRITICAL_SECTION mergegm_cs; @@ -148,8 +148,8 @@ DWORD WINAPI MergeGmThreadProc(LPVOID lpParameter) // Error ? ExitThread(1); break; - } // switch - } // while + } // switch + } // while return 0; } @@ -236,7 +236,7 @@ void FindBestMergeCandidate_threads(u32* selected, float* selected_volume, u32 s mergegm_params[i].bb_base = bb_base; SetEvent(mergegm_params[i].hEvents[0]); - } // for + } // for // Wait for result WaitForMultipleObjects(mergegm_threads_count, mergegm_ready_events, TRUE, INFINITE); @@ -296,7 +296,7 @@ void CBuild::xrPhase_MergeGeometry() u32 selected = split; float selected_volume = flt_max; - if ((g_XSplit.size() - split) < 200) { // may need adjustment + if ((g_XSplit.size() - split) < 200) { // may need adjustment // single thread FindBestMergeCandidate( &selected, &selected_volume, split + 1, g_XSplit.size(), &subdiv, &bb_base_orig, &bb_base); @@ -308,7 +308,7 @@ void CBuild::xrPhase_MergeGeometry() &selected, &selected_volume, split + 1, g_XSplit.size(), &subdiv, &bb_base_orig, &bb_base); } - if (selected == split) break; // No candidates for merge + if (selected == split) break; // No candidates for merge // **OK**. Perform merge subdiv.insert(subdiv.begin(), g_XSplit[selected]->begin(), g_XSplit[selected]->end()); diff --git a/src/utils/xrLC/xrPhase_MergeLM.cpp b/src/utils/xrLC/xrPhase_MergeLM.cpp index e8159237f2c..9b71946ee47 100644 --- a/src/utils/xrLC/xrPhase_MergeLM.cpp +++ b/src/utils/xrLC/xrPhase_MergeLM.cpp @@ -15,9 +15,9 @@ IC int compare_defl(CDeflector* D1, CDeflector* D2) // First - by material u16 M1 = D1->GetBaseMaterial(); u16 M2 = D2->GetBaseMaterial(); - if (M1 < M2) return 1; // less - if (M1 > M2) return 0; // more - return 2; // equal + if (M1 < M2) return 1; // less + if (M1 > M2) return 0; // more + return 2; // equal } // should define LESS(D1materials()[M1].internal_max_area; u32 A2 = pBuild->materials()[M2].internal_max_area; - if (A1 < A2) return 2; // A2 better - if (A1 > A2) return 1; // A1 better + if (A1 < A2) return 2; // A2 better + if (A1 > A2) return 1; // A1 better // 2. material sector (geom - locality) u32 s1 = pBuild->materials()[M1].sector; u32 s2 = pBuild->materials()[M2].sector; - if (s1 < s2) return 2; // s2 better - if (s1 > s2) return 1; // s1 better + if (s1 < s2) return 2; // s2 better + if (s1 > s2) return 1; // s1 better // 3. just material index - if (M1 < M2) return 2; // s2 better - if (M1 > M2) return 1; // s1 better + if (M1 < M2) return 2; // s2 better + if (M1 > M2) return 1; // s1 better // 4. deflector area u32 da1 = D1->layer.Area(); u32 da2 = D2->layer.Area(); - if (da1 < da2) return 2; // s2 better - if (da1 > da2) return 1; // s1 better + if (da1 < da2) return 2; // s2 better + if (da1 > da2) return 1; // s1 better // 5. they are EQUAL - return 0; // equal + return 0; // equal } // should define LESS(D1= alpha_ref) *P = 255; @@ -37,7 +37,7 @@ void _rect_register(L_rect& R, lm_layer* D, BOOL bRotate) // Rotated :( for (u32 y = 0; y < s_x; y++) { - BYTE* P = surface + (y + R.a.y) * c_LMAP_size + R.a.x; // destination scan-line + BYTE* P = surface + (y + R.a.y) * c_LMAP_size + R.a.x; // destination scan-line for (u32 x = 0; x < s_y; x++, P++) if (lm[x * s_x + y] >= alpha_ref) *P = 255; } @@ -59,7 +59,7 @@ bool Place_Perpixel(L_rect& R, lm_layer* D, BOOL bRotate) // Normal (and fastest way) for (int y = 0; y < s_y; y++) { - BYTE* P = surface + (y + R.a.y) * c_LMAP_size + R.a.x; // destination scan-line + BYTE* P = surface + (y + R.a.y) * c_LMAP_size + R.a.x; // destination scan-line u8* S = lm + y * s_x; // accelerated part for (x = 0; x < s_x - 8; x += 8, P += 8, S += 8) @@ -87,7 +87,7 @@ bool Place_Perpixel(L_rect& R, lm_layer* D, BOOL bRotate) // Rotated :( for (int y = 0; y < s_x; y++) { - BYTE* P = surface + (y + R.a.y) * c_LMAP_size + R.a.x; // destination scan-line + BYTE* P = surface + (y + R.a.y) * c_LMAP_size + R.a.x; // destination scan-line for (x = 0; x < s_y; x++, P++) if ((*P) && (lm[x * s_x + y] >= alpha_ref)) { _mm_empty(); diff --git a/src/utils/xrLC/xrPhase_Subdivide.cpp b/src/utils/xrLC/xrPhase_Subdivide.cpp index 8aa2d31ed78..abf5b9d0a5f 100644 --- a/src/utils/xrLC/xrPhase_Subdivide.cpp +++ b/src/utils/xrLC/xrPhase_Subdivide.cpp @@ -96,8 +96,8 @@ void CBuild::xrPhase_Subdivide() // align plane onto vertices // Process all faces and rearrange them - u32 iteration_on_edge = 0; // up to 3 - u32 iteration_per_edge = 0; // up to 10 + u32 iteration_on_edge = 0; // up to 3 + u32 iteration_per_edge = 0; // up to 10 resplit: s2.clear(); s1.clear(); @@ -122,7 +122,7 @@ void CBuild::xrPhase_Subdivide() s2.size()); if (iteration_per_edge < 10) { if (g_XSplit[X]->size() > c_SS_LowVertLimit * 4) { - if (s2.size() > s1.size()) { // b2 -less, b1-grow + if (s2.size() > s1.size()) { // b2 -less, b1-grow size.sub(b2.max, b2.min); b1.max[box_edge] += size[box_edge] / 2; b2.min[box_edge] = b1.max[box_edge]; diff --git a/src/utils/xrLC/xrPhase_TangentBasis.cpp b/src/utils/xrLC/xrPhase_TangentBasis.cpp index 46222ab8e8e..e3c319499af 100644 --- a/src/utils/xrLC/xrPhase_TangentBasis.cpp +++ b/src/utils/xrLC/xrPhase_TangentBasis.cpp @@ -74,9 +74,9 @@ static void retrive_data_from_mender_otput( for (u32 f = 0; f < lc_global_data()->g_faces().size(); f++) { Face* F = lc_global_data()->g_faces()[f]; - u32 id0 = theIndices[f * 3 + 0]; // vertex index - u32 id1 = theIndices[f * 3 + 1]; // vertex index - u32 id2 = theIndices[f * 3 + 2]; // vertex index + u32 id0 = theIndices[f * 3 + 0]; // vertex index + u32 id1 = theIndices[f * 3 + 1]; // vertex index + u32 id2 = theIndices[f * 3 + 2]; // vertex index R_ASSERT(id0 < theVerts.size()); R_ASSERT(id1 < theVerts.size()); R_ASSERT(id2 < theVerts.size()); diff --git a/src/utils/xrLC/xrPhase_UVmap.cpp b/src/utils/xrLC/xrPhase_UVmap.cpp index 69bd71f842e..2bcd271b33d 100644 --- a/src/utils/xrLC/xrPhase_UVmap.cpp +++ b/src/utils/xrLC/xrPhase_UVmap.cpp @@ -17,10 +17,10 @@ void Detach(vecFace* S) { Vertex* V = (*F)->v[i]; Vertex* VC; - map_v2v_it W = verts.find(V); // iterator + map_v2v_it W = verts.find(V); // iterator - if (W == verts.end()) { // where is no such-vertex - VC = V->CreateCopy_NOADJ(lc_global_data()->g_vertices()); // make copy + if (W == verts.end()) { // where is no such-vertex + VC = V->CreateCopy_NOADJ(lc_global_data()->g_vertices()); // make copy verts.insert(mk_pair(V, VC)); } else @@ -58,9 +58,9 @@ void CBuild::xrPhase_UVmap() // Detect vertex-lighting and avoid this subdivision R_ASSERT(!g_XSplit[SP]->empty()); Face* Fvl = g_XSplit[SP]->front(); - if (Fvl->Shader().flags.bLIGHT_Vertex) continue; // do-not touch (skip) - if (!Fvl->Shader().flags.bRendering) continue; // do-not touch (skip) - if (Fvl->hasImplicitLighting()) continue; // do-not touch (skip) + if (Fvl->Shader().flags.bLIGHT_Vertex) continue; // do-not touch (skip) + if (!Fvl->Shader().flags.bRendering) continue; // do-not touch (skip) + if (Fvl->hasImplicitLighting()) continue; // do-not touch (skip) // find first poly that doesn't has mapping and start recursion while (TRUE) diff --git a/src/utils/xrLC/xrSaveOGF.cpp b/src/utils/xrLC/xrSaveOGF.cpp index 5640bba5dbc..180e5f8a41a 100644 --- a/src/utils/xrLC/xrSaveOGF.cpp +++ b/src/utils/xrLC/xrSaveOGF.cpp @@ -122,8 +122,8 @@ void CBuild::SaveTREE(IWriter& fs) 100.f * float(g_batch_1000) / float(g_batch_count), 100.f * float(g_batch_5000) / float(g_batch_count)); mem_Compact(); - SaveGEOMs("level.geom", g_VB, g_IB, g_SWI); // Normal - SaveGEOMs("level.geomx", x_VB, x_IB, x_SWI); // Fast-Path + SaveGEOMs("level.geom", g_VB, g_IB, g_SWI); // Normal + SaveGEOMs("level.geomx", x_VB, x_IB, x_SWI); // Fast-Path Logger.Status("Shader table..."); fs.open_chunk(fsL_SHADERS); diff --git a/src/utils/xrLCUtil/resource.rc b/src/utils/xrLCUtil/resource.rc index 03769eeb817..1a1500963ae 100644 --- a/src/utils/xrLCUtil/resource.rc +++ b/src/utils/xrLCUtil/resource.rc @@ -63,9 +63,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_STEP, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 93 TOPMARGIN, 7 BOTTOMMARGIN, 8 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // Russian (Russia) resources +#endif // Russian (Russia) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// @@ -92,9 +92,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 3 TEXTINCLUDE BEGIN "\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // Ukrainian (Ukraine) resources +#endif // Ukrainian (Ukraine) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -104,4 +104,4 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT // ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/utils/xrLC_Light/ETextureParams.h b/src/utils/xrLC_Light/ETextureParams.h index c081a30aa13..1f4c4b89e8d 100644 --- a/src/utils/xrLC_Light/ETextureParams.h +++ b/src/utils/xrLC_Light/ETextureParams.h @@ -90,7 +90,7 @@ struct STextureParams flHasAlpha = (1 << 25), flBumpDetail = (1 << 26), - flHasSurface = (1 << 27), // for compiler - save the fact the surface was loaded + flHasSurface = (1 << 27), // for compiler - save the fact the surface was loaded // use when deleted pSurface for memory issues flForceU32 = u32(-1) @@ -138,7 +138,7 @@ struct STextureParams } IC BOOL HasSurface() const { return flags.is(flHasSurface); } IC void SetHasSurface(BOOL val) { flags.set(flHasSurface, val); } - IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал + IC BOOL HasAlphaChannel() // игровая текстура содержит альфа канал { switch (fmt) { diff --git a/src/utils/xrLC_Light/LightThread.cpp b/src/utils/xrLC_Light/LightThread.cpp index 9afac2fe3a4..e326b744381 100644 --- a/src/utils/xrLC_Light/LightThread.cpp +++ b/src/utils/xrLC_Light/LightThread.cpp @@ -18,7 +18,7 @@ void LightThread::Execute() { DetailSlot& DS = gl_data.slots_data.get_slot(_x, _z); if (!detail_slot_process(_x, _z, DS)) continue; - if (!detail_slot_calculate(_x, _z, DS, box_result, DB, Selected)) continue; //? + if (!detail_slot_calculate(_x, _z, DS, box_result, DB, Selected)) continue; //? gl_data.slots_data.set_slot_calculated(_x, _z); thProgress = float(_z - Nstart) / float(Nend - Nstart); diff --git a/src/utils/xrLC_Light/LightThread.h b/src/utils/xrLC_Light/LightThread.h index 037c5c12bb7..f5281d0ea00 100644 --- a/src/utils/xrLC_Light/LightThread.h +++ b/src/utils/xrLC_Light/LightThread.h @@ -17,4 +17,4 @@ class LightThread : public CThread } virtual void Execute(); }; -#endif //__LIGHTTHREAD_H__ \ No newline at end of file +#endif //__LIGHTTHREAD_H__ \ No newline at end of file diff --git a/src/utils/xrLC_Light/Lightmap.cpp b/src/utils/xrLC_Light/Lightmap.cpp index 456bcd0ab39..afa9e57390d 100644 --- a/src/utils/xrLC_Light/Lightmap.cpp +++ b/src/utils/xrLC_Light/Lightmap.cpp @@ -179,8 +179,8 @@ void CLightmap::Save(LPCSTR path) xr_sprintf(lm_texture.name, "lmap#%d", lmapNameID); xr_sprintf(FN, "%s%s_1.dds", path, lm_texture.name); BYTE* raw_data = LPBYTE(&*lm_packed.begin()); - u32 w = lm_texture.dwWidth; // lm.width; - u32 h = lm_texture.dwHeight; // lm.height; + u32 w = lm_texture.dwWidth; // lm.width; + u32 h = lm_texture.dwHeight; // lm.height; u32 pitch = w * 4; STextureParams fmt; @@ -191,10 +191,10 @@ void CLightmap::Save(LPCSTR path) DXTCompress(FN, raw_data, 0, w, h, pitch, &fmt, 4); } lm_packed.clear_and_free(); - Logger.Status("Compression hemi..."); //. + Logger.Status("Compression hemi..."); //. { - u32 w = lm_texture.dwWidth; // lm.width; - u32 h = lm_texture.dwHeight; // lm.height; + u32 w = lm_texture.dwWidth; // lm.width; + u32 h = lm_texture.dwHeight; // lm.height; u32 pitch = w * 4; string_path FN; diff --git a/src/utils/xrLC_Light/Lightmap.h b/src/utils/xrLC_Light/Lightmap.h index 45d523ecf2a..a526d71089c 100644 --- a/src/utils/xrLC_Light/Lightmap.h +++ b/src/utils/xrLC_Light/Lightmap.h @@ -34,4 +34,4 @@ typedef vector_serialize>> twrite_ extern tread_lightmaps* read_lightmaps; extern twrite_lightmaps* write_lightmaps; -#endif // !defined(AFX_LIGHTMAP_H__889100E6_CF29_47EA_ABFD_41AE28DAC6B1__INCLUDED_) +#endif // !defined(AFX_LIGHTMAP_H__889100E6_CF29_47EA_ABFD_41AE28DAC6B1__INCLUDED_) diff --git a/src/utils/xrLC_Light/MeshStructure.h b/src/utils/xrLC_Light/MeshStructure.h index 57e461466af..49c7130b57b 100644 --- a/src/utils/xrLC_Light/MeshStructure.h +++ b/src/utils/xrLC_Light/MeshStructure.h @@ -346,4 +346,4 @@ IC void isolate_vertices(BOOL bProgress, xr_vector& vertices) if (_count) Logger.clMsg("::compact:: %d verts removed", _count); } -#endif //__MESHSTRUCTURE_H__ \ No newline at end of file +#endif //__MESHSTRUCTURE_H__ \ No newline at end of file diff --git a/src/utils/xrLC_Light/R_light.h b/src/utils/xrLC_Light/R_light.h index aa0a4e5858b..dff14f71faf 100644 --- a/src/utils/xrLC_Light/R_light.h +++ b/src/utils/xrLC_Light/R_light.h @@ -6,18 +6,18 @@ struct R_Light { - u16 type; // Type of light source - u16 level; // GI level - Fvector diffuse; // Diffuse color of light - Fvector position; // Position in world space - Fvector direction; // Direction in world space - float range; // Cutoff range - float range2; // ^2 - float falloff; // precalc to make light aqal to zero at light range - float attenuation0; // Constant attenuation - float attenuation1; // Linear attenuation - float attenuation2; // Quadratic attenuation - float energy; // For radiosity ONLY + u16 type; // Type of light source + u16 level; // GI level + Fvector diffuse; // Diffuse color of light + Fvector position; // Position in world space + Fvector direction; // Direction in world space + float range; // Cutoff range + float range2; // ^2 + float falloff; // precalc to make light aqal to zero at light range + float attenuation0; // Constant attenuation + float attenuation1; // Linear attenuation + float attenuation2; // Quadratic attenuation + float energy; // For radiosity ONLY Fvector tri[3]; diff --git a/src/utils/xrLC_Light/base_color.h b/src/utils/xrLC_Light/base_color.h index 8876ea06423..70d85b3c546 100644 --- a/src/utils/xrLC_Light/base_color.h +++ b/src/utils/xrLC_Light/base_color.h @@ -17,10 +17,10 @@ struct fixed16 class XRLC_LIGHT_API base_color_c { public: - Fvector rgb; // - all static lighting - float hemi; // - hemisphere - float sun; // - sun - float _tmp_; // ??? + Fvector rgb; // - all static lighting + float hemi; // - hemisphere + float sun; // - sun + float _tmp_; // ??? base_color_c() { rgb.set(0, 0, 0); @@ -106,7 +106,7 @@ class XRLC_LIGHT_API base_color g._w(rgb.y); b._w(rgb.z); h._w(hemi); - s._w(sun); // t._w(_tmp_); + s._w(sun); // t._w(_tmp_); } void _get(base_color_c& C) const { diff --git a/src/utils/xrLC_Light/base_face.h b/src/utils/xrLC_Light/base_face.h index cf37392a68c..42c7f92e458 100644 --- a/src/utils/xrLC_Light/base_face.h +++ b/src/utils/xrLC_Light/base_face.h @@ -10,15 +10,15 @@ class XRLC_LIGHT_API base_Face base_basis basis_tangent[3]; base_basis basis_binormal[3]; - u16 dwMaterial; // index of material - u16 dwMaterialGame; // unique-id of game material (must persist up to game-CForm saving) + u16 dwMaterial; // index of material + u16 dwMaterialGame; // unique-id of game material (must persist up to game-CForm saving) struct { u16 bSplitted : 1; u16 bProcessed : 1; - u16 bOpaque : 1; // For ray-tracing speedup - u16 bLocked : 1; // For tesselation + u16 bOpaque : 1; // For ray-tracing speedup + u16 bLocked : 1; // For tesselation } flags; virtual const Shader_xrLC& Shader() const; @@ -37,8 +37,8 @@ class XRLC_LIGHT_API base_Vertex public: Fvector P; Fvector N; - base_color C; // all_lighting info - int handle; // used in mesh-processing/optimization/conversion + base_color C; // all_lighting info + int handle; // used in mesh-processing/optimization/conversion public: base_Vertex() {} virtual ~base_Vertex() = 0; diff --git a/src/utils/xrLC_Light/base_lighting.h b/src/utils/xrLC_Light/base_lighting.h index cabdbfaaf81..b12f4b16069 100644 --- a/src/utils/xrLC_Light/base_lighting.h +++ b/src/utils/xrLC_Light/base_lighting.h @@ -8,9 +8,9 @@ class INetReader; class XRLC_LIGHT_API base_lighting { public: - xr_vector rgb; // P,N - xr_vector hemi; // P,N - xr_vector sun; // P + xr_vector rgb; // P,N + xr_vector hemi; // P,N + xr_vector sun; // P void select(xr_vector& dest, xr_vector& src, Fvector& P, float R); void select(base_lighting& from, Fvector& P, float R); diff --git a/src/utils/xrLC_Light/calculate_normals.h b/src/utils/xrLC_Light/calculate_normals.h index bf5c26c0e2f..3a01b7daf90 100644 --- a/src/utils/xrLC_Light/calculate_normals.h +++ b/src/utils/xrLC_Light/calculate_normals.h @@ -56,7 +56,7 @@ class calculate_normals { vecFace new_adj; itterate_adjacents_type::recurse_tri_params p(pTestVertex, new_adj, sm_cos); - itterate_adjacents_type::RecurseTri(0, p); // pTestVertex, new_adj, sm_cos ); + itterate_adjacents_type::RecurseTri(0, p); // pTestVertex, new_adj, sm_cos ); VERIFY(!new_adj.empty()); type_vertex* pNewVertex = pTestVertex->CreateCopy_NOADJ(vertices); @@ -88,4 +88,4 @@ class calculate_normals (*it)->flags.bSplitted = false; } }; -#endif //__CALCULATE_NORMALS_H__ \ No newline at end of file +#endif //__CALCULATE_NORMALS_H__ \ No newline at end of file diff --git a/src/utils/xrLC_Light/detail_net_global_data.cpp b/src/utils/xrLC_Light/detail_net_global_data.cpp index c7e4b71edd5..859044a0854 100644 --- a/src/utils/xrLC_Light/detail_net_global_data.cpp +++ b/src/utils/xrLC_Light/detail_net_global_data.cpp @@ -13,7 +13,7 @@ namespace lc_net { void net_global_data_impl::init() { - data_init(); // init as new data + data_init(); // init as new data } void net_global_data_impl::create_data_file(LPCSTR path) diff --git a/src/utils/xrLC_Light/detail_net_global_data.h b/src/utils/xrLC_Light/detail_net_global_data.h index 22ae121ecb0..4a393640f1c 100644 --- a/src/utils/xrLC_Light/detail_net_global_data.h +++ b/src/utils/xrLC_Light/detail_net_global_data.h @@ -32,4 +32,4 @@ class net_global_data_impl // template<> struct global_add_global{}; } -#endif // #ifndef DETAIL_NET_GLOBAL_DATA_H_INCLUDED \ No newline at end of file +#endif // #ifndef DETAIL_NET_GLOBAL_DATA_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/detail_slot_calculate.cpp b/src/utils/xrLC_Light/detail_slot_calculate.cpp index f7a7b7de952..3242928f98c 100644 --- a/src/utils/xrLC_Light/detail_slot_calculate.cpp +++ b/src/utils/xrLC_Light/detail_slot_calculate.cpp @@ -30,10 +30,10 @@ float color_intensity(Fcolor& c) class base_color { public: - Fvector rgb; // - all static lighting - float hemi; // - hemisphere - float sun; // - sun - float _tmp_; // ??? + Fvector rgb; // - all static lighting + float hemi; // - hemisphere + float sun; // - sun + float _tmp_; // ??? base_color() { rgb.set(0, 0, 0); @@ -118,7 +118,7 @@ IC bool RayPick(CDB::COLLIDER& DB, Fvector& P, Fvector& D, float r, R_Light& L) } } -float getLastRP_Scale(CDB::COLLIDER* DB, R_Light& L) //, Face* skip) +float getLastRP_Scale(CDB::COLLIDER* DB, R_Light& L) //, Face* skip) { u32 tris_count = DB->r_count(); float scale = 1.f; @@ -140,8 +140,9 @@ float getLastRP_Scale(CDB::COLLIDER* DB, R_Light& L) //, Face* skip) const Shader_xrLC& SH = shader(F.dwMaterial, *(gl_data.g_shaders_xrlc), gl_data.g_materials); // Shader_xrLCVec& LIB = gl_data.g_shaders_xrlc->Library (); - // if (M.shader_xrlc>=LIB.size()) return 0; //. hack - vy gonite rebyata - eto ne hack - eto - //sledy zamesti - shader_xrlc - index ne togo masiva !! + // if (M.shader_xrlc>=LIB.size()) return 0; //. hack - vy gonite rebyata - eto ne hack - + //eto + // sledy zamesti - shader_xrlc - index ne togo masiva !! // Shader_xrLC& SH = LIB [M.shader_xrlc]; if (!SH.flags.bLIGHT_CastShadow) continue; @@ -192,7 +193,7 @@ float getLastRP_Scale(CDB::COLLIDER* DB, R_Light& L) //, Face* skip) return scale; } -float rayTrace(CDB::COLLIDER* DB, R_Light& L, Fvector& P, Fvector& D, float R) //, Face* skip) +float rayTrace(CDB::COLLIDER* DB, R_Light& L, Fvector& P, Fvector& D, float R) //, Face* skip) { R_ASSERT(DB); @@ -212,7 +213,7 @@ float rayTrace(CDB::COLLIDER* DB, R_Light& L, Fvector& P, Fvector& D, float R) } else { - return getLastRP_Scale(DB, L); //,skip); + return getLastRP_Scale(DB, L); //,skip); } return 0; } diff --git a/src/utils/xrLC_Light/detail_slot_calculate.h b/src/utils/xrLC_Light/detail_slot_calculate.h index 5c1015b6e7a..bf57b698a31 100644 --- a/src/utils/xrLC_Light/detail_slot_calculate.h +++ b/src/utils/xrLC_Light/detail_slot_calculate.h @@ -21,4 +21,4 @@ extern __declspec(thread) u64 t_count; bool detail_slot_calculate( u32 _x, u32 _z, DetailSlot& DS, DWORDVec& box_result, CDB::COLLIDER& DB, base_lighting& Selected); bool detail_slot_process(u32 _x, u32 _z, DetailSlot& DS); -#endif // #ifndef DETAIL_SLOT_CALCULATE_H_INCLUDED \ No newline at end of file +#endif // #ifndef DETAIL_SLOT_CALCULATE_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/execute_statistics.h b/src/utils/xrLC_Light/execute_statistics.h index 51c87f5ad5a..9bb371167a1 100644 --- a/src/utils/xrLC_Light/execute_statistics.h +++ b/src/utils/xrLC_Light/execute_statistics.h @@ -20,7 +20,7 @@ class execute_time_statistics void log() const; private: -}; // class execute_statistics +}; // class execute_statistics class execute_statistics { public: @@ -32,4 +32,4 @@ class execute_statistics }; #endif -#endif // #ifndef EXECUTE_STATISTICS_H_INCLUDED +#endif // #ifndef EXECUTE_STATISTICS_H_INCLUDED diff --git a/src/utils/xrLC_Light/gl_base_cl_data.h b/src/utils/xrLC_Light/gl_base_cl_data.h index 710887b73cd..a7708f0dc91 100644 --- a/src/utils/xrLC_Light/gl_base_cl_data.h +++ b/src/utils/xrLC_Light/gl_base_cl_data.h @@ -26,4 +26,4 @@ class net_global_data_impl }; } -#endif // #ifndef GL_BASE_CL_DATA_H_INCLUDED \ No newline at end of file +#endif // #ifndef GL_BASE_CL_DATA_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/global_calculation_data.h b/src/utils/xrLC_Light/global_calculation_data.h index 55b1c763874..e7ba41ed5ed 100644 --- a/src/utils/xrLC_Light/global_calculation_data.h +++ b/src/utils/xrLC_Light/global_calculation_data.h @@ -9,18 +9,18 @@ class Shader_xrLC_LIB; //----------------------------------------------------------------- struct global_claculation_data { - base_lighting g_lights; /////////////////////lc - Shader_xrLC_LIB* g_shaders_xrlc; ////////////////lc - b_params g_params; //////////////////////lc - xr_vector g_materials; ///////////////////lc - xr_vector g_textures; ////////////////////lc - CDB::MODEL RCAST_Model; ///////////////////lc + base_lighting g_lights; /////////////////////lc + Shader_xrLC_LIB* g_shaders_xrlc; ////////////////lc + b_params g_params; //////////////////////lc + xr_vector g_materials; ///////////////////lc + xr_vector g_textures; ////////////////////lc + CDB::MODEL RCAST_Model; ///////////////////lc - Fbox LevelBB; //-----------============ - global_slots_data slots_data; //-------============= - xr_vector g_shader_compile; //-----========== - xr_vector g_rc_faces; //---------=============== - /////////////////////////////////////////////////////////////////////// + Fbox LevelBB; //-----------============ + global_slots_data slots_data; //-------============= + xr_vector g_shader_compile; //-----========== + xr_vector g_rc_faces; //---------=============== + /////////////////////////////////////////////////////////////////////// void read(INetReader& r); void write(IWriter& w) const; ////////////////////////////////////////////////////////////////////////// diff --git a/src/utils/xrLC_Light/global_slots_data.h b/src/utils/xrLC_Light/global_slots_data.h index 055d20862fe..66cc2796882 100644 --- a/src/utils/xrLC_Light/global_slots_data.h +++ b/src/utils/xrLC_Light/global_slots_data.h @@ -71,4 +71,4 @@ class global_slots_data void process_all_pallete(); }; -#endif //__GLOBAL_SLOTS_DATA_H__ \ No newline at end of file +#endif //__GLOBAL_SLOTS_DATA_H__ \ No newline at end of file diff --git a/src/utils/xrLC_Light/implicit_net_global_data.cpp b/src/utils/xrLC_Light/implicit_net_global_data.cpp index 65481b0e77e..07f86ec4b33 100644 --- a/src/utils/xrLC_Light/implicit_net_global_data.cpp +++ b/src/utils/xrLC_Light/implicit_net_global_data.cpp @@ -9,7 +9,7 @@ namespace lc_net { void net_global_data_impl::init() { - data_init(); // init as new data + data_init(); // init as new data } void net_global_data_impl::create_data_file(LPCSTR path) diff --git a/src/utils/xrLC_Light/lm_layer.cpp b/src/utils/xrLC_Light/lm_layer.cpp index 5c79012bba0..4c85845503c 100644 --- a/src/utils/xrLC_Light/lm_layer.cpp +++ b/src/utils/xrLC_Light/lm_layer.cpp @@ -20,7 +20,7 @@ void lm_layer::Pack(xr_vector& dest) const *W++ = color_rgba(_r, _g, _b, _d); } } -void lm_layer::Pack_hemi(xr_vector& dest) const //. +void lm_layer::Pack_hemi(xr_vector& dest) const //. { dest.resize(width * height); xr_vector::const_iterator I = surface.begin(); diff --git a/src/utils/xrLC_Light/net_cl_data_prepare.cpp b/src/utils/xrLC_Light/net_cl_data_prepare.cpp index cb5e89c4b40..aac11aac1f4 100644 --- a/src/utils/xrLC_Light/net_cl_data_prepare.cpp +++ b/src/utils/xrLC_Light/net_cl_data_prepare.cpp @@ -31,7 +31,7 @@ class NetCompileDetaPrepare : public CThread void RunNetCompileDataPrepare() { cl_data_prepare.start(new NetCompileDetaPrepare()); - SartupNetTaskManager(); //. + SartupNetTaskManager(); //. } void WaitNetCompileDataPrepare() @@ -47,7 +47,7 @@ void WaitNetCompileDataPrepare() if (inited) break; } } -void WaitNetBaseCompileDataPrepare() // to do refactoring +void WaitNetBaseCompileDataPrepare() // to do refactoring { for (;;) { diff --git a/src/utils/xrLC_Light/net_exec_pool.cpp b/src/utils/xrLC_Light/net_exec_pool.cpp index ecf0ad3a6e9..5a33c31812d 100644 --- a/src/utils/xrLC_Light/net_exec_pool.cpp +++ b/src/utils/xrLC_Light/net_exec_pool.cpp @@ -43,7 +43,7 @@ bool exec_pool::has(u32 id) void exec_pool::receive_result(IGenericStream* inStream) { - u32 id = u32(-1), type = u32(-1); // r.r_u32(); + u32 id = u32(-1), type = u32(-1); // r.r_u32(); read_task_caption(inStream, id, type); // xr_vector::iterator it =std::find( pool.begin(), pool.end(), id ); @@ -147,7 +147,7 @@ void exec_pool::send_task(IGridUser& user, IGenericStream* Stream, u8 pool_id, u R_ASSERT(has(id)); IGenericStream* outStream = CreateGenericStream(); ////////////////////////////////////////////////////// - write_task_pool(outStream, pool_id); //////////////////// + write_task_pool(outStream, pool_id); //////////////////// ////////////////////////////////////////////////////// cleanup().on_net_send(outStream); diff --git a/src/utils/xrLC_Light/net_execution_detail_light.h b/src/utils/xrLC_Light/net_execution_detail_light.h index f91f97f2f49..af812da1335 100644 --- a/src/utils/xrLC_Light/net_execution_detail_light.h +++ b/src/utils/xrLC_Light/net_execution_detail_light.h @@ -22,7 +22,7 @@ class tnet_execution_base::net_execution_impl public: net_execution_impl() : start(u32(-1)), end(-1) {} - void construct(u32 _x, u32 _z); // { start = _start;end = _end; } + void construct(u32 _x, u32 _z); // { start = _start;end = _end; } void send_task(IGenericStream* outStream); void receive_result(IGenericStream* outStream); bool receive_task(IAgent* agent, DWORD sessionId, IGenericStream* inStream); @@ -36,4 +36,4 @@ struct add_global // execution_lightmaps }; -#endif // #ifndef NET_EXECUTION_DETAIL_LIGHT_H_INCLUDED \ No newline at end of file +#endif // #ifndef NET_EXECUTION_DETAIL_LIGHT_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/net_execution_factory_register.cpp b/src/utils/xrLC_Light/net_execution_factory_register.cpp index 9fb4c644194..effeaf96550 100644 --- a/src/utils/xrLC_Light/net_execution_factory_register.cpp +++ b/src/utils/xrLC_Light/net_execution_factory_register.cpp @@ -87,7 +87,7 @@ class execution_type_creator : public base_execution_type_creator { return new execution(u32(-1)); // return pool.create() ; - return pool.create(); // spool::pool.create() ; + return pool.create(); // spool::pool.create() ; } virtual void pool_destroy(net_execution*& e) { diff --git a/src/utils/xrLC_Light/net_execution_globals.cpp b/src/utils/xrLC_Light/net_execution_globals.cpp index 4700eaec171..dc0f61ec6a5 100644 --- a/src/utils/xrLC_Light/net_execution_globals.cpp +++ b/src/utils/xrLC_Light/net_execution_globals.cpp @@ -69,7 +69,7 @@ struct list_glob static const e_net_globals next_ii = (e_net_globals)(i + 1); typedef list_glob next; next n; - add_enum remove; // + add_enum remove; // }; template diff --git a/src/utils/xrLC_Light/net_execution_mu_base.h b/src/utils/xrLC_Light/net_execution_mu_base.h index 29ebcb65d04..d75dc2490d7 100644 --- a/src/utils/xrLC_Light/net_execution_mu_base.h +++ b/src/utils/xrLC_Light/net_execution_mu_base.h @@ -33,4 +33,4 @@ struct add_global // execution_lightmaps }; -#endif // #ifndef NET_EXECUTION_MU_BASE_H_INCLUDED \ No newline at end of file +#endif // #ifndef NET_EXECUTION_MU_BASE_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/net_execution_vertex_light.cpp b/src/utils/xrLC_Light/net_execution_vertex_light.cpp index 9fef49bb0e7..1e2db3ce4be 100644 --- a/src/utils/xrLC_Light/net_execution_vertex_light.cpp +++ b/src/utils/xrLC_Light/net_execution_vertex_light.cpp @@ -94,11 +94,11 @@ bool net_execution_vertex_light::execute(net_task_callback& net_callback) (lc_global_data()->b_nosun() ? LP_dont_sun : 0) | LP_dont_hemi, 0); // vC._tmp_ = v_trans; //we olready have it in V->C.t vC.mul(.5f); - vC.hemi = old.hemi; // preserve pre-calculated hemisphere + vC.hemi = old.hemi; // preserve pre-calculated hemisphere V->C._set(vC.rgb, vC.hemi, vC.sun); } - return true; //! net_callback.break_all(); + return true; //! net_callback.break_all(); } void net_execution_vertex_light::construct(u32 _start, u32 _end) diff --git a/src/utils/xrLC_Light/net_execution_vertex_light.h b/src/utils/xrLC_Light/net_execution_vertex_light.h index dc41fbac380..92b79d7c478 100644 --- a/src/utils/xrLC_Light/net_execution_vertex_light.h +++ b/src/utils/xrLC_Light/net_execution_vertex_light.h @@ -22,7 +22,7 @@ class tnet_execution_base::net_execution_impl public: net_execution_impl() : start(u32(-1)), end(-1) {} - void construct(u32 _start, u32 _end); // { start = _start;end = _end; } + void construct(u32 _start, u32 _end); // { start = _start;end = _end; } void send_task(IGenericStream* outStream); void receive_result(IGenericStream* outStream); bool receive_task(IAgent* agent, DWORD sessionId, IGenericStream* inStream); @@ -44,4 +44,4 @@ struct add_global // //}; // class net_execution_vertex_light -#endif // #ifndef NET_EXECUTION_VERTEX_LIGHT_H_INCLUDED \ No newline at end of file +#endif // #ifndef NET_EXECUTION_VERTEX_LIGHT_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/net_stream.cpp b/src/utils/xrLC_Light/net_stream.cpp index db8a626a45f..2ec813e9c50 100644 --- a/src/utils/xrLC_Light/net_stream.cpp +++ b/src/utils/xrLC_Light/net_stream.cpp @@ -13,7 +13,7 @@ class XRLC_LIGHT_API INetFileBuffWriter : public INetBuffWriter fr->w_close(); }; - INetFileBuffWriter(LPCSTR _file_name, u32 block_size, bool _reopen); //:INetWriter(),file_name(file_name) + INetFileBuffWriter(LPCSTR _file_name, u32 block_size, bool _reopen); //:INetWriter(),file_name(file_name) virtual ~INetFileBuffWriter(); }; @@ -143,7 +143,7 @@ void INetBlockReader::load_buffer(LPCSTR fn) // mem_reader = new CReadMemoryBlock( fs->length() ); create_block(fs->length()); fs->r(mem_reader.pdata(), fs->length()); - FS.r_close(fs); // ->close(); + FS.r_close(fs); // ->close(); } } void INetMemoryBuffWriter::send_and_clear() @@ -363,12 +363,12 @@ void CFileWriteBlock::w_close() INetReaderFile::INetReaderFile(LPCSTR file_name) : file(0) { - file = fopen(file_name, "rb"); // FS.r_open( file_name ); + file = fopen(file_name, "rb"); // FS.r_open( file_name ); } INetReaderFile::~INetReaderFile() { - fclose(file); // FS.r_close( file ); + fclose(file); // FS.r_close( file ); } void INetReaderFile::r(void* p, int cnt) diff --git a/src/utils/xrLC_Light/net_task_manager.cpp b/src/utils/xrLC_Light/net_task_manager.cpp index 72757b26c43..a18afe42912 100644 --- a/src/utils/xrLC_Light/net_task_manager.cpp +++ b/src/utils/xrLC_Light/net_task_manager.cpp @@ -140,7 +140,7 @@ void __cdecl GetDataCallback(const char* dataDesc, IGenericStream** stream) time.Start(); // R_ASSERT(gl_data_write); - *stream = new CGenStreamOnFile(g_net_data); // CreateGenericStream(); + *stream = new CGenStreamOnFile(g_net_data); // CreateGenericStream(); //*stream = gl_data_write->net_stream(); // gl_data_write->send_not_clear(*stream); diff --git a/src/utils/xrLC_Light/recalculation.h b/src/utils/xrLC_Light/recalculation.h index 05242cb5c58..979fcd93fd0 100644 --- a/src/utils/xrLC_Light/recalculation.h +++ b/src/utils/xrLC_Light/recalculation.h @@ -20,7 +20,7 @@ class recalculation : dtH(_dtH), calculation_rect(Frect().invalidate()), recalculate(false), partial_calculate(false), force_recalculate(false), dtFS(0), slots_flags(0) { - } // + } // IC bool recalculating() const { return recalculate; } IC bool skip_slot(int x, int z) const { @@ -56,4 +56,4 @@ class recalculation void check_files(u32 check_sum); }; -#endif //__RECALCULATION_PARAMS_H__ \ No newline at end of file +#endif //__RECALCULATION_PARAMS_H__ \ No newline at end of file diff --git a/src/utils/xrLC_Light/serialize.h b/src/utils/xrLC_Light/serialize.h index 2f05dabb25a..fd4a9293ecd 100644 --- a/src/utils/xrLC_Light/serialize.h +++ b/src/utils/xrLC_Light/serialize.h @@ -128,7 +128,7 @@ class get_id_self_index } static u32 get_id(const type* f, const xr_vector& vec) { - if (f == 0) return id_none; //?? + if (f == 0) return id_none; //?? u32 idx = f->self_index(); VERIFY(vec[idx] == f); return idx; diff --git a/src/utils/xrLC_Light/vector_clear.h b/src/utils/xrLC_Light/vector_clear.h index 32c7d66f0b7..5cd94543d6e 100644 --- a/src/utils/xrLC_Light/vector_clear.h +++ b/src/utils/xrLC_Light/vector_clear.h @@ -21,4 +21,4 @@ void vec_clear(xr_vector& v, TDestruct& destruct) v.clear(); } -#endif // #ifndef VECTOR_CLEAR_H_INCLUDED \ No newline at end of file +#endif // #ifndef VECTOR_CLEAR_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/xrDeflectoL_Direct.cpp b/src/utils/xrLC_Light/xrDeflectoL_Direct.cpp index 3bcc5fc4975..45e85af3c5f 100644 --- a/src/utils/xrLC_Light/xrDeflectoL_Direct.cpp +++ b/src/utils/xrLC_Light/xrDeflectoL_Direct.cpp @@ -46,7 +46,7 @@ void CDeflector::L_Direct_Edge(CDB::COLLIDER* DB, base_lighting* LightsSelected, VERIFY(inlc_global_data()->RCAST_Model()); LightPoint(DB, inlc_global_data()->RCAST_Model(), C, P, N, *LightsSelected, - (inlc_global_data()->b_nosun() ? LP_dont_sun : 0) | LP_DEFAULT, skip); //. + (inlc_global_data()->b_nosun() ? LP_dont_sun : 0) | LP_DEFAULT, skip); //. C.mul(.5f); lm.surface[_y * lm.width + _x]._set(C); @@ -122,7 +122,7 @@ void CDeflector::L_Direct(CDB::COLLIDER* DB, base_lighting* LightsSelected, HASH VERIFY(inlc_global_data()); VERIFY(inlc_global_data()->RCAST_Model()); LightPoint(DB, inlc_global_data()->RCAST_Model(), C, wP, wN, *LightsSelected, - (inlc_global_data()->b_nosun() ? LP_dont_sun : 0) | LP_UseFaceDisable, F); //. + (inlc_global_data()->b_nosun() ? LP_dont_sun : 0) | LP_UseFaceDisable, F); //. Fcount += 1; } catch (...) @@ -147,7 +147,7 @@ void CDeflector::L_Direct(CDB::COLLIDER* DB, base_lighting* LightsSelected, HASH } else { - lm.surface[V * lm.width + U]._set(C); // 0-0-0-0-0 + lm.surface[V * lm.width + U]._set(C); // 0-0-0-0-0 lm.marker[V * lm.width + U] = 0; } } diff --git a/src/utils/xrLC_Light/xrDeflector.cpp b/src/utils/xrLC_Light/xrDeflector.cpp index a5a9ff8052e..cd6ef858fc3 100644 --- a/src/utils/xrLC_Light/xrDeflector.cpp +++ b/src/utils/xrLC_Light/xrDeflector.cpp @@ -178,7 +178,7 @@ void CDeflector::OA_Export() { UVtri* T = &*it; Face* F = T->owner; - Fvector P; // projected + Fvector P; // projected for (int i = 0; i < 3; i++) { diff --git a/src/utils/xrLC_Light/xrDeflector.h b/src/utils/xrLC_Light/xrDeflector.h index 6edea5993f2..5e42a5ba09d 100644 --- a/src/utils/xrLC_Light/xrDeflector.h +++ b/src/utils/xrLC_Light/xrDeflector.h @@ -106,7 +106,7 @@ extern XRLC_LIGHT_API void DumpDeflctor(const CDeflector& d); extern XRLC_LIGHT_API void DeflectorsStats(); extern XRLC_LIGHT_API void DumpDeflctor(u32 id); -static const u32 c_LMAP_size = 1024; // pixels +static const u32 c_LMAP_size = 1024; // pixels #define rms_zero ((4 + g_params().m_lm_rms_zero) / 2) #define rms_shrink ((8 + g_params().m_lm_rms) / 2) diff --git a/src/utils/xrLC_Light/xrDeflectorLight.cpp b/src/utils/xrLC_Light/xrDeflectorLight.cpp index 1783949a381..c77bd65eb55 100644 --- a/src/utils/xrLC_Light/xrDeflectorLight.cpp +++ b/src/utils/xrLC_Light/xrDeflectorLight.cpp @@ -648,7 +648,7 @@ BOOL __stdcall rms_test(lm_layer& lm, u32 w, u32 h, u32 rms) for (u32 y = 0; y < lm.height; y++) { u32 offset = y * lm.width; - u8* scan_mark = (u8*)&*(lm.marker.begin() + offset); //. + u8* scan_mark = (u8*)&*(lm.marker.begin() + offset); //. u32* scan_lmap_base = (u32*)&*(pOriginal_base.begin() + offset); u32* scan_rest_base = (u32*)&*(pRestored_base.begin() + offset); u32* scan_lmap_hemi = (u32*)&*(pOriginal_hemi.begin() + offset); @@ -727,7 +727,7 @@ BOOL compress_Zero(lm_layer& lm, u32 rms) _c.scale(_count); // Compress if needed - u8 _r = u8_clr(_c.rgb.x); //. + u8 _r = u8_clr(_c.rgb.x); //. u8 _g = u8_clr(_c.rgb.y); u8 _b = u8_clr(_c.rgb.z); u8 _s = u8_clr(_c.sun); @@ -821,7 +821,7 @@ void CDeflector::Light(CDB::COLLIDER* DB, base_lighting* LightsSelected, HASH& H { u32 w, h; if (compress_Zero(layer, rms_zero)) - return; // already with borders + return; // already with borders else if (compress_RMS(layer, rms_shrink, w, h)) { // Reacalculate lightmap at lower resolution diff --git a/src/utils/xrLC_Light/xrFace.cpp b/src/utils/xrLC_Light/xrFace.cpp index 840cfb109db..e9e8b3fd80e 100644 --- a/src/utils/xrLC_Light/xrFace.cpp +++ b/src/utils/xrLC_Light/xrFace.cpp @@ -6,7 +6,7 @@ #include "serialize.h" #include "xrLC_globaldata.h" #include "xrdeflector.h" -volatile u32 dwInvalidFaces; //= 0; +volatile u32 dwInvalidFaces; //= 0; u32 InvalideFaces() { return dwInvalidFaces; @@ -28,7 +28,7 @@ void base_Face::CacheOpacity() flags.bOpaque = false; else flags.bOpaque = true; - if (!flags.bOpaque && !(T.THM.HasSurface())) //(0==T.pSurface)// pSurface was possible deleted + if (!flags.bOpaque && !(T.THM.HasSurface())) //(0==T.pSurface)// pSurface was possible deleted { flags.bOpaque = true; Logger.clMsg("Strange face detected... Has alpha without texture..."); @@ -185,7 +185,7 @@ void Face::Verify() // 2nd :: TC0 Fvector2* tc = getTC0(); - float eps = .5f / 4096.f; // half pixel from 4096 texture (0.0001220703125) + float eps = .5f / 4096.f; // half pixel from 4096 texture (0.0001220703125) float e0 = tc[0].distance_to(tc[1]); float e1 = tc[1].distance_to(tc[2]); float e2 = tc[2].distance_to(tc[0]); diff --git a/src/utils/xrLC_Light/xrFace.h b/src/utils/xrLC_Light/xrFace.h index 5088a946950..c2f13bce64f 100644 --- a/src/utils/xrLC_Light/xrFace.h +++ b/src/utils/xrLC_Light/xrFace.h @@ -15,7 +15,7 @@ struct DataVertex; typedef Tvertex Vertex; typedef std::pair PAIR_VV; -typedef xr_map map_v2v; // vertex to vertex translation +typedef xr_map map_v2v; // vertex to vertex translation typedef map_v2v::iterator map_v2v_it; struct XRLC_LIGHT_API DataVertex : public base_Vertex @@ -39,11 +39,11 @@ struct XRLC_LIGHT_API DataFace : public base_Face { public: // Vertex* v[3]; // vertices - Fvector N; // face normal + Fvector N; // face normal - svector<_TCF, 2> tc; // TC + svector<_TCF, 2> tc; // TC - void* pDeflector; // does the face has LM-UV map? + void* pDeflector; // does the face has LM-UV map? CLightmap* lmap_layer; u32 sm_group; virtual Fvector2* getTC0() { return tc[0].uv; } @@ -69,7 +69,7 @@ class Edge; namespace detail { typedef xr_vector::iterator dummy_compiler_treatment; -} // namespace detail +} // namespace detail #include "xrUVpoint.h" diff --git a/src/utils/xrLC_Light/xrLC_GlobalData.cpp b/src/utils/xrLC_Light/xrLC_GlobalData.cpp index 31f92794ee4..48e7c4600b2 100644 --- a/src/utils/xrLC_Light/xrLC_GlobalData.cpp +++ b/src/utils/xrLC_Light/xrLC_GlobalData.cpp @@ -570,7 +570,7 @@ void mu_mesh_clear(); void xrLC_GlobalData::clear_mu_models() { Logger.clLog("mem usage before mu_clear %d", Memory.mem_usage()); - vec_clear(_mu_models); // not clear ogf + vec_clear(_mu_models); // not clear ogf vec_clear(_mu_refs); mu_mesh_clear(); Memory.mem_compact(); @@ -587,7 +587,7 @@ void xrLC_GlobalData::clear() close_models_write(); vec_clear(_g_lightmaps); - vec_clear(_mu_models); // mem leak + vec_clear(_mu_models); // mem leak vec_clear(_mu_refs); mu_mesh_clear(); gl_mesh_clear(); diff --git a/src/utils/xrLC_Light/xrLC_GlobalData.h b/src/utils/xrLC_Light/xrLC_GlobalData.h index 44ac50cfd69..33b8ee75d76 100644 --- a/src/utils/xrLC_Light/xrLC_GlobalData.h +++ b/src/utils/xrLC_Light/xrLC_GlobalData.h @@ -52,7 +52,7 @@ class XRLC_LIGHT_API xrLC_GlobalData public: public: - xrLC_GlobalData(); //:_RCAST_Model (0), _b_nosun(false),_gl_linear(false){} + xrLC_GlobalData(); //:_RCAST_Model (0), _b_nosun(false),_gl_linear(false){} ~xrLC_GlobalData(); IC xr_vector& textures() { return _cl_globs._textures; } IC xr_vector& lightmaps() { return _g_lightmaps; } diff --git a/src/utils/xrLC_Light/xrLightDoNet.h b/src/utils/xrLC_Light/xrLightDoNet.h index 8aa654e3976..11b20e538a8 100644 --- a/src/utils/xrLC_Light/xrLightDoNet.h +++ b/src/utils/xrLC_Light/xrLightDoNet.h @@ -10,4 +10,4 @@ namespace lc_net { void xrNetDOLight(); } -#endif // #ifndef XRLIGHTDONET_H_INCLUDED \ No newline at end of file +#endif // #ifndef XRLIGHTDONET_H_INCLUDED \ No newline at end of file diff --git a/src/utils/xrLC_Light/xrLightVertex.cpp b/src/utils/xrLC_Light/xrLightVertex.cpp index a57a450969c..9fedb891d64 100644 --- a/src/utils/xrLC_Light/xrLightVertex.cpp +++ b/src/utils/xrLC_Light/xrLightVertex.cpp @@ -13,7 +13,7 @@ mapVert* g_trans; Lock g_trans_CS #ifdef CONFIG_PROFILE_LOCKS (MUTEX_PROFILE_ID(g_trans_CS)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ; extern XRLC_LIGHT_API void LightPoint(CDB::COLLIDER* DB, CDB::MODEL* MDL, base_color_c& C, Fvector& P, Fvector& N, base_lighting& lights, u32 flags, Face* skip); @@ -74,7 +74,7 @@ class CVertexLightTasker #ifdef CONFIG_PROFILE_LOCKS , cs(MUTEX_PROFILE_ID(CVertexLightTasker)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS {}; void init() { index = 0; } @@ -136,7 +136,7 @@ class CVertexLightThread : public CThread (lc_global_data()->b_nosun() ? LP_dont_sun : 0) | LP_dont_hemi, 0); vC._tmp_ = v_trans; vC.mul(.5f); - vC.hemi = old.hemi; // preserve pre-calculated hemisphere + vC.hemi = old.hemi; // preserve pre-calculated hemisphere V->C._set(vC); g_trans_register(V); diff --git a/src/utils/xrLC_Light/xrLight_Implicit.cpp b/src/utils/xrLC_Light/xrLight_Implicit.cpp index bcdad0aed69..f18fad00a45 100644 --- a/src/utils/xrLC_Light/xrLight_Implicit.cpp +++ b/src/utils/xrLC_Light/xrLight_Implicit.cpp @@ -121,7 +121,7 @@ void ImplicitExecute::Execute(net_task_callback* net_callback) } catch (...) { - Logger.clMsg("* THREAD #%d: Access violation. Possibly recovered."); //,thID + Logger.clMsg("* THREAD #%d: Access violation. Possibly recovered."); //,thID } if (Fcount) { // Calculate lighting amount diff --git a/src/utils/xrLC_Light/xrLight_ImplicitCalcGlobs.cpp b/src/utils/xrLC_Light/xrLight_ImplicitCalcGlobs.cpp index ca849ede177..9cecf6537f3 100644 --- a/src/utils/xrLC_Light/xrLight_ImplicitCalcGlobs.cpp +++ b/src/utils/xrLC_Light/xrLight_ImplicitCalcGlobs.cpp @@ -52,7 +52,7 @@ void ImplicitCalcGlobs::Initialize(ImplicitDeflector& d) for (u32 fid = 0; fid < defl->faces.size(); fid++) { Face* F = defl->faces[fid]; - F->AddChannel(F->tc[0].uv[0], F->tc[0].uv[1], F->tc[0].uv[2]); // make compatible format with LMAPs + F->AddChannel(F->tc[0].uv[0], F->tc[0].uv[1], F->tc[0].uv[2]); // make compatible format with LMAPs defl->Bounds(fid, bounds); ImplicitHash->add(bounds, F); } diff --git a/src/utils/xrLC_Light/xrMU_Model_export_cform_rcast.cpp b/src/utils/xrLC_Light/xrMU_Model_export_cform_rcast.cpp index 75e53fea2a8..cacbe3eeacc 100644 --- a/src/utils/xrLC_Light/xrMU_Model_export_cform_rcast.cpp +++ b/src/utils/xrLC_Light/xrMU_Model_export_cform_rcast.cpp @@ -49,7 +49,7 @@ void xrMU_Model::export_cform_rcast(CDB::CollectorPacked& CL, Fmatrix& xform) xform.transform_tiny(P[0], F->v[0]->P); xform.transform_tiny(P[1], F->v[1]->P); xform.transform_tiny(P[2], F->v[2]->P); - CL.add_face_D(P[0], P[1], P[2], *((u32*)&F), F->sm_group); // + CL.add_face_D(P[0], P[1], P[2], *((u32*)&F), F->sm_group); // } } } diff --git a/src/utils/xrQSlim/src/MxBlock.h b/src/utils/xrQSlim/src/MxBlock.h index 8c287cbad87..37c38d76fef 100644 --- a/src/utils/xrQSlim/src/MxBlock.h +++ b/src/utils/xrQSlim/src/MxBlock.h @@ -1,4 +1,4 @@ -#ifndef MXBLOCK_INCLUDED // -*- C++ -*- +#ifndef MXBLOCK_INCLUDED // -*- C++ -*- #define MXBLOCK_INCLUDED #if !defined(__GNUC__) #pragma once @@ -106,11 +106,11 @@ class MxBlock // Primitive methods for altering the data block // void resize(int n) { resize_block(n); } - void bitcopy(const T* a, int n) // copy bits directly + void bitcopy(const T* a, int n) // copy bits directly { CopyMemory(block, a, _min(n, N) * sizeof(T)); } - void copy(const T* a, const int n) // copy using assignment operator + void copy(const T* a, const int n) // copy using assignment operator { for (int i = 0; i < _min(n, N); i++) block[i] = a[i]; diff --git a/src/utils/xrQSlim/src/MxBlock2.h b/src/utils/xrQSlim/src/MxBlock2.h index d5415cc9e93..50f1a3fd2c2 100644 --- a/src/utils/xrQSlim/src/MxBlock2.h +++ b/src/utils/xrQSlim/src/MxBlock2.h @@ -1,4 +1,4 @@ -#ifndef MXBLOCK2_INCLUDED // -*- C++ -*- +#ifndef MXBLOCK2_INCLUDED // -*- C++ -*- #define MXBLOCK2_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxBlockModel.h b/src/utils/xrQSlim/src/MxBlockModel.h index 4ca83ca09fc..2024abe8e38 100644 --- a/src/utils/xrQSlim/src/MxBlockModel.h +++ b/src/utils/xrQSlim/src/MxBlockModel.h @@ -1,4 +1,4 @@ -#ifndef MXBLOCKMODEL_INCLUDED // -*- C++ -*- +#ifndef MXBLOCKMODEL_INCLUDED // -*- C++ -*- #define MXBLOCKMODEL_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxDynBlock.h b/src/utils/xrQSlim/src/MxDynBlock.h index 218779df59a..a5472558508 100644 --- a/src/utils/xrQSlim/src/MxDynBlock.h +++ b/src/utils/xrQSlim/src/MxDynBlock.h @@ -1,4 +1,4 @@ -#ifndef MXDYNBLOCK_INCLUDED // -*- C++ -*- +#ifndef MXDYNBLOCK_INCLUDED // -*- C++ -*- #define MXDYNBLOCK_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxGeoPrims.h b/src/utils/xrQSlim/src/MxGeoPrims.h index 2c15a46d456..ad68efb326b 100644 --- a/src/utils/xrQSlim/src/MxGeoPrims.h +++ b/src/utils/xrQSlim/src/MxGeoPrims.h @@ -1,4 +1,4 @@ -#ifndef MXGEOPRIMS_INCLUDED // -*- C++ -*- +#ifndef MXGEOPRIMS_INCLUDED // -*- C++ -*- #define MXGEOPRIMS_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxGeom3D.h b/src/utils/xrQSlim/src/MxGeom3D.h index 47c0d486957..237c4585fe6 100644 --- a/src/utils/xrQSlim/src/MxGeom3D.h +++ b/src/utils/xrQSlim/src/MxGeom3D.h @@ -1,4 +1,4 @@ -#ifndef MXGEOM3D_INCLUDED // -*- C++ -*- +#ifndef MXGEOM3D_INCLUDED // -*- C++ -*- #define MXGEOM3D_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxHeap.cpp b/src/utils/xrQSlim/src/MxHeap.cpp index 8198331dca1..30654f2da93 100644 --- a/src/utils/xrQSlim/src/MxHeap.cpp +++ b/src/utils/xrQSlim/src/MxHeap.cpp @@ -107,7 +107,7 @@ void MxHeap::update(MxHeapable* t, float v) MxHeapable* MxHeap::extract() { - if (length() < 1) return 0; // NULL; + if (length() < 1) return 0; // NULL; swap(0, length() - 1); MxHeapable* dead = drop(); @@ -119,7 +119,7 @@ MxHeapable* MxHeap::extract() MxHeapable* MxHeap::remove(MxHeapable* t) { - if (!t->is_in_heap()) return 0; // NULL; + if (!t->is_in_heap()) return 0; // NULL; int i = t->get_heap_pos(); swap(i, length() - 1); diff --git a/src/utils/xrQSlim/src/MxHeap.h b/src/utils/xrQSlim/src/MxHeap.h index 467c5fdb8db..758c1338d2f 100644 --- a/src/utils/xrQSlim/src/MxHeap.h +++ b/src/utils/xrQSlim/src/MxHeap.h @@ -1,4 +1,4 @@ -#ifndef MXHEAP_INCLUDED // -*- C++ -*- +#ifndef MXHEAP_INCLUDED // -*- C++ -*- #define MXHEAP_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxMat2.h b/src/utils/xrQSlim/src/MxMat2.h index 484e7c8325a..0f5dc91656d 100644 --- a/src/utils/xrQSlim/src/MxMat2.h +++ b/src/utils/xrQSlim/src/MxMat2.h @@ -1,4 +1,4 @@ -#ifndef MXMAT2_INCLUDED // -*- C++ -*- +#ifndef MXMAT2_INCLUDED // -*- C++ -*- #define MXMAT2_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxMat3.h b/src/utils/xrQSlim/src/MxMat3.h index dfaa3383fe5..9eda8c260f4 100644 --- a/src/utils/xrQSlim/src/MxMat3.h +++ b/src/utils/xrQSlim/src/MxMat3.h @@ -1,4 +1,4 @@ -#ifndef MXMAT3_INCLUDED // -*- C++ -*- +#ifndef MXMAT3_INCLUDED // -*- C++ -*- #define MXMAT3_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxMat4.h b/src/utils/xrQSlim/src/MxMat4.h index 35a8840afbf..f2d7f1770a5 100644 --- a/src/utils/xrQSlim/src/MxMat4.h +++ b/src/utils/xrQSlim/src/MxMat4.h @@ -1,4 +1,4 @@ -#ifndef MXMAT4_INCLUDED // -*- C++ -*- +#ifndef MXMAT4_INCLUDED // -*- C++ -*- #define MXMAT4_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxMatrix.h b/src/utils/xrQSlim/src/MxMatrix.h index f53a7e90010..cdb6571d016 100644 --- a/src/utils/xrQSlim/src/MxMatrix.h +++ b/src/utils/xrQSlim/src/MxMatrix.h @@ -1,4 +1,4 @@ -#ifndef MXMATRIX_INCLUDED // -*- C++ -*- +#ifndef MXMATRIX_INCLUDED // -*- C++ -*- #define MXMATRIX_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxPropSlim.cpp b/src/utils/xrQSlim/src/MxPropSlim.cpp index bb634fb10fd..b3c6305946a 100644 --- a/src/utils/xrQSlim/src/MxPropSlim.cpp +++ b/src/utils/xrQSlim/src/MxPropSlim.cpp @@ -303,12 +303,12 @@ unsigned int MxPropSlim::check_local_validity(unsigned int v, const float* vnew) unsigned int y = f[(k + 2) % 3]; float d_yx[3], d_vx[3], d_vnew[3], f_n[3], n[3]; - mxv_sub(d_yx, m->vertex(y), m->vertex(x), 3); // d_yx = y-x - mxv_sub(d_vx, m->vertex(v), m->vertex(x), 3); // d_vx = v-x - mxv_sub(d_vnew, vnew, m->vertex(x), 3); // d_vnew = vnew-x + mxv_sub(d_yx, m->vertex(y), m->vertex(x), 3); // d_yx = y-x + mxv_sub(d_vx, m->vertex(v), m->vertex(x), 3); // d_vx = v-x + mxv_sub(d_vnew, vnew, m->vertex(x), 3); // d_vnew = vnew-x mxv_cross3(f_n, d_yx, d_vx); - mxv_cross3(n, f_n, d_yx); // n = ((y-x)^(v-x))^(y-x) + mxv_cross3(n, f_n, d_yx); // n = ((y-x)^(v-x))^(y-x) mxv_unitize(n, 3); // assert( mxv_dot(d_vx, n, 3) > -FEQ_EPS ); @@ -572,7 +572,7 @@ void MxPropSlim::collect_edges() m->collect_vertex_star(i, star); for (unsigned int j = 0; j < (unsigned int)star.length(); j++) - if (i < star(j)) // Only add particular edge once + if (i < star(j)) // Only add particular edge once create_edge(i, star(j)); } } @@ -645,7 +645,7 @@ void MxPropSlim::update_pre_contract(const MxPairContraction& conx) VERIFY(found); edge_links(u).remove(j); heap.remove(e); - if (u != v1) xr_delete(e); // (v1,v2) will be deleted later + if (u != v1) xr_delete(e); // (v1,v2) will be deleted later } else { diff --git a/src/utils/xrQSlim/src/MxPropSlim.h b/src/utils/xrQSlim/src/MxPropSlim.h index d26f95bca11..e68fc62b5ab 100644 --- a/src/utils/xrQSlim/src/MxPropSlim.h +++ b/src/utils/xrQSlim/src/MxPropSlim.h @@ -1,4 +1,4 @@ -#ifndef MXPROPSLIM_INCLUDED // -*- C++ -*- +#ifndef MXPROPSLIM_INCLUDED // -*- C++ -*- #define MXPROPSLIM_INCLUDED #if !defined(__GNUC__) #pragma once @@ -35,8 +35,8 @@ class MxPropSlim : public MxStdSlim edge_info(unsigned int D) : target(D) {} }; typedef MxSizedDynBlock edge_list; - MxBlock edge_links; // 1 per vertex - MxBlock __quadrics; // 1 per vertex + MxBlock edge_links; // 1 per vertex + MxBlock __quadrics; // 1 per vertex // // Temporary variables used by methods diff --git a/src/utils/xrQSlim/src/MxQMetric.cpp b/src/utils/xrQSlim/src/MxQMetric.cpp index c69f9837433..29b3b031375 100644 --- a/src/utils/xrQSlim/src/MxQMetric.cpp +++ b/src/utils/xrQSlim/src/MxQMetric.cpp @@ -25,13 +25,13 @@ MxQuadric::MxQuadric(const MxVector& p1, const MxVector& p2, const MxVector& p3, MxVector e1 = p2; e1 -= p1; - unitize(e1); // e1 = p2-p1; unitize + unitize(e1); // e1 = p2-p1; unitize MxVector e2 = p3; - e2 -= p1; // e2 = p3-p1 + e2 -= p1; // e2 = p3-p1 MxVector t = e1; t *= e1 * e2; e2 -= t; - unitize(e2); // e2 = p3-p1-e1*(e1*(p3-p1)); unitize + unitize(e2); // e2 = p3-p1-e1*(e1*(p3-p1)); unitize double p1e1 = p1 * e1; double p1e2 = p1 * e2; diff --git a/src/utils/xrQSlim/src/MxQMetric.h b/src/utils/xrQSlim/src/MxQMetric.h index 1cd96e02c05..16d7a407e34 100644 --- a/src/utils/xrQSlim/src/MxQMetric.h +++ b/src/utils/xrQSlim/src/MxQMetric.h @@ -1,4 +1,4 @@ -#ifndef MXQMETRIC_INCLUDED // -*- C++ -*- +#ifndef MXQMETRIC_INCLUDED // -*- C++ -*- #define MXQMETRIC_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxQMetric3.cpp b/src/utils/xrQSlim/src/MxQMetric3.cpp index d791df66e11..74ca7c898ba 100644 --- a/src/utils/xrQSlim/src/MxQMetric3.cpp +++ b/src/utils/xrQSlim/src/MxQMetric3.cpp @@ -77,11 +77,11 @@ void MxQuadric3::point_constraint(const float* p) // of any point v to the given point p. a2 = b2 = c2 = 1.0; - ab = ac = bc = 0.0; // A = I + ab = ac = bc = 0.0; // A = I ad = -p[0]; bd = -p[1]; - cd = -p[2]; // b = -p - d2 = p[0] * p[0] + p[1] * p[1] + p[2] * p[2]; // c = p*p + cd = -p[2]; // b = -p + d2 = p[0] * p[0] + p[1] * p[1] + p[2] * p[2]; // c = p*p } MxQuadric3& MxQuadric3::operator=(const MxQuadric3& Q) diff --git a/src/utils/xrQSlim/src/MxQMetric3.h b/src/utils/xrQSlim/src/MxQMetric3.h index 3e425fcd8ee..e6551ce44c8 100644 --- a/src/utils/xrQSlim/src/MxQMetric3.h +++ b/src/utils/xrQSlim/src/MxQMetric3.h @@ -1,4 +1,4 @@ -#ifndef MXQMETRIC3_INCLUDED // -*- C++ -*- +#ifndef MXQMETRIC3_INCLUDED // -*- C++ -*- #define MXQMETRIC3_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxQSlim.cpp b/src/utils/xrQSlim/src/MxQSlim.cpp index e91a7a78f70..a092e1a2fd1 100644 --- a/src/utils/xrQSlim/src/MxQSlim.cpp +++ b/src/utils/xrQSlim/src/MxQSlim.cpp @@ -216,12 +216,12 @@ unsigned int MxEdgeQSlim::check_local_validity(unsigned int v1, unsigned int /*v unsigned int y = f[(k + 2) % 3]; float d_yx[3], d_vx[3], d_vnew[3], f_n[3], n[3]; - mxv_sub(d_yx, m->vertex(y), m->vertex(x), 3); // d_yx = y-x - mxv_sub(d_vx, m->vertex(v1), m->vertex(x), 3); // d_vx = v-x - mxv_sub(d_vnew, vnew, m->vertex(x), 3); // d_vnew = vnew-x + mxv_sub(d_yx, m->vertex(y), m->vertex(x), 3); // d_yx = y-x + mxv_sub(d_vx, m->vertex(v1), m->vertex(x), 3); // d_vx = v-x + mxv_sub(d_vnew, vnew, m->vertex(x), 3); // d_vnew = vnew-x mxv_cross3(f_n, d_yx, d_vx); - mxv_cross3(n, f_n, d_yx); // n = ((y-x)^(v-x))^(y-x) + mxv_cross3(n, f_n, d_yx); // n = ((y-x)^(v-x))^(y-x) mxv_unitize(n, 3); // assert( mxv_dot(d_vx, n, 3) > -FEQ_EPS ); @@ -432,7 +432,7 @@ void MxEdgeQSlim::collect_edges() m->collect_vertex_star(i, star); for (unsigned int j = 0; j < (unsigned int)star.length(); j++) - if (i < star(j)) // Only add particular edge once + if (i < star(j)) // Only add particular edge once create_edge(i, star(j)); } } @@ -472,7 +472,7 @@ void MxEdgeQSlim::update_pre_contract(const MxPairContraction& conx) VERIFY(found); edge_links(u).remove(j); heap.remove(e); - if (u != v1) xr_delete(e); // (v1,v2) will be deleted later + if (u != v1) xr_delete(e); // (v1,v2) will be deleted later } else { @@ -724,7 +724,7 @@ bool MxFaceQSlim::decimate(unsigned int target, float max_error, void* cb_params // Perform the actual contractions m->contract(v1, v2, v3, info->vnew, changed); - quadrics(v1) += quadrics(v2); // update quadric of v1 + quadrics(v1) += quadrics(v2); // update quadric of v1 quadrics(v1) += quadrics(v3); // diff --git a/src/utils/xrQSlim/src/MxQSlim.h b/src/utils/xrQSlim/src/MxQSlim.h index f5b3131ba7d..45fdb6fe902 100644 --- a/src/utils/xrQSlim/src/MxQSlim.h +++ b/src/utils/xrQSlim/src/MxQSlim.h @@ -1,4 +1,4 @@ -#ifndef MXQSLIM_INCLUDED // -*- C++ -*- +#ifndef MXQSLIM_INCLUDED // -*- C++ -*- #define MXQSLIM_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxStdModel.cpp b/src/utils/xrQSlim/src/MxStdModel.cpp index 9265d038250..f2e15cb3e4a 100644 --- a/src/utils/xrQSlim/src/MxStdModel.cpp +++ b/src/utils/xrQSlim/src/MxStdModel.cpp @@ -178,7 +178,7 @@ void MxStdModel::collect_vertex_star(unsigned int v, MxVertexList& verts) const MxFaceList& N = neighbors(v); mark_corners(N, 0); - vmark(v, 1); // Don't want to include v in the star + vmark(v, 1); // Don't want to include v in the star collect_unmarked_corners(N, verts); } @@ -282,7 +282,7 @@ void MxStdModel::remap_vertex(unsigned int from, unsigned int to) collect_unmarked_neighbors(from, neighbors(to)); vertex_mark_invalid(from); - neighbors(from).reset(); // remove links in old vertex + neighbors(from).reset(); // remove links in old vertex } unsigned int MxStdModel::split_edge(unsigned int a, unsigned int b) @@ -598,7 +598,7 @@ void MxStdModel::compute_contraction(MxFaceID fid, MxFaceContraction* conx) mark_neighborhood_delta(f[1], +1); mark_neighborhood_delta(f[2], +1); - fmark(fid, 0); // don't include f in dead_faces + fmark(fid, 0); // don't include f in dead_faces partition_marked_neighbors(f[0], 2, conx->delta_faces, conx->dead_faces); partition_marked_neighbors(f[1], 2, conx->delta_faces, conx->dead_faces); @@ -685,7 +685,7 @@ MxVertexID& MxStdModel::vertex_proxy_parent(MxVertexID v) MxVertexID MxStdModel::add_proxy_vertex(MxVertexID parent) { - MxVertexID v = alloc_vertex(0, 0, 0); // position will be ignored + MxVertexID v = alloc_vertex(0, 0, 0); // position will be ignored vertex_mark_proxy(v); vertex_proxy_parent(v) = parent; diff --git a/src/utils/xrQSlim/src/MxStdModel.h b/src/utils/xrQSlim/src/MxStdModel.h index ad2c0d848c1..67c8c8a4ced 100644 --- a/src/utils/xrQSlim/src/MxStdModel.h +++ b/src/utils/xrQSlim/src/MxStdModel.h @@ -1,4 +1,4 @@ -#ifndef MXSTDMODEL_INCLUDED // -*- C++ -*- +#ifndef MXSTDMODEL_INCLUDED // -*- C++ -*- #define MXSTDMODEL_INCLUDED #if !defined(__GNUC__) #pragma once @@ -28,7 +28,7 @@ class MxPairContraction MxPairContraction& operator=(const MxPairContraction& c); MxVertexID v1, v2; - float dv1[3], dv2[3]; // dv2 is not really necessary + float dv1[3], dv2[3]; // dv2 is not really necessary unsigned int delta_pivot; MxFaceList delta_faces; @@ -58,13 +58,13 @@ class MxStdModel : public MxBlockModel private: struct vertex_data { - unsigned char mark, tag; // Internal tag bits - unsigned char user_mark, user_tag; // External tag bits + unsigned char mark, tag; // Internal tag bits + unsigned char user_mark, user_tag; // External tag bits }; struct face_data { - unsigned char mark, tag; // Internal tag bits - unsigned char user_mark, user_tag; // External tag bits + unsigned char mark, tag; // Internal tag bits + unsigned char user_mark, user_tag; // External tag bits }; MxDynBlock v_data; diff --git a/src/utils/xrQSlim/src/MxStdSlim.h b/src/utils/xrQSlim/src/MxStdSlim.h index c3d8bf8530b..b51d0d70e0c 100644 --- a/src/utils/xrQSlim/src/MxStdSlim.h +++ b/src/utils/xrQSlim/src/MxStdSlim.h @@ -1,4 +1,4 @@ -#ifndef MXSTDSLIM_INCLUDED // -*- C++ -*- +#ifndef MXSTDSLIM_INCLUDED // -*- C++ -*- #define MXSTDSLIM_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxVec3.h b/src/utils/xrQSlim/src/MxVec3.h index 395d7e0f280..1b2ef9e7b08 100644 --- a/src/utils/xrQSlim/src/MxVec3.h +++ b/src/utils/xrQSlim/src/MxVec3.h @@ -1,4 +1,4 @@ -#ifndef MXVEC3_INCLUDED // -*- C++ -*- +#ifndef MXVEC3_INCLUDED // -*- C++ -*- #define MXVEC3_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxVec4.h b/src/utils/xrQSlim/src/MxVec4.h index 83f08b1c1ab..957190e71bc 100644 --- a/src/utils/xrQSlim/src/MxVec4.h +++ b/src/utils/xrQSlim/src/MxVec4.h @@ -1,4 +1,4 @@ -#ifndef MXVEC4_INCLUDED // -*- C++ -*- +#ifndef MXVEC4_INCLUDED // -*- C++ -*- #define MXVEC4_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/MxVector.h b/src/utils/xrQSlim/src/MxVector.h index b6c8c7cc34b..e0ed7dc6741 100644 --- a/src/utils/xrQSlim/src/MxVector.h +++ b/src/utils/xrQSlim/src/MxVector.h @@ -1,4 +1,4 @@ -#ifndef MXVECTOR_INCLUDED // -*- C++ -*- +#ifndef MXVECTOR_INCLUDED // -*- C++ -*- #define MXVECTOR_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/mat2.h b/src/utils/xrQSlim/src/mat2.h index 086ab09a9db..1874a0ba2dc 100644 --- a/src/utils/xrQSlim/src/mat2.h +++ b/src/utils/xrQSlim/src/mat2.h @@ -1,4 +1,4 @@ -#ifndef GFXMAT2_INCLUDED // -*- C++ -*- +#ifndef GFXMAT2_INCLUDED // -*- C++ -*- #define GFXMAT2_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/mat3.h b/src/utils/xrQSlim/src/mat3.h index a7a6e12917c..78bcb837ab5 100644 --- a/src/utils/xrQSlim/src/mat3.h +++ b/src/utils/xrQSlim/src/mat3.h @@ -1,4 +1,4 @@ -#ifndef GFXMAT3_INCLUDED // -*- C++ -*- +#ifndef GFXMAT3_INCLUDED // -*- C++ -*- #define GFXMAT3_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/mat4.h b/src/utils/xrQSlim/src/mat4.h index 51d7967dde3..a20221fe23d 100644 --- a/src/utils/xrQSlim/src/mat4.h +++ b/src/utils/xrQSlim/src/mat4.h @@ -1,4 +1,4 @@ -#ifndef GFXMAT4_INCLUDED // -*- C++ -*- +#ifndef GFXMAT4_INCLUDED // -*- C++ -*- #define GFXMAT4_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/mixmops.h b/src/utils/xrQSlim/src/mixmops.h index d26117c0161..b2d01de532a 100644 --- a/src/utils/xrQSlim/src/mixmops.h +++ b/src/utils/xrQSlim/src/mixmops.h @@ -1,6 +1,6 @@ -#ifndef MIXMOPS_INCLUDED // -*- C++ -*- -#define MIXMOPS_INCLUDED // -#endif // WARNING: Multiple inclusions allowed +#ifndef MIXMOPS_INCLUDED // -*- C++ -*- +#define MIXMOPS_INCLUDED // +#endif // WARNING: Multiple inclusions allowed /************************************************************************ diff --git a/src/utils/xrQSlim/src/mixvops.h b/src/utils/xrQSlim/src/mixvops.h index 97650dce27b..eab5c48b4f8 100644 --- a/src/utils/xrQSlim/src/mixvops.h +++ b/src/utils/xrQSlim/src/mixvops.h @@ -1,6 +1,6 @@ -#ifndef MIXVOPS_INCLUDED // -*- C++ -*- -#define MIXVOPS_INCLUDED // -#endif // WARNING: Multiple inclusions allowed +#ifndef MIXVOPS_INCLUDED // -*- C++ -*- +#define MIXVOPS_INCLUDED // +#endif // WARNING: Multiple inclusions allowed /************************************************************************ diff --git a/src/utils/xrQSlim/src/stdafx.h b/src/utils/xrQSlim/src/stdafx.h index c73a8e743dc..c8e77d27872 100644 --- a/src/utils/xrQSlim/src/stdafx.h +++ b/src/utils/xrQSlim/src/stdafx.h @@ -1,4 +1,4 @@ -#ifndef STDMIX_INCLUDED // -*- C++ -*- +#ifndef STDMIX_INCLUDED // -*- C++ -*- #define STDMIX_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/vec2.h b/src/utils/xrQSlim/src/vec2.h index e5f4769b75c..fd3d36e7dcd 100644 --- a/src/utils/xrQSlim/src/vec2.h +++ b/src/utils/xrQSlim/src/vec2.h @@ -1,4 +1,4 @@ -#ifndef GFXVEC2_INCLUDED // -*- C++ -*- +#ifndef GFXVEC2_INCLUDED // -*- C++ -*- #define GFXVEC2_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/vec3.h b/src/utils/xrQSlim/src/vec3.h index a1f7d14cae5..d92f23cfa8a 100644 --- a/src/utils/xrQSlim/src/vec3.h +++ b/src/utils/xrQSlim/src/vec3.h @@ -1,4 +1,4 @@ -#ifndef GFXVEC3_INCLUDED // -*- C++ -*- +#ifndef GFXVEC3_INCLUDED // -*- C++ -*- #define GFXVEC3_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrQSlim/src/vec4.h b/src/utils/xrQSlim/src/vec4.h index b8b968200ed..07f88e2946e 100644 --- a/src/utils/xrQSlim/src/vec4.h +++ b/src/utils/xrQSlim/src/vec4.h @@ -1,4 +1,4 @@ -#ifndef GFXVEC4_INCLUDED // -*- C++ -*- +#ifndef GFXVEC4_INCLUDED // -*- C++ -*- #define GFXVEC4_INCLUDED #if !defined(__GNUC__) #pragma once diff --git a/src/utils/xrSE_Factory/properties_list_helper_script.cpp b/src/utils/xrSE_Factory/properties_list_helper_script.cpp index d8e3d2db0ca..6e42c0ad57e 100644 --- a/src/utils/xrSE_Factory/properties_list_helper_script.cpp +++ b/src/utils/xrSE_Factory/properties_list_helper_script.cpp @@ -63,246 +63,222 @@ CScriptPropertiesListHelper* properties_helper() return (g_property_list_helper); } -SCRIPT_EXPORT( - CScriptPropertiesListHelper, (), { - module(luaState)[class_("prop_value"), class_("prop_item_vec"), - class_("caption_value"), class_("canvas_value"), - class_("button_value"), class_("choose_value"), class_("s8_value"), - class_("s16_value"), class_("s32_value"), class_("u8_value"), - class_("u16_value"), class_("u32_value"), class_("u32_value"), - class_("bool_value"), class_("vector_value"), class_("color_value"), - class_("text_value"), class_("flag8_value"), class_("flag16_value"), - class_("flag32_value"), class_("token8_value"), - class_("token16_value"), class_("token32_value"), - // class_("rtoken8_value"), - // class_("rtoken16_value"), - // class_("rtoken32_value"), - class_("list_value"), - - class_("choose_type") - .enum_("choose_type")[value("custom", int(smCustom)), value("sound_source", int(smSoundSource)), - value("sound_environment", int(smSoundEnv)), value("library_object", int(smObject)), - value("engine_shader", int(smEShader)), value("compiler_shader", int(smCShader)), - value("particle_effect", int(smPE)), value("particle_system", int(smParticles)), - value("texture", int(smTexture)), value("entity", int(smEntityType)), - value("spawn_item", int(smSpawnItem)), value("light_animation", int(smLAnim)), - value("visual", int(smVisual)), value("skeleton_animations", int(smSkeletonAnims)), - value("skeleton_bones", int(smSkeletonBones)), value("material", int(smGameMaterial)), - value("game_animation", int(smGameAnim)), value("game_motion", int(smGameSMotions))], - - class_("properties_list_helper") - .def("vector_on_after_edit", &CScriptPropertiesListHelper::FvectorRDOnAfterEdit) - .def("vector_on_before_edit", &CScriptPropertiesListHelper::FvectorRDOnBeforeEdit) - // .def("vector_on_draw", &CScriptPropertiesListHelper::FvectorRDOnDraw) - .def("float_on_after_edit", &CScriptPropertiesListHelper::floatRDOnAfterEdit) - .def("float_on_before_edit", &CScriptPropertiesListHelper::floatRDOnBeforeEdit) - // .def("float_on_draw", &CScriptPropertiesListHelper::floatRDOnDraw) - .def("name_after_edit", &CScriptPropertiesListHelper::NameAfterEdit) - .def("name_before_edit", &CScriptPropertiesListHelper::NameBeforeEdit) - // .def("name_on_draw", &CScriptPropertiesListHelper::NameDraw) - - .def("create_caption", &CScriptPropertiesListHelper::CreateCaption) - .def("create_canvas", &CScriptPropertiesListHelper::CreateCanvas) - .def("create_button", &CScriptPropertiesListHelper::CreateButton) - - .def("create_choose", - (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - u32))(&CScriptPropertiesListHelper::CreateChoose)) - .def("create_choose", - (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, - LPCSTR))(&CScriptPropertiesListHelper::CreateChoose)) - .def("create_choose", - (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, - LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateChoose)) - .def("create_choose", - (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, - LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateChoose)) - - // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, - //luabind::object , LPCSTR )) (&CScriptPropertiesListHelper::CreateS8)) - // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, - //luabind::object , LPCSTR , s8)) (&CScriptPropertiesListHelper::CreateS8)) - // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, - //luabind::object , LPCSTR , s8, s8)) (&CScriptPropertiesListHelper::CreateS8)) - // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, - //luabind::object , LPCSTR , s8, s8, s8)) (&CScriptPropertiesListHelper::CreateS8)) - - .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR))(&CScriptPropertiesListHelper::CreateS16)) - .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, s16))(&CScriptPropertiesListHelper::CreateS16)) - .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, s16, s16))(&CScriptPropertiesListHelper::CreateS16)) - .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, s16, s16, s16))(&CScriptPropertiesListHelper::CreateS16)) - - .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR))(&CScriptPropertiesListHelper::CreateS32)) - .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, s32))(&CScriptPropertiesListHelper::CreateS32)) - .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, s32, s32))(&CScriptPropertiesListHelper::CreateS32)) - .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, s32, s32, s32))(&CScriptPropertiesListHelper::CreateS32)) - - .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR))(&CScriptPropertiesListHelper::CreateU8)) - .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u8))(&CScriptPropertiesListHelper::CreateU8)) - .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u8, u8))(&CScriptPropertiesListHelper::CreateU8)) - .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u8, u8, u8))(&CScriptPropertiesListHelper::CreateU8)) - - .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR))(&CScriptPropertiesListHelper::CreateU16)) - .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u16))(&CScriptPropertiesListHelper::CreateU16)) - .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u16, u16))(&CScriptPropertiesListHelper::CreateU16)) - .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u16, u16, u16))(&CScriptPropertiesListHelper::CreateU16)) - - .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR))(&CScriptPropertiesListHelper::CreateU32)) - .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u32))(&CScriptPropertiesListHelper::CreateU32)) - .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u32, u32))(&CScriptPropertiesListHelper::CreateU32)) - .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, u32, u32, u32))(&CScriptPropertiesListHelper::CreateU32)) - - .def("create_float", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR))( - &CScriptPropertiesListHelper::CreateFloat)) - .def("create_float", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float))(&CScriptPropertiesListHelper::CreateFloat)) - .def("create_float", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, - float))(&CScriptPropertiesListHelper::CreateFloat)) - .def("create_float", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, - float, float))(&CScriptPropertiesListHelper::CreateFloat)) - .def("create_float", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, - float, float, int))(&CScriptPropertiesListHelper::CreateFloat)) - - .def("create_bool", &CScriptPropertiesListHelper::CreateBOOL) - - .def("create_vector", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR))( - &CScriptPropertiesListHelper::CreateVector)) - .def("create_vector", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float))(&CScriptPropertiesListHelper::CreateVector)) - .def("create_vector", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float, float))(&CScriptPropertiesListHelper::CreateVector)) - .def("create_vector", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float, float, float))(&CScriptPropertiesListHelper::CreateVector)) - .def("create_vector", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float, float, float, int))(&CScriptPropertiesListHelper::CreateVector)) - - .def("create_flag8", - (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u8))( - &CScriptPropertiesListHelper::CreateFlag8)) - .def("create_flag8", - (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u8, - LPCSTR))(&CScriptPropertiesListHelper::CreateFlag8)) - .def("create_flag8", - (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u8, - LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag8)) - .def("create_flag8", - (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u8, - LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateFlag8)) - - .def("create_flag16", - (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - u16))(&CScriptPropertiesListHelper::CreateFlag16)) - .def("create_flag16", - (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u16, - LPCSTR))(&CScriptPropertiesListHelper::CreateFlag16)) - .def("create_flag16", - (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u16, - LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag16)) - .def("create_flag16", - (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u16, - LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateFlag16)) - - .def("create_flag32", - (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - u32))(&CScriptPropertiesListHelper::CreateFlag32)) - .def("create_flag32", - (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, - LPCSTR))(&CScriptPropertiesListHelper::CreateFlag32)) - .def("create_flag32", - (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, - LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag32)) - .def("create_flag32", - (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, - LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateFlag32)) - - .def("create_token8", &CScriptPropertiesListHelper::CreateToken8) - .def("create_token16", &CScriptPropertiesListHelper::CreateToken16) - .def("create_token32", &CScriptPropertiesListHelper::CreateToken32) - - // .def("create_rtoken8", &CScriptPropertiesListHelper::CreateRToken8) - // .def("create_rtoken16", &CScriptPropertiesListHelper::CreateRToken16) - // .def("create_rtoken32", &CScriptPropertiesListHelper::CreateRToken32) - - .def("create_list", &CScriptPropertiesListHelper::CreateRList) - - .def("create_color", &CScriptPropertiesListHelper::CreateColor) - .def("create_fcolor", &CScriptPropertiesListHelper::CreateFColor) - .def("create_vcolor", &CScriptPropertiesListHelper::CreateVColor) - - .def("create_text", &CScriptPropertiesListHelper::CreateRText) - - .def("create_time", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR))( - &CScriptPropertiesListHelper::CreateTime)) - .def( - "create_time", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, float))(&CScriptPropertiesListHelper::CreateTime)) - .def( - "create_time", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, - LPCSTR, float, float))(&CScriptPropertiesListHelper::CreateTime)) - - .def("create_angle", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR))( - &CScriptPropertiesListHelper::CreateAngle)) - .def("create_angle", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float))(&CScriptPropertiesListHelper::CreateAngle)) - .def("create_angle", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, - float))(&CScriptPropertiesListHelper::CreateAngle)) - .def("create_angle", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, - float, float))(&CScriptPropertiesListHelper::CreateAngle)) - .def("create_angle", - (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, - float, float, int))(&CScriptPropertiesListHelper::CreateAngle)) - - .def("create_vangle", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR))( - &CScriptPropertiesListHelper::CreateAngle3)) - .def("create_vangle", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float))(&CScriptPropertiesListHelper::CreateAngle3)) - .def("create_vangle", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float, float))(&CScriptPropertiesListHelper::CreateAngle3)) - .def("create_vangle", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float, float, float))(&CScriptPropertiesListHelper::CreateAngle3)) - .def("create_vangle", - (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, - float, float, float, int))(&CScriptPropertiesListHelper::CreateAngle3)) - - , - def("properties_helper", &properties_helper)]; - }); +SCRIPT_EXPORT(CScriptPropertiesListHelper, (), { + module(luaState)[class_("prop_value"), class_("prop_item_vec"), + class_("caption_value"), class_("canvas_value"), class_("button_value"), + class_("choose_value"), class_("s8_value"), class_("s16_value"), + class_("s32_value"), class_("u8_value"), class_("u16_value"), + class_("u32_value"), class_("u32_value"), class_("bool_value"), + class_("vector_value"), class_("color_value"), class_("text_value"), + class_("flag8_value"), class_("flag16_value"), class_("flag32_value"), + class_("token8_value"), class_("token16_value"), + class_("token32_value"), + // class_("rtoken8_value"), + // class_("rtoken16_value"), + // class_("rtoken32_value"), + class_("list_value"), + + class_("choose_type") + .enum_("choose_type")[value("custom", int(smCustom)), value("sound_source", int(smSoundSource)), + value("sound_environment", int(smSoundEnv)), value("library_object", int(smObject)), + value("engine_shader", int(smEShader)), value("compiler_shader", int(smCShader)), + value("particle_effect", int(smPE)), value("particle_system", int(smParticles)), + value("texture", int(smTexture)), value("entity", int(smEntityType)), + value("spawn_item", int(smSpawnItem)), value("light_animation", int(smLAnim)), + value("visual", int(smVisual)), value("skeleton_animations", int(smSkeletonAnims)), + value("skeleton_bones", int(smSkeletonBones)), value("material", int(smGameMaterial)), + value("game_animation", int(smGameAnim)), value("game_motion", int(smGameSMotions))], + + class_("properties_list_helper") + .def("vector_on_after_edit", &CScriptPropertiesListHelper::FvectorRDOnAfterEdit) + .def("vector_on_before_edit", &CScriptPropertiesListHelper::FvectorRDOnBeforeEdit) + // .def("vector_on_draw", &CScriptPropertiesListHelper::FvectorRDOnDraw) + .def("float_on_after_edit", &CScriptPropertiesListHelper::floatRDOnAfterEdit) + .def("float_on_before_edit", &CScriptPropertiesListHelper::floatRDOnBeforeEdit) + // .def("float_on_draw", &CScriptPropertiesListHelper::floatRDOnDraw) + .def("name_after_edit", &CScriptPropertiesListHelper::NameAfterEdit) + .def("name_before_edit", &CScriptPropertiesListHelper::NameBeforeEdit) + // .def("name_on_draw", &CScriptPropertiesListHelper::NameDraw) + + .def("create_caption", &CScriptPropertiesListHelper::CreateCaption) + .def("create_canvas", &CScriptPropertiesListHelper::CreateCanvas) + .def("create_button", &CScriptPropertiesListHelper::CreateButton) + + .def("create_choose", (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u32))(&CScriptPropertiesListHelper::CreateChoose)) + .def("create_choose", (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u32, LPCSTR))(&CScriptPropertiesListHelper::CreateChoose)) + .def("create_choose", + (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, + LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateChoose)) + .def("create_choose", + (ChooseValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, + LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateChoose)) + + // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, + // luabind::object , LPCSTR )) (&CScriptPropertiesListHelper::CreateS8)) + // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, + // luabind::object , LPCSTR , s8)) (&CScriptPropertiesListHelper::CreateS8)) + // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, + // luabind::object , LPCSTR , s8, s8)) (&CScriptPropertiesListHelper::CreateS8)) + // .def("create_s8", (S8Value *(CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, + // luabind::object , LPCSTR , s8, s8, s8)) (&CScriptPropertiesListHelper::CreateS8)) + + .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateS16)) + .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, s16))(&CScriptPropertiesListHelper::CreateS16)) + .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, s16, s16))(&CScriptPropertiesListHelper::CreateS16)) + .def("create_s16", (S16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, s16, s16, s16))(&CScriptPropertiesListHelper::CreateS16)) + + .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateS32)) + .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, s32))(&CScriptPropertiesListHelper::CreateS32)) + .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, s32, s32))(&CScriptPropertiesListHelper::CreateS32)) + .def("create_s32", (S32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, s32, s32, s32))(&CScriptPropertiesListHelper::CreateS32)) + + .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateU8)) + .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, + u8))(&CScriptPropertiesListHelper::CreateU8)) + .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, + u8, u8))(&CScriptPropertiesListHelper::CreateU8)) + .def("create_u8", (U8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, + u8, u8, u8))(&CScriptPropertiesListHelper::CreateU8)) + + .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateU16)) + .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u16))(&CScriptPropertiesListHelper::CreateU16)) + .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u16, u16))(&CScriptPropertiesListHelper::CreateU16)) + .def("create_u16", (U16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u16, u16, u16))(&CScriptPropertiesListHelper::CreateU16)) + + .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateU32)) + .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u32))(&CScriptPropertiesListHelper::CreateU32)) + .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u32, u32))(&CScriptPropertiesListHelper::CreateU32)) + .def("create_u32", (U32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u32, u32, u32))(&CScriptPropertiesListHelper::CreateU32)) + + .def("create_float", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateFloat)) + .def("create_float", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float))(&CScriptPropertiesListHelper::CreateFloat)) + .def("create_float", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float, float))(&CScriptPropertiesListHelper::CreateFloat)) + .def("create_float", + (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float))(&CScriptPropertiesListHelper::CreateFloat)) + .def("create_float", + (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float, int))(&CScriptPropertiesListHelper::CreateFloat)) + + .def("create_bool", &CScriptPropertiesListHelper::CreateBOOL) + + .def("create_vector", (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateVector)) + .def("create_vector", (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float))(&CScriptPropertiesListHelper::CreateVector)) + .def("create_vector", (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float, float))(&CScriptPropertiesListHelper::CreateVector)) + .def("create_vector", + (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float))(&CScriptPropertiesListHelper::CreateVector)) + .def("create_vector", + (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float, int))(&CScriptPropertiesListHelper::CreateVector)) + + .def("create_flag8", (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u8))(&CScriptPropertiesListHelper::CreateFlag8)) + .def("create_flag8", (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u8, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag8)) + .def("create_flag8", + (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u8, + LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag8)) + .def("create_flag8", + (Flag8Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u8, + LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateFlag8)) + + .def("create_flag16", (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u16))(&CScriptPropertiesListHelper::CreateFlag16)) + .def("create_flag16", (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u16, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag16)) + .def("create_flag16", + (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u16, + LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag16)) + .def("create_flag16", + (Flag16Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u16, + LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateFlag16)) + + .def("create_flag32", (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u32))(&CScriptPropertiesListHelper::CreateFlag32)) + .def("create_flag32", (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, u32, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag32)) + .def("create_flag32", + (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, + LPCSTR, LPCSTR))(&CScriptPropertiesListHelper::CreateFlag32)) + .def("create_flag32", + (Flag32Value * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, u32, + LPCSTR, LPCSTR, u32))(&CScriptPropertiesListHelper::CreateFlag32)) + + .def("create_token8", &CScriptPropertiesListHelper::CreateToken8) + .def("create_token16", &CScriptPropertiesListHelper::CreateToken16) + .def("create_token32", &CScriptPropertiesListHelper::CreateToken32) + + // .def("create_rtoken8", &CScriptPropertiesListHelper::CreateRToken8) + // .def("create_rtoken16", &CScriptPropertiesListHelper::CreateRToken16) + // .def("create_rtoken32", &CScriptPropertiesListHelper::CreateRToken32) + + .def("create_list", &CScriptPropertiesListHelper::CreateRList) + + .def("create_color", &CScriptPropertiesListHelper::CreateColor) + .def("create_fcolor", &CScriptPropertiesListHelper::CreateFColor) + .def("create_vcolor", &CScriptPropertiesListHelper::CreateVColor) + + .def("create_text", &CScriptPropertiesListHelper::CreateRText) + + .def("create_time", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateTime)) + .def("create_time", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float))(&CScriptPropertiesListHelper::CreateTime)) + .def("create_time", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float, float))(&CScriptPropertiesListHelper::CreateTime)) + + .def("create_angle", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateAngle)) + .def("create_angle", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float))(&CScriptPropertiesListHelper::CreateAngle)) + .def("create_angle", (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float, float))(&CScriptPropertiesListHelper::CreateAngle)) + .def("create_angle", + (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float))(&CScriptPropertiesListHelper::CreateAngle)) + .def("create_angle", + (FloatValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float, int))(&CScriptPropertiesListHelper::CreateAngle)) + + .def("create_vangle", (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR))(&CScriptPropertiesListHelper::CreateAngle3)) + .def("create_vangle", (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float))(&CScriptPropertiesListHelper::CreateAngle3)) + .def("create_vangle", (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, + LPCSTR, float, float))(&CScriptPropertiesListHelper::CreateAngle3)) + .def("create_vangle", + (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float))(&CScriptPropertiesListHelper::CreateAngle3)) + .def("create_vangle", + (VectorValue * (CScriptPropertiesListHelper::*)(PropItemVec*, LPCSTR, luabind::object, LPCSTR, float, + float, float, int))(&CScriptPropertiesListHelper::CreateAngle3)) + + , + def("properties_helper", &properties_helper)]; +}); diff --git a/src/utils/xrSE_Factory/script_debugger_utils.h b/src/utils/xrSE_Factory/script_debugger_utils.h index 03782468bae..ed03383a591 100644 --- a/src/utils/xrSE_Factory/script_debugger_utils.h +++ b/src/utils/xrSE_Factory/script_debugger_utils.h @@ -20,7 +20,7 @@ class xr_event private: HANDLE m_event; -private: // hidden +private: // hidden xr_event(const xr_event&); void operator=(const xr_event&); }; @@ -37,7 +37,7 @@ class xr_mutex private: CRITICAL_SECTION m_mutex; -private: // hidden +private: // hidden xr_mutex(const xr_mutex&); void operator=(const xr_mutex&); }; @@ -51,7 +51,7 @@ class xr_sync private: xr_mutex& m_mutex; -private: // hidden +private: // hidden xr_sync(const xr_sync&); void operator=(const xr_sync&); }; @@ -70,12 +70,12 @@ class xr_thread static bool yield(); static void sleep(unsigned msec); // static pid_t getId(); - static unsigned getTickCount(); // msec + static unsigned getTickCount(); // msec private: HANDLE m_thread; -private: // hidden +private: // hidden xr_thread(const xr_thread&); void operator=(const xr_thread&); }; @@ -98,7 +98,7 @@ class xr_waitableThread : private xr_thread virtual void run(); xr_event m_event; -private: // hidden +private: // hidden xr_waitableThread(const xr_waitableThread&); void operator=(const xr_waitableThread&); }; diff --git a/src/utils/xrSE_Factory/script_properties_list_helper.cpp b/src/utils/xrSE_Factory/script_properties_list_helper.cpp index 1203cbd2dfc..cbe1ef76a89 100644 --- a/src/utils/xrSE_Factory/script_properties_list_helper.cpp +++ b/src/utils/xrSE_Factory/script_properties_list_helper.cpp @@ -177,19 +177,22 @@ ChooseValue* CScriptPropertiesListHelper::CreateChoose( return (PHelper().CreateChoose(*items, key, wrap_value(object, name), mode, 0)); } -// S8Value* CScriptPropertiesListHelper::CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, +// S8Value* CScriptPropertiesListHelper::CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR +// name, // s8 mn, s8 mx, s8 inc) //{ // return (PHelper().CreateS8(*items,key,wrap_value(object,name),mn,mx,inc)); //} // -// S8Value* CScriptPropertiesListHelper::CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, +// S8Value* CScriptPropertiesListHelper::CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR +// name, // s8 mn, s8 mx) //{ // return (PHelper().CreateS8(*items,key,wrap_value(object,name),mn,mx)); //} // -// S8Value* CScriptPropertiesListHelper::CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, +// S8Value* CScriptPropertiesListHelper::CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR +// name, // s8 mn) //{ // return (PHelper().CreateS8(*items,key,wrap_value(object,name),mn)); diff --git a/src/utils/xrSE_Factory/script_properties_list_helper.h b/src/utils/xrSE_Factory/script_properties_list_helper.h index 2253883f5b6..61e4e5bfce9 100644 --- a/src/utils/xrSE_Factory/script_properties_list_helper.h +++ b/src/utils/xrSE_Factory/script_properties_list_helper.h @@ -46,13 +46,16 @@ struct CScriptPropertiesListHelper LPCSTR path, LPCSTR fill_param, u32 sub_item_cnt); // S8Value* CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR - //name); + // name); + // S8Value* CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, + //s8 + // mn); // S8Value* CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, s8 - //mn); - // S8Value* CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, s8 mn, - //s8 mx); - // S8Value* CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, s8 mn, - //s8 mx, s8 inc); + //mn, + // s8 mx); + // S8Value* CreateS8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, s8 + //mn, + // s8 mx, s8 inc); S16Value* CreateS16(PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name); S16Value* CreateS16(PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, s16 mn); @@ -124,14 +127,18 @@ struct CScriptPropertiesListHelper PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, CScriptTokenList* token); Token32Value* CreateToken32( PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, CScriptTokenList* token); - // RToken8Value* CreateRToken8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, - //RTokenVec* token); - // RToken16Value* CreateRToken16 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, - //RTokenVec* token); - // RToken32Value* CreateRToken32 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, - //RTokenVec* token); - // TokenValueSH* CreateTokenSH (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, - //u32 cnt, const TokenValueSH::Item* lst); + // RToken8Value* CreateRToken8 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR + //name, + // RTokenVec* token); + // RToken16Value* CreateRToken16 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR + //name, + // RTokenVec* token); + // RToken32Value* CreateRToken32 (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR + //name, + // RTokenVec* token); + // TokenValueSH* CreateTokenSH (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR + //name, + // u32 cnt, const TokenValueSH::Item* lst); RListValue* CreateRList( PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, CScriptRTokenList* tokens); U32Value* CreateColor(PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name); @@ -158,8 +165,10 @@ struct CScriptPropertiesListHelper PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, float mn, float mx, float inc); VectorValue* CreateAngle3( PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, float mn, float mx, float inc, int decim); - // RTextValue* CreateName (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, - //ListItem* owner); - // RTextValue* CreateNameCB (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR name, - //TOnDrawTextEvent=0, RTextValue::TOnBeforeEditEvent=0, RTextValue::TOnAfterEditEvent=0 + // RTextValue* CreateName (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR + //name, + // ListItem* owner); + // RTextValue* CreateNameCB (PropItemVec* items, LPCSTR key, luabind::object object, LPCSTR + //name, + // TOnDrawTextEvent=0, RTextValue::TOnBeforeEditEvent=0, RTextValue::TOnAfterEditEvent=0 }; diff --git a/src/utils/xrSE_Factory/script_space.h b/src/utils/xrSE_Factory/script_space.h index e8073556f26..66db447f643 100644 --- a/src/utils/xrSE_Factory/script_space.h +++ b/src/utils/xrSE_Factory/script_space.h @@ -18,9 +18,9 @@ #pragma warning(disable : 4267) extern "C" { +#include #include #include -#include }; #include diff --git a/src/utils/xrSE_Factory/xrSE_Factory.h b/src/utils/xrSE_Factory/xrSE_Factory.h index 406a8fb18a6..9465d13e281 100644 --- a/src/utils/xrSE_Factory/xrSE_Factory.h +++ b/src/utils/xrSE_Factory/xrSE_Factory.h @@ -9,4 +9,4 @@ #ifndef XRSE_FACTORY_H #define XRSE_FACTORY_H -#endif // XRSE_FACTORY_H \ No newline at end of file +#endif // XRSE_FACTORY_H \ No newline at end of file diff --git a/src/utils/xrSE_Factory/xrUIXmlParser.cpp b/src/utils/xrSE_Factory/xrUIXmlParser.cpp index a9ccd850fa8..a59f36ba9b9 100644 --- a/src/utils/xrSE_Factory/xrUIXmlParser.cpp +++ b/src/utils/xrSE_Factory/xrUIXmlParser.cpp @@ -3,7 +3,7 @@ #ifdef XRGAME_EXPORTS #include "xrGame/ui_base.h" -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS shared_str CUIXml::correct_file_name(LPCSTR path, LPCSTR fn) { diff --git a/src/xrAICore/AISpaceBase.hpp b/src/xrAICore/AISpaceBase.hpp index c3a026060e4..9719c48e10f 100644 --- a/src/xrAICore/AISpaceBase.hpp +++ b/src/xrAICore/AISpaceBase.hpp @@ -11,7 +11,7 @@ class CPatrolPathStorage; class XRAICORE_API AISpaceBase { protected: - CGameGraph* m_game_graph = nullptr; // not owned by AISpaceBase + CGameGraph* m_game_graph = nullptr; // not owned by AISpaceBase CLevelGraph* m_level_graph = nullptr; CGraphEngine* m_graph_engine = nullptr; CPatrolPathStorage* m_patrol_path_storage = nullptr; diff --git a/src/xrAICore/Components/condition_state_inline.h b/src/xrAICore/Components/condition_state_inline.h index a14316984df..8d1ece8ebc6 100644 --- a/src/xrAICore/Components/condition_state_inline.h +++ b/src/xrAICore/Components/condition_state_inline.h @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////// #pragma once -#include "xrScriptEngine/DebugMacros.hpp" // for THROW // XXX: move debug macros to xrCore +#include "xrScriptEngine/DebugMacros.hpp" // for THROW // XXX: move debug macros to xrCore #define TEMPLATE_SPECIALIZATION template #define CConditionStateAbstract CConditionState<_world_property> diff --git a/src/xrAICore/Components/problem_solver.h b/src/xrAICore/Components/problem_solver.h index 26fb63fcc02..d42158c1997 100644 --- a/src/xrAICore/Components/problem_solver.h +++ b/src/xrAICore/Components/problem_solver.h @@ -97,7 +97,7 @@ class CProblemSolver { return self.estimate_edge_weight_impl(vertex_index); } - }; // struct helper + }; // struct helper template <> struct helper @@ -106,7 +106,7 @@ class CProblemSolver { return self.estimate_edge_weight_impl(vertex_index, true); } - }; // struct helper + }; // struct helper protected: #ifdef DEBUG diff --git a/src/xrAICore/Navigation/PathManagers/path_manager_level_inline.h b/src/xrAICore/Navigation/PathManagers/path_manager_level_inline.h index 932d42e01fe..ea8a7010e8b 100644 --- a/src/xrAICore/Navigation/PathManagers/path_manager_level_inline.h +++ b/src/xrAICore/Navigation/PathManagers/path_manager_level_inline.h @@ -57,7 +57,7 @@ IC _dist_type CLevelPathManager::evaluate( // y2 = (float)(tNode1.position().y()); // return (_sqrt(square_size_y*(float)_sqr(y2 - y1) + m_sqr_distance_xz)); - return (m_distance_xz); // + (y2 - y1)*size_y); + return (m_distance_xz); // + (y2 - y1)*size_y); } TEMPLATE_SPECIALIZATION @@ -65,8 +65,8 @@ IC _dist_type CLevelPathManager::estimate(const _index_type& node_index) const { VERIFY(graph); // return (_sqrt((float)(m_sqr_distance_xz*float(_sqr(x3 - x1) + _sqr(z3 - z1)) + - //square_size_y*(float)_sqr(y3 - y1)))); - return (2 * m_distance_xz * _dist_type(_abs(x3 - x1) + _abs(z3 - z1))); // + _abs(y3 - y1)*size_y); + // square_size_y*(float)_sqr(y3 - y1)))); + return (2 * m_distance_xz * _dist_type(_abs(x3 - x1) + _abs(z3 - z1))); // + _abs(y3 - y1)*size_y); // int x = _abs(x3 - x1); // int z = _abs(z3 - z1); // return (m_distance_xz*_dist_type(_min(x,z)*3 + 2*_abs(x - z))); diff --git a/src/xrAICore/Navigation/PatrolPath/patrol_path_params.cpp b/src/xrAICore/Navigation/PatrolPath/patrol_path_params.cpp index 98675723c46..d11ba08c26a 100644 --- a/src/xrAICore/Navigation/PatrolPath/patrol_path_params.cpp +++ b/src/xrAICore/Navigation/PatrolPath/patrol_path_params.cpp @@ -11,7 +11,7 @@ #include "Include/xrAPI/xrAPI.h" #include "PCH.hpp" #include "patrol_path_storage.h" -#include "xrScriptEngine/DebugMacros.hpp" // for THROW3 // XXX: move debug macros to xrCore +#include "xrScriptEngine/DebugMacros.hpp" // for THROW3 // XXX: move debug macros to xrCore #include "xrScriptEngine/script_engine.hpp" CPatrolPathParams::CPatrolPathParams(LPCSTR caPatrolPathToGo, EPatrolStartType tPatrolPathStart, diff --git a/src/xrAICore/Navigation/PatrolPath/patrol_path_params_script.cpp b/src/xrAICore/Navigation/PatrolPath/patrol_path_params_script.cpp index 71b9a2d46c7..1f396b3a378 100644 --- a/src/xrAICore/Navigation/PatrolPath/patrol_path_params_script.cpp +++ b/src/xrAICore/Navigation/PatrolPath/patrol_path_params_script.cpp @@ -8,7 +8,7 @@ #include "ScriptPCH.hpp" #include "patrol_path_params.h" -#include "xrScriptEngine/DebugMacros.hpp" // for THROW3 // XXX: move debug macros to xrCore +#include "xrScriptEngine/DebugMacros.hpp" // for THROW3 // XXX: move debug macros to xrCore #include "xrScriptEngine/ScriptExporter.hpp" using namespace luabind; diff --git a/src/xrAICore/Navigation/data_storage_constructor.h b/src/xrAICore/Navigation/data_storage_constructor.h index 5d4da99c8d0..aa8e80c7c12 100644 --- a/src/xrAICore/Navigation/data_storage_constructor.h +++ b/src/xrAICore/Navigation/data_storage_constructor.h @@ -10,7 +10,7 @@ struct EmptyVertexData { - template // result mixin type + template // result mixin type struct VertexData { }; @@ -21,10 +21,10 @@ struct CompoundVertex : Components::template VertexData, diff --git a/src/xrAICore/Navigation/game_graph_script.cpp b/src/xrAICore/Navigation/game_graph_script.cpp index b0a947c4fcd..e7cb92ec73a 100644 --- a/src/xrAICore/Navigation/game_graph_script.cpp +++ b/src/xrAICore/Navigation/game_graph_script.cpp @@ -10,7 +10,7 @@ #include "Include/xrAPI/xrAPI.h" #include "PCH.hpp" #include "game_graph.h" -#include "xrScriptEngine/DebugMacros.hpp" // for THROW // XXX: move debug macros to xrCore +#include "xrScriptEngine/DebugMacros.hpp" // for THROW // XXX: move debug macros to xrCore #include "xrScriptEngine/ScriptExporter.hpp" using namespace luabind; diff --git a/src/xrAICore/Navigation/game_level_cross_table.h b/src/xrAICore/Navigation/game_level_cross_table.h index 630b25ea450..b1c8ebad07e 100644 --- a/src/xrAICore/Navigation/game_level_cross_table.h +++ b/src/xrAICore/Navigation/game_level_cross_table.h @@ -23,7 +23,7 @@ class CGameLevelCrossTable friend class CCrossTableBuilder; friend class CRenumbererConverter; friend class CGameGraphBuilder; -#endif // AI_COMPILER +#endif // AI_COMPILER public: #pragma pack(push, 2) @@ -47,7 +47,7 @@ class CGameLevelCrossTable friend class CCrossTableBuilder; friend class CRenumbererConverter; friend class CGameGraphBuilder; -#endif // AI_COMPILER +#endif // AI_COMPILER }; class CCell @@ -63,7 +63,7 @@ class CGameLevelCrossTable friend class CCrossTableBuilder; friend class CRenumbererConverter; friend class CGameGraphBuilder; -#endif // AI_COMPILER +#endif // AI_COMPILER }; #pragma pack(pop) @@ -75,13 +75,13 @@ class CGameLevelCrossTable private: IReader* m_tpCrossTableVFS; IReader* m_chunk; -#endif // AI_COMPILER +#endif // AI_COMPILER public: IC CGameLevelCrossTable(const void* buffer, const u32& buffer_size); #ifdef AI_COMPILER IC CGameLevelCrossTable(LPCSTR fName); -#endif // AI_COMPILER +#endif // AI_COMPILER public: IC virtual ~CGameLevelCrossTable(); diff --git a/src/xrAICore/Navigation/game_level_cross_table_inline.h b/src/xrAICore/Navigation/game_level_cross_table_inline.h index b643a0b033d..af59df1cbf1 100644 --- a/src/xrAICore/Navigation/game_level_cross_table_inline.h +++ b/src/xrAICore/Navigation/game_level_cross_table_inline.h @@ -25,7 +25,7 @@ IC CGameLevelCrossTable::CGameLevelCrossTable(LPCSTR fName) R_ASSERT2(m_chunk, "Cross table is corrupted!"); m_tpaCrossTable = (CCell*)m_chunk->pointer(); } -#endif // AI_COMPILER +#endif // AI_COMPILER IC CGameLevelCrossTable::CGameLevelCrossTable(const void* buffer, const u32& buffer_size) { diff --git a/src/xrAICore/Navigation/graph_engine.h b/src/xrAICore/Navigation/graph_engine.h index 9a59f0d6c0b..9355520d79f 100644 --- a/src/xrAICore/Navigation/graph_engine.h +++ b/src/xrAICore/Navigation/graph_engine.h @@ -68,7 +68,7 @@ class CGraphEngine using StringAlgorithmDistance = float; using CStringAlgorithm = CAStar; -#endif // AI_COMPILER +#endif // AI_COMPILER CAlgorithm* m_algorithm; diff --git a/src/xrAICore/Navigation/graph_engine_inline.h b/src/xrAICore/Navigation/graph_engine_inline.h index 188c11f97dd..113b6a0e949 100644 --- a/src/xrAICore/Navigation/graph_engine_inline.h +++ b/src/xrAICore/Navigation/graph_engine_inline.h @@ -126,4 +126,4 @@ inline bool CGraphEngine::search(const _Graph& graph, const shared_str& start_no STOP_PROFILE } -#endif // AI_COMPILER +#endif // AI_COMPILER diff --git a/src/xrAICore/Navigation/level_graph.h b/src/xrAICore/Navigation/level_graph.h index 1910dbcdf55..1e75bc1603b 100644 --- a/src/xrAICore/Navigation/level_graph.h +++ b/src/xrAICore/Navigation/level_graph.h @@ -44,11 +44,11 @@ class XRAICORE_API CLevelGraph typedef LevelGraph::ELineIntersections ELineIntersections; private: - IReader* m_reader; // level graph virtual storage - CHeader* m_header; // level graph header - CVertex* m_nodes; // nodes array + IReader* m_reader; // level graph virtual storage + CHeader* m_header; // level graph header + CVertex* m_nodes; // nodes array xr_vector m_access_mask; - GameGraph::_LEVEL_ID m_level_id; // unique level identifier + GameGraph::_LEVEL_ID m_level_id; // unique level identifier u32 m_row_length; u32 m_column_length; u32 m_max_x; diff --git a/src/xrAICore/Navigation/level_graph_vertex_inline.h b/src/xrAICore/Navigation/level_graph_vertex_inline.h index dab03c9ca56..7529152e63c 100644 --- a/src/xrAICore/Navigation/level_graph_vertex_inline.h +++ b/src/xrAICore/Navigation/level_graph_vertex_inline.h @@ -377,10 +377,10 @@ IC void CLevelGraph::contour(CLevelGraph::SContour& _contour, const CLevelGraph: _contour.v3.set(vertex_position.x + st, vertex_position.y, vertex_position.z + st); _contour.v4.set(vertex_position.x - st, vertex_position.y, vertex_position.z + st); - project_point(plane, _contour.v1); // minX,minZ - project_point(plane, _contour.v2); // maxX,minZ - project_point(plane, _contour.v3); // maxX,maxZ - project_point(plane, _contour.v4); // minX,maxZ + project_point(plane, _contour.v1); // minX,minZ + project_point(plane, _contour.v2); // maxX,minZ + project_point(plane, _contour.v3); // maxX,maxZ + project_point(plane, _contour.v4); // minX,maxZ } IC float CLevelGraph::nearest(Fvector& destination, const Fvector& position, const CLevelGraph::SContour& contour) const diff --git a/src/xrCDB/Frustum.cpp b/src/xrCDB/Frustum.cpp index e38faa184c5..915fb256318 100644 --- a/src/xrCDB/Frustum.cpp +++ b/src/xrCDB/Frustum.cpp @@ -75,8 +75,8 @@ EFC_Visible CFrustum::testSphere(Fvector& c, float r, u32& test_mask) const if (cls > r) { test_mask = 0; return fcvNone; - } // none - return - if (_abs(cls) >= r) test_mask &= ~bit; // fully - no need to test this plane + } // none - return + if (_abs(cls) >= r) test_mask &= ~bit; // fully - no need to test this plane } } return test_mask ? fcvPartial : fcvFully; @@ -126,12 +126,12 @@ EFC_Visible CFrustum::testAABB(const float* mM, u32& test_mask) const if (test_mask & bit) { EFC_Visible r = AABB_OverlapPlane(planes[i], mM); if (fcvFully == r) - test_mask &= ~bit; // fully - no need to test this plane + test_mask &= ~bit; // fully - no need to test this plane else if (fcvNone == r) { test_mask = 0; return fcvNone; - } // none - return + } // none - return } } return test_mask ? fcvPartial : fcvFully; @@ -147,19 +147,19 @@ EFC_Visible CFrustum::testSAABB(Fvector& c, float r, const float* mM, u32& test_ if (cls > r) { test_mask = 0; return fcvNone; - } // none - return + } // none - return if (_abs(cls) >= r) - test_mask &= ~bit; // fully - no need to test this plane + test_mask &= ~bit; // fully - no need to test this plane else { EFC_Visible r = AABB_OverlapPlane(planes[i], mM); if (fcvFully == r) - test_mask &= ~bit; // fully - no need to test this plane + test_mask &= ~bit; // fully - no need to test this plane else if (fcvNone == r) { test_mask = 0; return fcvNone; - } // none - return + } // none - return } } } @@ -197,7 +197,7 @@ void CFrustum::CreateFromPlanes(Fplane* p, int count) for (int i = 0; i < count; i++) { - float denom = 1.0f / planes[i].n.magnitude(); // Get magnitude of Vector + float denom = 1.0f / planes[i].n.magnitude(); // Get magnitude of Vector planes[i].n.x *= denom; planes[i].n.y *= denom; planes[i].n.z *= denom; @@ -316,7 +316,7 @@ void CFrustum::CreateOccluder(Fvector* p, int count, Fvector& vBase, CFrustum& c // here we have all edges marked accordenly to 'open' / 'closed' classification _clear(); - _add(p[0], p[1], p[2]); // main plane + _add(p[0], p[1], p[2]); // main plane for (int i = 0; i < count; i++) { if (!edge[i]) { @@ -359,7 +359,7 @@ sPoly* CFrustum::ClipPoly(sPoly& S, sPoly& D) const D.sub((*src)[j + 1], (*src)[j]); denum = P.n.dotproduct(D); if (denum != 0) { - t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); + t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); dest->last().mad((*src)[j], D, t); dest->inc(); } @@ -374,7 +374,7 @@ sPoly* CFrustum::ClipPoly(sPoly& S, sPoly& D) const D.sub((*src)[j + 1], (*src)[j]); denum = P.n.dotproduct(D); if (denum != 0) { - t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); + t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); dest->last().mad((*src)[j], D, t); dest->inc(); } @@ -465,7 +465,7 @@ void CFrustum::CreateFromMatrix(Fmatrix& M, u32 mask) for (int i = 0; i < p_count; i++) { - float denom = 1.0f / planes[i].n.magnitude(); // Get magnitude of Vector + float denom = 1.0f / planes[i].n.magnitude(); // Get magnitude of Vector planes[i].n.x *= denom; planes[i].n.y *= denom; planes[i].n.z *= denom; diff --git a/src/xrCDB/Frustum.h b/src/xrCDB/Frustum.h index 5ff53f9151c..c3d88eaa796 100644 --- a/src/xrCDB/Frustum.h +++ b/src/xrCDB/Frustum.h @@ -41,7 +41,7 @@ class XRCDB_API CFrustum public: struct fplane : public Fplane { - u32 aabb_overlap_id; // [0..7] + u32 aabb_overlap_id; // [0..7] void cache(); }; fplane planes[FRUSTUM_MAXPLANES]; @@ -73,7 +73,7 @@ class XRCDB_API CFrustum void CreateOccluder(Fvector* p, int count, Fvector& vBase, CFrustum& clip); BOOL CreateFromClipPoly( - Fvector* p, int count, Fvector& vBase, CFrustum& clip); // returns 'false' if creation failed + Fvector* p, int count, Fvector& vBase, CFrustum& clip); // returns 'false' if creation failed void CreateFromPoints(Fvector* p, int count, Fvector& vBase); void CreateFromMatrix(Fmatrix& M, u32 mask); void CreateFromPortal(sPoly* P, Fvector& vPN, Fvector& vBase, Fmatrix& mFullXFORM); @@ -101,4 +101,4 @@ class XRCDB_API CFrustum }; #pragma pack(pop) -#endif // !defined(AFX_FRUSTUM_H__E66ED755_F741_49CF_8B2A_404CCF7067F2__INCLUDED_) +#endif // !defined(AFX_FRUSTUM_H__E66ED755_F741_49CF_8B2A_404CCF7067F2__INCLUDED_) diff --git a/src/xrCDB/ISpatial.cpp b/src/xrCDB/ISpatial.cpp index 55b6ddc19c4..16e612fb12e 100644 --- a/src/xrCDB/ISpatial.cpp +++ b/src/xrCDB/ISpatial.cpp @@ -91,7 +91,7 @@ void SpatialBase::spatial_move() spatial.type |= STYPEFLAG_INVALIDSECTOR; //*** check if we are supposed to correct it's spatial location - if (spatial_inside()) return; // ??? + if (spatial_inside()) return; // ??? spatial.space->remove(this); spatial.space->insert(this); } @@ -139,7 +139,7 @@ void ISpatial_NODE::_remove(ISpatial* S) ISpatial_DB::ISpatial_DB(const char* name) #ifdef CONFIG_PROFILE_LOCKS : cs(MUTEX_PROFILE_ID(ISpatial_DB)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { m_root = NULL; xr_strcpy(Name, name); @@ -165,8 +165,8 @@ void ISpatial_DB::initialize(Fbox& BB) Fvector bbc, bbd; BB.get_CD(bbc, bbd); - bbc.set(0, 0, 0); // generic - bbd.set(1024, 1024, 1024); // generic + bbc.set(0, 0, 0); // generic + bbd.set(1024, 1024, 1024); // generic allocator_pool.reserve(128); m_center.set(bbc); @@ -208,20 +208,20 @@ void ISpatial_DB::_insert(ISpatial_NODE* N, Fvector& n_C, float n_R) // this is leaf node N->_insert(rt_insert_object); rt_insert_object->GetSpatialData().node_center.set(n_C); - rt_insert_object->GetSpatialData().node_radius = n_vR; // vR + rt_insert_object->GetSpatialData().node_radius = n_vR; // vR return; } // we have to check if it can be putted further down - float s_R = rt_insert_object->GetSpatialData().sphere.R; // spatial bounds - float c_R = n_R / 2; // children bounds + float s_R = rt_insert_object->GetSpatialData().sphere.R; // spatial bounds + float c_R = n_R / 2; // children bounds if (s_R < c_R) { // object can be pushed further down - select "octant", calc node position Fvector& s_C = rt_insert_object->GetSpatialData().sphere.P; u32 octant = _octant(n_C, s_C); Fvector c_C; c_C.mad(n_C, c_spatial_offset[octant], c_R); - VERIFY(octant == _octant(n_C, c_C)); // check table assosiations + VERIFY(octant == _octant(n_C, c_C)); // check table assosiations ISpatial_NODE*& chield = N->children[octant]; if (0 == chield) { diff --git a/src/xrCDB/ISpatial.h b/src/xrCDB/ISpatial.h index 7dc8de66d46..72cb4626e05 100644 --- a/src/xrCDB/ISpatial.h +++ b/src/xrCDB/ISpatial.h @@ -79,13 +79,13 @@ class IRender_Light; class SpatialData { public: - u32 type = 0; // STYPE_ + u32 type = 0; // STYPE_ Fsphere sphere; - Fvector node_center; // Cached node center for TBV optimization - float node_radius; // Cached node bounds for TBV optimization - ISpatial_NODE* node_ptr; // Cached parent node for "empty-members" optimization + Fvector node_center; // Cached node center for TBV optimization + float node_radius; // Cached node bounds for TBV optimization + ISpatial_NODE* node_ptr; // Cached parent node for "empty-members" optimization IRender_Sector* sector; - ISpatial_DB* space; // allow different spaces + ISpatial_DB* space; // allow different spaces }; class ISpatial @@ -147,9 +147,9 @@ class ISpatial_NODE typedef _W64 unsigned ptrt; public: - ISpatial_NODE* parent; // parent node for "empty-members" optimization - ISpatial_NODE* children[8]; // children nodes - xr_vector items; // own items + ISpatial_NODE* parent; // parent node for "empty-members" optimization + ISpatial_NODE* children[8]; // children nodes + xr_vector items; // own items public: void _init(ISpatial_NODE* _parent); void _remove(ISpatial* _S); @@ -167,7 +167,7 @@ class ISpatial_NODE // class poolSS; #ifndef DLL_API #define DLL_API XR_IMPORT -#endif // #ifndef DLL_API +#endif // #ifndef DLL_API ////////////////////////////////////////////////////////////////////////// class XRCDB_API ISpatial_DB @@ -178,8 +178,8 @@ class XRCDB_API ISpatial_DB u32 NodeCount; u32 ObjectCount; #ifdef DEBUG - CStatTimer Insert; // debug only - CStatTimer Remove; // debug only + CStatTimer Insert; // debug only + CStatTimer Remove; // debug only #endif CStatTimer Query; @@ -277,4 +277,4 @@ XRCDB_API extern ISpatial_DB* g_SpatialSpacePhysic; #pragma pack(pop) -#endif // #ifndef XRENGINE_ISPATIAL_H_INCLUDED \ No newline at end of file +#endif // #ifndef XRENGINE_ISPATIAL_H_INCLUDED \ No newline at end of file diff --git a/src/xrCDB/ISpatial_q_ray.cpp b/src/xrCDB/ISpatial_q_ray.cpp index 42df355860d..9563f786b6e 100644 --- a/src/xrCDB/ISpatial_q_ray.cpp +++ b/src/xrCDB/ISpatial_q_ray.cpp @@ -8,7 +8,7 @@ // can you say "barebone"? #ifndef _MM_ALIGN16 #define _MM_ALIGN16 __declspec(align(16)) -#endif // _MM_ALIGN16 +#endif // _MM_ALIGN16 struct _MM_ALIGN16 vec_t : public Fvector3 { @@ -47,40 +47,40 @@ ICF BOOL isect_fpu(const Fvector& min, const Fvector& max, const ray_t& ray, Fve coord[0] = min[0]; Inside = FALSE; if (uf(ray.inv_dir[0])) - MaxT[0] = (min[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes + MaxT[0] = (min[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes } else if (ray.pos[0] > max[0]) { coord[0] = max[0]; Inside = FALSE; if (uf(ray.inv_dir[0])) - MaxT[0] = (max[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes + MaxT[0] = (max[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes } if (ray.pos[1] < min[1]) { coord[1] = min[1]; Inside = FALSE; if (uf(ray.inv_dir[1])) - MaxT[1] = (min[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes + MaxT[1] = (min[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes } else if (ray.pos[1] > max[1]) { coord[1] = max[1]; Inside = FALSE; if (uf(ray.inv_dir[1])) - MaxT[1] = (max[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes + MaxT[1] = (max[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes } if (ray.pos[2] < min[2]) { coord[2] = min[2]; Inside = FALSE; if (uf(ray.inv_dir[2])) - MaxT[2] = (min[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes + MaxT[2] = (min[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes } else if (ray.pos[2] > max[2]) { coord[2] = max[2]; Inside = FALSE; if (uf(ray.inv_dir[2])) - MaxT[2] = (max[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes + MaxT[2] = (max[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes } // Ray ray.pos inside bounding box @@ -97,21 +97,21 @@ ICF BOOL isect_fpu(const Fvector& min, const Fvector& max, const ray_t& ray, Fve // Check final candidate actually inside box (if max < 0) if (uf(MaxT[WhichPlane]) & 0x80000000) return false; - if (0 == WhichPlane) { // 1 & 2 + if (0 == WhichPlane) { // 1 & 2 coord[1] = ray.pos[1] + MaxT[0] * ray.fwd_dir[1]; if ((coord[1] < min[1]) || (coord[1] > max[1])) return false; coord[2] = ray.pos[2] + MaxT[0] * ray.fwd_dir[2]; if ((coord[2] < min[2]) || (coord[2] > max[2])) return false; return true; } - if (1 == WhichPlane) { // 0 & 2 + if (1 == WhichPlane) { // 0 & 2 coord[0] = ray.pos[0] + MaxT[1] * ray.fwd_dir[0]; if ((coord[0] < min[0]) || (coord[0] > max[0])) return false; coord[2] = ray.pos[2] + MaxT[1] * ray.fwd_dir[2]; if ((coord[2] < min[2]) || (coord[2] > max[2])) return false; return true; } - if (2 == WhichPlane) { // 0 & 1 + if (2 == WhichPlane) { // 0 & 1 coord[0] = ray.pos[0] + MaxT[2] * ray.fwd_dir[0]; if ((coord[0] < min[0]) || (coord[0] > max[0])) return false; coord[1] = ray.pos[1] + MaxT[2] * ray.fwd_dir[1]; @@ -130,10 +130,10 @@ ICF BOOL isect_fpu(const Fvector& min, const Fvector& max, const ray_t& ray, Fve #define maxps _mm_max_ps #define mulps _mm_mul_ps #define subps _mm_sub_ps -#define rotatelps(ps) _mm_shuffle_ps((ps), (ps), 0x39) // a,b,c,d -> b,c,d,a -#define muxhps(low, high) _mm_movehl_ps((low), (high)) // low{a,b,c,d}|high{e,f,g,h} = {c,d,g,h} +#define rotatelps(ps) _mm_shuffle_ps((ps), (ps), 0x39) // a,b,c,d -> b,c,d,a +#define muxhps(low, high) _mm_movehl_ps((low), (high)) // low{a,b,c,d}|high{e,f,g,h} = {c,d,g,h} -static const float flt_plus_inf = -logf(0); // let's keep C and C++ compilers happy. +static const float flt_plus_inf = -logf(0); // let's keep C and C++ compilers happy. static const float _MM_ALIGN16 ps_cst_plus_inf[4] = {flt_plus_inf, flt_plus_inf, flt_plus_inf, flt_plus_inf}, ps_cst_minus_inf[4] = {-flt_plus_inf, -flt_plus_inf, -flt_plus_inf, -flt_plus_inf}; @@ -338,7 +338,7 @@ void ISpatial_DB::q_ray( } } else - { // XXX: delete this branch since we always have SSE feature + { // XXX: delete this branch since we always have SSE feature if (_o & O_ONLYFIRST) { if (_o & O_ONLYNEAREST) { walker W(this, _mask_and, _start, _dir, _range); diff --git a/src/xrCDB/Intersect.hpp b/src/xrCDB/Intersect.hpp index 4066a3c2a81..2c068263aff 100644 --- a/src/xrCDB/Intersect.hpp +++ b/src/xrCDB/Intersect.hpp @@ -40,13 +40,13 @@ IC bool TestRayTri(const Fvector& C, const Fvector& D, Fvector** p, float& u, fl if (bCull) { // define TEST_CULL if culling is desired if (det < EPS) return false; - tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec); // calculate U parameter and test bounds + tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec); // calculate U parameter and test bounds if (u < 0.0 || u > det) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec); // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec); // calculate V parameter and test bounds if (v < 0.0 || u + v > det) return false; - range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle + range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle inv_det = 1.0f / det; range *= inv_det; u *= inv_det; @@ -57,13 +57,13 @@ IC bool TestRayTri(const Fvector& C, const Fvector& D, Fvector** p, float& u, fl // the non-culling branch if (det > -EPS && det < EPS) return false; inv_det = 1.0f / det; - tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds if (u < 0.0f || u > 1.0f) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle } return true; } @@ -82,13 +82,13 @@ IC bool TestRayTri(const Fvector& C, const Fvector& D, Fvector* p, float& u, flo if (bCull) { // define TEST_CULL if culling is desired if (det < EPS) return false; - tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec); // calculate U parameter and test bounds + tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec); // calculate U parameter and test bounds if (u < 0.0f || u > det) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec); // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec); // calculate V parameter and test bounds if (v < 0.0f || u + v > det) return false; - range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle + range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle inv_det = 1.0f / det; range *= inv_det; u *= inv_det; @@ -99,13 +99,13 @@ IC bool TestRayTri(const Fvector& C, const Fvector& D, Fvector* p, float& u, flo // the non-culling branch if (det > -EPS && det < EPS) return false; inv_det = 1.0f / det; - tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds if (u < 0.0f || u > 1.0f) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle } return true; } @@ -129,12 +129,12 @@ IC bool TestRayTri2(const Fvector& C, const Fvector& D, Fvector* p, float& range return false; } inv_det = 1.0f / det; - tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects plane + tvec.sub(C, p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects plane if (u < 0.0f || u > 1.0f) return false; - v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; return true; } @@ -156,12 +156,12 @@ IC bool TestRayTri2(const Fvector& C, const Fvector& D, Fvector** p, float& rang return false; } inv_det = 1.0f / det; - tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects plane + tvec.sub(C, *p[0]); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects plane if (u < 0.0f || u > 1.0f) return false; - v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + v = D.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; return true; } @@ -263,85 +263,85 @@ IC bool TestBBoxTri(const Fmatrix33& A, const Fvector& T, const Fvector& extA, F float A2dN = A.k.dotproduct(N); float R = _abs(extA.x * A0dN) + _abs(extA.y * A1dN) + _abs(extA.z * A2dN); float NdD = N.dotproduct(D); - TESTV0(NdD, R); // AXIS_N + TESTV0(NdD, R); // AXIS_N // axis C+t*A0 float A0dD = A.i.dotproduct(D); float A0dE0 = A.i.dotproduct(E[0]); float A0dE1 = A.i.dotproduct(E[1]); - TESTV1(A0dD, A0dE0, A0dE1, extA.x); // AXIS_A0 + TESTV1(A0dD, A0dE0, A0dE1, extA.x); // AXIS_A0 // axis C+t*A1 float A1dD = A.j.dotproduct(D); float A1dE0 = A.j.dotproduct(E[0]); float A1dE1 = A.j.dotproduct(E[1]); - TESTV1(A1dD, A1dE0, A1dE1, extA.y); // AXIS_A1 + TESTV1(A1dD, A1dE0, A1dE1, extA.y); // AXIS_A1 // axis C+t*A2 float A2dD = A.k.dotproduct(D); float A2dE0 = A.k.dotproduct(E[0]); float A2dE1 = A.k.dotproduct(E[1]); - TESTV1(A2dD, A2dE0, A2dE1, extA.z); // AXIS_A2 + TESTV1(A2dD, A2dE0, A2dE1, extA.z); // AXIS_A2 // axis C+t*A0xE0 Fvector A0xE0; A0xE0.crossproduct(A.i, E[0]); float A0xE0dD = A0xE0.dotproduct(D); R = _abs(extA.y * A2dE0) + _abs(extA.z * A1dE0); - TESTV2(A0xE0dD, A0dN, R); // AXIS_A0xE0 + TESTV2(A0xE0dD, A0dN, R); // AXIS_A0xE0 // axis C+t*A0xE1 Fvector A0xE1; A0xE1.crossproduct(A.i, E[1]); float A0xE1dD = A0xE1.dotproduct(D); R = _abs(extA.y * A2dE1) + _abs(extA.z * A1dE1); - TESTV2(A0xE1dD, -A0dN, R); // AXIS_A0xE1 + TESTV2(A0xE1dD, -A0dN, R); // AXIS_A0xE1 // axis C+t*A0xE2 float A1dE2 = A1dE1 - A1dE0; float A2dE2 = A2dE1 - A2dE0; float A0xE2dD = A0xE1dD - A0xE0dD; R = _abs(extA.y * A2dE2) + _abs(extA.z * A1dE2); - TESTV2(A0xE2dD, -A0dN, R); // AXIS_A0xE2 + TESTV2(A0xE2dD, -A0dN, R); // AXIS_A0xE2 // axis C+t*A1xE0 Fvector A1xE0; A1xE0.crossproduct(A.j, E[0]); float A1xE0dD = A1xE0.dotproduct(D); R = _abs(extA.x * A2dE0) + _abs(extA.z * A0dE0); - TESTV2(A1xE0dD, A1dN, R); // AXIS_A1xE0 + TESTV2(A1xE0dD, A1dN, R); // AXIS_A1xE0 // axis C+t*A1xE1 Fvector A1xE1; A1xE1.crossproduct(A.j, E[1]); float A1xE1dD = A1xE1.dotproduct(D); R = _abs(extA.x * A2dE1) + _abs(extA.z * A0dE1); - TESTV2(A1xE1dD, -A1dN, R); // AXIS_A1xE1 + TESTV2(A1xE1dD, -A1dN, R); // AXIS_A1xE1 // axis C+t*A1xE2 float A0dE2 = A0dE1 - A0dE0; float A1xE2dD = A1xE1dD - A1xE0dD; R = _abs(extA.x * A2dE2) + _abs(extA.z * A0dE2); - TESTV2(A1xE2dD, -A1dN, R); // AXIS_A1xE2 + TESTV2(A1xE2dD, -A1dN, R); // AXIS_A1xE2 // axis C+t*A2xE0 Fvector A2xE0; A2xE0.crossproduct(A.k, E[0]); float A2xE0dD = A2xE0.dotproduct(D); R = _abs(extA.x * A1dE0) + _abs(extA.y * A0dE0); - TESTV2(A2xE0dD, A2dN, R); // AXIS_A2xE0 + TESTV2(A2xE0dD, A2dN, R); // AXIS_A2xE0 // axis C+t*A2xE1 Fvector A2xE1; A2xE1.crossproduct(A.k, E[1]); float A2xE1dD = A2xE1.dotproduct(D); R = _abs(extA.x * A1dE1) + _abs(extA.y * A0dE1); - TESTV2(A2xE1dD, -A2dN, R); // AXIS_A2xE1 + TESTV2(A2xE1dD, -A2dN, R); // AXIS_A2xE1 // axis C+t*A2xE2 float A2xE2dD = A2xE1dD - A2xE0dD; R = _abs(extA.x * A1dE2) + _abs(extA.y * A0dE2); - TESTV2(A2xE2dD, -A2dN, R); // AXIS_A2xE2 + TESTV2(A2xE2dD, -A2dN, R); // AXIS_A2xE2 // intersection occurs return true; @@ -364,85 +364,85 @@ IC bool TestBBoxTri(const Fmatrix33& A, const Fvector& T, const Fvector& extA, F float A2dN = A.k.dotproduct(N); float R = _abs(extA.x * A0dN) + _abs(extA.y * A1dN) + _abs(extA.z * A2dN); float NdD = N.dotproduct(D); - TESTV0(NdD, R); // AXIS_N + TESTV0(NdD, R); // AXIS_N // axis C+t*A0 float A0dD = A.i.dotproduct(D); float A0dE0 = A.i.dotproduct(E[0]); float A0dE1 = A.i.dotproduct(E[1]); - TESTV1(A0dD, A0dE0, A0dE1, extA.x); // AXIS_A0 + TESTV1(A0dD, A0dE0, A0dE1, extA.x); // AXIS_A0 // axis C+t*A1 float A1dD = A.j.dotproduct(D); float A1dE0 = A.j.dotproduct(E[0]); float A1dE1 = A.j.dotproduct(E[1]); - TESTV1(A1dD, A1dE0, A1dE1, extA.y); // AXIS_A1 + TESTV1(A1dD, A1dE0, A1dE1, extA.y); // AXIS_A1 // axis C+t*A2 float A2dD = A.k.dotproduct(D); float A2dE0 = A.k.dotproduct(E[0]); float A2dE1 = A.k.dotproduct(E[1]); - TESTV1(A2dD, A2dE0, A2dE1, extA.z); // AXIS_A2 + TESTV1(A2dD, A2dE0, A2dE1, extA.z); // AXIS_A2 // axis C+t*A0xE0 Fvector A0xE0; A0xE0.crossproduct(A.i, E[0]); float A0xE0dD = A0xE0.dotproduct(D); R = _abs(extA.y * A2dE0) + _abs(extA.z * A1dE0); - TESTV2(A0xE0dD, A0dN, R); // AXIS_A0xE0 + TESTV2(A0xE0dD, A0dN, R); // AXIS_A0xE0 // axis C+t*A0xE1 Fvector A0xE1; A0xE1.crossproduct(A.i, E[1]); float A0xE1dD = A0xE1.dotproduct(D); R = _abs(extA.y * A2dE1) + _abs(extA.z * A1dE1); - TESTV2(A0xE1dD, -A0dN, R); // AXIS_A0xE1 + TESTV2(A0xE1dD, -A0dN, R); // AXIS_A0xE1 // axis C+t*A0xE2 float A1dE2 = A1dE1 - A1dE0; float A2dE2 = A2dE1 - A2dE0; float A0xE2dD = A0xE1dD - A0xE0dD; R = _abs(extA.y * A2dE2) + _abs(extA.z * A1dE2); - TESTV2(A0xE2dD, -A0dN, R); // AXIS_A0xE2 + TESTV2(A0xE2dD, -A0dN, R); // AXIS_A0xE2 // axis C+t*A1xE0 Fvector A1xE0; A1xE0.crossproduct(A.j, E[0]); float A1xE0dD = A1xE0.dotproduct(D); R = _abs(extA.x * A2dE0) + _abs(extA.z * A0dE0); - TESTV2(A1xE0dD, A1dN, R); // AXIS_A1xE0 + TESTV2(A1xE0dD, A1dN, R); // AXIS_A1xE0 // axis C+t*A1xE1 Fvector A1xE1; A1xE1.crossproduct(A.j, E[1]); float A1xE1dD = A1xE1.dotproduct(D); R = _abs(extA.x * A2dE1) + _abs(extA.z * A0dE1); - TESTV2(A1xE1dD, -A1dN, R); // AXIS_A1xE1 + TESTV2(A1xE1dD, -A1dN, R); // AXIS_A1xE1 // axis C+t*A1xE2 float A0dE2 = A0dE1 - A0dE0; float A1xE2dD = A1xE1dD - A1xE0dD; R = _abs(extA.x * A2dE2) + _abs(extA.z * A0dE2); - TESTV2(A1xE2dD, -A1dN, R); // AXIS_A1xE2 + TESTV2(A1xE2dD, -A1dN, R); // AXIS_A1xE2 // axis C+t*A2xE0 Fvector A2xE0; A2xE0.crossproduct(A.k, E[0]); float A2xE0dD = A2xE0.dotproduct(D); R = _abs(extA.x * A1dE0) + _abs(extA.y * A0dE0); - TESTV2(A2xE0dD, A2dN, R); // AXIS_A2xE0 + TESTV2(A2xE0dD, A2dN, R); // AXIS_A2xE0 // axis C+t*A2xE1 Fvector A2xE1; A2xE1.crossproduct(A.k, E[1]); float A2xE1dD = A2xE1.dotproduct(D); R = _abs(extA.x * A1dE1) + _abs(extA.y * A0dE1); - TESTV2(A2xE1dD, -A2dN, R); // AXIS_A2xE1 + TESTV2(A2xE1dD, -A2dN, R); // AXIS_A2xE1 // axis C+t*A2xE2 float A2xE2dD = A2xE1dD - A2xE0dD; R = _abs(extA.x * A1dE2) + _abs(extA.y * A0dE2); - TESTV2(A2xE2dD, -A2dN, R); // AXIS_A2xE2 + TESTV2(A2xE2dD, -A2dN, R); // AXIS_A2xE2 // intersection occurs return true; diff --git a/src/xrCDB/OPC_AABB.h b/src/xrCDB/OPC_AABB.h index fa8ab0abb21..f00598fa5ad 100644 --- a/src/xrCDB/OPC_AABB.h +++ b/src/xrCDB/OPC_AABB.h @@ -12,7 +12,7 @@ #ifndef __ICEAABB_H__ #define __ICEAABB_H__ -#define USE_MINMAX // if defined, use (Min, Max) AABBs, else use (Center, Extents) ones. +#define USE_MINMAX // if defined, use (Min, Max) AABBs, else use (Center, Extents) ones. //! Declarations of type-independent methods (implemented in the .cpp) #define AABB_COMMON_METHODS \ @@ -22,8 +22,8 @@ enum AABBType { - AABB_RENDER = 0, //!< AABB used for rendering. Not visible == not rendered. - AABB_UPDATE = 1, //!< AABB used for dynamic updates. Not visible == not updated. + AABB_RENDER = 0, //!< AABB used for rendering. Not visible == not rendered. + AABB_UPDATE = 1, //!< AABB used for dynamic updates. Not visible == not updated. AABB_FORCE_DWORD = 0x7fffffff, }; @@ -287,8 +287,8 @@ class MESHMERIZER_API AABB } private: - Point mMin; //!< Min point - Point mMax; //!< Max point + Point mMin; //!< Min point + Point mMax; //!< Max point }; #else @@ -436,7 +436,7 @@ class MESHMERIZER_API AABB /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// inline_ bool GomezIntersect(const AABB& a) { - Point T = mCenter - a.mCenter; // Vector from A to B + Point T = mCenter - a.mCenter; // Vector from A to B return ((fabsf(T.x) <= (a.mExtents.x + mExtents.x)) && (fabsf(T.y) <= (a.mExtents.y + mExtents.y)) && (fabsf(T.z) <= (a.mExtents.z + mExtents.z))); } @@ -527,8 +527,8 @@ class MESHMERIZER_API AABB } private: - Point mCenter; //!< AABB Center - Point mExtents; //!< x, y and z extents + Point mCenter; //!< AABB Center + Point mExtents; //!< x, y and z extents }; #endif @@ -558,4 +558,4 @@ inline_ void ComputeAABB(AABB& aabb, const Point* list, udword nbpts) } } -#endif // __ICEAABB_H__ +#endif // __ICEAABB_H__ diff --git a/src/xrCDB/OPC_AABBCollider.h b/src/xrCDB/OPC_AABBCollider.h index 866b91d15c8..6c2205b5de6 100644 --- a/src/xrCDB/OPC_AABBCollider.h +++ b/src/xrCDB/OPC_AABBCollider.h @@ -29,9 +29,9 @@ struct OPCODE_API AABBCache : VolumeCache } // Cached faces signature - CollisionAABB FatBox; //!< Box used when performing the query resulting in cached faces + CollisionAABB FatBox; //!< Box used when performing the query resulting in cached faces // User settings - float FatCoeff; //!< mRadius2 multiplier used to create a fat sphere + float FatCoeff; //!< mRadius2 multiplier used to create a fat sphere }; class OPCODE_API AABBCollider : public VolumeCollider @@ -76,12 +76,12 @@ class OPCODE_API AABBCollider : public VolumeCollider override(Collider) const char* ValidateSettings(); protected: - CollisionAABB mBox; //!< Query box in (center, extents) form - Point mMin; //!< Query box min point - Point mMax; //!< Query box max point - // Leaf description - Point mLeafVerts[3]; //!< Triangle vertices - // Internal methods + CollisionAABB mBox; //!< Query box in (center, extents) form + Point mMin; //!< Query box min point + Point mMax; //!< Query box max point + // Leaf description + Point mLeafVerts[3]; //!< Triangle vertices + // Internal methods void _Collide(const AABBCollisionNode* node); void _Collide(const AABBNoLeafNode* node); void _Collide(const AABBQuantizedNode* node); @@ -95,4 +95,4 @@ class OPCODE_API AABBCollider : public VolumeCollider BOOL InitQuery(AABBCache& cache, const CollisionAABB& box); }; -#endif // __OPC_AABBCOLLIDER_H__ +#endif // __OPC_AABBCOLLIDER_H__ diff --git a/src/xrCDB/OPC_AABBTree.cpp b/src/xrCDB/OPC_AABBTree.cpp index 8094ba0a720..126bec22151 100644 --- a/src/xrCDB/OPC_AABBTree.cpp +++ b/src/xrCDB/OPC_AABBTree.cpp @@ -50,7 +50,7 @@ namespace Opcode { #include "OPC_TreeBuilders.h" -} // namespace Opcode +} // namespace Opcode using namespace Opcode; @@ -82,7 +82,7 @@ void AABBTreeNode::destroy(AABBTreeBuilder* _tree) mN->destroy(_tree); _tree->node_destroy(mN); } - mNodePrimitives = null; // This was just a shortcut to the global list => no release + mNodePrimitives = null; // This was just a shortcut to the global list => no release mNbPrimitives = 0; } @@ -158,13 +158,13 @@ bool AABBTreeNode::Subdivide(AABBTreeBuilder* builder) // Check the user-defined limit if (mNbPrimitives <= builder->mLimit) return true; - bool ValidSplit = true; // Optimism... + bool ValidSplit = true; // Optimism... udword NbPos = 0; if (builder->mRules & SPLIT_LARGESTAXIS) { // Find the largest axis to split along Point Extents; - mBV.GetExtents(Extents); // Box extents - udword Axis = Extents.LargestAxis(); // Index of largest axis + mBV.GetExtents(Extents); // Box extents + udword Axis = Extents.LargestAxis(); // Index of largest axis // Split along the axis NbPos = Split(Axis, builder); @@ -240,7 +240,7 @@ bool AABBTreeNode::Subdivide(AABBTreeBuilder* builder) // Sort axis Point Extents; - mBV.GetExtents(Extents); // Box extents + mBV.GetExtents(Extents); // Box extents udword SortedAxis[] = {0, 1, 2}; float* Keys = (float*)&Extents.x; for (udword j = 0; j < 3; j++) @@ -274,7 +274,7 @@ bool AABBTreeNode::Subdivide(AABBTreeBuilder* builder) NbPos = mNbPrimitives >> 1; } else - return false; // Unknown splitting rules + return false; // Unknown splitting rules // Check the subdivision has been successful if (!ValidSplit) { diff --git a/src/xrCDB/OPC_AABBTree.h b/src/xrCDB/OPC_AABBTree.h index f2633a0224f..ad406dff0f1 100644 --- a/src/xrCDB/OPC_AABBTree.h +++ b/src/xrCDB/OPC_AABBTree.h @@ -54,9 +54,9 @@ class OPCODE_API AABBTreeNode protected: // Tree-dependent data - udword* mNodePrimitives; //!< Node-related primitives (shortcut to a position in mIndices below) - udword mNbPrimitives; //!< Number of primitives for this node - // Internal methods + udword* mNodePrimitives; //!< Node-related primitives (shortcut to a position in mIndices below) + udword mNbPrimitives; //!< Number of primitives for this node + // Internal methods udword Split(udword axis, AABBTreeBuilder* builder); bool Subdivide(AABBTreeBuilder* builder); void _BuildHierarchy(AABBTreeBuilder* builder); @@ -71,18 +71,18 @@ class OPCODE_API AABBTree : public AABBTreeNode // Build bool Build(AABBTreeBuilder* builder); // Data access - inline_ const udword* GetIndices() const { return mIndices; } //!< Catch the indices - inline_ udword GetNbNodes() const { return mTotalNbNodes; } //!< Catch the number of nodes - // Infos + inline_ const udword* GetIndices() const { return mIndices; } //!< Catch the indices + inline_ udword GetNbNodes() const { return mTotalNbNodes; } //!< Catch the number of nodes + // Infos bool IsComplete() const; // Stats udword ComputeDepth() const; udword GetUsedBytes() const; private: - udword* mIndices; //!< Indices in the app list. Indices are reorganized during build. - // Stats - udword mTotalNbNodes; //!< Number of nodes in the tree. + udword* mIndices; //!< Indices in the app list. Indices are reorganized during build. + // Stats + udword mTotalNbNodes; //!< Number of nodes in the tree. }; -#endif // __OPC_AABBTREE_H__ +#endif // __OPC_AABBTREE_H__ diff --git a/src/xrCDB/OPC_BVTCache.h b/src/xrCDB/OPC_BVTCache.h index e9eb0e9fe1a..076a9933ead 100644 --- a/src/xrCDB/OPC_BVTCache.h +++ b/src/xrCDB/OPC_BVTCache.h @@ -41,29 +41,29 @@ struct OPCODE_API BVTCache : Pair Model1 = null; id0 = 0; id1 = 1; -#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! +#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! HullTest = true; SepVector.pid = 0; SepVector.qid = 0; SepVector.SV = Point(1.0f, 0.0f, 0.0f); -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ } inline_ void ResetCountDown() { -#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! +#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! CountDown = 50; -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ } - OPCODE_Model* Model0; //!< Model for first object - OPCODE_Model* Model1; //!< Model for second object + OPCODE_Model* Model0; //!< Model for first object + OPCODE_Model* Model1; //!< Model for second object -#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! +#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! SVCache SepVector; udword CountDown; bool HullTest; -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ }; -#endif // __OPC_BVTCACHE_H__ \ No newline at end of file +#endif // __OPC_BVTCACHE_H__ \ No newline at end of file diff --git a/src/xrCDB/OPC_BoundingSphere.h b/src/xrCDB/OPC_BoundingSphere.h index eb5990890fc..99817a021d5 100644 --- a/src/xrCDB/OPC_BoundingSphere.h +++ b/src/xrCDB/OPC_BoundingSphere.h @@ -116,8 +116,8 @@ class MESHMERIZER_API Sphere } public: - Point mCenter; //!< Sphere center - float mRadius; //!< Sphere radius + Point mCenter; //!< Sphere center + float mRadius; //!< Sphere radius #ifdef OLD private: Sphere PlanarCircumscribe3(const Point& p0, const Point& p1, const Point& p2); @@ -134,4 +134,4 @@ class MESHMERIZER_API Sphere #endif }; -#endif // __ICEBOUNDINGSPHERE_H__ +#endif // __ICEBOUNDINGSPHERE_H__ diff --git a/src/xrCDB/OPC_BoxBoxOverlap.h b/src/xrCDB/OPC_BoxBoxOverlap.h index aba932b658c..af5c053489d 100644 --- a/src/xrCDB/OPC_BoxBoxOverlap.h +++ b/src/xrCDB/OPC_BoxBoxOverlap.h @@ -55,31 +55,31 @@ inline_ BOOL AABBTreeCollider::BoxBoxOverlap(const Point& ea, const Point& ca, c if (mFullBoxBoxTest || mNbBVBVTests == 1) { t = Tz * mR1to0.m[0][1] - Ty * mR1to0.m[0][2]; t2 = ea.y * mAR.m[0][2] + ea.z * mAR.m[0][1] + eb.y * mAR.m[2][0] + eb.z * mAR.m[1][0]; - if (GREATER(t, t2)) return FALSE; // L = A0 x B0 + if (GREATER(t, t2)) return FALSE; // L = A0 x B0 t = Tz * mR1to0.m[1][1] - Ty * mR1to0.m[1][2]; t2 = ea.y * mAR.m[1][2] + ea.z * mAR.m[1][1] + eb.x * mAR.m[2][0] + eb.z * mAR.m[0][0]; - if (GREATER(t, t2)) return FALSE; // L = A0 x B1 + if (GREATER(t, t2)) return FALSE; // L = A0 x B1 t = Tz * mR1to0.m[2][1] - Ty * mR1to0.m[2][2]; t2 = ea.y * mAR.m[2][2] + ea.z * mAR.m[2][1] + eb.x * mAR.m[1][0] + eb.y * mAR.m[0][0]; - if (GREATER(t, t2)) return FALSE; // L = A0 x B2 + if (GREATER(t, t2)) return FALSE; // L = A0 x B2 t = Tx * mR1to0.m[0][2] - Tz * mR1to0.m[0][0]; t2 = ea.x * mAR.m[0][2] + ea.z * mAR.m[0][0] + eb.y * mAR.m[2][1] + eb.z * mAR.m[1][1]; - if (GREATER(t, t2)) return FALSE; // L = A1 x B0 + if (GREATER(t, t2)) return FALSE; // L = A1 x B0 t = Tx * mR1to0.m[1][2] - Tz * mR1to0.m[1][0]; t2 = ea.x * mAR.m[1][2] + ea.z * mAR.m[1][0] + eb.x * mAR.m[2][1] + eb.z * mAR.m[0][1]; - if (GREATER(t, t2)) return FALSE; // L = A1 x B1 + if (GREATER(t, t2)) return FALSE; // L = A1 x B1 t = Tx * mR1to0.m[2][2] - Tz * mR1to0.m[2][0]; t2 = ea.x * mAR.m[2][2] + ea.z * mAR.m[2][0] + eb.x * mAR.m[1][1] + eb.y * mAR.m[0][1]; - if (GREATER(t, t2)) return FALSE; // L = A1 x B2 + if (GREATER(t, t2)) return FALSE; // L = A1 x B2 t = Ty * mR1to0.m[0][0] - Tx * mR1to0.m[0][1]; t2 = ea.x * mAR.m[0][1] + ea.y * mAR.m[0][0] + eb.y * mAR.m[2][2] + eb.z * mAR.m[1][2]; - if (GREATER(t, t2)) return FALSE; // L = A2 x B0 + if (GREATER(t, t2)) return FALSE; // L = A2 x B0 t = Ty * mR1to0.m[1][0] - Tx * mR1to0.m[1][1]; t2 = ea.x * mAR.m[1][1] + ea.y * mAR.m[1][0] + eb.x * mAR.m[2][2] + eb.z * mAR.m[0][2]; - if (GREATER(t, t2)) return FALSE; // L = A2 x B1 + if (GREATER(t, t2)) return FALSE; // L = A2 x B1 t = Ty * mR1to0.m[2][0] - Tx * mR1to0.m[2][1]; t2 = ea.x * mAR.m[2][1] + ea.y * mAR.m[2][0] + eb.x * mAR.m[1][2] + eb.y * mAR.m[0][2]; - if (GREATER(t, t2)) return FALSE; // L = A2 x B2 + if (GREATER(t, t2)) return FALSE; // L = A2 x B2 } return TRUE; } @@ -122,31 +122,31 @@ inline_ BOOL OBBCollider::BoxBoxOverlap(const Point& extents, const Point& cente if (mFullBoxBoxTest || mNbVolumeBVTests == 1) { t = Tz * mRBoxToModel.m[0][1] - Ty * mRBoxToModel.m[0][2]; t2 = extents.y * mAR.m[0][2] + extents.z * mAR.m[0][1] + mBB_1; - if (GREATER(t, t2)) return FALSE; // L = A0 x B0 + if (GREATER(t, t2)) return FALSE; // L = A0 x B0 t = Tz * mRBoxToModel.m[1][1] - Ty * mRBoxToModel.m[1][2]; t2 = extents.y * mAR.m[1][2] + extents.z * mAR.m[1][1] + mBB_2; - if (GREATER(t, t2)) return FALSE; // L = A0 x B1 + if (GREATER(t, t2)) return FALSE; // L = A0 x B1 t = Tz * mRBoxToModel.m[2][1] - Ty * mRBoxToModel.m[2][2]; t2 = extents.y * mAR.m[2][2] + extents.z * mAR.m[2][1] + mBB_3; - if (GREATER(t, t2)) return FALSE; // L = A0 x B2 + if (GREATER(t, t2)) return FALSE; // L = A0 x B2 t = Tx * mRBoxToModel.m[0][2] - Tz * mRBoxToModel.m[0][0]; t2 = extents.x * mAR.m[0][2] + extents.z * mAR.m[0][0] + mBB_4; - if (GREATER(t, t2)) return FALSE; // L = A1 x B0 + if (GREATER(t, t2)) return FALSE; // L = A1 x B0 t = Tx * mRBoxToModel.m[1][2] - Tz * mRBoxToModel.m[1][0]; t2 = extents.x * mAR.m[1][2] + extents.z * mAR.m[1][0] + mBB_5; - if (GREATER(t, t2)) return FALSE; // L = A1 x B1 + if (GREATER(t, t2)) return FALSE; // L = A1 x B1 t = Tx * mRBoxToModel.m[2][2] - Tz * mRBoxToModel.m[2][0]; t2 = extents.x * mAR.m[2][2] + extents.z * mAR.m[2][0] + mBB_6; - if (GREATER(t, t2)) return FALSE; // L = A1 x B2 + if (GREATER(t, t2)) return FALSE; // L = A1 x B2 t = Ty * mRBoxToModel.m[0][0] - Tx * mRBoxToModel.m[0][1]; t2 = extents.x * mAR.m[0][1] + extents.y * mAR.m[0][0] + mBB_7; - if (GREATER(t, t2)) return FALSE; // L = A2 x B0 + if (GREATER(t, t2)) return FALSE; // L = A2 x B0 t = Ty * mRBoxToModel.m[1][0] - Tx * mRBoxToModel.m[1][1]; t2 = extents.x * mAR.m[1][1] + extents.y * mAR.m[1][0] + mBB_8; - if (GREATER(t, t2)) return FALSE; // L = A2 x B1 + if (GREATER(t, t2)) return FALSE; // L = A2 x B1 t = Ty * mRBoxToModel.m[2][0] - Tx * mRBoxToModel.m[2][1]; t2 = extents.x * mAR.m[2][1] + extents.y * mAR.m[2][0] + mBB_9; - if (GREATER(t, t2)) return FALSE; // L = A2 x B2 + if (GREATER(t, t2)) return FALSE; // L = A2 x B2 } return TRUE; } diff --git a/src/xrCDB/OPC_Collider.h b/src/xrCDB/OPC_Collider.h index 74185e84d80..4b9ba2376d9 100644 --- a/src/xrCDB/OPC_Collider.h +++ b/src/xrCDB/OPC_Collider.h @@ -22,10 +22,10 @@ enum CollisionFlag { - OPC_FIRST_CONTACT = (1 << 0), //!< Report all contacts (false) or only first one (true) - OPC_TEMPORAL_COHERENCE = (1 << 1), //!< Use temporal coherence or not - OPC_CONTACT = (1 << 2), //!< Final contact status after a collision query - OPC_TEMPORAL_HIT = (1 << 3), //!< There has been an early exit due to temporal coherence + OPC_FIRST_CONTACT = (1 << 0), //!< Report all contacts (false) or only first one (true) + OPC_TEMPORAL_COHERENCE = (1 << 1), //!< Use temporal coherence or not + OPC_CONTACT = (1 << 2), //!< Final contact status after a collision query + OPC_TEMPORAL_HIT = (1 << 3), //!< There has been an early exit due to temporal coherence OPC_CONTACT_FOUND = OPC_FIRST_CONTACT | OPC_CONTACT, OPC_TEMPORAL_CONTACT = OPC_TEMPORAL_HIT | OPC_CONTACT, @@ -123,7 +123,7 @@ class OPCODE_API Collider // return "Collider::ValidateSettings: pure virtual function called!"; // } protected: - udword mFlags; //!< Bit flags + udword mFlags; //!< Bit flags // Internal methods /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -134,4 +134,4 @@ class OPCODE_API Collider virtual inline_ void InitQueryEx() { mFlags &= ~OPC_TEMPORAL_CONTACT; } }; -#endif // __OPC_COLLIDER_H__ +#endif // __OPC_COLLIDER_H__ diff --git a/src/xrCDB/OPC_Common.h b/src/xrCDB/OPC_Common.h index 44a992db980..64bcce8d7a6 100644 --- a/src/xrCDB/OPC_Common.h +++ b/src/xrCDB/OPC_Common.h @@ -77,8 +77,8 @@ class OPCODE_API CollisionAABB return true; } - Point mCenter; //!< Box center - Point mExtents; //!< Box extents + Point mCenter; //!< Box center + Point mExtents; //!< Box extents }; class OPCODE_API QuantizedAABB @@ -88,8 +88,8 @@ class OPCODE_API QuantizedAABB inline_ QuantizedAABB() {} //! Destructor inline_ ~QuantizedAABB() {} - sword mCenter[3]; //!< Quantized center - uword mExtents[3]; //!< Quantized extents + sword mCenter[3]; //!< Quantized center + uword mExtents[3]; //!< Quantized extents }; class OPCODE_API CollisionFace @@ -99,9 +99,9 @@ class OPCODE_API CollisionFace inline_ CollisionFace() {} //! Destructor inline_ ~CollisionFace() {} - udword mFaceID; //!< Index of touched face - float mDistance; //!< Distance from collider to hitpoint - float mU, mV; //!< Impact barycentric coordinates + udword mFaceID; //!< Index of touched face + float mDistance; //!< Distance from collider to hitpoint + float mU, mV; //!< Impact barycentric coordinates }; class OPCODE_API CollisionFaces : private Container @@ -125,4 +125,4 @@ inline_ void TransformPoint(Point& dest, const Point& source, const Matrix3x3& r dest.z = trans.z + source.x * rot.m[0][2] + source.y * rot.m[1][2] + source.z * rot.m[2][2]; } -#endif //__OPC_COMMON_H__ \ No newline at end of file +#endif //__OPC_COMMON_H__ \ No newline at end of file diff --git a/src/xrCDB/OPC_Container.cpp b/src/xrCDB/OPC_Container.cpp index 23ff8bb72c8..d8919ae0b82 100644 --- a/src/xrCDB/OPC_Container.cpp +++ b/src/xrCDB/OPC_Container.cpp @@ -90,7 +90,7 @@ bool Container::Resize(udword needed) #endif // Get more entries - mMaxNbEntries = mMaxNbEntries ? udword(float(mMaxNbEntries) * mGrowthFactor) : 2; // Default nb Entries = 2 + mMaxNbEntries = mMaxNbEntries ? udword(float(mMaxNbEntries) * mGrowthFactor) : 2; // Default nb Entries = 2 if (mMaxNbEntries < mCurNbEntries + needed) mMaxNbEntries = mCurNbEntries + needed; // Get some bytes for _new_ entries diff --git a/src/xrCDB/OPC_Container.h b/src/xrCDB/OPC_Container.h index fdb8abd12ab..af440e50ded 100644 --- a/src/xrCDB/OPC_Container.h +++ b/src/xrCDB/OPC_Container.h @@ -165,12 +165,12 @@ class ICECORE_API Container Container& FindNext(udword& entry, bool wrap = false); Container& FindPrev(udword& entry, bool wrap = false); // Data access. - inline_ udword GetNbEntries() const { return mCurNbEntries; } //!< Returns the current number of entries. - inline_ udword GetEntry(udword i) const { return mEntries[i]; } //!< Returns ith entry - inline_ udword* GetEntries() const { return mEntries; } //!< Returns the list of entries. + inline_ udword GetNbEntries() const { return mCurNbEntries; } //!< Returns the current number of entries. + inline_ udword GetEntry(udword i) const { return mEntries[i]; } //!< Returns ith entry + inline_ udword* GetEntries() const { return mEntries; } //!< Returns the list of entries. // Growth control - inline_ float GetGrowthFactor() const { return mGrowthFactor; } //!< Returns the growth factor - inline_ void SetGrowthFactor(float growth) { mGrowthFactor = growth; } //!< Sets the growth factor + inline_ float GetGrowthFactor() const { return mGrowthFactor; } //!< Returns the growth factor + inline_ void SetGrowthFactor(float growth) { mGrowthFactor = growth; } //!< Sets the growth factor //! Access as an array inline_ udword& operator[](udword i) const { @@ -193,17 +193,17 @@ class ICECORE_API Container inline_ udword GetNbContainers() const { return mNbContainers; } inline_ udword GetTotalBytes() const { return mUsedRam; } private: - static udword mNbContainers; //!< Number of containers around - static udword mUsedRam; //!< Amount of bytes used by containers in the system + static udword mNbContainers; //!< Number of containers around + static udword mUsedRam; //!< Amount of bytes used by containers in the system #endif private: // Resizing bool Resize(udword needed = 1); // Data - udword mMaxNbEntries; //!< Maximum possible number of entries - udword mCurNbEntries; //!< Current number of entries - udword* mEntries; //!< List of entries - float mGrowthFactor; //!< Resize: _new_ number of entries = old number * mGrowthFactor + udword mMaxNbEntries; //!< Maximum possible number of entries + udword mCurNbEntries; //!< Current number of entries + udword* mEntries; //!< List of entries + float mGrowthFactor; //!< Resize: _new_ number of entries = old number * mGrowthFactor }; class ICECORE_API Pairs : public Container @@ -221,4 +221,4 @@ class ICECORE_API Pairs : public Container } }; -#endif // __ICECONTAINER_H__ +#endif // __ICECONTAINER_H__ diff --git a/src/xrCDB/OPC_FPU.h b/src/xrCDB/OPC_FPU.h index 648d25207f1..2f73762e209 100644 --- a/src/xrCDB/OPC_FPU.h +++ b/src/xrCDB/OPC_FPU.h @@ -145,7 +145,7 @@ inline_ float ComputeFloatEpsilon() { float f = 1.0f; ((udword&)f) ^= 1; - return f - 1.0f; // You can check it's the same as FLT_EPSILON + return f - 1.0f; // You can check it's the same as FLT_EPSILON } inline_ bool IsFloatZero(float x, float epsilon = 1e-6f) @@ -237,4 +237,4 @@ FUNCTION ICECORE_API int intChop(const float& f); FUNCTION ICECORE_API int intFloor(const float& f); FUNCTION ICECORE_API int intCeil(const float& f); -#endif // __ICEFPU_H__ +#endif // __ICEFPU_H__ diff --git a/src/xrCDB/OPC_Matrix3x3.cpp b/src/xrCDB/OPC_Matrix3x3.cpp index 2ff35e28cc9..5afa402d046 100644 --- a/src/xrCDB/OPC_Matrix3x3.cpp +++ b/src/xrCDB/OPC_Matrix3x3.cpp @@ -115,7 +115,7 @@ Matrix3x3& Matrix3x3::FromTo(const Point& from, const Point& to) m[1][2] = m[2][1]; m[2][2] = fzz + uzz + lzz; } - else // the most common case, unless "from"="to", or "from"=-"to" + else // the most common case, unless "from"="to", or "from"=-"to" { #if 0 // unoptimized version - a good compiler will optimize this. diff --git a/src/xrCDB/OPC_Matrix3x3.h b/src/xrCDB/OPC_Matrix3x3.h index b00fee74d89..2896dbd80d5 100644 --- a/src/xrCDB/OPC_Matrix3x3.h +++ b/src/xrCDB/OPC_Matrix3x3.h @@ -425,7 +425,7 @@ class ICEMATHS_API Matrix3x3 //! Invert the matrix. Determinant must be different from zero, else matrix can't be inverted. Matrix3x3& Invert() { - float Det = Determinant(); // Must be !=0 + float Det = Determinant(); // Must be !=0 Matrix3x3 Temp; float OneOverDet = 1.0f / Det; @@ -467,7 +467,7 @@ class ICEMATHS_API Matrix3x3 Matrix3x3& Exp(const Matrix3x3& a) { const int NbTerms = 100; - Matrix3x3 Term; // next term in series + Matrix3x3 Term; // next term in series Matrix3x3 Temp; Identity(); @@ -645,4 +645,4 @@ class ICEMATHS_API Matrix3x3 float m[3][3]; }; -#endif // __ICEMATRIX3X3_H__ +#endif // __ICEMATRIX3X3_H__ diff --git a/src/xrCDB/OPC_Matrix4x4.cpp b/src/xrCDB/OPC_Matrix4x4.cpp index d25ad100afd..1062a30551f 100644 --- a/src/xrCDB/OPC_Matrix4x4.cpp +++ b/src/xrCDB/OPC_Matrix4x4.cpp @@ -104,7 +104,7 @@ Matrix4x4& Matrix4x4::Invert() float Det = Determinant(); Matrix4x4 Temp; - if (_abs(Det) < MATRIX4X4_EPSILON) return *this; // The matrix is not invertible! Singular case! + if (_abs(Det) < MATRIX4X4_EPSILON) return *this; // The matrix is not invertible! Singular case! float IDet = 1.0f / Det; @@ -456,7 +456,7 @@ Matrix::operator PRS() const float ScaleFactor; Point Scale, Row, NormalizedRow; - if (IsIdentity()) { // The special case of the identity matrix + if (IsIdentity()) { // The special case of the identity matrix Cast.SetScale(1.0f, 1.0f, 1.0f).SetQuaternion((Quat)(*this)); } else diff --git a/src/xrCDB/OPC_Matrix4x4.h b/src/xrCDB/OPC_Matrix4x4.h index bb5741bb323..c8e7cedc0b0 100644 --- a/src/xrCDB/OPC_Matrix4x4.h +++ b/src/xrCDB/OPC_Matrix4x4.h @@ -107,8 +107,9 @@ class ICEMATHS_API Matrix4x4 m[3][2] = p.z; } //! Sets the translation part of the matrix, from a HPoint. - // inline_ void SetTrans(const HPoint& p) { m[3][0]=p.x; m[3][1]=p.y; m[3][2]=p.z; - //m[3][3]=p.w; } + // inline_ void SetTrans(const HPoint& p) { m[3][0]=p.x; m[3][1]=p.y; + //m[3][2]=p.z; + // m[3][3]=p.w; } //! Sets the translation part of the matrix, from floats. inline_ void SetTrans(float tx, float ty, float tz) { @@ -163,8 +164,9 @@ class ICEMATHS_API Matrix4x4 inline_ void Copy(const Matrix4x4& source) { CopyMemory(m, source.m, 16 * sizeof(float)); } // Row-column access //! Returns a row. - // inline_ void GetRow(const udword r, HPoint& p) const { p.x=m[r][0]; p.y=m[r][1]; p.z=m[r][2]; - //p.w=m[r][3]; } + // inline_ void GetRow(const udword r, HPoint& p) const { p.x=m[r][0]; p.y=m[r][1]; + //p.z=m[r][2]; + // p.w=m[r][3]; } //! Returns a row. inline_ void GetRow(const udword r, Point& p) const { @@ -173,8 +175,9 @@ class ICEMATHS_API Matrix4x4 p.z = m[r][2]; } //! Sets a row. - // inline_ void SetRow(const udword r, const HPoint& p) { m[r][0]=p.x; m[r][1]=p.y; m[r][2]=p.z; - //m[r][3]=p.w; } + // inline_ void SetRow(const udword r, const HPoint& p) { m[r][0]=p.x; m[r][1]=p.y; + //m[r][2]=p.z; + // m[r][3]=p.w; } //! Sets a row. inline_ void SetRow(const udword r, const Point& p) { @@ -184,8 +187,9 @@ class ICEMATHS_API Matrix4x4 m[r][3] = (r != 3) ? 0.0f : 1.0f; } //! Returns a column. - // inline_ void GetCol(const udword c, HPoint& p) const { p.x=m[0][c]; p.y=m[1][c]; p.z=m[2][c]; - //p.w=m[3][c]; } + // inline_ void GetCol(const udword c, HPoint& p) const { p.x=m[0][c]; p.y=m[1][c]; + //p.z=m[2][c]; + // p.w=m[3][c]; } //! Returns a column. inline_ void GetCol(const udword c, Point& p) const { @@ -194,8 +198,9 @@ class ICEMATHS_API Matrix4x4 p.z = m[2][c]; } //! Sets a column. - // inline_ void SetCol(const udword c, const HPoint& p) { m[0][c]=p.x; m[1][c]=p.y; m[2][c]=p.z; - //m[3][c]=p.w; } + // inline_ void SetCol(const udword c, const HPoint& p) { m[0][c]=p.x; m[1][c]=p.y; + //m[2][c]=p.z; + // m[3][c]=p.w; } //! Sets a column. inline_ void SetCol(const udword c, const Point& p) { @@ -420,8 +425,9 @@ class ICEMATHS_API Matrix4x4 } //! Operator for HPoint Mul = Matrix4x4 * HPoint; - // inline_ HPoint operator*(const HPoint& v) const { return HPoint(ROW[0]|v, ROW[1]|v, ROW[2]|v, - //ROW[3]|v); } + // inline_ HPoint operator*(const HPoint& v) const { return HPoint(ROW[0]|v, ROW[1]|v, + //ROW[2]|v, + // ROW[3]|v); } //! Operator for Point Mul = Matrix4x4 * Point; inline_ Point operator*(const Point& v) const @@ -626,4 +632,4 @@ inline_ void TransformPoint3x3(Point& dest, const Point& source, const Matrix4x4 ICEMATHS_API void InvertPRMatrix(Matrix4x4& dest, const Matrix4x4& src); -#endif // __ICEMATRIX4X4_H__ +#endif // __ICEMATRIX4X4_H__ diff --git a/src/xrCDB/OPC_MemoryMacros.h b/src/xrCDB/OPC_MemoryMacros.h index 04cf8458157..76e9a1fef1e 100644 --- a/src/xrCDB/OPC_MemoryMacros.h +++ b/src/xrCDB/OPC_MemoryMacros.h @@ -42,26 +42,27 @@ _asm pop eax } */ -#define SIZEOFOBJECT sizeof(*this) //!< Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)"). -//#define CLEAROBJECT { memset(this, 0, SIZEOFOBJECT); } //!< Clears current object. Laziness is my business. -//HANDLE WITH CARE. +#define SIZEOFOBJECT sizeof(*this) //!< Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)"). +//#define CLEAROBJECT { memset(this, 0, SIZEOFOBJECT); } //!< Clears current object. Laziness is my +//business. +// HANDLE WITH CARE. #define SAFE_RELEASE(x) \ if (x) { \ (x)->Release(); \ (x) = null; \ - } //!< Safe D3D-style release + } //!< Safe D3D-style release #define SAFE_DESTRUCT(x) \ if (x) { \ (x)->SelfDestruct(); \ (x) = null; \ - } //!< Safe ICE-style release + } //!< Safe ICE-style release #ifdef __ICEERROR_H__ #define CHECKALLOC(x) \ - if (!x) return SetIceError("Out of memory.", EC_OUTOFMEMORY); //!< Standard alloc checking. HANDLE WITH CARE. + if (!x) return SetIceError("Out of memory.", EC_OUTOFMEMORY); //!< Standard alloc checking. HANDLE WITH CARE. #else #define CHECKALLOC(x) \ if (!x) return false; #endif -#endif // __ICEMEMORYMACROS_H__ +#endif // __ICEMEMORYMACROS_H__ diff --git a/src/xrCDB/OPC_Model.cpp b/src/xrCDB/OPC_Model.cpp index d531851c165..3cb7942dc7c 100644 --- a/src/xrCDB/OPC_Model.cpp +++ b/src/xrCDB/OPC_Model.cpp @@ -133,7 +133,7 @@ namespace Opcode { #include "OPC_TreeBuilders.h" -} // namespace Opcode +} // namespace Opcode using namespace Opcode; @@ -148,7 +148,7 @@ OPCODECREATE::OPCODECREATE() Quantized = true; #ifdef __MESHMERIZER_H__ CollisionHull = false; -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ KeepOriginal = false; } @@ -159,9 +159,9 @@ OPCODECREATE::OPCODECREATE() /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// OPCODE_Model::OPCODE_Model() : mSource(null), mTree(null), mNoLeaf(false), mQuantized(false) { -#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! +#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! mHull = null; -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -173,9 +173,9 @@ OPCODE_Model::~OPCODE_Model() { CDELETE(mSource); CDELETE(mTree); -#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! +#ifdef __MESHMERIZER_H__ // Collision hulls only supported within ICE ! CDELETE(mHull); -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -192,7 +192,7 @@ bool OPCODE_Model::Build(const OPCODECREATE& create) // In this lib, we only support complete trees if (!(create.Rules & SPLIT_COMPLETE)) - return SetIceError; //("OPCODE WARNING: supports complete trees only! Use SPLIT_COMPLETE.\n"); + return SetIceError; //("OPCODE WARNING: supports complete trees only! Use SPLIT_COMPLETE.\n"); // Check topology. If the model contains degenerate faces, collision report can be wrong in some cases. // e.g. it happens with the standard MAX teapot. So clean your meshes first... If you don't have a mesh cleaner @@ -264,6 +264,6 @@ bool OPCODE_Model::Build(const OPCODECREATE& create) CHC.WordFaces = false; mHull->Compute(CHC); } -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ return true; } diff --git a/src/xrCDB/OPC_Model.h b/src/xrCDB/OPC_Model.h index e1d5f7bf55e..5c1b1e25bda 100644 --- a/src/xrCDB/OPC_Model.h +++ b/src/xrCDB/OPC_Model.h @@ -26,17 +26,17 @@ struct OPCODE_API OPCODECREATE //! Constructor OPCODECREATE(); - udword NbTris; //!< Number of triangles in the input model - udword NbVerts; //!< Number of vertices in the input model - const udword* Tris; //!< List of indexed triangles - const Point* Verts; //!< List of points - udword Rules; //!< Splitting rules (SPLIT_COMPLETE is mandatory in OPCODE) - bool NoLeaf; //!< true => discard leaf nodes (else use a normal tree) - bool Quantized; //!< true => quantize the tree (else use a normal tree) + udword NbTris; //!< Number of triangles in the input model + udword NbVerts; //!< Number of vertices in the input model + const udword* Tris; //!< List of indexed triangles + const Point* Verts; //!< List of points + udword Rules; //!< Splitting rules (SPLIT_COMPLETE is mandatory in OPCODE) + bool NoLeaf; //!< true => discard leaf nodes (else use a normal tree) + bool Quantized; //!< true => quantize the tree (else use a normal tree) #ifdef __MESHMERIZER_H__ - bool CollisionHull; //!< true => use convex hull + GJK -#endif // __MESHMERIZER_H__ - bool KeepOriginal; //!< true => keep a copy of the original tree (debug purpose) + bool CollisionHull; //!< true => use convex hull + GJK +#endif // __MESHMERIZER_H__ + bool KeepOriginal; //!< true => keep a copy of the original tree (debug purpose) }; class OPCODE_API OPCODE_Model @@ -77,7 +77,7 @@ class OPCODE_API OPCODE_Model */ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// inline_ const CollisionHull* GetHull() const { return mHull; } -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** @@ -109,13 +109,13 @@ class OPCODE_API OPCODE_Model /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// udword GetUsedBytes() const { return mTree->GetUsedBytes(); } private: - AABBTree* mSource; //!< Original source tree - AABBOptimizedTree* mTree; //!< Optimized tree + AABBTree* mSource; //!< Original source tree + AABBOptimizedTree* mTree; //!< Optimized tree #ifdef __MESHMERIZER_H__ - CollisionHull* mHull; //!< Possible convex hull -#endif // __MESHMERIZER_H__ - bool mNoLeaf; //!< Leaf/NoLeaf tree - bool mQuantized; //!< Compressed/uncompressed tree + CollisionHull* mHull; //!< Possible convex hull +#endif // __MESHMERIZER_H__ + bool mNoLeaf; //!< Leaf/NoLeaf tree + bool mQuantized; //!< Compressed/uncompressed tree }; -#endif //__OPC_MODEL_H__ \ No newline at end of file +#endif //__OPC_MODEL_H__ \ No newline at end of file diff --git a/src/xrCDB/OPC_OBB.h b/src/xrCDB/OPC_OBB.h index b8b972a83fa..2ef0471f30f 100644 --- a/src/xrCDB/OPC_OBB.h +++ b/src/xrCDB/OPC_OBB.h @@ -90,10 +90,10 @@ class MESHMERIZER_API OBB void ComputeLSS(LSS& lss); - Point mCenter; //!< B for Box - Point mExtents; //!< B for Bounding - // Matrix3x3 mRot; //!< O for Oriented - Matrix3x3 mRot2; //!< O for Oriented + Point mCenter; //!< B for Box + Point mExtents; //!< B for Bounding + // Matrix3x3 mRot; //!< O for Oriented + Matrix3x3 mRot2; //!< O for Oriented // Orientation is stored in row-major format, // i.e. rows = eigen vectors of the covariance matrix @@ -133,4 +133,4 @@ FUNCTION MESHMERIZER_API bool ComputeOBB( FUNCTION MESHMERIZER_API void OBBFromTriangle(const Point& p1, const Point& p2, const Point& p3, OBB& obb); -#endif // __ICEOBB_H__ +#endif // __ICEOBB_H__ diff --git a/src/xrCDB/OPC_OBBCollider.h b/src/xrCDB/OPC_OBBCollider.h index b270579c25b..e9cc18dee11 100644 --- a/src/xrCDB/OPC_OBBCollider.h +++ b/src/xrCDB/OPC_OBBCollider.h @@ -83,15 +83,15 @@ class OPCODE_API OBBCollider : public VolumeCollider protected: // Precomputed data - Matrix3x3 mAR; //!< Absolute rotation matrix - Matrix3x3 mRModelToBox; //!< Rotation from model space to obb space - Matrix3x3 mRBoxToModel; //!< Rotation from obb space to model space - Point mTModelToBox; //!< Translation from model space to obb space - Point mTBoxToModel; //!< Translation from obb space to model space + Matrix3x3 mAR; //!< Absolute rotation matrix + Matrix3x3 mRModelToBox; //!< Rotation from model space to obb space + Matrix3x3 mRBoxToModel; //!< Rotation from obb space to model space + Point mTModelToBox; //!< Translation from model space to obb space + Point mTBoxToModel; //!< Translation from obb space to model space Point mBoxExtents; - Point mB0; //!< - mTModelToBox + mBoxExtents - Point mB1; //!< - mTModelToBox - mBoxExtents + Point mB0; //!< - mTModelToBox + mBoxExtents + Point mB1; //!< - mTModelToBox - mBoxExtents float mBBx1; float mBBy1; @@ -108,10 +108,10 @@ class OPCODE_API OBBCollider : public VolumeCollider float mBB_9; // Leaf description - Point mLeafVerts[3]; //!< Triangle vertices - // Settings - bool mFullBoxBoxTest; //!< Perform full BV-BV tests (true) or SAT-lite tests (false) - // Internal methods + Point mLeafVerts[3]; //!< Triangle vertices + // Settings + bool mFullBoxBoxTest; //!< Perform full BV-BV tests (true) or SAT-lite tests (false) + // Internal methods void _Collide(const AABBCollisionNode* node); void _Collide(const AABBNoLeafNode* node); void _Collide(const AABBQuantizedNode* node); @@ -124,4 +124,4 @@ class OPCODE_API OBBCollider : public VolumeCollider BOOL InitQuery(OBBCache& cache, const OBB& box, const Matrix4x4* worldb = null, const Matrix4x4* worldm = null); }; -#endif // __OPC_OBBCOLLIDER_H__ +#endif // __OPC_OBBCOLLIDER_H__ diff --git a/src/xrCDB/OPC_OptimizedTree.cpp b/src/xrCDB/OPC_OptimizedTree.cpp index 523b50fe90f..ae712d9da33 100644 --- a/src/xrCDB/OPC_OptimizedTree.cpp +++ b/src/xrCDB/OPC_OptimizedTree.cpp @@ -113,8 +113,8 @@ static void _BuildCollisionTree( else { // To make the negative one implicit, we must store P and N in successive order - udword PosID = curid++; // Get a _new_ id for positive child - udword NegID = curid++; // Get a _new_ id for negative child + udword PosID = curid++; // Get a _new_ id for positive child + udword NegID = curid++; // Get a _new_ id for negative child // Setup box data as the forthcoming _new_ P pointer linear[boxid].mData = (uintptr_t)&linear[PosID]; // Make sure it's not marked as leaf diff --git a/src/xrCDB/OPC_OptimizedTree.h b/src/xrCDB/OPC_OptimizedTree.h index 14a3374bd64..63288352d92 100644 --- a/src/xrCDB/OPC_OptimizedTree.h +++ b/src/xrCDB/OPC_OptimizedTree.h @@ -165,4 +165,4 @@ class OPCODE_API AABBQuantizedNoLeafTree : public AABBOptimizedTree Point mExtentsCoeff; }; -#endif // __OPC_OPTIMIZEDTREE_H__ +#endif // __OPC_OPTIMIZEDTREE_H__ diff --git a/src/xrCDB/OPC_Plane.h b/src/xrCDB/OPC_Plane.h index f6391441fc9..0404ec37382 100644 --- a/src/xrCDB/OPC_Plane.h +++ b/src/xrCDB/OPC_Plane.h @@ -68,8 +68,8 @@ class ICEMATHS_API Plane public: // Members - Point n; //!< The normal to the plane - float d; //!< The distance from the origin + Point n; //!< The normal to the plane + float d; //!< The distance from the origin // Cast operators inline_ operator Point() const { return n; } @@ -137,4 +137,4 @@ inline_ void TransformPlane(Plane& plane, const Matrix4x4& transform) plane.d = (plane.d * plane.n - Trans) | plane.n; } -#endif // __ICEPLANE_H__ +#endif // __ICEPLANE_H__ diff --git a/src/xrCDB/OPC_PlanesAABBOverlap.h b/src/xrCDB/OPC_PlanesAABBOverlap.h index 66e6316e5d1..3e422e77750 100644 --- a/src/xrCDB/OPC_PlanesAABBOverlap.h +++ b/src/xrCDB/OPC_PlanesAABBOverlap.h @@ -27,26 +27,26 @@ inline_ BOOL PlanesCollider::PlanesAABBOverlap( // to be outside any of the planes. The loop also constructs a _new_ output // clip mask. Most FPUs have a native single-cycle _abs() operation. - udword Mask = 1; // current mask index (1,2,4,8,..) - udword TmpOutClipMask = 0; // initialize output clip mask into empty. + udword Mask = 1; // current mask index (1,2,4,8,..) + udword TmpOutClipMask = 0; // initialize output clip mask into empty. - while (Mask <= in_clip_mask) // keep looping while we have active planes left... + while (Mask <= in_clip_mask) // keep looping while we have active planes left... { - if (in_clip_mask & Mask) // if clip plane is active, process it.. + if (in_clip_mask & Mask) // if clip plane is active, process it.. { float NP = extents.x * _abs(p->n.x) + extents.y * _abs(p->n.y) + - extents.z * _abs(p->n.z); // ### _abs could be precomputed + extents.z * _abs(p->n.z); // ### _abs could be precomputed float MP = center.x * p->n.x + center.y * p->n.y + center.z * p->n.z + p->d; - if (NP < MP) // near vertex behind the clip plane... - return FALSE; // .. so there is no intersection.. - if ((-NP) < MP) // near and far vertices on different sides of plane.. - TmpOutClipMask |= Mask; // .. so update the clip mask... + if (NP < MP) // near vertex behind the clip plane... + return FALSE; // .. so there is no intersection.. + if ((-NP) < MP) // near and far vertices on different sides of plane.. + TmpOutClipMask |= Mask; // .. so update the clip mask... } - Mask += Mask; // mk = (1<> 22) ^ (f >> 12) ^ (f); } @@ -612,7 +612,7 @@ class ICEMATHS_API icePoint { public: float m[3][3]; - }; // To allow inlining + }; // To allow inlining const ShadowMatrix3x3* Mat = (const ShadowMatrix3x3*)&mat; return Point(x * Mat->m[0][0] + y * Mat->m[1][0] + z * Mat->m[2][0], @@ -627,7 +627,7 @@ class ICEMATHS_API icePoint { public: float m[4][4]; - }; // To allow inlining + }; // To allow inlining const ShadowMatrix4x4* Mat = (const ShadowMatrix4x4*)&mat; return Point(x * Mat->m[0][0] + y * Mat->m[1][0] + z * Mat->m[2][0] + Mat->m[3][0], @@ -642,7 +642,7 @@ class ICEMATHS_API icePoint { public: float m[3][3]; - }; // To allow inlining + }; // To allow inlining const ShadowMatrix3x3* Mat = (const ShadowMatrix3x3*)&mat; float xp = x * Mat->m[0][0] + y * Mat->m[1][0] + z * Mat->m[2][0]; @@ -663,7 +663,7 @@ class ICEMATHS_API icePoint { public: float m[4][4]; - }; // To allow inlining + }; // To allow inlining const ShadowMatrix4x4* Mat = (const ShadowMatrix4x4*)&mat; float xp = x * Mat->m[0][0] + y * Mat->m[1][0] + z * Mat->m[2][0] + Mat->m[3][0]; @@ -691,4 +691,4 @@ class ICEMATHS_API icePoint FUNCTION ICEMATHS_API void Normalize1(Point& a); FUNCTION ICEMATHS_API void Normalize2(Point& a); -#endif //__ICEPOINT_H__ +#endif //__ICEPOINT_H__ diff --git a/src/xrCDB/OPC_Preprocessor.h b/src/xrCDB/OPC_Preprocessor.h index dd5b1ad63a2..c1057be91da 100644 --- a/src/xrCDB/OPC_Preprocessor.h +++ b/src/xrCDB/OPC_Preprocessor.h @@ -47,7 +47,7 @@ #endif // Check debug mode -#ifdef DEBUG // May be defined instead of _DEBUG. Let's fix it. +#ifdef DEBUG // May be defined instead of _DEBUG. Let's fix it. #undef _DEBUG #define _DEBUG #endif @@ -79,4 +79,4 @@ // Down the hatch #pragma inline_depth(255) -#endif // __ICEPREPROCESSOR_H__ +#endif // __ICEPREPROCESSOR_H__ diff --git a/src/xrCDB/OPC_Ray.h b/src/xrCDB/OPC_Ray.h index 97efe20e689..730a4ccf9b4 100644 --- a/src/xrCDB/OPC_Ray.h +++ b/src/xrCDB/OPC_Ray.h @@ -23,8 +23,8 @@ class ICEMATHS_API Ray inline_ Ray(const Ray& ray) : mOrig(ray.mOrig), mDir(ray.mDir) {} //! Destructor inline_ ~Ray() {} - Point mOrig; //!< Ray origin - Point mDir; //!< Normalized direction + Point mOrig; //!< Ray origin + Point mDir; //!< Normalized direction }; class ICEMATHS_API Segment @@ -54,8 +54,8 @@ class ICEMATHS_API Segment */ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// inline_ void ComputePoint(Point& pt, float t) const { pt = mP0 + t * (mP1 - mP0); } - Point mP0; //!< Start of segment - Point mP1; //!< End of segment + Point mP0; //!< Start of segment + Point mP1; //!< End of segment }; -#endif // __ICERAY_H__ +#endif // __ICERAY_H__ diff --git a/src/xrCDB/OPC_RayAABBOverlap.h b/src/xrCDB/OPC_RayAABBOverlap.h index a0a8cc656b5..15c1d256a3d 100644 --- a/src/xrCDB/OPC_RayAABBOverlap.h +++ b/src/xrCDB/OPC_RayAABBOverlap.h @@ -60,11 +60,11 @@ inline_ BOOL RayCollider::RayAABBOverlap(const Point& center, const Point& exten if (GREATER(Dz, extents.z) && Dz * mDir.z >= 0.0f) return FALSE; // float Dx = mOrigin.x - center.x; if(GREATER(Dx, extents.x) && ((SIR(Dx)-1)^SIR(mDir.x))>=0.0f) return - //FALSE; + // FALSE; // float Dy = mOrigin.y - center.y; if(GREATER(Dy, extents.y) && ((SIR(Dy)-1)^SIR(mDir.y))>=0.0f) return - //FALSE; + // FALSE; // float Dz = mOrigin.z - center.z; if(GREATER(Dz, extents.z) && ((SIR(Dz)-1)^SIR(mDir.z))>=0.0f) return - //FALSE; + // FALSE; float f; f = mDir.y * Dz - mDir.z * Dy; diff --git a/src/xrCDB/OPC_RayCollider.h b/src/xrCDB/OPC_RayCollider.h index 737ec4e64f9..35fd5607483 100644 --- a/src/xrCDB/OPC_RayCollider.h +++ b/src/xrCDB/OPC_RayCollider.h @@ -163,35 +163,35 @@ class OPCODE_API RayCollider : public Collider protected: // Ray in local space - Point mOrigin; //!< Ray origin - Point mDir; //!< Ray direction (normalized) - Point mFDir; //!< fabsf(mDir) + Point mOrigin; //!< Ray origin + Point mDir; //!< Ray direction (normalized) + Point mFDir; //!< fabsf(mDir) Point mData, mData2; // Stabbed faces - CollisionFace mStabbedFace; //!< Current stabbed face - CollisionFaces* mStabbedFaces; //!< List of stabbed faces + CollisionFace mStabbedFace; //!< Current stabbed face + CollisionFaces* mStabbedFaces; //!< List of stabbed faces #ifdef OPC_USE_CALLBACKS // User callback - udword mUserData; //!< User-defined data sent to callback - OPC_CALLBACK mObjCallback; //!< Object callback + udword mUserData; //!< User-defined data sent to callback + OPC_CALLBACK mObjCallback; //!< Object callback #else // User pointers - const IndexedTriangle* mFaces; //!< User-defined faces - const Point* mVerts; //!< User-defined vertices + const IndexedTriangle* mFaces; //!< User-defined faces + const Point* mVerts; //!< User-defined vertices #endif // Stats - udword mNbRayBVTests; //!< Number of Ray-BV tests - udword mNbRayPrimTests; //!< Number of Ray-Primitive tests - // In-out test - udword mNbIntersections; //!< Number of valid intersections - // Dequantization coeffs + udword mNbRayBVTests; //!< Number of Ray-BV tests + udword mNbRayPrimTests; //!< Number of Ray-Primitive tests + // In-out test + udword mNbIntersections; //!< Number of valid intersections + // Dequantization coeffs Point mCenterCoeff; Point mExtentsCoeff; // Settings - float mMaxDist; //!< Valid segment on the ray - bool mClosestHit; //!< Report closest hit only - bool mCulling; //!< Stab culled faces or not - // Internal methods + float mMaxDist; //!< Valid segment on the ray + bool mClosestHit; //!< Report closest hit only + bool mCulling; //!< Stab culled faces or not + // Internal methods void _Stab(const AABBCollisionNode* node); void _Stab(const AABBNoLeafNode* node); void _Stab(const AABBQuantizedNode* node); @@ -210,4 +210,4 @@ class OPCODE_API RayCollider : public Collider BOOL InitQuery(const Ray& world_ray, const Matrix4x4* world = null, udword* faceid = null); }; -#endif // __OPC_RAYCOLLIDER_H__ +#endif // __OPC_RAYCOLLIDER_H__ diff --git a/src/xrCDB/OPC_Settings.h b/src/xrCDB/OPC_Settings.h index dd836449f77..758174f1751 100644 --- a/src/xrCDB/OPC_Settings.h +++ b/src/xrCDB/OPC_Settings.h @@ -37,4 +37,4 @@ // NB: no compilation flag to enable/disable stats since they're actually needed in the box/box overlap test -#endif //__OPC_SETTINGS_H__ \ No newline at end of file +#endif //__OPC_SETTINGS_H__ \ No newline at end of file diff --git a/src/xrCDB/OPC_SphereCollider.h b/src/xrCDB/OPC_SphereCollider.h index e313f1980d0..b71899a9ea3 100644 --- a/src/xrCDB/OPC_SphereCollider.h +++ b/src/xrCDB/OPC_SphereCollider.h @@ -24,10 +24,10 @@ struct OPCODE_API SphereCache : VolumeCache { SphereCache() : Center(0.0f, 0.0f, 0.0f), FatRadius2(0.0f), FatCoeff(1.1f) {} // Cached faces signature - Point Center; //!< Sphere used when performing the query resulting in cached faces - float FatRadius2; //!< Sphere used when performing the query resulting in cached faces + Point Center; //!< Sphere used when performing the query resulting in cached faces + float FatRadius2; //!< Sphere used when performing the query resulting in cached faces // User settings - float FatCoeff; //!< mRadius2 multiplier used to create a fat sphere + float FatCoeff; //!< mRadius2 multiplier used to create a fat sphere }; class OPCODE_API SphereCollider : public VolumeCollider @@ -79,9 +79,9 @@ class OPCODE_API SphereCollider : public VolumeCollider protected: // Sphere in model space - Point mCenter; //!< Sphere center - float mRadius2; //!< Sphere radius squared - // Internal methods + Point mCenter; //!< Sphere center + float mRadius2; //!< Sphere radius squared + // Internal methods void _Collide(const AABBCollisionNode* node); void _Collide(const AABBNoLeafNode* node); void _Collide(const AABBQuantizedNode* node); @@ -96,4 +96,4 @@ class OPCODE_API SphereCollider : public VolumeCollider SphereCache& cache, const Sphere& sphere, const Matrix4x4* worlds = null, const Matrix4x4* worldm = null); }; -#endif // __OPC_SPHERECOLLIDER_H__ +#endif // __OPC_SPHERECOLLIDER_H__ diff --git a/src/xrCDB/OPC_SphereTriOverlap.h b/src/xrCDB/OPC_SphereTriOverlap.h index 7612de6a034..b72a3a8f103 100644 --- a/src/xrCDB/OPC_SphereTriOverlap.h +++ b/src/xrCDB/OPC_SphereTriOverlap.h @@ -22,7 +22,7 @@ BOOL SphereCollider::SphereTriOverlap(const Point& vert0, const Point& vert1, co if (u + v <= fDet) { if (u < 0.0f) { - if (v < 0.0f) // region 4 + if (v < 0.0f) // region 4 { if (fB0 < 0.0f) { v = 0.0f; @@ -55,7 +55,7 @@ BOOL SphereCollider::SphereTriOverlap(const Point& vert0, const Point& vert1, co } } } - else // region 3 + else // region 3 { u = 0.0f; if (fB1 >= 0.0f) { @@ -74,7 +74,7 @@ BOOL SphereCollider::SphereTriOverlap(const Point& vert0, const Point& vert1, co } } } - else if (v < 0.0f) // region 5 + else if (v < 0.0f) // region 5 { v = 0.0f; if (fB0 >= 0.0f) { @@ -92,7 +92,7 @@ BOOL SphereCollider::SphereTriOverlap(const Point& vert0, const Point& vert1, co SqrDist = fB0 * u + fC; } } - else // region 0 + else // region 0 { // minimum at interior point if (fDet == 0.0f) { @@ -113,7 +113,7 @@ BOOL SphereCollider::SphereTriOverlap(const Point& vert0, const Point& vert1, co { float fTmp0, fTmp1, fNumer, fDenom; - if (u < 0.0f) // region 2 + if (u < 0.0f) // region 2 { fTmp0 = fA01 + fB0; fTmp1 = fA11 + fB1; @@ -151,7 +151,7 @@ BOOL SphereCollider::SphereTriOverlap(const Point& vert0, const Point& vert1, co } } } - else if (v < 0.0f) // region 6 + else if (v < 0.0f) // region 6 { fTmp0 = fA01 + fB1; fTmp1 = fA00 + fB0; @@ -189,7 +189,7 @@ BOOL SphereCollider::SphereTriOverlap(const Point& vert0, const Point& vert1, co } } } - else // region 1 + else // region 1 { fNumer = fA11 + fB1 - fA01 - fB0; if (fNumer <= 0.0f) { diff --git a/src/xrCDB/OPC_TreeBuilders.cpp b/src/xrCDB/OPC_TreeBuilders.cpp index b4b440eabbc..b29e5cfa79b 100644 --- a/src/xrCDB/OPC_TreeBuilders.cpp +++ b/src/xrCDB/OPC_TreeBuilders.cpp @@ -45,7 +45,7 @@ namespace Opcode { #include "OPC_TreeBuilders.h" -} // namespace Opcode +} // namespace Opcode using namespace Opcode; diff --git a/src/xrCDB/OPC_TreeBuilders.h b/src/xrCDB/OPC_TreeBuilders.h index b765ba3cab1..5b1d00b81c7 100644 --- a/src/xrCDB/OPC_TreeBuilders.h +++ b/src/xrCDB/OPC_TreeBuilders.h @@ -27,15 +27,15 @@ enum SplittingRules { // Tree - SPLIT_COMPLETE = (1 << 0), //!< Build a complete tree (2*N-1 nodes) + SPLIT_COMPLETE = (1 << 0), //!< Build a complete tree (2*N-1 nodes) // Primitive split - SPLIT_LARGESTAXIS = (1 << 1), //!< Split along the largest axis - SPLIT_SPLATTERPOINTS = (1 << 2), //!< Splatter primitive centers (QuickCD-style) - SPLIT_BESTAXIS = (1 << 3), //!< Try largest axis, then second, then last - SPLIT_BALANCED = (1 << 4), //!< Try to keep a well-balanced tree - SPLIT_FIFTY = (1 << 5), //!< Arbitrary 50-50 split + SPLIT_LARGESTAXIS = (1 << 1), //!< Split along the largest axis + SPLIT_SPLATTERPOINTS = (1 << 2), //!< Splatter primitive centers (QuickCD-style) + SPLIT_BESTAXIS = (1 << 3), //!< Try largest axis, then second, then last + SPLIT_BALANCED = (1 << 4), //!< Try to keep a well-balanced tree + SPLIT_FIFTY = (1 << 5), //!< Arbitrary 50-50 split // Node split - SPLIT_GEOMCENTER = (1 << 6), //!< Split at geometric center (else split in the middle) + SPLIT_GEOMCENTER = (1 << 6), //!< Split at geometric center (else split in the middle) // SPLIT_FORCE_DWORD = 0x7fffffff }; @@ -85,9 +85,9 @@ class OPCODE_API AABBTreeBuilder return global_box.GetCenter(axis); } - udword mLimit; //!< Limit number of primitives / node - udword mRules; //!< Building/Splitting rules (a combination of flags) - udword mNbPrimitives; //!< Total number of primitives. + udword mLimit; //!< Limit number of primitives / node + udword mRules; //!< Building/Splitting rules (a combination of flags) + udword mNbPrimitives; //!< Total number of primitives. // Stats inline_ void SetCount(udword nb) { mCount = nb; } inline_ void IncreaseCount(udword nb) { mCount += nb; } @@ -96,8 +96,8 @@ class OPCODE_API AABBTreeBuilder inline_ void IncreaseNbInvalidSplits() { mNbInvalidSplits++; } inline_ udword GetNbInvalidSplits() const { return mNbInvalidSplits; } private: - udword mCount; //!< Stats: number of nodes created - udword mNbInvalidSplits; //!< Stats: number of invalid splits + udword mCount; //!< Stats: number of nodes created + udword mNbInvalidSplits; //!< Stats: number of invalid splits public: poolSS mPOOL; inline_ AABBTreeNode* node_alloc() { return mPOOL.create(); } @@ -114,7 +114,7 @@ class OPCODE_API AABBTreeOfAABBsBuilder : public AABBTreeBuilder override(AABBTreeBuilder) bool ComputeGlobalBox(const udword* primitives, udword nb_prims, AABB& global_box) const; virtual float GetSplittingValue(udword index, udword axis) const; - const AABB* mAABBList; //!< Shortcut to an app-controlled list of AABBs. + const AABB* mAABBList; //!< Shortcut to an app-controlled list of AABBs. }; #pragma warning(disable : 4512) @@ -130,10 +130,10 @@ class OPCODE_API AABBTreeOfTrianglesBuilder : public AABBTreeBuilder override(AABBTreeBuilder) float GetSplittingValue( const udword* primitives, udword nb_prims, const AABB& global_box, udword axis) const; - const IndexedTriangle* mTriList; //!< Shortcut to an app-controlled list of triangles. - const Point* mVerts; //!< Shortcut to an app-controlled list of vertices. - const udword mNbTriangles; //!< Total number of triangles. + const IndexedTriangle* mTriList; //!< Shortcut to an app-controlled list of triangles. + const Point* mVerts; //!< Shortcut to an app-controlled list of vertices. + const udword mNbTriangles; //!< Total number of triangles. }; #pragma warning(default : 4512) -#endif // __OPC_TREEBUILDERS_H__ +#endif // __OPC_TREEBUILDERS_H__ diff --git a/src/xrCDB/OPC_TreeCollider.cpp b/src/xrCDB/OPC_TreeCollider.cpp index 6caa6275cc0..8718ab5f634 100644 --- a/src/xrCDB/OPC_TreeCollider.cpp +++ b/src/xrCDB/OPC_TreeCollider.cpp @@ -170,7 +170,7 @@ bool AABBTreeCollider::Collide(BVTCache& cache, const Matrix4x4* world0, const M // Here, hulls collide cache.HullTest = false; -#endif // __MESHMERIZER_H__ +#endif // __MESHMERIZER_H__ // Simple double-dispatch bool Status; @@ -478,7 +478,7 @@ bool AABBTreeCollider::Collide(const AABBQuantizedNoLeafTree* tree0, const AABBQ // The normal AABB tree can use 2 different descent rules (with different performances) //#define ORIGINAL_CODE //!< UNC-like descent rules -#define ALTERNATIVE_CODE //!< Alternative descent rules +#define ALTERNATIVE_CODE //!< Alternative descent rules #ifdef ORIGINAL_CODE /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/xrCDB/OPC_TreeCollider.h b/src/xrCDB/OPC_TreeCollider.h index f2286f99054..9e2d672b156 100644 --- a/src/xrCDB/OPC_TreeCollider.h +++ b/src/xrCDB/OPC_TreeCollider.h @@ -190,42 +190,42 @@ class OPCODE_API AABBTreeCollider : public Collider protected: // Colliding pairs - Container mPairs; //!< Pairs of colliding primitives + Container mPairs; //!< Pairs of colliding primitives #ifdef OPC_USE_CALLBACKS // User callback - udword mUserData0; //!< User-defined data sent to callbacks - udword mUserData1; //!< User-defined data sent to callbacks - OPC_CALLBACK mObjCallback0; //!< Callback for object 0 - OPC_CALLBACK mObjCallback1; //!< Callback for object 1 + udword mUserData0; //!< User-defined data sent to callbacks + udword mUserData1; //!< User-defined data sent to callbacks + OPC_CALLBACK mObjCallback0; //!< Callback for object 0 + OPC_CALLBACK mObjCallback1; //!< Callback for object 1 #else // User pointers - const IndexedTriangle* mFaces0; //!< User-defined faces - const IndexedTriangle* mFaces1; //!< User-defined faces - const Point* mVerts0; //!< User-defined vertices - const Point* mVerts1; //!< User-defined vertices + const IndexedTriangle* mFaces0; //!< User-defined faces + const IndexedTriangle* mFaces1; //!< User-defined faces + const Point* mVerts0; //!< User-defined vertices + const Point* mVerts1; //!< User-defined vertices #endif // Stats - udword mNbBVBVTests; //!< Number of BV-BV tests - udword mNbPrimPrimTests; //!< Number of Primitive-Primitive tests - udword mNbBVPrimTests; //!< Number of BV-Primitive tests - // Precomputed data - Matrix3x3 mAR; //!< Absolute rotation matrix - Matrix3x3 mR0to1; //!< Rotation from object0 to object1 - Matrix3x3 mR1to0; //!< Rotation from object1 to object0 - Point mT0to1; //!< Translation from object0 to object1 - Point mT1to0; //!< Translation from object1 to object0 - // Dequantization coeffs + udword mNbBVBVTests; //!< Number of BV-BV tests + udword mNbPrimPrimTests; //!< Number of Primitive-Primitive tests + udword mNbBVPrimTests; //!< Number of BV-Primitive tests + // Precomputed data + Matrix3x3 mAR; //!< Absolute rotation matrix + Matrix3x3 mR0to1; //!< Rotation from object0 to object1 + Matrix3x3 mR1to0; //!< Rotation from object1 to object0 + Point mT0to1; //!< Translation from object0 to object1 + Point mT1to0; //!< Translation from object1 to object0 + // Dequantization coeffs Point mCenterCoeff0; Point mExtentsCoeff0; Point mCenterCoeff1; Point mExtentsCoeff1; // Leaf description - Point mLeafVerts[3]; //!< Triangle vertices - udword mLeafIndex; //!< Triangle index - // Settings - bool mFullBoxBoxTest; //!< Perform full BV-BV tests (true) or SAT-lite tests (false) - bool mFullPrimBoxTest; //!< Perform full Primitive-BV tests (true) or SAT-lite tests (false) - // Internal methods + Point mLeafVerts[3]; //!< Triangle vertices + udword mLeafIndex; //!< Triangle index + // Settings + bool mFullBoxBoxTest; //!< Perform full BV-BV tests (true) or SAT-lite tests (false) + bool mFullPrimBoxTest; //!< Perform full Primitive-BV tests (true) or SAT-lite tests (false) + // Internal methods // Standard AABB trees void _Collide(const AABBCollisionNode* b0, const AABBCollisionNode* b1); @@ -254,4 +254,4 @@ class OPCODE_API AABBTreeCollider : public Collider bool CheckTemporalCoherence(Pair* cache); }; -#endif // __OPC_TREECOLLIDER_H__ +#endif // __OPC_TREECOLLIDER_H__ diff --git a/src/xrCDB/OPC_TriTriOverlap.h b/src/xrCDB/OPC_TriTriOverlap.h index 6d443000b56..a79f7b03ef6 100644 --- a/src/xrCDB/OPC_TriTriOverlap.h +++ b/src/xrCDB/OPC_TriTriOverlap.h @@ -218,8 +218,8 @@ inline_ BOOL AABBTreeCollider::TriTriOverlap( const float du0du1 = du0 * du1; const float du0du2 = du0 * du2; - if (du0du1 > 0.0f && du0du2 > 0.0f) // same sign on all of them + not equal 0 ? - return FALSE; // no intersection occurs + if (du0du1 > 0.0f && du0du2 > 0.0f) // same sign on all of them + not equal 0 ? + return FALSE; // no intersection occurs // Compute plane of triangle (U0,U1,U2) E1 = U1 - U0; @@ -242,8 +242,8 @@ inline_ BOOL AABBTreeCollider::TriTriOverlap( const float dv0dv1 = dv0 * dv1; const float dv0dv2 = dv0 * dv2; - if (dv0dv1 > 0.0f && dv0dv2 > 0.0f) // same sign on all of them + not equal 0 ? - return FALSE; // no intersection occurs + if (dv0dv1 > 0.0f && dv0dv2 > 0.0f) // same sign on all of them + not equal 0 ? + return FALSE; // no intersection occurs // Compute direction of intersection line const Point D = N1 ^ N2; diff --git a/src/xrCDB/OPC_Triangle.h b/src/xrCDB/OPC_Triangle.h index 446aacc7ff8..ce16b86f41f 100644 --- a/src/xrCDB/OPC_Triangle.h +++ b/src/xrCDB/OPC_Triangle.h @@ -41,4 +41,4 @@ class MESHMERIZER_API IndexedTriangle bool IsDegenerate() const; }; -#endif // __ICETRIANGLE_H__ +#endif // __ICETRIANGLE_H__ diff --git a/src/xrCDB/OPC_Types.h b/src/xrCDB/OPC_Types.h index 68fcdb76a07..cccb5a0bc21 100644 --- a/src/xrCDB/OPC_Types.h +++ b/src/xrCDB/OPC_Types.h @@ -14,43 +14,43 @@ // Constants #ifndef PI -#define PI 3.1415926535897932384626433832795028841971693993751f //!< PI +#define PI 3.1415926535897932384626433832795028841971693993751f //!< PI #endif -#define HALFPI 1.57079632679489661923f //!< 0.5 * PI -#define TWOPI 6.28318530717958647692f //!< 2.0 * PI -#define INVPI 0.31830988618379067154f //!< 1.0 / PI +#define HALFPI 1.57079632679489661923f //!< 0.5 * PI +#define TWOPI 6.28318530717958647692f //!< 2.0 * PI +#define INVPI 0.31830988618379067154f //!< 1.0 / PI -#define RADTODEG 57.2957795130823208768f //!< 180.0 / PI, convert radians to degrees -#define DEGTORAD 0.01745329251994329577f //!< PI / 180.0, convert degrees to radians +#define RADTODEG 57.2957795130823208768f //!< 180.0 / PI, convert radians to degrees +#define DEGTORAD 0.01745329251994329577f //!< PI / 180.0, convert degrees to radians -#define EXP 2.71828182845904523536f //!< e -#define INVLOG2 3.32192809488736234787f //!< 1.0 / log10(2) -#define LN2 0.693147180559945f //!< ln(2) -#define INVLN2 1.44269504089f //!< 1.0f / ln(2) +#define EXP 2.71828182845904523536f //!< e +#define INVLOG2 3.32192809488736234787f //!< 1.0 / log10(2) +#define LN2 0.693147180559945f //!< ln(2) +#define INVLN2 1.44269504089f //!< 1.0f / ln(2) -#define INV3 0.33333333333333333333f //!< 1/3 -#define INV6 0.16666666666666666666f //!< 1/6 -#define INV7 0.14285714285714285714f //!< 1/7 -#define INV9 0.11111111111111111111f //!< 1/9 -#define INV255 0.00392156862745098039f //!< 1/255 +#define INV3 0.33333333333333333333f //!< 1/3 +#define INV6 0.16666666666666666666f //!< 1/6 +#define INV7 0.14285714285714285714f //!< 1/7 +#define INV9 0.11111111111111111111f //!< 1/9 +#define INV255 0.00392156862745098039f //!< 1/255 -#define null 0 //!< our own NULL pointer +#define null 0 //!< our own NULL pointer // New types -typedef signed char sbyte; //!< sizeof(sbyte) must be 1 -typedef unsigned char ubyte; //!< sizeof(ubyte) must be 1 -typedef signed short sword; //!< sizeof(sword) must be 2 -typedef unsigned short uword; //!< sizeof(uword) must be 2 -typedef signed int sdword; //!< sizeof(sdword) must be 4 -typedef unsigned int udword; //!< sizeof(udword) must be 4 -typedef signed __int64 sqword; //!< sizeof(sqword) must be 8 -typedef unsigned __int64 uqword; //!< sizeof(uqword) must be 8 -typedef float float32; //!< sizeof(float32) must be 4 -typedef double float64; //!< sizeof(float64) must be 4 +typedef signed char sbyte; //!< sizeof(sbyte) must be 1 +typedef unsigned char ubyte; //!< sizeof(ubyte) must be 1 +typedef signed short sword; //!< sizeof(sword) must be 2 +typedef unsigned short uword; //!< sizeof(uword) must be 2 +typedef signed int sdword; //!< sizeof(sdword) must be 4 +typedef unsigned int udword; //!< sizeof(udword) must be 4 +typedef signed __int64 sqword; //!< sizeof(sqword) must be 8 +typedef unsigned __int64 uqword; //!< sizeof(uqword) must be 8 +typedef float float32; //!< sizeof(float32) must be 4 +typedef double float64; //!< sizeof(float64) must be 4 #define ICE_COMPILE_TIME_ASSERT(name, x) typedef int ICE_Dummy_##name[(x)*2 - 1] -ICE_COMPILE_TIME_ASSERT(bool, sizeof(bool) == 1); // ...otherwise things might fail with VC++ 4.2 ! +ICE_COMPILE_TIME_ASSERT(bool, sizeof(bool) == 1); // ...otherwise things might fail with VC++ 4.2 ! ICE_COMPILE_TIME_ASSERT(ubyte, sizeof(ubyte) == 1); ICE_COMPILE_TIME_ASSERT(sbyte, sizeof(sbyte) == 1); ICE_COMPILE_TIME_ASSERT(sword, sizeof(sword) == 2); @@ -62,60 +62,60 @@ ICE_COMPILE_TIME_ASSERT(sqword, sizeof(sqword) == 8); #undef ICE_COMPILE_TIME_ASSERT -typedef udword DynID; //!< Dynamic identifier -typedef uword KID; //!< Kernel ID -typedef udword RTYPE; //!< Relationship-type (!) between owners and references -#define INVALID_ID 0xffffffff //!< Invalid dword ID (counterpart of null pointers) -#define INVALID_KID 0xffff //!< Invalid Kernel ID -#define INVALID_NUMBER 0xDEADBEEF //!< Standard junk value +typedef udword DynID; //!< Dynamic identifier +typedef uword KID; //!< Kernel ID +typedef udword RTYPE; //!< Relationship-type (!) between owners and references +#define INVALID_ID 0xffffffff //!< Invalid dword ID (counterpart of null pointers) +#define INVALID_KID 0xffff //!< Invalid Kernel ID +#define INVALID_NUMBER 0xDEADBEEF //!< Standard junk value // Define BOOL if needed #ifndef BOOL -typedef int BOOL; //!< Another boolean type. +typedef int BOOL; //!< Another boolean type. #endif //! Union of a float and a sdword typedef union { - float f; //!< The float - sdword d; //!< The integer + float f; //!< The float + sdword d; //!< The integer } scell; //! Union of a float and a udword typedef union { - float f; //!< The float - udword d; //!< The integer + float f; //!< The float + udword d; //!< The integer } ucell; //! A generic couple structure struct Pair { - udword id0; //!< First index of the pair - udword id1; //!< Second index of the pair + udword id0; //!< First index of the pair + udword id1; //!< Second index of the pair }; // Type ranges -#define MAX_SBYTE 0x7f //!< max possible sbyte value -#define MIN_SBYTE 0x80 //!< min possible sbyte value -#define MAX_UBYTE 0xff //!< max possible ubyte value -#define MIN_UBYTE 0x00 //!< min possible ubyte value -#define MAX_SWORD 0x7fff //!< max possible sword value -#define MIN_SWORD 0x8000 //!< min possible sword value -#define MAX_UWORD 0xffff //!< max possible uword value -#define MIN_UWORD 0x0000 //!< min possible uword value -#define MAX_SDWORD 0x7fffffff //!< max possible sdword value -#define MIN_SDWORD 0x80000000 //!< min possible sdword value -#define MAX_UDWORD 0xffffffff //!< max possible udword value -#define MIN_UDWORD 0x00000000 //!< min possible udword value -#define MAX_FLOAT FLT_MAX //!< max possible float value -#define MIN_FLOAT (-FLT_MAX) //!< min possible loat value -#define IEEE_1_0 0x3f800000 //!< integer representation of 1.0 -#define IEEE_255_0 0x437f0000 //!< integer representation of 255.0 -#define IEEE_MAX_FLOAT 0x7f7fffff //!< integer representation of MAX_FLOAT -#define IEEE_MIN_FLOAT 0xff7fffff //!< integer representation of MIN_FLOAT - -#define ONE_OVER_RAND_MAX (1.0f / float(RAND_MAX)) //!< Inverse of the max possible value returned by rand() +#define MAX_SBYTE 0x7f //!< max possible sbyte value +#define MIN_SBYTE 0x80 //!< min possible sbyte value +#define MAX_UBYTE 0xff //!< max possible ubyte value +#define MIN_UBYTE 0x00 //!< min possible ubyte value +#define MAX_SWORD 0x7fff //!< max possible sword value +#define MIN_SWORD 0x8000 //!< min possible sword value +#define MAX_UWORD 0xffff //!< max possible uword value +#define MIN_UWORD 0x0000 //!< min possible uword value +#define MAX_SDWORD 0x7fffffff //!< max possible sdword value +#define MIN_SDWORD 0x80000000 //!< min possible sdword value +#define MAX_UDWORD 0xffffffff //!< max possible udword value +#define MIN_UDWORD 0x00000000 //!< min possible udword value +#define MAX_FLOAT FLT_MAX //!< max possible float value +#define MIN_FLOAT (-FLT_MAX) //!< min possible loat value +#define IEEE_1_0 0x3f800000 //!< integer representation of 1.0 +#define IEEE_255_0 0x437f0000 //!< integer representation of 255.0 +#define IEEE_MAX_FLOAT 0x7f7fffff //!< integer representation of MAX_FLOAT +#define IEEE_MIN_FLOAT 0xff7fffff //!< integer representation of MIN_FLOAT + +#define ONE_OVER_RAND_MAX (1.0f / float(RAND_MAX)) //!< Inverse of the max possible value returned by rand() template inline_ const T& TMin(const T& a, const T& b) @@ -138,14 +138,14 @@ inline_ void TSetMax(T& a, const T& b) if (a < b) a = b; } -#define SQR(x) ((x) * (x)) //!< Returns x square -#define CUBE(x) ((x) * (x) * (x)) //!< Returns x cube +#define SQR(x) ((x) * (x)) //!< Returns x square +#define CUBE(x) ((x) * (x) * (x)) //!< Returns x cube -#define AND & //!< ... -#define OR | //!< ... -#define XOR ^ //!< ... +#define AND & //!< ... +#define OR | //!< ... +#define XOR ^ //!< ... -#define QUADRAT(x) ((x) * (x)) //!< Returns x square +#define QUADRAT(x) ((x) * (x)) //!< Returns x square #ifdef _WIN32 #define srand48(x) srand((unsigned int)(x)) @@ -154,4 +154,4 @@ inline_ void TSetMax(T& a, const T& b) #define drand48() ((double)(((double)rand()) / ((double)RAND_MAX))) #endif -#endif // __ICETYPES_H__ +#endif // __ICETYPES_H__ diff --git a/src/xrCDB/OPC_VolumeCollider.h b/src/xrCDB/OPC_VolumeCollider.h index be0fe073915..45ae8538cb4 100644 --- a/src/xrCDB/OPC_VolumeCollider.h +++ b/src/xrCDB/OPC_VolumeCollider.h @@ -23,7 +23,7 @@ struct OPCODE_API VolumeCache { VolumeCache() {} - Container TouchedPrimitives; //!< Indices of touched primitives + Container TouchedPrimitives; //!< Indices of touched primitives }; class OPCODE_API VolumeCollider : public Collider @@ -120,23 +120,23 @@ class OPCODE_API VolumeCollider : public Collider protected: // Touched primitives - Container* mTouchedPrimitives; //!< List of touched primitives + Container* mTouchedPrimitives; //!< List of touched primitives #ifdef OPC_USE_CALLBACKS // User callback - udword mUserData; //!< User-defined data sent to callback - OPC_CALLBACK mObjCallback; //!< Object callback + udword mUserData; //!< User-defined data sent to callback + OPC_CALLBACK mObjCallback; //!< Object callback #else // User pointers - const IndexedTriangle* mFaces; //!< User-defined faces - const Point* mVerts; //!< User-defined vertices + const IndexedTriangle* mFaces; //!< User-defined faces + const Point* mVerts; //!< User-defined vertices #endif // Dequantization coeffs Point mCenterCoeff; Point mExtentsCoeff; // Stats - udword mNbVolumeBVTests; //!< Number of Volume-BV tests - udword mNbVolumePrimTests; //!< Number of Volume-Primitive tests - // Internal methods + udword mNbVolumeBVTests; //!< Number of Volume-BV tests + udword mNbVolumePrimTests; //!< Number of Volume-Primitive tests + // Internal methods void _Dump(const AABBCollisionNode* node); void _Dump(const AABBNoLeafNode* node); void _Dump(const AABBQuantizedNode* node); @@ -156,4 +156,4 @@ class OPCODE_API VolumeCollider : public Collider } }; -#endif // __OPC_VOLUMECOLLIDER_H__ +#endif // __OPC_VOLUMECOLLIDER_H__ diff --git a/src/xrCDB/Opcode.h b/src/xrCDB/Opcode.h index 36ec36468ee..b1bfe8cb6d4 100644 --- a/src/xrCDB/Opcode.h +++ b/src/xrCDB/Opcode.h @@ -27,12 +27,12 @@ #ifdef WIN32 #include #include -#endif // WIN32 +#endif // WIN32 -#include -#include #include #include +#include +#include #ifndef ASSERT #define ASSERT assert @@ -46,9 +46,9 @@ #include "OPC_Preprocessor.h" #define ICECORE_API OPCODE_API -#include "OPC_Types.h" #include "OPC_FPU.h" #include "OPC_MemoryMacros.h" +#include "OPC_Types.h" namespace IceCore { #include "OPC_Container.h" @@ -61,10 +61,10 @@ using namespace IceCore; #define ICEMATHS_API OPCODE_API namespace IceMaths { -#include "OPC_Point.h" #include "OPC_Matrix3x3.h" #include "OPC_Matrix4x4.h" #include "OPC_Plane.h" +#include "OPC_Point.h" #include "OPC_Ray.h" } using namespace IceMaths; @@ -74,10 +74,10 @@ using namespace IceMaths; #define MESHMERIZER_API OPCODE_API namespace Meshmerizer { -#include "OPC_Triangle.h" #include "OPC_AABB.h" -#include "OPC_OBB.h" #include "OPC_BoundingSphere.h" +#include "OPC_OBB.h" +#include "OPC_Triangle.h" } using namespace Meshmerizer; #endif @@ -85,21 +85,21 @@ using namespace Meshmerizer; namespace Opcode { // Bulk-of-the-work -#include "OPC_Settings.h" #include "OPC_Common.h" +#include "OPC_Settings.h" +#include "OPC_AABBCollider.h" #include "OPC_AABBTree.h" -#include "OPC_OptimizedTree.h" -#include "OPC_Model.h" #include "OPC_BVTCache.h" #include "OPC_Collider.h" -#include "OPC_VolumeCollider.h" -#include "OPC_TreeCollider.h" -#include "OPC_RayCollider.h" -#include "OPC_SphereCollider.h" +#include "OPC_Model.h" #include "OPC_OBBCollider.h" -#include "OPC_AABBCollider.h" +#include "OPC_OptimizedTree.h" #include "OPC_PlanesCollider.h" +#include "OPC_RayCollider.h" +#include "OPC_SphereCollider.h" +#include "OPC_TreeCollider.h" +#include "OPC_VolumeCollider.h" } -#endif // __OPCODE_H__ +#endif // __OPCODE_H__ diff --git a/src/xrCDB/StdAfx.h b/src/xrCDB/StdAfx.h index b7ffe2cf055..bc513e95ab5 100644 --- a/src/xrCDB/StdAfx.h +++ b/src/xrCDB/StdAfx.h @@ -20,13 +20,13 @@ extern doug_lea_allocator g_collision_allocator; #define CFREE(ptr) g_collision_allocator.free_impl(ptr) #define CMALLOC(size) g_collision_allocator.malloc_impl(size) #define CALLOC(type, count) g_collision_allocator.alloc_impl(count) -#else // #ifdef USE_ARENA_ALLOCATOR +#else // #ifdef USE_ARENA_ALLOCATOR #define CNEW(type) new (xr_alloc(1)) type #define CDELETE(ptr) xr_delete(ptr) #define CFREE(ptr) xr_free(ptr) #define CMALLOC(size) xr_malloc(size) #define CALLOC(type, count) xr_alloc(count) -#endif // #ifdef USE_ARENA_ALLOCATOR +#endif // #ifdef USE_ARENA_ALLOCATOR template struct cspecial_free @@ -66,4 +66,4 @@ IC void cdelete(T*& ptr) //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. -#endif // stdafxH \ No newline at end of file +#endif // stdafxH \ No newline at end of file diff --git a/src/xrCDB/xrCDB.cpp b/src/xrCDB/xrCDB.cpp index 3b26727c558..8803ab24f3b 100644 --- a/src/xrCDB/xrCDB.cpp +++ b/src/xrCDB/xrCDB.cpp @@ -10,12 +10,12 @@ static const u32 s_arena_size = (128 + 16) * 1024 * 1024; static char s_fake_array[s_arena_size]; doug_lea_allocator g_collision_allocator(s_fake_array, s_arena_size, "collision"); -#endif // #ifdef USE_ARENA_ALLOCATOR +#endif // #ifdef USE_ARENA_ALLOCATOR namespace Opcode { #include "OPC_TreeBuilders.h" -} // namespace Opcode +} // namespace Opcode using namespace CDB; using namespace Opcode; @@ -36,7 +36,7 @@ BOOL APIENTRY DllMain(HANDLE hModule, u32 ul_reason_for_call, LPVOID lpReserved) MODEL::MODEL() #ifdef CONFIG_PROFILE_LOCKS : cs(MUTEX_PROFILE_ID(MODEL)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { tree = 0; tris = 0; @@ -47,7 +47,7 @@ MODEL::MODEL() } MODEL::~MODEL() { - syncronize(); // maybe model still in building + syncronize(); // maybe model still in building status = S_INIT; CDELETE(tree); CFREE(tris); diff --git a/src/xrCDB/xrCDB.h b/src/xrCDB/xrCDB.h index 573c3842796..fa504a0a1df 100644 --- a/src/xrCDB/xrCDB.h +++ b/src/xrCDB/xrCDB.h @@ -29,19 +29,19 @@ class AABBNoLeafNode; namespace CDB { // Triangle -class XRCDB_API TRI //*** 16 bytes total (was 32 :) +class XRCDB_API TRI //*** 16 bytes total (was 32 :) { public: - u32 verts[3]; // 3*4 = 12b + u32 verts[3]; // 3*4 = 12b union { - u32 dummy; // 4b + u32 dummy; // 4b struct { - u32 material : 14; // - u32 suppress_shadows : 1; // - u32 suppress_wm : 1; // - u32 sector : 16; // + u32 material : 14; // + u32 suppress_shadows : 1; // + u32 suppress_wm : 1; // + u32 sector : 16; // }; }; @@ -67,7 +67,7 @@ class XRCDB_API MODEL private: Lock cs; Opcode::OPCODE_Model* tree; - u32 status; // 0=ready, 1=init, 2=building + u32 status; // 0=ready, 1=init, 2=building // tris TRI* tris; @@ -107,13 +107,13 @@ struct XRCDB_API RESULT Fvector verts[3]; union { - u32 dummy; // 4b + u32 dummy; // 4b struct { - u32 material : 14; // - u32 suppress_shadows : 1; // - u32 suppress_wm : 1; // - u32 sector : 16; // + u32 material : 14; // + u32 suppress_shadows : 1; // + u32 suppress_wm : 1; // + u32 sector : 16; // }; }; int id; @@ -127,7 +127,7 @@ enum OPT_CULL = (1 << 0), OPT_ONLYFIRST = (1 << 1), OPT_ONLYNEAREST = (1 << 2), - OPT_FULL_TEST = (1 << 3) // for box & frustum queries - enable class III test(s) + OPT_FULL_TEST = (1 << 3) // for box & frustum queries - enable class III test(s) }; // Collider itself diff --git a/src/xrCDB/xrCDB_Collector.cpp b/src/xrCDB/xrCDB_Collector.cpp index c686383456a..43b65b79eb6 100644 --- a/src/xrCDB/xrCDB_Collector.cpp +++ b/src/xrCDB/xrCDB_Collector.cpp @@ -17,8 +17,8 @@ u32 Collector::VPack(const Fvector& V, float eps) return verts.size() - 1; } -void Collector::add_face_D(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices - u32 dummy // misc +void Collector::add_face_D(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices + u32 dummy // misc ) { TRI T; @@ -48,8 +48,8 @@ void Collector::add_face(const Fvector& v0, const Fvector& v1, const Fvector& v2 faces.push_back(T); } -void Collector::add_face_packed(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices - u16 material, u16 sector, // misc +void Collector::add_face_packed(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices + u16 material, u16 sector, // misc float eps) { TRI T; @@ -61,7 +61,7 @@ void Collector::add_face_packed(const Fvector& v0, const Fvector& v1, const Fvec faces.push_back(T); } -void Collector::add_face_packed_D(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices +void Collector::add_face_packed_D(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices u32 dummy, float eps) { TRI T; @@ -304,8 +304,8 @@ CollectorPacked::CollectorPacked(const Fbox& bb, int apx_vertices, int apx_faces VM[ix][iy][iz].reserve(_average); } -void CollectorPacked::add_face(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices - u16 material, u16 sector, u32 _flags // misc +void CollectorPacked::add_face(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices + u16 material, u16 sector, u32 _flags // misc ) { TRI T; @@ -318,8 +318,8 @@ void CollectorPacked::add_face(const Fvector& v0, const Fvector& v1, const Fvect faces.push_back(T); } -void CollectorPacked::add_face_D(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices - u32 dummy, u32 _flags // misc +void CollectorPacked::add_face_D(const Fvector& v0, const Fvector& v1, const Fvector& v2, // vertices + u32 dummy, u32 _flags // misc ) { TRI T; diff --git a/src/xrCDB/xrCDB_ray.cpp b/src/xrCDB/xrCDB_ray.cpp index 992172728a0..a3ac93309be 100644 --- a/src/xrCDB/xrCDB_ray.cpp +++ b/src/xrCDB/xrCDB_ray.cpp @@ -13,7 +13,7 @@ using namespace Opcode; // can you say "barebone"? #ifndef _MM_ALIGN16 #define _MM_ALIGN16 __declspec(align(16)) -#endif // _MM_ALIGN16 +#endif // _MM_ALIGN16 struct _MM_ALIGN16 vec_t : public Fvector3 { @@ -52,40 +52,40 @@ ICF BOOL isect_fpu(const Fvector& min, const Fvector& max, const ray_t& ray, Fve coord[0] = min[0]; Inside = FALSE; if (uf(ray.inv_dir[0])) - MaxT[0] = (min[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes + MaxT[0] = (min[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes } else if (ray.pos[0] > max[0]) { coord[0] = max[0]; Inside = FALSE; if (uf(ray.inv_dir[0])) - MaxT[0] = (max[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes + MaxT[0] = (max[0] - ray.pos[0]) * ray.inv_dir[0]; // Calculate T distances to candidate planes } if (ray.pos[1] < min[1]) { coord[1] = min[1]; Inside = FALSE; if (uf(ray.inv_dir[1])) - MaxT[1] = (min[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes + MaxT[1] = (min[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes } else if (ray.pos[1] > max[1]) { coord[1] = max[1]; Inside = FALSE; if (uf(ray.inv_dir[1])) - MaxT[1] = (max[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes + MaxT[1] = (max[1] - ray.pos[1]) * ray.inv_dir[1]; // Calculate T distances to candidate planes } if (ray.pos[2] < min[2]) { coord[2] = min[2]; Inside = FALSE; if (uf(ray.inv_dir[2])) - MaxT[2] = (min[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes + MaxT[2] = (min[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes } else if (ray.pos[2] > max[2]) { coord[2] = max[2]; Inside = FALSE; if (uf(ray.inv_dir[2])) - MaxT[2] = (max[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes + MaxT[2] = (max[2] - ray.pos[2]) * ray.inv_dir[2]; // Calculate T distances to candidate planes } // Ray ray.pos inside bounding box @@ -102,21 +102,21 @@ ICF BOOL isect_fpu(const Fvector& min, const Fvector& max, const ray_t& ray, Fve // Check final candidate actually inside box (if max < 0) if (uf(MaxT[WhichPlane]) & 0x80000000) return false; - if (0 == WhichPlane) { // 1 & 2 + if (0 == WhichPlane) { // 1 & 2 coord[1] = ray.pos[1] + MaxT[0] * ray.fwd_dir[1]; if ((coord[1] < min[1]) || (coord[1] > max[1])) return false; coord[2] = ray.pos[2] + MaxT[0] * ray.fwd_dir[2]; if ((coord[2] < min[2]) || (coord[2] > max[2])) return false; return true; } - if (1 == WhichPlane) { // 0 & 2 + if (1 == WhichPlane) { // 0 & 2 coord[0] = ray.pos[0] + MaxT[1] * ray.fwd_dir[0]; if ((coord[0] < min[0]) || (coord[0] > max[0])) return false; coord[2] = ray.pos[2] + MaxT[1] * ray.fwd_dir[2]; if ((coord[2] < min[2]) || (coord[2] > max[2])) return false; return true; } - if (2 == WhichPlane) { // 0 & 1 + if (2 == WhichPlane) { // 0 & 1 coord[0] = ray.pos[0] + MaxT[2] * ray.fwd_dir[0]; if ((coord[0] < min[0]) || (coord[0] > max[0])) return false; coord[1] = ray.pos[1] + MaxT[2] * ray.fwd_dir[1]; @@ -135,10 +135,10 @@ ICF BOOL isect_fpu(const Fvector& min, const Fvector& max, const ray_t& ray, Fve #define maxps _mm_max_ps #define mulps _mm_mul_ps #define subps _mm_sub_ps -#define rotatelps(ps) _mm_shuffle_ps((ps), (ps), 0x39) // a,b,c,d -> b,c,d,a -#define muxhps(low, high) _mm_movehl_ps((low), (high)) // low{a,b,c,d}|high{e,f,g,h} = {c,d,g,h} +#define rotatelps(ps) _mm_shuffle_ps((ps), (ps), 0x39) // a,b,c,d -> b,c,d,a +#define muxhps(low, high) _mm_movehl_ps((low), (high)) // low{a,b,c,d}|high{e,f,g,h} = {c,d,g,h} -static const float flt_plus_inf = -logf(0); // let's keep C and C++ compilers happy. +static const float flt_plus_inf = -logf(0); // let's keep C and C++ compilers happy. static const float _MM_ALIGN16 ps_cst_plus_inf[4] = {flt_plus_inf, flt_plus_inf, flt_plus_inf, flt_plus_inf}, ps_cst_minus_inf[4] = {-flt_plus_inf, -flt_plus_inf, -flt_plus_inf, -flt_plus_inf}; @@ -270,13 +270,13 @@ class _MM_ALIGN16 ray_collider det = edge1.dotproduct(pvec); if (bCull) { if (det < EPS) return false; - tvec.sub(ray.pos, p0); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec); // calculate U parameter and test bounds + tvec.sub(ray.pos, p0); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec); // calculate U parameter and test bounds if (u < 0.f || u > det) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = ray.fwd_dir.dotproduct(qvec); // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = ray.fwd_dir.dotproduct(qvec); // calculate V parameter and test bounds if (v < 0.f || u + v > det) return false; - range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle + range = edge2.dotproduct(qvec); // calculate t, scale parameters, ray intersects triangle inv_det = 1.0f / det; range *= inv_det; u *= inv_det; @@ -286,13 +286,13 @@ class _MM_ALIGN16 ray_collider { if (det > -EPS && det < EPS) return false; inv_det = 1.0f / det; - tvec.sub(ray.pos, p0); // calculate distance from vert0 to ray origin - u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds + tvec.sub(ray.pos, p0); // calculate distance from vert0 to ray origin + u = tvec.dotproduct(pvec) * inv_det; // calculate U parameter and test bounds if (u < 0.0f || u > 1.0f) return false; - qvec.crossproduct(tvec, edge1); // prepare to test V parameter - v = ray.fwd_dir.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds + qvec.crossproduct(tvec, edge1); // prepare to test V parameter + v = ray.fwd_dir.dotproduct(qvec) * inv_det; // calculate V parameter and test bounds if (v < 0.0f || u + v > 1.0f) return false; - range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle + range = edge2.dotproduct(qvec) * inv_det; // calculate t, ray intersects triangle } return true; } diff --git a/src/xrCDB/xrXRC.h b/src/xrCDB/xrXRC.h index 7a7feea91d8..0dc27a0e0b0 100644 --- a/src/xrCDB/xrXRC.h +++ b/src/xrCDB/xrXRC.h @@ -18,9 +18,9 @@ class XRCDB_API xrXRC public: struct ColliderStatistics { - CStatTimer RayQuery; // total: ray-testing - CStatTimer BoxQuery; // total: box query - CStatTimer FrustumQuery; // total: frustum query + CStatTimer RayQuery; // total: ray-testing + CStatTimer BoxQuery; // total: box query + CStatTimer FrustumQuery; // total: frustum query float RayPs = 0; float BoxPs = 0; @@ -83,4 +83,4 @@ class XRCDB_API xrXRC }; XRCDB_API extern xrXRC XRC; -#endif // !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_) +#endif // !defined(AFX_XRXRC_H__9AA25268_621F_4FCA_BD75_AF2E9822B8E3__INCLUDED_) diff --git a/src/xrCDB/xr_area.cpp b/src/xrCDB/xr_area.cpp index 7bb43d2859f..6703ed655c5 100644 --- a/src/xrCDB/xr_area.cpp +++ b/src/xrCDB/xr_area.cpp @@ -16,7 +16,7 @@ CObjectSpace::CObjectSpace() #ifdef CONFIG_PROFILE_LOCKS , Lock(MUTEX_PROFILE_ID(CObjectSpace::Lock)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS #ifdef DEBUG , m_pRender(0) @@ -96,7 +96,7 @@ void CObjectSpace::Load(LPCSTR path, LPCSTR fname, CDB::build_callback build_cal #ifdef USE_ARENA_ALLOCATOR Msg("CObjectSpace::Load, g_collision_allocator.get_allocated_size() - %d", int(g_collision_allocator.get_allocated_size() / 1024.0 / 1024)); -#endif // #ifdef USE_ARENA_ALLOCATOR +#endif // #ifdef USE_ARENA_ALLOCATOR IReader* F = FS.r_open(path, fname); R_ASSERT(F); Load(F, build_callback); diff --git a/src/xrCDB/xr_area.h b/src/xrCDB/xr_area.h index 7bba96e9ce9..7fb54376093 100644 --- a/src/xrCDB/xr_area.h +++ b/src/xrCDB/xr_area.h @@ -25,9 +25,9 @@ class XRCDB_API CObjectSpace Lock lock; CDB::MODEL Static; Fbox m_BoundingVolume; - xrXRC xrc; // MT: dangerous - collide::rq_results r_temp; // MT: dangerous - xr_vector r_spatial; // MT: dangerous + xrXRC xrc; // MT: dangerous + collide::rq_results r_temp; // MT: dangerous + xr_vector r_spatial; // MT: dangerous public: #ifdef DEBUG FactoryPtr* m_pRender; @@ -89,4 +89,4 @@ class XRCDB_API CObjectSpace void DumpStatistics(IGameFont& font, IPerformanceAlert* alert); }; -#endif //__XR_AREA_H__ +#endif //__XR_AREA_H__ diff --git a/src/xrCDB/xr_collide_defs.h b/src/xrCDB/xr_collide_defs.h index a132fa5f1a4..ab649cd9ae6 100644 --- a/src/xrCDB/xr_collide_defs.h +++ b/src/xrCDB/xr_collide_defs.h @@ -21,8 +21,8 @@ struct tri }; struct elipsoid { - Fmatrix mL2W; // convertion from sphere(000,1) to real space - Fmatrix mW2L; // convertion from real space to sphere(000,1) + Fmatrix mL2W; // convertion from sphere(000,1) to real space + Fmatrix mW2L; // convertion from real space to sphere(000,1) }; struct ray_cache { @@ -87,9 +87,9 @@ struct ray_defs }; struct rq_result { - IGameObject* O; // if NULL - static - float range; // range to intersection - int element; // номер кости/номер треугольника + IGameObject* O; // if NULL - static + float range; // range to intersection + int element; // номер кости/номер треугольника IC rq_result& set(IGameObject* _O, float _range, int _element) { O = _O; diff --git a/src/xrCore/Animation/Bone.hpp b/src/xrCore/Animation/Bone.hpp index a5946a5539e..e7f2448e278 100644 --- a/src/xrCore/Animation/Bone.hpp +++ b/src/xrCore/Animation/Bone.hpp @@ -25,22 +25,22 @@ class XRCORE_API CBoneInstance { public: // data - Fmatrix mTransform; // final x-form matrix (local to model) - Fmatrix mRenderTransform; // final x-form matrix (model_base -> bone -> model) + Fmatrix mTransform; // final x-form matrix (local to model) + Fmatrix mRenderTransform; // final x-form matrix (model_base -> bone -> model) private: BoneCallback Callback; void* Callback_Param; - BOOL Callback_overwrite; // performance hint - don't calc anims + BOOL Callback_overwrite; // performance hint - don't calc anims u32 Callback_type; public: - float param[MAX_BONE_PARAMS]; // + float param[MAX_BONE_PARAMS]; // // // methods public: IC BoneCallback callback() { return Callback; } IC void* callback_param() { return Callback_Param; } - IC BOOL callback_overwrite() { return Callback_overwrite; } // performance hint - don't calc anims + IC BOOL callback_overwrite() { return Callback_overwrite; } // performance hint - don't calc anims IC u32 callback_type() { return Callback_type; } public: IC void construct(); @@ -69,7 +69,7 @@ class XRCORE_API CBoneInstance #pragma pack(pop) #pragma pack(push, 2) -struct XRCORE_API vertBoned1W // (3+3+3+3+2+1)*4 = 15*4 = 60 bytes +struct XRCORE_API vertBoned1W // (3+3+3+3+2+1)*4 = 15*4 = 60 bytes { Fvector P; Fvector N; @@ -87,7 +87,7 @@ struct XRCORE_API vertBoned1W // (3+3+3+3+2+1)*4 = 15*4 = 60 bytes } #endif }; -struct XRCORE_API vertBoned2W // (1+3+3 + 1+3+3 + 2)*4 = 16*4 = 64 bytes +struct XRCORE_API vertBoned2W // (1+3+3 + 1+3+3 + 2)*4 = 16*4 = 64 bytes { u16 matrix0; u16 matrix1; @@ -107,7 +107,7 @@ struct XRCORE_API vertBoned2W // (1+3+3 + 1+3+3 + 2)*4 = 16*4 = 64 bytes } #endif }; -struct XRCORE_API vertBoned3W // 70 bytes +struct XRCORE_API vertBoned3W // 70 bytes { u16 m[3]; Fvector P; @@ -126,7 +126,7 @@ struct XRCORE_API vertBoned3W // 70 bytes } #endif }; -struct XRCORE_API vertBoned4W // 76 bytes +struct XRCORE_API vertBoned4W // 76 bytes { u16 m[4]; Fvector P; @@ -186,17 +186,17 @@ struct XRCORE_API SBoneShape enum EShapeFlags { - sfNoPickable = (1 << 0), // use only in RayPick + sfNoPickable = (1 << 0), // use only in RayPick sfRemoveAfterBreak = (1 << 1), sfNoPhysics = (1 << 2), sfNoFogCollider = (1 << 3), }; - u16 type; // 2 - Flags16 flags; // 2 - Fobb box; // 15*4 - Fsphere sphere; // 4*4 - Fcylinder cylinder; // 8*4 + u16 type; // 2 + Flags16 flags; // 2 + Fobb box; // 15*4 + Fsphere sphere; // 4*4 + Fcylinder cylinder; // 8*4 SBoneShape() { Reset(); } void Reset() { @@ -225,7 +225,7 @@ struct XRCORE_API SJointIKData { // IK EJointType type; - SJointLimit limits[3]; // by [axis XYZ on joint] and[Z-wheel,X-steer on wheel] + SJointLimit limits[3]; // by [axis XYZ on joint] and[Z-wheel,X-steer on wheel] float spring_factor; float damping_factor; enum @@ -233,8 +233,8 @@ struct XRCORE_API SJointIKData flBreakable = (1 << 0), }; Flags32 ik_flags; - float break_force; // [0..+INF] - float break_torque; // [0..+INF] + float break_force; // [0..+INF] + float break_torque; // [0..+INF] float friction; @@ -266,8 +266,8 @@ struct XRCORE_API SJointIKData VERIFY(_min(-limits[k].limit.x, -limits[k].limit.y) == -limits[k].limit.y); VERIFY(_max(-limits[k].limit.x, -limits[k].limit.y) == -limits[k].limit.x); - F.w_float(-limits[k].limit.y); // min (swap special for ODE) - F.w_float(-limits[k].limit.x); // max (swap special for ODE) + F.w_float(-limits[k].limit.y); // min (swap special for ODE) + F.w_float(-limits[k].limit.x); // max (swap special for ODE) F.w_float(limits[k].spring_factor); F.w_float(limits[k].damping_factor); @@ -334,11 +334,11 @@ class XRCORE_API CBone : public CBoneInstance, public IBoneData shared_str parent_name; shared_str wmap; Fvector rest_offset; - Fvector rest_rotate; // XYZ format (Game format) + Fvector rest_rotate; // XYZ format (Game format) float rest_length; Fvector mot_offset; - Fvector mot_rotate; // XYZ format (Game format) + Fvector mot_rotate; // XYZ format (Game format) float mot_length; Fmatrix mot_transform; @@ -405,9 +405,9 @@ class XRCORE_API CBone : public CBoneInstance, public IBoneData IC Fmatrix& _RITransform() { return rest_i_transform; } IC Fmatrix& _LRTransform() { return local_rest_transform; } IC Fmatrix& _MTransform() { return mot_transform; } - IC Fmatrix& _LTransform() { return mTransform; } //{return last_transform;} + IC Fmatrix& _LTransform() { return mTransform; } //{return last_transform;} IC const Fmatrix& _LTransform() const { return mTransform; } - IC Fmatrix& _RenderTransform() { return mRenderTransform; } //{return render_transform;} + IC Fmatrix& _RenderTransform() { return mRenderTransform; } //{return render_transform;} IC Fvector& _RestOffset() { return rest_offset; } IC Fvector& _RestRotate() { return rest_rotate; } void _Update(const Fvector& T, const Fvector& R) @@ -496,7 +496,7 @@ class XRCORE_API CBoneData : public IBoneData Fobb obb; Fmatrix bind_transform; - Fmatrix m2b_transform; // model to bone conversion transform + Fmatrix m2b_transform; // model to bone conversion transform SBoneShape shape; shared_str game_mtl_name; u16 game_mtl_idx; @@ -504,11 +504,11 @@ class XRCORE_API CBoneData : public IBoneData float mass; Fvector center_of_mass; - vecBones children; // bones which are slaves to this + vecBones children; // bones which are slaves to this DEFINE_VECTOR(u16, FacesVec, FacesVecIt); DEFINE_VECTOR(FacesVec, ChildFacesVec, ChildFacesVecIt); - ChildFacesVec child_faces; // shared + ChildFacesVec child_faces; // shared public: CBoneData(u16 ID) : SelfID(ID) { VERIFY(SelfID != BI_NONE); } virtual ~CBoneData() {} @@ -550,7 +550,7 @@ class XRCORE_API CBoneData : public IBoneData enum EBoneCallbackType { - bctDummy = u32(0), // 0 - required!!! + bctDummy = u32(0), // 0 - required!!! bctPhysics, bctCustom, bctForceU32 = u32(-1), diff --git a/src/xrCore/Animation/Envelope.hpp b/src/xrCore/Animation/Envelope.hpp index d318761cc1f..a9789891d46 100644 --- a/src/xrCore/Animation/Envelope.hpp +++ b/src/xrCore/Animation/Envelope.hpp @@ -66,7 +66,7 @@ struct st_Key F.w_float(value); F.w_float(time); F.w_u8(shape); - if (shape != 4) // ! Stepped + if (shape != 4) // ! Stepped { F.w_float_q16(tension, -32.f, 32.f); F.w_float_q16(continuity, -32.f, 32.f); @@ -92,7 +92,7 @@ struct st_Key value = F.r_float(); time = F.r_float(); shape = F.r_u8(); - if (shape != 4) // ! Stepped + if (shape != 4) // ! Stepped { tension = F.r_float_q16(-32.f, 32.f); continuity = F.r_float_q16(-32.f, 32.f); @@ -148,4 +148,4 @@ class XRCORE_API CEnvelope void Optimize(); }; -#endif //_ENVELOPE_H_ +#endif //_ENVELOPE_H_ diff --git a/src/xrCore/Animation/SkeletonMotions.cpp b/src/xrCore/Animation/SkeletonMotions.cpp index f0a116c7eef..79778d62ef2 100644 --- a/src/xrCore/Animation/SkeletonMotions.cpp +++ b/src/xrCore/Animation/SkeletonMotions.cpp @@ -161,7 +161,7 @@ BOOL motions_value::load(LPCSTR N, IReader* data, vecBones* bones) u32 dwCNT = 0; MS->r_chunk_safe(0, &dwCNT, sizeof(dwCNT)); - VERIFY(dwCNT < 0x3FFF); // MotionID 2 bit - slot, 14 bit - motion index + VERIFY(dwCNT < 0x3FFF); // MotionID 2 bit - slot, 14 bit - motion index // set per bone motion size for (u32 i = 0; i < bones->size(); i++) @@ -325,8 +325,8 @@ void motions_container::dump() void CMotionDef::Load(IReader* MP, u32 fl, u16 version) { // params - bone_or_part = MP->r_u16(); // bCycle?part_id:bone_id; - motion = MP->r_u16(); // motion_id + bone_or_part = MP->r_u16(); // bCycle?part_id:bone_id; + motion = MP->r_u16(); // motion_id speed = Quantize(MP->r_float()); power = Quantize(MP->r_float()); accrue = Quantize(MP->r_float()); diff --git a/src/xrCore/Animation/SkeletonMotions.hpp b/src/xrCore/Animation/SkeletonMotions.hpp index eac3db0310e..84a0f7cb255 100644 --- a/src/xrCore/Animation/SkeletonMotions.hpp +++ b/src/xrCore/Animation/SkeletonMotions.hpp @@ -22,12 +22,12 @@ enum #pragma pack(push, 2) struct CKey { - Fquaternion Q; // rotation - Fvector T; // translation + Fquaternion Q; // rotation + Fvector T; // translation }; struct CKeyQR { - s16 x, y, z, w; // rotation + s16 x, y, z, w; // rotation }; struct CKeyQT8 { @@ -120,10 +120,10 @@ class XRCORE_API CMotionDef public: u16 bone_or_part; u16 motion; - u16 speed; // quantized: 0..10 - u16 power; // quantized: 0..10 - u16 accrue; // quantized: 0..10 - u16 falloff; // quantized: 0..10 + u16 speed; // quantized: 0..10 + u16 power; // quantized: 0..10 + u16 accrue; // quantized: 0..10 + u16 falloff; // quantized: 0..10 u16 flags; xr_vector marks; @@ -186,10 +186,10 @@ class XRCORE_API CPartition // shared motions struct XRCORE_API motions_value { - accel_map m_motion_map; // motion associations - accel_map m_cycle; // motion data itself (shared) - accel_map m_fx; // motion data itself (shared) - CPartition m_partition; // partition + accel_map m_motion_map; // motion associations + accel_map m_cycle; // motion data itself (shared) + accel_map m_fx; // motion data itself (shared) + CPartition m_partition; // partition u32 m_dwReference; BoneMotionMap m_motions; MotionDefVec m_mdefs; @@ -242,11 +242,11 @@ class XRCORE_API shared_motions } public: - bool create(shared_str key, IReader* data, vecBones* bones); //{ motions_value* v = - //g_pMotionsContainer->dock(key,data,bones); if (0!=v) - //v->m_dwReference++; destroy(); p_ = v; } + bool create(shared_str key, IReader* data, vecBones* bones); //{ motions_value* v = + // g_pMotionsContainer->dock(key,data,bones); if (0!=v) + // v->m_dwReference++; destroy(); p_ = v; } bool create( - shared_motions const& rhs); // { motions_value* v = rhs.p_; if (0!=v) v->m_dwReference++; destroy(); p_ = v; } + shared_motions const& rhs); // { motions_value* v = rhs.p_; if (0!=v) v->m_dwReference++; destroy(); p_ = v; } public: // construction shared_motions() { p_ = 0; } diff --git a/src/xrCore/Coder.hpp b/src/xrCore/Coder.hpp index badc2038287..30066f89e3b 100644 --- a/src/xrCore/Coder.hpp +++ b/src/xrCore/Coder.hpp @@ -164,4 +164,4 @@ static inline void rcBinCorrect1(UINT tmp, UINT f1) range *= f1; } -} // namespace ppmd +} // namespace ppmd diff --git a/src/xrCore/Crypto/crypto.cpp b/src/xrCore/Crypto/crypto.cpp index 76acda42956..2666311b192 100644 --- a/src/xrCore/Crypto/crypto.cpp +++ b/src/xrCore/Crypto/crypto.cpp @@ -31,4 +31,4 @@ XRCORE_API void xr_crypto_init() #endif*/ } -} // namespace crypto \ No newline at end of file +} // namespace crypto \ No newline at end of file diff --git a/src/xrCore/Crypto/crypto.h b/src/xrCore/Crypto/crypto.h index fa11eef3afe..90fe8980f4f 100644 --- a/src/xrCore/Crypto/crypto.h +++ b/src/xrCore/Crypto/crypto.h @@ -9,6 +9,6 @@ namespace crypto { XRCORE_API void xr_crypto_init(); -} // namespace crypto +} // namespace crypto #endif \ No newline at end of file diff --git a/src/xrCore/Crypto/xr_dsa.cpp b/src/xrCore/Crypto/xr_dsa.cpp index abd1cd79f6d..012dff39972 100644 --- a/src/xrCore/Crypto/xr_dsa.cpp +++ b/src/xrCore/Crypto/xr_dsa.cpp @@ -66,7 +66,7 @@ static void dsa_genparams_cb(int p, int n, void* arg) static unsigned char rnd_seed[] = "S.T.A.L.K.E.R. 4ever Rulezz !!!"; void print_big_number(BIGNUM* big_num, u32 max_columns = 8) { - u8 bin_buff[xr_dsa::public_key_length]; // public_key_length is the max + u8 bin_buff[xr_dsa::public_key_length]; // public_key_length is the max int bin_size = 0; string4096 result_buffer; @@ -161,6 +161,6 @@ void xr_dsa::generate_params() DSA_free(tmp_dsa_params); } -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG -} // namespace crypto \ No newline at end of file +} // namespace crypto \ No newline at end of file diff --git a/src/xrCore/Crypto/xr_dsa.h b/src/xrCore/Crypto/xr_dsa.h index 2e4568f1c99..d1915aae429 100644 --- a/src/xrCore/Crypto/xr_dsa.h +++ b/src/xrCore/Crypto/xr_dsa.h @@ -20,12 +20,12 @@ class XRCORE_API xr_dsa struct private_key_t { u8 m_value[private_key_length]; - }; // struct private_key_t + }; // struct private_key_t struct public_key_t { u8 m_value[public_key_length]; - }; // struct public_key_t + }; // struct public_key_t shared_str const sign(private_key_t const& priv_key, u8 const* data, u32 const data_size); bool verify(public_key_t const& pub_key, u8 const* data, u32 const data_size, shared_str const& dsign); @@ -36,8 +36,8 @@ class XRCORE_API xr_dsa private: dsa_st* m_dsa; -}; // class xr_dsa +}; // class xr_dsa -} // namespace crypto +} // namespace crypto -#endif //#ifndef XR_DSA_INCLUDED \ No newline at end of file +#endif //#ifndef XR_DSA_INCLUDED \ No newline at end of file diff --git a/src/xrCore/Crypto/xr_dsa_signer.h b/src/xrCore/Crypto/xr_dsa_signer.h index 215c72bcd33..c8a1c066842 100644 --- a/src/xrCore/Crypto/xr_dsa_signer.h +++ b/src/xrCore/Crypto/xr_dsa_signer.h @@ -24,8 +24,8 @@ class XRCORE_API xr_dsa_signer crypto::xr_dsa m_dsa; crypto::xr_sha256 m_sha; -}; // xr_dsa_signer +}; // xr_dsa_signer XRCORE_API char* current_time(string64& dest_time); -#endif //#ifndef XR_DSA_SIGNER_INCLUDED +#endif //#ifndef XR_DSA_SIGNER_INCLUDED diff --git a/src/xrCore/Crypto/xr_dsa_verifyer.h b/src/xrCore/Crypto/xr_dsa_verifyer.h index d5d3d932d23..a394aaff8ad 100644 --- a/src/xrCore/Crypto/xr_dsa_verifyer.h +++ b/src/xrCore/Crypto/xr_dsa_verifyer.h @@ -20,6 +20,6 @@ class XRCORE_API xr_dsa_verifyer private: crypto::xr_dsa m_dsa; crypto::xr_sha256 m_sha; -}; // class xr_dsa_verifyer +}; // class xr_dsa_verifyer -#endif //#ifndef XR_DSA_VERIFYER_INCLUDED \ No newline at end of file +#endif //#ifndef XR_DSA_VERIFYER_INCLUDED \ No newline at end of file diff --git a/src/xrCore/Crypto/xr_sha.cpp b/src/xrCore/Crypto/xr_sha.cpp index c68f7650d92..1884e35e240 100644 --- a/src/xrCore/Crypto/xr_sha.cpp +++ b/src/xrCore/Crypto/xr_sha.cpp @@ -39,4 +39,4 @@ bool xr_sha256::continue_calculate() return false; } -} // namespace crypto +} // namespace crypto diff --git a/src/xrCore/Crypto/xr_sha.h b/src/xrCore/Crypto/xr_sha.h index b0d236fafd4..635c0706c38 100644 --- a/src/xrCore/Crypto/xr_sha.h +++ b/src/xrCore/Crypto/xr_sha.h @@ -10,7 +10,7 @@ namespace crypto class XRCORE_API xr_sha256 { public: - static u32 const digest_length = 20; // SHA_DIGEST_LENGTH + static u32 const digest_length = 20; // SHA_DIGEST_LENGTH xr_sha256(); ~xr_sha256(); @@ -27,8 +27,8 @@ class XRCORE_API xr_sha256 u8 m_result[digest_length]; SHAstate_st* m_sha_ctx; -}; // xr_sha256 +}; // xr_sha256 -} // namespace crypto +} // namespace crypto -#endif //#ifndef XR_SHA_INCLUDED \ No newline at end of file +#endif //#ifndef XR_SHA_INCLUDED \ No newline at end of file diff --git a/src/xrCore/Debug/MiniDump.cpp b/src/xrCore/Debug/MiniDump.cpp index 421b56b6129..74c4a6629e3 100644 --- a/src/xrCore/Debug/MiniDump.cpp +++ b/src/xrCore/Debug/MiniDump.cpp @@ -5,7 +5,7 @@ Copyright (c) 1997-2001 John Robbins -- All rights reserved. #include "stdafx.h" #pragma warning(push) -#pragma warning(disable : 4091) // 'typedef ': ignored on left of '' when no variable is declared +#pragma warning(disable : 4091) // 'typedef ': ignored on left of '' when no variable is declared #include "MiniDump.h" #include "StackTrace.h" #pragma warning(pop) @@ -46,13 +46,13 @@ unsigned __stdcall DumpThread(LPVOID pData) if (bRet == TRUE) { pParams->eReturnValue = WriteMiniDumpResult::DumpSucceeded; } - else // Oops. + else // Oops. { pParams->eReturnValue = WriteMiniDumpResult::MiniDumpWriteDumpFailed; } CloseHandle(hFile); } - else // Could not open the file! + else // Could not open the file! { pParams->eReturnValue = WriteMiniDumpResult::OpenDumpFailed; } diff --git a/src/xrCore/Debug/StackTrace.cpp b/src/xrCore/Debug/StackTrace.cpp index 609850dc664..b85d47cdae5 100644 --- a/src/xrCore/Debug/StackTrace.cpp +++ b/src/xrCore/Debug/StackTrace.cpp @@ -5,7 +5,7 @@ Copyright (c) 1997-2000 John Robbins -- All rights reserved. #include "stdafx.h" #pragma warning(push) -#pragma warning(disable : 4091) // 'typedef ': ignored on left of '' when no variable is declared +#pragma warning(disable : 4091) // 'typedef ': ignored on left of '' when no variable is declared #include "MiniDump.h" #include "StackTrace.h" #include "SymbolEngine.h" diff --git a/src/xrCore/Debug/SymbolEngine.h b/src/xrCore/Debug/SymbolEngine.h index 413a8b8753c..8abc22cc947 100644 --- a/src/xrCore/Debug/SymbolEngine.h +++ b/src/xrCore/Debug/SymbolEngine.h @@ -214,7 +214,7 @@ class SymbolEngine *pdwDisplacement = dwTempDis; } return TRUE; -#endif // DO_NOT_WORK_AROUND_SRCLINE_BUG +#endif // DO_NOT_WORK_AROUND_SRCLINE_BUG } BOOL SymGetLineFromName(IN LPSTR ModuleName, IN LPSTR FileName, IN DWORD dwLineNumber, OUT PLONG plDisplacement, diff --git a/src/xrCore/Debug/dxerr.cpp b/src/xrCore/Debug/dxerr.cpp index 65767f85447..2b3fbe304a9 100644 --- a/src/xrCore/Debug/dxerr.cpp +++ b/src/xrCore/Debug/dxerr.cpp @@ -64,22 +64,22 @@ struct DXGI_RGBA; //-------------------------------------------------------------------------------------- #define CHK_ERR_W(hrchk, strOut) \ - case hrchk: return L##strOut; #define CHK_ERRA_W(hrchk) \ - case hrchk: return L#hrchk; #define CHK_ERR_A(hrchk, strOut) \ - case hrchk: return strOut; #define CHK_ERRA_A(hrchk) \ case hrchk: \ - return #hrchk; + return L##strOut; \ + #define CHK_ERRA_W(hrchk) case hrchk : return L#hrchk; \ + #define CHK_ERR_A(hrchk, strOut) case hrchk : return strOut; \ + #define CHK_ERRA_A(hrchk) case hrchk : return #hrchk; #define HRESULT_FROM_WIN32b(x) \ ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT)(((x)&0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000))) #define CHK_ERR_WIN32A_W(hrchk) \ case HRESULT_FROM_WIN32b(hrchk): \ - case hrchk: return L#hrchk; #define CHK_ERR_WIN32_ONLY_W(hrchk, strOut) \ - case HRESULT_FROM_WIN32b(hrchk): return L##strOut; #define CHK_ERR_WIN32A_A(hrchk) \ - case HRESULT_FROM_WIN32b(hrchk): \ - case hrchk: return #hrchk; #define CHK_ERR_WIN32_ONLY_A(hrchk, strOut) \ - case HRESULT_FROM_WIN32b(hrchk): return strOut; + case hrchk: \ + return L#hrchk; \ + #define CHK_ERR_WIN32_ONLY_W(hrchk, strOut) case HRESULT_FROM_WIN32b(hrchk) : return L##strOut; \ + #define CHK_ERR_WIN32A_A(hrchk) case HRESULT_FROM_WIN32b(hrchk) : case hrchk : return #hrchk; \ + #define CHK_ERR_WIN32_ONLY_A(hrchk, strOut) case HRESULT_FROM_WIN32b(hrchk) : return strOut; //----------------------------------------------------- const WCHAR* WINAPI DXGetErrorStringW(_In_ HRESULT hr) @@ -125,10 +125,11 @@ const CHAR* WINAPI DXGetErrorStringA(_In_ HRESULT hr) #undef CHK_ERR_A #define CHK_ERRA_W(hrchk) \ - case hrchk: wcscpy_s(desc, count, L#hrchk); #define CHK_ERR_W(hrchk, strOut) \ - case hrchk: wcscpy_s(desc, count, L##strOut); #define CHK_ERRA_A(hrchk) \ - case hrchk: strcpy_s(desc, count, #hrchk); #define CHK_ERR_A(hrchk, strOut) \ - case hrchk: strcpy_s(desc, count, strOut); + case hrchk: \ + wcscpy_s(desc, count, L#hrchk); \ + #define CHK_ERR_W(hrchk, strOut) case hrchk : wcscpy_s(desc, count, L##strOut); \ + #define CHK_ERRA_A(hrchk) case hrchk : strcpy_s(desc, count, #hrchk); \ + #define CHK_ERR_A(hrchk, strOut) case hrchk : strcpy_s(desc, count, strOut); //-------------------------------------------------------------------------------------- void WINAPI DXGetErrorDescriptionW(_In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count) diff --git a/src/xrCore/Debug/dxerr.h b/src/xrCore/Debug/dxerr.h index 8ba6c01683f..a38f4982e0d 100644 --- a/src/xrCore/Debug/dxerr.h +++ b/src/xrCore/Debug/dxerr.h @@ -95,4 +95,4 @@ XRCORE_API HRESULT WINAPI DXTraceA( #ifdef __cplusplus } -#endif //__cplusplus +#endif //__cplusplus diff --git a/src/xrCore/FMesh.hpp b/src/xrCore/FMesh.hpp index d5a606481e4..723538a0228 100644 --- a/src/xrCore/FMesh.hpp +++ b/src/xrCore/FMesh.hpp @@ -30,26 +30,26 @@ enum OGF_Chuncks OGF_TEXTURE = 2, OGF_VERTICES = 3, OGF_INDICES = 4, - OGF_P_MAP = 5, //---------------------- unused + OGF_P_MAP = 5, //---------------------- unused OGF_SWIDATA = 6, - OGF_VCONTAINER = 7, // not used ?? - OGF_ICONTAINER = 8, // not used ?? - OGF_CHILDREN = 9, // * For skeletons only - OGF_CHILDREN_L = 10, // Link to child visuals - OGF_LODDEF2 = 11, // + 5 channel data - OGF_TREEDEF2 = 12, // + 5 channel data - OGF_S_BONE_NAMES = 13, // * For skeletons only - OGF_S_MOTIONS = 14, // * For skeletons only - OGF_S_SMPARAMS = 15, // * For skeletons only - OGF_S_IKDATA = 16, // * For skeletons only - OGF_S_USERDATA = 17, // * For skeletons only (Ini-file) - OGF_S_DESC = 18, // * For skeletons only - OGF_S_MOTION_REFS = 19, // * For skeletons only - OGF_SWICONTAINER = 20, // * SlidingWindowItem record container - OGF_GCONTAINER = 21, // * both VB&IB - OGF_FASTPATH = 22, // * extended/fast geometry - OGF_S_LODS = 23, // * For skeletons only (Ini-file) - OGF_S_MOTION_REFS2 = 24, // * changes in format + OGF_VCONTAINER = 7, // not used ?? + OGF_ICONTAINER = 8, // not used ?? + OGF_CHILDREN = 9, // * For skeletons only + OGF_CHILDREN_L = 10, // Link to child visuals + OGF_LODDEF2 = 11, // + 5 channel data + OGF_TREEDEF2 = 12, // + 5 channel data + OGF_S_BONE_NAMES = 13, // * For skeletons only + OGF_S_MOTIONS = 14, // * For skeletons only + OGF_S_SMPARAMS = 15, // * For skeletons only + OGF_S_IKDATA = 16, // * For skeletons only + OGF_S_USERDATA = 17, // * For skeletons only (Ini-file) + OGF_S_DESC = 18, // * For skeletons only + OGF_S_MOTION_REFS = 19, // * For skeletons only + OGF_SWICONTAINER = 20, // * SlidingWindowItem record container + OGF_GCONTAINER = 21, // * both VB&IB + OGF_FASTPATH = 22, // * extended/fast geometry + OGF_S_LODS = 23, // * For skeletons only (Ini-file) + OGF_S_MOTION_REFS2 = 24, // * changes in format OGF_COLLISION_VERTICES = 25, OGF_COLLISION_INDICES = 26, OGF_forcedword = 0xFFFFFFFF @@ -99,9 +99,9 @@ struct ogf_bsphere const u8 xrOGF_FormatVersion = 4; struct ogf_header { - u8 format_version; // = xrOGF_FormatVersion - u8 type; // MT - u16 shader_id; // should not be ZERO + u8 format_version; // = xrOGF_FormatVersion + u8 type; // MT + u16 shader_id; // should not be ZERO ogf_bbox bb; ogf_bsphere bs; }; @@ -159,4 +159,4 @@ struct XRCORE_API FSlideWindowItem // scale : vec4 // bias : vec4 -#endif // fmeshH +#endif // fmeshH diff --git a/src/xrCore/FS.cpp b/src/xrCore/FS.cpp index 0c9961ef350..16a320780da 100644 --- a/src/xrCore/FS.cpp +++ b/src/xrCore/FS.cpp @@ -12,7 +12,7 @@ #ifdef M_BORLAND #define O_SEQUENTIAL 0 -#endif // M_BORLAND +#endif // M_BORLAND #ifdef FS_DEBUG XRCORE_API u32 g_file_mapped_memory = 0; @@ -35,7 +35,7 @@ void register_file_mapping(void* address, const u32& size, LPCSTR file_name) string512 temp; xr_sprintf(temp, sizeof(temp), "file mapping: %s", file_name); memory_monitor::monitor_alloc(address, size, temp); -#endif // USE_MEMORY_MONITOR +#endif // USE_MEMORY_MONITOR } void unregister_file_mapping(void* address, const u32& size) @@ -54,7 +54,7 @@ void unregister_file_mapping(void* address, const u32& size) #ifdef USE_MEMORY_MONITOR memory_monitor::monitor_free(address); -#endif // USE_MEMORY_MONITOR +#endif // USE_MEMORY_MONITOR } XRCORE_API void dump_file_mappings() @@ -66,7 +66,7 @@ XRCORE_API void dump_file_mappings() for (; I != E; ++I) Msg("* [0x%08x][%d][%s]", (*I).first, (*I).second.first, (*I).second.second.c_str()); } -#endif // DEBUG +#endif // DEBUG ////////////////////////////////////////////////////////////////////// // Tools ////////////////////////////////////////////////////////////////////// @@ -96,7 +96,7 @@ bool file_handle_internal(LPCSTR file_name, u32& size, int& hFile) size = filelength(hFile); return (true); } -#else // EDITOR +#else // EDITOR static int open_internal(LPCSTR fn, int& handle) { return (_sopen_s(&handle, fn, _O_RDONLY | _O_BINARY, _SH_DENYNO, _S_IREAD)); @@ -112,7 +112,7 @@ bool file_handle_internal(LPCSTR file_name, u32& size, int& file_handle) size = _filelength(file_handle); return (true); } -#endif // EDITOR +#endif // EDITOR void* FileDownload(LPCSTR file_name, const int& file_handle, u32& file_size) { @@ -120,7 +120,7 @@ void* FileDownload(LPCSTR file_name, const int& file_handle, u32& file_size) #ifdef DEBUG_MEMORY_NAME , "FILE in memory" -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME ); int r_bytes = _read(file_handle, buffer, file_size); @@ -206,14 +206,14 @@ void CMemoryWriter::w(const void* ptr, u32 count) #ifdef DEBUG_MEMORY_NAME , "CMemoryWriter - storage" -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME ); else data = (BYTE*)Memory.mem_realloc(data, mem_size #ifdef DEBUG_MEMORY_NAME , "CMemoryWriter - storage" -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME ); } CopyMemory(data + position, ptr, count); @@ -237,7 +237,7 @@ void IWriter::open_chunk(u32 type) { w_u32(type); chunk_pos.push(tell()); - w_u32(0); // the place for 'size' + w_u32(0); // the place for 'size' } void IWriter::close_chunk() { @@ -249,7 +249,7 @@ void IWriter::close_chunk() seek(pos); chunk_pos.pop(); } -u32 IWriter::chunk_size() // returns size of currently opened chunk, 0 otherwise +u32 IWriter::chunk_size() // returns size of currently opened chunk, 0 otherwise { if (chunk_pos.empty()) return 0; return tell() - chunk_pos.top() - 4; @@ -343,11 +343,11 @@ IReaderTestPolicy::~IReaderTestPolicy() { xr_delete(m_test); }; -#endif // TESTING_IREADER +#endif // TESTING_IREADER #ifdef FIND_CHUNK_BENCHMARK_ENABLE find_chunk_counter g_find_chunk_counter; -#endif // FIND_CHUNK_BENCHMARK_ENABLE +#endif // FIND_CHUNK_BENCHMARK_ENABLE u32 IReader::find_chunk(u32 ID, BOOL* bCompressed) { @@ -481,7 +481,7 @@ CPackReader::~CPackReader() { #ifdef FS_DEBUG unregister_file_mapping(base_address, Size); -#endif // DEBUG +#endif // DEBUG UnmapViewOfFile(base_address); }; @@ -524,14 +524,14 @@ CVirtualFileRW::CVirtualFileRW(const char* cFileName) #ifdef FS_DEBUG register_file_mapping(data, Size, cFileName); -#endif // DEBUG +#endif // DEBUG } CVirtualFileRW::~CVirtualFileRW() { #ifdef FS_DEBUG unregister_file_mapping(data, Size); -#endif // DEBUG +#endif // DEBUG UnmapViewOfFile((void*)data); CloseHandle(hSrcMap); @@ -554,14 +554,14 @@ CVirtualFileReader::CVirtualFileReader(const char* cFileName) #ifdef FS_DEBUG register_file_mapping(data, Size, cFileName); -#endif // DEBUG +#endif // DEBUG } CVirtualFileReader::~CVirtualFileReader() { #ifdef FS_DEBUG unregister_file_mapping(data, Size); -#endif // DEBUG +#endif // DEBUG UnmapViewOfFile((void*)data); CloseHandle(hSrcMap); diff --git a/src/xrCore/FS.h b/src/xrCore/FS.h index 0286cf6b4f4..b7758c863c1 100644 --- a/src/xrCore/FS.h +++ b/src/xrCore/FS.h @@ -18,7 +18,7 @@ XRCORE_API extern u32 g_file_mapped_count; XRCORE_API void dump_file_mappings(); extern void register_file_mapping(void* address, const u32& size, LPCSTR file_name); extern void unregister_file_mapping(void* address, const u32& size); -#endif // DEBUG +#endif // DEBUG //------------------------------------------------------------------------------------ // Write @@ -103,7 +103,7 @@ class XRCORE_API IWriter u32 align(); void open_chunk(u32 type); void close_chunk(); - u32 chunk_size(); // returns size of currently opened chunk, 0 otherwise + u32 chunk_size(); // returns size of currently opened chunk, 0 otherwise void w_compressed(void* ptr, u32 count); void w_chunk(u32 type, void* data, u32 size); virtual bool valid() { return true; } @@ -168,16 +168,16 @@ struct XRCORE_API IReaderTestPolicy { IReaderBase_Test* m_test; IReaderTestPolicy() { m_test = NULL; } - ~IReaderTestPolicy(); // defined in FS.cpp + ~IReaderTestPolicy(); // defined in FS.cpp }; -#endif // TESTING_IREADER +#endif // TESTING_IREADER template class IReaderBase #ifdef TESTING_IREADER - : public IReaderTestPolicy // inheriting -#endif // TESTING_IREADER + : public IReaderTestPolicy // inheriting +#endif // TESTING_IREADER { public: @@ -263,14 +263,14 @@ class IReaderBase IC float r_float_q16(float min, float max) { u16 val = r_u16(); - float A = (float(val) * (max - min)) / 65535.f + min; // floating-point-error possible + float A = (float(val) * (max - min)) / 65535.f + min; // floating-point-error possible VERIFY((A >= min - EPS_S) && (A <= max + EPS_S)); return A; } IC float r_float_q8(float min, float max) { u8 val = r_u8(); - float A = (float(val) / 255.0001f) * (max - min) + min; // floating-point-error possible + float A = (float(val) / 255.0001f) * (max - min) + min; // floating-point-error possible VERIFY((A >= min) && (A <= max)); return A; } @@ -292,7 +292,7 @@ class IReaderBase IC void rewind() { impl().seek(0); } u32 find_chunk(u32 ID, BOOL* bCompressed); - IC BOOL r_chunk(u32 ID, void* dest) // чтение XR Chunk'ов (4b-ID,4b-size,??b-data) + IC BOOL r_chunk(u32 ID, void* dest) // чтение XR Chunk'ов (4b-ID,4b-size,??b-data) { u32 dwSize = ((implementation_type*)this)->find_chunk(ID); if (dwSize != 0) { @@ -303,7 +303,7 @@ class IReaderBase return FALSE; } - IC BOOL r_chunk_safe(u32 ID, void* dest, u32 dest_size) // чтение XR Chunk'ов (4b-ID,4b-size,??b-data) + IC BOOL r_chunk_safe(u32 ID, void* dest, u32 dest_size) // чтение XR Chunk'ов (4b-ID,4b-size,??b-data) { u32 dwSize = ((implementation_type*)this)->find_chunk(ID); if (dwSize != 0) { @@ -385,7 +385,7 @@ class XRCORE_API IReader : public IReaderBase IReader* open_chunk(u32 ID); // iterators - IReader* open_chunk_iterator(u32& ID, IReader* previous = NULL); // NULL=first + IReader* open_chunk_iterator(u32& ID, IReader* previous = NULL); // NULL=first u32 find_chunk(u32 ID, BOOL* bCompressed = 0); @@ -403,4 +403,4 @@ class XRCORE_API CVirtualFileRW : public IReader virtual ~CVirtualFileRW(); }; -#endif // fsH +#endif // fsH diff --git a/src/xrCore/FS_impl.h b/src/xrCore/FS_impl.h index 955bf621e2e..2585b10caf0 100644 --- a/src/xrCore/FS_impl.h +++ b/src/xrCore/FS_impl.h @@ -40,9 +40,9 @@ struct find_chunk_counter #ifdef INCLUDE_FROM_ENGINE extern XR_IMPORT find_chunk_counter g_find_chunk_counter; -#else // INCLUDE_FROM_ENGINE +#else // INCLUDE_FROM_ENGINE extern XR_EXPORT find_chunk_counter g_find_chunk_counter; -#endif // INCLUDE_FROM_ENGINE +#endif // INCLUDE_FROM_ENGINE extern bool g_initialize_cpu_called; @@ -63,7 +63,7 @@ struct find_chunk_auto_timer } }; -#endif // FIND_CHUNK_BENCHMARK_ENABLE +#endif // FIND_CHUNK_BENCHMARK_ENABLE #ifdef FIND_CHUNK_STD @@ -76,7 +76,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) { #ifdef FIND_CHUNK_BENCHMARK_ENABLE find_chunk_auto_timer timer; -#endif // FIND_CHUNK_BENCHMARK_ENABLE +#endif // FIND_CHUNK_BENCHMARK_ENABLE u32 dwSize, dwType; @@ -97,7 +97,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) return 0; } -#endif // #ifdef FIND_CHUNK_STD +#endif // #ifdef FIND_CHUNK_STD #ifdef FIND_CHUNK_HEU @@ -111,7 +111,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) { #ifdef FIND_CHUNK_BENCHMARK_ENABLE find_chunk_auto_timer timer; -#endif // FIND_CHUNK_BENCHMARK_ENABLE +#endif // FIND_CHUNK_BENCHMARK_ENABLE u32 dwSize, dwType; @@ -166,7 +166,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) #pragma warning(default : 4701) -#endif // #ifdef FIND_CHUNK_HEU +#endif // #ifdef FIND_CHUNK_HEU #ifdef FIND_CHUNK_VEC @@ -183,7 +183,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) { #ifdef FIND_CHUNK_BENCHMARK_ENABLE find_chunk_auto_timer timer; -#endif // FIND_CHUNK_BENCHMARK_ENABLE +#endif // FIND_CHUNK_BENCHMARK_ENABLE u32 dwSize, dwType; @@ -233,7 +233,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) return 0; } -#endif // #ifdef FIND_CHUNK_VEC +#endif // #ifdef FIND_CHUNK_VEC #ifdef FIND_CHUNK_MAP @@ -252,7 +252,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) { #ifdef FIND_CHUNK_BENCHMARK_ENABLE find_chunk_auto_timer timer; -#endif // FIND_CHUNK_BENCHMARK_ENABLE +#endif // FIND_CHUNK_BENCHMARK_ENABLE u32 dwSize, dwType; @@ -303,6 +303,6 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) return 0; } -#endif // #ifdef FIND_CHUNK_MAP +#endif // #ifdef FIND_CHUNK_MAP -#endif // #ifndef FS_IMPL_H_INCLUDED \ No newline at end of file +#endif // #ifndef FS_IMPL_H_INCLUDED \ No newline at end of file diff --git a/src/xrCore/FTimer.h b/src/xrCore/FTimer.h index 479df8c6ab8..2cc5694996c 100644 --- a/src/xrCore/FTimer.h +++ b/src/xrCore/FTimer.h @@ -102,13 +102,13 @@ class XRCORE_API CTimer : public CTimerBase { #ifndef _EDITOR FPU::m64r(); -#endif // _EDITOR +#endif // _EDITOR u64 result = GetElapsed_ticks(inherited::GetElapsed_ticks()); #ifndef _EDITOR FPU::m24r(); -#endif // _EDITOR +#endif // _EDITOR return (result); } @@ -202,4 +202,4 @@ class XRCORE_API CStatTimer } }; -#endif // FTimerH +#endif // FTimerH diff --git a/src/xrCore/FileSystem.cpp b/src/xrCore/FileSystem.cpp index cda98d9c049..6acdcb2cf34 100644 --- a/src/xrCore/FileSystem.cpp +++ b/src/xrCore/FileSystem.cpp @@ -135,7 +135,7 @@ bool EFS_Utils::GetOpenNameInternal( if (xr_strlen(buffer)) { string_path dr; - if (!(buffer[0] == '\\' && buffer[1] == '\\')) // if !network + if (!(buffer[0] == '\\' && buffer[1] == '\\')) // if !network { _splitpath(buffer, dr, 0, 0, 0); @@ -216,7 +216,7 @@ bool EFS_Utils::GetSaveName(LPCSTR initial, string_path& buffer, LPCSTR offset, string1024 flt; LPCSTR def_ext = P.m_DefExt; - if (false) //&& dwWindowsMajorVersion == 6 ) + if (false) //&& dwWindowsMajorVersion == 6 ) { if (strstr(P.m_DefExt, "*.")) def_ext = strstr(P.m_DefExt, "*.") + 2; } @@ -226,7 +226,7 @@ bool EFS_Utils::GetSaveName(LPCSTR initial, string_path& buffer, LPCSTR offset, memset(&ofn, 0, sizeof(ofn)); if (xr_strlen(buffer)) { string_path dr; - if (!(buffer[0] == '\\' && buffer[1] == '\\')) // if !network + if (!(buffer[0] == '\\' && buffer[1] == '\\')) // if !network { _splitpath(buffer, dr, 0, 0, 0); if (0 == dr[0]) P._update(buffer, buffer); diff --git a/src/xrCore/FileSystem_borland.cpp b/src/xrCore/FileSystem_borland.cpp index 6c52d44eb55..7e2785d5d79 100644 --- a/src/xrCore/FileSystem_borland.cpp +++ b/src/xrCore/FileSystem_borland.cpp @@ -23,7 +23,7 @@ int CALLBACK BrowseCallbackProc(HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpDa bool EFS_Utils::GetOpenName(LPCSTR initial, xr_string& buffer, bool bMulti, LPCSTR offset, int start_flt_ext) { - char buf[255 * 255]; // max files to select + char buf[255 * 255]; // max files to select xr_strcpy(buf, buffer.c_str()); /* diff --git a/src/xrCore/FixedMap.h b/src/xrCore/FixedMap.h index 6c4c47796de..5f5137bbca7 100644 --- a/src/xrCore/FixedMap.h +++ b/src/xrCore/FixedMap.h @@ -226,7 +226,7 @@ class FixedMAP IC void clear() { pool = 0; } IC TNode* begin() { return nodes; } IC TNode* end() { return nodes + pool; } - IC TNode* last() { return nodes + limit; } // for setup only + IC TNode* last() { return nodes + limit; } // for setup only IC u32 size() { return pool; } IC TNode& operator[](int v) { return nodes[v]; } IC void traverseLR(callback CB) diff --git a/src/xrCore/FixedSet.h b/src/xrCore/FixedSet.h index 640584ac5a6..d82fb0815e6 100644 --- a/src/xrCore/FixedSet.h +++ b/src/xrCore/FixedSet.h @@ -178,7 +178,7 @@ class FixedSET IC void clear() { pool = 0; } IC TNode* begin() { return nodes; } IC TNode* end() { return nodes + pool; } - IC TNode* last() { return nodes + limit; } // for setup only + IC TNode* last() { return nodes + limit; } // for setup only IC u32 size() { return pool; } IC TNode& operator[](int v) { return nodes[v]; } IC void traverseLR(callback CB) diff --git a/src/xrCore/LocatorAPI.cpp b/src/xrCore/LocatorAPI.cpp index ad93fe4fc4a..fd31264f4f7 100644 --- a/src/xrCore/LocatorAPI.cpp +++ b/src/xrCore/LocatorAPI.cpp @@ -164,7 +164,7 @@ XRCORE_API void _dump_open_files(int mode) CLocatorAPI::CLocatorAPI() #ifdef CONFIG_PROFILE_LOCKS : m_auth_lock(MUTEX_PROFILE_ID(CLocatorAPI::m_auth_lock)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { m_Flags.zero(); // get page size @@ -435,7 +435,7 @@ void CLocatorAPI::unload_archive(CLocatorAPI::archive& A) if (entry.vfs == A.vfs_idx) { #ifndef MASTER_GOLD Msg("unregistering file [%s]", I->name); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD char* str = LPSTR(I->name); xr_free(str); m_files.erase(I); @@ -587,7 +587,7 @@ void CLocatorAPI::setup_fs_path(LPCSTR fs_name) FS_Path* path = new FS_Path(full_current_directory, "", "", "", 0); #ifdef DEBUG Msg("$fs_root$ = %s", full_current_directory); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG pathes.insert(std::make_pair(xr_strdup("$fs_root$"), path)); } @@ -617,7 +617,7 @@ IReader* CLocatorAPI::setup_fs_ltx(LPCSTR fs_name) #ifdef DEBUG if (result && m_Flags.is(flBuildCopy | flReady)) copy_file_to_build(result, fs_file_name); -#endif // DEBUG +#endif // DEBUG if (m_Flags.test(flDumpFileActivity)) _register_open_file(result, fs_file_name); @@ -626,7 +626,7 @@ IReader* CLocatorAPI::setup_fs_ltx(LPCSTR fs_name) void CLocatorAPI::_initialize(u32 flags, LPCSTR target_folder, LPCSTR fs_name) { - char _delimiter = '|'; //',' + char _delimiter = '|'; //',' if (m_Flags.is(flReady)) return; CTimer t; t.Start(); @@ -722,7 +722,7 @@ void CLocatorAPI::_initialize(u32 flags, LPCSTR target_folder, LPCSTR fs_name) I = pathes.insert(mk_pair(xr_strdup(id), P)); #ifndef DEBUG m_Flags.set(flCacheFiles, FALSE); -#endif // DEBUG +#endif // DEBUG CHECK_OR_EXIT(I.second, "The file 'fsgame.ltx' is corrupted (it contains duplicated lines).\nPlease " "reinstall the game or fix the problem manually."); @@ -859,14 +859,14 @@ xr_vector* CLocatorAPI::file_list_open(const char* _path, u32 flags) for (++I; I != m_files.end(); I++) { const file& entry = *I; - if (0 != strncmp(entry.name, N, base_len)) break; // end of list + if (0 != strncmp(entry.name, N, base_len)) break; // end of list const char* end_symbol = entry.name + xr_strlen(entry.name) - 1; if ((*end_symbol) != '\\') { // file if ((flags & FS_ListFiles) == 0) continue; const char* entry_begin = entry.name + base_len; - if ((flags & FS_RootOnly) && strstr(entry_begin, "\\")) continue; // folder in folder + if ((flags & FS_RootOnly) && strstr(entry_begin, "\\")) continue; // folder in folder dest->push_back(xr_strdup(entry_begin)); LPSTR fname = dest->back(); if (flags & FS_ClampExt) @@ -878,7 +878,7 @@ xr_vector* CLocatorAPI::file_list_open(const char* _path, u32 flags) if ((flags & FS_ListFolders) == 0) continue; const char* entry_begin = entry.name + base_len; - if ((flags & FS_RootOnly) && (strstr(entry_begin, "\\") != end_symbol)) continue; // folder in folder + if ((flags & FS_RootOnly) && (strstr(entry_begin, "\\") != end_symbol)) continue; // folder in folder dest->push_back(xr_strdup(entry_begin)); } @@ -920,13 +920,13 @@ int CLocatorAPI::file_list(FS_FileSet& dest, LPCSTR path, u32 flags, LPCSTR mask for (++I; I != m_files.end(); ++I) { const file& entry = *I; - if (0 != strncmp(entry.name, N, base_len)) break; // end of list + if (0 != strncmp(entry.name, N, base_len)) break; // end of list LPCSTR end_symbol = entry.name + xr_strlen(entry.name) - 1; if ((*end_symbol) != '\\') { // file if ((flags & FS_ListFiles) == 0) continue; LPCSTR entry_begin = entry.name + base_len; - if ((flags & FS_RootOnly) && strstr(entry_begin, "\\")) continue; // folder in folder + if ((flags & FS_RootOnly) && strstr(entry_begin, "\\")) continue; // folder in folder // check extension if (b_mask) { bool bOK = false; @@ -956,7 +956,7 @@ int CLocatorAPI::file_list(FS_FileSet& dest, LPCSTR path, u32 flags, LPCSTR mask if ((flags & FS_ListFolders) == 0) continue; LPCSTR entry_begin = entry.name + base_len; - if ((flags & FS_RootOnly) && (strstr(entry_begin, "\\") != end_symbol)) continue; // folder in folder + if ((flags & FS_RootOnly) && (strstr(entry_begin, "\\") != end_symbol)) continue; // folder in folder u32 fl = FS_File::flSubDir | (entry.vfs ? FS_File::flVFS : 0); dest.insert(FS_File(entry_begin, entry.size_real, entry.modif, fl)); } @@ -1048,7 +1048,7 @@ void CLocatorAPI::file_from_cache(T*& R, LPSTR fname, const u32& fname_size, con { #ifdef DEBUG if (m_Flags.is(flCacheFiles)) check_cached_files(fname, fname_size, desc, source_name); -#endif // DEBUG +#endif // DEBUG file_from_cache_impl(R, fname, desc); } @@ -1071,7 +1071,7 @@ void CLocatorAPI::file_from_archive(IReader*& R, LPCSTR fname, const file& desc) #ifdef FS_DEBUG register_file_mapping(ptr, sz, temp); -#endif // DEBUG +#endif // DEBUG u32 ptr_offs = desc.ptr - start; if (desc.size_real == desc.size_compressed) { @@ -1087,7 +1087,7 @@ void CLocatorAPI::file_from_archive(IReader*& R, LPCSTR fname, const file& desc) #ifdef FS_DEBUG unregister_file_mapping(ptr, sz); -#endif // DEBUG +#endif // DEBUG } void CLocatorAPI::file_from_archive(CStreamReader*& R, LPCSTR fname, const file& desc) @@ -1229,7 +1229,7 @@ T* CLocatorAPI::r_open_impl(LPCSTR path, LPCSTR _fname) #ifdef DEBUG if (R && m_Flags.is(flBuildCopy | flReady)) copy_file_to_build(R, source_name); -#endif // DEBUG +#endif // DEBUG if (m_Flags.test(flDumpFileActivity)) _register_open_file(R, fname); @@ -1264,7 +1264,7 @@ IWriter* CLocatorAPI::w_open(LPCSTR path, LPCSTR _fname) { string_path fname; xr_strcpy(fname, _fname); - xr_strlwr(fname); //,".$"); + xr_strlwr(fname); //,".$"); if (path && path[0]) update_path(fname, path, fname); CFileWriter* W = new CFileWriter(fname, false); #ifdef _EDITOR @@ -1277,7 +1277,7 @@ IWriter* CLocatorAPI::w_open_ex(LPCSTR path, LPCSTR _fname) { string_path fname; xr_strcpy(fname, _fname); - xr_strlwr(fname); //,".$"); + xr_strlwr(fname); //,".$"); if (path && path[0]) update_path(fname, path, fname); CFileWriter* W = new CFileWriter(fname, true); #ifdef _EDITOR @@ -1338,7 +1338,7 @@ BOOL CLocatorAPI::dir_delete(LPCSTR initial, LPCSTR nm, BOOL remove_files) const file& entry = *cur_item; I = cur_item; I++; - if (0 != strncmp(entry.name, fpath, base_len)) break; // end of list + if (0 != strncmp(entry.name, fpath, base_len)) break; // end of list const char* end_symbol = entry.name + xr_strlen(entry.name) - 1; if ((*end_symbol) != '\\') { // const char* entry_begin = entry.name+base_len; @@ -1514,7 +1514,7 @@ void CLocatorAPI::rescan_path(LPCSTR full_path, BOOL bRecurse) const file& entry = *cur_item; I = cur_item; I++; - if (0 != strncmp(entry.name, full_path, base_len)) break; // end of list + if (0 != strncmp(entry.name, full_path, base_len)) break; // end of list if (entry.vfs != 0xFFFFFFFF) continue; const char* entry_begin = entry.name + base_len; if (!bRecurse && strstr(entry_begin, "\\")) continue; diff --git a/src/xrCore/LocatorAPI.h b/src/xrCore/LocatorAPI.h index 86eb7b8db2a..e2a6119137f 100644 --- a/src/xrCore/LocatorAPI.h +++ b/src/xrCore/LocatorAPI.h @@ -22,7 +22,7 @@ class FileStatus { public: bool Exists; - bool External; // File can be accessed only as external + bool External; // File can be accessed only as external inline FileStatus(bool exists, bool external) { @@ -40,13 +40,13 @@ class XRCORE_API CLocatorAPI public: struct file { - LPCSTR name; // low-case name - u32 vfs; // 0xffffffff - standart file - u32 crc; // contents CRC - u32 ptr; // pointer inside vfs - u32 size_real; // - u32 size_compressed; // if (size_real==size_compressed) - uncompressed - u32 modif; // for editor + LPCSTR name; // low-case name + u32 vfs; // 0xffffffff - standart file + u32 crc; // contents CRC + u32 ptr; // pointer inside vfs + u32 size_real; // + u32 size_compressed; // if (size_real==size_compressed) - uncompressed + u32 modif; // for editor }; struct archive { diff --git a/src/xrCore/LocatorAPI_auth.cpp b/src/xrCore/LocatorAPI_auth.cpp index 96ea7eda385..b1975e112cc 100644 --- a/src/xrCore/LocatorAPI_auth.cpp +++ b/src/xrCore/LocatorAPI_auth.cpp @@ -56,7 +56,7 @@ void CLocatorAPI::auth_runtime(void* params) #ifdef DEBUG bool b_extern_auth = !!strstr(Core.Params, "asdf"); if (!b_extern_auth) -#endif // DEBUG +#endif // DEBUG { for (files_it it = m_files.begin(); it != m_files.end(); ++it) { @@ -85,7 +85,7 @@ void CLocatorAPI::auth_runtime(void* params) #ifdef DEBUG if (strstr(Core.Params, "auth_debug")) Msg("auth %s = 0x%08x", f.name, crc); -#endif // DEBUG +#endif // DEBUG FS.r_close(r); m_auth_code ^= u64(crc); @@ -96,7 +96,7 @@ void CLocatorAPI::auth_runtime(void* params) } #ifdef DEBUG Msg("auth_code = %d", m_auth_code); -#endif // DEBUG +#endif // DEBUG } #ifdef DEBUG else @@ -105,7 +105,7 @@ void CLocatorAPI::auth_runtime(void* params) sscanf(strstr(Core.Params, "asdf ") + 5, "%[^ ] ", c_auth_code); m_auth_code = _atoi64(c_auth_code); } -#endif // DEBUG +#endif // DEBUG xr_delete(_o); m_auth_lock.Leave(); diff --git a/src/xrCore/LocatorAPI_defs.h b/src/xrCore/LocatorAPI_defs.h index c2a0b2e9277..75cc689f784 100644 --- a/src/xrCore/LocatorAPI_defs.h +++ b/src/xrCore/LocatorAPI_defs.h @@ -61,7 +61,7 @@ struct XRCORE_API FS_File unsigned attrib; time_t time_write; long size; - xr_string name; // low-case name + xr_string name; // low-case name void set(const xr_string& nm, long sz, time_t modif, unsigned attr); public: @@ -76,4 +76,4 @@ DEFINE_SET(FS_File, FS_FileSet, FS_FileSetIt); extern bool XRCORE_API PatternMatch(LPCSTR s, LPCSTR mask); -#endif // LocatorAPI_defsH +#endif // LocatorAPI_defsH diff --git a/src/xrCore/Math/MathUtil.cpp b/src/xrCore/Math/MathUtil.cpp index 61b9be8883a..93dc2768df0 100644 --- a/src/xrCore/Math/MathUtil.cpp +++ b/src/xrCore/Math/MathUtil.cpp @@ -42,5 +42,5 @@ void Initialize() initialized = true; } -} // namespace Math -} // namespace XRay +} // namespace Math +} // namespace XRay diff --git a/src/xrCore/Math/MathUtil.hpp b/src/xrCore/Math/MathUtil.hpp index f26c109e67c..95fdb9af0fa 100644 --- a/src/xrCore/Math/MathUtil.hpp +++ b/src/xrCore/Math/MathUtil.hpp @@ -29,5 +29,5 @@ extern XRCORE_API Skin4WFunc Skin4W; extern XRCORE_API PLCCalcFunc PLCCalc; void XRCORE_API Initialize(); -} // namespace Math -} // namespace XRay +} // namespace Math +} // namespace XRay diff --git a/src/xrCore/Math/PLC_SSE.cpp b/src/xrCore/Math/PLC_SSE.cpp index 12cf42f81a6..35d44f27ab2 100644 --- a/src/xrCore/Math/PLC_SSE.cpp +++ b/src/xrCore/Math/PLC_SSE.cpp @@ -68,5 +68,5 @@ void PLCCalc_SSE(int& c0, int& c1, int& c2, const Fvector& camPos, const Fvector c2 = iCeil_SSE(255.f * a); } -} // namespace Math -} // namespace XRay +} // namespace Math +} // namespace XRay diff --git a/src/xrCore/Math/PLC_SSE.hpp b/src/xrCore/Math/PLC_SSE.hpp index d1426ce6768..993284d3001 100644 --- a/src/xrCore/Math/PLC_SSE.hpp +++ b/src/xrCore/Math/PLC_SSE.hpp @@ -7,5 +7,5 @@ namespace Math { void PLCCalc_SSE(int& c0, int& c1, int& c2, const Fvector& camPos, const Fvector* ps, const Fvector& n, const light* l, float energy, const Fvector& obj); -} // namespace Math -} // namespace XRay +} // namespace Math +} // namespace XRay diff --git a/src/xrCore/Math/Skin4W_MT.cpp b/src/xrCore/Math/Skin4W_MT.cpp index caef244dd24..53f1562fd8d 100644 --- a/src/xrCore/Math/Skin4W_MT.cpp +++ b/src/xrCore/Math/Skin4W_MT.cpp @@ -61,5 +61,5 @@ void Skin4W_MT(vertRender* dst, vertBoned4W* src, u32 vCount, CBoneInstance* bon ttapi_Run(); } -} // namespace Util3D -} // namespace XRay +} // namespace Util3D +} // namespace XRay diff --git a/src/xrCore/Math/Skin4W_MT.hpp b/src/xrCore/Math/Skin4W_MT.hpp index 795f83af514..50639021861 100644 --- a/src/xrCore/Math/Skin4W_MT.hpp +++ b/src/xrCore/Math/Skin4W_MT.hpp @@ -9,5 +9,5 @@ extern Skin4WFunc Skin4W_MTs; void Skin4W_MT(vertRender* dst, vertBoned4W* src, u32 vCount, CBoneInstance* bones); -} // namespace Math -} // namespace XRay +} // namespace Math +} // namespace XRay diff --git a/src/xrCore/Math/SkinXW_SSE.cpp b/src/xrCore/Math/SkinXW_SSE.cpp index 891ae2837f7..ff04563f8b3 100644 --- a/src/xrCore/Math/SkinXW_SSE.cpp +++ b/src/xrCore/Math/SkinXW_SSE.cpp @@ -88,22 +88,22 @@ void Skin4W_SSE(vertRender* D, vertBoned4W* S, u32 vCount, CBoneInstance* Bones) // ------------------------------------------------------------------ movlps xmm1, MMWORD PTR [esi]S.u ; xmm1 = ?? | ?? | v | u movaps xmm5, xmm4 ; xmm5 = 00 | Pz | Py | Px - add edi,TYPE vertRender ; // advance dest + add edi,TYPE vertRender ; // advance dest movss xmm5, xmm0 ; xmm5 = 00 | Pz | Py | Nx prefetchnta BYTE PTR [esi+4*(TYPE vertBoned4W)]; one cache line ahead - add esi,TYPE vertBoned4W ; // advance source + add esi,TYPE vertBoned4W ; // advance source shufps xmm4, xmm5, _MM_SHUFFLE(0,2,1,0) ; xmm4 = Nx | Pz | Py | Px shufps xmm0, xmm1, _MM_SHUFFLE(1,0,2,1) ; xmm0 = v | u | Nz | Ny // ------------------------------------------------------------------ - dec ecx ; // vCount-- + dec ecx ; // vCount-- // ------------------------------------------------------------------ // writing data // ------------------------------------------------------------------ movntps XMMWORD PTR [edi-(TYPE vertRender)],xmm4 ; movntps XMMWORD PTR [edi+16-(TYPE vertRender)],xmm0 ; // ------------------------------------------------------------------ - jnz new_vert ; // vCount == 0 ? exit : goto new_vert + jnz new_vert ; // vCount == 0 ? exit : goto new_vert // ------------------------------------------------------------------ sfence ; write back cache // ------------------------------------------------------------------ @@ -165,22 +165,22 @@ void Skin3W_SSE(vertRender* D, vertBoned3W* S, u32 vCount, CBoneInstance* Bones) // ------------------------------------------------------------------ movlps xmm1, MMWORD PTR [esi]S.u ; xmm1 = ?? | ?? | v | u movaps xmm5, xmm4 ; xmm5 = 00 | Pz | Py | Px - add edi,TYPE vertRender ; // advance dest + add edi,TYPE vertRender ; // advance dest movss xmm5, xmm0 ; xmm5 = 00 | Pz | Py | Nx prefetchnta BYTE PTR [esi+8*(TYPE vertBoned3W)]; one cache line ahead - add esi,TYPE vertBoned3W ; // advance source + add esi,TYPE vertBoned3W ; // advance source shufps xmm4, xmm5, _MM_SHUFFLE(0,2,1,0) ; xmm4 = Nx | Pz | Py | Px shufps xmm0, xmm1, _MM_SHUFFLE(1,0,2,1) ; xmm0 = v | u | Nz | Ny // ------------------------------------------------------------------ - dec ecx ; // vCount-- + dec ecx ; // vCount-- // ------------------------------------------------------------------ // writing data // ------------------------------------------------------------------ movntps XMMWORD PTR [edi-(TYPE vertRender)],xmm4 ; movntps XMMWORD PTR [edi+16-(TYPE vertRender)],xmm0 ; // ------------------------------------------------------------------ - jnz new_vert ; // vCount == 0 ? exit : goto new_vert + jnz new_vert ; // vCount == 0 ? exit : goto new_vert // ------------------------------------------------------------------ sfence ; write back cache // ------------------------------------------------------------------ @@ -232,22 +232,22 @@ void Skin2W_SSE(vertRender* D, vertBoned2W* S, u32 vCount, CBoneInstance* Bones) movlps xmm7, MMWORD PTR [esi]S.u ; xmm7 = ?? | ?? | v | u movaps xmm5, xmm0 ; xmm5 = 00 | Pz | Py | Px - add edi,TYPE vertRender ; // advance dest + add edi,TYPE vertRender ; // advance dest movss xmm5, xmm2 ; xmm5 = 00 | Pz | Py | Nx prefetchnta BYTE PTR [esi+12*(TYPE vertBoned2W)]; one cache line ahead - add esi,TYPE vertBoned2W ; // advance source + add esi,TYPE vertBoned2W ; // advance source shufps xmm0, xmm5, _MM_SHUFFLE(0,2,1,0) ; xmm0 = Nx | Pz | Py | Px shufps xmm2, xmm7, _MM_SHUFFLE(1,0,2,1) ; xmm2 = v | u | Nz | Ny // ------------------------------------------------------------------ - dec ecx ; // vCount-- + dec ecx ; // vCount-- // ------------------------------------------------------------------ // writing data // ------------------------------------------------------------------ movntps XMMWORD PTR [edi-(TYPE vertRender)],xmm0 ; movntps XMMWORD PTR [edi+16-(TYPE vertRender)],xmm2 ; // ------------------------------------------------------------------ - jnz new_vert ; // vCount == 0 ? exit : goto new_vert + jnz new_vert ; // vCount == 0 ? exit : goto new_vert // ------------------------------------------------------------------ sfence ; write back cache // ------------------------------------------------------------------ @@ -302,27 +302,27 @@ void Skin1W_SSE(vertRender* D, vertBoned1W* S, u32 vCount, CBoneInstance* Bones) movlps xmm1, MMWORD PTR [esi]S.u ; xmm1 = ?? | ?? | v | u movaps xmm4, xmm0 ; xmm4 = 00 | Pz | Py | Px - add edi,TYPE vertRender ; // advance dest + add edi,TYPE vertRender ; // advance dest movss xmm4, xmm3 ; xmm4 = 00 | Pz | Py | Nx prefetchnta BYTE PTR [esi+16*(TYPE vertBoned1W)]; one cache line ahead - add esi,TYPE vertBoned1W ; // advance source + add esi,TYPE vertBoned1W ; // advance source shufps xmm0, xmm4, _MM_SHUFFLE(0,2,1,0) ; xmm0 = Nx | Pz | Py | Px shufps xmm3, xmm1, _MM_SHUFFLE(1,0,2,1) ; xmm3 = v | u | Nz | Ny // ------------------------------------------------------------------ - dec ecx ; // vCount-- + dec ecx ; // vCount-- // ------------------------------------------------------------------ // writing data // ------------------------------------------------------------------ movntps XMMWORD PTR [edi-(TYPE vertRender)],xmm0 ; movntps XMMWORD PTR [edi+16-(TYPE vertRender)],xmm3 ; // ------------------------------------------------------------------ - jnz new_vert ; // vCount == 0 ? exit : goto new_vert + jnz new_vert ; // vCount == 0 ? exit : goto new_vert // ------------------------------------------------------------------ sfence ; write back cache // ------------------------------------------------------------------ } } -} // namespace Util3D -} // namespace XRay +} // namespace Util3D +} // namespace XRay diff --git a/src/xrCore/Math/SkinXW_SSE.hpp b/src/xrCore/Math/SkinXW_SSE.hpp index 2d2edea0b63..88514178a57 100644 --- a/src/xrCore/Math/SkinXW_SSE.hpp +++ b/src/xrCore/Math/SkinXW_SSE.hpp @@ -16,5 +16,5 @@ void Skin1W_SSE(vertRender* D, vertBoned1W* S, u32 vCount, CBoneInstance* Bones) void Skin2W_SSE(vertRender* D, vertBoned2W* S, u32 vCount, CBoneInstance* Bones); void Skin3W_SSE(vertRender* D, vertBoned3W* S, u32 vCount, CBoneInstance* Bones); void Skin4W_SSE(vertRender* D, vertBoned4W* S, u32 vCount, CBoneInstance* Bones); -} // namespace Math -} // namespace XRay +} // namespace Math +} // namespace XRay diff --git a/src/xrCore/Media/Image.cpp b/src/xrCore/Media/Image.cpp index 92ffccd5229..f94722a2251 100644 --- a/src/xrCore/Media/Image.cpp +++ b/src/xrCore/Media/Image.cpp @@ -46,7 +46,7 @@ void Image::SaveTGA(TWriter& writerFunc, ImageFormat format, bool align) R_ASSERT(width); R_ASSERT(height); TGAHeader hdr = {}; - hdr.ImageType = 2; // uncompressed true-color image + hdr.ImageType = 2; // uncompressed true-color image hdr.Width = width; hdr.Height = height; int scanLength = width * channelCount; diff --git a/src/xrCore/Model.cpp b/src/xrCore/Model.cpp index 7f667708207..c0acc20b4ac 100644 --- a/src/xrCore/Model.cpp +++ b/src/xrCore/Model.cpp @@ -66,23 +66,23 @@ SEE2_CONTEXT _PACK_ATTR SEE2Cont[24][32], DummySEE2Cont; //============================================================================== struct PPM_CONTEXT -{ // Notes: - BYTE NumStats, Flags; // 1. NumStats & NumMasked contain - WORD SummFreq; // number of symbols minus 1 +{ // Notes: + BYTE NumStats, Flags; // 1. NumStats & NumMasked contain + WORD SummFreq; // number of symbols minus 1 struct STATE - { // 2. sizeof(WORD) > sizeof(BYTE) - BYTE Symbol, Freq; // 3. contexts example: - PPM_CONTEXT* Successor; // MaxOrder: + { // 2. sizeof(WORD) > sizeof(BYTE) + BYTE Symbol, Freq; // 3. contexts example: + PPM_CONTEXT* Successor; // MaxOrder: }; - STATE _PACK_ATTR* Stats; // ABCD context - PPM_CONTEXT* Suffix; // BCD suffix + STATE _PACK_ATTR* Stats; // ABCD context + PPM_CONTEXT* Suffix; // BCD suffix - inline void encodeBinSymbol(int symbol); // BCDE successor - inline void encodeSymbol1(int symbol); // other orders: - inline void encodeSymbol2(int symbol); // BCD context - inline void decodeBinSymbol() const; // CD suffix - inline void decodeSymbol1(); // BCDE successor + inline void encodeBinSymbol(int symbol); // BCDE successor + inline void encodeSymbol1(int symbol); // other orders: + inline void encodeSymbol2(int symbol); // BCD context + inline void decodeBinSymbol() const; // CD suffix + inline void decodeSymbol1(); // BCDE successor inline void decodeSymbol2(); inline void update1(STATE* p); inline void update2(STATE* p); @@ -98,11 +98,11 @@ struct PPM_CONTEXT PPM_CONTEXT _PACK_ATTR* MaxContext; #pragma pack() -static BYTE NS2BSIndx[256], QTable[260]; // constants -static PPM_CONTEXT::STATE* FoundState; // found next state transition +static BYTE NS2BSIndx[256], QTable[260]; // constants +static PPM_CONTEXT::STATE* FoundState; // found next state transition static int InitEsc, OrderFall, RunLength, InitRL, MaxOrder; static BYTE CharMask[256], NumMasked, PrevSuccess, EscCount, PrintCount; -static WORD BinSumm[25][64]; // binary SEE-contexts +static WORD BinSumm[25][64]; // binary SEE-contexts static MR_METHOD MRMethod; static void _STDCALL StartModelRare(int MaxOrder, MR_METHOD MRMethod); @@ -125,7 +125,7 @@ struct PPMD_STARTUP { inline PPMD_STARTUP(); } PPMd_StartUp; -inline PPMD_STARTUP::PPMD_STARTUP() // constants initialization +inline PPMD_STARTUP::PPMD_STARTUP() // constants initialization { UINT i, k, m, Step; for (i = 0, k = 1; i < N1; i++, k += 1) @@ -1034,7 +1034,7 @@ void _STDCALL EncodeFile(_PPMD_FILE* EncodedFile, _PPMD_FILE* DecodedFile, int M if (EscCount == 0) ClearMask(EncodedFile, DecodedFile); } rcEncNormalize(EncodedFile); - } // for (PPM_CONTEXT* MinContext; ; ) + } // for (PPM_CONTEXT* MinContext; ; ) STOP_ENCODING: rcFlushEncoder(EncodedFile); @@ -1099,7 +1099,7 @@ static void _STDCALL StartModelRare(int MaxOrder, MR_METHOD MRMethod) memset(CharMask, 0, sizeof(CharMask)); EscCount = PrintCount = 1; - if (MaxOrder < 2) // we are in solid mode + if (MaxOrder < 2) // we are in solid mode { OrderFall = ::MaxOrder; for (PPM_CONTEXT* pc = MaxContext; pc && pc->Suffix; pc = pc->Suffix) diff --git a/src/xrCore/NET_utils.cpp b/src/xrCore/NET_utils.cpp index 2c9d51aeb53..2a6cdd5b53d 100644 --- a/src/xrCore/NET_utils.cpp +++ b/src/xrCore/NET_utils.cpp @@ -10,7 +10,7 @@ void NET_Packet::read_start() INI_W(move_begin()); } -u32 NET_Packet::r_begin(u16& type) // returns time of receiving +u32 NET_Packet::r_begin(u16& type) // returns time of receiving { r_pos = 0; if (!inistream) @@ -67,7 +67,7 @@ void NET_Packet::r_vec3(Fvector& A) r(&A, sizeof(Fvector)); else inistream->r_vec3(A); -} // vec3 +} // vec3 void NET_Packet::r_vec4(Fvector4& A) { @@ -75,7 +75,7 @@ void NET_Packet::r_vec4(Fvector4& A) r(&A, sizeof(Fvector4)); else inistream->r_vec4(A); -} // vec4 +} // vec4 void NET_Packet::r_float(float& A) { @@ -83,7 +83,7 @@ void NET_Packet::r_float(float& A) r(&A, sizeof(float)); else inistream->r_float(A); -} // float +} // float void NET_Packet::r_u64(u64& A) { @@ -91,7 +91,7 @@ void NET_Packet::r_u64(u64& A) r(&A, sizeof(u64)); else inistream->r_u64(A); -} // qword (8b) +} // qword (8b) void NET_Packet::r_s64(s64& A) { @@ -99,7 +99,7 @@ void NET_Packet::r_s64(s64& A) r(&A, sizeof(s64)); else inistream->r_s64(A); -} // qword (8b) +} // qword (8b) void NET_Packet::r_u32(u32& A) { @@ -107,7 +107,7 @@ void NET_Packet::r_u32(u32& A) r(&A, sizeof(u32)); else inistream->r_u32(A); -} // dword (4b) +} // dword (4b) void NET_Packet::r_s32(s32& A) { @@ -115,7 +115,7 @@ void NET_Packet::r_s32(s32& A) r(&A, sizeof(s32)); else inistream->r_s32(A); -} // dword (4b) +} // dword (4b) void NET_Packet::r_u16(u16& A) { @@ -123,7 +123,7 @@ void NET_Packet::r_u16(u16& A) r(&A, sizeof(u16)); else inistream->r_u16(A); -} // word (2b) +} // word (2b) void NET_Packet::r_s16(s16& A) { @@ -131,7 +131,7 @@ void NET_Packet::r_s16(s16& A) r(&A, sizeof(s16)); else inistream->r_s16(A); -} // word (2b) +} // word (2b) void NET_Packet::r_u8(u8& A) { @@ -139,7 +139,7 @@ void NET_Packet::r_u8(u8& A) r(&A, sizeof(u8)); else inistream->r_u8(A); -} // byte (1b) +} // byte (1b) void NET_Packet::r_s8(s8& A) { @@ -147,7 +147,7 @@ void NET_Packet::r_s8(s8& A) r(&A, sizeof(s8)); else inistream->r_s8(A); -} // byte (1b) +} // byte (1b) // IReader compatibility Fvector NET_Packet::r_vec3() @@ -183,56 +183,56 @@ float NET_Packet::r_float() float A; r_float(A); return (A); -} // float +} // float u64 NET_Packet::r_u64() { u64 A; r_u64(A); return (A); -} // qword (8b) +} // qword (8b) s64 NET_Packet::r_s64() { s64 A; r_s64(A); return (A); -} // qword (8b) +} // qword (8b) u32 NET_Packet::r_u32() { u32 A; r_u32(A); return (A); -} // dword (4b) +} // dword (4b) s32 NET_Packet::r_s32() { s32 A; r_s32(A); return (A); -} // dword (4b) +} // dword (4b) u16 NET_Packet::r_u16() { u16 A; r_u16(A); return (A); -} // word (2b) +} // word (2b) s16 NET_Packet::r_s16() { s16 A; r_s16(A); return (A); -} // word (2b) +} // word (2b) u8 NET_Packet::r_u8() { u8 A; r_u8(A); return (A); -} // byte (1b) +} // byte (1b) s8 NET_Packet::r_s8() { @@ -245,7 +245,7 @@ void NET_Packet::r_float_q16(float& A, float min, float max) { u16 val; r_u16(val); - A = (float(val) * (max - min)) / 65535.f + min; // floating-point-error possible + A = (float(val) * (max - min)) / 65535.f + min; // floating-point-error possible VERIFY((A >= min - EPS_S) && (A <= max + EPS_S)); } @@ -253,7 +253,7 @@ void NET_Packet::r_float_q8(float& A, float min, float max) { u8 val; r_u8(val); - A = (float(val) / 255.0001f) * (max - min) + min; // floating-point-error possible + A = (float(val) / 255.0001f) * (max - min) + min; // floating-point-error possible VERIFY((A >= min) && (A <= max)); } @@ -293,7 +293,7 @@ void NET_Packet::r_stringZ(LPSTR S) } else { - inistream->r_string(S, 4096); //??? + inistream->r_string(S, 4096); //??? } } diff --git a/src/xrCore/PPMdType.h b/src/xrCore/PPMdType.h index 0367b34bb51..dba29481e2b 100644 --- a/src/xrCore/PPMdType.h +++ b/src/xrCore/PPMdType.h @@ -57,7 +57,7 @@ const int MAX_O = 16; /* maximum allowed model order */ #define VERIFY(a) #define VERIFY2(a, b) #define VERIFY_is_defined_in_ppmdtype_h -#endif // VERIFY +#endif // VERIFY typedef unsigned char u8; typedef unsigned int u32; #include "compression_ppmd_stream.h" @@ -66,7 +66,7 @@ typedef unsigned int u32; #undef VERIFY #undef VERIFY2 #undef VERIFY_is_defined_in_ppmdtype_h -#endif // VERIFY_is_defined_in_ppmdtype_h +#endif // VERIFY_is_defined_in_ppmdtype_h #include "compression_ppmd_stream.h" typedef compression::ppmd::stream _PPMD_FILE; diff --git a/src/xrCore/PostProcess/PPInfo.cpp b/src/xrCore/PostProcess/PPInfo.cpp index 965e26bab89..dfecbdd1716 100644 --- a/src/xrCore/PostProcess/PPInfo.cpp +++ b/src/xrCore/PostProcess/PPInfo.cpp @@ -89,9 +89,9 @@ SPPInfo& SPPInfo::lerp(const SPPInfo& def, const SPPInfo& to, float factor) pp.duality.v += def.duality.v + (to.duality.v - def.duality.v) * factor; pp.gray += def.gray + (to.gray - def.gray) * factor; pp.blur += def.blur + (to.blur - def.blur) * factor; - pp.noise.intensity = to.noise.intensity; // + (to.noise.intensity - def.noise.intensity) * factor; - pp.noise.grain = to.noise.grain; // + (to.noise.grain - def.noise.grain) * factor; - pp.noise.fps = to.noise.fps; // + (to.noise.fps - def.noise.fps) * factor; + pp.noise.intensity = to.noise.intensity; // + (to.noise.intensity - def.noise.intensity) * factor; + pp.noise.grain = to.noise.grain; // + (to.noise.grain - def.noise.grain) * factor; + pp.noise.fps = to.noise.fps; // + (to.noise.fps - def.noise.fps) * factor; pp.color_base.set(def.color_base.r + (to.color_base.r - def.color_base.r) * factor, def.color_base.g + (to.color_base.g - def.color_base.g) * factor, diff --git a/src/xrCore/PostProcess/PostProcess.cpp b/src/xrCore/PostProcess/PostProcess.cpp index 499bf59da01..6342d8e8e84 100644 --- a/src/xrCore/PostProcess/PostProcess.cpp +++ b/src/xrCore/PostProcess/PostProcess.cpp @@ -184,25 +184,25 @@ void BasicPostProcessAnimator::Create() m_factor_speed = 1.0f; f_length = 0.0f; - m_Params[0] = new CPostProcessColor(&m_EffectorParams.color_base); // base color + m_Params[0] = new CPostProcessColor(&m_EffectorParams.color_base); // base color VERIFY(m_Params[0]); - m_Params[1] = new CPostProcessColor(&m_EffectorParams.color_add); // add color + m_Params[1] = new CPostProcessColor(&m_EffectorParams.color_add); // add color VERIFY(m_Params[1]); - m_Params[2] = new CPostProcessColor(&m_EffectorParams.color_gray); // gray color + m_Params[2] = new CPostProcessColor(&m_EffectorParams.color_gray); // gray color VERIFY(m_Params[2]); - m_Params[3] = new CPostProcessValue(&m_EffectorParams.gray); // gray value + m_Params[3] = new CPostProcessValue(&m_EffectorParams.gray); // gray value VERIFY(m_Params[3]); - m_Params[4] = new CPostProcessValue(&m_EffectorParams.blur); // blur value + m_Params[4] = new CPostProcessValue(&m_EffectorParams.blur); // blur value VERIFY(m_Params[4]); - m_Params[5] = new CPostProcessValue(&m_EffectorParams.duality.h); // duality horizontal + m_Params[5] = new CPostProcessValue(&m_EffectorParams.duality.h); // duality horizontal VERIFY(m_Params[5]); - m_Params[6] = new CPostProcessValue(&m_EffectorParams.duality.v); // duality vertical + m_Params[6] = new CPostProcessValue(&m_EffectorParams.duality.v); // duality vertical VERIFY(m_Params[6]); - m_Params[7] = new CPostProcessValue(&m_EffectorParams.noise.intensity); // noise intensity + m_Params[7] = new CPostProcessValue(&m_EffectorParams.noise.intensity); // noise intensity VERIFY(m_Params[7]); - m_Params[8] = new CPostProcessValue(&m_EffectorParams.noise.grain); // noise granularity + m_Params[8] = new CPostProcessValue(&m_EffectorParams.noise.grain); // noise granularity VERIFY(m_Params[8]); - m_Params[9] = new CPostProcessValue(&m_EffectorParams.noise.fps); // noise fps + m_Params[9] = new CPostProcessValue(&m_EffectorParams.noise.fps); // noise fps VERIFY(m_Params[9]); m_Params[10] = new CPostProcessValue(&m_EffectorParams.cm_influence); VERIFY(m_Params[10]); @@ -240,34 +240,34 @@ void BasicPostProcessAnimator::ResetParam(pp_params param) switch (param) { case pp_base_color: - m_Params[0] = new CPostProcessColor(&m_EffectorParams.color_base); // base color + m_Params[0] = new CPostProcessColor(&m_EffectorParams.color_base); // base color break; case pp_add_color: - m_Params[1] = new CPostProcessColor(&m_EffectorParams.color_add); // add color + m_Params[1] = new CPostProcessColor(&m_EffectorParams.color_add); // add color break; case pp_gray_color: - m_Params[2] = new CPostProcessColor(&m_EffectorParams.color_gray); // gray color + m_Params[2] = new CPostProcessColor(&m_EffectorParams.color_gray); // gray color break; case pp_gray_value: - m_Params[3] = new CPostProcessValue(&m_EffectorParams.gray); // gray value + m_Params[3] = new CPostProcessValue(&m_EffectorParams.gray); // gray value break; case pp_blur: - m_Params[4] = new CPostProcessValue(&m_EffectorParams.blur); // blur value + m_Params[4] = new CPostProcessValue(&m_EffectorParams.blur); // blur value break; case pp_dual_h: - m_Params[5] = new CPostProcessValue(&m_EffectorParams.duality.h); // duality horizontal + m_Params[5] = new CPostProcessValue(&m_EffectorParams.duality.h); // duality horizontal break; case pp_dual_v: - m_Params[6] = new CPostProcessValue(&m_EffectorParams.duality.v); // duality vertical + m_Params[6] = new CPostProcessValue(&m_EffectorParams.duality.v); // duality vertical break; case pp_noise_i: - m_Params[7] = new CPostProcessValue(&m_EffectorParams.noise.intensity); // noise intensity + m_Params[7] = new CPostProcessValue(&m_EffectorParams.noise.intensity); // noise intensity break; case pp_noise_g: - m_Params[8] = new CPostProcessValue(&m_EffectorParams.noise.grain); // noise granularity + m_Params[8] = new CPostProcessValue(&m_EffectorParams.noise.grain); // noise granularity break; case pp_noise_f: - m_Params[9] = new CPostProcessValue(&m_EffectorParams.noise.fps); // noise fps + m_Params[9] = new CPostProcessValue(&m_EffectorParams.noise.fps); // noise fps break; case pp_cm_influence: m_Params[10] = new CPostProcessValue(&m_EffectorParams.cm_influence); break; } diff --git a/src/xrCore/Stream_Reader.h b/src/xrCore/Stream_Reader.h index dc6a0d0c6f5..9fa955b5143 100644 --- a/src/xrCore/Stream_Reader.h +++ b/src/xrCore/Stream_Reader.h @@ -63,4 +63,4 @@ class XRCORE_API CStreamReader : public IReaderBase #include "stream_reader_inline.h" -#endif // STREAM_READER_H \ No newline at end of file +#endif // STREAM_READER_H \ No newline at end of file diff --git a/src/xrCore/SubAlloc.hpp b/src/xrCore/SubAlloc.hpp index e8e4671612b..5e657800098 100644 --- a/src/xrCore/SubAlloc.hpp +++ b/src/xrCore/SubAlloc.hpp @@ -42,7 +42,7 @@ struct MEM_BLK : public BLK_NODE } _PACK_ATTR; #pragma pack() -static BYTE Indx2Units[N_INDEXES], Units2Indx[128]; // constants +static BYTE Indx2Units[N_INDEXES], Units2Indx[128]; // constants static DWORD GlueCount, SubAllocatorSize = 0; static BYTE *HeapStart, *pText, *UnitsStart, *LoUnit, *HiUnit; diff --git a/src/xrCore/Text/MbHelpers.cpp b/src/xrCore/Text/MbHelpers.cpp index c8dd811c2e0..fa0c9b89939 100644 --- a/src/xrCore/Text/MbHelpers.cpp +++ b/src/xrCore/Text/MbHelpers.cpp @@ -1,14 +1,14 @@ #include "MbHelpers.h" #include "stdafx.h" -#define BITS1_MASK 0x80 // 10000000b -#define BITS2_MASK 0xC0 // 11000000b -#define BITS3_MASK 0xE0 // 11100000b -#define BITS4_MASK 0xF0 // 11110000b -#define BITS1_EXP 0x00 // 00000000b -#define BITS2_EXP 0x80 // 10000000b -#define BITS3_EXP 0xC0 // 11000000b -#define BITS4_EXP 0xE0 // 11100000b +#define BITS1_MASK 0x80 // 10000000b +#define BITS2_MASK 0xC0 // 11000000b +#define BITS3_MASK 0xE0 // 11100000b +#define BITS4_MASK 0xF0 // 11110000b +#define BITS1_EXP 0x00 // 00000000b +#define BITS2_EXP 0x80 // 10000000b +#define BITS3_EXP 0xC0 // 11000000b +#define BITS4_EXP 0xE0 // 11100000b // MB_DUMB_CONVERSION - ignore non UTF-8 compliant sequences, as-is conversion #define MB_DUMB_CONVERSION @@ -43,7 +43,7 @@ u16 mbhMulti2WideDumb(wchar_t* WideStr, wchar_t* WidePos, u16 WideStrSize, const return dpos; } -#endif // MB_DUMB_CONVERSION +#endif // MB_DUMB_CONVERSION u16 mbhMulti2Wide(wchar_t* WideStr, wchar_t* WidePos, u16 WideStrSize, const char* MultiStr) { diff --git a/src/xrCore/Threading/Lock.cpp b/src/xrCore/Threading/Lock.cpp index bcc3814dba0..d41a22fa09b 100644 --- a/src/xrCore/Threading/Lock.cpp +++ b/src/xrCore/Threading/Lock.cpp @@ -32,16 +32,16 @@ struct profiler void Lock::Enter() { -#if 0 // def DEBUG +#if 0 // def DEBUG static bool show_call_stack = false; if (show_call_stack) OutputDebugStackTrace("----------------------------------------------------"); -#endif // DEBUG +#endif // DEBUG profiler temp(id); mutex.lock(); isLocked = true; } -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS #ifdef DEBUG extern void OutputDebugStackTrace(const char* header); diff --git a/src/xrCore/Threading/Lock.hpp b/src/xrCore/Threading/Lock.hpp index 748dda567ea..b31c4e0a977 100644 --- a/src/xrCore/Threading/Lock.hpp +++ b/src/xrCore/Threading/Lock.hpp @@ -14,7 +14,7 @@ void XRCORE_API set_add_profile_portion(add_profile_portion_callback callback); #define CONCATENIZE(a, b) CONCATENIZE_HELPER(a, b) #define MUTEX_PROFILE_PREFIX_ID #mutexes / #define MUTEX_PROFILE_ID(a) STRINGIZER(CONCATENIZE(MUTEX_PROFILE_PREFIX_ID, a)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS class XRCORE_API Lock { diff --git a/src/xrCore/Threading/ttapi.cpp b/src/xrCore/Threading/ttapi.cpp index 42fb1bdf79e..98009bcf670 100644 --- a/src/xrCore/Threading/ttapi.cpp +++ b/src/xrCore/Threading/ttapi.cpp @@ -72,7 +72,7 @@ static DWORD WINAPI ttapiThreadProc(void* lpParameter) _InterlockedDecrement(&ttapi_queue_size.size); - } // while + } // while return 0; } diff --git a/src/xrCore/XML/XMLDocument.cpp b/src/xrCore/XML/XMLDocument.cpp index 03d13a928ad..0cbbb1fbf46 100644 --- a/src/xrCore/XML/XMLDocument.cpp +++ b/src/xrCore/XML/XMLDocument.cpp @@ -399,7 +399,7 @@ XML_NODE* XMLDocument::SearchForAttribute( return NULL; } -#ifdef DEBUG // debug & mixed +#ifdef DEBUG // debug & mixed LPCSTR XMLDocument::CheckUniqueAttrib(XML_NODE* start_node, LPCSTR tag_name, LPCSTR attrib_name) { diff --git a/src/xrCore/XML/XMLDocument.hpp b/src/xrCore/XML/XMLDocument.hpp index 204141989f3..6acf10918af 100644 --- a/src/xrCore/XML/XMLDocument.hpp +++ b/src/xrCore/XML/XMLDocument.hpp @@ -56,7 +56,7 @@ class XRCORE_API XMLDocument int GetNodesNum(LPCSTR path, int index, LPCSTR tag_name); int GetNodesNum(XML_NODE* node, LPCSTR tag_name); -#ifdef DEBUG // debug & mixed +#ifdef DEBUG // debug & mixed //проверка того, что аттрибуты у тегов уникальны //(если не NULL, то уникальность нарушена и возврашается имя //повторяющегося атрибута) @@ -77,7 +77,7 @@ class XRCORE_API XMLDocument XML_NODE* m_root; XML_NODE* m_pLocalRoot; -#ifdef DEBUG // debug & mixed +#ifdef DEBUG // debug & mixed //буфферный вектор для проверки уникальность аттрибутов xr_vector m_AttribValues; #endif @@ -91,4 +91,4 @@ class XRCORE_API XMLDocument TiXmlDocument m_Doc; }; -#endif // xrXMLParserH \ No newline at end of file +#endif // xrXMLParserH \ No newline at end of file diff --git a/src/xrCore/XML/tinystr.cpp b/src/xrCore/XML/tinystr.cpp index 97aef90ddbc..97f67d5d73c 100644 --- a/src/xrCore/XML/tinystr.cpp +++ b/src/xrCore/XML/tinystr.cpp @@ -103,4 +103,4 @@ TiXmlString operator+(const char* a, const TiXmlString& b) return tmp; } -#endif // TIXML_USE_STL +#endif // TIXML_USE_STL diff --git a/src/xrCore/XML/tinystr.h b/src/xrCore/XML/tinystr.h index 82941c2ef8e..b259ea92f85 100644 --- a/src/xrCore/XML/tinystr.h +++ b/src/xrCore/XML/tinystr.h @@ -70,7 +70,7 @@ class TiXmlString typedef size_t size_type; // Error value for find primitive - static const size_type npos; // = -1; + static const size_type npos; // = -1; // TiXmlString empty constructor TiXmlString() : rep_(&nullrep_) {} @@ -220,8 +220,8 @@ class TiXmlString inline bool operator==(const TiXmlString& a, const TiXmlString& b) { - return (a.length() == b.length()) // optimization on some platforms - && (xr_strcmp(a.c_str(), b.c_str()) == 0); // actual compare + return (a.length() == b.length()) // optimization on some platforms + && (xr_strcmp(a.c_str(), b.c_str()) == 0); // actual compare } inline bool operator<(const TiXmlString& a, const TiXmlString& b) { @@ -288,5 +288,5 @@ class TiXmlOutStream : public TiXmlString } }; -#endif // TIXML_STRING_INCLUDED -#endif // TIXML_USE_STL +#endif // TIXML_STRING_INCLUDED +#endif // TIXML_USE_STL diff --git a/src/xrCore/XML/tinyxml.cpp b/src/xrCore/XML/tinyxml.cpp index a7e3ac8aa13..d963cd24e60 100644 --- a/src/xrCore/XML/tinyxml.cpp +++ b/src/xrCore/XML/tinyxml.cpp @@ -85,7 +85,7 @@ TiXmlNode* TiXmlNode::LinkEndChild(TiXmlNode* node) if (lastChild) lastChild->next = node; else - firstChild = node; // it was an empty list. + firstChild = node; // it was an empty list. lastChild = node; return node; @@ -448,9 +448,9 @@ TiXmlAttributeSet::~TiXmlAttributeSet() void TiXmlAttributeSet::Add(TiXmlAttribute* addMe) { #ifdef TIXML_USE_STL - assert(!Find(TIXML_STRING(addMe->Name()))); // Shouldn't be multiply adding to the set. + assert(!Find(TIXML_STRING(addMe->Name()))); // Shouldn't be multiply adding to the set. #else - assert(!Find(addMe->Name())); // Shouldn't be multiply adding to the set. + assert(!Find(addMe->Name())); // Shouldn't be multiply adding to the set. #endif addMe->next = &sentinel; @@ -474,7 +474,7 @@ void TiXmlAttributeSet::Remove(TiXmlAttribute* removeMe) return; } } - assert(0); // we tried to remove a non-linked attribute. + assert(0); // we tried to remove a non-linked attribute. } #ifdef TIXML_USE_STL diff --git a/src/xrCore/XML/tinyxml.h b/src/xrCore/XML/tinyxml.h index 2afcf4d4cb1..1fe87ed92dc 100644 --- a/src/xrCore/XML/tinyxml.h +++ b/src/xrCore/XML/tinyxml.h @@ -101,8 +101,8 @@ struct TiXmlCursor { TiXmlCursor() { Clear(); } void Clear() { row = col = -1; } - int row; // 0 based. - int col; // 0 based. + int row; // 0 based. + int col; // 0 based. }; /** @@ -234,10 +234,10 @@ class XRCORE_API TiXmlBase @sa TiXmlDocument::SetTabSize() */ int Row() const { return location.row + 1; } - int Column() const { return location.col + 1; } ///< See Row() - void SetUserData(void* user) { userData = user; } ///< Set a pointer to arbitrary user data. - void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. - const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. + int Column() const { return location.col + 1; } ///< See Row() + void SetUserData(void* user) { userData = user; } ///< Set a pointer to arbitrary user data. + void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. + const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. // Table that returs, for a given lead byte, the total number of bytes // in the UTF-8 sequence. static const int utf8ByteTable[256]; @@ -274,7 +274,7 @@ class XRCORE_API TiXmlBase inline static bool IsWhiteSpace(int c) { if (c < 256) return IsWhiteSpace((char)c); - return false; // Again, only truly correct for English/Latin...but usually works. + return false; // Again, only truly correct for English/Latin...but usually works. } #ifdef TIXML_USE_STL @@ -291,12 +291,12 @@ class XRCORE_API TiXmlBase /* Reads text. Returns a pointer past the given end tag. Wickedly complex options, but it keeps the (sensitive) code in one place. */ - static const char* ReadText(const char* in, // where to start - TIXML_STRING* text, // the string read - bool ignoreWhiteSpace, // whether to keep the white space - const char* endTag, // what ends this text - bool ignoreCase, // whether to ignore case in the end tag - TiXmlEncoding encoding); // the current encoding + static const char* ReadText(const char* in, // where to start + TIXML_STRING* text, // the string read + bool ignoreWhiteSpace, // whether to keep the white space + const char* endTag, // what ends this text + bool ignoreCase, // whether to ignore case in the end tag + TiXmlEncoding encoding); // the current encoding // If an entity has been found, transform it into a character. static const char* GetEntity(const char* in, char* value, int* length, TiXmlEncoding encoding); @@ -367,8 +367,8 @@ class XRCORE_API TiXmlBase static void ConvertUTF32ToUTF8(unsigned long input, char* output, int* length); private: - TiXmlBase(const TiXmlBase&); // not implemented. - void operator=(const TiXmlBase& base); // not allowed. + TiXmlBase(const TiXmlBase&); // not implemented. + void operator=(const TiXmlBase& base); // not allowed. struct Entity { @@ -490,10 +490,10 @@ class XRCORE_API TiXmlNode : public TiXmlBase const TiXmlNode* FirstChild() const { return firstChild; - } ///< The first child of this node. Will be null if there are no children. + } ///< The first child of this node. Will be null if there are no children. TiXmlNode* FirstChild() { return firstChild; } const TiXmlNode* FirstChild(const char* value) - const; ///< The first child of this node with the matching 'value'. Will be null if none found. + const; ///< The first child of this node with the matching 'value'. Will be null if none found. /// The first child of this node with the matching 'value'. Will be null if none found. TiXmlNode* FirstChild(const char* _value) { @@ -505,10 +505,10 @@ class XRCORE_API TiXmlNode : public TiXmlBase const TiXmlNode* LastChild() const { return lastChild; - } /// The last child of this node. Will be null if there are no children. + } /// The last child of this node. Will be null if there are no children. TiXmlNode* LastChild() { return lastChild; } const TiXmlNode* LastChild(const char* value) - const; /// The last child of this node matching 'value'. Will be null if there are no children. + const; /// The last child of this node matching 'value'. Will be null if there are no children. TiXmlNode* LastChild(const char* _value) { return const_cast((const_cast(this))->LastChild(_value)); @@ -518,13 +518,13 @@ class XRCORE_API TiXmlNode : public TiXmlBase const TiXmlNode* FirstChild(const xr_string& _value) const { return FirstChild(_value.c_str()); - } ///< STL xr_string form. - TiXmlNode* FirstChild(const xr_string& _value) { return FirstChild(_value.c_str()); } ///< STL xr_string form. + } ///< STL xr_string form. + TiXmlNode* FirstChild(const xr_string& _value) { return FirstChild(_value.c_str()); } ///< STL xr_string form. const TiXmlNode* LastChild(const xr_string& _value) const { return LastChild(_value.c_str()); - } ///< STL xr_string form. - TiXmlNode* LastChild(const xr_string& _value) { return LastChild(_value.c_str()); } ///< STL xr_string form. + } ///< STL xr_string form. + TiXmlNode* LastChild(const xr_string& _value) { return LastChild(_value.c_str()); } ///< STL xr_string form. #endif /** An alternate way to walk the children of a node. @@ -560,11 +560,11 @@ class XRCORE_API TiXmlNode : public TiXmlBase const TiXmlNode* IterateChildren(const xr_string& _value, const TiXmlNode* previous) const { return IterateChildren(_value.c_str(), previous); - } ///< STL xr_string form. + } ///< STL xr_string form. TiXmlNode* IterateChildren(const xr_string& _value, const TiXmlNode* previous) { return IterateChildren(_value.c_str(), previous); - } ///< STL xr_string form. + } ///< STL xr_string form. #endif TiXmlNode* LinkEndChild(TiXmlNode* addThis); @@ -583,16 +583,16 @@ class XRCORE_API TiXmlNode : public TiXmlBase const TiXmlNode* PreviousSibling(const xr_string& _value) const { return PreviousSibling(_value.c_str()); - } ///< STL xr_string form. + } ///< STL xr_string form. TiXmlNode* PreviousSibling(const xr_string& _value) { return PreviousSibling(_value.c_str()); - } ///< STL xr_string form. + } ///< STL xr_string form. const TiXmlNode* NextSibling(const xr_string& _value) const { return NextSibling(_value.c_str()); - } ///< STL xr_string form. - TiXmlNode* NextSibling(const xr_string& _value) { return NextSibling(_value.c_str()); } ///< STL xr_string form. + } ///< STL xr_string form. + TiXmlNode* NextSibling(const xr_string& _value) { return NextSibling(_value.c_str()); } ///< STL xr_string form. #endif /// Navigate to a sibling node. @@ -629,11 +629,11 @@ class XRCORE_API TiXmlNode : public TiXmlBase const TiXmlElement* NextSiblingElement(const xr_string& _value) const { return NextSiblingElement(_value.c_str()); - } ///< STL xr_string form. + } ///< STL xr_string form. TiXmlElement* NextSiblingElement(const xr_string& _value) { return NextSiblingElement(_value.c_str()); - } ///< STL xr_string form. + } ///< STL xr_string form. #endif /// Convenience function to get through elements. @@ -654,11 +654,11 @@ class XRCORE_API TiXmlNode : public TiXmlBase const TiXmlElement* FirstChildElement(const xr_string& _value) const { return FirstChildElement(_value.c_str()); - } ///< STL xr_string form. + } ///< STL xr_string form. TiXmlElement* FirstChildElement(const xr_string& _value) { return FirstChildElement(_value.c_str()); - } ///< STL xr_string form. + } ///< STL xr_string form. #endif /** Query the type (as an enumerated value, above) of this node. @@ -680,52 +680,52 @@ class XRCORE_API TiXmlNode : public TiXmlBase virtual const TiXmlDocument* ToDocument() const { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlElement* ToElement() const { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlComment* ToComment() const { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlUnknown* ToUnknown() const { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlText* ToText() const { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlDeclaration* ToDeclaration() const { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlDocument* ToDocument() { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlElement* ToElement() { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlComment* ToComment() { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlUnknown* ToUnknown() { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlText* ToText() { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlDeclaration* ToDeclaration() { return 0; - } ///< Cast to a more defined type. Will return null if not of the requested type. + } ///< Cast to a more defined type. Will return null if not of the requested type. /** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the XML tree will be conditionally visited and the host will be called back @@ -769,8 +769,8 @@ class XRCORE_API TiXmlNode : public TiXmlBase TiXmlNode* next; private: - TiXmlNode(const TiXmlNode&); // not implemented. - void operator=(const TiXmlNode& base); // not allowed. + TiXmlNode(const TiXmlNode&); // not implemented. + void operator=(const TiXmlNode& base); // not allowed. }; /** An attribute is a name-value pair. Elements have an arbitrary @@ -811,13 +811,13 @@ class TiXmlAttribute : public TiXmlBase prev = next = 0; } - const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. - const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. + const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. + const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. #ifdef TIXML_USE_STL - const xr_string& ValueStr() const { return value; } ///< Return the value of this attribute. + const xr_string& ValueStr() const { return value; } ///< Return the value of this attribute. #endif - int IntValue() const; ///< Return the value of this attribute, converted to an integer. - double DoubleValue() const; ///< Return the value of this attribute, converted to a double. + int IntValue() const; ///< Return the value of this attribute, converted to an integer. + double DoubleValue() const; ///< Return the value of this attribute, converted to a double. // Get the tinyxml string representation const TIXML_STRING& NameTStr() const { return name; } @@ -834,10 +834,10 @@ class TiXmlAttribute : public TiXmlBase /// QueryDoubleValue examines the value string. See QueryIntValue(). int QueryDoubleValue(double* _value) const; - void SetName(const char* _name) { name = _name; } ///< Set the name of this attribute. - void SetValue(const char* _value) { value = _value; } ///< Set the value. - void SetIntValue(int _value); ///< Set the value from an integer. - void SetDoubleValue(double _value); ///< Set the value from a double. + void SetName(const char* _name) { name = _name; } ///< Set the name of this attribute. + void SetValue(const char* _value) { value = _value; } ///< Set the value. + void SetIntValue(int _value); ///< Set the value from an integer. + void SetDoubleValue(double _value); ///< Set the value from a double. #ifdef TIXML_USE_STL /// STL xr_string form. @@ -868,8 +868,8 @@ class TiXmlAttribute : public TiXmlBase // void SetDocument( TiXmlDocument* doc ) { document = doc; } private: - TiXmlAttribute(const TiXmlAttribute&); // not implemented. - void operator=(const TiXmlAttribute& base); // not allowed. + TiXmlAttribute(const TiXmlAttribute&); // not implemented. + void operator=(const TiXmlAttribute& base); // not allowed. // TiXmlDocument* document; // A pointer back to a document, for error reporting. TIXML_STRING name; @@ -918,8 +918,8 @@ class TiXmlAttributeSet private: //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), //*ME: this class must be also use a hidden/disabled copy-constructor !!! - TiXmlAttributeSet(const TiXmlAttributeSet&); // not allowed - void operator=(const TiXmlAttributeSet&); // not allowed (as TiXmlAttribute) + TiXmlAttributeSet(const TiXmlAttributeSet&); // not allowed + void operator=(const TiXmlAttributeSet&); // not allowed (as TiXmlAttribute) TiXmlAttribute sentinel; }; @@ -981,7 +981,7 @@ class TiXmlElement : public TiXmlNode const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); - } ///< Access the first attribute in this element. + } ///< Access the first attribute in this element. TiXmlAttribute* FirstAttribute() { return attributeSet.First(); } /** Convenience function for easy access to the text inside an element. Although easy and concise, GetText() is limited compared to getting the TiXmlText child @@ -1025,18 +1025,18 @@ class TiXmlElement : public TiXmlNode virtual const TiXmlElement* ToElement() const { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlElement* ToElement() { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept(TiXmlVisitor* visitor) const; protected: - void ClearThis(); // like clear, but initializes 'this' object as well + void ClearThis(); // like clear, but initializes 'this' object as well /* [internal use] Reads the "value" of the element -- another element, or text. @@ -1069,11 +1069,11 @@ class TiXmlComment : public TiXmlNode virtual const TiXmlComment* ToComment() const { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlComment* ToComment() { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ @@ -1118,20 +1118,20 @@ class TiXmlText : public TiXmlNode virtual const TiXmlText* ToText() const { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlText* ToText() { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept(TiXmlVisitor* content) const; protected: - bool Blank() const; // returns true if all white space and new lines + bool Blank() const; // returns true if all white space and new lines private: - bool cdata; // true if this should be input and output as a CDATA style text element + bool cdata; // true if this should be input and output as a CDATA style text element }; /** In correct XML the declaration is the first entry in the file. @@ -1175,11 +1175,11 @@ class TiXmlDeclaration : public TiXmlNode virtual const TiXmlDeclaration* ToDeclaration() const { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlDeclaration* ToDeclaration() { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ @@ -1208,11 +1208,11 @@ class TiXmlUnknown : public TiXmlNode virtual const TiXmlUnknown* ToUnknown() const { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlUnknown* ToUnknown() { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ @@ -1263,7 +1263,7 @@ class TiXmlDocument : public TiXmlNode @sa SetTabSize, Row, Column */ int ErrorRow() const { return errorLocation.row + 1; } - int ErrorCol() const { return errorLocation.col + 1; } ///< The column where the error occured. See ErrorRow() + int ErrorCol() const { return errorLocation.col + 1; } ///< The column where the error occured. See ErrorRow() /** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to report the correct values for row and column. It does not change the output or input in any way. @@ -1307,11 +1307,11 @@ class TiXmlDocument : public TiXmlNode virtual const TiXmlDocument* ToDocument() const { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlDocument* ToDocument() { return this; - } ///< Cast to a more defined type. Will return null not of the requested type. + } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ @@ -1323,7 +1323,7 @@ class TiXmlDocument : public TiXmlNode TIXML_STRING errorDesc; int tabsize; TiXmlCursor errorLocation; - bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. + bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. }; #ifdef _MSC_VER diff --git a/src/xrCore/XML/tinyxmlparser.cpp b/src/xrCore/XML/tinyxmlparser.cpp index 6c5e450b14e..eb20f6d14c5 100644 --- a/src/xrCore/XML/tinyxmlparser.cpp +++ b/src/xrCore/XML/tinyxmlparser.cpp @@ -60,22 +60,22 @@ const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; const int TiXmlBase::utf8ByteTable[256] = { // 0 1 2 3 4 5 6 7 8 9 a b c d e f - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 - 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte - 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid }; void TiXmlBase::ConvertUTF32ToUTF8(unsigned long input, char* output, int* length) @@ -96,7 +96,7 @@ void TiXmlBase::ConvertUTF32ToUTF8(unsigned long input, char* output, int* lengt { *length = 0; return; - } // This code won't covert this correctly anyway. + } // This code won't covert this correctly anyway. output += *length; @@ -131,7 +131,7 @@ void TiXmlBase::ConvertUTF32ToUTF8(unsigned long input, char* output, int* lengt if (anyByte < 127) return isalpha(anyByte); else - return 1; // What else to do? The unicode set is huge...get the english ones right. + return 1; // What else to do? The unicode set is huge...get the english ones right. // } // else // { @@ -151,7 +151,7 @@ void TiXmlBase::ConvertUTF32ToUTF8(unsigned long input, char* output, int* lengt if (anyByte < 127) return isalnum(anyByte); else - return 1; // What else to do? The unicode set is huge...get the english ones right. + return 1; // What else to do? The unicode set is huge...get the english ones right. // } // else // { @@ -263,7 +263,7 @@ void TiXmlParsingData::Stamp(const char* now, TiXmlEncoding encoding) { p += 3; ++col; - } // A normal character. + } // A normal character. } } else @@ -277,7 +277,7 @@ void TiXmlParsingData::Stamp(const char* now, TiXmlEncoding encoding) if (encoding == TIXML_ENCODING_UTF8) { // Eat the 1 to 4 byte utf8 character. int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)]; - if (step == 0) step = 1; // Error case from bad encoding, but handle gracefully. + if (step == 0) step = 1; // Error case from bad encoding, but handle gracefully. p += step; // Just advance one column, of course. @@ -325,7 +325,7 @@ const char* TiXmlBase::SkipWhiteSpace(const char* p, TiXmlEncoding encoding) continue; } - if (IsWhiteSpace(*p) || *p == '\n' || *p == '\r') // Still using old rules for white space. + if (IsWhiteSpace(*p) || *p == '\n' || *p == '\r') // Still using old rules for white space. ++p; else break; @@ -492,7 +492,7 @@ const char* TiXmlBase::GetEntity(const char* p, char* value, int* length, TiXmlE } // So it wasn't an entity, its unrecognized, or something like that. - *value = *p; // Don't put back the last one, since we return it! + *value = *p; // Don't put back the last one, since we return it! //*length = 1; // Leave unrecognized entities - this doesn't really work. // Just writes strange XML. return p + 1; @@ -526,7 +526,7 @@ bool TiXmlBase::StringEqual(const char* p, const char* tag, bool ignoreCase, TiX ++tag; } - if (*tag == 0) // Have we found the end of the tag, and everything equal? + if (*tag == 0) // Have we found the end of the tag, and everything equal? return true; } return false; @@ -536,8 +536,8 @@ const char* TiXmlBase::ReadText(const char* p, TIXML_STRING* text, bool trimWhit bool caseInsensitive, TiXmlEncoding encoding) { *text = ""; - if (!trimWhiteSpace // certain tags always keep whitespace - || !condenseWhiteSpace) // if true, whitespace is always kept + if (!trimWhiteSpace // certain tags always keep whitespace + || !condenseWhiteSpace) // if true, whitespace is always kept { // Keep all the white space. while (p && *p && !StringEqual(p, endTag, caseInsensitive, encoding)) @@ -577,7 +577,7 @@ const char* TiXmlBase::ReadText(const char* p, TIXML_STRING* text, bool trimWhit char cArr[4] = {0, 0, 0, 0}; p = GetChar(p, cArr, &len, encoding); if (len == 1) - (*text) += cArr[0]; // more efficient + (*text) += cArr[0]; // more efficient else text->append(cArr, len); } @@ -720,7 +720,7 @@ const char* TiXmlDocument::Parse(TiXmlDocument*, const char* p, TiXmlParsingData else if (StringEqual(enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN)) encoding = TIXML_ENCODING_UTF8; else if (StringEqual(enc, "UTF8", true, TIXML_ENCODING_UNKNOWN)) - encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice + encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice else encoding = TIXML_ENCODING_LEGACY; } @@ -1039,7 +1039,7 @@ const char* TiXmlElement::Parse(TiXmlDocument* document, const char* p, TiXmlPar // Read the value -- which can include other // elements -- read the end tag, and return. ++p; - p = ReadValue(p, data, encoding); // Note this is an Element method, and will set the error if one happens. + p = ReadValue(p, data, encoding); // Note this is an Element method, and will set the error if one happens. if (!p || !*p) { // We were looking for the end tag, but found nothing. // Fix for [ 1663758 ] Failure to report error on bad XML @@ -1263,7 +1263,7 @@ const char* TiXmlAttribute::Parse( return 0; } - ++p; // skip '=' + ++p; // skip '=' p = SkipWhiteSpace(p, encoding); if (!p || !*p) { if (document) document->SetError(TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding); @@ -1276,13 +1276,13 @@ const char* TiXmlAttribute::Parse( if (*p == SINGLE_QUOTE) { ++p; - end = "\'"; // single quote in string + end = "\'"; // single quote in string p = ReadText(p, &value, false, end, false, encoding); } else if (*p == DOUBLE_QUOTE) { ++p; - end = "\""; // double quote in string + end = "\""; // double quote in string p = ReadText(p, &value, false, end, false, encoding); } else @@ -1291,9 +1291,9 @@ const char* TiXmlAttribute::Parse( // But this is such a common error that the parser will try // its best, even without them. value = ""; - while (p && *p // existence - && !IsWhiteSpace(*p) && *p != '\n' && *p != '\r' // whitespace - && *p != '/' && *p != '>') // tag end + while (p && *p // existence + && !IsWhiteSpace(*p) && *p != '\n' && *p != '\r' // whitespace + && *p != '/' && *p != '>') // tag end { if (*p == SINGLE_QUOTE || *p == DOUBLE_QUOTE) { // [ 1451649 ] Attribute values with trailing quotes not handled correctly @@ -1347,7 +1347,7 @@ const char* TiXmlText::Parse(TiXmlDocument* document, const char* p, TiXmlParsin const char* end = "<"; p = ReadText(p, &value, ignoreWhite, end, false, encoding); - if (p) return p - 1; // don't truncate the '<' + if (p) return p - 1; // don't truncate the '<' return 0; } } diff --git a/src/xrCore/Xr_ini.cpp b/src/xrCore/Xr_ini.cpp index 6117eaaf75c..09e30812944 100644 --- a/src/xrCore/Xr_ini.cpp +++ b/src/xrCore/Xr_ini.cpp @@ -233,7 +233,7 @@ void CInifile::Load(IReader* F, LPCSTR path } } - if (str[0] && (str[0] == '#') && strstr(str, "#include")) // handle includes + if (str[0] && (str[0] == '#') && strstr(str, "#include")) // handle includes { string_path inc_name; R_ASSERT(path && path[0]); @@ -257,7 +257,7 @@ void CInifile::Load(IReader* F, LPCSTR path } } } - else if (str[0] && (str[0] == '[')) // new section ? + else if (str[0] && (str[0] == '[')) // new section ? { // insert previous filled section if (Current) { @@ -300,7 +300,7 @@ void CInifile::Load(IReader* F, LPCSTR path *strchr(str, ']') = 0; Current->Name = xr_strlwr(str + 1); } - else // name = value + else // name = value { if (Current) { string4096 value_raw; @@ -312,7 +312,7 @@ void CInifile::Load(IReader* F, LPCSTR path ++t; xr_strcpy(value_raw, sizeof(value_raw), t); bInsideSTR = _parse(str2, value_raw); - if (bInsideSTR) // multiline str value + if (bInsideSTR) // multiline str value { while (bInsideSTR) { @@ -516,8 +516,8 @@ shared_str CInifile::r_string_wb(LPCSTR S, LPCSTR L) const xr_strcpy(_original, sizeof(_original), _base); u32 _len = xr_strlen(_original); if (0 == _len) return shared_str(""); - if ('"' == _original[_len - 1]) _original[_len - 1] = 0; // skip end - if ('"' == _original[0]) return shared_str(&_original[0] + 1); // skip begin + if ('"' == _original[_len - 1]) _original[_len - 1] = 0; // skip end + if ('"' == _original[0]) return shared_str(&_original[0] + 1); // skip begin return shared_str(_original); } diff --git a/src/xrCore/_bitwise.h b/src/xrCore/_bitwise.h index 4efb13f838a..d48db33ba0c 100644 --- a/src/xrCore/_bitwise.h +++ b/src/xrCore/_bitwise.h @@ -3,17 +3,17 @@ #pragma once // float values defines -#define fdSGN 0x080000000 // mask for sign bit -#define fdMABS 0x07FFFFFFF // mask for absolute value (~sgn) -#define fdMANT 0x0007FFFFF // mask for mantissa -#define fdEXPO 0x07F800000 // mask for exponent -#define fdONE 0x03F800000 // 1.0f -#define fdHALF 0x03F000000 // 0.5f -#define fdTWO 0x040000000 // 2.0 -#define fdOOB 0x000000000 // "out of bounds" value -#define fdNAN 0x07fffffff // "Not a number" value -#define fdMAX 0x07F7FFFFF // FLT_MAX -#define fdRLE10 0x03ede5bdb // 1/ln10 +#define fdSGN 0x080000000 // mask for sign bit +#define fdMABS 0x07FFFFFFF // mask for absolute value (~sgn) +#define fdMANT 0x0007FFFFF // mask for mantissa +#define fdEXPO 0x07F800000 // mask for exponent +#define fdONE 0x03F800000 // 1.0f +#define fdHALF 0x03F000000 // 0.5f +#define fdTWO 0x040000000 // 2.0 +#define fdOOB 0x000000000 // "out of bounds" value +#define fdNAN 0x07fffffff // "Not a number" value +#define fdMAX 0x07F7FFFFF // FLT_MAX +#define fdRLE10 0x03ede5bdb // 1/ln10 // integer math on floats #ifdef _M_AMD64 @@ -103,8 +103,8 @@ IC u8 btwCount1(u8 v) // same for 32bit IC u32 btwCount1(u32 v) { - const u32 g31 = 0x49249249ul; // = 0100_1001_0010_0100_1001_0010_0100_1001 - const u32 g32 = 0x381c0e07ul; // = 0011_1000_0001_1100_0000_1110_0000_0111 + const u32 g31 = 0x49249249ul; // = 0100_1001_0010_0100_1001_0010_0100_1001 + const u32 g32 = 0x381c0e07ul; // = 0011_1000_0001_1100_0000_1110_0000_0111 v = (v & g31) + ((v >> 1) & g31) + ((v >> 2) & g31); v = ((v + (v >> 3)) & g32) + ((v >> 6) & g32); return (v + (v >> 9) + (v >> 18) + (v >> 27)) & 0x3f; diff --git a/src/xrCore/_color.h b/src/xrCore/_color.h index 972dd3f6ea7..4005d1f0df2 100644 --- a/src/xrCore/_color.h +++ b/src/xrCore/_color.h @@ -110,14 +110,14 @@ struct _color r = f * (T)(BYTE)(dw >> 0); return *this; }; - IC SelfRef adjust_contrast(T f) // >1 - contrast will be increased + IC SelfRef adjust_contrast(T f) // >1 - contrast will be increased { r = 0.5f + f * (r - 0.5f); g = 0.5f + f * (g - 0.5f); b = 0.5f + f * (b - 0.5f); return *this; }; - IC SelfRef adjust_contrast(SelfCRef in, T f) // >1 - contrast will be increased + IC SelfRef adjust_contrast(SelfCRef in, T f) // >1 - contrast will be increased { r = 0.5f + f * (in.r - 0.5f); g = 0.5f + f * (in.g - 0.5f); diff --git a/src/xrCore/_cylinder.h b/src/xrCore/_cylinder.h index b358e47642e..8f820bbf68b 100644 --- a/src/xrCore/_cylinder.h +++ b/src/xrCore/_cylinder.h @@ -99,13 +99,13 @@ class _cylinder afT[1] = (-fB + fRoot) * fTmp0; code[0] = cyl_wall; code[1] = cyl_wall; - return 2; // wall + return 2; // wall } else { afT[0] = -fB * fInvDLength / fA; code[0] = cyl_wall; - return 1; // wall + return 1; // wall } } @@ -130,7 +130,7 @@ class _cylinder if (iQuantity == 2) { // line intersects both top and bottom - return 2; // both caps + return 2; // both caps } // If iQuantity == 1, then line must intersect cylinder wall @@ -252,4 +252,4 @@ BOOL _valid(const _cylinder& c) return _valid(c.m_center) && _valid(c.m_direction) && _valid(c.m_height) && _valid(c.m_radius); } -#endif // _DEBUG +#endif // _DEBUG diff --git a/src/xrCore/_fbox.h b/src/xrCore/_fbox.h index b103bae5a11..e96f93d4d88 100644 --- a/src/xrCore/_fbox.h +++ b/src/xrCore/_fbox.h @@ -239,13 +239,13 @@ class _box3 C.z = (min.z + max.z) * 0.5f; return *this; }; - IC SelfCRef get_CD(Tvector& bc, Tvector& bd) const // center + dimensions + IC SelfCRef get_CD(Tvector& bc, Tvector& bd) const // center + dimensions { bd.sub(max, min).mul(.5f); bc.add(min, bd); return *this; } - IC SelfRef scale(float s) // 0.1 means make 110%, -0.1 means make 90% + IC SelfRef scale(float s) // 0.1 means make 110%, -0.1 means make 90% { Fvector bd; bd.sub(max, min).mul(s); @@ -346,39 +346,39 @@ class _box3 if (origin[0] < min[0]) { coord[0] = min[0]; Inside = FALSE; - if (IR(dir[0])) MaxT[0] = (min[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes + if (IR(dir[0])) MaxT[0] = (min[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes } else if (origin[0] > max[0]) { coord[0] = max[0]; Inside = FALSE; - if (IR(dir[0])) MaxT[0] = (max[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes + if (IR(dir[0])) MaxT[0] = (max[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes } } { if (origin[1] < min[1]) { coord[1] = min[1]; Inside = FALSE; - if (IR(dir[1])) MaxT[1] = (min[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes + if (IR(dir[1])) MaxT[1] = (min[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes } else if (origin[1] > max[1]) { coord[1] = max[1]; Inside = FALSE; - if (IR(dir[1])) MaxT[1] = (max[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes + if (IR(dir[1])) MaxT[1] = (max[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes } } { if (origin[2] < min[2]) { coord[2] = min[2]; Inside = FALSE; - if (IR(dir[2])) MaxT[2] = (min[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes + if (IR(dir[2])) MaxT[2] = (min[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes } else if (origin[2] > max[2]) { coord[2] = max[2]; Inside = FALSE; - if (IR(dir[2])) MaxT[2] = (max[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes + if (IR(dir[2])) MaxT[2] = (max[2] - origin[2]) / dir[2]; // Calculate T distances to candidate planes } } diff --git a/src/xrCore/_fbox2.h b/src/xrCore/_fbox2.h index 10547e1b393..0ae7433435e 100644 --- a/src/xrCore/_fbox2.h +++ b/src/xrCore/_fbox2.h @@ -251,26 +251,26 @@ class _box2 if (origin[0] < min[0]) { coord[0] = min[0]; Inside = FALSE; - if (IR(dir[0])) MaxT[0] = (min[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes + if (IR(dir[0])) MaxT[0] = (min[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes } else if (origin[0] > max[0]) { coord[0] = max[0]; Inside = FALSE; - if (IR(dir[0])) MaxT[0] = (max[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes + if (IR(dir[0])) MaxT[0] = (max[0] - origin[0]) / dir[0]; // Calculate T distances to candidate planes } } { if (origin[1] < min[1]) { coord[1] = min[1]; Inside = FALSE; - if (IR(dir[1])) MaxT[1] = (min[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes + if (IR(dir[1])) MaxT[1] = (min[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes } else if (origin[1] > max[1]) { coord[1] = max[1]; Inside = FALSE; - if (IR(dir[1])) MaxT[1] = (max[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes + if (IR(dir[1])) MaxT[1] = (max[1] - origin[1]) / dir[1]; // Calculate T distances to candidate planes } } diff --git a/src/xrCore/_flags.h b/src/xrCore/_flags.h index 580fbdd9a25..f737816a40f 100644 --- a/src/xrCore/_flags.h +++ b/src/xrCore/_flags.h @@ -93,4 +93,4 @@ typedef _flags flags32; typedef _flags Flags64; typedef _flags flags64; -#endif //__FLAGS_H__ +#endif //__FLAGS_H__ diff --git a/src/xrCore/_math.cpp b/src/xrCore/_math.cpp index f4bb614dc71..f8e0a01fe00 100644 --- a/src/xrCore/_math.cpp +++ b/src/xrCore/_math.cpp @@ -113,21 +113,21 @@ void initialize() _control87(_PC_24, MCW_PC); _control87(_RC_CHOP, MCW_RC); - _24 = getFPUsw(); // 24, chop + _24 = getFPUsw(); // 24, chop _control87(_RC_NEAR, MCW_RC); - _24r = getFPUsw(); // 24, rounding + _24r = getFPUsw(); // 24, rounding _control87(_PC_53, MCW_PC); _control87(_RC_CHOP, MCW_RC); - _53 = getFPUsw(); // 53, chop + _53 = getFPUsw(); // 53, chop _control87(_RC_NEAR, MCW_RC); - _53r = getFPUsw(); // 53, rounding + _53r = getFPUsw(); // 53, rounding _control87(_PC_64, MCW_PC); _control87(_RC_CHOP, MCW_RC); - _64 = getFPUsw(); // 64, chop + _64 = getFPUsw(); // 64, chop _control87(_RC_NEAR, MCW_RC); - _64r = getFPUsw(); // 64, rounding + _64r = getFPUsw(); // 64, rounding if (!Core.PluginMode) m24r(); ::Random.seed(u32(CPU::GetCLK() % (1i64 << 32i64))); @@ -270,9 +270,9 @@ void _initialize_cpu(void) Msg("* CPU features: %s", features); Msg("* CPU cores/threads: %d/%d\n", CPU::ID.n_cores, CPU::ID.n_threads); - Fidentity.identity(); // Identity matrix - Didentity.identity(); // Identity matrix - pvInitializeStatics(); // Lookup table for compressed normals + Fidentity.identity(); // Identity matrix + Didentity.identity(); // Identity matrix + pvInitializeStatics(); // Lookup table for compressed normals FPU::initialize(); _initialize_cpu_thread(); diff --git a/src/xrCore/_math.h b/src/xrCore/_math.h index 8745ef8e466..469aebe9eca 100644 --- a/src/xrCore/_math.h +++ b/src/xrCore/_math.h @@ -59,4 +59,4 @@ typedef void thread_t(void*); extern XRCORE_API void thread_name(const char* name); extern XRCORE_API void thread_spawn(thread_t* entry, const char* name, unsigned stack, void* arglist); -#endif //__XR_MATH_H__ +#endif //__XR_MATH_H__ diff --git a/src/xrCore/_matrix.h b/src/xrCore/_matrix.h index 2eac872cd5b..12f7bab0aa9 100644 --- a/src/xrCore/_matrix.h +++ b/src/xrCore/_matrix.h @@ -38,7 +38,7 @@ struct _matrix public: union { - struct // Direct definition + struct // Direct definition { T _11, _12, _13, _14; T _21, _22, _23, _24; @@ -56,7 +56,7 @@ struct _matrix Tvector c; T _44_; }; - T m[4][4]; // Array + T m[4][4]; // Array }; // Class members @@ -158,35 +158,35 @@ struct _matrix m[3][3] = 1; return *this; } - IC SelfRef mulA_44(const Self& A) // mul after + IC SelfRef mulA_44(const Self& A) // mul after { Self B; B.set(*this); mul(A, B); return *this; }; - IC SelfRef mulB_44(const Self& B) // mul before + IC SelfRef mulB_44(const Self& B) // mul before { Self A; A.set(*this); mul(A, B); return *this; }; - ICF SelfRef mulA_43(const Self& A) // mul after (no projection) + ICF SelfRef mulA_43(const Self& A) // mul after (no projection) { Self B; B.set(*this); mul_43(A, B); return *this; }; - ICF SelfRef mulB_43(const Self& B) // mul before (no projection) + ICF SelfRef mulB_43(const Self& B) // mul before (no projection) { Self A; A.set(*this); mul_43(A, B); return *this; }; - IC SelfRef invert(const Self& a) // important: this is 4x3 invert, not the 4x4 one + IC SelfRef invert(const Self& a) // important: this is 4x3 invert, not the 4x4 one { // faster than self-invert T fDetInv = (a._11 * (a._22 * a._33 - a._23 * a._32) - a._12 * (a._21 * a._33 - a._23 * a._31) + @@ -217,7 +217,7 @@ struct _matrix return *this; } - IC bool invert_b(const Self& a) // important: this is 4x3 invert, not the 4x4 one + IC bool invert_b(const Self& a) // important: this is 4x3 invert, not the 4x4 one { // faster than self-invert T fDetInv = (a._11 * (a._22 * a._33 - a._23 * a._32) - a._12 * (a._21 * a._33 - a._23 * a._31) + @@ -248,14 +248,14 @@ struct _matrix return true; } - IC SelfRef invert() // slower than invert other matrix + IC SelfRef invert() // slower than invert other matrix { Self a; a.set(*this); invert(a); return *this; } - IC SelfRef transpose(const Self& matSource) // faster version of transpose + IC SelfRef transpose(const Self& matSource) // faster version of transpose { _11 = matSource._11; _12 = matSource._21; @@ -275,41 +275,41 @@ struct _matrix _44 = matSource._44; return *this; } - IC SelfRef transpose() // self transpose - slower + IC SelfRef transpose() // self transpose - slower { Self a; a.set(*this); transpose(a); return *this; } - IC SelfRef translate(const Tvector& Loc) // setup translation matrix + IC SelfRef translate(const Tvector& Loc) // setup translation matrix { identity(); c.set(Loc.x, Loc.y, Loc.z); return *this; } - IC SelfRef translate(T _x, T _y, T _z) // setup translation matrix + IC SelfRef translate(T _x, T _y, T _z) // setup translation matrix { identity(); c.set(_x, _y, _z); return *this; } - IC SelfRef translate_over(const Tvector& Loc) // modify only translation + IC SelfRef translate_over(const Tvector& Loc) // modify only translation { c.set(Loc.x, Loc.y, Loc.z); return *this; } - IC SelfRef translate_over(T _x, T _y, T _z) // modify only translation + IC SelfRef translate_over(T _x, T _y, T _z) // modify only translation { c.set(_x, _y, _z); return *this; } - IC SelfRef translate_add(const Tvector& Loc) // combine translation + IC SelfRef translate_add(const Tvector& Loc) // combine translation { c.add(Loc); return *this; } - IC SelfRef scale(T x, T y, T z) // setup scale matrix + IC SelfRef scale(T x, T y, T z) // setup scale matrix { identity(); m[0][0] = x; @@ -317,12 +317,12 @@ struct _matrix m[2][2] = z; return *this; } - IC SelfRef scale(const Tvector& v) // setup scale matrix + IC SelfRef scale(const Tvector& v) // setup scale matrix { return scale(v.x, v.y, v.z); } - IC SelfRef rotateX(T Angle) // rotation about X axis + IC SelfRef rotateX(T Angle) // rotation about X axis { T cosa = _cos(Angle); T sina = _sin(Angle); @@ -336,7 +336,7 @@ struct _matrix _44 = 1; return *this; } - IC SelfRef rotateY(T Angle) // rotation about Y axis + IC SelfRef rotateY(T Angle) // rotation about Y axis { T cosa = _cos(Angle); T sina = _sin(Angle); @@ -350,7 +350,7 @@ struct _matrix _44 = 1; return *this; } - IC SelfRef rotateZ(T Angle) // rotation about Z axis + IC SelfRef rotateZ(T Angle) // rotation about Z axis { T cosa = _cos(Angle); T sina = _sin(Angle); @@ -731,37 +731,37 @@ struct _matrix } return *this; } - ICF void transform_tiny(Tvector& dest, const Tvector& v) const // preferred to use + ICF void transform_tiny(Tvector& dest, const Tvector& v) const // preferred to use { dest.x = v.x * _11 + v.y * _21 + v.z * _31 + _41; dest.y = v.x * _12 + v.y * _22 + v.z * _32 + _42; dest.z = v.x * _13 + v.y * _23 + v.z * _33 + _43; } - ICF void transform_tiny32(Fvector2& dest, const Tvector& v) const // preferred to use + ICF void transform_tiny32(Fvector2& dest, const Tvector& v) const // preferred to use { dest.x = v.x * _11 + v.y * _21 + v.z * _31 + _41; dest.y = v.x * _12 + v.y * _22 + v.z * _32 + _42; } - ICF void transform_tiny23(Tvector& dest, const Fvector2& v) const // preferred to use + ICF void transform_tiny23(Tvector& dest, const Fvector2& v) const // preferred to use { dest.x = v.x * _11 + v.y * _21 + _41; dest.y = v.x * _12 + v.y * _22 + _42; dest.z = v.x * _13 + v.y * _23 + _43; } - ICF void transform_dir(Tvector& dest, const Tvector& v) const // preferred to use + ICF void transform_dir(Tvector& dest, const Tvector& v) const // preferred to use { dest.x = v.x * _11 + v.y * _21 + v.z * _31; dest.y = v.x * _12 + v.y * _22 + v.z * _32; dest.z = v.x * _13 + v.y * _23 + v.z * _33; } - IC void transform(Fvector4& dest, const Tvector& v) const // preferred to use + IC void transform(Fvector4& dest, const Tvector& v) const // preferred to use { dest.w = v.x * _14 + v.y * _24 + v.z * _34 + _44; dest.x = (v.x * _11 + v.y * _21 + v.z * _31 + _41) / dest.w; dest.y = (v.x * _12 + v.y * _22 + v.z * _32 + _42) / dest.w; dest.z = (v.x * _13 + v.y * _23 + v.z * _33 + _43) / dest.w; } - IC void transform(Tvector& dest, const Tvector& v) const // preferred to use + IC void transform(Tvector& dest, const Tvector& v) const // preferred to use { T iw = 1.f / (v.x * _14 + v.y * _24 + v.z * _34 + _44); dest.x = (v.x * _11 + v.y * _21 + v.z * _31 + _41) * iw; @@ -769,7 +769,7 @@ struct _matrix dest.z = (v.x * _13 + v.y * _23 + v.z * _33 + _43) * iw; } - IC void transform(Fvector4& dest, const Fvector4& v) const // preferred to use + IC void transform(Fvector4& dest, const Fvector4& v) const // preferred to use { dest.w = v.x * _14 + v.y * _24 + v.z * _34 + v.w * _44; dest.x = v.x * _11 + v.y * _21 + v.z * _31 + v.w * _41; diff --git a/src/xrCore/_matrix33.h b/src/xrCore/_matrix33.h index c278a3fb351..fd536c616c3 100644 --- a/src/xrCore/_matrix33.h +++ b/src/xrCore/_matrix33.h @@ -13,7 +13,7 @@ struct _matrix33 public: union { - struct // Direct definition + struct // Direct definition { T _11, _12, _13; T _21, _22, _23; @@ -25,7 +25,7 @@ struct _matrix33 Tvector j; Tvector k; }; - float m[3][3]; // Array + float m[3][3]; // Array }; // Class members IC SelfRef set_rapid(const _matrix& a) @@ -73,7 +73,7 @@ struct _matrix33 return *this; } - IC SelfRef transpose(SelfCRef matSource) // faster version of transpose + IC SelfRef transpose(SelfCRef matSource) // faster version of transpose { _11 = matSource._11; _12 = matSource._21; @@ -86,7 +86,7 @@ struct _matrix33 _33 = matSource._33; return *this; } - IC SelfRef transpose(const _matrix& matSource) // faster version of transpose + IC SelfRef transpose(const _matrix& matSource) // faster version of transpose { _11 = matSource._11; _12 = matSource._21; @@ -99,10 +99,10 @@ struct _matrix33 _33 = matSource._33; return *this; } - IC SelfRef transpose(void) // self transpose - slower + IC SelfRef transpose(void) // self transpose - slower { _matrix33 a; - CopyMemory(&a, this, 9 * sizeof(float)); // save matrix + CopyMemory(&a, this, 9 * sizeof(float)); // save matrix transpose(a); return *this; } @@ -381,7 +381,7 @@ struct _matrix33 R.z = (m[2][0] * V1.x + m[2][1] * V1.y + m[2][2] * V1.z); return *this; } - IC void transform_dir(_vector2& dest, const _vector2& v) const // preferred to use + IC void transform_dir(_vector2& dest, const _vector2& v) const // preferred to use { dest.x = v.x * _11 + v.y * _21; dest.y = v.x * _12 + v.y * _22; diff --git a/src/xrCore/_plane.h b/src/xrCore/_plane.h index 13f3730be76..affae03263d 100644 --- a/src/xrCore/_plane.h +++ b/src/xrCore/_plane.h @@ -75,7 +75,7 @@ class _plane T numer = classify(P); T denom = n.dotproduct(D); - if (_abs(denom) < EPS_S) // normal is orthogonal to vector3, cant intersect + if (_abs(denom) < EPS_S) // normal is orthogonal to vector3, cant intersect return FALSE; dist = -(numer / denom); @@ -87,7 +87,7 @@ class _plane T denom = n.dotproduct(D); if (_abs(denom) < EPS_S) - return FALSE; // normal is orthogonal to vector3, cant intersect + return FALSE; // normal is orthogonal to vector3, cant intersect else { float dist = -(numer / denom); @@ -95,15 +95,15 @@ class _plane return ((dist > 0.f) || fis_zero(dist)); } } - IC BOOL intersect(const _vector3& u, const _vector3& v, // segment - _vector3& isect) // intersection point + IC BOOL intersect(const _vector3& u, const _vector3& v, // segment + _vector3& isect) // intersection point { T denom, dist; _vector3 t; t.sub(v, u); denom = n.dotproduct(t); - if (_abs(denom) < EPS) return false; // they are parallel + if (_abs(denom) < EPS) return false; // they are parallel dist = -(n.dotproduct(u) + d) / denom; if (dist < -EPS || dist > 1 + EPS) return false; @@ -111,8 +111,8 @@ class _plane return true; } - IC BOOL intersect_2(const _vector3& u, const _vector3& v, // segment - _vector3& isect) // intersection point + IC BOOL intersect_2(const _vector3& u, const _vector3& v, // segment + _vector3& isect) // intersection point { T dist1, dist2; _vector3 t; diff --git a/src/xrCore/_plane2.h b/src/xrCore/_plane2.h index 7565a5b339c..5385e990d3c 100644 --- a/src/xrCore/_plane2.h +++ b/src/xrCore/_plane2.h @@ -49,7 +49,7 @@ class _plane2 T numer = classify(P); T denom = n.dotproduct(D); - if (_abs(denom) < EPS_S) // normal is orthogonal to vector3, cant intersect + if (_abs(denom) < EPS_S) // normal is orthogonal to vector3, cant intersect return FALSE; dist = -(numer / denom); @@ -61,7 +61,7 @@ class _plane2 T denom = n.dotproduct(D); if (_abs(denom) < EPS_S) - return FALSE; // normal is orthogonal to vector3, cant intersect + return FALSE; // normal is orthogonal to vector3, cant intersect else { float dist = -(numer / denom); @@ -69,15 +69,15 @@ class _plane2 return ((dist > 0.f) || fis_zero(dist)); } } - IC BOOL intersect(const _vector2& u, const _vector2& v, // segment - _vector2& isect) // intersection point + IC BOOL intersect(const _vector2& u, const _vector2& v, // segment + _vector2& isect) // intersection point { T denom, dist; _vector2 t; t.sub(v, u); denom = n.dotproduct(t); - if (_abs(denom) < EPS) return false; // they are parallel + if (_abs(denom) < EPS) return false; // they are parallel dist = -(n.dotproduct(u) + d) / denom; if (dist < -EPS || dist > 1 + EPS) return false; @@ -85,8 +85,8 @@ class _plane2 return true; } - IC BOOL intersect_2(const _vector2& u, const _vector2& v, // segment - _vector2& isect) // intersection point + IC BOOL intersect_2(const _vector2& u, const _vector2& v, // segment + _vector2& isect) // intersection point { T dist1, dist2; _vector2 t; diff --git a/src/xrCore/_quaternion.h b/src/xrCore/_quaternion.h index ad1893fe7a1..f39a5d46909 100644 --- a/src/xrCore/_quaternion.h +++ b/src/xrCore/_quaternion.h @@ -165,7 +165,7 @@ struct _quaternion public: T x, y, z, w; - IC SelfRef set(T W, T X, T Y, T Z) // don't normalize + IC SelfRef set(T W, T X, T Y, T Z) // don't normalize { x = X; y = Y; @@ -173,7 +173,7 @@ struct _quaternion w = W; return *this; } - IC SelfRef set(SelfCRef Q) // don't normalize + IC SelfRef set(SelfCRef Q) // don't normalize { set(Q.w, Q.x, Q.y, Q.z); return *this; @@ -392,9 +392,9 @@ struct _quaternion // return TRUE if quaternions differ elementwise by less than Tolerance. IC BOOL cmp(SelfCRef Q, T Tolerance = 0.0001f) { - if ( // they are the same but with opposite signs + if ( // they are the same but with opposite signs ((_abs(x + Q.x) <= Tolerance) && (_abs(y + Q.y) <= Tolerance) && (_abs(z + Q.z) <= Tolerance) && - (_abs(w + Q.w) <= Tolerance)) || // they are the same with same signs + (_abs(w + Q.w) <= Tolerance)) || // they are the same with same signs ((_abs(x - Q.x) <= Tolerance) && (_abs(y - Q.y) <= Tolerance) && (_abs(z - Q.z) <= Tolerance) && (_abs(w - Q.w) <= Tolerance))) return true; diff --git a/src/xrCore/_sphere.cpp b/src/xrCore/_sphere.cpp index 17fb428eb10..89f7c8885bd 100644 --- a/src/xrCore/_sphere.cpp +++ b/src/xrCore/_sphere.cpp @@ -15,7 +15,7 @@ class Basis } eDimensions; // data members - int m, s; // size and number of support vectors + int m, s; // size and number of support vectors Fvector q0; @@ -26,7 +26,7 @@ class Basis Fvector c[d + 1]; float sqr_r[d + 1]; - Fvector* current_c; // vectors to some c[j] + Fvector* current_c; // vectors to some c[j] float current_sqr_r; public: @@ -40,7 +40,7 @@ class Basis float excess(const Fvector& p) const; // modification - void reset(); // generates empty sphere with m=s=0 + void reset(); // generates empty sphere with m=s=0 bool push(const Fvector& p); void pop(); }; @@ -57,9 +57,9 @@ class Miniball private: // data members - VectorList L; // STL list keeping the gVectors - Basis B; // basis keeping the current ball - It support_end; // past-the-end iterator of support set + VectorList L; // STL list keeping the gVectors + Basis B; // basis keeping the current ball + It support_end; // past-the-end iterator of support set // private methods void mtf_mb(It k); diff --git a/src/xrCore/_std_extensions.cpp b/src/xrCore/_std_extensions.cpp index 997293582e5..1fe4341c17e 100644 --- a/src/xrCore/_std_extensions.cpp +++ b/src/xrCore/_std_extensions.cpp @@ -8,7 +8,7 @@ int xr_strcmp(const char* S1, const char* S2) { #ifdef DEBUG_MEMORY_MANAGER Memory.stat_strcmp++; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER int res = (int)strcmp(S1, S2); return res; } diff --git a/src/xrCore/_std_extensions.h b/src/xrCore/_std_extensions.h index 84ee327ba76..3f441641b58 100644 --- a/src/xrCore/_std_extensions.h +++ b/src/xrCore/_std_extensions.h @@ -311,7 +311,7 @@ inline int __cdecl xr_sprintf(char (&destination)[count], LPCSTR format_string, va_start(args, format_string); return vsprintf_s(destination, count, format_string, args); } -#else // #ifndef MASTER_GOLD +#else // #ifndef MASTER_GOLD inline int xr_strcpy(LPSTR destination, size_t const destination_size, LPCSTR source) { @@ -346,7 +346,7 @@ inline int __cdecl xr_sprintf(char (&destination)[count], LPCSTR format_string, va_start(args, format_string); return vsnprintf_s(destination, count, count - 1, format_string, args); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD template inline int xr_strcpy(char (&destination)[count], LPCSTR source) @@ -359,7 +359,7 @@ inline int xr_strcat(char (&destination)[count], LPCSTR source) { return xr_strcat(destination, count, source); } -#endif // #ifndef _EDITOR +#endif // #ifndef _EDITOR inline void MemFill32(void* dst, u32 value, size_t dstSize) { @@ -373,6 +373,6 @@ XRCORE_API char* timestamp(string64& dest); extern XRCORE_API u32 crc32(const void* P, u32 len); extern XRCORE_API u32 crc32(const void* P, u32 len, u32 starting_crc); -extern XRCORE_API u32 path_crc32(const char* path, u32 len); // ignores '/' and '\' +extern XRCORE_API u32 path_crc32(const char* path, u32 len); // ignores '/' and '\' -#endif // _STD_EXT_internal \ No newline at end of file +#endif // _STD_EXT_internal \ No newline at end of file diff --git a/src/xrCore/_stl_extensions.h b/src/xrCore/_stl_extensions.h index 86da83d7f89..3a2e7718271 100644 --- a/src/xrCore/_stl_extensions.h +++ b/src/xrCore/_stl_extensions.h @@ -10,7 +10,7 @@ using std::swap; #define M_DONTDEFERCLEAR_EXT #endif -#define M_DONTDEFERCLEAR_EXT //. for mem-debug only +#define M_DONTDEFERCLEAR_EXT //. for mem-debug only //-------- #ifdef M_NOSTDCONTAINERS_EXT @@ -342,7 +342,7 @@ class xr_hash_map : public stdext::hash_map public: u32 size() const { return (u32) __super ::size(); } }; -#endif // #ifdef STLPORT +#endif // #ifdef STLPORT #endif diff --git a/src/xrCore/_vector3d.h b/src/xrCore/_vector3d.h index 53b79c67729..1171cdee311 100644 --- a/src/xrCore/_vector3d.h +++ b/src/xrCore/_vector3d.h @@ -437,13 +437,13 @@ struct _vector3 } // DotProduct - ICF T dotproduct(const Self& v) const // v1*v2 + ICF T dotproduct(const Self& v) const // v1*v2 { return x * v.x + y * v.y + z * v.z; } // CrossProduct - ICF SelfRef crossproduct(const Self& v1, const Self& v2) // (v1,v2) -> this + ICF SelfRef crossproduct(const Self& v1, const Self& v2) // (v1,v2) -> this { x = v1.y * v2.z - v1.z * v2.y; y = v1.z * v2.x - v1.x * v2.z; @@ -590,7 +590,7 @@ struct _vector3 up.z = -dir.y * fInvLength; } - right.crossproduct(up, dir); //. <-> + right.crossproduct(up, dir); //. <-> } IC static void generate_orthonormal_basis_normalized(_vector3& dir, _vector3& up, _vector3& right) { @@ -665,7 +665,7 @@ IC BOOL exact_normalize(float* a) if (aa2 > aa1) { goto aa2_largest; } - else // aa1 is largest + else // aa1 is largest { a0 /= aa1; a2 /= aa1; @@ -678,7 +678,7 @@ IC BOOL exact_normalize(float* a) else { if (aa2 > aa0) { - aa2_largest: // aa2 is largest + aa2_largest: // aa2 is largest a0 /= aa2; a1 /= aa2; l = rsqrt(a0 * a0 + a1 * a1 + 1); @@ -686,12 +686,12 @@ IC BOOL exact_normalize(float* a) a[1] = a1 * l; a[2] = (double)_copysign(l, a2); } - else // aa0 is largest + else // aa0 is largest { if (aa0 <= 0) { // dDEBUGMSG ("vector has zero size"); ... this messace is annoying - a[0] = 0; // if all a's are zero, this is where we'll end up. - a[1] = 1; // return a default unit length vector. + a[0] = 0; // if all a's are zero, this is where we'll end up. + a[1] = 1; // return a default unit length vector. a[2] = 0; return FALSE; } diff --git a/src/xrCore/_vector3d_ext.h b/src/xrCore/_vector3d_ext.h index 42442ecdaca..6176ae3e998 100644 --- a/src/xrCore/_vector3d_ext.h +++ b/src/xrCore/_vector3d_ext.h @@ -142,4 +142,4 @@ inline Fvector rotate_point(Fvector const& point, float const angle) return Fvector().set(point.x * cos_alpha - point.z * sin_alpha, 0, point.x * sin_alpha + point.z * cos_alpha); } -#endif // VECTOR3D_EXT_INCLUDED +#endif // VECTOR3D_EXT_INCLUDED diff --git a/src/xrCore/buffer_vector.h b/src/xrCore/buffer_vector.h index 45aef67a894..27a53ed3182 100644 --- a/src/xrCore/buffer_vector.h +++ b/src/xrCore/buffer_vector.h @@ -112,4 +112,4 @@ inline void swap(buffer_vector& left, buffer_vector& right); #include "buffer_vector_inline.h" -#endif // BUFFER_VECTOR_H_INCLUDED \ No newline at end of file +#endif // BUFFER_VECTOR_H_INCLUDED \ No newline at end of file diff --git a/src/xrCore/buffer_vector_inline.h b/src/xrCore/buffer_vector_inline.h index 1e3057d033f..25235a2e14a 100644 --- a/src/xrCore/buffer_vector_inline.h +++ b/src/xrCore/buffer_vector_inline.h @@ -128,8 +128,8 @@ inline void buffer_vector_specialized::insert(iterator const& where, input_itera difference_type count = end - begin; VERIFY(m_end + count <= m_max_end); - iterator j = m_end + count - 1; // new end - iterator i = m_end - 1; // old end + iterator j = m_end + count - 1; // new end + iterator i = m_end - 1; // old end iterator e = where - 1; for (; i != e; --i, --j) { @@ -149,8 +149,8 @@ inline void buffer_vector_specialized::insert(iterator const& where, size_type c VERIFY(where >= m_begin); VERIFY(m_end + count <= m_max_end); - iterator j = m_end + count - 1; // new end - iterator i = m_end - 1; // old end + iterator j = m_end + count - 1; // new end + iterator i = m_end - 1; // old end iterator e = where - 1; for (; i != e; --i, --j) { @@ -389,4 +389,4 @@ inline void swap(buffer_vector_specialized& left, buffer_vector_specialized& rig #undef TEMPLATE_SPECIALIZATION #undef buffer_vector_specialized -#endif // BUFFER_VECTOR_INLINE_H_INCLUDED \ No newline at end of file +#endif // BUFFER_VECTOR_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrCore/compression_ppmd_stream.h b/src/xrCore/compression_ppmd_stream.h index d746d712992..389359e30fb 100644 --- a/src/xrCore/compression_ppmd_stream.h +++ b/src/xrCore/compression_ppmd_stream.h @@ -21,9 +21,9 @@ class stream inline u32 tell() const; }; -} // namespace ppmd -} // namespace compression +} // namespace ppmd +} // namespace compression #include "compression_ppmd_stream_inline.h" -#endif // COMPRESSION_PPMD_STREAM_H \ No newline at end of file +#endif // COMPRESSION_PPMD_STREAM_H \ No newline at end of file diff --git a/src/xrCore/compression_ppmd_stream_inline.h b/src/xrCore/compression_ppmd_stream_inline.h index 2861263df41..12bb7c1b628 100644 --- a/src/xrCore/compression_ppmd_stream_inline.h +++ b/src/xrCore/compression_ppmd_stream_inline.h @@ -45,7 +45,7 @@ inline u32 stream::tell() const return (u32(m_pointer - m_buffer)); } -} // namespace ppmd -} // namespace compression +} // namespace ppmd +} // namespace compression -#endif // COMPRESSION_PPMD_STREAM_INLINE_H \ No newline at end of file +#endif // COMPRESSION_PPMD_STREAM_INLINE_H \ No newline at end of file diff --git a/src/xrCore/cpuid.cpp b/src/xrCore/cpuid.cpp index 624a6c99954..4b5f8fe9c5f 100644 --- a/src/xrCore/cpuid.cpp +++ b/src/xrCore/cpuid.cpp @@ -33,7 +33,7 @@ int _cpuid(_processor_info* pinfo) unsigned int lpid_width, mlpp; #ifdef _CPUID_DEBUG unsigned int mlpc, mcc; -#endif // _CPUID_DEBUG +#endif // _CPUID_DEBUG __asm { // set pointers @@ -121,7 +121,7 @@ int _cpuid(_processor_info* pinfo) #ifdef _CPUID_DEBUG mov DWORD PTR [mcc] , eax -#endif // _CPUID_DEBUG +#endif // _CPUID_DEBUG // Addressable logical processors per core mov ebx , eax @@ -131,7 +131,7 @@ int _cpuid(_processor_info* pinfo) #ifdef _CPUID_DEBUG mov DWORD PTR [mlpc] , eax -#endif // _CPUID_DEBUG +#endif // _CPUID_DEBUG cmp eax , 01h jbe NO_HTT @@ -352,7 +352,7 @@ int _cpuid(_processor_info* pinfo) printf("mcc = %u\n", mcc); printf("mlpc = %u\n", mlpc); printf("\nlogical_id bit width = %u\n\n", lpid_width); -#endif // _CPUID_DEBUG +#endif // _CPUID_DEBUG // Calculate available processors DWORD pa_mask_save, sa_mask_stub, pa_mask_test, proc_count = 0; @@ -400,7 +400,7 @@ int _cpuid(_processor_info* pinfo) char mask[255]; _itoa_s(dwAPIC_ID, mask, 2); printf("APID_ID #%2.2u = 0x%2.2X (%08.8sb)\n", n_avail, dwAPIC_ID, mask); -#endif // _CPUID_DEBUG +#endif // _CPUID_DEBUG // search for the APIC_ID with the same base BOOL bFound = FALSE; diff --git a/src/xrCore/cpuid.h b/src/xrCore/cpuid.h index b7244ce0df1..07fdc71681e 100644 --- a/src/xrCore/cpuid.h +++ b/src/xrCore/cpuid.h @@ -16,19 +16,19 @@ struct _processor_info { - char v_name[13]; // vendor name - char model_name[49]; // Name of model eg. Intel_Pentium_Pro + char v_name[13]; // vendor name + char model_name[49]; // Name of model eg. Intel_Pentium_Pro - unsigned char family; // family of the processor, eg. Intel_Pentium_Pro is family 6 processor - unsigned char model; // model of processor, eg. Intel_Pentium_Pro is model 1 of family 6 processor - unsigned char stepping; // Processor revision number + unsigned char family; // family of the processor, eg. Intel_Pentium_Pro is family 6 processor + unsigned char model; // model of processor, eg. Intel_Pentium_Pro is model 1 of family 6 processor + unsigned char stepping; // Processor revision number - unsigned int feature; // processor Feature ( same as return value). + unsigned int feature; // processor Feature ( same as return value). - unsigned int n_cores; // number of available physical cores - unsigned int n_threads; // number of available logical threads + unsigned int n_cores; // number of available physical cores + unsigned int n_threads; // number of available logical threads - unsigned int affinity_mask; // recommended affinity mask + unsigned int affinity_mask; // recommended affinity mask // all processors available to process // except 2nd (and upper) logical threads // of the same physical core diff --git a/src/xrCore/crc32.cpp b/src/xrCore/crc32.cpp index b096f8e367e..2005a61d3e7 100644 --- a/src/xrCore/crc32.cpp +++ b/src/xrCore/crc32.cpp @@ -2,9 +2,9 @@ #pragma hdrstop static BOOL crc32_ready = FALSE; -static u32 crc32_table[256]; // Lookup table array +static u32 crc32_table[256]; // Lookup table array -inline u32 Reflect(u32 ref, char ch) // Reflects CRC bits in the lookup table +inline u32 Reflect(u32 ref, char ch) // Reflects CRC bits in the lookup table { // Used only by Init_CRC32_Table(). diff --git a/src/xrCore/doug_lea_allocator.h b/src/xrCore/doug_lea_allocator.h index cd17d0cc93c..63d39540664 100644 --- a/src/xrCore/doug_lea_allocator.h +++ b/src/xrCore/doug_lea_allocator.h @@ -32,6 +32,6 @@ class XRCORE_API doug_lea_allocator private: LPCSTR m_arena_id; void* m_dl_arena; -}; // class doug_lea_allocator +}; // class doug_lea_allocator -#endif // #ifndef DOUG_LEA_ALLOCATOR_H_INCLUDED \ No newline at end of file +#endif // #ifndef DOUG_LEA_ALLOCATOR_H_INCLUDED \ No newline at end of file diff --git a/src/xrCore/fastdelegate.h b/src/xrCore/fastdelegate.h index 8c46aa9ba1d..b61af004007 100644 --- a/src/xrCore/fastdelegate.h +++ b/src/xrCore/fastdelegate.h @@ -49,9 +49,9 @@ #define FASTDELEGATE_H #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 -#include // to allow <,> comparisons +#include // to allow <,> comparisons ////////////////////////////////////////////////// #define xr_stdcall __stdcall @@ -84,9 +84,9 @@ #if defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__VECTOR_C) && !defined(__ICL) && !defined(__BORLANDC__) #define FASTDLGT_ISMSVC -#if (_MSC_VER < 1300) // Many workarounds are required for VC6. +#if (_MSC_VER < 1300) // Many workarounds are required for VC6. #define FASTDLGT_VC6 -#pragma warning(disable : 4786) // disable this ridiculous warning +#pragma warning(disable : 4786) // disable this ridiculous warning #endif #endif @@ -105,7 +105,7 @@ #endif // Does it allow function declarator syntax? The following compilers are known to work: -#if defined(FASTDLGT_ISMSVC) && (_MSC_VER >= 1310) // VC 7.1 +#if defined(FASTDLGT_ISMSVC) && (_MSC_VER >= 1310) // VC 7.1 #define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX #endif @@ -119,8 +119,8 @@ #define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX #endif -#ifdef __GNUC__ // Workaround GCC bug #8271 - // At present, GCC doesn't recognize constness of MFPs in templates +#ifdef __GNUC__ // Workaround GCC bug #8271 + // At present, GCC doesn't recognize constness of MFPs in templates #define FASTDELEGATE_GCC_BUG_8271 #endif @@ -143,7 +143,7 @@ namespace fastdelegate { namespace detail -{ // we'll hide the implementation details in a nested namespace. +{ // we'll hide the implementation details in a nested namespace. // implicit_cast< > // I believe this was originally going to be in the C++ standard but @@ -367,8 +367,8 @@ struct SimplifyMemFunc XFuncType func; struct { - GenericMemFuncType funcaddress; // points to the actual member function - int delta; // #BYTES to be added to the 'this' pointer + GenericMemFuncType funcaddress; // points to the actual member function + int delta; // #BYTES to be added to the 'this' pointer } s; } u; // Check that the horrible_cast will work @@ -391,9 +391,9 @@ struct SimplifyMemFunc // is internally defined as: struct MicrosoftVirtualMFP { - void (GenericClass::*codeptr)(); // points to the actual member function - int delta; // #bytes to be added to the 'this' pointer - int vtable_index; // or 0 if no virtual inheritance + void (GenericClass::*codeptr)(); // points to the actual member function + int delta; // #bytes to be added to the 'this' pointer + int vtable_index; // or 0 if no virtual inheritance }; // The CRUCIAL feature of Microsoft/Intel MFPs which we exploit is that the // m_codeptr member is *always* called, regardless of the values of the other @@ -509,10 +509,10 @@ struct SimplifyMemFunc // is internally defined as: struct { - GenericMemFuncType m_funcaddress; // points to the actual member function - int delta; // #bytes to be added to the 'this' pointer - int vtordisp; // #bytes to add to 'this' to find the vtable - int vtable_index; // or 0 if no virtual inheritance + GenericMemFuncType m_funcaddress; // points to the actual member function + int delta; // #bytes to be added to the 'this' pointer + int vtordisp; // #bytes to add to 'this' to find the vtable + int vtable_index; // or 0 if no virtual inheritance } s; } u; // Check that the horrible_cast will work @@ -520,7 +520,7 @@ struct SimplifyMemFunc u.func = function_to_bind; bound_func = u.s.funcaddress; int virtual_delta = 0; - if (u.s.vtable_index) { // Virtual inheritance is used + if (u.s.vtable_index) { // Virtual inheritance is used // First, get to the vtable. // It is 'vtordisp' bytes from the start of the class. const int* vtable = @@ -535,11 +535,11 @@ struct SimplifyMemFunc return reinterpret_cast(reinterpret_cast(pthis) + u.s.delta + virtual_delta); }; }; -#endif // MSVC 7 and greater +#endif // MSVC 7 and greater -#endif // MS/Intel hacks +#endif // MS/Intel hacks -} // namespace detail +} // namespace detail //////////////////////////////////////////////////////////////////////////////// // Fast Delegates, part 2: @@ -592,12 +592,12 @@ class DelegateMemento protected: // the data is protected, not private, because many // compilers have problems with template friends. - typedef void (detail::GenericClass::*GenericMemFuncType)(); // arbitrary MFP. + typedef void (detail::GenericClass::*GenericMemFuncType)(); // arbitrary MFP. detail::GenericClass* m_pthis; GenericMemFuncType m_pFunction; #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - typedef void(xr_stdcall* GenericFuncPtr)(); // arbitrary code pointer + typedef void(xr_stdcall* GenericFuncPtr)(); // arbitrary code pointer GenericFuncPtr m_pStaticFunction; #endif @@ -631,7 +631,7 @@ class DelegateMemento else return true; } -#else // Evil Method +#else // Evil Method inline bool IsEqual(const DelegateMemento& x) const { return m_pthis == x.m_pthis && m_pFunction == x.m_pFunction; } #endif // Provide a strict weak ordering for DelegateMementos. @@ -650,11 +650,11 @@ class DelegateMemento // BUGFIX (Mar 2005): // We can't just compare m_pFunction because on Metrowerks, // m_pFunction can be zero even if the delegate is not empty! - inline bool operator!() const // Is it bound to anything? + inline bool operator!() const // Is it bound to anything? { return m_pthis == 0 && m_pFunction == 0; } - inline bool empty() const // Is it bound to anything? + inline bool empty() const // Is it bound to anything? { return m_pthis == 0 && m_pFunction == 0; } @@ -734,7 +734,7 @@ class ClosurePtr : public DelegateMemento m_pStaticFunction = 0; #endif } -#ifdef FASTDELEGATE_GCC_BUG_8271 // At present, GCC doesn't recognize constness of MFPs in templates +#ifdef FASTDELEGATE_GCC_BUG_8271 // At present, GCC doesn't recognize constness of MFPs in templates template inline void bindmemfunc(const X* pthis, XMemFunc function_to_bind) { @@ -781,7 +781,7 @@ class ClosurePtr : public DelegateMemento inline void bindstaticfunc( DerivedClass* pParent, ParentInvokerSig static_function_invoker, StaticFuncPtr function_to_bind) { - if (function_to_bind == 0) { // cope with assignment to 0 + if (function_to_bind == 0) { // cope with assignment to 0 m_pFunction = 0; } else @@ -819,7 +819,7 @@ class ClosurePtr : public DelegateMemento inline void bindstaticfunc( DerivedClass* pParent, ParentInvokerSig static_function_invoker, StaticFuncPtr function_to_bind) { - if (function_to_bind == 0) { // cope with assignment to 0 + if (function_to_bind == 0) { // cope with assignment to 0 m_pFunction = 0; } else @@ -852,7 +852,7 @@ class ClosurePtr : public DelegateMemento typedef int ERROR_CantUseEvilMethod[sizeof(UnvoidStaticFuncPtr) == sizeof(this) ? 1 : -1]; return horrible_cast(this); } -#endif // !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) +#endif // !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) // Does the closure contain this static function? inline bool IsEqualToStaticFuncPtr(StaticFuncPtr funcptr) @@ -865,7 +865,7 @@ class ClosurePtr : public DelegateMemento } }; -} // namespace detail +} // namespace detail //////////////////////////////////////////////////////////////////////////////// // Fast Delegates, part 3: @@ -977,7 +977,7 @@ class FastDelegate0 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -985,7 +985,7 @@ class FastDelegate0 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction() const { return (*(m_Closure.GetStaticFunction()))(); } }; @@ -1061,7 +1061,7 @@ class FastDelegate1 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1069,7 +1069,7 @@ class FastDelegate1 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions // this -- parameter, function // p1 - function, parameter RetType xr_stdcall InvokeStaticFunction(Param1 p1) const { return (*(m_Closure.GetStaticFunction()))(p1); } @@ -1150,7 +1150,7 @@ class FastDelegate2 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1158,7 +1158,7 @@ class FastDelegate2 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction(Param1 p1, Param2 p2) const { return (*(m_Closure.GetStaticFunction()))(p1, p2); @@ -1248,7 +1248,7 @@ class FastDelegate3 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1256,7 +1256,7 @@ class FastDelegate3 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3) const { return (*(m_Closure.GetStaticFunction()))(p1, p2, p3); @@ -1348,7 +1348,7 @@ class FastDelegate4 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1356,7 +1356,7 @@ class FastDelegate4 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const { return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4); @@ -1450,7 +1450,7 @@ class FastDelegate5 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1458,7 +1458,7 @@ class FastDelegate5 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const { return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4, p5); @@ -1557,7 +1557,7 @@ class FastDelegate6 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1565,7 +1565,7 @@ class FastDelegate6 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const { return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4, p5, p6); @@ -1664,7 +1664,7 @@ class FastDelegate7 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1672,7 +1672,7 @@ class FastDelegate7 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const { @@ -1772,7 +1772,7 @@ class FastDelegate8 inline bool operator==(StaticFunctionPtr funcptr) { return m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!=(StaticFunctionPtr funcptr) { return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } inline bool operator!() const - { // Is it bound to anything? + { // Is it bound to anything? return !m_Closure; } inline bool empty() const { return !m_Closure; } @@ -1780,7 +1780,7 @@ class FastDelegate8 // Conversion to and from the DelegateMemento storage class const DelegateMemento& GetMemento() { return m_Closure; } void SetMemento(const DelegateMemento& any) { m_Closure.CopyFrom(this, any); } -private: // Invoker for static functions +private: // Invoker for static functions RetType xr_stdcall InvokeStaticFunction( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const { @@ -2143,7 +2143,7 @@ class FastDelegate(this) = x; } }; -#endif // FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX +#endif // FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX //////////////////////////////////////////////////////////////////////////////// // Fast Delegates, part 5: @@ -2331,6 +2331,6 @@ A bind(B b, C c) // clean up after ourselves... #undef FASTDLGT_RETTYPE -} // namespace fastdelegate +} // namespace fastdelegate -#endif // !defined(FASTDELEGATE_H) \ No newline at end of file +#endif // !defined(FASTDELEGATE_H) \ No newline at end of file diff --git a/src/xrCore/file_stream_reader.h b/src/xrCore/file_stream_reader.h index dd15aeff8e8..4342330e315 100644 --- a/src/xrCore/file_stream_reader.h +++ b/src/xrCore/file_stream_reader.h @@ -16,4 +16,4 @@ class CFileStreamReader : public CStreamReader virtual void destroy(); }; -#endif // FILE_STREAM_READER_H \ No newline at end of file +#endif // FILE_STREAM_READER_H \ No newline at end of file diff --git a/src/xrCore/log.cpp b/src/xrCore/log.cpp index d6f16f54926..e2138ec83c2 100644 --- a/src/xrCore/log.cpp +++ b/src/xrCore/log.cpp @@ -14,9 +14,9 @@ static string_path log_file_name = "engine.log"; static BOOL no_log = TRUE; #ifdef CONFIG_PROFILE_LOCKS static Lock logCS(MUTEX_PROFILE_ID(log)); -#else // CONFIG_PROFILE_LOCKS +#else // CONFIG_PROFILE_LOCKS static Lock logCS; -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS xr_vector* LogFile = NULL; static LogCallback LogCB = 0; @@ -74,7 +74,7 @@ void Log(const char* s) for (i = 0, j = 0; s[i] != 0; i++) { if (s[i] == '\n') { - split[j] = 0; // end of line + split[j] = 0; // end of line if (split[0] == 0) { split[0] = ' '; split[1] = 0; diff --git a/src/xrCore/memory_allocation_stats.cpp b/src/xrCore/memory_allocation_stats.cpp index 53872b3b0f3..8d030cae299 100644 --- a/src/xrCore/memory_allocation_stats.cpp +++ b/src/xrCore/memory_allocation_stats.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #ifndef DEBUG_MEMORY_MANAGER -#include // _alloca +#include // _alloca namespace { @@ -98,4 +98,4 @@ NO_INLINE void save_stack_trace() } stats.insert({crc, {stackTrace, 1}}); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER diff --git a/src/xrCore/memory_allocator_options.h b/src/xrCore/memory_allocator_options.h index 9c577634f47..33b2a2b624f 100644 --- a/src/xrCore/memory_allocator_options.h +++ b/src/xrCore/memory_allocator_options.h @@ -9,4 +9,4 @@ //#define USE_ARENA_ALLOCATOR -#endif // #ifndef MEMORY_ALLOCATOR_OPTIONS_H_INCLUDED \ No newline at end of file +#endif // #ifndef MEMORY_ALLOCATOR_OPTIONS_H_INCLUDED \ No newline at end of file diff --git a/src/xrCore/memory_monitor.cpp b/src/xrCore/memory_monitor.cpp index 3059eab8903..fcf2156a285 100644 --- a/src/xrCore/memory_monitor.cpp +++ b/src/xrCore/memory_monitor.cpp @@ -152,4 +152,4 @@ void memory_monitor::make_checkpoint(LPCSTR checkpoint_name) Msg("Done"); } -#endif // USE_MEMORY_MONITOR \ No newline at end of file +#endif // USE_MEMORY_MONITOR \ No newline at end of file diff --git a/src/xrCore/memory_monitor.h b/src/xrCore/memory_monitor.h index 0348cdf0f7e..ec89b99b1c6 100644 --- a/src/xrCore/memory_monitor.h +++ b/src/xrCore/memory_monitor.h @@ -4,8 +4,8 @@ #ifdef DEBUG #ifndef _EDITOR #define USE_MEMORY_MONITOR -#endif // _EDITOR -#endif // DEBUG +#endif // _EDITOR +#endif // DEBUG #ifdef USE_MEMORY_MONITOR @@ -20,6 +20,6 @@ extern XRCORE_API int counter_alloc; extern XRCORE_API int counter_free; } -#endif // USE_MEMORY_MONITOR +#endif // USE_MEMORY_MONITOR -#endif // MEMORY_MONITOR_H \ No newline at end of file +#endif // MEMORY_MONITOR_H \ No newline at end of file diff --git a/src/xrCore/net_utils.h b/src/xrCore/net_utils.h index f330b9a8e55..410805af686 100644 --- a/src/xrCore/net_utils.h +++ b/src/xrCore/net_utils.h @@ -112,67 +112,67 @@ class XRCORE_API NET_Packet W_guard g(&w_allow); w(&a, 4); INI_W(w_float(a)); - } // float + } // float IC void w_vec3(const Fvector& a) { W_guard g(&w_allow); w(&a, 3 * sizeof(float)); INI_W(w_vec3(a)); - } // vec3 + } // vec3 IC void w_vec4(const Fvector4& a) { W_guard g(&w_allow); w(&a, 4 * sizeof(float)); INI_W(w_vec4(a)); - } // vec4 + } // vec4 IC void w_u64(u64 a) { W_guard g(&w_allow); w(&a, 8); INI_W(w_u64(a)); - } // qword (8b) + } // qword (8b) IC void w_s64(s64 a) { W_guard g(&w_allow); w(&a, 8); INI_W(w_s64(a)); - } // qword (8b) + } // qword (8b) IC void w_u32(u32 a) { W_guard g(&w_allow); w(&a, 4); INI_W(w_u32(a)); - } // dword (4b) + } // dword (4b) IC void w_s32(s32 a) { W_guard g(&w_allow); w(&a, 4); INI_W(w_s32(a)); - } // dword (4b) + } // dword (4b) IC void w_u16(u16 a) { W_guard g(&w_allow); w(&a, 2); INI_W(w_u16(a)); - } // word (2b) + } // word (2b) IC void w_s16(s16 a) { W_guard g(&w_allow); w(&a, 2); INI_W(w_s16(a)); - } // word (2b) + } // word (2b) IC void w_u8(u8 a) { W_guard g(&w_allow); w(&a, 1); INI_W(w_u8(a)); - } // byte (1b) + } // byte (1b) IC void w_s8(s8 a) { W_guard g(&w_allow); w(&a, 1); INI_W(w_s8(a)); - } // byte (1b) + } // byte (1b) IC void w_float_q16(float a, float min, float max) { @@ -220,7 +220,7 @@ class XRCORE_API NET_Packet IIniFileStream* tmp = inistream; inistream = NULL; w_u8(0); - inistream = tmp; // hack -( + inistream = tmp; // hack -( } INI_W(w_stringZ(p.c_str())); diff --git a/src/xrCore/os_clipboard.cpp b/src/xrCore/os_clipboard.cpp index a615f4c882d..ee75d23f3ec 100644 --- a/src/xrCore/os_clipboard.cpp +++ b/src/xrCore/os_clipboard.cpp @@ -43,7 +43,7 @@ void os_clipboard::paste_from_clipboard(LPSTR buffer, u32 const& buffer_size) for (u32 i = 0; i < strlen(buffer); ++i) { char c = buffer[i]; - if (((isprint(c) == 0) && (c != char(-1))) || c == '\t' || c == '\n') // "я" = -1 + if (((isprint(c) == 0) && (c != char(-1))) || c == '\t' || c == '\n') // "я" = -1 { buffer[i] = ' '; } @@ -70,9 +70,9 @@ void os_clipboard::update_clipboard(LPCSTR string) int buffer_size = (memory_length + string_length + 1) * sizeof(char); #ifndef _EDITOR LPSTR buffer = (LPSTR)_alloca(buffer_size); -#else // #ifndef _EDITOR +#else // #ifndef _EDITOR LPSTR buffer = (LPSTR)xr_alloc(buffer_size); -#endif // #ifndef _EDITOR +#endif // #ifndef _EDITOR xr_strcpy(buffer, buffer_size, memory); GlobalUnlock(handle); @@ -81,5 +81,5 @@ void os_clipboard::update_clipboard(LPCSTR string) copy_to_clipboard(buffer); #ifdef _EDITOR xr_free(buffer); -#endif // #ifdef _EDITOR +#endif // #ifdef _EDITOR } \ No newline at end of file diff --git a/src/xrCore/os_clipboard.h b/src/xrCore/os_clipboard.h index b3bb0d66148..fb22aa75c47 100644 --- a/src/xrCore/os_clipboard.h +++ b/src/xrCore/os_clipboard.h @@ -14,6 +14,6 @@ namespace os_clipboard XRCORE_API void copy_to_clipboard(LPCSTR buf); XRCORE_API void paste_from_clipboard(LPSTR buf, u32 const& buf_size); XRCORE_API void update_clipboard(LPCSTR str); -} // namespace os_clipboard +} // namespace os_clipboard -#endif // OS_CLIPBOARD_H_INCLUDED \ No newline at end of file +#endif // OS_CLIPBOARD_H_INCLUDED \ No newline at end of file diff --git a/src/xrCore/ppmd_compressor.cpp b/src/xrCore/ppmd_compressor.cpp index ae5a321fa6a..05166d4226b 100644 --- a/src/xrCore/ppmd_compressor.cpp +++ b/src/xrCore/ppmd_compressor.cpp @@ -108,7 +108,7 @@ u32 ppmd_trained_decompress(void* dest_buffer, const u32& dest_buffer_size, cons return (dest.tell()); } -static const u32 compress_chunk_size = 100 * 1024; // 100 kb +static const u32 compress_chunk_size = 100 * 1024; // 100 kb u32 ppmd_compress_mt(void* dest_buffer, const u32& dest_buffer_size, const void* source_buffer, const u32& source_buffer_size, ppmd_yield_callback_t ycb) diff --git a/src/xrCore/ppmd_compressor.h b/src/xrCore/ppmd_compressor.h index 1c41ffc7827..1dd262107bb 100644 --- a/src/xrCore/ppmd_compressor.h +++ b/src/xrCore/ppmd_compressor.h @@ -26,4 +26,4 @@ XRCORE_API u32 ppmd_compress_mt(void* dest_buffer, const u32& dest_buffer_size, XRCORE_API u32 ppmd_decompress_mt(void* dest_buffer, const u32& dest_buffer_size, const void* source_buffer, const u32& source_buffer_size, ppmd_yield_callback_t ycb); -#endif // PPMD_COMPRESSOR_H \ No newline at end of file +#endif // PPMD_COMPRESSOR_H \ No newline at end of file diff --git a/src/xrCore/ptmalloc3/malloc-2.8.3.h b/src/xrCore/ptmalloc3/malloc-2.8.3.h index b4fb7442a57..c12c9252bfd 100644 --- a/src/xrCore/ptmalloc3/malloc-2.8.3.h +++ b/src/xrCore/ptmalloc3/malloc-2.8.3.h @@ -53,7 +53,7 @@ extern "C" { #define dlmalloc_footprint pt3malloc_footprint #define dlindependent_calloc pt3independent_calloc #define dlindependent_comalloc pt3independent_comalloc -#elif !defined(USE_DL_PREFIX) // #ifdef USE_PT3_PREFIX +#elif !defined(USE_DL_PREFIX) // #ifdef USE_PT3_PREFIX #define dlcalloc calloc #define dlfree free #define dlmalloc malloc @@ -69,7 +69,7 @@ extern "C" { #define dlmalloc_footprint malloc_footprint #define dlindependent_calloc independent_calloc #define dlindependent_comalloc independent_comalloc -#endif // #if defined(USE_DL_PREFIX) +#endif // #if defined(USE_DL_PREFIX) /* malloc(size_t n) @@ -438,9 +438,9 @@ typedef void(__stdcall* out_of_memory_handler_type)(mspace, out_of_memory_handle mspace create_mspace( size_t capacity, int locked, out_of_memory_handler_type handler, out_of_memory_handler_parameter_type parameter); -#else // #ifdef USE_OUT_OF_MEMORY_HANDLER +#else // #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace(size_t capacity, int locked); -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER /* destroy_mspace destroys the given space, and attempts to return all @@ -463,9 +463,9 @@ size_t destroy_mspace(mspace msp); mspace create_mspace_with_base(void* base, size_t capacity, int locked, out_of_memory_handler_type handler, out_of_memory_handler_parameter_type parameter); void const* out_of_memory_handler_parameter(void* arena); -#else // #ifdef USE_OUT_OF_MEMORY_HANDLER +#else // #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace_with_base(void* base, size_t capacity, int locked); -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER /* mspace_malloc behaves as malloc, but operates within diff --git a/src/xrCore/ptmalloc3/malloc-private.h b/src/xrCore/ptmalloc3/malloc-private.h index 5b7cb08bdde..57e31866c38 100644 --- a/src/xrCore/ptmalloc3/malloc-private.h +++ b/src/xrCore/ptmalloc3/malloc-private.h @@ -14,7 +14,7 @@ #ifdef USE_OUT_OF_MEMORY_HANDLER typedef void const* out_of_memory_handler_parameter_type; typedef void(__stdcall* out_of_memory_handler_type)(void*, out_of_memory_handler_parameter_type, int); -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER #ifndef MALLOC_ALIGNMENT #define MALLOC_ALIGNMENT ((size_t)8U) @@ -108,7 +108,7 @@ struct malloc_state #ifdef USE_OUT_OF_MEMORY_HANDLER out_of_memory_handler_type out_of_memory_handler; out_of_memory_handler_parameter_type out_of_memory_parameter; -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER }; /* diff --git a/src/xrCore/ptmalloc3/malloc.c b/src/xrCore/ptmalloc3/malloc.c index 4bf47fdcc49..a55b6677b32 100644 --- a/src/xrCore/ptmalloc3/malloc.c +++ b/src/xrCore/ptmalloc3/malloc.c @@ -485,7 +485,7 @@ MAX_RELEASE_CHECK_RATE default: 255 unless not HAVE_MMAP #ifdef DEBUG #undef DEBUG -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG #define USE_DL_PREFIX #define MSPACES 1 @@ -1126,9 +1126,9 @@ typedef void const* out_of_memory_handler_parameter_type; typedef void(__stdcall* out_of_memory_handler_type)(mspace, out_of_memory_handler_parameter_type, int); mspace create_mspace( size_t capacity, int locked, out_of_memory_handler_type handler, out_of_memory_handler_parameter_type parameter); -#else // #ifdef USE_OUT_OF_MEMORY_HANDLER +#else // #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace(size_t capacity, int locked); -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER /* destroy_mspace destroys the given space, and attempts to return all @@ -1150,9 +1150,9 @@ size_t destroy_mspace(mspace msp); #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace_with_base(void* base, size_t capacity, int locked, out_of_memory_handler_type handler, out_of_memory_handler_parameter_type parameter); -#else // #ifdef USE_OUT_OF_MEMORY_HANDLER +#else // #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace_with_base(void* base, size_t capacity, int locked); -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER /* mspace_malloc behaves as malloc, but operates within @@ -1355,7 +1355,7 @@ unsigned char _BitScanReverse(unsigned long* index, unsigned long mask); #ifdef XRAY_PLATFORM_WINDOWS_32 #pragma intrinsic(_BitScanForward) #pragma intrinsic(_BitScanReverse) -#endif // #ifdef XRAY_PLATFORM_WINDOWS_32 +#endif // #ifdef XRAY_PLATFORM_WINDOWS_32 #endif /* BitScanForward */ #endif /* defined(_MSC_VER) && _MSC_VER>=1300 */ @@ -1514,7 +1514,7 @@ static FORCEINLINE int win32munmap(void* ptr, size_t size) { } return 0; } -#endif // #if 0 +#endif // #if 0 #define MAP_PRIVATE 1 #define MAP_ANONYMOUS 2 @@ -2401,7 +2401,7 @@ struct malloc_state #ifdef USE_OUT_OF_MEMORY_HANDLER out_of_memory_handler_type out_of_memory_handler; out_of_memory_handler_parameter_type out_of_memory_parameter; -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER }; typedef struct malloc_state* mstate; @@ -4898,7 +4898,7 @@ static mstate init_user_mstate(char* tbase, size_t tsize) #ifdef USE_OUT_OF_MEMORY_HANDLER m->out_of_memory_handler = 0; m->out_of_memory_parameter = 0; -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER m->extp = 0; m->exts = 0; disable_contiguous(m); @@ -4912,9 +4912,9 @@ static mstate init_user_mstate(char* tbase, size_t tsize) #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace( size_t capacity, int locked, out_of_memory_handler_type handler, out_of_memory_handler_parameter_type parameter) -#else // #ifdef USE_OUT_OF_MEMORY_HANDLER +#else // #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace(size_t capacity, int locked) -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER { mstate m = 0; size_t msize = pad_request(sizeof(struct malloc_state)); @@ -4931,7 +4931,7 @@ mspace create_mspace(size_t capacity, int locked) #ifdef USE_OUT_OF_MEMORY_HANDLER m->out_of_memory_handler = handler; m->out_of_memory_parameter = parameter; -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER } } return (mspace)m; @@ -4942,14 +4942,14 @@ void const* out_of_memory_handler_parameter(mspace arena) { return ((mstate)(arena))->out_of_memory_parameter; } -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace_with_base(void* base, size_t capacity, int locked, out_of_memory_handler_type handler, out_of_memory_handler_parameter_type parameter) -#else // #ifdef USE_OUT_OF_MEMORY_HANDLER +#else // #ifdef USE_OUT_OF_MEMORY_HANDLER mspace create_mspace_with_base(void* base, size_t capacity, int locked) -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER { mstate m = 0; size_t msize = pad_request(sizeof(struct malloc_state)); @@ -4962,7 +4962,7 @@ mspace create_mspace_with_base(void* base, size_t capacity, int locked) #ifdef USE_OUT_OF_MEMORY_HANDLER m->out_of_memory_handler = handler; m->out_of_memory_parameter = parameter; -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER } return (mspace)m; } @@ -5122,9 +5122,9 @@ void* mspace_malloc(mspace msp, size_t bytes) } mem = sys_alloc(ms, nb); -#else // #ifdef USE_OUT_OF_MEMORY_HANDLER +#else // #ifdef USE_OUT_OF_MEMORY_HANDLER mem = sys_alloc(ms, nb); -#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER +#endif // #ifdef USE_OUT_OF_MEMORY_HANDLER postaction: POSTACTION(ms); return mem; @@ -5692,7 +5692,7 @@ unsigned char _BitScanForward(unsigned long* index, unsigned long mask) unsigned char _BitScanReverse(unsigned long* index, unsigned long mask) { - mask |= mask >> 1; // first round down to power of 2 + mask |= mask >> 1; // first round down to power of 2 mask |= mask >> 2; mask |= mask >> 4; mask |= mask >> 8; @@ -5702,4 +5702,4 @@ unsigned char _BitScanReverse(unsigned long* index, unsigned long mask) return (_BitScanForward(index, 1 << MultiplyDeBruijnBitPosition[(mask * 0x077CB531UL) >> 27])); } -#endif // #ifndef XRAY_PLATFORM_WINDOWS_32 \ No newline at end of file +#endif // #ifndef XRAY_PLATFORM_WINDOWS_32 \ No newline at end of file diff --git a/src/xrCore/ptmalloc3/ptmalloc3.c b/src/xrCore/ptmalloc3/ptmalloc3.c index b5efec28a39..c35c5791b3e 100644 --- a/src/xrCore/ptmalloc3/ptmalloc3.c +++ b/src/xrCore/ptmalloc3/ptmalloc3.c @@ -35,7 +35,7 @@ PERFORMANCE OF THIS SOFTWARE. */ #if defined(WIN32) || defined(_XBOX) #define LACKS_SYS_MMAN_H -#endif // #if defined(WIN32) || defined(_XBOX) +#endif // #if defined(WIN32) || defined(_XBOX) #ifndef __STD_C #if defined(__STDC__) || defined(__cplusplus) @@ -713,7 +713,7 @@ static /*if ((s = getenv("MALLOC_MMAP_MAX_"))) this is no longer available public_mALLOPt(M_MMAP_MAX, atoi(s));*/ } -#endif // #if 0 +#endif // #if 0 #endif // if (!_dupenv_s(&s,&length,"MALLOC_CHECK_")) { /*if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0')); diff --git a/src/xrCore/ptmalloc3/sysdeps/win32/virtual_alloc.h b/src/xrCore/ptmalloc3/sysdeps/win32/virtual_alloc.h index 0e4e932f121..ddc4db09230 100644 --- a/src/xrCore/ptmalloc3/sysdeps/win32/virtual_alloc.h +++ b/src/xrCore/ptmalloc3/sysdeps/win32/virtual_alloc.h @@ -3,7 +3,7 @@ #ifdef __cplusplus extern "C" { -#endif // #ifdef __cplusplus +#endif // #ifdef __cplusplus typedef void const* out_of_memory_handler_parameter_type; typedef void(__stdcall* out_of_memory_handler_type)(void*, out_of_memory_handler_parameter_type, int); @@ -37,7 +37,7 @@ void initialize_virtual_alloc_arena(struct virtual_alloc_arena* result, void* bu void finalize_virtual_alloc_arena(struct virtual_alloc_arena* arena); #ifdef __cplusplus -} // extern "C" -#endif // #ifdef __cplusplus +} // extern "C" +#endif // #ifdef __cplusplus -#endif // #ifndef VIRTUAL_ALLOC_H_INCLUDED \ No newline at end of file +#endif // #ifndef VIRTUAL_ALLOC_H_INCLUDED \ No newline at end of file diff --git a/src/xrCore/ptmalloc3/sysdeps/win32/win32.c b/src/xrCore/ptmalloc3/sysdeps/win32/win32.c index 28213a162ef..3813ce1bd93 100644 --- a/src/xrCore/ptmalloc3/sysdeps/win32/win32.c +++ b/src/xrCore/ptmalloc3/sysdeps/win32/win32.c @@ -13,9 +13,9 @@ #define _WIN32_WINNT 0x600 #ifndef _XBOX #include -#else // #ifndef _XBOX +#else // #ifndef _XBOX #include -#endif // #ifndef _XBOX +#endif // #ifndef _XBOX #include @@ -99,7 +99,7 @@ static INLINE LONG interlockedexchange(LONG volatile* data, LONG value) static INLINE LONG slwait(volatile LONG* sl) { while (interlockedexchange(sl, 1) != 0) -#ifndef FX_SMPBUILD // Faster not to sleep on multiprocessor machines +#ifndef FX_SMPBUILD // Faster not to sleep on multiprocessor machines Sleep(0) #endif ; @@ -131,11 +131,11 @@ static INTERNAL_INTPTR_T getpagesize(void) SYSTEM_INFO system_info; GetSystemInfo(&system_info); g_pagesize = system_info.dwPageSize; -#elif defined(_XBOX) // #ifdef WIN32 +#elif defined(_XBOX) // #ifdef WIN32 g_pagesize = 4096; -#else // #elif defined(_XBOX) +#else // #elif defined(_XBOX) #error please define your platform -#endif // #elif defined(_XBOX) +#endif // #elif defined(_XBOX) } return g_pagesize; } @@ -147,11 +147,11 @@ static INTERNAL_INTPTR_T getregionsize(void) SYSTEM_INFO system_info; GetSystemInfo(&system_info); g_regionsize = system_info.dwAllocationGranularity; -#elif defined(_XBOX) // #ifdef WIN32 +#elif defined(_XBOX) // #ifdef WIN32 g_regionsize = 64 * 1024; -#else // #elif defined(_XBOX) +#else // #elif defined(_XBOX) #error please define your platform -#endif // #elif defined(_XBOX) +#endif // #elif defined(_XBOX) } return g_regionsize; } @@ -455,13 +455,13 @@ static void *sbrk (INTERNAL_INTPTR_T size) { slrelease (&g_sl); return result; } -#endif // #if 0 +#endif // #if 0 //#define USE_PTMALLOC3_ARENA #ifdef USE_PTMALLOC3_ARENA #include "virtual_alloc.h" -#endif // #ifdef USE_PTMALLOC3_ARENA +#endif // #ifdef USE_PTMALLOC3_ARENA #pragma warning(disable : 4100) #pragma warning(disable : 4127) @@ -554,13 +554,13 @@ void* mmap(void* ptr, INTERNAL_INTPTR_T size, INTERNAL_INTPTR_T prot, INTERNAL_I /* Release spin lock */ slrelease(&g_sl); return ptr; -#else // #ifndef USE_PTMALLOC3_ARENA +#else // #ifndef USE_PTMALLOC3_ARENA void* result; slwait(&g_sl); result = virtual_alloc(&g_ptmalloc3_arena, (unsigned int)size); slrelease(&g_sl); return (result); -#endif // #ifndef USE_PTMALLOC3_ARENA +#endif // #ifndef USE_PTMALLOC3_ARENA } /* munmap for windows */ @@ -592,12 +592,12 @@ INTERNAL_INTPTR_T munmap(void* ptr, INTERNAL_INTPTR_T size) /* Release spin lock */ /* slrelease (&g_sl); */ return rc; -#else // #ifndef USE_PTMALLOC3_ARENA +#else // #ifndef USE_PTMALLOC3_ARENA slwait(&g_sl); virtual_free(&g_ptmalloc3_arena, ptr, size); slrelease(&g_sl); return (0); -#endif // #ifndef USE_PTMALLOC3_ARENA +#endif // #ifndef USE_PTMALLOC3_ARENA } #if 0 @@ -725,6 +725,6 @@ static int cpuinfo (int whole, INTERNAL_SIZE_T *kernel, INTERNAL_SIZE_T *user) return TRUE; } } -#endif // #if 0 +#endif // #if 0 #endif /* WIN32 */ \ No newline at end of file diff --git a/src/xrCore/stream_reader.cpp b/src/xrCore/stream_reader.cpp index 05509f2dbee..72ef695da9c 100644 --- a/src/xrCore/stream_reader.cpp +++ b/src/xrCore/stream_reader.cpp @@ -130,12 +130,12 @@ void CStreamReader::r_stringZ(shared_str& dest) } else if (*end_str == 0) { - ++end_str; // copying with ending zero + ++end_str; // copying with ending zero break; } ++end_str; } - if (!dest_str) // first iteration + if (!dest_str) // first iteration dest_str = static_cast(_alloca(4096)); u32 current_chunk_size = static_cast(end_ptr - m_current_pointer); diff --git a/src/xrCore/stream_reader_inline.h b/src/xrCore/stream_reader_inline.h index 8dee6f49ca6..9a8c679a95d 100644 --- a/src/xrCore/stream_reader_inline.h +++ b/src/xrCore/stream_reader_inline.h @@ -65,4 +65,4 @@ IC void CStreamReader::close() xr_delete(self); } -#endif // STREAM_READER_INLINE_H \ No newline at end of file +#endif // STREAM_READER_INLINE_H \ No newline at end of file diff --git a/src/xrCore/string_concatenations.cpp b/src/xrCore/string_concatenations.cpp index 4faea0b9a5f..e82a82ea9db 100644 --- a/src/xrCore/string_concatenations.cpp +++ b/src/xrCore/string_concatenations.cpp @@ -44,12 +44,12 @@ static inline void process(LPSTR& i, LPCSTR e, u32 const index, LPCSTR (&strings #ifndef MASTER_GOLD process(index, count, strings); -#else // #ifndef MASTER_GOLD +#else // #ifndef MASTER_GOLD --i; -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } -} // namespace strconcat_error +} // namespace strconcat_error int stack_overflow_exception_filter(int exception_code) { @@ -99,11 +99,11 @@ void string_tupples::error_process() const strconcat_error::process(overrun_string_index, m_count, strings); } -} // namespace detail +} // namespace detail -} // namespace core +} // namespace core -} // namespace xray +} // namespace xray using namespace xray::core::detail; diff --git a/src/xrCore/string_concatenations.h b/src/xrCore/string_concatenations.h index 5732366504b..21da5d999d3 100644 --- a/src/xrCore/string_concatenations.h +++ b/src/xrCore/string_concatenations.h @@ -11,7 +11,7 @@ LPSTR XRCORE_API strconcat( LPSTR XRCORE_API strconcat(int dest_sz, char* dest, const char* S1, const char* S2, const char* S3, const char* S4, const char* S5, const char* S6); -#else // _EDITOR +#else // _EDITOR // obsolete: should be deleted as soon borland work correctly with new strconcats IC char* strconcat(int dest_sz, char* dest, const char* S1, const char* S2) { @@ -68,7 +68,7 @@ IC char* strconcat(int dest_sz, char* dest, const char* S1, const char* S2, cons STRCONCAT_tupples_unique_identifier.concat(dest); \ } while (0) -#else //#ifdef STRCONCAT_STACKOVERFLOW_CHECK +#else //#ifdef STRCONCAT_STACKOVERFLOW_CHECK #define STRCONCAT(dest, ...) \ do \ @@ -78,9 +78,9 @@ IC char* strconcat(int dest_sz, char* dest, const char* S1, const char* S2, cons STRCONCAT_tupples_unique_identifier.concat(dest); \ } while (0) -#endif //#ifdef STRCONCAT_STACKOVERFLOW_CHECK +#endif //#ifdef STRCONCAT_STACKOVERFLOW_CHECK -#endif //_EDITOR +#endif //_EDITOR #include "string_concatenations_inline.h" -#endif // #ifndef STRING_CONCATENATIONS_H \ No newline at end of file +#endif // #ifndef STRING_CONCATENATIONS_H \ No newline at end of file diff --git a/src/xrCore/string_concatenations_inline.h b/src/xrCore/string_concatenations_inline.h index 27347b15479..4ca79b6dc80 100644 --- a/src/xrCore/string_concatenations_inline.h +++ b/src/xrCore/string_concatenations_inline.h @@ -120,7 +120,7 @@ class XRCORE_API string_tupples VERIFY(cstr); self.m_strings[index] = std::make_pair(cstr, length(p)); } - }; // struct helper + }; // struct helper private: typedef std::pair StringPair; @@ -132,8 +132,8 @@ class XRCORE_API string_tupples void XRCORE_API check_stack_overflow(u32 stack_increment); -} // namespace detail +} // namespace detail -} // namespace core +} // namespace core -} // namespace xray +} // namespace xray diff --git a/src/xrCore/vector.h b/src/xrCore/vector.h index e54a0333847..fe512ed23f9 100644 --- a/src/xrCore/vector.h +++ b/src/xrCore/vector.h @@ -25,7 +25,7 @@ const float EPS = 0.0000100f; const float EPS_L = 0.0010000f; #undef M_SQRT1_2 -const float M_SQRT1_2 = 0.7071067811865475244008443621048f; // 490; +const float M_SQRT1_2 = 0.7071067811865475244008443621048f; // 490; const float M_PI = 3.1415926535897932384626433832795f; const float PI = 3.1415926535897932384626433832795f; diff --git a/src/xrCore/xrCore.cpp b/src/xrCore/xrCore.cpp index 5c8786247df..657ba3e70ea 100644 --- a/src/xrCore/xrCore.cpp +++ b/src/xrCore/xrCore.cpp @@ -13,7 +13,7 @@ #ifdef DEBUG #include -#endif // DEBUG +#endif // DEBUG XRCORE_API xrCore Core; @@ -91,10 +91,10 @@ void xrCore::_initialize(LPCSTR _ApplicationName, LogCallback cb, BOOL init_fs, flags |= CLocatorAPI::flCacheFiles; else flags &= ~CLocatorAPI::flCacheFiles; -#endif // DEBUG -#ifdef _EDITOR // for EDITORS - no cache +#endif // DEBUG +#ifdef _EDITOR // for EDITORS - no cache flags &= ~CLocatorAPI::flCacheFiles; -#endif // _EDITOR +#endif // _EDITOR flags |= CLocatorAPI::flScanAppRoot; #ifndef _EDITOR @@ -110,7 +110,7 @@ void xrCore::_initialize(LPCSTR _ApplicationName, LogCallback cb, BOOL init_fs, #ifndef _EDITOR Msg("Process heap 0x%08x", GetProcessHeap()); #endif -#endif // DEBUG +#endif // DEBUG } SetLogCB(cb); init_counter++; @@ -197,7 +197,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD ul_reason_for_call, LPVOID lpvRese case DLL_PROCESS_DETACH: #ifdef USE_MEMORY_MONITOR memory_monitor::flush_each_time(true); -#endif // USE_MEMORY_MONITOR +#endif // USE_MEMORY_MONITOR break; } return TRUE; diff --git a/src/xrCore/xrCore.h b/src/xrCore/xrCore.h index c098b1048b8..6399da36159 100644 --- a/src/xrCore/xrCore.h +++ b/src/xrCore/xrCore.h @@ -5,7 +5,7 @@ #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS #ifndef DEBUG #define MASTER_GOLD -#endif // DEBUG +#endif // DEBUG //#define BENCHMARK_BUILD @@ -20,7 +20,7 @@ #define BENCH_SEC_SIGN , void* pBenchScrampleVoid = 0 #define BENCH_SEC_SCRAMBLEMEMBER1 float m_fSrambleMember1; #define BENCH_SEC_SCRAMBLEMEMBER2 float m_fSrambleMember2; -#else // BENCHMARK_BUILD +#else // BENCHMARK_BUILD #define BENCH_SEC_CALLCONV #define BENCH_SEC_SCRAMBLEVTBL1 #define BENCH_SEC_SCRAMBLEVTBL2 @@ -28,7 +28,7 @@ #define BENCH_SEC_SIGN #define BENCH_SEC_SCRAMBLEMEMBER1 #define BENCH_SEC_SCRAMBLEMEMBER2 -#endif // BENCHMARK_BUILD +#endif // BENCHMARK_BUILD #if !defined(_CPPUNWIND) #error Please enable exceptions... @@ -70,16 +70,16 @@ #include // Warnings -#pragma warning(disable : 4251) // object needs DLL interface -#pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union -#pragma warning(disable : 4100) // unreferenced formal parameter -#pragma warning(disable : 4127) // conditional expression is constant +#pragma warning(disable : 4251) // object needs DLL interface +#pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union +#pragma warning(disable : 4100) // unreferenced formal parameter +#pragma warning(disable : 4127) // conditional expression is constant //#pragma warning (disable : 4530 ) // C++ exception handler used, but unwind semantics are not enabled #pragma warning(disable : 4345) -#pragma warning(disable : 4714) // __forceinline not inlined +#pragma warning(disable : 4714) // __forceinline not inlined #ifndef DEBUG -#pragma warning(disable : 4189) // local variable is initialized but not refenced -#endif // frequently in release code due to large amount of VERIFY +#pragma warning(disable : 4189) // local variable is initialized but not refenced +#endif // frequently in release code due to large amount of VERIFY #ifdef _M_AMD64 #pragma warning(disable : 4512) @@ -103,7 +103,7 @@ #include #pragma warning(pop) -#pragma warning(disable : 4100) // unreferenced formal parameter +#pragma warning(disable : 4100) // unreferenced formal parameter // Our headers #ifdef XRCORE_EXPORTS diff --git a/src/xrCore/xrCore.rc b/src/xrCore/xrCore.rc index 546c70eff24..b1dac7df0dc 100644 --- a/src/xrCore/xrCore.rc +++ b/src/xrCore/xrCore.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #pragma code_page(1251) -#endif //_WIN32 +#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -46,9 +46,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_STOP, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 317 TOPMARGIN, 7 BOTTOMMARGIN, 117 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // Neutral resources +#endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// @@ -59,7 +59,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 +#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -77,9 +77,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 3 TEXTINCLUDE BEGIN "\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -89,4 +89,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/xrCore/xrDebug.cpp b/src/xrCore/xrDebug.cpp index 50648e12fb9..db27c08e90a 100644 --- a/src/xrCore/xrDebug.cpp +++ b/src/xrCore/xrDebug.cpp @@ -5,7 +5,7 @@ #include "os_clipboard.h" #include "xrDebug.h" #pragma warning(push) -#pragma warning(disable : 4091) // 'typedef ': ignored on left of '' when no variable is declared +#pragma warning(disable : 4091) // 'typedef ': ignored on left of '' when no variable is declared #include "Debug/MiniDump.h" #include "Debug/StackTrace.h" #pragma warning(pop) @@ -34,9 +34,9 @@ static BOOL bException = FALSE; #pragma comment(lib, "BugTrap.lib") #endif -#include // ReportFault -#include // for _set_new_mode -#include // for signals +#include // ReportFault +#include // for _set_new_mode +#include // for signals #pragma comment(lib, "FaultRep.lib") #ifdef DEBUG @@ -152,19 +152,19 @@ void xrDebug::GatherInfo(char* assertionInfo, const ErrorLocation& loc, const ch #ifdef USE_MEMORY_MONITOR memory_monitor::flush_each_time(true); memory_monitor::flush_each_time(false); -#endif // USE_MEMORY_MONITOR +#endif // USE_MEMORY_MONITOR if (IsDebuggerPresent() || !strstr(GetCommandLine(), "-no_call_stack_assert")) return; if (shared_str_initialized) Log("stack trace:\n"); #ifdef USE_OWN_ERROR_MESSAGE_WINDOW buffer += sprintf(buffer, "stack trace:\n\n"); -#endif // USE_OWN_ERROR_MESSAGE_WINDOW +#endif // USE_OWN_ERROR_MESSAGE_WINDOW BuildStackTrace(StackTrace.Frames, StackTrace.Capacity, StackTrace.LineCapacity); for (size_t i = 2; i < StackTrace.Count; i++) { if (shared_str_initialized) Log(StackTrace[i]); #ifdef USE_OWN_ERROR_MESSAGE_WINDOW buffer += sprintf(buffer, "%s\n", StackTrace[i]); -#endif // USE_OWN_ERROR_MESSAGE_WINDOW +#endif // USE_OWN_ERROR_MESSAGE_WINDOW } if (shared_str_initialized) FlushLog(); os_clipboard::copy_to_clipboard(assertionInfo); @@ -231,7 +231,7 @@ void xrDebug::Fail(bool& ignoreAlways, const ErrorLocation& loc, const char* exp break; default: DEBUG_BREAK; } -#else // !USE_OWN_ERROR_MESSAGE_WINDOW +#else // !USE_OWN_ERROR_MESSAGE_WINDOW #ifdef USE_BUG_TRAP BT_SetUserMessage(assertionInfo); #endif @@ -334,15 +334,15 @@ void xrDebug::SetupExceptionHandler(const bool& dedicated) BT_SetReportFormat(BTRF_TEXT); BT_SetFlags(BTF_DETAILEDMODE | BTF_ATTACHREPORT); #ifdef MASTER_GOLD -#ifdef _EDITOR // MASTER_GOLD && EDITOR +#ifdef _EDITOR // MASTER_GOLD && EDITOR auto minidumpFlags = !dedicated ? MiniDumpNoDump : MiniDumpWithDataSegs; -#else // MASTER_GOLD && !EDITOR +#else // MASTER_GOLD && !EDITOR auto minidumpFlags = !dedicated ? MiniDumpNoDump : MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory; #endif #else -#ifdef EDITOR // !MASTER_GOLD && EDITOR +#ifdef EDITOR // !MASTER_GOLD && EDITOR auto minidumpFlags = MiniDumpWithDataSegs; -#else // !MASTER_GOLD && !EDITOR +#else // !MASTER_GOLD && !EDITOR auto minidumpFlags = MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory; #endif #endif @@ -350,7 +350,7 @@ void xrDebug::SetupExceptionHandler(const bool& dedicated) // XXX nitrocaster: use some other email? BT_SetSupportEMail("cop-crash-report@stalker-game.com"); } -#endif // USE_BUG_TRAP +#endif // USE_BUG_TRAP #ifdef USE_OWN_MINI_DUMP void xrDebug::SaveMiniDump(EXCEPTION_POINTERS* exPtrs) @@ -446,7 +446,7 @@ void _terminate() MessageBox(GetTopWindow(NULL), assertionInfo, "Fatal Error", MB_OK | MB_ICONERROR | MB_SYSTEMMODAL); exit(-1); } -#endif // USE_BUG_TRAP +#endif // USE_BUG_TRAP static void handler_base(const char* reason) { @@ -530,7 +530,7 @@ void xrDebug::OnThreadSpawn() _set_new_mode(1); _set_new_handler(&out_of_memory_handler); _set_purecall_handler(&pure_call_handler); -#if 0 // should be if we use exceptions +#if 0 // should be if we use exceptions std::set_unexpected(_terminate); #endif } diff --git a/src/xrCore/xrDebug_macros.h b/src/xrCore/xrDebug_macros.h index 6f588ffb0a0..0437ea4fe10 100644 --- a/src/xrCore/xrDebug_macros.h +++ b/src/xrCore/xrDebug_macros.h @@ -98,7 +98,7 @@ GLenum err = glGetError(); \ if (!ignoreAlways && err != GL_NO_ERROR) xrDebug::Fail(ignoreAlways, DEBUG_INFO, #expr, (long)err); \ } while (false) -#else // DEBUG +#else // DEBUG #ifdef __BORLANDC__ #define NODEFAULT #else @@ -122,7 +122,7 @@ } while (false) #define CHK_DX(expr) expr #define CHK_GL(expr) expr -#endif // DEBUG +#endif // DEBUG //--------------------------------------------------------------------------------------------- // FIXMEs / TODOs / NOTE macros //--------------------------------------------------------------------------------------------- @@ -158,4 +158,4 @@ struct CompileTimeError CompileTimeError<((expr) != 0)> ERROR_##msg; \ (void)ERROR_##msg; \ } -#endif // xrDebug_macrosH \ No newline at end of file +#endif // xrDebug_macrosH \ No newline at end of file diff --git a/src/xrCore/xrMemory.cpp b/src/xrCore/xrMemory.cpp index eebf063c17b..178eb4a2275 100644 --- a/src/xrCore/xrMemory.cpp +++ b/src/xrCore/xrMemory.cpp @@ -25,32 +25,32 @@ XRCORE_API void dump_phase() xr_sprintf(temp, sizeof(temp), "x:\\$phase$%d.dump", ++phase_counter); Memory.mem_statistic(temp); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER xrMemory::xrMemory() #ifdef DEBUG_MEMORY_MANAGER #ifdef CONFIG_PROFILE_LOCKS : debug_cs(MUTEX_PROFILE_ID(xrMemory)) -#endif // CONFIG_PROFILE_LOCKS -#endif // DEBUG_MEMORY_MANAGER +#endif // CONFIG_PROFILE_LOCKS +#endif // DEBUG_MEMORY_MANAGER { #ifdef DEBUG_MEMORY_MANAGER debug_mode = FALSE; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER } #ifdef DEBUG_MEMORY_MANAGER BOOL g_bMEMO = FALSE; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER void xrMemory::_initialize(BOOL bDebug) { #ifdef DEBUG_MEMORY_MANAGER debug_mode = bDebug; debug_info_update = 0; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER stat_calls = 0; stat_counter = 0; @@ -65,16 +65,16 @@ void xrMemory::_initialize(BOOL bDebug) element += mem_pools_ebase; } } -#endif // M_BORLAND +#endif // M_BORLAND #ifdef DEBUG_MEMORY_MANAGER if (0 == strstr(Core.Params, "-memo")) mem_initialized = TRUE; else g_bMEMO = TRUE; -#else // DEBUG_MEMORY_MANAGER +#else // DEBUG_MEMORY_MANAGER mem_initialized = TRUE; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER // DUMP_PHASE; g_pStringContainer = new str_container(); @@ -87,7 +87,7 @@ void xrMemory::_initialize(BOOL bDebug) #ifdef DEBUG_MEMORY_MANAGER extern void dbg_dump_leaks(); extern void dbg_dump_str_leaks(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER void xrMemory::_destroy() { @@ -95,11 +95,11 @@ void xrMemory::_destroy() mem_alloc_gather_stats(false); mem_alloc_show_stats(); mem_alloc_clear_stats(); -#endif // DEBUG +#endif // DEBUG #ifdef DEBUG_MEMORY_MANAGER if (debug_mode) dbg_dump_str_leaks(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER xr_delete(g_pSharedMemoryContainer); xr_delete(g_pStringContainer); @@ -107,13 +107,13 @@ void xrMemory::_destroy() #ifndef M_BORLAND #ifdef DEBUG_MEMORY_MANAGER if (debug_mode) dbg_dump_leaks(); -#endif // DEBUG_MEMORY_MANAGER -#endif // M_BORLAND +#endif // DEBUG_MEMORY_MANAGER +#endif // M_BORLAND mem_initialized = FALSE; #ifdef DEBUG_MEMORY_MANAGER debug_mode = FALSE; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER } void xrMemory::mem_compact() @@ -246,7 +246,7 @@ void xrMemory::mem_statistic(LPCSTR fn) } */ } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER // xr_strdup char* xr_strdup(const char* string) @@ -257,7 +257,7 @@ char* xr_strdup(const char* string) #ifdef DEBUG_MEMORY_NAME , "strdup" -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME ); CopyMemory(memory, string, len); return memory; diff --git a/src/xrCore/xrMemory.h b/src/xrCore/xrMemory.h index f14854933b2..8f1708abc53 100644 --- a/src/xrCore/xrMemory.h +++ b/src/xrCore/xrMemory.h @@ -6,31 +6,31 @@ #ifdef USE_MEMORY_MONITOR #define DEBUG_MEMORY_NAME -#endif // USE_MEMORY_MONITOR +#endif // USE_MEMORY_MONITOR #ifndef M_BORLAND -#if 0 // def DEBUG +#if 0 // def DEBUG #define DEBUG_MEMORY_MANAGER -#endif // DEBUG -#endif // M_BORLAND +#endif // DEBUG +#endif // M_BORLAND #ifdef DEBUG_MEMORY_MANAGER XRCORE_API extern BOOL g_bMEMO; #ifndef DEBUG_MEMORY_NAME #define DEBUG_MEMORY_NAME -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME extern XRCORE_API void dump_phase(); #define DUMP_PHASE \ do \ { \ dump_phase(); \ } while (0) -#else // DEBUG_MEMORY_MANAGER +#else // DEBUG_MEMORY_MANAGER #define DUMP_PHASE \ do \ { \ } while (0) -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER #include "xrMemory_POOL.h" #include "xrMemory_pure.h" @@ -58,7 +58,7 @@ class XRCORE_API xrMemory u32 debug_info_update; u32 stat_strcmp; u32 stat_strdock; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER u32 stat_calls; s32 stat_counter; @@ -76,10 +76,10 @@ class XRCORE_API xrMemory void mem_statistic(LPCSTR fn); void* mem_alloc(size_t size, const char* _name); void* mem_realloc(void* p, size_t size, const char* _name); -#else // DEBUG_MEMORY_NAME +#else // DEBUG_MEMORY_NAME void* mem_alloc(size_t size); void* mem_realloc(void* p, size_t size); -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME void mem_free(void* p); }; @@ -89,7 +89,7 @@ extern XRCORE_API xrMemory Memory; #undef CopyMemory #undef FillMemory #define ZeroMemory(a, b) memset(a, 0, b) -#define CopyMemory(a, b, c) memcpy(a, b, c) //. CopyMemory(a,b,c) +#define CopyMemory(a, b, c) memcpy(a, b, c) //. CopyMemory(a,b,c) #define FillMemory(a, b, c) memset(a, c, b) // delete @@ -124,7 +124,7 @@ IC void* xr_realloc(void* P, size_t size) { return Memory.mem_realloc(P, size, "xr_realloc"); } -#else // DEBUG_MEMORY_NAME +#else // DEBUG_MEMORY_NAME template IC T* xr_alloc(u32 count) { @@ -146,7 +146,7 @@ IC void* xr_realloc(void* P, size_t size) { return Memory.mem_realloc(P, size); } -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME XRCORE_API char* xr_strdup(const char* string); @@ -170,7 +170,7 @@ IC void operator delete[](void* p) xr_free(p); } #endif -#else // DEBUG_MEMORY_NAME +#else // DEBUG_MEMORY_NAME #if !(defined(__BORLANDC__) || defined(NO_XRNEW)) IC void* operator new(size_t size) { @@ -189,7 +189,7 @@ IC void operator delete[](void* p) xr_free(p); } #endif -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER // POOL-ing const u32 mem_pools_count = 54; @@ -201,4 +201,4 @@ extern BOOL mem_initialized; XRCORE_API void vminfo(size_t* _free, size_t* reserved, size_t* committed); XRCORE_API void log_vminfo(); -#endif // xrMemoryH \ No newline at end of file +#endif // xrMemoryH \ No newline at end of file diff --git a/src/xrCore/xrMemory_POOL.h b/src/xrCore/xrMemory_POOL.h index cb7e9fd1153..4f46b2bc7a9 100644 --- a/src/xrCore/xrMemory_POOL.h +++ b/src/xrCore/xrMemory_POOL.h @@ -8,14 +8,14 @@ class MEMPOOL { #ifdef DEBUG_MEMORY_MANAGER friend class xrMemory; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER private: Lock cs; - u32 s_sector; // large-memory sector size - u32 s_element; // element size, for example 32 - u32 s_count; // element count = [s_sector/s_element] - u32 s_offset; // header size - u32 block_count; // block count + u32 s_sector; // large-memory sector size + u32 s_element; // element size, for example 32 + u32 s_count; // element count = [s_sector/s_element] + u32 s_offset; // header size + u32 block_count; // block count u8* list; private: @@ -27,7 +27,7 @@ class MEMPOOL #ifdef CONFIG_PROFILE_LOCKS ICF MEMPOOL() : cs(MUTEX_PROFILE_ID(memory_pool)) {} -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ICF u32 get_block_count() { return block_count; } ICF u32 get_element() { return s_element; } diff --git a/src/xrCore/xrMemory_debug.cpp b/src/xrCore/xrMemory_debug.cpp index cb164eed781..47fc6c23f42 100644 --- a/src/xrCore/xrMemory_debug.cpp +++ b/src/xrCore/xrMemory_debug.cpp @@ -12,7 +12,7 @@ void xrMemory::dbg_check() { } -#else // DEBUG_MEMORY_MANAGER +#else // DEBUG_MEMORY_MANAGER #if 0 #define DEBUG_MEMORY_LEAK #define MEMORY_LEAK_DESCRIPTION "C++ NEW" @@ -183,4 +183,4 @@ XRCORE_API void dbg_dump_str_leaks() { g_pStringContainer->dump(); } -#endif // DEBUG_MEMORY_MANAGER \ No newline at end of file +#endif // DEBUG_MEMORY_MANAGER \ No newline at end of file diff --git a/src/xrCore/xrMemory_subst_msvc.cpp b/src/xrCore/xrMemory_subst_msvc.cpp index 83a009ad36b..e6a318ccc06 100644 --- a/src/xrCore/xrMemory_subst_msvc.cpp +++ b/src/xrCore/xrMemory_subst_msvc.cpp @@ -226,4 +226,4 @@ void* xrMemory::mem_realloc(void* P, size_t size) return _ptr; } -#endif // __BORLANDC__ +#endif // __BORLANDC__ diff --git a/src/xrCore/xrMemory_subst_msvc.h b/src/xrCore/xrMemory_subst_msvc.h index f1d8c716ce8..ef50c1fcc6f 100644 --- a/src/xrCore/xrMemory_subst_msvc.h +++ b/src/xrCore/xrMemory_subst_msvc.h @@ -41,4 +41,4 @@ void XRCORE_API mem_alloc_gather_stats(const bool& value); void XRCORE_API mem_alloc_gather_stats_frequency(const float& value); void XRCORE_API mem_alloc_show_stats(); void XRCORE_API mem_alloc_clear_stats(); -#endif // DEBUG_MEMORY_MANAGER \ No newline at end of file +#endif // DEBUG_MEMORY_MANAGER \ No newline at end of file diff --git a/src/xrCore/xr_ini.h b/src/xrCore/xr_ini.h index 0d3da420436..daa6a306244 100644 --- a/src/xrCore/xr_ini.h +++ b/src/xrCore/xr_ini.h @@ -101,10 +101,10 @@ class XRCORE_API CInifile Root const& sections() const { return DATA; } CLASS_ID r_clsid(LPCSTR S, LPCSTR L) const; CLASS_ID r_clsid(const shared_str& S, LPCSTR L) const { return r_clsid(*S, L); } - LPCSTR r_string(LPCSTR S, LPCSTR L) const; // Left quotes in place - LPCSTR r_string(const shared_str& S, LPCSTR L) const { return r_string(*S, L); } // Left quotes in place - shared_str r_string_wb(LPCSTR S, LPCSTR L) const; // Remove quotes - shared_str r_string_wb(const shared_str& S, LPCSTR L) const { return r_string_wb(*S, L); } // Remove quotes + LPCSTR r_string(LPCSTR S, LPCSTR L) const; // Left quotes in place + LPCSTR r_string(const shared_str& S, LPCSTR L) const { return r_string(*S, L); } // Left quotes in place + shared_str r_string_wb(LPCSTR S, LPCSTR L) const; // Remove quotes + shared_str r_string_wb(const shared_str& S, LPCSTR L) const { return r_string_wb(*S, L); } // Remove quotes u8 r_u8(LPCSTR S, LPCSTR L) const; u8 r_u8(const shared_str& S, LPCSTR L) const { return r_u8(*S, L); } u16 r_u16(LPCSTR S, LPCSTR L) const; @@ -170,4 +170,4 @@ class XRCORE_API CInifile extern XRCORE_API CInifile const* pSettings; extern XRCORE_API CInifile const* pSettingsAuth; -#endif //__XR_INI_H__ +#endif //__XR_INI_H__ diff --git a/src/xrCore/xr_resource.h b/src/xrCore/xr_resource.h index 014a1624f4f..08d590786d6 100644 --- a/src/xrCore/xr_resource.h +++ b/src/xrCore/xr_resource.h @@ -200,4 +200,4 @@ resptr_core dynamic_pointer_cast(resptr_core const& p) return dynamic_cast(p.get()); } -#endif // xr_resourceH +#endif // xr_resourceH diff --git a/src/xrCore/xrsharedmem.cpp b/src/xrCore/xrsharedmem.cpp index 446966ff90a..0d599128bad 100644 --- a/src/xrCore/xrsharedmem.cpp +++ b/src/xrCore/xrsharedmem.cpp @@ -41,7 +41,7 @@ smem_value* smem_container::dock(u32 dwCRC, u32 dwLength, void* ptr) #ifdef DEBUG_MEMORY_NAME , "storage: smem" -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME ); result->dwReference = 0; result->dwCRC = dwCRC; diff --git a/src/xrCore/xrsharedmem.h b/src/xrCore/xrsharedmem.h index b4308555f52..fa06b7fc2d2 100644 --- a/src/xrCore/xrsharedmem.h +++ b/src/xrCore/xrsharedmem.h @@ -55,7 +55,7 @@ class XRCORE_API smem_container u32 stat_economy(); #ifdef CONFIG_PROFILE_LOCKS smem_container() : cs(MUTEX_PROFILE_ID(smem_container)) {} -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ~smem_container(); }; XRCORE_API extern smem_container* g_pSharedMemoryContainer; diff --git a/src/xrCore/xrstring.cpp b/src/xrCore/xrstring.cpp index 7bf1720f5db..e7432b01b98 100644 --- a/src/xrCore/xrstring.cpp +++ b/src/xrCore/xrstring.cpp @@ -147,7 +147,7 @@ str_value* str_container::dock(str_c value) #ifdef DEBUG_MEMORY_MANAGER Memory.stat_strdock++; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER str_value* result = 0; @@ -168,20 +168,20 @@ str_value* str_container::dock(str_c value) #ifdef DEBUG bool is_leaked_string = !xr_strcmp(value, "enter leaked string here"); -#endif // DEBUG +#endif // DEBUG // it may be the case, string is not found or has "non-exact" match if (0 == result #ifdef DEBUG || is_leaked_string -#endif // DEBUG +#endif // DEBUG ) { result = (str_value*)Memory.mem_alloc(sizeof(str_value) + s_len_with_zero #ifdef DEBUG_MEMORY_NAME , "storage: sstring" -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME ); #ifdef DEBUG @@ -190,7 +190,7 @@ str_value* str_container::dock(str_c value) ++num_leaked_string; Msg("leaked_string: %d 0x%08x", num_leaked_string, result); } -#endif // DEBUG +#endif // DEBUG result->dwReference = 0; result->dwLength = sv->dwLength; @@ -285,7 +285,7 @@ str_value* str_container::dock(str_c value) #ifdef DEBUG_MEMORY_MANAGER Memory.stat_strdock++; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER str_value* result = 0; @@ -303,7 +303,7 @@ str_value* str_container::dock(str_c value) sv->next = NULL; // search - str_container_impl::cdb::iterator I = impl->container.find(sv); // only integer compares :) + str_container_impl::cdb::iterator I = impl->container.find(sv); // only integer compares :) if (I != impl->container.end()) { // something found - verify, it is exactly our string str_container_impl::cdb::iterator save = I; @@ -312,7 +312,7 @@ str_value* str_container::dock(str_c value) str_value* V = (*I); if (V->dwLength != sv->dwLength) continue; if (0 != memcmp(V->value, value, s_len)) continue; - result = V; // found + result = V; // found break; } } @@ -328,7 +328,7 @@ str_value* str_container::dock(str_c value) #ifdef DEBUG_MEMORY_NAME , "storage: sstring" -#endif // DEBUG_MEMORY_NAME +#endif // DEBUG_MEMORY_NAME ); static int num11 = 0; diff --git a/src/xrCore/xrstring.h b/src/xrCore/xrstring.h index 72dab9cc223..acfc59bbe3b 100644 --- a/src/xrCore/xrstring.h +++ b/src/xrCore/xrstring.h @@ -53,7 +53,7 @@ class XRCORE_API str_container u32 stat_economy(); #ifdef CONFIG_PROFILE_LOCKS str_container() : cs(MUTEX_PROFILE_ID(str_container)) {} -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS }; XRCORE_API extern str_container* g_pStringContainer; diff --git a/src/xrD3D9-Null/IDirect3DDevice9_Caps.cpp b/src/xrD3D9-Null/IDirect3DDevice9_Caps.cpp index b4b1ca66598..689afac020c 100644 --- a/src/xrD3D9-Null/IDirect3DDevice9_Caps.cpp +++ b/src/xrD3D9-Null/IDirect3DDevice9_Caps.cpp @@ -16,13 +16,13 @@ HRESULT xrIDirect3DDevice9::GetDeviceCaps(D3DCAPS9* pCaps) pCaps->AdapterOrdinal = 0; /* Caps from DX7 Draw */ - pCaps->Caps = 0; // D3DCAPS_READ_SCANLINE; + pCaps->Caps = 0; // D3DCAPS_READ_SCANLINE; pCaps->Caps2 = D3DCAPS2_CANAUTOGENMIPMAP | D3DCAPS2_CANCALIBRATEGAMMA | D3DCAPS2_CANMANAGERESOURCE | - D3DCAPS2_DYNAMICTEXTURES | D3DCAPS2_FULLSCREENGAMMA; // D3DCAPS2_CANRENDERWINDOWED ; + D3DCAPS2_DYNAMICTEXTURES | D3DCAPS2_FULLSCREENGAMMA; // D3DCAPS2_CANRENDERWINDOWED ; pCaps->Caps3 = D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD | D3DCAPS3_COPY_TO_VIDMEM | D3DCAPS3_COPY_TO_SYSTEMMEM | D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION; - pCaps->PresentationIntervals = D3DPRESENT_INTERVAL_IMMEDIATE; // see wglSwapIntervalEXT + pCaps->PresentationIntervals = D3DPRESENT_INTERVAL_IMMEDIATE; // see wglSwapIntervalEXT /* Cursor Caps */ pCaps->CursorCaps = D3DCURSORCAPS_COLOR; diff --git a/src/xrD3D9-Null/stdafx.h b/src/xrD3D9-Null/stdafx.h index 2af063b263a..70afcde198a 100644 --- a/src/xrD3D9-Null/stdafx.h +++ b/src/xrD3D9-Null/stdafx.h @@ -8,7 +8,7 @@ #define D3D_DEBUG_INFO #endif -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include #include diff --git a/src/xrD3D9-Null/xrD3D9-Null_OutProc.h b/src/xrD3D9-Null/xrD3D9-Null_OutProc.h index 88a8255def1..7d683a97e23 100644 --- a/src/xrD3D9-Null/xrD3D9-Null_OutProc.h +++ b/src/xrD3D9-Null/xrD3D9-Null_OutProc.h @@ -4,9 +4,9 @@ extern void LogOut_File(const char* format, ...); #ifdef _DEBUG #define APIDEBUG(str) \ LogOut("---------------------" #str \ - "-------------------------\n") //; LogOut_File("---------------------"#str"-------------------------\n") + "-------------------------\n") //; LogOut_File("---------------------"#str"-------------------------\n") #else -#define APIDEBUG(str) // LogOut_File("---------------------"#str"-------------------------\n") +#define APIDEBUG(str) // LogOut_File("---------------------"#str"-------------------------\n") #endif \ No newline at end of file diff --git a/src/xrEngine/CameraBase.h b/src/xrEngine/CameraBase.h index 4f4ebc903d8..11155a35d80 100644 --- a/src/xrEngine/CameraBase.h +++ b/src/xrEngine/CameraBase.h @@ -90,7 +90,7 @@ IC void tviewport_size(CRenderDeviceBase& D, float _viewport_near, const T& cam_ { h_h = _viewport_near * tan(deg2rad(cam_info.Fov()) / 2.f); VERIFY2(_valid(h_h), make_string("invalide viewporrt params fov: %f ", cam_info.Fov())); - float aspect = D.fASPECT; // cam_info.Aspect(); + float aspect = D.fASPECT; // cam_info.Aspect(); VERIFY(aspect > EPS); h_w = h_h / aspect; } @@ -101,4 +101,4 @@ IC void viewport_size(float _viewport_near, const T& cam_info, float& h_w, float tviewport_size(Device, _viewport_near, cam_info, h_w, h_h); } -#endif // !defined(AFX_CAMERABASE_H__B11F8AE1_1213_11D4_B4E3_4854E82A090D__INCLUDED_) +#endif // !defined(AFX_CAMERABASE_H__B11F8AE1_1213_11D4_B4E3_4854E82A090D__INCLUDED_) diff --git a/src/xrEngine/CameraManager.cpp b/src/xrEngine/CameraManager.cpp index 5d319b831db..b63726db4b1 100644 --- a/src/xrEngine/CameraManager.cpp +++ b/src/xrEngine/CameraManager.cpp @@ -167,10 +167,10 @@ void CCameraManager::Update(const Fvector& P, const Fvector& D, const Fvector& N { #ifdef DEBUG if (!Device.Paused()) { - VERIFY(dbg_upd_frame != Device.dwFrame); // already updated !!! + VERIFY(dbg_upd_frame != Device.dwFrame); // already updated !!! dbg_upd_frame = Device.dwFrame; } -#endif // DEBUG +#endif // DEBUG // camera if (flags & CCameraBase::flPositionRigid) m_cam_info.p.set(P); diff --git a/src/xrEngine/Device_Initialize.cpp b/src/xrEngine/Device_Initialize.cpp index 608bc7dced1..604bf04570d 100644 --- a/src/xrEngine/Device_Initialize.cpp +++ b/src/xrEngine/Device_Initialize.cpp @@ -29,7 +29,7 @@ void CRenderDevice::initialize_editor() m_hWnd = m_editor->view_handle(); VERIFY(m_hWnd != INVALID_HANDLE_VALUE); } -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR void CRenderDevice::Initialize() { diff --git a/src/xrEngine/Device_create.cpp b/src/xrEngine/Device_create.cpp index e7f5515b0b5..5c4dea9ea63 100644 --- a/src/xrEngine/Device_create.cpp +++ b/src/xrEngine/Device_create.cpp @@ -20,7 +20,7 @@ void CRenderDevice::_SetupStates() void CRenderDevice::Create() { - if (b_is_Ready) return; // prevent double call + if (b_is_Ready) return; // prevent double call Statistic = new CStats(); bool gpuSW = !!strstr(Core.Params, "-gpu_sw"); bool gpuNonPure = !!strstr(Core.Params, "-gpu_nopure"); diff --git a/src/xrEngine/Device_wndproc.cpp b/src/xrEngine/Device_wndproc.cpp index 5ed60590caa..26f7955b39d 100644 --- a/src/xrEngine/Device_wndproc.cpp +++ b/src/xrEngine/Device_wndproc.cpp @@ -12,14 +12,14 @@ bool CRenderDevice::on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara Device.b_is_Active = TRUE; break; } -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR OnWM_Activate(wParam, lParam); return (false); } case WM_SETCURSOR: { #ifdef INGAME_EDITOR if (editor()) break; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR result = 1; return (true); @@ -27,7 +27,7 @@ bool CRenderDevice::on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara case WM_SYSCOMMAND: { #ifdef INGAME_EDITOR if (editor()) break; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR // Prevent moving/sizing and power loss in fullscreen mode switch (wParam) @@ -42,12 +42,12 @@ bool CRenderDevice::on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara case WM_CLOSE: { #ifdef INGAME_EDITOR if (editor()) break; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR result = 0; return (true); } - case WM_HOTKEY: // prevent 'ding' sounds caused by Alt+key combinations + case WM_HOTKEY: // prevent 'ding' sounds caused by Alt+key combinations case WM_SYSCHAR: result = 0; return true; } diff --git a/src/xrEngine/Engine.cpp b/src/xrEngine/Engine.cpp index 919a21f878f..d952b62859b 100644 --- a/src/xrEngine/Engine.cpp +++ b/src/xrEngine/Engine.cpp @@ -35,6 +35,6 @@ void CEngine::Destroy() #ifdef DEBUG_MEMORY_MANAGER extern void dbg_dump_leaks_prepare(); if (Memory.debug_mode) dbg_dump_leaks_prepare(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER Engine.External.Destroy(); } diff --git a/src/xrEngine/Engine.h b/src/xrEngine/Engine.h index fee708fcbce..9f854840050 100644 --- a/src/xrEngine/Engine.h +++ b/src/xrEngine/Engine.h @@ -18,8 +18,8 @@ #else #define ENGINE_API #define DLL_API -#endif // !NO_ENGINE_API -#endif // !ENGINE_API +#endif // !NO_ENGINE_API +#endif // !ENGINE_API #include "engineAPI.h" #include "eventAPI.h" diff --git a/src/xrEngine/EngineAPI.cpp b/src/xrEngine/EngineAPI.cpp index 69f10857bf4..f8af11a9676 100644 --- a/src/xrEngine/EngineAPI.cpp +++ b/src/xrEngine/EngineAPI.cpp @@ -36,7 +36,7 @@ CEngineAPI::~CEngineAPI() } } -extern u32 renderer_value; // con cmd +extern u32 renderer_value; // con cmd ENGINE_API int g_current_renderer = 0; bool is_enough_address_space_available() @@ -89,7 +89,7 @@ void CEngineAPI::InitializeNotDedicated() g_current_renderer = 2; } } -#endif // DEDICATED_SERVER +#endif // DEDICATED_SERVER void CEngineAPI::Initialize(void) { @@ -99,14 +99,14 @@ void CEngineAPI::Initialize(void) #ifndef DEDICATED_SERVER InitializeNotDedicated(); -#endif // DEDICATED_SERVER +#endif // DEDICATED_SERVER if (0 == hRender) { // try to load R1 psDeviceFlags.set(rsR4, FALSE); psDeviceFlags.set(rsR3, FALSE); psDeviceFlags.set(rsR2, FALSE); - renderer_value = 0; // con cmd + renderer_value = 0; // con cmd hRender = XRay::LoadLibrary(r1_name); if (0 == hRender) R_CHK(GetLastError()); @@ -258,14 +258,14 @@ void CEngineAPI::CreateRendererList() #ifdef DEBUG Msg("Available render modes[%d]:", tmp.size()); -#endif // DEBUG +#endif // DEBUG for (u32 i = 0; i < tmp.size(); ++i) { vid_quality_token[i].id = i; vid_quality_token[i].name = tmp[i]; #ifdef DEBUG Msg("[%s]", tmp[i]); -#endif // DEBUG +#endif // DEBUG } /* @@ -327,5 +327,5 @@ Msg ("[%s]",_tmp[i]); #endif // DEBUG } */ -#endif //#ifndef DEDICATED_SERVER +#endif //#ifndef DEDICATED_SERVER } diff --git a/src/xrEngine/EngineAPI.h b/src/xrEngine/EngineAPI.h index 27084c3fbda..345965b39b9 100644 --- a/src/xrEngine/EngineAPI.h +++ b/src/xrEngine/EngineAPI.h @@ -67,7 +67,7 @@ class ENGINE_API CEngineAPI #ifndef DEDICATED_SERVER void InitializeNotDedicated(); -#endif // DEDICATED_SERVER +#endif // DEDICATED_SERVER void Destroy(); @@ -86,4 +86,4 @@ ENGINE_API bool is_enough_address_space_available(); a = NULL; \ } -#endif // !defined(AFX_ENGINEAPI_H__CF21372B_C8B8_4891_82FC_D872C84E1DD4__INCLUDED_) +#endif // !defined(AFX_ENGINEAPI_H__CF21372B_C8B8_4891_82FC_D872C84E1DD4__INCLUDED_) diff --git a/src/xrEngine/Environment.cpp b/src/xrEngine/Environment.cpp index 2e65f5f41ae..dcae5afe824 100644 --- a/src/xrEngine/Environment.cpp +++ b/src/xrEngine/Environment.cpp @@ -189,7 +189,7 @@ void CEnvironment::ChangeGameTime(float game_time) void CEnvironment::SetGameTime(float game_time, float time_factor) { #ifndef _EDITOR - if (m_paused) // BUG nitrocaster: g_pGameLevel may be null (game not started) -> crash + if (m_paused) // BUG nitrocaster: g_pGameLevel may be null (game not started) -> crash { g_pGameLevel->SetEnvironmentGameTimeFactor(iFloor(fGameTime * 1000.f), fTimeFactor); return; @@ -467,7 +467,7 @@ void CEnvironment::OnFrame() Log("Current[1]->sun_dir", Current[1]->sun_dir); } VERIFY2(CurrentEnv->sun_dir.y < 0, "Invalid sun direction settings in lerp"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD PerlinNoise1D->SetFrequency(wind_gust_factor * MAX_NOISE_FREQ); wind_strength_factor = clampr(PerlinNoise1D->GetContinious(Device.fTimeGlobal) + 0.5f, 0.f, 1.f); @@ -584,7 +584,7 @@ SThunderboltCollection* CEnvironment::thunderbolt_collection( NODEFAULT; #ifdef DEBUG return (0); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } CLensFlareDescriptor* CEnvironment::add_flare(xr_vector& collection, shared_str const& id) diff --git a/src/xrEngine/Environment.h b/src/xrEngine/Environment.h index 7ce36f49fcd..6929ba897e3 100644 --- a/src/xrEngine/Environment.h +++ b/src/xrEngine/Environment.h @@ -25,9 +25,9 @@ class CLensFlareDescriptor; #ifdef INGAME_EDITOR #define INGAME_EDITOR_VIRTUAL virtual -#else // #ifdef INGAME_EDITOR +#else // #ifdef INGAME_EDITOR #define INGAME_EDITOR_VIRTUAL -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR // t-defs class ENGINE_API CEnvModifier @@ -159,7 +159,7 @@ class ENGINE_API CEnvDescriptor float wind_direction; Fvector3 ambient; - Fvector4 hemi_color; // w = R2 correction + Fvector4 hemi_color; // w = R2 correction Fvector3 sun_color; Fvector3 sun_dir; float m_fSunShaftsIntensity; @@ -338,13 +338,13 @@ class ENGINE_API CEnvironment public: void ED_Reload(); float GetGameTime() { return fGameTime; } -#else // #ifdef _EDITOR +#else // #ifdef _EDITOR #ifdef INGAME_EDITOR float GetGameTime() { return fGameTime; } -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR bool m_paused; -#endif // #ifdef _EDITOR +#endif // #ifdef _EDITOR CInifile* m_ambients_config; CInifile* m_sound_channels_config; @@ -387,4 +387,4 @@ class ENGINE_API CEnvironment ENGINE_API extern Flags32 psEnvFlags; ENGINE_API extern float psVisDistance; -#endif // EnvironmentH \ No newline at end of file +#endif // EnvironmentH \ No newline at end of file diff --git a/src/xrEngine/Environment_misc.cpp b/src/xrEngine/Environment_misc.cpp index 5cc34d73807..16dd02b3aa2 100644 --- a/src/xrEngine/Environment_misc.cpp +++ b/src/xrEngine/Environment_misc.cpp @@ -33,7 +33,7 @@ float CEnvModifier::sum(CEnvModifier& M, Fvector3& view) float _dist_sq = view.distance_to_sqr(M.position); if (_dist_sq >= (M.radius * M.radius)) return 0; - float _att = 1 - _sqrt(_dist_sq) / M.radius; //[0..1]; + float _att = 1 - _sqrt(_dist_sq) / M.radius; //[0..1]; float _power = M.power * _att; if (M.use_flags.test(eViewDist)) { @@ -373,7 +373,7 @@ void CEnvDescriptorMixer::clear() void CEnvDescriptorMixer::lerp( CEnvironment*, CEnvDescriptor& A, CEnvDescriptor& B, float f, CEnvModifier& Mdf, float modifier_power) { - float modif_power = 1.f / (modifier_power + 1); // the environment itself + float modif_power = 1.f / (modifier_power + 1); // the environment itself float fi = 1 - f; m_pDescriptorMixer->lerp(&*A.m_pDescriptor, &*B.m_pDescriptor); @@ -670,7 +670,7 @@ void CEnvironment::load_weather_effects() env.back()->exec_time_loaded = DAY_LENGTH; } } -#endif // #if 0 +#endif // #if 0 // sorting weather envs EnvsMapIt _I = WeatherFXs.begin(); diff --git a/src/xrEngine/EventAPI.h b/src/xrEngine/EventAPI.h index 3666ffc36d3..42016f5ec69 100644 --- a/src/xrEngine/EventAPI.h +++ b/src/xrEngine/EventAPI.h @@ -29,7 +29,7 @@ class ENGINE_API CEventAPI public: #ifdef CONFIG_PROFILE_LOCKS CEventAPI() : CS(MUTEX_PROFILE_ID(CEventAPI)) {} -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS EVENT Create(const char* N); void Destroy(EVENT& E); diff --git a/src/xrEngine/FDemoPlay.h b/src/xrEngine/FDemoPlay.h index 0e4810fcd4f..48f7b4c6078 100644 --- a/src/xrEngine/FDemoPlay.h +++ b/src/xrEngine/FDemoPlay.h @@ -39,4 +39,4 @@ class ENGINE_API CDemoPlay : public CEffectorCam virtual ~CDemoPlay(); }; -#endif // !defined(AFX_FDEMOPLAY_H__9B07E6E0_FC3C_11D3_B4E3_4854E82A090D__INCLUDED_) +#endif // !defined(AFX_FDEMOPLAY_H__9B07E6E0_FC3C_11D3_B4E3_4854E82A090D__INCLUDED_) diff --git a/src/xrEngine/FDemoRecord.cpp b/src/xrEngine/FDemoRecord.cpp index 79dad3d59b2..8ca83d0f450 100644 --- a/src/xrEngine/FDemoRecord.cpp +++ b/src/xrEngine/FDemoRecord.cpp @@ -72,7 +72,7 @@ CDemoRecord::CDemoRecord(const char* name, float life_time) : CEffectorCam(cefDe file = FS.w_open(name); if (file) { g_position.set_position = false; - IR_Capture(); // capture input + IR_Capture(); // capture input m_Camera.invert(Device.mView); // parse yaw @@ -120,7 +120,7 @@ CDemoRecord::CDemoRecord(const char* name, float life_time) : CEffectorCam(cefDe CDemoRecord::~CDemoRecord() { if (file) { - IR_Release(); // release input + IR_Release(); // release input FS.w_close(file); } g_bDisableRedText = stored_red_text; @@ -409,7 +409,7 @@ void CDemoRecord::IR_OnKeyboardPress(int dik) fLifeTime = -1; } } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD if (dik == DIK_PAUSE) Device.Pause(!Device.Paused(), TRUE, TRUE, "demo_record"); } @@ -436,39 +436,39 @@ void CDemoRecord::IR_OnKeyboardHold(int dik) case DIK_NUMPAD1: case DIK_LEFT: vT_delta.x -= 1.0f; - break; // Slide Left + break; // Slide Left case DIK_D: case DIK_NUMPAD3: case DIK_RIGHT: vT_delta.x += 1.0f; - break; // Slide Right + break; // Slide Right case DIK_S: vT_delta.y -= 1.0f; - break; // Slide Down + break; // Slide Down case DIK_W: vT_delta.y += 1.0f; - break; // Slide Up + break; // Slide Up // rotate case DIK_NUMPAD2: vR_delta.x -= 1.0f; - break; // Pitch Down + break; // Pitch Down case DIK_NUMPAD8: vR_delta.x += 1.0f; - break; // Pitch Up + break; // Pitch Up case DIK_E: case DIK_NUMPAD6: vR_delta.y += 1.0f; - break; // Turn Left + break; // Turn Left case DIK_Q: case DIK_NUMPAD4: vR_delta.y -= 1.0f; - break; // Turn Right + break; // Turn Right case DIK_NUMPAD9: vR_delta.z -= 2.0f; - break; // Turn Right + break; // Turn Right case DIK_NUMPAD7: vR_delta.z += 2.0f; - break; // Turn Right + break; // Turn Right } update_whith_timescale(m_vT, vT_delta); @@ -484,10 +484,10 @@ void CDemoRecord::IR_OnMouseMove(int dx, int dy) Fvector vR_delta = Fvector().set(0, 0, 0); - float scale = .5f; // psMouseSens; + float scale = .5f; // psMouseSens; if (dx || dy) { - vR_delta.y += float(dx) * scale; // heading - vR_delta.x += ((psMouseInvert.test(1)) ? -1 : 1) * float(dy) * scale * (3.f / 4.f); // pitch + vR_delta.y += float(dx) * scale; // heading + vR_delta.x += ((psMouseInvert.test(1)) ? -1 : 1) * float(dy) * scale * (3.f / 4.f); // pitch } update_whith_timescale(m_vR, vR_delta); } @@ -503,10 +503,10 @@ void CDemoRecord::IR_OnMouseHold(int btn) { case 0: vT_delta.z += 1.0f; - break; // Move Backward + break; // Move Backward case 1: vT_delta.z -= 1.0f; - break; // Move Forward + break; // Move Forward } update_whith_timescale(m_vT, vT_delta); } diff --git a/src/xrEngine/FDemoRecord.h b/src/xrEngine/FDemoRecord.h index 4b6d818fd78..2d17aa24cd3 100644 --- a/src/xrEngine/FDemoRecord.h +++ b/src/xrEngine/FDemoRecord.h @@ -64,4 +64,4 @@ class ENGINE_API CDemoRecord : public CEffectorCam, public IInputReceiver, publi virtual void OnRender(); }; -#endif // !defined(AFX_FDEMORECORD_H__D7638760_FB61_11D3_B4E3_4854E82A090D__INCLUDED_) +#endif // !defined(AFX_FDEMORECORD_H__D7638760_FB61_11D3_B4E3_4854E82A090D__INCLUDED_) diff --git a/src/xrEngine/Feel_Touch.cpp b/src/xrEngine/Feel_Touch.cpp index bf1561d8744..af3fc54eefe 100644 --- a/src/xrEngine/Feel_Touch.cpp +++ b/src/xrEngine/Feel_Touch.cpp @@ -48,8 +48,8 @@ void Touch::feel_touch_update(Fvector& C, float R) for (xr_vector::iterator it = n_begin; it != n_end; it++) { IGameObject* O = *it; - if (O->getDestroy()) continue; // Don't touch candidates for destroy - if (!feel_touch_contact(O)) continue; // Actual contact + if (O->getDestroy()) continue; // Don't touch candidates for destroy + if (!feel_touch_contact(O)) continue; // Actual contact if (std::find(feel_touch.begin(), feel_touch.end(), O) == feel_touch.end()) { // check for deny @@ -74,7 +74,7 @@ void Touch::feel_touch_update(Fvector& C, float R) { IGameObject* O = feel_touch[d]; if (O->getDestroy() || !feel_touch_contact(O) || - (std::find(n_begin, n_end, O) == n_end)) // Don't touch candidates for destroy + (std::find(n_begin, n_end, O) == n_end)) // Don't touch candidates for destroy { // _delete_ feel_touch.erase(feel_touch.begin() + d); diff --git a/src/xrEngine/Feel_Vision.h b/src/xrEngine/Feel_Vision.h index cd566bf429c..98db94c39d3 100644 --- a/src/xrEngine/Feel_Vision.h +++ b/src/xrEngine/Feel_Vision.h @@ -10,10 +10,10 @@ class ISpatial; namespace Feel { -const float fuzzy_update_vis = 1000.f; // speed of fuzzy-logic desisions -const float fuzzy_update_novis = 1000.f; // speed of fuzzy-logic desisions -const float fuzzy_guaranteed = 0.001f; // distance which is supposed 100% visible -const float lr_granularity = 0.1f; // assume similar positions +const float fuzzy_update_vis = 1000.f; // speed of fuzzy-logic desisions +const float fuzzy_update_novis = 1000.f; // speed of fuzzy-logic desisions +const float fuzzy_guaranteed = 0.001f; // distance which is supposed 100% visible +const float lr_granularity = 0.1f; // assume similar positions class ENGINE_API Vision : private pure_relcase { @@ -40,9 +40,9 @@ class ENGINE_API Vision : private pure_relcase Fvector cp_LP; Fvector cp_LR_src; Fvector cp_LR_dst; - Fvector cp_LAST; // last point found to be visible + Fvector cp_LAST; // last point found to be visible IGameObject* O; - float fuzzy; // note range: (-1[no]..1[yes]) + float fuzzy; // note range: (-1[no]..1[yes]) float Cache_vis; u16 bone_id; }; diff --git a/src/xrEngine/GameFont.cpp b/src/xrEngine/GameFont.cpp index 84ca4f2636c..c60aec9006f 100644 --- a/src/xrEngine/GameFont.cpp +++ b/src/xrEngine/GameFont.cpp @@ -58,7 +58,7 @@ void CGameFont::Initialize(LPCSTR cShader, LPCSTR cTextureName) xr_strcpy(cTexture, sizeof(cTexture), cTextureName); uFlags &= ~fsValid; - vTS.set(1.f, 1.f); // обязательно !!! + vTS.set(1.f, 1.f); // обязательно !!! eCurrentAlignment = alLeft; vInterval.set(1.f, 1.f); @@ -112,7 +112,7 @@ void CGameFont::Initialize(LPCSTR cShader, LPCSTR cTextureName) TCMap[i].set(v.x, v.y, 1 + v[2] - v[0]); } else - TCMap[i] = vFirstValid; // "unassigned" unprintable characters + TCMap[i] = vFirstValid; // "unassigned" unprintable characters } // Special case for space @@ -239,10 +239,10 @@ u16 CGameFont::SplitByWidth(u16* puBuffer, u16 uBufferSize, float fTargetWidth, if (IsNeedSpaceCharacter(wsStr[i])) fDelta += fXStep; - if (((fCurWidth + fDelta) > fTargetWidth) && // overlength - (!IsBadStartCharacter(wsStr[i])) && // can start with this character - (i < len) && // is not the last character - ((i > 1) && (!IsBadEndCharacter(wsStr[i - 1]))) // && // do not stop the string on a "bad" character + if (((fCurWidth + fDelta) > fTargetWidth) && // overlength + (!IsBadStartCharacter(wsStr[i])) && // can start with this character + (i < len) && // is not the last character + ((i > 1) && (!IsBadEndCharacter(wsStr[i - 1]))) // && // do not stop the string on a "bad" character // ( ( i > 1 ) && ( ! ( ( IsAlphaCharacter( wsStr[ i - 1 ] ) ) && ( IsAlphaCharacter( wsStr[ i ] ) ) ) ) ) // // do not split numbers or words ) diff --git a/src/xrEngine/GameFont.h b/src/xrEngine/GameFont.h index b0b64cb4763..7284e3dfd49 100644 --- a/src/xrEngine/GameFont.h +++ b/src/xrEngine/GameFont.h @@ -57,7 +57,7 @@ class ENGINE_API CGameFont : public IGameFont virtual void SetAligment(EAligment aligment) override { eCurrentAlignment = aligment; } virtual float SizeOf_(LPCSTR s) override; virtual float SizeOf_(const wchar_t* wsStr) override; - virtual float SizeOf_(const char cChar); // only ANSII + virtual float SizeOf_(const char cChar); // only ANSII virtual float CurrentHeight_() override; virtual void OutSetI(float x, float y) override; virtual void OutSet(float x, float y) override; @@ -80,4 +80,4 @@ class ENGINE_API CGameFont : public IGameFont #endif }; -#endif // _XR_GAMEFONT_H_ +#endif // _XR_GAMEFONT_H_ diff --git a/src/xrEngine/GameMtlLib.h b/src/xrEngine/GameMtlLib.h index 48225914140..4d9b19eeb10 100644 --- a/src/xrEngine/GameMtlLib.h +++ b/src/xrEngine/GameMtlLib.h @@ -60,7 +60,7 @@ struct MTL_EXPORT_API SGameMtl friend class CGameMtlLibrary; protected: - int ID; // auto number + int ID; // auto number public: enum { @@ -78,10 +78,10 @@ struct MTL_EXPORT_API SGameMtl flSuppressWallmarks = (1ul << 11ul), flActorObstacle = (1ul << 12ul), flNoRicoshet = (1ul << 13ul), - flInjurious = (1ul << 28ul), // flInjurious = fInjuriousSpeed > 0.f + flInjurious = (1ul << 28ul), // flInjurious = fInjuriousSpeed > 0.f flShootable = (1ul << 29ul), flTransparent = (1ul << 30ul), - flSlowDown = (1ul << 31ul) // flSlowDown = (fFlotationFactor<1.f) + flSlowDown = (1ul << 31ul) // flSlowDown = (fFlotationFactor<1.f) }; public: @@ -89,19 +89,19 @@ struct MTL_EXPORT_API SGameMtl shared_str m_Desc; Flags32 Flags; // physics part - float fPHFriction; // ? - float fPHDamping; // ? - float fPHSpring; // ? - float fPHBounceStartVelocity; // ? - float fPHBouncing; // ? + float fPHFriction; // ? + float fPHDamping; // ? + float fPHSpring; // ? + float fPHBounceStartVelocity; // ? + float fPHBouncing; // ? // shoot&bounce&visibility&flotation - float fFlotationFactor; // 0.f - 1.f (1.f-полностью проходимый) - float fShootFactor; // 0.f - 1.f (1.f-полностью простреливаемый) - float fShootFactorMP; // 0.f - 1.f (1.f-полностью простреливаемый) - float fBounceDamageFactor; // 0.f - 100.f - float fInjuriousSpeed; // 0.f - ... (0.f-не отбирает здоровье (скорость уменьшения здоровья)) - float fVisTransparencyFactor; // 0.f - 1.f (1.f-полностью прозрачный) - float fSndOcclusionFactor; // 0.f - 1.f (1.f-полностью слышен) + float fFlotationFactor; // 0.f - 1.f (1.f-полностью проходимый) + float fShootFactor; // 0.f - 1.f (1.f-полностью простреливаемый) + float fShootFactorMP; // 0.f - 1.f (1.f-полностью простреливаемый) + float fBounceDamageFactor; // 0.f - 100.f + float fInjuriousSpeed; // 0.f - ... (0.f-не отбирает здоровье (скорость уменьшения здоровья)) + float fVisTransparencyFactor; // 0.f - 1.f (1.f-полностью прозрачный) + float fSndOcclusionFactor; // 0.f - 1.f (1.f-полностью слышен) float fDensityFactor; public: @@ -155,7 +155,7 @@ struct MTL_EXPORT_API SGameMtlPair int mtl1; protected: - int ID; // auto number + int ID; // auto number int ID_parent; public: diff --git a/src/xrEngine/IGameFont.hpp b/src/xrEngine/IGameFont.hpp index 9c7dda56a2b..41091095133 100644 --- a/src/xrEngine/IGameFont.hpp +++ b/src/xrEngine/IGameFont.hpp @@ -35,7 +35,7 @@ class IGameFont virtual void SetAligment(EAligment aligment) = 0; virtual float SizeOf_(LPCSTR s) = 0; virtual float SizeOf_(const wchar_t* wsStr) = 0; - virtual float SizeOf_(const char cChar) = 0; // only ANSII + virtual float SizeOf_(const char cChar) = 0; // only ANSII virtual float CurrentHeight_() = 0; virtual void OutSetI(float x, float y) = 0; virtual void OutSet(float x, float y) = 0; diff --git a/src/xrEngine/IGame_Level.cpp b/src/xrEngine/IGame_Level.cpp index 0f468703a5a..c342b7f1747 100644 --- a/src/xrEngine/IGame_Level.cpp +++ b/src/xrEngine/IGame_Level.cpp @@ -147,7 +147,7 @@ void IGame_Level::OnRender() TAL_BeginNamedVirtualTaskWithID("GameRenderFrame", rtID); TAL_Parami("Frame#", Device.dwFrame); TAL_EndVirtualTask(); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED // Level render, only when no client output required if (!g_dedicated_server) { @@ -161,7 +161,7 @@ void IGame_Level::OnRender() #ifdef _GPA_ENABLED TAL_RetireID(rtID); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED // Font // pApp->pFontSystem->SetSizeI(0.023f); diff --git a/src/xrEngine/IGame_Level.h b/src/xrEngine/IGame_Level.h index 35a0d895764..69d7f6e2d6b 100644 --- a/src/xrEngine/IGame_Level.h +++ b/src/xrEngine/IGame_Level.h @@ -76,7 +76,7 @@ class ENGINE_API IGame_Level : public FactoryObjectBase, CInifile* pLevel; -public: // deferred sound events +public: // deferred sound events struct _esound_delegate { Feel::Sound* dest; @@ -100,8 +100,8 @@ class ENGINE_API IGame_Level : public FactoryObjectBase, virtual void net_Update() = 0; virtual bool Load(u32 dwNum); - virtual bool Load_GameSpecific_Before() { return TRUE; }; // before object loading - virtual bool Load_GameSpecific_After() { return TRUE; }; // after object loading + virtual bool Load_GameSpecific_Before() { return TRUE; }; // before object loading + virtual bool Load_GameSpecific_After() { return TRUE; }; // after object loading virtual void Load_GameSpecific_CFORM(CDB::TRI* T, u32 count) = 0; virtual void OnFrame(void); @@ -114,8 +114,8 @@ class ENGINE_API IGame_Level : public FactoryObjectBase, // Main interface IGameObject* CurrentEntity(void) const { return pCurrentEntity; } IGameObject* CurrentViewEntity(void) const { return pCurrentViewEntity; } - void SetEntity(IGameObject* O); // { pCurrentEntity=pCurrentViewEntity=O; } - void SetViewEntity(IGameObject* O); // { pCurrentViewEntity=O; } + void SetEntity(IGameObject* O); // { pCurrentEntity=pCurrentViewEntity=O; } + void SetViewEntity(IGameObject* O); // { pCurrentViewEntity=O; } void SoundEvent_Register(ref_sound_data_ptr S, float range); void SoundEvent_Dispatch(); diff --git a/src/xrEngine/IGame_Level_check_textures.cpp b/src/xrEngine/IGame_Level_check_textures.cpp index 88db9943e8d..1fa2feb28ae 100644 --- a/src/xrEngine/IGame_Level_check_textures.cpp +++ b/src/xrEngine/IGame_Level_check_textures.cpp @@ -20,7 +20,7 @@ void IGame_Level::LL_CheckTextures() LPCSTR msg = "Too many lmap-textures (limit: 8 textures or 32M).\n Reduce pixel density (worse) or use " "more vertex lighting (better)."; Msg("***FATAL***: %s", msg); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG bError = TRUE; } } diff --git a/src/xrEngine/IGame_Persistent.cpp b/src/xrEngine/IGame_Persistent.cpp index 24644e95fe7..6bcd4a404e0 100644 --- a/src/xrEngine/IGame_Persistent.cpp +++ b/src/xrEngine/IGame_Persistent.cpp @@ -21,7 +21,7 @@ bool g_dedicated_server = false; #ifdef INGAME_EDITOR #include "editor_environment_manager.hpp" -#endif // INGAME_EDITOR +#endif // INGAME_EDITOR ENGINE_API IGame_Persistent* g_pGamePersistent = NULL; @@ -39,12 +39,12 @@ IGame_Persistent::IGame_Persistent() #ifndef _EDITOR pEnvironment = new CEnvironment(); #endif -#else // #ifdef INGAME_EDITOR +#else // #ifdef INGAME_EDITOR if (RDEVICE.editor()) pEnvironment = new editor::environment::manager(); else pEnvironment = new CEnvironment(); -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR } IGame_Persistent::~IGame_Persistent() diff --git a/src/xrEngine/IGame_Persistent.h b/src/xrEngine/IGame_Persistent.h index ceba7540706..53c56e3bd2b 100644 --- a/src/xrEngine/IGame_Persistent.h +++ b/src/xrEngine/IGame_Persistent.h @@ -92,10 +92,7 @@ class ENGINE_API IGame_Persistent : ParticleStatistics stats; const ParticleStatistics& GetStats() { return stats; } - virtual bool OnRenderPPUI_query() - { - return FALSE; - }; // should return true if we want to have second function called + virtual bool OnRenderPPUI_query() { return FALSE; }; // should return true if we want to have second function called virtual void OnRenderPPUI_main(){}; virtual void OnRenderPPUI_PP(){}; @@ -151,4 +148,4 @@ class IMainMenu }; extern ENGINE_API IGame_Persistent* g_pGamePersistent; -#endif // IGame_PersistentH +#endif // IGame_PersistentH diff --git a/src/xrEngine/IObjectPhysicsCollision.h b/src/xrEngine/IObjectPhysicsCollision.h index 182dbd32208..0bebc8786d3 100644 --- a/src/xrEngine/IObjectPhysicsCollision.h +++ b/src/xrEngine/IObjectPhysicsCollision.h @@ -6,5 +6,5 @@ xr_pure_interface IObjectPhysicsCollision { public: virtual const IPhysicsShell* physics_shell() const = 0; - virtual const IPhysicsElement* physics_character() const = 0; // depricated + virtual const IPhysicsElement* physics_character() const = 0; // depricated }; \ No newline at end of file diff --git a/src/xrEngine/IPhysicsShell.h b/src/xrEngine/IPhysicsShell.h index c0a70b8fcd2..b084fc07947 100644 --- a/src/xrEngine/IPhysicsShell.h +++ b/src/xrEngine/IPhysicsShell.h @@ -23,4 +23,4 @@ class IPhysicsShell virtual u16 get_ElementsNumber() const = 0; }; -#endif //__IPHYSICSSHELL_H__ \ No newline at end of file +#endif //__IPHYSICSSHELL_H__ \ No newline at end of file diff --git a/src/xrEngine/IRenderable.h b/src/xrEngine/IRenderable.h index 4b2a71c060b..46c856921e6 100644 --- a/src/xrEngine/IRenderable.h +++ b/src/xrEngine/IRenderable.h @@ -45,4 +45,4 @@ class ENGINE_API RenderableBase : public virtual IRenderable virtual BOOL renderable_ShadowReceive() override { return FALSE; } }; -#endif // IRENDERABLE_H_INCLUDED \ No newline at end of file +#endif // IRENDERABLE_H_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/ISheduled.cpp b/src/xrEngine/ISheduled.cpp index a5d968a9700..96d354bcdee 100644 --- a/src/xrEngine/ISheduled.cpp +++ b/src/xrEngine/ISheduled.cpp @@ -22,7 +22,7 @@ ScheduledBase::~ScheduledBase() // we need this to become MASTER_GOLD #ifndef DEBUG Engine.Sheduler.Unregister(this); -#endif // DEBUG +#endif // DEBUG } void ScheduledBase::shedule_register() diff --git a/src/xrEngine/ISheduled.h b/src/xrEngine/ISheduled.h index bf3544c6789..0a9abafb20a 100644 --- a/src/xrEngine/ISheduled.h +++ b/src/xrEngine/ISheduled.h @@ -4,8 +4,8 @@ class SchedulerData { public: - u32 t_min : 14; // minimal bound of update time (sample: 20ms) - u32 t_max : 14; // maximal bound of update time (sample: 200ms) + u32 t_min : 14; // minimal bound of update time (sample: 20ms) + u32 t_max : 14; // maximal bound of update time (sample: 200ms) u32 b_RT : 1; u32 b_locked : 1; #ifdef DEBUG @@ -46,4 +46,4 @@ class ENGINE_API ScheduledBase : public virtual ISheduled void shedule_unregister(); }; -#endif // #ifndef XRENGINE_ISHEDULED_H_INCLUDED \ No newline at end of file +#endif // #ifndef XRENGINE_ISHEDULED_H_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/LightAnimLibrary.cpp b/src/xrEngine/LightAnimLibrary.cpp index 3f6a2349d8e..651df79fc8b 100644 --- a/src/xrEngine/LightAnimLibrary.cpp +++ b/src/xrEngine/LightAnimLibrary.cpp @@ -110,19 +110,19 @@ u32 CLAItem::InterpolateRGB(int frame) KeyPairIt A = Keys.find(frame); KeyPairIt B; - if (A != Keys.end()) // ключ - возвращаем цвет ключа + if (A != Keys.end()) // ключ - возвращаем цвет ключа { return A->second; } - else // не ключ + else // не ключ { - B = Keys.upper_bound(frame); // ищем следующий ключ - if (B == Keys.end()) // если его нет вернем цвет последнего ключа + B = Keys.upper_bound(frame); // ищем следующий ключ + if (B == Keys.end()) // если его нет вернем цвет последнего ключа { B--; return B->second; } - A = B; // иначе в A занесем предыдущий ключ + A = B; // иначе в A занесем предыдущий ключ A--; } diff --git a/src/xrEngine/ObjectAnimator.h b/src/xrEngine/ObjectAnimator.h index 9700d5fec4b..285d71db961 100644 --- a/src/xrEngine/ObjectAnimator.h +++ b/src/xrEngine/ObjectAnimator.h @@ -44,4 +44,4 @@ class ENGINE_API CObjectAnimator void DrawPath(); }; -#endif // ObjectAnimatorH +#endif // ObjectAnimatorH diff --git a/src/xrEngine/PS_instance.cpp b/src/xrEngine/PS_instance.cpp index cd899549047..39f647b2503 100644 --- a/src/xrEngine/PS_instance.cpp +++ b/src/xrEngine/PS_instance.cpp @@ -38,7 +38,7 @@ CPS_Instance::~CPS_Instance() //---------------------------------------------------- void CPS_Instance::shedule_Update(u32 dt) { - if (renderable.pROS) GlobalEnv.Render->ros_destroy(renderable.pROS); //. particles doesn't need ROS + if (renderable.pROS) GlobalEnv.Render->ros_destroy(renderable.pROS); //. particles doesn't need ROS ScheduledBase::shedule_Update(dt); m_iLifeTime -= dt; diff --git a/src/xrEngine/Properties.h b/src/xrEngine/Properties.h index 49dea3b9f11..e6d8ce54183 100644 --- a/src/xrEngine/Properties.h +++ b/src/xrEngine/Properties.h @@ -14,16 +14,16 @@ enum xrProperties { xrPID_MARKER = 0, - xrPID_MATRIX, // really only name(stringZ) is written into stream - xrPID_CONSTANT, // really only name(stringZ) is written into stream - xrPID_TEXTURE, // really only name(stringZ) is written into stream + xrPID_MATRIX, // really only name(stringZ) is written into stream + xrPID_CONSTANT, // really only name(stringZ) is written into stream + xrPID_TEXTURE, // really only name(stringZ) is written into stream xrPID_INTEGER, xrPID_FLOAT, xrPID_BOOL, xrPID_TOKEN, xrPID_CLSID, - xrPID_OBJECT, // really only name(stringZ) is written into stream - xrPID_STRING, // really only name(stringZ) is written into stream + xrPID_OBJECT, // really only name(stringZ) is written into stream + xrPID_STRING, // really only name(stringZ) is written into stream xrPID_MARKER_TEMPLATE, xrPID_FORCEDWORD = u32(-1) }; @@ -152,4 +152,4 @@ IC void xrPREAD_MARKER(IReader& fs) // }; //} #pragma pack(pop) -#endif // xrPROPERTIES_H +#endif // xrPROPERTIES_H diff --git a/src/xrEngine/Rain.h b/src/xrEngine/Rain.h index 4ab7b0cb8b9..c24fbf41de0 100644 --- a/src/xrEngine/Rain.h +++ b/src/xrEngine/Rain.h @@ -92,4 +92,4 @@ class ENGINE_API CEffect_Rain void OnFrame(); }; -#endif // RainH +#endif // RainH diff --git a/src/xrEngine/Render.h b/src/xrEngine/Render.h index b4b1d662dfb..7bad6eb5f54 100644 --- a/src/xrEngine/Render.h +++ b/src/xrEngine/Render.h @@ -168,37 +168,37 @@ class ENGINE_API IRender enum ScreenshotMode { - SM_NORMAL = 0, // jpeg, name ignored - SM_FOR_CUBEMAP = 1, // tga, name used as postfix - SM_FOR_GAMESAVE = 2, // dds/dxt1,name used as full-path - SM_FOR_LEVELMAP = 3, // tga, name used as postfix (level_name) + SM_NORMAL = 0, // jpeg, name ignored + SM_FOR_CUBEMAP = 1, // tga, name used as postfix + SM_FOR_GAMESAVE = 2, // dds/dxt1,name used as full-path + SM_FOR_LEVELMAP = 3, // tga, name used as postfix (level_name) SM_FOR_MPSENDING = 4, SM_forcedword = u32(-1) }; struct RenderStatistics { - CStatTimer Culling; // portal traversal, frustum culling, entities "renderable_Render" - CStatTimer Animation; // skeleton calculation - CStatTimer Primitives; // actual primitive rendering - CStatTimer Wait; // ...waiting something back (queries results, etc.) - CStatTimer WaitS; // ...frame-limit sync - CStatTimer RenderTargets; // ...render-targets - CStatTimer Skinning; // ...skinning - CStatTimer DetailVisibility; // ...details visibility detection - CStatTimer DetailRender; // ...details rendering - CStatTimer DetailCache; // ...details slot cache access - u32 DetailCount; // ...number of DT-elements - CStatTimer Wallmarks; // ...wallmark sorting, rendering - u32 StaticWMCount; // ...number of static wallmark - u32 DynamicWMCount; // ...number of dynamic wallmark - u32 WMTriCount; // ...number of wallmark tri - CStatTimer HUD; // ...hud rendering - CStatTimer Glows; // ...glows vis-testing,sorting,render - CStatTimer Lights; // ...d-lights building/rendering - CStatTimer Projectors; // ...projectors building - CStatTimer ShadowsCalc; // ...shadows building - CStatTimer ShadowsRender; // ...shadows render + CStatTimer Culling; // portal traversal, frustum culling, entities "renderable_Render" + CStatTimer Animation; // skeleton calculation + CStatTimer Primitives; // actual primitive rendering + CStatTimer Wait; // ...waiting something back (queries results, etc.) + CStatTimer WaitS; // ...frame-limit sync + CStatTimer RenderTargets; // ...render-targets + CStatTimer Skinning; // ...skinning + CStatTimer DetailVisibility; // ...details visibility detection + CStatTimer DetailRender; // ...details rendering + CStatTimer DetailCache; // ...details slot cache access + u32 DetailCount; // ...number of DT-elements + CStatTimer Wallmarks; // ...wallmark sorting, rendering + u32 StaticWMCount; // ...number of static wallmark + u32 DynamicWMCount; // ...number of dynamic wallmark + u32 WMTriCount; // ...number of wallmark tri + CStatTimer HUD; // ...hud rendering + CStatTimer Glows; // ...glows vis-testing,sorting,render + CStatTimer Lights; // ...d-lights building/rendering + CStatTimer Projectors; // ...projectors building + CStatTimer ShadowsCalc; // ...shadows building + CStatTimer ShadowsRender; // ...shadows render u32 OcclusionQueries; u32 OcclusionCulled; @@ -308,9 +308,9 @@ class ENGINE_API IRender virtual void set_Invisible(BOOL V) = 0; virtual void flush() = 0; virtual void set_Object(IRenderable* O) = 0; - virtual void add_Occluder(Fbox2& bb_screenspace) = 0; // mask screen region as oclluded (-1..1, -1..1) - virtual void add_Visual(IRenderVisual* V) = 0; // add visual leaf (no culling performed at all) - virtual void add_Geometry(IRenderVisual* V) = 0; // add visual(s) (all culling performed) + virtual void add_Occluder(Fbox2& bb_screenspace) = 0; // mask screen region as oclluded (-1..1, -1..1) + virtual void add_Visual(IRenderVisual* V) = 0; // add visual leaf (no culling performed at all) + virtual void add_Geometry(IRenderVisual* V) = 0; // add visual(s) (all culling performed) // virtual void add_StaticWallmark (ref_shader& S, const Fvector& P, float s, CDB::TRI* T, Fvector* V)=0; virtual void add_StaticWallmark(const wm_shader& S, const Fvector& P, float s, CDB::TRI* T, Fvector* V) = 0; // Prefer this function when possible diff --git a/src/xrEngine/Stats.h b/src/xrEngine/Stats.h index 012b012f714..0a584b97166 100644 --- a/src/xrEngine/Stats.h +++ b/src/xrEngine/Stats.h @@ -42,4 +42,4 @@ enum extern Flags32 g_stats_flags; -#endif // !defined(AFX_STATS_H__4C8D1860_0EE2_11D4_B4E3_4854E82A090D__INCLUDED_) +#endif // !defined(AFX_STATS_H__4C8D1860_0EE2_11D4_B4E3_4854E82A090D__INCLUDED_) diff --git a/src/xrEngine/Text_Console.cpp b/src/xrEngine/Text_Console.cpp index d62209e74ed..9cbf27a2842 100644 --- a/src/xrEngine/Text_Console.cpp +++ b/src/xrEngine/Text_Console.cpp @@ -47,7 +47,7 @@ void CTextConsole::CreateConsoleWnd() RegisterClass(&wndClass); // Set the window's initial style - u32 dwWindowStyle = WS_OVERLAPPED | WS_CHILD | WS_VISIBLE; // | WS_CLIPSIBLINGS;// | WS_CLIPCHILDREN; + u32 dwWindowStyle = WS_OVERLAPPED | WS_CHILD | WS_VISIBLE; // | WS_CLIPSIBLINGS;// | WS_CLIPCHILDREN; // Set the window's initial width RECT rc; @@ -81,7 +81,7 @@ void CTextConsole::CreateLogWnd() RegisterClass(&wndClass); // Set the window's initial style - u32 dwWindowStyle = WS_OVERLAPPED | WS_CHILD | WS_VISIBLE; // | WS_CLIPSIBLINGS; + u32 dwWindowStyle = WS_OVERLAPPED | WS_CHILD | WS_VISIBLE; // | WS_CLIPSIBLINGS; // u32 dwWindowStyleEx = WS_EX_CLIENTEDGE; // Set the window's initial width @@ -179,7 +179,7 @@ void CTextConsole::Destroy() void CTextConsole::OnRender() { -} // disable СConsole::OnRender() +} // disable СConsole::OnRender() void CTextConsole::OnPaint() { @@ -201,7 +201,7 @@ void CTextConsole::OnPaint() BitBlt(m_hDC_LogWnd, wRC.left, wRC.top, wRC.right - wRC.left, wRC.bottom - wRC.top, m_hDC_LogWnd_BackBuffer, wRC.left, wRC.top, - SRCCOPY); //(FullUpdate) ? SRCCOPY : NOTSRCCOPY); + SRCCOPY); //(FullUpdate) ? SRCCOPY : NOTSRCCOPY); /* Msg ("URect - %d:%d - %d:%d", ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom); */ @@ -244,7 +244,7 @@ void CTextConsole::DrawLog(HDC hDC, RECT* pRect) TextOut(hDC, xb, Height - tm.tmHeight - 1, buf, cur0_len); SetTextColor(hDC, RGB(255, 255, 255)); - TextOut(hDC, 0, Height - tm.tmHeight - 3, ioc_prompt, xr_strlen(ioc_prompt)); // ">>> " + TextOut(hDC, 0, Height - tm.tmHeight - 3, ioc_prompt, xr_strlen(ioc_prompt)); // ">>> " SetTextColor(hDC, (COLORREF)bgr2rgb(get_mark_color(mark11))); TextOut(hDC, xb, Height - tm.tmHeight - 3, s_edt, xr_strlen(s_edt)); diff --git a/src/xrEngine/Text_Console.h b/src/xrEngine/Text_Console.h index 11b4a84dd94..97005004e6f 100644 --- a/src/xrEngine/Text_Console.h +++ b/src/xrEngine/Text_Console.h @@ -50,6 +50,6 @@ class ENGINE_API CTextConsole : public CConsole void AddString(LPCSTR string); void OnPaint(); -}; // class TextConsole +}; // class TextConsole // extern ENGINE_API CTextConsole* TextConsole; diff --git a/src/xrEngine/Text_Console_WndProc.cpp b/src/xrEngine/Text_Console_WndProc.cpp index d65fa1ef78d..12610e54ddb 100644 --- a/src/xrEngine/Text_Console_WndProc.cpp +++ b/src/xrEngine/Text_Console_WndProc.cpp @@ -38,13 +38,13 @@ LRESULT CALLBACK TextConsole_LogWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA switch (uMsg) { case WM_ERASEBKGND: - return (LRESULT)1; // Say we handled it. + return (LRESULT)1; // Say we handled it. case WM_PAINT: { CTextConsole* pTextConsole = (CTextConsole*)Console; pTextConsole->OnPaint(); - return (LRESULT)0; // Say we handled it. + return (LRESULT)0; // Say we handled it. } break; default: break; diff --git a/src/xrEngine/XR_IOConsole.cpp b/src/xrEngine/XR_IOConsole.cpp index a764be0060b..fa053994792 100644 --- a/src/xrEngine/XR_IOConsole.cpp +++ b/src/xrEngine/XR_IOConsole.cpp @@ -174,14 +174,14 @@ void CConsole::OutFont(LPCSTR text, float& pos_y) { float str_length = pFont->SizeOf_(text); float scr_width = 1.98f * Device.fWidth_2; - if (str_length > scr_width) // 1024.0f + if (str_length > scr_width) // 1024.0f { float f = 0.0f; int sz = 0; int ln = 0; PSTR one_line = (PSTR)_alloca((CONSOLE_BUF_SIZE + 1) * sizeof(char)); - while (text[sz] && (ln + sz < CONSOLE_BUF_SIZE - 5)) // перенос строк + while (text[sz] && (ln + sz < CONSOLE_BUF_SIZE - 5)) // перенос строк { one_line[ln + sz] = text[sz]; one_line[ln + sz + 1] = 0; @@ -222,7 +222,7 @@ void CConsole::OnRender() if (!m_hShader_back) { m_hShader_back = new FactoryPtr(); - (*m_hShader_back)->create("hud\\default", "ui\\ui_console"); // "ui\\ui_empty" + (*m_hShader_back)->create("hud\\default", "ui\\ui_console"); // "ui\\ui_empty" } if (!pFont) { @@ -297,11 +297,11 @@ void CConsole::OnRender() vecTipsEx::iterator itb = m_tips.begin() + m_start_tip; vecTipsEx::iterator ite = m_tips.end(); - for (u32 i = 0; itb != ite; ++itb, ++i) // tips + for (u32 i = 0; itb != ite; ++itb, ++i) // tips { pFont->OutI(-1.0f + shift_x, fMaxY + i * LDIST, "%s", (*itb).text.c_str()); if (i >= VIEW_TIPS_COUNT - 1) { - break; // for + break; // for } } } @@ -409,7 +409,7 @@ void CConsole::DrawBackgrounds(bool bGame) int sel_pos = m_select_tip - m_start_tip; select_y = sel_pos * font_h; - select_h = font_h; // 1 string + select_h = font_h; // 1 string } sr.x1 = pr.x1; @@ -428,7 +428,7 @@ void CConsole::DrawBackgrounds(bool bGame) xr_string tmp; vecTipsEx::iterator itb = m_tips.begin() + m_start_tip; vecTipsEx::iterator ite = m_tips.end(); - for (u32 i = 0; itb != ite; ++itb, ++i) // tips + for (u32 i = 0; itb != ite; ++itb, ++i) // tips { TipString const& ts = (*itb); if ((ts.HL_start < 0) || (ts.HL_finish < 0) || (ts.HL_start > ts.HL_finish)) { @@ -451,10 +451,10 @@ void CConsole::DrawBackgrounds(bool bGame) DrawRect(r, tips_word_color); if (i >= VIEW_TIPS_COUNT - 1) { - break; // for itb + break; // for itb } - } // for itb - } // if + } // for itb + } // if // --------------------------- scroll bar -------------------- @@ -689,7 +689,7 @@ bool CConsole::add_next_cmds(LPCSTR in_str, vecTipsEx& out_v) } bool res = false; - for (u32 i = cur_count; i < MAX_TIPS_COUNT * 2; ++i) // fake=protect + for (u32 i = cur_count; i < MAX_TIPS_COUNT * 2; ++i) // fake=protect { temp._set(cc->Name()); bool dup = (std::find(out_v.begin(), out_v.end(), temp) != out_v.end()); @@ -699,15 +699,15 @@ bool CConsole::add_next_cmds(LPCSTR in_str, vecTipsEx& out_v) res = true; } if (out_v.size() >= MAX_TIPS_COUNT) { - break; // for + break; // for } LPSTR t3; STRCONCAT(t3, out_v.back().text.c_str(), " "); cc = find_next_cmd(t3, temp); if (!cc) { - break; // for + break; // for } - } // for + } // for return res; } @@ -744,7 +744,7 @@ bool CConsole::add_internal_cmds(LPCSTR in_str, vecTipsEx& out_v) if (out_v.size() >= MAX_TIPS_COUNT) { return res; } - } // for + } // for // word in internal itb = Commands.begin(); @@ -767,7 +767,7 @@ bool CConsole::add_internal_cmds(LPCSTR in_str, vecTipsEx& out_v) if (out_v.size() >= MAX_TIPS_COUNT) { return res; } - } // for + } // for return res; } @@ -801,7 +801,7 @@ void CConsole::update_tips() u32 first_lenght = xr_strlen(first); - if ((first_lenght > 2) && (first_lenght + 1 <= cur_length)) // param + if ((first_lenght > 2) && (first_lenght + 1 <= cur_length)) // param { if (cur[first_lenght] == ' ') { if (m_tips_mode != 2) { @@ -815,7 +815,7 @@ void CConsole::update_tips() u32 mode = 0; if ((first_lenght + 2 <= cur_length) && (cur[first_lenght] == ' ') && (cur[first_lenght + 1] == ' ')) { mode = 1; - last += 1; // fake: next char + last += 1; // fake: next char } cc->fill_tips(m_temp_tips, mode); @@ -877,5 +877,5 @@ void CConsole::select_for_filter(LPCSTR filter_str, vecTips& in_v, vecTipsEx& ou out_v.push_back(ts); } } - } // for + } // for } diff --git a/src/xrEngine/XR_IOConsole.h b/src/xrEngine/XR_IOConsole.h index 3f73c263683..9a0c0e6629a 100644 --- a/src/xrEngine/XR_IOConsole.h +++ b/src/xrEngine/XR_IOConsole.h @@ -20,7 +20,7 @@ class line_edit_control; struct TipString { shared_str text; - int HL_start; // Highlight + int HL_start; // Highlight int HL_finish; TipString() @@ -141,19 +141,19 @@ class ENGINE_API CConsole : public pureRender, public pureFrame, public pureScre BENCH_SEC_SCRAMBLEMEMBER2 - enum Console_mark // (int)=char + enum Console_mark // (int)=char { no_mark = ' ', mark0 = '~', - mark1 = '!', // error - mark2 = '@', // console cmd + mark1 = '!', // error + mark2 = '@', // console cmd mark3 = '#', mark4 = '$', mark5 = '%', mark6 = '^', mark7 = '&', mark8 = '*', - mark9 = '-', // green = ok + mark9 = '-', // green = ok mark10 = '+', mark11 = '=', mark12 = '/' @@ -211,8 +211,8 @@ class ENGINE_API CConsole : public pureRender, public pureFrame, public pureScre void update_tips(); void select_for_filter(LPCSTR filter_str, vecTips& in_v, vecTipsEx& out_v); -}; // class CConsole +}; // class CConsole ENGINE_API extern CConsole* Console; -#endif // XR_IOCONSOLE_H_INCLUDED +#endif // XR_IOCONSOLE_H_INCLUDED diff --git a/src/xrEngine/XR_IOConsole_callback.cpp b/src/xrEngine/XR_IOConsole_callback.cpp index 735f792f9e6..4958363f3af 100644 --- a/src/xrEngine/XR_IOConsole_callback.cpp +++ b/src/xrEngine/XR_IOConsole_callback.cpp @@ -40,7 +40,7 @@ void CConsole::Register_callbacks() ec().assign_callback(DIK_GRAVE, text_editor::ks_free, Callback(this, &CConsole::Hide_cmd)); } -void CConsole::Prev_log() // DIK_PRIOR=PAGE_UP +void CConsole::Prev_log() // DIK_PRIOR=PAGE_UP { scroll_delta++; if (scroll_delta > int(LogFile->size()) - 1) { @@ -48,7 +48,7 @@ void CConsole::Prev_log() // DIK_PRIOR=PAGE_UP } } -void CConsole::Next_log() // DIK_NEXT=PAGE_DOWN +void CConsole::Next_log() // DIK_NEXT=PAGE_DOWN { scroll_delta--; if (scroll_delta < 0) { @@ -56,17 +56,17 @@ void CConsole::Next_log() // DIK_NEXT=PAGE_DOWN } } -void CConsole::Begin_log() // PAGE_UP+Ctrl +void CConsole::Begin_log() // PAGE_UP+Ctrl { scroll_delta = LogFile->size() - 1; } -void CConsole::End_log() // PAGE_DOWN+Ctrl +void CConsole::End_log() // PAGE_DOWN+Ctrl { scroll_delta = 0; } -void CConsole::Find_cmd() // DIK_TAB +void CConsole::Find_cmd() // DIK_TAB { shared_str out_str; @@ -76,7 +76,7 @@ void CConsole::Find_cmd() // DIK_TAB } } -void CConsole::Find_cmd_back() // DIK_TAB+shift +void CConsole::Find_cmd_back() // DIK_TAB+shift { LPCSTR edt = ec().str_edit(); LPCSTR radmin_cmd_name = "ra "; @@ -97,19 +97,19 @@ void CConsole::Find_cmd_back() // DIK_TAB+shift } } -void CConsole::Prev_cmd() // DIK_UP + Ctrl +void CConsole::Prev_cmd() // DIK_UP + Ctrl { prev_cmd_history_idx(); SelectCommand(); } -void CConsole::Next_cmd() // DIK_DOWN + Ctrl +void CConsole::Next_cmd() // DIK_DOWN + Ctrl { next_cmd_history_idx(); SelectCommand(); } -void CConsole::Prev_tip() // DIK_UP +void CConsole::Prev_tip() // DIK_UP { if (xr_strlen(ec().str_edit()) == 0) { prev_cmd_history_idx(); @@ -119,7 +119,7 @@ void CConsole::Prev_tip() // DIK_UP prev_selected_tip(); } -void CConsole::Next_tip() // DIK_DOWN + Ctrl +void CConsole::Next_tip() // DIK_DOWN + Ctrl { if (xr_strlen(ec().str_edit()) == 0) { next_cmd_history_idx(); @@ -154,7 +154,7 @@ void CConsole::PageDown_tips() check_next_selected_tip(); } -void CConsole::Execute_cmd() // DIK_RETURN, DIK_NUMPADENTER +void CConsole::Execute_cmd() // DIK_RETURN, DIK_NUMPADENTER { if (0 <= m_select_tip && m_select_tip < (int)m_tips.size()) { shared_str const& str = m_tips[m_select_tip].text; diff --git a/src/xrEngine/Xr_input.cpp b/src/xrEngine/Xr_input.cpp index dae5887dd22..c9d567a53c3 100644 --- a/src/xrEngine/Xr_input.cpp +++ b/src/xrEngine/Xr_input.cpp @@ -28,7 +28,7 @@ static void on_error_dialog(bool before) { #ifdef INGAME_EDITOR if (Device.editor()) return; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR if (!pInput || !g_exclusive) return; if (before) { @@ -131,7 +131,7 @@ HRESULT CInput::CreateInputDevice( // should interact with the system and with other DirectInput applications. #ifdef INGAME_EDITOR if (!Device.editor()) -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR { HRESULT _hr = (*device)->SetCooperativeLevel(RDEVICE.m_hWnd, dwFlags); if (FAILED(_hr) && (_hr == E_NOTIMPL)) @@ -204,7 +204,7 @@ void CInput::KeyUpdate() if (b_dik_pause_was_pressed && !(od[idx].dwData & 0x80)) { od[idx].uAppData = 666; - continue; // skip one-frame pause key on-off switch + continue; // skip one-frame pause key on-off switch } } KBState[od[idx].dwOfs] = od[idx].dwData & 0x80; @@ -228,7 +228,7 @@ void CInput::KeyUpdate() { for (u32 i = 0; i < dwElements; i++) { - if (od[i].uAppData == 666) // ignored action + if (od[i].uAppData == 666) // ignored action continue; key = od[i].dwOfs; @@ -321,7 +321,7 @@ BOOL CInput::iGetAsyncKeyState(int dik) return iGetAsyncBtnState(mk); } else - return FALSE; // unknown key ??? + return FALSE; // unknown key ??? } BOOL CInput::iGetAsyncBtnState(int btn) @@ -593,7 +593,7 @@ void CInput::acquire(const bool& exclusive) pKeyboard->SetCooperativeLevel( #ifdef INGAME_EDITOR Device.editor() ? Device.editor()->main_handle() : -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR RDEVICE.m_hWnd, (exclusive ? DISCL_EXCLUSIVE : DISCL_NONEXCLUSIVE) | DISCL_FOREGROUND); pKeyboard->Acquire(); @@ -601,7 +601,7 @@ void CInput::acquire(const bool& exclusive) pMouse->SetCooperativeLevel( #ifdef INGAME_EDITOR Device.editor() ? Device.editor()->main_handle() : -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR RDEVICE.m_hWnd, (exclusive ? DISCL_EXCLUSIVE : DISCL_NONEXCLUSIVE) | DISCL_FOREGROUND | DISCL_NOWINKEY); pMouse->Acquire(); diff --git a/src/xrEngine/device.cpp b/src/xrEngine/device.cpp index 29077c060f5..44784a0bf0a 100644 --- a/src/xrEngine/device.cpp +++ b/src/xrEngine/device.cpp @@ -21,7 +21,7 @@ #ifdef INGAME_EDITOR #include "Include/editor/ide.hpp" #include "engine_impl.hpp" -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR #include "IGame_Persistent.h" #include "xrSASH.h" @@ -71,7 +71,7 @@ void CRenderDevice::End(void) #ifndef DEDICATED_SERVER #ifdef INGAME_EDITOR bool load_finished = false; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR if (dwPrecacheFrame) { ::Sound->set_master_volume(0.f); dwPrecacheFrame--; @@ -93,7 +93,7 @@ void CRenderDevice::End(void) g_find_chunk_counter.flush(); #endif CheckPrivilegySlowdown(); - if (g_pGamePersistent->GameType() == 1) // haCk + if (g_pGamePersistent->GameType() == 1) // haCk { WINDOWINFO wi; GetWindowInfo(m_hWnd, &wi); @@ -109,7 +109,7 @@ void CRenderDevice::End(void) #ifdef INGAME_EDITOR if (load_finished && m_editor) m_editor->on_load_finished(); #endif -#endif // !DEDICATED_SERVER +#endif // !DEDICATED_SERVER } void CRenderDevice::SecondaryThreadProc(void* context) @@ -188,7 +188,7 @@ void CRenderDevice::on_idle() u32 FrameStartTime = TimerGlobal.GetElapsed_ms(); #endif if (psDeviceFlags.test(rsStatistic)) - g_bEnableStatGather = TRUE; // XXX: why not use either rsStatistic or g_bEnableStatGather? + g_bEnableStatGather = TRUE; // XXX: why not use either rsStatistic or g_bEnableStatGather? else g_bEnableStatGather = FALSE; if (g_loading_events.size()) { @@ -216,7 +216,7 @@ void CRenderDevice::on_idle() mFullTransform_saved = mFullTransform; mView_saved = mView; mProject_saved = mProject; - syncProcessFrame.Set(); // allow secondary thread to do its job + syncProcessFrame.Set(); // allow secondary thread to do its job Sleep(0); #ifndef DEDICATED_SERVER @@ -228,13 +228,13 @@ void CRenderDevice::on_idle() seqRender.Process(rp_Render); CalcFrameStats(); Statistic->Show(); - End(); // Present goes here + End(); // Present goes here } renderTotalReal.End(); renderTotalReal.FrameEnd(); stats.RenderTotal.accum = renderTotalReal.accum; -#endif // #ifndef DEDICATED_SERVER - syncFrameDone.Wait(); // wait until secondary thread finish its job +#endif // #ifndef DEDICATED_SERVER + syncFrameDone.Wait(); // wait until secondary thread finish its job #ifdef DEDICATED_SERVER u32 FrameEndTime = TimerGlobal.GetElapsed_ms(); u32 FrameTime = (FrameEndTime - FrameStartTime); @@ -251,7 +251,7 @@ void CRenderDevice::message_loop_editor() m_editor_finalize(m_editor); xr_delete(m_engine); } -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR void CRenderDevice::message_loop() { @@ -285,7 +285,7 @@ void CRenderDevice::Run() { u32 time_mm = timeGetTime(); while (timeGetTime() == time_mm) - ; // wait for next tick + ; // wait for next tick u32 time_system = timeGetTime(); u32 time_local = TimerAsync(); Timer_MM_Delta = time_system - time_local; @@ -330,15 +330,15 @@ void CRenderDevice::FrameMove() { // Timer float fPreviousFrameTime = Timer.GetElapsed_sec(); - Timer.Start(); // previous frame + Timer.Start(); // previous frame fTimeDelta = - 0.1f * fTimeDelta + 0.9f * fPreviousFrameTime; // smooth random system activity - worst case ~7% error + 0.1f * fTimeDelta + 0.9f * fPreviousFrameTime; // smooth random system activity - worst case ~7% error // fTimeDelta = 0.7f * fTimeDelta + 0.3f*fPreviousFrameTime; // smooth random system activity - if (fTimeDelta > .1f) fTimeDelta = .1f; // limit to 15fps minimum - if (fTimeDelta <= 0.f) fTimeDelta = EPS_S + EPS_S; // limit to 15fps minimum + if (fTimeDelta > .1f) fTimeDelta = .1f; // limit to 15fps minimum + if (fTimeDelta <= 0.f) fTimeDelta = EPS_S + EPS_S; // limit to 15fps minimum if (Paused()) fTimeDelta = 0.0f; // u64 qTime = TimerGlobal.GetElapsed_clk(); - fTimeGlobal = TimerGlobal.GetElapsed_sec(); // float(qTime)*CPU::cycles2seconds; + fTimeGlobal = TimerGlobal.GetElapsed_sec(); // float(qTime)*CPU::cycles2seconds; u32 _old_global = dwTimeGlobal; dwTimeGlobal = TimerGlobal.GetElapsed_ms(); dwTimeDelta = dwTimeGlobal - _old_global; @@ -369,10 +369,10 @@ void CRenderDevice::Pause(BOOL bOn, BOOL bTimer, BOOL bSound, LPCSTR reason) bShowPauseString = #ifdef INGAME_EDITOR editor() ? FALSE : -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR #ifdef DEBUG !xr_strcmp(reason, "li_pause_key_no_clip") ? FALSE : -#endif // DEBUG +#endif // DEBUG TRUE; if (bTimer && (!g_pGamePersistent || g_pGamePersistent->CanBePaused())) { g_pauseMngr()->Pause(TRUE); @@ -389,7 +389,7 @@ void CRenderDevice::Pause(BOOL bOn, BOOL bTimer, BOOL bSound, LPCSTR reason) g_pauseMngr()->Pause(FALSE); } if (bSound) { - if (snd_emitters_ > 0) // avoid crash + if (snd_emitters_ > 0) // avoid crash snd_emitters_ = ::Sound->pause_emitters(false); else { @@ -420,9 +420,9 @@ void CRenderDevice::OnWM_Activate(WPARAM wParam, LPARAM lParam) #ifndef DEDICATED_SERVER #ifdef INGAME_EDITOR if (!editor()) -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR ShowCursor(FALSE); -#endif // #ifndef DEDICATED_SERVER +#endif // #ifndef DEDICATED_SERVER } else { diff --git a/src/xrEngine/device.h b/src/xrEngine/device.h index 5a085dff8ac..6d7b6671a27 100644 --- a/src/xrEngine/device.h +++ b/src/xrEngine/device.h @@ -35,9 +35,9 @@ class ENGINE_API IRenderDevice public: struct RenderDeviceStatictics { - CStatTimer RenderTotal; // pureRender - CStatTimer EngineTotal; // pureFrame - float fFPS, fRFPS, fTPS; // FPS, RenderFPS, TPS + CStatTimer RenderTotal; // pureRender + CStatTimer EngineTotal; // pureFrame + float fFPS, fRFPS, fTPS; // FPS, RenderFPS, TPS RenderDeviceStatictics() { @@ -181,7 +181,7 @@ class ENGINE_API CRenderDevice : public CRenderDeviceBase #ifdef INGAME_EDITOR , m_editor_module(0), m_editor_initialize(0), m_editor_finalize(0), m_editor(0), m_engine(0) -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR { m_hWnd = NULL; b_is_Active = FALSE; @@ -277,7 +277,7 @@ class ENGINE_API CRenderDevice : public CRenderDeviceBase finalize_function_ptr m_editor_finalize; editor::ide* m_editor; engine_impl* m_engine; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR }; extern ENGINE_API CRenderDevice Device; diff --git a/src/xrEngine/edit_actions.cpp b/src/xrEngine/edit_actions.cpp index 2d4759c82a6..92486fc6f47 100644 --- a/src/xrEngine/edit_actions.cpp +++ b/src/xrEngine/edit_actions.cpp @@ -95,7 +95,7 @@ void type_pair::on_key_press(line_edit_control* const control) static _locale_t current_locale = _create_locale(LC_ALL, ""); if (pInput->get_dik_name(m_dik, buff, sizeof(buff))) { - if (_isalpha_l(buff[0], current_locale) || buff[0] == char(-1)) // "я" = -1 + if (_isalpha_l(buff[0], current_locale) || buff[0] == char(-1)) // "я" = -1 { _strlwr_l(buff, current_locale); c = buff[0]; @@ -137,4 +137,4 @@ void key_state_base::on_key_press(line_edit_control* const control) if (m_type_pair) m_type_pair->on_key_press(control); } -} // namespace text_editor +} // namespace text_editor diff --git a/src/xrEngine/edit_actions.h b/src/xrEngine/edit_actions.h index 1fae1b9c9b5..214711d8eae 100644 --- a/src/xrEngine/edit_actions.h +++ b/src/xrEngine/edit_actions.h @@ -26,7 +26,7 @@ class base : private Noncopyable protected: base* m_previous_action; -}; // class base +}; // class base // ------------------------------------------------------------------------------------------------- @@ -44,7 +44,7 @@ class callback_base : public base key_state m_run_state; Callback m_callback; -}; // class callback_base +}; // class callback_base // ------------------------------------------------------------------------------------------------- @@ -62,7 +62,7 @@ class type_pair : public base char m_char; char m_char_shift; -}; // class type_pair +}; // class type_pair // ------------------------------------------------------------------------------------------------- @@ -76,8 +76,8 @@ class key_state_base : public base private: key_state m_state; base* m_type_pair; -}; // class key_state_base +}; // class key_state_base -} // namespace text_editor +} // namespace text_editor -#endif // EDIT_ACTIONS_H_INCLUDED +#endif // EDIT_ACTIONS_H_INCLUDED diff --git a/src/xrEngine/editor_environment_ambients_ambient.cpp b/src/xrEngine/editor_environment_ambients_ambient.cpp index 752f4b9b096..db5e3f8bc41 100644 --- a/src/xrEngine/editor_environment_ambients_ambient.cpp +++ b/src/xrEngine/editor_environment_ambients_ambient.cpp @@ -237,4 +237,4 @@ CEnvAmbient::SSndChannelVec& ambient::get_snd_channels() return (inherited::get_snd_channels()); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_ambients_ambient.hpp b/src/xrEngine/editor_environment_ambients_ambient.hpp index bfcb264d167..48eba64d367 100644 --- a/src/xrEngine/editor_environment_ambients_ambient.hpp +++ b/src/xrEngine/editor_environment_ambients_ambient.hpp @@ -23,12 +23,12 @@ namespace environment namespace effects { class manager; -} // namespace effects +} // namespace effects namespace sound_channels { class manager; -} // namespace sound_channels +} // namespace sound_channels namespace ambients { @@ -86,11 +86,11 @@ class ambient : public CEnvAmbient, public editor::property_holder_holder, priva sound_collection_type* m_sounds_collection; sound_container_type m_sound_channels_ids; -}; // class ambient -} // namespace ambients -} // namespace environment -} // namespace editor +}; // class ambient +} // namespace ambients +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_AMBIENTS_AMBIENT_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_AMBIENTS_AMBIENT_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_ambients_effect_id.cpp b/src/xrEngine/editor_environment_ambients_effect_id.cpp index ce7bc12b5d7..33313352777 100644 --- a/src/xrEngine/editor_environment_ambients_effect_id.cpp +++ b/src/xrEngine/editor_environment_ambients_effect_id.cpp @@ -60,4 +60,4 @@ effect_id::property_holder_type* effect_id::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_ambients_effect_id.hpp b/src/xrEngine/editor_environment_ambients_effect_id.hpp index eee45c8b276..f83d35a6d75 100644 --- a/src/xrEngine/editor_environment_ambients_effect_id.hpp +++ b/src/xrEngine/editor_environment_ambients_effect_id.hpp @@ -23,7 +23,7 @@ namespace environment namespace effects { class manager; -} // namespace effects +} // namespace effects namespace ambients { @@ -48,11 +48,11 @@ class effect_id : public editor::property_holder_holder, private Noncopyable property_holder_type* m_property_holder; effects::manager const& m_manager; shared_str m_id; -}; // class effect_id -} // namespace ambients -} // namespace environment -} // namespace editor +}; // class effect_id +} // namespace ambients +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_AMBIENTS_EFFECT_ID_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_AMBIENTS_EFFECT_ID_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_ambients_manager.cpp b/src/xrEngine/editor_environment_ambients_manager.cpp index 853c9834a3b..ccd709066c3 100644 --- a/src/xrEngine/editor_environment_ambients_manager.cpp +++ b/src/xrEngine/editor_environment_ambients_manager.cpp @@ -139,7 +139,7 @@ ambient* manager::get_ambient(shared_str const& id) const NODEFAULT; #ifdef DEBUG return (0); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_ambients_manager.hpp b/src/xrEngine/editor_environment_ambients_manager.hpp index 8ee0b363c8d..9a07a79aadf 100644 --- a/src/xrEngine/editor_environment_ambients_manager.hpp +++ b/src/xrEngine/editor_environment_ambients_manager.hpp @@ -25,12 +25,12 @@ class manager; namespace effects { class manager; -} // namespace effects +} // namespace effects namespace sound_channels { class manager; -} // namespace sound_channels +} // namespace sound_channels namespace ambients { @@ -69,11 +69,11 @@ class manager : private Noncopyable property_holder_type* m_property_holder; collection_type* m_collection; mutable bool m_changed; -}; // class manager -} // namespace ambients -} // namespace environment -} // namespace editor +}; // class manager +} // namespace ambients +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_AMBIENTS_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_AMBIENTS_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_ambients_sound_id.cpp b/src/xrEngine/editor_environment_ambients_sound_id.cpp index 777d83e9b98..ae3cec35834 100644 --- a/src/xrEngine/editor_environment_ambients_sound_id.cpp +++ b/src/xrEngine/editor_environment_ambients_sound_id.cpp @@ -60,4 +60,4 @@ sound_id::property_holder_type* sound_id::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_ambients_sound_id.hpp b/src/xrEngine/editor_environment_ambients_sound_id.hpp index 61df938c74d..02980389c2b 100644 --- a/src/xrEngine/editor_environment_ambients_sound_id.hpp +++ b/src/xrEngine/editor_environment_ambients_sound_id.hpp @@ -23,7 +23,7 @@ namespace environment namespace sound_channels { class manager; -} // namespace sound_channels +} // namespace sound_channels namespace ambients { @@ -48,11 +48,11 @@ class sound_id : public editor::property_holder_holder, private Noncopyable property_holder_type* m_property_holder; sound_channels::manager const& m_manager; shared_str m_id; -}; // class sound_id -} // namespace ambients -} // namespace environment -} // namespace editor +}; // class sound_id +} // namespace ambients +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_AMBIENTS_SOUND_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_AMBIENTS_SOUND_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_detail.cpp b/src/xrEngine/editor_environment_detail.cpp index 546e56a49d4..dc3116e5079 100644 --- a/src/xrEngine/editor_environment_detail.cpp +++ b/src/xrEngine/editor_environment_detail.cpp @@ -63,4 +63,4 @@ shared_str editor::environment::detail::real_path(LPCSTR folder, LPCSTR path) return (result); } -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR diff --git a/src/xrEngine/editor_environment_detail.hpp b/src/xrEngine/editor_environment_detail.hpp index 60ca0b0bbda..f04e8208138 100644 --- a/src/xrEngine/editor_environment_detail.hpp +++ b/src/xrEngine/editor_environment_detail.hpp @@ -21,14 +21,14 @@ struct logical_string_predicate { bool operator()(LPCSTR const& first, LPCSTR const& second) const; bool operator()(shared_str const& first, shared_str const& second) const; -}; // struct logical_string_predicate +}; // struct logical_string_predicate shared_str real_path(LPCSTR folder, LPCSTR path); -} // namespace detail -} // namespace environment -} // namespace editor +} // namespace detail +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_ENVIRONMENT_DETAIL_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_ENVIRONMENT_DETAIL_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_effects_effect.cpp b/src/xrEngine/editor_environment_effects_effect.cpp index 2b76676ba68..1d7e1f39fd6 100644 --- a/src/xrEngine/editor_environment_effects_effect.cpp +++ b/src/xrEngine/editor_environment_effects_effect.cpp @@ -151,4 +151,4 @@ editor::property_holder* effect::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_effects_effect.hpp b/src/xrEngine/editor_environment_effects_effect.hpp index ad90f233787..ef8f4919cda 100644 --- a/src/xrEngine/editor_environment_effects_effect.hpp +++ b/src/xrEngine/editor_environment_effects_effect.hpp @@ -57,12 +57,12 @@ class effect : public CEnvAmbient::SEffect, public editor::property_holder_holde public: manager const& m_manager; -}; // class effect +}; // class effect -} // namespace effects -} // namespace environment -} // namespace editor +} // namespace effects +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_EFFECTS_EFFECT_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_EFFECTS_EFFECT_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_effects_manager.cpp b/src/xrEngine/editor_environment_effects_manager.cpp index f7a40be2063..17667f759c0 100644 --- a/src/xrEngine/editor_environment_effects_manager.cpp +++ b/src/xrEngine/editor_environment_effects_manager.cpp @@ -110,4 +110,4 @@ shared_str manager::unique_id(shared_str const& id) const return (m_collection->generate_unique_id(id.c_str())); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_effects_manager.hpp b/src/xrEngine/editor_environment_effects_manager.hpp index 480657aedf1..4f7e9f933ed 100644 --- a/src/xrEngine/editor_environment_effects_manager.hpp +++ b/src/xrEngine/editor_environment_effects_manager.hpp @@ -56,12 +56,12 @@ class manager : private Noncopyable property_holder_type* m_property_holder; collection_type* m_collection; mutable bool m_changed; -}; // class effects_manager +}; // class effects_manager -} // namespace effects -} // namespace environment -} // namespace editor +} // namespace effects +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_EFFECTS_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_EFFECTS_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_levels_manager.cpp b/src/xrEngine/editor_environment_levels_manager.cpp index 5b54db68057..950654bcf40 100644 --- a/src/xrEngine/editor_environment_levels_manager.cpp +++ b/src/xrEngine/editor_environment_levels_manager.cpp @@ -115,4 +115,4 @@ void manager::fill() ::ide().environment_levels(m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_levels_manager.hpp b/src/xrEngine/editor_environment_levels_manager.hpp index a6c3c224e79..fb69bede666 100644 --- a/src/xrEngine/editor_environment_levels_manager.hpp +++ b/src/xrEngine/editor_environment_levels_manager.hpp @@ -23,7 +23,7 @@ namespace environment namespace weathers { class manager; -} // namespace weathers +} // namespace weathers namespace levels { @@ -50,7 +50,7 @@ class manager : private Noncopyable { return (xr_strcmp(left.c_str(), right.c_str()) < 0); } - }; // struct predicate + }; // struct predicate typedef AssociativeVector, predicate> levels_container_type; @@ -60,12 +60,12 @@ class manager : private Noncopyable CInifile* m_config_single; CInifile* m_config_mp; editor::property_holder* m_property_holder; -}; // class levels_manager +}; // class levels_manager -} // namespace levels -} // namespace environment -} // namespace editor +} // namespace levels +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_LEVELS_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_LEVELS_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_manager.cpp b/src/xrEngine/editor_environment_manager.cpp index eb466e5fd79..e36a604046a 100644 --- a/src/xrEngine/editor_environment_manager.cpp +++ b/src/xrEngine/editor_environment_manager.cpp @@ -237,9 +237,9 @@ CLensFlareDescriptor* manager::add_flare(xr_vector& colle NODEFAULT; #ifdef DEBUG return (0); -#endif // #ifdef DEBUG -#endif // #if 0 +#endif // #ifdef DEBUG +#endif // #if 0 return (inherited::add_flare(collection, id)); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_manager.hpp b/src/xrEngine/editor_environment_manager.hpp index 102f3075fa1..09a03652024 100644 --- a/src/xrEngine/editor_environment_manager.hpp +++ b/src/xrEngine/editor_environment_manager.hpp @@ -21,42 +21,42 @@ namespace environment { namespace detail { -} // namespace detail +} // namespace detail namespace suns { class manager; -} // namespace suns +} // namespace suns namespace effects { class manager; -} // namespace effects +} // namespace effects namespace levels { class manager; -} // namespace levels +} // namespace levels namespace sound_channels { class manager; -} // namespace sound_channels +} // namespace sound_channels namespace ambients { class manager; -} // namespace ambients +} // namespace ambients namespace thunderbolts { class manager; -} // namespace thunderbolts +} // namespace thunderbolts namespace weathers { class manager; -} // namespace weathers +} // namespace weathers class manager : public ::CEnvironment { @@ -151,10 +151,10 @@ class manager : public ::CEnvironment ambients_manager_type* m_ambients; thunderbolts_manager_type* m_thunderbolts; weathers_manager_type* m_weathers; -}; // class manager -} // namespace environment -} // namespace editor +}; // class manager +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_ENVIRONMENT_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_ENVIRONMENT_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_sound_channels_channel.cpp b/src/xrEngine/editor_environment_sound_channels_channel.cpp index 740c0df3b77..6d223580d2c 100644 --- a/src/xrEngine/editor_environment_sound_channels_channel.cpp +++ b/src/xrEngine/editor_environment_sound_channels_channel.cpp @@ -153,4 +153,4 @@ CEnvAmbient::SSndChannel::sounds_type& channel::sounds() return (inherited::sounds()); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_sound_channels_channel.hpp b/src/xrEngine/editor_environment_sound_channels_channel.hpp index 8886c9b437a..8a05270e340 100644 --- a/src/xrEngine/editor_environment_sound_channels_channel.hpp +++ b/src/xrEngine/editor_environment_sound_channels_channel.hpp @@ -60,11 +60,11 @@ class channel : public CEnvAmbient::SSndChannel, public editor::property_holder_ property_holder_type* m_property_holder; collection_type* m_collection; sound_container_type m_sounds; -}; // class channel -} // namespace sound_channels -} // namespace environment -} // namespace editor +}; // class channel +} // namespace sound_channels +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SOUND_CHANNELS_CHANNEL_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SOUND_CHANNELS_CHANNEL_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_sound_channels_manager.cpp b/src/xrEngine/editor_environment_sound_channels_manager.cpp index d7a62251373..6ce007e47ae 100644 --- a/src/xrEngine/editor_environment_sound_channels_manager.cpp +++ b/src/xrEngine/editor_environment_sound_channels_manager.cpp @@ -117,4 +117,4 @@ shared_str manager::unique_id(shared_str const& id) const return (m_collection->generate_unique_id(id.c_str())); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_sound_channels_manager.hpp b/src/xrEngine/editor_environment_sound_channels_manager.hpp index 5bd3acb26b2..7c96ef10067 100644 --- a/src/xrEngine/editor_environment_sound_channels_manager.hpp +++ b/src/xrEngine/editor_environment_sound_channels_manager.hpp @@ -51,11 +51,11 @@ class manager : private Noncopyable property_holder_type* m_property_holder; collection_type* m_collection; mutable bool m_changed; -}; // class manager -} // namespace sound_channels -} // namespace environment -} // namespace editor +}; // class manager +} // namespace sound_channels +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SOUND_CHANNELS_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SOUND_CHANNELS_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_sound_channels_source.cpp b/src/xrEngine/editor_environment_sound_channels_source.cpp index 2d5be799086..5dfdd4bf601 100644 --- a/src/xrEngine/editor_environment_sound_channels_source.cpp +++ b/src/xrEngine/editor_environment_sound_channels_source.cpp @@ -41,4 +41,4 @@ source::property_holder_type* source::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_sound_channels_source.hpp b/src/xrEngine/editor_environment_sound_channels_source.hpp index 7ce348cc8aa..45410e53d2e 100644 --- a/src/xrEngine/editor_environment_sound_channels_source.hpp +++ b/src/xrEngine/editor_environment_sound_channels_source.hpp @@ -38,11 +38,11 @@ class source : public editor::property_holder_holder, private Noncopyable private: property_holder_type* m_property_holder; shared_str m_source; -}; // class source -} // namespace sound_channels -} // namespace environment -} // namespace editor +}; // class source +} // namespace sound_channels +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SOUND_CHANNELS_SOURCE_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SOUND_CHANNELS_SOURCE_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_blend.cpp b/src/xrEngine/editor_environment_suns_blend.cpp index 131263492bc..bce1b524c32 100644 --- a/src/xrEngine/editor_environment_suns_blend.cpp +++ b/src/xrEngine/editor_environment_suns_blend.cpp @@ -39,4 +39,4 @@ void blend::fill( properties->add_property("time", "blend", "this option is resposible for the blend time", m_time, m_time); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_blend.hpp b/src/xrEngine/editor_environment_suns_blend.hpp index e1fbcd72931..58bd00e5c7c 100644 --- a/src/xrEngine/editor_environment_suns_blend.hpp +++ b/src/xrEngine/editor_environment_suns_blend.hpp @@ -36,12 +36,12 @@ class blend : private Noncopyable float m_down_time; float m_rise_time; float m_time; -}; // class blend +}; // class blend -} // namespace suns -} // namespace environment -} // namespace editor +} // namespace suns +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SUNS_BLEND_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SUNS_BLEND_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_flare.cpp b/src/xrEngine/editor_environment_suns_flare.cpp index b803ebaf067..3ef6448d509 100644 --- a/src/xrEngine/editor_environment_suns_flare.cpp +++ b/src/xrEngine/editor_environment_suns_flare.cpp @@ -49,4 +49,4 @@ void flare::fill(editor::property_holder_collection* collection) properties->add_property("radius", "flare", "this option is resposible for gradient radius", m_radius, m_radius); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_flare.hpp b/src/xrEngine/editor_environment_suns_flare.hpp index 1df11c9bb38..f986e972dd8 100644 --- a/src/xrEngine/editor_environment_suns_flare.hpp +++ b/src/xrEngine/editor_environment_suns_flare.hpp @@ -41,12 +41,12 @@ class flare : public editor::property_holder_holder, private Noncopyable float m_opacity; float m_position; float m_radius; -}; // class flare +}; // class flare -} // namespace suns -} // namespace environment -} // namespace editor +} // namespace suns +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_FLARE_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_FLARE_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_flares.cpp b/src/xrEngine/editor_environment_suns_flares.cpp index 3ffacc1171e..792c7a88e12 100644 --- a/src/xrEngine/editor_environment_suns_flares.cpp +++ b/src/xrEngine/editor_environment_suns_flares.cpp @@ -60,9 +60,9 @@ void flares::load(CInifile& config, shared_str const& section) READ_IF_EXISTS(&config, r_string, section, "flare_position", "1.300, 1.000, 0.500, -0.300, -0.600, -1.000"); shared_str flare_radius = READ_IF_EXISTS(&config, r_string, section, "flare_radius", "0.080, 0.120, 0.040, 0.080, 0.120, 0.300"); - shared_str flare_textures = READ_IF_EXISTS( - &config, r_string, section, "flare_textures", "fx\\fx_flare1.tga, fx\\fx_flare2.tga, fx\\fx_flare2.tga, " - "fx\\fx_flare2.tga, fx\\fx_flare3.tga, fx\\fx_flare1.tga"); + shared_str flare_textures = READ_IF_EXISTS(&config, r_string, section, "flare_textures", + "fx\\fx_flare1.tga, fx\\fx_flare2.tga, fx\\fx_flare2.tga, " + "fx\\fx_flare2.tga, fx\\fx_flare3.tga, fx\\fx_flare1.tga"); u32 opacity_count = _GetItemCount(flare_opacity.c_str()); u32 position_count = _GetItemCount(flare_position.c_str()); @@ -106,4 +106,4 @@ void flares::fill( properties->add_property("flares", "flares", "this option is resposible for flares", m_collection); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_flares.hpp b/src/xrEngine/editor_environment_suns_flares.hpp index df3add19ac1..fbb35256fc6 100644 --- a/src/xrEngine/editor_environment_suns_flares.hpp +++ b/src/xrEngine/editor_environment_suns_flares.hpp @@ -47,12 +47,12 @@ class flares : private Noncopyable shared_str m_shader; collection_type* m_collection; bool m_use; -}; // class flares +}; // class flares -} // namespace suns -} // namespace environment -} // namespace editor +} // namespace suns +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SUNS_FLARES_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SUNS_FLARES_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_gradient.cpp b/src/xrEngine/editor_environment_suns_gradient.cpp index f314e5b142f..5d2316a91b3 100644 --- a/src/xrEngine/editor_environment_suns_gradient.cpp +++ b/src/xrEngine/editor_environment_suns_gradient.cpp @@ -75,4 +75,4 @@ void gradient::fill(manager const& manager, property_holder* holder, property_ho "Select texture...", editor::property_holder::cannot_enter_text, editor::property_holder::remove_extension); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_gradient.hpp b/src/xrEngine/editor_environment_suns_gradient.hpp index b22e3c3c31b..8e1b37e1d95 100644 --- a/src/xrEngine/editor_environment_suns_gradient.hpp +++ b/src/xrEngine/editor_environment_suns_gradient.hpp @@ -42,12 +42,12 @@ class gradient : private Noncopyable float m_radius; shared_str m_shader; shared_str m_texture; -}; // class gradient +}; // class gradient -} // namespace suns -} // namespace environment -} // namespace editor +} // namespace suns +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SUNS_GRADIENT_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SUNS_GRADIENT_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_manager.cpp b/src/xrEngine/editor_environment_suns_manager.cpp index 36fcefe8d90..d92f709d4e4 100644 --- a/src/xrEngine/editor_environment_suns_manager.cpp +++ b/src/xrEngine/editor_environment_suns_manager.cpp @@ -141,7 +141,7 @@ struct predicate IC predicate(shared_str const& id) : m_id(id) {} IC bool operator()(sun* const& sun) const { return (sun->id()._get() == m_id._get()); } -}; // struct predicate +}; // struct predicate CLensFlareDescriptor* manager::get_flare(shared_str const& id) const { @@ -151,4 +151,4 @@ CLensFlareDescriptor* manager::get_flare(shared_str const& id) const return (0); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_manager.hpp b/src/xrEngine/editor_environment_suns_manager.hpp index 49fca922dd1..b12d09216d7 100644 --- a/src/xrEngine/editor_environment_suns_manager.hpp +++ b/src/xrEngine/editor_environment_suns_manager.hpp @@ -60,12 +60,12 @@ class manager : private Noncopyable public: environment::manager const& m_environment; -}; // class suns_manager +}; // class suns_manager -} // namespace suns -} // namespace environment -} // namespace editor +} // namespace suns +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SUNS_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SUNS_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_sun.cpp b/src/xrEngine/editor_environment_suns_sun.cpp index 3605bb7c3fb..ac4be42a870 100644 --- a/src/xrEngine/editor_environment_suns_sun.cpp +++ b/src/xrEngine/editor_environment_suns_sun.cpp @@ -99,4 +99,4 @@ property_holder* sun::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_suns_sun.hpp b/src/xrEngine/editor_environment_suns_sun.hpp index 0d5d2c0504e..51a6c33b80a 100644 --- a/src/xrEngine/editor_environment_suns_sun.hpp +++ b/src/xrEngine/editor_environment_suns_sun.hpp @@ -53,12 +53,12 @@ class sun : public CLensFlare, public editor::property_holder_holder, private No float m_radius; bool m_use; bool m_ignore_color; -}; // class sun +}; // class sun -} // namespace suns -} // namespace environment -} // namespace editor +} // namespace suns +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_SUNS_SUN_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_SUNS_SUN_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_collection.cpp b/src/xrEngine/editor_environment_thunderbolts_collection.cpp index 0e0398e7292..93351ac7767 100644 --- a/src/xrEngine/editor_environment_thunderbolts_collection.cpp +++ b/src/xrEngine/editor_environment_thunderbolts_collection.cpp @@ -116,4 +116,4 @@ property_holder* collection::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_collection.hpp b/src/xrEngine/editor_environment_thunderbolts_collection.hpp index c3cdcf8f704..4fadd0e7c9a 100644 --- a/src/xrEngine/editor_environment_thunderbolts_collection.hpp +++ b/src/xrEngine/editor_environment_thunderbolts_collection.hpp @@ -57,11 +57,11 @@ class collection : public SThunderboltCollection, public editor::property_holder public: manager const& m_manager; -}; // class collection -} // namespace thunderbolts -} // namespace environment -} // namespace editor +}; // class collection +} // namespace thunderbolts +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_COLLECTION_ID_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_COLLECTION_ID_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_gradient.cpp b/src/xrEngine/editor_environment_thunderbolts_gradient.cpp index f0cf5a3090b..6e8cd55e56c 100644 --- a/src/xrEngine/editor_environment_thunderbolts_gradient.cpp +++ b/src/xrEngine/editor_environment_thunderbolts_gradient.cpp @@ -103,4 +103,4 @@ void gradient::fill( detail::real_path("$game_textures$", "").c_str(), "Select texture...", editor::property_holder::cannot_enter_text, editor::property_holder::remove_extension); } -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR diff --git a/src/xrEngine/editor_environment_thunderbolts_gradient.hpp b/src/xrEngine/editor_environment_thunderbolts_gradient.hpp index bbdf01f5160..2ed360f771e 100644 --- a/src/xrEngine/editor_environment_thunderbolts_gradient.hpp +++ b/src/xrEngine/editor_environment_thunderbolts_gradient.hpp @@ -44,12 +44,12 @@ class gradient : public SThunderboltDesc::SFlare, private Noncopyable private: property_holder* m_property_holder; -}; // class gradient +}; // class gradient -} // namespace thunderbolts -} // namespace environment -} // namespace editor +} // namespace thunderbolts +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_GRADIENT_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_GRADIENT_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_manager.cpp b/src/xrEngine/editor_environment_thunderbolts_manager.cpp index 6a96743c9d3..0472a1542e3 100644 --- a/src/xrEngine/editor_environment_thunderbolts_manager.cpp +++ b/src/xrEngine/editor_environment_thunderbolts_manager.cpp @@ -325,7 +325,7 @@ SThunderboltDesc* manager::description(CInifile& config, shared_str const& secti NODEFAULT; #ifdef DEBUG return (0); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } SThunderboltCollection* manager::get_collection(shared_str const& section) @@ -338,7 +338,7 @@ SThunderboltCollection* manager::get_collection(shared_str const& section) NODEFAULT; #ifdef DEBUG return (0); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_manager.hpp b/src/xrEngine/editor_environment_thunderbolts_manager.hpp index 4efe1175640..835576107d5 100644 --- a/src/xrEngine/editor_environment_thunderbolts_manager.hpp +++ b/src/xrEngine/editor_environment_thunderbolts_manager.hpp @@ -89,11 +89,11 @@ class manager : private Noncopyable mutable collections_ids_type m_collections_ids; property_holder_type* m_property_holder; ::editor::environment::manager& m_environment; -}; // class manager -} // namespace thunderbolts -} // namespace environment -} // namespace editor +}; // class manager +} // namespace thunderbolts +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_thunderbolt.cpp b/src/xrEngine/editor_environment_thunderbolts_thunderbolt.cpp index 34c39c37bc5..03430eb60ca 100644 --- a/src/xrEngine/editor_environment_thunderbolts_thunderbolt.cpp +++ b/src/xrEngine/editor_environment_thunderbolts_thunderbolt.cpp @@ -113,4 +113,4 @@ thunderbolt::property_holder_type* thunderbolt::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_thunderbolt.hpp b/src/xrEngine/editor_environment_thunderbolts_thunderbolt.hpp index a2faa8614e9..4f6a225083b 100644 --- a/src/xrEngine/editor_environment_thunderbolts_thunderbolt.hpp +++ b/src/xrEngine/editor_environment_thunderbolts_thunderbolt.hpp @@ -62,12 +62,12 @@ class thunderbolt : public SThunderboltDesc, public editor::property_holder_hold shared_str m_color_animator; shared_str m_lighting_model; shared_str m_sound; -}; // class thunderbolt +}; // class thunderbolt -} // namespace thunderbolts -} // namespace environment -} // namespace editor +} // namespace thunderbolts +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_THUNDERBOLT_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_THUNDERBOLT_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.cpp b/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.cpp index 081a021a2f7..6c356c8ecef 100644 --- a/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.cpp +++ b/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.cpp @@ -61,4 +61,4 @@ thunderbolt_id::property_holder_type* thunderbolt_id::object() return (m_property_holder); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.hpp b/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.hpp index 648edf381e0..34385c69711 100644 --- a/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.hpp +++ b/src/xrEngine/editor_environment_thunderbolts_thunderbolt_id.hpp @@ -45,11 +45,11 @@ class thunderbolt_id : public editor::property_holder_holder, private Noncopyabl property_holder_type* m_property_holder; manager const& m_manager; shared_str m_id; -}; // class thunderbolt_id -} // namespace thunderbolts -} // namespace environment -} // namespace editor +}; // class thunderbolt_id +} // namespace thunderbolts +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_THUNDERBOLT_ID_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_WEATHER_THUNDERBOLTS_THUNDERBOLT_ID_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_weathers_manager.cpp b/src/xrEngine/editor_environment_weathers_manager.cpp index 4761fdbf80e..120bcfd8d20 100644 --- a/src/xrEngine/editor_environment_weathers_manager.cpp +++ b/src/xrEngine/editor_environment_weathers_manager.cpp @@ -108,7 +108,7 @@ struct predicate inline predicate(LPCSTR const& value_) : value(value_) {} inline bool operator()(weather const* weather) const { return (value._get() == weather->id()._get()); } -}; // struct predicate +}; // struct predicate LPCSTR const* manager::frames_getter(LPCSTR weather_id) const { @@ -309,4 +309,4 @@ void manager::reload() load(); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_weathers_manager.hpp b/src/xrEngine/editor_environment_weathers_manager.hpp index bbed55b1fa1..a92c259a89f 100644 --- a/src/xrEngine/editor_environment_weathers_manager.hpp +++ b/src/xrEngine/editor_environment_weathers_manager.hpp @@ -71,11 +71,11 @@ class manager : private Noncopyable public: environment::manager& m_manager; mutable bool m_changed; -}; // class manager -} // namespace weathers -} // namespace environment -} // namespace editor +}; // class manager +} // namespace weathers +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_ENVIRONMENT_WEATHERS_MANAGER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_ENVIRONMENT_WEATHERS_MANAGER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_weathers_time.cpp b/src/xrEngine/editor_environment_weathers_time.cpp index 3ff642243cb..d775e4659a7 100644 --- a/src/xrEngine/editor_environment_weathers_time.cpp +++ b/src/xrEngine/editor_environment_weathers_time.cpp @@ -481,4 +481,4 @@ void time::lerp(CEnvironment* parent, CEnvDescriptor& A, CEnvDescriptor& B, floa inherited::lerp(parent, A, B, f, M, m_power); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_weathers_time.hpp b/src/xrEngine/editor_environment_weathers_time.hpp index 27ee271aa41..05f3403f185 100644 --- a/src/xrEngine/editor_environment_weathers_time.hpp +++ b/src/xrEngine/editor_environment_weathers_time.hpp @@ -84,11 +84,11 @@ class time : public CEnvDescriptorMixer, public editor::property_holder_holder, editor::environment::manager& m_manager; weather const* m_weather; property_holder_type* m_property_holder; -}; // class time -} // namespace weathers -} // namespace environment -} // namespace editor +}; // class time +} // namespace weathers +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_ENVIRONMENT_WEATHERS_TIME_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_ENVIRONMENT_WEATHERS_TIME_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/editor_environment_weathers_weather.cpp b/src/xrEngine/editor_environment_weathers_weather.cpp index 10c7c3ad879..4c04f4df57b 100644 --- a/src/xrEngine/editor_environment_weathers_weather.cpp +++ b/src/xrEngine/editor_environment_weathers_weather.cpp @@ -307,7 +307,7 @@ bool weather::add_time_frame(char const* buffer, u32 const& buffer_size) { return (xr_strcmp(time->id(), id) < 0); } - }; // struct id + }; // struct id container_type::iterator found = std::lower_bound(m_times.begin(), m_times.end(), section, &id::predicate); @@ -346,4 +346,4 @@ void weather::reload() load(); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/editor_environment_weathers_weather.hpp b/src/xrEngine/editor_environment_weathers_weather.hpp index 83926032b64..42b155ac8a9 100644 --- a/src/xrEngine/editor_environment_weathers_weather.hpp +++ b/src/xrEngine/editor_environment_weathers_weather.hpp @@ -74,11 +74,11 @@ class weather : public editor::property_holder_holder, private Noncopyable public: environment::manager& m_manager; -}; // class weather -} // namespace weathers -} // namespace environment -} // namespace editor +}; // class weather +} // namespace weathers +} // namespace environment +} // namespace editor -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef EDITOR_ENVIRONMENT_WEATHERS_WEATHER_HPP_INCLUDED \ No newline at end of file +#endif // ifndef EDITOR_ENVIRONMENT_WEATHERS_WEATHER_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/engine_impl.cpp b/src/xrEngine/engine_impl.cpp index aee279c14c3..3b91ae32bf3 100644 --- a/src/xrEngine/engine_impl.cpp +++ b/src/xrEngine/engine_impl.cpp @@ -381,4 +381,4 @@ void engine_impl::reload_weathers() g_pGamePersistent->Environment().SelectEnvs(game_time + .1f); } -#endif // #ifdef INGAME_EDITOR \ No newline at end of file +#endif // #ifdef INGAME_EDITOR \ No newline at end of file diff --git a/src/xrEngine/engine_impl.hpp b/src/xrEngine/engine_impl.hpp index 1ba80bd1e8f..5d5a4b02185 100644 --- a/src/xrEngine/engine_impl.hpp +++ b/src/xrEngine/engine_impl.hpp @@ -76,8 +76,8 @@ class engine_impl : public editor::engine private: IInputReceiver* m_input_receiver; bool m_input_captured; -}; // class engine_impl +}; // class engine_impl -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef ENGINE_IMPL_HPP_INCLUDED \ No newline at end of file +#endif // ifndef ENGINE_IMPL_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/ide.hpp b/src/xrEngine/ide.hpp index bfab7a44a7d..7fa9e451f76 100644 --- a/src/xrEngine/ide.hpp +++ b/src/xrEngine/ide.hpp @@ -16,7 +16,7 @@ namespace editor { class ide; -} // namespace editor +} // namespace editor inline editor::ide& ide() { @@ -24,6 +24,6 @@ inline editor::ide& ide() return (*Device.editor()); } -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR -#endif // ifndef IDE_HPP_INCLUDED \ No newline at end of file +#endif // ifndef IDE_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/line_edit_control.cpp b/src/xrEngine/line_edit_control.cpp index a2e8609f904..20a867b77ca 100644 --- a/src/xrEngine/line_edit_control.cpp +++ b/src/xrEngine/line_edit_control.cpp @@ -116,9 +116,9 @@ static inline bool get_caps_lock_state() if (is_windows_vista_or_later) return !!(GetKeyState(VK_CAPITAL) & 1); else -#else // #if 0 +#else // #if 0 return false; -#endif // #if 0 +#endif // #if 0 } void line_edit_control::update_key_states() @@ -240,7 +240,7 @@ void line_edit_control::init(u32 str_buffer_size, init_mode mode) assign_callback(DIK_LSHIFT, ks_Ctrl, Callback(this, &line_edit_control::SwitchKL)); assign_callback(DIK_LSHIFT, ks_Alt, Callback(this, &line_edit_control::SwitchKL)); - } // if mode + } // if mode create_key_state(DIK_LSHIFT, ks_LShift); create_key_state(DIK_RSHIFT, ks_RShift); @@ -511,7 +511,7 @@ void line_edit_control::on_frame() } m_rep_time += dt * m_accel; - if (m_rep_time > g_console_sensitive) // 0.2 + if (m_rep_time > g_console_sensitive) // 0.2 { m_rep_time = 0.0f; m_repeat_mode = true; @@ -566,7 +566,7 @@ void line_edit_control::add_inserted_text() PSTR buf = (PSTR)_alloca((m_buffer_size + 1) * sizeof(char)); - strncpy_s(buf, m_buffer_size, m_edit_str, m_p1); // part 1 + strncpy_s(buf, m_buffer_size, m_edit_str, m_p1); // part 1 strncpy_s(m_undo_buf, m_buffer_size, m_edit_str + m_p1, m_p2 - m_p1); int new_size = (int)xr_strlen(m_inserted); @@ -574,16 +574,16 @@ void line_edit_control::add_inserted_text() m_inserted[m_buffer_size - 1 - m_p1] = 0; new_size = xr_strlen(m_inserted); } - strncpy_s(buf + m_p1, m_buffer_size, m_inserted, _min(new_size, m_buffer_size - m_p1)); // part 2 + strncpy_s(buf + m_p1, m_buffer_size, m_inserted, _min(new_size, m_buffer_size - m_p1)); // part 2 u8 ds = (m_insert_mode && m_p2 < old_edit_size) ? 1 : 0; strncpy_s(buf + m_p1 + new_size, m_buffer_size, m_edit_str + m_p2 + ds, - _min(old_edit_size - m_p2 - ds, m_buffer_size - m_p1 - new_size)); // part 3 + _min(old_edit_size - m_p2 - ds, m_buffer_size - m_p1 - new_size)); // part 3 buf[m_buffer_size] = 0; int szn = m_p1 + new_size + old_edit_size - m_p2 - ds; if (szn < m_buffer_size) { - strncpy_s(m_edit_str, m_buffer_size, buf, szn); // part 1+2+3 + strncpy_s(m_edit_str, m_buffer_size, buf, szn); // part 1+2+3 m_edit_str[m_buffer_size - 1] = 0; m_cur_pos = m_p1 + new_size; } @@ -774,7 +774,7 @@ void line_edit_control::SwitchKL() // ------------------------------------------------------------------------------------------------- -void remove_spaces(PSTR str) // in & out +void remove_spaces(PSTR str) // in & out { u32 str_size = xr_strlen(str); if (str_size < 1) { @@ -840,4 +840,4 @@ void split_cmd(PSTR first, PSTR second, LPCSTR str) } } -} // namespace text_editor \ No newline at end of file +} // namespace text_editor \ No newline at end of file diff --git a/src/xrEngine/line_edit_control.h b/src/xrEngine/line_edit_control.h index 2d1fe7093de..92071875601 100644 --- a/src/xrEngine/line_edit_control.h +++ b/src/xrEngine/line_edit_control.h @@ -10,12 +10,12 @@ namespace text_editor { -void remove_spaces(PSTR str); // in & out +void remove_spaces(PSTR str); // in & out void split_cmd(PSTR first, PSTR second, LPCSTR str); class base; -enum key_state // Flags32 +enum key_state // Flags32 { ks_free = u32(0), ks_LShift = u32(1) << 0, @@ -32,17 +32,17 @@ enum key_state // Flags32 ks_force = u32(-1) -}; // enum key_state +}; // enum key_state enum init_mode { im_standart = 0, im_number_only, im_read_only, - im_file_name_mode, // not "/\\:*?\"<>|^()[]%" + im_file_name_mode, // not "/\\:*?\"<>|^()[]%" im_count -}; // init_mode +}; // init_mode class ENGINE_API line_edit_control { @@ -161,8 +161,8 @@ class ENGINE_API line_edit_control bool m_cursor_view; bool m_need_update; bool m_unselected_mode; -}; // class line_edit_control +}; // class line_edit_control -} // namespace text_editor +} // namespace text_editor -#endif // ##ifndef LINE_EDIT_CONTROL_H_INCLUDED +#endif // ##ifndef LINE_EDIT_CONTROL_H_INCLUDED diff --git a/src/xrEngine/line_editor.cpp b/src/xrEngine/line_editor.cpp index b0f1e3ca450..c3800b3424f 100644 --- a/src/xrEngine/line_editor.cpp +++ b/src/xrEngine/line_editor.cpp @@ -38,4 +38,4 @@ void line_editor::IR_OnKeyboardRelease(int dik) m_control.on_key_release(dik); } -} // namespace text_editor +} // namespace text_editor diff --git a/src/xrEngine/line_editor.h b/src/xrEngine/line_editor.h index 7c2774c76d6..40f3764e7a5 100644 --- a/src/xrEngine/line_editor.h +++ b/src/xrEngine/line_editor.h @@ -30,8 +30,8 @@ class line_editor : public IInputReceiver private: line_edit_control m_control; -}; // class line_editor +}; // class line_editor -} // namespace text_editor +} // namespace text_editor -#endif // LINE_EDITOR_H_INCLUDED +#endif // LINE_EDITOR_H_INCLUDED diff --git a/src/xrEngine/mailSlot.cpp b/src/xrEngine/mailSlot.cpp index 72008bc94a4..9d2db22e878 100644 --- a/src/xrEngine/mailSlot.cpp +++ b/src/xrEngine/mailSlot.cpp @@ -12,9 +12,9 @@ void msCreate(LPCSTR name) string256 fn; xr_sprintf(fn, sizeof(fn), "\\\\.\\mailslot\\%s", name); hLocalSlot = CreateMailslot(fn, - 0, // no maximum message size - MAILSLOT_WAIT_FOREVER, // no time-out for operations - (LPSECURITY_ATTRIBUTES)NULL); // no security attributes + 0, // no maximum message size + MAILSLOT_WAIT_FOREVER, // no time-out for operations + (LPSECURITY_ATTRIBUTES)NULL); // no security attributes if (hLocalSlot == INVALID_HANDLE_VALUE) return; // Msg ("* mailSLOT successfully created."); } @@ -26,14 +26,14 @@ void msRead(void) LPSTR lpszBuffer; cbMessage = cMessage = cbRead = 0; - fResult = GetMailslotInfo(hLocalSlot, // mailslot handle - (LPDWORD)NULL, // no maximum message size - &cbMessage, // size of next message - &cMessage, // number of messages - (LPDWORD)NULL); // no read time-out + fResult = GetMailslotInfo(hLocalSlot, // mailslot handle + (LPDWORD)NULL, // no maximum message size + &cbMessage, // size of next message + &cMessage, // number of messages + (LPDWORD)NULL); // no read time-out if (!fResult) return; if (cbMessage == MAILSLOT_NO_MESSAGE) return; - while (cMessage != 0) // retrieve all messages + while (cMessage != 0) // retrieve all messages { // Allocate memory for the message. lpszBuffer = (LPSTR)GlobalAlloc(GPTR, cbMessage); @@ -45,11 +45,11 @@ void msRead(void) } msParse(lpszBuffer); GlobalFree((HGLOBAL)lpszBuffer); - fResult = GetMailslotInfo(hLocalSlot, // mailslot handle - (LPDWORD)NULL, // no maximum message size - &cbMessage, // size of next message - &cMessage, // number of messages - (LPDWORD)NULL); // no read time-out + fResult = GetMailslotInfo(hLocalSlot, // mailslot handle + (LPDWORD)NULL, // no maximum message size + &cbMessage, // size of next message + &cMessage, // number of messages + (LPDWORD)NULL); // no read time-out if (!fResult) return; } } @@ -63,7 +63,7 @@ void msWrite(char* name, char* dest, char* msg) xr_sprintf(cName, sizeof(cName), "\\\\%s\\mailslot\\%s", name, dest); hFile = CreateFile(cName, GENERIC_WRITE, - FILE_SHARE_READ, // required to write to a mailslot + FILE_SHARE_READ, // required to write to a mailslot (LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE)NULL); if (hFile == INVALID_HANDLE_VALUE) return; fResult = WriteFile(hFile, msg, (u32)lstrlen(msg) + 1, &cbWritten, (LPOVERLAPPED)NULL); diff --git a/src/xrEngine/main.cpp b/src/xrEngine/main.cpp index dc490a05d3b..566004a1e58 100644 --- a/src/xrEngine/main.cpp +++ b/src/xrEngine/main.cpp @@ -379,7 +379,7 @@ int RunApplication(const char* commandLine) #else Console->Execute("renderer renderer_r1"); #endif - InitEngineExt(); // load xrRender and xrGame + InitEngineExt(); // load xrRender and xrGame Startup(); Core._destroy(); // check for need to execute something external diff --git a/src/xrEngine/mp_logging.h b/src/xrEngine/mp_logging.h index 40ecf8d8991..b896f8f0c25 100644 --- a/src/xrEngine/mp_logging.h +++ b/src/xrEngine/mp_logging.h @@ -9,4 +9,4 @@ #define MP_LOGGING #endif -#endif //#ifndef MP_LOGGING_H +#endif //#ifndef MP_LOGGING_H diff --git a/src/xrEngine/profiler.cpp b/src/xrEngine/profiler.cpp index 509a3bbbf69..f2f726eac43 100644 --- a/src/xrEngine/profiler.cpp +++ b/src/xrEngine/profiler.cpp @@ -28,7 +28,7 @@ void add_profile_portion (LPCSTR id, const u64 &time) profiler().add_profile_portion (temp); } -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS CProfiler *g_profiler = 0; LPCSTR indent = " "; @@ -44,7 +44,7 @@ struct CProfilePortionPredicate { CProfiler::CProfiler () #ifdef CONFIG_PROFILE_LOCKS :m_section("") -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { m_actual = true; } @@ -53,7 +53,7 @@ CProfiler::~CProfiler () { #ifdef CONFIG_PROFILE_LOCKS set_add_profile_portion (0); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS } IC u32 compute_string_length (LPCSTR str) @@ -135,7 +135,7 @@ void CProfiler::clear () #ifdef CONFIG_PROFILE_LOCKS while (InterlockedExchange(&critical_section_counter,1)) Sleep (0); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS m_section.Enter (); m_portions.clear (); @@ -146,7 +146,7 @@ void CProfiler::clear () #ifdef CONFIG_PROFILE_LOCKS InterlockedExchange (&critical_section_counter,0); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS } void CProfiler::show_stats (IGameFont &font, bool show) @@ -154,21 +154,21 @@ void CProfiler::show_stats (IGameFont &font, bool show) if (!show) { #ifdef CONFIG_PROFILE_LOCKS set_add_profile_portion (0); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS clear (); return; } #ifdef CONFIG_PROFILE_LOCKS set_add_profile_portion (&::add_profile_portion); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS ++m_call_count; #ifdef CONFIG_PROFILE_LOCKS while (InterlockedExchange(&critical_section_counter,1)) Sleep (0); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS m_section.Enter (); @@ -215,7 +215,7 @@ void CProfiler::show_stats (IGameFont &font, bool show) #ifdef CONFIG_PROFILE_LOCKS InterlockedExchange (&critical_section_counter,0); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS TIMERS::iterator I = m_timers.begin(); TIMERS::iterator E = m_timers.end(); @@ -258,7 +258,7 @@ void CProfiler::add_profile_portion (const CProfileResultPortion &profile_portio Sleep (0); } while (!InterlockedExchange(&critical_section_counter,1)); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS m_section.Enter (); m_portions.push_back (profile_portion); @@ -266,6 +266,6 @@ void CProfiler::add_profile_portion (const CProfileResultPortion &profile_portio #ifdef CONFIG_PROFILE_LOCKS InterlockedExchange (&critical_section_counter,0); -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS } #endif diff --git a/src/xrEngine/profiler.h b/src/xrEngine/profiler.h index ae760264633..70c4144b0af 100644 --- a/src/xrEngine/profiler.h +++ b/src/xrEngine/profiler.h @@ -135,7 +135,7 @@ inline CProfileStats::CProfileStats() m_call_count = 0; } -#else // !USE_PROFILER +#else // !USE_PROFILER #define START_PROFILE(a) { #define STOP_PROFILE } #endif diff --git a/src/xrEngine/property_collection.hpp b/src/xrEngine/property_collection.hpp index 92cf0f8d47c..ef79e1b0f23 100644 --- a/src/xrEngine/property_collection.hpp +++ b/src/xrEngine/property_collection.hpp @@ -66,8 +66,8 @@ class property_collection : public editor::property_holder_collection, private N container_type& m_container; holder_type& m_holder; bool* m_changed; -}; // class property_collection +}; // class property_collection #include "property_collection_inline.hpp" -#endif // #ifndef PROPERTY_COLLECTION_HPP_INCLUDED \ No newline at end of file +#endif // #ifndef PROPERTY_COLLECTION_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/property_collection_forward.hpp b/src/xrEngine/property_collection_forward.hpp index 0adacb1ef38..0912c67eab9 100644 --- a/src/xrEngine/property_collection_forward.hpp +++ b/src/xrEngine/property_collection_forward.hpp @@ -12,4 +12,4 @@ template class property_collection; -#endif // #define PROPERTY_COLLECTION_FORWARD_HPP_INCLUDED \ No newline at end of file +#endif // #define PROPERTY_COLLECTION_FORWARD_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/property_collection_inline.hpp b/src/xrEngine/property_collection_inline.hpp index 315b3a42b91..3ee58150507 100644 --- a/src/xrEngine/property_collection_inline.hpp +++ b/src/xrEngine/property_collection_inline.hpp @@ -154,4 +154,4 @@ inline void PROPERTY_COLLECTION::make_state_changed() #undef PROPERTY_COLLECTION #undef SPECIALIZATION -#endif // #ifndef PROPERTY_COLLECTION_INLINE_HPP_INCLUDED \ No newline at end of file +#endif // #ifndef PROPERTY_COLLECTION_INLINE_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrEngine/psystem.h b/src/xrEngine/psystem.h index 0a0ad3d3011..b30ee1d6d33 100644 --- a/src/xrEngine/psystem.h +++ b/src/xrEngine/psystem.h @@ -100,16 +100,16 @@ struct Particle { ANIMATE_CCW = (1 << 0), }; - pVector pos; // 12 - pVector posB; // 12 - pVector vel; // 12 - pVector size; // 12 - pVector rot; // 12 60 - u32 color; // 4 - float age; // 4 - u16 frame; // 2 - Flags16 flags; // 2 -}; // 72 + pVector pos; // 12 + pVector posB; // 12 + pVector vel; // 12 + pVector size; // 12 + pVector rot; // 12 60 + u32 color; // 4 + float age; // 4 + u16 frame; // 2 + Flags16 flags; // 2 +}; // 72 typedef void (*OnBirthParticleCB)(void* owner, u32 param, PAPI::Particle& P, u32 idx); typedef void (*OnDeadParticleCB)(void* owner, u32 param, PAPI::Particle& P, u32 idx); @@ -117,55 +117,55 @@ typedef void (*OnDeadParticleCB)(void* owner, u32 param, PAPI::Particle& P, u32 // Type codes for domains enum PDomainEnum { - PDPoint = 0, // Single point - PDLine = 1, // Line segment - PDTriangle = 2, // Triangle - PDPlane = 3, // Arbitrarily-oriented plane - PDBox = 4, // Axis-aligned box - PDSphere = 5, // Sphere - PDCylinder = 6, // Cylinder - PDCone = 7, // Cone - PDBlob = 8, // Gaussian blob - PDDisc = 9, // Arbitrarily-oriented disc - PDRectangle = 10, // Rhombus-shaped planar region + PDPoint = 0, // Single point + PDLine = 1, // Line segment + PDTriangle = 2, // Triangle + PDPlane = 3, // Arbitrarily-oriented plane + PDBox = 4, // Axis-aligned box + PDSphere = 5, // Sphere + PDCylinder = 6, // Cylinder + PDCone = 7, // Cone + PDBlob = 8, // Gaussian blob + PDDisc = 9, // Arbitrarily-oriented disc + PDRectangle = 10, // Rhombus-shaped planar region domain_enum_force_dword = u32(-1) }; ////////////////////////////////////////////////////////////////////// // Type codes for all actions enum PActionEnum { - PAAvoidID, // Avoid entering the domain of space. - PABounceID, // Bounce particles off a domain of space. - PACallActionListID_obsolette, // - PACopyVertexBID, // Set the secondary position from current position. - PADampingID, // Dampen particle velocities. - PAExplosionID, // An Explosion. - PAFollowID, // Accelerate toward the previous particle in the effect. - PAGravitateID, // Accelerate each particle toward each other particle. - PAGravityID, // Acceleration in the given direction. - PAJetID, // - PAKillOldID, // - PAMatchVelocityID, // - PAMoveID, // - PAOrbitLineID, // - PAOrbitPointID, // - PARandomAccelID, // - PARandomDisplaceID, // - PARandomVelocityID, // - PARestoreID, // - PASinkID, // - PASinkVelocityID, // - PASourceID, // - PASpeedLimitID, // - PATargetColorID, // - PATargetSizeID, // - PATargetRotateID, // - PATargetRotateDID, // - PATargetVelocityID, // - PATargetVelocityDID, // - PAVortexID, // - PATurbulenceID, // - PAScatterID, // + PAAvoidID, // Avoid entering the domain of space. + PABounceID, // Bounce particles off a domain of space. + PACallActionListID_obsolette, // + PACopyVertexBID, // Set the secondary position from current position. + PADampingID, // Dampen particle velocities. + PAExplosionID, // An Explosion. + PAFollowID, // Accelerate toward the previous particle in the effect. + PAGravitateID, // Accelerate each particle toward each other particle. + PAGravityID, // Acceleration in the given direction. + PAJetID, // + PAKillOldID, // + PAMatchVelocityID, // + PAMoveID, // + PAOrbitLineID, // + PAOrbitPointID, // + PARandomAccelID, // + PARandomDisplaceID, // + PARandomVelocityID, // + PARestoreID, // + PASinkID, // + PASinkVelocityID, // + PASourceID, // + PASpeedLimitID, // + PATargetColorID, // + PATargetSizeID, // + PATargetRotateID, // + PATargetRotateDID, // + PATargetVelocityID, // + PATargetVelocityDID, // + PAVortexID, // + PATurbulenceID, // + PAScatterID, // action_enum_force_dword = u32(-1) }; struct ParticleAction; @@ -205,4 +205,4 @@ class IParticleManager PARTICLES_API IParticleManager* ParticleManager(); }; -#endif // PSystemH +#endif // PSystemH diff --git a/src/xrEngine/pure.h b/src/xrEngine/pure.h index d05fd5b335b..f6530d2880b 100644 --- a/src/xrEngine/pure.h +++ b/src/xrEngine/pure.h @@ -18,7 +18,7 @@ typedef void __fastcall RP_FUNC(void* obj); #define DECLARE_RP(name) \ void __fastcall rp_##name(void* p) { ((pure##name*)p)->On##name(); } -DECLARE_MESSAGE(Frame); // XXX: rename to FrameStart +DECLARE_MESSAGE(Frame); // XXX: rename to FrameStart DECLARE_MESSAGE(FrameEnd); DECLARE_MESSAGE(Render); DECLARE_MESSAGE(AppActivate); @@ -39,7 +39,7 @@ struct _REG_INFO // ENGINE_API extern int __cdecl _REG_Compare(const void *, const void *); template -class CRegistrator // the registrator itself +class CRegistrator // the registrator itself { // friend ENGINE_API int __cdecl _REG_Compare(const void *, const void *); static int __cdecl _REG_Compare(const void* e1, const void* e2) diff --git a/src/xrEngine/pure_relcase.h b/src/xrEngine/pure_relcase.h index ddf333393f6..7ad782300db 100644 --- a/src/xrEngine/pure_relcase.h +++ b/src/xrEngine/pure_relcase.h @@ -17,4 +17,4 @@ class ENGINE_API pure_relcase virtual ~pure_relcase(); }; -#endif // pure_relcaseH +#endif // pure_relcaseH diff --git a/src/xrEngine/resource.rc b/src/xrEngine/resource.rc index 755181b3481..9a2b6d1ff6a 100644 --- a/src/xrEngine/resource.rc +++ b/src/xrEngine/resource.rc @@ -19,7 +19,7 @@ #ifdef _WIN32 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT #pragma code_page(1251) -#endif //_WIN32 +#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -56,7 +56,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT "xrEngine.exe" VALUE "ProductName", "S.T.A.L.K.E.R.: Call Of Pripyat" VALUE "ProductVersion", "1.6.02" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0, 1200 END END -#endif // Russian resources +#endif // Russian resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// @@ -67,7 +67,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT #pragma code_page(1251) -#endif //_WIN32 +#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -85,9 +85,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 3 TEXTINCLUDE BEGIN "\r\n" "\0" END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // Ukrainian resources +#endif // Ukrainian resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// @@ -98,7 +98,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 +#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -118,9 +118,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_STARTUP, DIALOG BEGIN RIGHTMARGIN, 332 END END -#endif // APSTUDIO_INVOKED +#endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources +#endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED @@ -130,4 +130,4 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT // ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#endif // not APSTUDIO_INVOKED diff --git a/src/xrEngine/stdafx.h b/src/xrEngine/stdafx.h index babfafa06c5..c4a3f998d14 100644 --- a/src/xrEngine/stdafx.h +++ b/src/xrEngine/stdafx.h @@ -9,12 +9,12 @@ #ifndef NDEBUG #ifndef INGAME_EDITOR #define INGAME_EDITOR -#endif // #ifndef INGAME_EDITOR -#endif // #ifndef NDEBUG +#endif // #ifndef INGAME_EDITOR +#endif // #ifndef NDEBUG #ifdef INGAME_EDITOR #define _WIN32_WINNT 0x0550 -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR #include "Include/xrAPI/xrAPI.h" #include "xrCore/xrCore.h" @@ -53,5 +53,5 @@ extern ENGINE_API CInifile* pGameIni; #define READ_IF_EXISTS(ltx, method, section, name, default_value) \ (((ltx)->line_exist(section, name)) ? ((ltx)->method(section, name)) : (default_value)) -#endif // !M_BORLAND -#endif // !defined STDAFX_3DA +#endif // !M_BORLAND +#endif // !defined STDAFX_3DA diff --git a/src/xrEngine/thunderbolt.cpp b/src/xrEngine/thunderbolt.cpp index a0f7a6aeccd..bf9c337b2bb 100644 --- a/src/xrEngine/thunderbolt.cpp +++ b/src/xrEngine/thunderbolt.cpp @@ -199,7 +199,7 @@ void CEffect_Thunderbolt::Bolt(shared_str id, float period, float lt) float sun_h, sun_p; CEnvironment& environment = g_pGamePersistent->Environment(); environment.CurrentEnv->sun_dir.getHP(sun_h, sun_p); - float alt = environment.p_var_alt; // Random.randF(environment.p_var_alt.x,environment.p_var_alt.y); + float alt = environment.p_var_alt; // Random.randF(environment.p_var_alt.x,environment.p_var_alt.y); float lng = Random.randF(sun_h - environment.p_var_long + PI, sun_h + environment.p_var_long + PI); float dist = Random.randF(FAR_DIST * environment.p_min_dist, FAR_DIST * .95f); current_direction.setHP(lng, alt); @@ -231,7 +231,7 @@ void CEffect_Thunderbolt::Bolt(shared_str id, float period, float lt) current->snd.play_no_feedback(0, 0, dist / 300.f, &pos, 0, 0, &Fvector2().set(dist / 2, dist * 2.f)); } - current_direction.invert(); // for env-sun + current_direction.invert(); // for env-sun } void CEffect_Thunderbolt::OnFrame(shared_str id, float period, float duration) diff --git a/src/xrEngine/thunderbolt.h b/src/xrEngine/thunderbolt.h index 8023aad5d5e..be9636c0d0c 100644 --- a/src/xrEngine/thunderbolt.h +++ b/src/xrEngine/thunderbolt.h @@ -17,9 +17,9 @@ class ENGINE_API CLAItem; #ifdef INGAME_EDITOR #define INGAME_EDITOR_VIRTUAL virtual -#else // #ifdef INGAME_EDITOR +#else // #ifdef INGAME_EDITOR #define INGAME_EDITOR_VIRTUAL -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR class CEnvironment; @@ -136,4 +136,4 @@ class ENGINE_API CEffect_Thunderbolt shared_str AppendDef(CEnvironment& environment, CInifile* pIni, CInifile* thunderbolts, LPCSTR sect); }; -#endif // ThunderboltH \ No newline at end of file +#endif // ThunderboltH \ No newline at end of file diff --git a/src/xrEngine/tntQAVI.cpp b/src/xrEngine/tntQAVI.cpp index 42b0999cd65..ecac7358348 100644 --- a/src/xrEngine/tntQAVI.cpp +++ b/src/xrEngine/tntQAVI.cpp @@ -6,7 +6,7 @@ CAviPlayerCustom::CAviPlayerCustom() { ZeroMemory(this, sizeof(*this)); - m_dwFrameCurrent = 0xfffffffd; // страхуемся от 0xffffffff + 1 == 0 + m_dwFrameCurrent = 0xfffffffd; // страхуемся от 0xffffffff + 1 == 0 m_dwFirstFrameOffset = 0; } @@ -130,7 +130,7 @@ BOOL CAviPlayerCustom::Load(char* fname) m_biOutFormat.biSizeImage = m_dwWidth * m_dwHeight * 4; // Найти подходящий декомпрессор - m_aviIC = ICLocate(ICTYPE_VIDEO, NULL, &m_biInFormat, &m_biOutFormat, // ICMODE_DECOMPRESS + m_aviIC = ICLocate(ICTYPE_VIDEO, NULL, &m_biInFormat, &m_biOutFormat, // ICMODE_DECOMPRESS ICMODE_FASTDECOMPRESS); if (m_aviIC == 0) { return FALSE; @@ -298,7 +298,7 @@ BOOL CAviPlayerCustom::GetFrame(BYTE** pDest) // Если заданный кадр это Предидущий кадр + 1 if (dwCurrFrame == m_dwFrameCurrent + 1) { - ++m_dwFrameCurrent; // dwCurrFrame == m_dwFrameCurrent + 1 + ++m_dwFrameCurrent; // dwCurrFrame == m_dwFrameCurrent + 1 *pDest = m_pDecompressedBuf; @@ -360,11 +360,11 @@ VOID CAviPlayerCustom::PreRoll(DWORD dwFrameNum) R_ASSERT(0); } - } // for(... + } // for(... return; - } // if( (int)m_dwFrameCurrent == i )... - } // for( i=(int)dwFrameNum-1 ; i>0 ; i-- )... + } // if( (int)m_dwFrameCurrent == i )... + } // for( i=(int)dwFrameNum-1 ; i>0 ; i-- )... // получаем элемент индекса pCurrFrameIndex = &m_pMovieIndex[i]; @@ -396,7 +396,7 @@ VOID CAviPlayerCustom::PreRoll(DWORD dwFrameNum) R_ASSERT(0); } - } // for(... + } // for(... } VOID CAviPlayerCustom::GetSize(DWORD* dwWidth, DWORD* dwHeight) diff --git a/src/xrEngine/tntQAVI.h b/src/xrEngine/tntQAVI.h index 4a67178f10d..1aadd9fce31 100644 --- a/src/xrEngine/tntQAVI.h +++ b/src/xrEngine/tntQAVI.h @@ -73,8 +73,8 @@ class ENGINE_API CAviPlayerCustom BITMAPINFOHEADER m_biOutFormat; BITMAPINFOHEADER m_biInFormat; - float m_fRate; // стандартная скорость, fps - float m_fCurrentRate; // текущая скорость, fps + float m_fRate; // стандартная скорость, fps + float m_fCurrentRate; // текущая скорость, fps DWORD m_dwFrameTotal; DWORD m_dwFrameCurrent; diff --git a/src/xrEngine/vis_common.h b/src/xrEngine/vis_common.h index ddfbd76eb68..42317402956 100644 --- a/src/xrEngine/vis_common.h +++ b/src/xrEngine/vis_common.h @@ -5,12 +5,12 @@ #pragma pack(push, 4) struct vis_data { - Fsphere sphere; // - Fbox box; // - u32 marker; // for different sub-renders - u32 accept_frame; // when it was requisted accepted for main render - u32 hom_frame; // when to perform test - shedule - u32 hom_tested; // when it was last time tested + Fsphere sphere; // + Fbox box; // + u32 marker; // for different sub-renders + u32 accept_frame; // when it was requisted accepted for main render + u32 hom_frame; // when to perform test - shedule + u32 hom_tested; // when it was last time tested IC void clear() { diff --git a/src/xrEngine/x_ray.cpp b/src/xrEngine/x_ray.cpp index 45b1e395bd4..9026d265abb 100644 --- a/src/xrEngine/x_ray.cpp +++ b/src/xrEngine/x_ray.cpp @@ -23,7 +23,7 @@ extern CRenderDevice Device; #ifdef MASTER_GOLD #define NO_MULTI_INSTANCES -#endif // #ifdef MASTER_GOLD +#endif // #ifdef MASTER_GOLD ////////////////////////////////////////////////////////////////////////// struct _SoundProcessor : public pureFrame @@ -38,7 +38,7 @@ struct _SoundProcessor : public pureFrame LPCSTR _GetFontTexName(LPCSTR section) { static const char* tex_names[] = {"texture800", "texture", "texture1600"}; - int def_idx = 1; // default 1024x768 + int def_idx = 1; // default 1024x768 int idx = def_idx; #if 0 @@ -230,7 +230,7 @@ void CApplication::OnEvent(EVENT E, u64 P1, u64 P2) //----------------------------------------------------------- LoadBegin(); - g_pGamePersistent->Start(""); // server_options.c_str()); - no prefetch ! + g_pGamePersistent->Start(""); // server_options.c_str()); - no prefetch ! g_pGameLevel->net_StartPlayDemo(); LoadEnd(); diff --git a/src/xrEngine/x_ray.h b/src/xrEngine/x_ray.h index bdd9e600e8c..7d720a7e545 100644 --- a/src/xrEngine/x_ray.h +++ b/src/xrEngine/x_ray.h @@ -78,4 +78,4 @@ class ENGINE_API CApplication : public pureFrame, public IEventReceiver extern ENGINE_API CApplication* pApp; -#endif //__XR_BASE_H__ +#endif //__XR_BASE_H__ diff --git a/src/xrEngine/xrHemisphere.cpp b/src/xrEngine/xrHemisphere.cpp index 3469237bd50..20c2a94c70a 100644 --- a/src/xrEngine/xrHemisphere.cpp +++ b/src/xrEngine/xrHemisphere.cpp @@ -163,19 +163,19 @@ int ECORE_API xrHemisphereVertices(int quality, const Fvector*& verts) int h_count = 0; switch (quality) { - case 1: // LOW quality + case 1: // LOW quality h_count = HEMI1_VERTS; verts = hemi_1; break; - case 2: // HIGH quality + case 2: // HIGH quality h_count = HEMI2_VERTS; verts = hemi_2; break; - case 3: // SUPER HIGH quality + case 3: // SUPER HIGH quality h_count = HEMI3_VERTS; verts = hemi_3; break; - default: // NO + default: // NO NODEFAULT; } return h_count; @@ -187,11 +187,11 @@ int ECORE_API xrHemisphereIndices(int quality, const u16*& indices) int h_count = 0; switch (quality) { - case 1: // LOW quality + case 1: // LOW quality h_count = HEMI1_FACES * 3; indices = hemi_1v; break; - case 2: // HIGH quality + case 2: // HIGH quality h_count = HEMI2_FACES * 3; indices = hemi_2v; break; @@ -199,7 +199,7 @@ int ECORE_API xrHemisphereIndices(int quality, const u16*& indices) // h_count = HEMI3_FACES*3; // indices = hemi_3v; // break; - default: // NO + default: // NO NODEFAULT; } return h_count; diff --git a/src/xrEngine/xrHemisphere.h b/src/xrEngine/xrHemisphere.h index 6855c7885e6..517f76d67da 100644 --- a/src/xrEngine/xrHemisphere.h +++ b/src/xrEngine/xrHemisphere.h @@ -7,4 +7,4 @@ void ECORE_API xrHemisphereBuild(int quality, float energy, xrHemisphereIterator int ECORE_API xrHemisphereVertices(int quality, const Fvector*& verts); int ECORE_API xrHemisphereIndices(int quality, const u16*& indices); -#endif // xrHemisphereH +#endif // xrHemisphereH diff --git a/src/xrEngine/xrSASH.cpp b/src/xrEngine/xrSASH.cpp index 28097eb168f..a25bce5db6e 100644 --- a/src/xrEngine/xrSASH.cpp +++ b/src/xrEngine/xrSASH.cpp @@ -280,7 +280,7 @@ void xrSASH::GetAllOptions() } // >=r2 - oaInitOption(&Option); // Reset dependency info + oaInitOption(&Option); // Reset dependency info // Currently only equal/not equal works // Option.Dependency.ParentName = TEXT("renderer"); // Option.Dependency.ComparisonOp = OA_COMP_OP_GREATER_OR_EQUAL; diff --git a/src/xrEngine/xrSASH.h b/src/xrEngine/xrSASH.h index 85674d90b99..ed9357debd2 100644 --- a/src/xrEngine/xrSASH.h +++ b/src/xrEngine/xrSASH.h @@ -67,7 +67,7 @@ class ENGINE_API xrSASH bool m_bBenchmarkRunning; bool m_bReinitEngine; // Guards - bool m_bExecutingConsoleCommand; // Guard to pass to OA only those command that were issued by OA + bool m_bExecutingConsoleCommand; // Guard to pass to OA only those command that were issued by OA // Native benchmarking string64 m_strBenchCfgName; CTimer m_FrameTimer; @@ -76,4 +76,4 @@ class ENGINE_API xrSASH extern xrSASH ENGINE_API g_SASH; -#endif // xrSASH_included \ No newline at end of file +#endif // xrSASH_included \ No newline at end of file diff --git a/src/xrEngine/xrSheduler.cpp b/src/xrEngine/xrSheduler.cpp index 85c8e4c8041..a35ad08da4f 100644 --- a/src/xrEngine/xrSheduler.cpp +++ b/src/xrEngine/xrSheduler.cpp @@ -38,7 +38,7 @@ void CSheduler::Destroy() for (u32 it = 0; it < Items.size(); it++) Msg("%s", Items[it].Object->shedule_Name().c_str()); } -#endif // DEBUG +#endif // DEBUG ItemsRT.clear(); Items.clear(); ItemsProcessed.clear(); @@ -80,14 +80,14 @@ void CSheduler::internal_Registration() #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: internal register [%s][%x][%s]", *R.Object->shedule_Name(), R.Object, R.RT ? "true" : "false"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER internal_Register(R.Object, R.RT); } #ifdef DEBUG_SCHEDULER else Msg("SCHEDULER: internal register skipped, because unregister found [%s][%x][%s]", "unknown", R.Object, R.RT ? "true" : "false"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER } else { @@ -137,7 +137,7 @@ bool CSheduler::internal_Unregister(ISheduled* O, BOOL RT, bool warn_on_not_foun if (ItemsRT[i].Object == O) { #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: internal unregister [%s][%x][%s]", "unknown", O, "true"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER ItemsRT.erase(ItemsRT.begin() + i); return (true); } @@ -150,7 +150,7 @@ bool CSheduler::internal_Unregister(ISheduled* O, BOOL RT, bool warn_on_not_foun if (Items[i].Object == O) { #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: internal unregister [%s][%x][%s]", *Items[i].scheduled_name, O, "false"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER Items[i].Object = NULL; return (true); } @@ -159,7 +159,7 @@ bool CSheduler::internal_Unregister(ISheduled* O, BOOL RT, bool warn_on_not_foun if (m_current_step_obj == O) { #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: internal unregister (self unregistering) [%x][%s]", O, "false"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER m_current_step_obj = NULL; return true; @@ -167,7 +167,7 @@ bool CSheduler::internal_Unregister(ISheduled* O, BOOL RT, bool warn_on_not_foun #ifdef DEBUG if (warn_on_not_found) Msg("! scheduled object %s tries to unregister but is not registered", *O->shedule_Name()); -#endif // DEBUG +#endif // DEBUG return (false); } @@ -239,7 +239,7 @@ bool CSheduler::Registered(ISheduled* object) const VERIFY(!count || (count == 1)); return (count == 1); } -#endif // DEBUG +#endif // DEBUG void CSheduler::Register(ISheduled* A, BOOL RT) { @@ -253,7 +253,7 @@ void CSheduler::Register(ISheduled* A, BOOL RT) #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: register [%s][%x]", *A->shedule_Name(), A); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER Registration.push_back(R); } @@ -264,7 +264,7 @@ void CSheduler::Unregister(ISheduled* A) #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: unregister [%s][%x]", *A->shedule_Name(), A); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER if (m_processing_now) { if (internal_Unregister(A, A->GetSchedulerData().b_RT, false)) return; @@ -318,7 +318,7 @@ void CSheduler::ProcessStep() Item T = Top(); #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: process step [%s][%x][false]", *T.scheduled_name, T.Object); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER u32 Elapsed = dwTime - T.dwTimeOfLastExecute; bool condition; @@ -327,7 +327,7 @@ void CSheduler::ProcessStep() // Erase element #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: process unregister [%s][%x][%s]", *T.scheduled_name, T.Object, "false"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER // if (T.Object) // Msg ("0x%08x UNREGISTERS because shedule_Needed() returned false",T.Object); // else @@ -345,7 +345,7 @@ void CSheduler::ProcessStep() T.Object->GetSchedulerData().dbg_startframe = Device.dwFrame; eTimer.Start(); // LPCSTR _obj_name = T.Object->shedule_Name().c_str(); -#endif // DEBUG +#endif // DEBUG // Calc next update interval u32 dwMin = _max(u32(30), T.Object->GetSchedulerData().t_min); @@ -362,20 +362,20 @@ void CSheduler::ProcessStep() #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: process unregister (self unregistering) [%s][%x][%s]", *T.scheduled_name, T.Object, "false"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER continue; } // } catch (...) { #ifdef DEBUG // Msg ("! xrSheduler: object '%s' raised an exception", _obj_name); // throw ; -#endif // DEBUG +#endif // DEBUG // } m_current_step_obj = NULL; #ifdef DEBUG // u32 execTime = eTimer.GetElapsed_ms (); -#endif // DEBUG +#endif // DEBUG // Fill item structure Item TNext; @@ -395,7 +395,7 @@ void CSheduler::ProcessStep() // if (execTime> 15) { // Msg ("* xrSheduler: too much time consumed by object [%s] (%dms)", _obj_name, execTime ); // } -#endif // DEBUG +#endif // DEBUG // if ((i % 3) != (3 - 1)) continue; @@ -438,7 +438,7 @@ void CSheduler::Update() #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: PROCESS STEP %d", Device.dwFrame); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER // Realtime priority m_processing_now = true; u32 dwTime = Device.dwTimeGlobal; @@ -448,11 +448,11 @@ void CSheduler::Update() R_ASSERT(T.Object); #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: process step [%s][%x][true]", *T.Object->shedule_Name(), T.Object); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER if (!T.Object->shedule_Needed()) { #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: process unregister [%s][%x][%s]", *T.Object->shedule_Name(), T.Object, "false"); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER T.dwTimeOfLastExecute = dwTime; continue; } @@ -471,7 +471,7 @@ void CSheduler::Update() m_processing_now = false; #ifdef DEBUG_SCHEDULER Msg("SCHEDULER: PROCESS STEP FINISHED %d", Device.dwFrame); -#endif // DEBUG_SCHEDULER +#endif // DEBUG_SCHEDULER clamp(psShedulerTarget, 3.f, 66.f); psShedulerCurrent = 0.9f * psShedulerCurrent + 0.1f * psShedulerTarget; stats.Load = psShedulerCurrent; diff --git a/src/xrEngine/xrSheduler.h b/src/xrEngine/xrSheduler.h index 1e3cdf7425d..51df9f60b83 100644 --- a/src/xrEngine/xrSheduler.h +++ b/src/xrEngine/xrSheduler.h @@ -12,7 +12,7 @@ class ENGINE_API CSheduler u32 dwTimeOfLastExecute; shared_str scheduled_name; ISheduled* Object; - u32 dwPadding; // for align-issues + u32 dwPadding; // for align-issues IC bool operator<(Item& I) { return dwTimeForExecute > I.dwTimeForExecute; } }; @@ -65,7 +65,7 @@ class ENGINE_API CSheduler #ifdef DEBUG bool Registered(ISheduled* object) const; -#endif // DEBUG +#endif // DEBUG void Register(ISheduled* A, BOOL RT = FALSE); void Unregister(ISheduled* A); void EnsureOrder(ISheduled* Before, ISheduled* After); @@ -80,4 +80,4 @@ class ENGINE_API CSheduler } }; -#endif // XRSHEDULER_H_INCLUDED +#endif // XRSHEDULER_H_INCLUDED diff --git a/src/xrEngine/xrTheora_Stream.cpp b/src/xrEngine/xrTheora_Stream.cpp index 9209e16cce3..aace2d953b8 100644 --- a/src/xrEngine/xrTheora_Stream.cpp +++ b/src/xrEngine/xrTheora_Stream.cpp @@ -126,7 +126,7 @@ BOOL CTheoraStream::ParseHeaders() } else { - int ret = ReadData(); // someone needs more data + int ret = ReadData(); // someone needs more data if (ret == 0) FATAL("End of file while searching for codec headers."); } } diff --git a/src/xrEngine/xrTheora_Stream.h b/src/xrEngine/xrTheora_Stream.h index 7ae7d936887..bd49d9c5d70 100644 --- a/src/xrEngine/xrTheora_Stream.h +++ b/src/xrEngine/xrTheora_Stream.h @@ -25,7 +25,7 @@ class ENGINE_API CTheoraStream ogg_int64_t d_frame; u32 tm_total; - u32 key_rate; // theora have const key rate + u32 key_rate; // theora have const key rate float fpms; protected: @@ -45,4 +45,4 @@ class ENGINE_API CTheoraStream yuv_buffer* CurrentFrame() { return &t_yuv_buffer; } }; -#endif // xrTheora_StreamH +#endif // xrTheora_StreamH diff --git a/src/xrEngine/xrTheora_Surface.cpp b/src/xrEngine/xrTheora_Surface.cpp index 5a13e7cc892..ce34ea83f7b 100644 --- a/src/xrEngine/xrTheora_Surface.cpp +++ b/src/xrEngine/xrTheora_Surface.cpp @@ -57,7 +57,7 @@ BOOL CTheoraSurface::Update(u32 _time) VERIFY(Valid()); BOOL redraw = FALSE; - if (prefetch < 0) // fake. first updated frame is data loading + if (prefetch < 0) // fake. first updated frame is data loading { ++prefetch; if (prefetch == 0) tm_start = _time; @@ -141,9 +141,9 @@ BOOL CTheoraSurface::Load(const char* fname) #ifndef _EDITOR R_ASSERT(GlobalEnv.Render); bShaderYUV2RGB = GlobalEnv.Render->HWSupportsShaderYUV2RGB(); -#else // _EDITOR +#else // _EDITOR bShaderYUV2RGB = false; -#endif // _EDITOR +#endif // _EDITOR } return res; } diff --git a/src/xrEngine/xrTheora_Surface.h b/src/xrEngine/xrTheora_Surface.h index 967e3d677d4..115e1818477 100644 --- a/src/xrEngine/xrTheora_Surface.h +++ b/src/xrEngine/xrTheora_Surface.h @@ -61,4 +61,4 @@ class ENGINE_API CTheoraSurface u32 Height(bool bRealSize); }; -#endif // xrTheora_SurfaceH +#endif // xrTheora_SurfaceH diff --git a/src/xrEngine/xrTheora_Surface_mmx.cpp b/src/xrEngine/xrTheora_Surface_mmx.cpp index 03de833c186..c2598d12c77 100644 --- a/src/xrEngine/xrTheora_Surface_mmx.cpp +++ b/src/xrEngine/xrTheora_Surface_mmx.cpp @@ -270,6 +270,6 @@ lp_tv_uchar tv_yuv2argb(lp_tv_uchar argb_plane, tv_slong argb_width, tv_slong ar } return argb_plane; -} // tv_yuv2argb +} // tv_yuv2argb #pragma warning(default : 4731) \ No newline at end of file diff --git a/src/xrEngine/xr_collide_form.cpp b/src/xrEngine/xr_collide_form.cpp index 6c6c9f97bfd..005bdffb6e1 100644 --- a/src/xrEngine/xr_collide_form.cpp +++ b/src/xrEngine/xr_collide_form.cpp @@ -153,8 +153,8 @@ void CCF_Skeleton::BuildState() I->b_hsize.set(B.m_halfsize); // prepare matrix World to Element - T.mul_43(Mbone, ME); // model space - TW.mul_43(L2W, T); // world space + T.mul_43(Mbone, ME); // model space + TW.mul_43(L2W, T); // world space bool b = I->b_IM.invert_b(TW); // check matrix validity if (!b) { @@ -164,8 +164,8 @@ void CCF_Skeleton::BuildState() Msg("object name %s", owner->cName().c_str()); #ifdef DEBUG Msg(dbg_object_full_dump_string(owner).c_str()); -#endif //#ifdef DEBUG - I->elem_id = u16(-1); //. hack - disable invalid bone +#endif //#ifdef DEBUG + I->elem_id = u16(-1); //. hack - disable invalid bone } } break; @@ -358,7 +358,7 @@ BOOL CCF_Shape::_RayQuery(const collide::ray_defs& Q, collide::rq_results& R) } } break; - case 1: // box + case 1: // box { Fbox box; box.identity(); @@ -410,7 +410,7 @@ void CCF_Shape::ComputeBounds() { switch (shapes[el].type) { - case 0: // sphere + case 0: // sphere { Fsphere T = shapes[el].data.sphere; Fvector P; @@ -423,7 +423,7 @@ void CCF_Shape::ComputeBounds() bv_sphere = T; } break; - case 1: // box + case 1: // box { Fvector A, B; Fmatrix& T = shapes[el].data.box; @@ -486,7 +486,7 @@ BOOL CCF_Shape::Contact(IGameObject* O) { switch (shapes[el].type) { - case 0: // sphere + case 0: // sphere { Fsphere Q; Fsphere& T = shapes[el].data.sphere; @@ -495,7 +495,7 @@ BOOL CCF_Shape::Contact(IGameObject* O) if (S.intersect(Q)) return TRUE; } break; - case 1: // box + case 1: // box { Fmatrix Q; Fmatrix& T = shapes[el].data.box; diff --git a/src/xrEngine/xr_collide_form.h b/src/xrEngine/xr_collide_form.h index fb9ca467cf7..6f0bd208352 100644 --- a/src/xrEngine/xr_collide_form.h +++ b/src/xrEngine/xr_collide_form.h @@ -11,11 +11,11 @@ class ENGINE_API CInifile; const u32 clGET_TRIS = (1 << 0); const u32 clGET_BOXES = (1 << 1); const u32 clGET_SPHERES = (1 << 2); -const u32 clQUERY_ONLYFIRST = (1 << 3); // stop if was any collision -const u32 clQUERY_TOPLEVEL = (1 << 4); // get only top level of model box/sphere -const u32 clQUERY_STATIC = (1 << 5); // static -const u32 clQUERY_DYNAMIC = (1 << 6); // dynamic -const u32 clCOARSE = (1 << 7); // coarse test (triangles vs obb) +const u32 clQUERY_ONLYFIRST = (1 << 3); // stop if was any collision +const u32 clQUERY_TOPLEVEL = (1 << 4); // get only top level of model box/sphere +const u32 clQUERY_STATIC = (1 << 5); // static +const u32 clQUERY_DYNAMIC = (1 << 6); // dynamic +const u32 clCOARSE = (1 << 7); // coarse test (triangles vs obb) struct clQueryTri { @@ -25,10 +25,10 @@ struct clQueryTri struct clQueryCollision { - xr_vector objects; // affected objects - xr_vector tris; // triangles (if queried) - xr_vector boxes; // boxes/ellipsoids (if queried) - xr_vector spheres; // spheres (if queried) + xr_vector objects; // affected objects + xr_vector tris; // triangles (if queried) + xr_vector boxes; // boxes/ellipsoids (if queried) + xr_vector spheres; // spheres (if queried) IC void Clear() { @@ -83,12 +83,12 @@ class ENGINE_API ICollisionForm friend class CObjectSpace; protected: - IGameObject* owner; // владелец + IGameObject* owner; // владелец u32 dwQueryID; protected: - Fbox bv_box; // (Local) BBox объекта - Fsphere bv_sphere; // (Local) Sphere + Fbox bv_box; // (Local) BBox объекта + Fsphere bv_sphere; // (Local) Sphere private: ECollisionFormType m_type; @@ -115,7 +115,7 @@ class ENGINE_API CCF_Skeleton : public ICollisionForm { struct { - Fmatrix b_IM; // world 2 bone xform + Fmatrix b_IM; // world 2 bone xform Fvector b_hsize; }; struct @@ -142,8 +142,8 @@ class ENGINE_API CCF_Skeleton : public ICollisionForm u64 vis_mask; ElementVec elements; - u32 dwFrame; // The model itself - u32 dwFrameTL; // Top level + u32 dwFrame; // The model itself + u32 dwFrameTL; // Top level void BuildState(); void BuildTopLevel(); @@ -209,4 +209,4 @@ class ENGINE_API CCF_Shape : public ICollisionForm xr_vector& Shapes() { return shapes; } }; -#endif //__XR_COLLIDE_FORM_H__ +#endif //__XR_COLLIDE_FORM_H__ diff --git a/src/xrEngine/xr_efflensflare.cpp b/src/xrEngine/xr_efflensflare.cpp index 49fd6576642..75e9497af0b 100644 --- a/src/xrEngine/xr_efflensflare.cpp +++ b/src/xrEngine/xr_efflensflare.cpp @@ -245,7 +245,7 @@ static LPCSTR state_to_string(const CLensFlare::LFState& state) } #ifdef DEBUG return (0); -#endif // DEBUG +#endif // DEBUG } #endif diff --git a/src/xrEngine/xr_efflensflare.h b/src/xrEngine/xr_efflensflare.h index f07b74df950..7be2a66f1c5 100644 --- a/src/xrEngine/xr_efflensflare.h +++ b/src/xrEngine/xr_efflensflare.h @@ -131,4 +131,4 @@ class ENGINE_API CLensFlare void Invalidate() { m_State = lfsNone; } }; -#endif // xr_efflensflareH +#endif // xr_efflensflareH diff --git a/src/xrEngine/xr_input.h b/src/xrEngine/xr_input.h index f7d19c04a95..b655619cdb8 100644 --- a/src/xrEngine/xr_input.h +++ b/src/xrEngine/xr_input.h @@ -50,9 +50,9 @@ class ENGINE_API CInput private: BENCH_SEC_SCRAMBLEMEMBER1 - LPDIRECTINPUT8 pDI; // The DInput object - LPDIRECTINPUTDEVICE8 pMouse; // The DIDevice7 interface - LPDIRECTINPUTDEVICE8 pKeyboard; // The DIDevice7 interface + LPDIRECTINPUT8 pDI; // The DInput object + LPDIRECTINPUTDEVICE8 pMouse; // The DIDevice7 interface + LPDIRECTINPUTDEVICE8 pKeyboard; // The DIDevice7 interface //---------------------- u32 timeStamp[COUNT_MOUSE_AXIS]; u32 timeSave[COUNT_MOUSE_AXIS]; @@ -112,4 +112,4 @@ class ENGINE_API CInput extern ENGINE_API CInput* pInput; -#endif //__XR_INPUT__ +#endif //__XR_INPUT__ diff --git a/src/xrEngine/xr_ioc_cmd.cpp b/src/xrEngine/xr_ioc_cmd.cpp index 98e91e8bf3b..a796790bef9 100644 --- a/src/xrEngine/xr_ioc_cmd.cpp +++ b/src/xrEngine/xr_ioc_cmd.cpp @@ -75,7 +75,7 @@ class CCC_MemStat : public IConsole_Command // g_pSharedMemoryContainer->dump (); } }; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER #ifdef DEBUG_MEMORY_MANAGER class CCC_DbgMemCheck : public IConsole_Command @@ -93,7 +93,7 @@ class CCC_DbgMemCheck : public IConsole_Command } } }; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER class CCC_DbgStrCheck : public IConsole_Command { @@ -334,9 +334,9 @@ class CCC_Start : public IConsole_Command op_server[0] = 0; op_client[0] = 0; - parse(op_server, args, "server"); // 1. server - parse(op_client, args, "client"); // 2. client - parse(op_demo, args, "demo"); // 3. demo + parse(op_server, args, "server"); // 1. server + parse(op_client, args, "client"); // 2. client + parse(op_demo, args, "demo"); // 3. demo strlwr(op_server); protect_Name_strlwr(op_client); @@ -505,7 +505,7 @@ virtual void Save (IWriter *F) {}; */ ENGINE_API BOOL r2_sun_static = TRUE; -ENGINE_API BOOL r2_advanced_pp = FALSE; // advanced post process and effects +ENGINE_API BOOL r2_advanced_pp = FALSE; // advanced post process and effects u32 renderer_value = 3; @@ -655,12 +655,12 @@ void CCC_Register() #ifdef DEBUG CMD1(CCC_MotionsStat, "stat_motions"); CMD1(CCC_TexturesStat, "stat_textures"); -#endif // DEBUG +#endif // DEBUG #ifdef DEBUG_MEMORY_MANAGER CMD1(CCC_MemStat, "dbg_mem_dump"); CMD1(CCC_DbgMemCheck, "dbg_mem_check"); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER #ifdef DEBUG CMD3(CCC_Mask, "mt_particles", &psDeviceFlags, mtParticles); @@ -703,7 +703,7 @@ void CCC_Register() CMD3(CCC_Mask, "rs_occ_draw", &psDeviceFlags, rsOcclusionDraw); CMD3(CCC_Mask, "rs_occ_stats", &psDeviceFlags, rsOcclusionStats); // CMD4(CCC_Integer, "rs_skeleton_update", &psSkeletonUpdate, 2, 128 ); -#endif // DEBUG +#endif // DEBUG CMD2(CCC_Gamma, "rs_c_gamma", &ps_gamma); CMD2(CCC_Gamma, "rs_c_brightness", &ps_brightness); @@ -720,7 +720,7 @@ void CCC_Register() #ifdef DEBUG CMD3(CCC_Token, "vid_bpp", &psCurrentBPP, vid_bpp_token); -#endif // DEBUG +#endif // DEBUG CMD1(CCC_VID_Reset, "vid_restart"); @@ -742,7 +742,7 @@ void CCC_Register() CMD3(CCC_Mask, "snd_stats_info_object", &g_stats_flags, st_sound_info_object); CMD4(CCC_Integer, "error_line_count", &g_ErrorLineCount, 6, 1024); -#endif // DEBUG +#endif // DEBUG // Mouse CMD3(CCC_Mask, "mouse_invert", &psMouseInvert, 1); diff --git a/src/xrEngine/xr_ioc_cmd.h b/src/xrEngine/xr_ioc_cmd.h index be4346dd662..b36e9e4bfb6 100644 --- a/src/xrEngine/xr_ioc_cmd.h +++ b/src/xrEngine/xr_ioc_cmd.h @@ -92,7 +92,7 @@ class ENGINE_API IConsole_Command virtual void add_to_LRU(shared_str const& arg); void add_LRU_to_tips(vecTips& tips); -}; // class IConsole_Command +}; // class IConsole_Command class ENGINE_API CCC_Mask : public IConsole_Command { diff --git a/src/xrEngine/xr_object.h b/src/xrEngine/xr_object.h index 1cde4171edf..bb2c1c84ae5 100644 --- a/src/xrEngine/xr_object.h +++ b/src/xrEngine/xr_object.h @@ -34,7 +34,7 @@ class CInventoryItem; class CEntity; class CEntityAlive; class CActor; -class CGameObject; // XXX: remove +class CGameObject; // XXX: remove class CCustomZone; class CPhysicsShellHolder; class IInputReceiver; @@ -194,8 +194,8 @@ class IGameObject : public virtual IFactoryObject, virtual shared_str cNameVisual() const = 0; virtual void cNameVisual_set(shared_str N) = 0; // Properties - virtual void processing_activate() = 0; // request to enable UpdateCL - virtual void processing_deactivate() = 0; // request to disable UpdateCL + virtual void processing_activate() = 0; // request to enable UpdateCL + virtual void processing_deactivate() = 0; // request to disable UpdateCL virtual bool processing_enabled() = 0; virtual void setVisible(BOOL _visible) = 0; virtual BOOL getVisible() const = 0; @@ -212,7 +212,7 @@ class IGameObject : public virtual IFactoryObject, // ~Properties virtual void Load(LPCSTR section) = 0; // Update - virtual void UpdateCL() = 0; // Called each frame, so no need for dt + virtual void UpdateCL() = 0; // Called each frame, so no need for dt // Position stack virtual u32 ps_Size() const = 0; virtual GameObjectSavedPosition ps_Element(u32 id) const = 0; @@ -220,9 +220,9 @@ class IGameObject : public virtual IFactoryObject, // HUD virtual void OnHUDDraw(CCustomHUD* hud) = 0; // Active/non active - virtual void OnH_B_Chield() = 0; // before + virtual void OnH_B_Chield() = 0; // before virtual void OnH_B_Independent(bool justBeforeDestroy) = 0; - virtual void OnH_A_Chield() = 0; // after + virtual void OnH_A_Chield() = 0; // after virtual void OnH_A_Independent() = 0; virtual void On_SetEntity() = 0; virtual void On_LostEntity() = 0; @@ -262,15 +262,15 @@ class IGameObject : public virtual IFactoryObject, virtual void net_Save(NET_Packet& packet) = 0; virtual void net_Load(IReader& reader) = 0; virtual BOOL net_SaveRelevant() = 0; - virtual void net_Export(NET_Packet& packet) = 0; // export to server - virtual void net_Import(NET_Packet& packet) = 0; // import from server + virtual void net_Export(NET_Packet& packet) = 0; // export to server + virtual void net_Import(NET_Packet& packet) = 0; // import from server virtual BOOL net_Spawn(CSE_Abstract* entity) = 0; virtual void net_Destroy() = 0; virtual void net_ImportInput(NET_Packet& packet) = 0; - virtual BOOL net_Relevant() = 0; // relevant for export to server + virtual BOOL net_Relevant() = 0; // relevant for export to server virtual void net_MigrateInactive(NET_Packet& packet) = 0; virtual void net_MigrateActive(NET_Packet& packet) = 0; - virtual void net_Relcase(IGameObject* obj) = 0; // destroy all links to another objects + virtual void net_Relcase(IGameObject* obj) = 0; // destroy all links to another objects virtual void save(NET_Packet& packet) = 0; virtual void load(IReader& reader) = 0; virtual void OnEvent(NET_Packet& packet, u16 type) = 0; @@ -300,14 +300,14 @@ class IGameObject : public virtual IFactoryObject, virtual void reload(LPCSTR section) = 0; // network virtual bool object_removed() const = 0; - virtual void make_Interpolation() = 0; // interpolation from last visible to corrected position/rotation - virtual void PH_B_CrPr() = 0; // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr() = 0; // actions & operations after correction before prediction steps + virtual void make_Interpolation() = 0; // interpolation from last visible to corrected position/rotation + virtual void PH_B_CrPr() = 0; // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr() = 0; // actions & operations after correction before prediction steps #ifdef DEBUG virtual void PH_Ch_CrPr() = 0; virtual void dbg_DrawSkeleton() = 0; #endif - virtual void PH_A_CrPr() = 0; // actions & operations after phisic correction-prediction steps + virtual void PH_A_CrPr() = 0; // actions & operations after phisic correction-prediction steps virtual void CrPr_SetActivationStep(u32 step) = 0; virtual u32 CrPr_GetActivationStep() = 0; virtual void CrPr_SetActivated(bool activate) = 0; @@ -357,4 +357,4 @@ inline IGameObject::~IGameObject() { } -#endif //__XR_OBJECT_H__ +#endif //__XR_OBJECT_H__ diff --git a/src/xrEngine/xr_object_list.cpp b/src/xrEngine/xr_object_list.cpp index 1624ad912e2..1d6ecb5be81 100644 --- a/src/xrEngine/xr_object_list.cpp +++ b/src/xrEngine/xr_object_list.cpp @@ -112,7 +112,7 @@ void CObjectList::SingleUpdate(IGameObject* O) // if (O->getDestroy()) // Msg ("- !!!processing_enabled ->destroy_queue.push_back %s[%d] frame [%d]",O->cName().c_str(), O->ID(), // Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return; } @@ -122,7 +122,7 @@ void CObjectList::SingleUpdate(IGameObject* O) // if (O->getDestroy()) // Msg ("- !!!processing_enabled ->destroy_queue.push_back %s[%d] frame [%d]",O->cName().c_str(), O->ID(), // Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return; } @@ -136,7 +136,7 @@ void CObjectList::SingleUpdate(IGameObject* O) O->UpdateCL(); VERIFY3(O->GetDbgUpdateFrame() == Device.dwFrame, "Broken sequence of calls to 'UpdateCL'", *O->cName()); -#if 0 // ndef DEBUG +#if 0 // ndef DEBUG __try { #endif @@ -145,7 +145,7 @@ void CObjectList::SingleUpdate(IGameObject* O) Msg("! ERROR: incorrect destroy sequence for object[%d:%s], section[%s], parent[%d:%s]", O->ID(), *O->cName(), *O->cNameSect(), O->H_Parent()->ID(), *O->H_Parent()->cName()); } -#if 0 // ndef DEBUG +#if 0 // ndef DEBUG } __except (EXCEPTION_EXECUTE_HANDLER) { @@ -189,7 +189,7 @@ void CObjectList::SingleUpdate(IGameObject* O) // if (O->getDestroy()) // Msg ("- !!!processing_enabled ->destroy_queue.push_back %s[%d] frame [%d]",O->cName().c_str(), O->ID(), // Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void CObjectList::clear_crow_vec(Objects& o) @@ -235,7 +235,7 @@ void CObjectList::Update(bool bForce) #ifdef DEBUG std::sort(crows.begin(), crows.end()); VERIFY(std::unique(crows.begin(), crows.end()) == crows.end()); -#endif // ifdef DEBUG +#endif // ifdef DEBUG #endif stats.Crows = crows.size(); @@ -311,7 +311,7 @@ void CObjectList::Update(bool bForce) if (debug_destroy) Msg("Destroying object[%x][%x] [%d][%s] frame[%d]", dynamic_cast(O), O, O->ID(), *O->cName(), Device.dwFrame); -#endif // DEBUG +#endif // DEBUG O->net_Destroy(); Destroy(O); } @@ -332,7 +332,7 @@ void CObjectList::net_Register(IGameObject* O) void CObjectList::net_Unregister(IGameObject* O) { // R_ASSERT (O->ID() < 0xffff); - if (O->ID() < 0xffff) // demo_spectator can have 0xffff + if (O->ID() < 0xffff) // demo_spectator can have 0xffff map_NETID[O->ID()] = NULL; /* xr_map::iterator it = map_NETID.find(O->ID()); @@ -544,7 +544,7 @@ void CObjectList::dump_list(Objects& v, LPCSTR reason) for (; it != it_e; ++it) Msg("%x - name [%s] ID[%d] parent[%s] getDestroy()=[%s]", (*it), (*it)->cName().c_str(), (*it)->ID(), ((*it)->H_Parent()) ? (*it)->H_Parent()->cName().c_str() : "", ((*it)->getDestroy()) ? "yes" : "no"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } bool CObjectList::dump_all_objects() @@ -593,4 +593,4 @@ bool CObjectList::registered_object_to_destroy(const IGameObject* object_to_dest { return (std::find(destroy_queue.begin(), destroy_queue.end(), object_to_destroy) != destroy_queue.end()); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrEngine/xr_object_list.h b/src/xrEngine/xr_object_list.h index 08fe6b10dcd..f530f1dcd54 100644 --- a/src/xrEngine/xr_object_list.h +++ b/src/xrEngine/xr_object_list.h @@ -88,7 +88,7 @@ class ENGINE_API CObjectList void net_Register(IGameObject* O); void net_Unregister(IGameObject* O); - u32 net_Export(NET_Packet* P, u32 _start, u32 _count); // return next start + u32 net_Export(NET_Packet* P, u32 _start, u32 _count); // return next start void net_Import(NET_Packet* P); ICF IGameObject* net_Find(u16 ID) const @@ -116,7 +116,7 @@ class ENGINE_API CObjectList void register_object_to_destroy(IGameObject* object_to_destroy); #ifdef DEBUG bool registered_object_to_destroy(const IGameObject* object_to_destroy) const; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG private: IC Objects& get_crows() @@ -130,4 +130,4 @@ class ENGINE_API CObjectList static void dump_list(Objects& v, LPCSTR reason); }; -#endif //__XR_OBJECT_LIST_H__ +#endif //__XR_OBJECT_LIST_H__ diff --git a/src/xrGame/Actor.cpp b/src/xrGame/Actor.cpp index f7264a4b0ab..1ecd93c3ee6 100644 --- a/src/xrGame/Actor.cpp +++ b/src/xrGame/Actor.cpp @@ -4,7 +4,7 @@ #ifdef DEBUG #include "PHDebug.h" -#endif // DEBUG +#endif // DEBUG #include "ActorEffector.h" #include "CameraFirstEye.h" #include "CameraLook.h" @@ -444,7 +444,7 @@ struct playing_pred void CActor::Hit(SHit* pHDS) { - bool b_initiated = pHDS->aim_bullet; // physics strike by poltergeist + bool b_initiated = pHDS->aim_bullet; // physics strike by poltergeist pHDS->aim_bullet = false; @@ -462,7 +462,7 @@ void CActor::Hit(SHit* pHDS) DBG_DrawLine(Position(), to, color_xrgb(124, 124, 0)); DBG_ClosedCashedDraw(500); } -#endif // DEBUG +#endif // DEBUG bool bPlaySound = true; if (!g_Alive()) bPlaySound = false; @@ -655,7 +655,7 @@ void CActor::HitMark(float P, Fvector dir, IGameObject* who_object, s16 element, xr_sprintf(sect_name, "effector_fire_hit_%d", id); AddEffector(this, effFireHit, sect_name, P * 0.001f); - } // if hit_type + } // if hit_type } void CActor::HitSignal(float perc, Fvector& vLocalDir, IGameObject* who, s16 element) @@ -687,7 +687,7 @@ void CActor::Die(IGameObject* who) { #ifdef DEBUG Msg("--- Actor [%s] dies !", this->Name()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG inherited::Die(who); if (OnServer()) { @@ -808,9 +808,9 @@ void CActor::g_Physics(Fvector& _accel, float jump, float dt) } #ifdef DEBUG if (!psActorFlags.test(AF_NO_CLIP)) character_physics_support()->movement()->GetPosition(Position()); -#else // DEBUG +#else // DEBUG character_physics_support()->movement()->GetPosition(Position()); -#endif // DEBUG +#endif // DEBUG character_physics_support()->movement()->bSleep = false; } @@ -1226,7 +1226,7 @@ void CActor::shedule_Update(u32 DT) { m_sDefaultObjAction = m_sDeadCharacterUseAction; } - } // m_pPersonWeLookingAt + } // m_pPersonWeLookingAt } else if (m_pVehicleWeLookingAt) { @@ -1308,7 +1308,7 @@ float CActor::missile_throw_force() #ifdef DEBUG extern BOOL g_ShowAnimationInfo; -#endif // DEBUG +#endif // DEBUG // HUD void CActor::OnHUDDraw(CCustomHUD*) @@ -1316,7 +1316,7 @@ void CActor::OnHUDDraw(CCustomHUD*) R_ASSERT(IsFocused()); if (!((mstate_real & mcLookout) && !IsGameTypeSingle())) g_player_hud->render_hud(); -#if 0 // ndef NDEBUG +#if 0 // ndef NDEBUG if (Level().CurrentControlEntity() == this && g_ShowAnimationInfo) { string128 buf; @@ -1793,7 +1793,7 @@ bool CActor::is_on_ground() bool CActor::is_ai_obstacle() const { - return (false); // true); + return (false); // true); } float CActor::GetRestoreSpeed(ALife::EConditionRestoreType const& type) @@ -1899,7 +1899,7 @@ float CActor::GetRestoreSpeed(ALife::EConditionRestoreType const& type) } break; } - } // switch + } // switch return res; } diff --git a/src/xrGame/Actor.h b/src/xrGame/Actor.h index 835396d9356..a8a3d0a2d02 100644 --- a/src/xrGame/Actor.h +++ b/src/xrGame/Actor.h @@ -266,8 +266,8 @@ class CActor : public CEntityAlive, //ориентация модели float r_model_yaw_dest; - float r_model_yaw; // orientation of model - float r_model_yaw_delta; // effect on multiple "strafe"+"something" + float r_model_yaw; // orientation of model + float r_model_yaw_delta; // effect on multiple "strafe"+"something" public: SActorMotions* m_anims; @@ -363,7 +363,7 @@ class CActor : public CEntityAlive, bool m_bPickupMode; //расстояние (в метрах) на котором актер чувствует гранату (любую) float m_fFeelGrenadeRadius; - float m_fFeelGrenadeTime; //время гранаты (сек) после которого актер чувствует гранату + float m_fFeelGrenadeTime; //время гранаты (сек) после которого актер чувствует гранату //расстояние подсветки предметов float m_fPickupInfoRadius; @@ -482,11 +482,11 @@ class CActor : public CEntityAlive, public: virtual BOOL net_Spawn(CSE_Abstract* DC); - virtual void net_Export(NET_Packet& P); // export to server - virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server virtual void net_Destroy(); - virtual BOOL net_Relevant(); // { return getSVU() | getLocal(); }; // relevant for export to server - virtual void net_Relcase(IGameObject* O); // + virtual BOOL net_Relevant(); // { return getSVU() | getLocal(); }; // relevant for export to server + virtual void net_Relcase(IGameObject* O); // virtual void xr_stdcall on_requested_spawn(IGameObject* object); // object serialization virtual void save(NET_Packet& output_packet); @@ -498,8 +498,8 @@ class CActor : public CEntityAlive, xr_deque NET; Fvector NET_SavedAccel; net_update NET_Last; - BOOL NET_WasInterpolating; // previous update was by interpolation or by extrapolation - u32 NET_Time; // server time of last update + BOOL NET_WasInterpolating; // previous update was by interpolation or by extrapolation + u32 NET_Time; // server time of last update //--------------------------------------------- void net_Import_Base(NET_Packet& P); @@ -517,9 +517,9 @@ class CActor : public CEntityAlive, //--------------------------------------------- // bool m_bHasUpdate; /// spline coeff ///////////////////// - float SCoeff[3][4]; //коэффициэнты для сплайна Бизье - float HCoeff[3][4]; //коэффициэнты для сплайна Эрмита - Fvector IPosS, IPosH, IPosL; //положение актера после интерполяции Бизье, Эрмита, линейной + float SCoeff[3][4]; //коэффициэнты для сплайна Бизье + float HCoeff[3][4]; //коэффициэнты для сплайна Эрмита + Fvector IPosS, IPosH, IPosL; //положение актера после интерполяции Бизье, Эрмита, линейной #ifdef DEBUG DEF_DEQUE(VIS_POSITION, Fvector); @@ -566,10 +566,10 @@ class CActor : public CEntityAlive, void g_Physics(Fvector& accel, float jump, float dt); virtual void ForceTransform(const Fmatrix& m); void SetPhPosition(const Fmatrix& pos); - virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps - virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps - // virtual void UpdatePosStack ( u32 Time0, u32 Time1 ); + virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps + virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps + // virtual void UpdatePosStack ( u32 Time0, u32 Time1 ); virtual void MoveActor(Fvector NewPos, Fvector NewDir); virtual void SpawnAmmoForWeapon(CInventoryItem* pIItem); @@ -619,7 +619,7 @@ class CActor : public CEntityAlive, public: void SetWeaponHideState(u16 State, bool bSet); -private: // IPhysicsShellHolder +private: // IPhysicsShellHolder virtual void HideAllWeapons(bool v) { SetWeaponHideState(INV_STATE_BLOCK_ALL, v); } public: void SetCantRunState(bool bSet); @@ -664,7 +664,7 @@ class CActor : public CEntityAlive, void SwitchTorch(); #ifdef DEBUG void NoClipFly(int cmd); -#endif // DEBUG +#endif // DEBUG public: virtual void on_weapon_shot_start(CWeapon* weapon); diff --git a/src/xrGame/ActorAnimation.cpp b/src/xrGame/ActorAnimation.cpp index f9a967512aa..edf9fc464d7 100644 --- a/src/xrGame/ActorAnimation.cpp +++ b/src/xrGame/ActorAnimation.cpp @@ -167,7 +167,7 @@ void SActorState::CreateClimb(IKinematicsAnimated* K) m_torso[11].Create(K, base, "_12"); m_torso[12].Create(K, base, "_13"); - m_head_idle.invalidate(); /// K->ID_Cycle("head_idle_0"); + m_head_idle.invalidate(); /// K->ID_Cycle("head_idle_0"); jump_begin = K->ID_Cycle(strconcat(sizeof(buf), buf, base, "_jump_begin")); jump_idle = K->ID_Cycle(strconcat(sizeof(buf), buf, base, "_jump_idle")); landing[0] = K->ID_Cycle(strconcat(sizeof(buf), buf, base, "_jump_end")); @@ -312,7 +312,7 @@ CMotion* FindMotionKeys(MotionID motion_ID, IRenderVisual* V) #ifdef DEBUG BOOL g_ShowAnimationInfo = TRUE; -#endif // DEBUG +#endif // DEBUG char* mov_state[] = { "idle", "walk", "run", "sprint", }; @@ -544,7 +544,7 @@ void CActor::g_SetAnimation(u32 mstate_rl) MotionID mid = smart_cast(Visual())->ID_Cycle("norm_idle_0"); if (!M_legs) { - if ((mstate_rl & mcCrouch) && !isActorAccelerated(mstate_rl, IsZoomAimingMode())) //!(mstate_rl&mcAccel)) + if ((mstate_rl & mcCrouch) && !isActorAccelerated(mstate_rl, IsZoomAimingMode())) //!(mstate_rl&mcAccel)) { M_legs = smart_cast(Visual())->ID_Cycle("cr_idle_1"); } @@ -587,10 +587,10 @@ void CActor::g_SetAnimation(u32 mstate_rl) IKinematicsAnimated* ka = smart_cast(Visual()); m_current_legs_blend = PlayMotionByParts(ka, M_legs, TRUE, legs_play_callback, this); // m_current_legs_blend = - //smart_cast(Visual())->PlayCycle(M_legs,TRUE,legs_play_callback,this); + // smart_cast(Visual())->PlayCycle(M_legs,TRUE,legs_play_callback,this); if ((!(mstate_old & mcAnyMove)) && (mstate_real & mcAnyMove)) { - pos = 0.5f; // 0.5f*Random.randI(2); + pos = 0.5f; // 0.5f*Random.randI(2); } if (m_current_legs_blend) m_current_legs_blend->timeCurrent = m_current_legs_blend->timeTotal * pos; diff --git a/src/xrGame/ActorAnimation.h b/src/xrGame/ActorAnimation.h index 9af2e5c87df..adec5c4e712 100644 --- a/src/xrGame/ActorAnimation.h +++ b/src/xrGame/ActorAnimation.h @@ -44,4 +44,4 @@ #define _Jump (mcJump) //------------------------------------------------------------------------------- -#endif //_Actor_Animation_H +#endif //_Actor_Animation_H diff --git a/src/xrGame/ActorCondition.cpp b/src/xrGame/ActorCondition.cpp index f1f6c16b417..618806620a6 100644 --- a/src/xrGame/ActorCondition.cpp +++ b/src/xrGame/ActorCondition.cpp @@ -302,7 +302,7 @@ void CActorCondition::AffectDamage_InjuriousMaterialAndMonstersInfluence() float psy_influence = 0; float fire_influence = 0; - float radiation_influence = GetInjuriousMaterialDamage(); // Get Radiation from Material + float radiation_influence = GetInjuriousMaterialDamage(); // Get Radiation from Material // Add Radiation and Psy Level from Monsters CPda* const pda = m_object->GetPDA(); @@ -350,9 +350,9 @@ void CActorCondition::AffectDamage_InjuriousMaterialAndMonstersInfluence() CGameObject::u_EventSend(np); } - } // for + } // for - } // while + } // while } #include "CharacterPhysicsSupport.h" @@ -780,7 +780,7 @@ bool CActorCondition::PlayHitSound(SHit* pHDS) case ALife::eHitTypeBurn: case ALife::eHitTypeLightBurn: case ALife::eHitTypeChemicalBurn: - return (pHDS->damage() > 0.017f); // field zone threshold + return (pHDS->damage() > 0.017f); // field zone threshold break; default: return true; } @@ -846,7 +846,7 @@ void enable_input(); void hide_indicators(); void show_indicators(); -CActorDeathEffector::CActorDeathEffector(CActorCondition* parent, LPCSTR sect) // -(( +CActorDeathEffector::CActorDeathEffector(CActorCondition* parent, LPCSTR sect) // -(( : m_pParent(parent) { Actor()->SetWeaponHideState(INV_STATE_BLOCK_ALL, true); diff --git a/src/xrGame/ActorCondition.h b/src/xrGame/ActorCondition.h index 29dcb347faf..0e0c1fdb59f 100644 --- a/src/xrGame/ActorCondition.h +++ b/src/xrGame/ActorCondition.h @@ -178,7 +178,7 @@ class CActorDeathEffector void xr_stdcall OnPPEffectorReleased(); public: - CActorDeathEffector(CActorCondition* parent, LPCSTR sect); // -(( + CActorDeathEffector(CActorCondition* parent, LPCSTR sect); // -(( ~CActorDeathEffector(); void UpdateCL(); IC bool IsActual() { return m_b_actual; } diff --git a/src/xrGame/ActorEffector.cpp b/src/xrGame/ActorEffector.cpp index 7d320ea07a3..8031adf318e 100644 --- a/src/xrGame/ActorEffector.cpp +++ b/src/xrGame/ActorEffector.cpp @@ -309,7 +309,7 @@ void SndShockEffector::Start(CActor* A, float snd_length, float power) m_cur_length = 0; psSoundVFactor = m_stored_volume * SND_MIN_VOLUME_FACTOR; - static float xxx = 6.0f / 1.50f; // 6sec on max power(1.5) + static float xxx = 6.0f / 1.50f; // 6sec on max power(1.5) m_life_time = power * xxx; m_end_time = Device.fTimeGlobal + m_life_time; @@ -454,7 +454,7 @@ bool CActorCameraManager::ProcessCameraEffector(CEffectorCam* eff) cam_effector_sub(affected, prev, diff); - cam_effector_add(diff, m_cam_info_hud); // m_cam_info_hud += difference + cam_effector_add(diff, m_cam_info_hud); // m_cam_info_hud += difference } m_cam_info_hud.fFov = m_cam_info.fFov; diff --git a/src/xrGame/ActorEffector.h b/src/xrGame/ActorEffector.h index f716207e925..acc4484fadc 100644 --- a/src/xrGame/ActorEffector.h +++ b/src/xrGame/ActorEffector.h @@ -126,8 +126,8 @@ class SndShockEffector : public CEffectorController typedef CEffectorController inherited; public: - float m_snd_length; // ms - float m_cur_length; // ms + float m_snd_length; // ms + float m_cur_length; // ms float m_stored_volume; float m_end_time; float m_life_time; diff --git a/src/xrGame/ActorHelmet.cpp b/src/xrGame/ActorHelmet.cpp index ca8e09619a3..2135276b8eb 100644 --- a/src/xrGame/ActorHelmet.cpp +++ b/src/xrGame/ActorHelmet.cpp @@ -33,7 +33,7 @@ void CHelmet::Load(LPCSTR section) m_HitTypeProtection[ALife::eHitTypeTelepatic] = pSettings->r_float(section, "telepatic_protection"); m_HitTypeProtection[ALife::eHitTypeChemicalBurn] = pSettings->r_float(section, "chemical_burn_protection"); m_HitTypeProtection[ALife::eHitTypeExplosion] = pSettings->r_float(section, "explosion_protection"); - m_HitTypeProtection[ALife::eHitTypeFireWound] = 0.0f; // pSettings->r_float(section,"fire_wound_protection"); + m_HitTypeProtection[ALife::eHitTypeFireWound] = 0.0f; // pSettings->r_float(section,"fire_wound_protection"); // m_HitTypeProtection[ALife::eHitTypePhysicStrike]= pSettings->r_float(section,"physic_strike_protection"); m_HitTypeProtection[ALife::eHitTypeLightBurn] = m_HitTypeProtection[ALife::eHitTypeBurn]; m_boneProtection->m_fHitFracActor = pSettings->r_float(section, "hit_fraction_actor"); @@ -225,7 +225,7 @@ float CHelmet::HitThroughArmor(float hit_power, s16 element, float ap, bool& add { //пуля НЕ пробила бронь NewHitPower *= m_boneProtection->m_fHitFracActor; - add_wound = false; //раны нет + add_wound = false; //раны нет } } else diff --git a/src/xrGame/ActorInput.cpp b/src/xrGame/ActorInput.cpp index 16a06402933..2e3671fc594 100644 --- a/src/xrGame/ActorInput.cpp +++ b/src/xrGame/ActorInput.cpp @@ -81,7 +81,7 @@ void CActor::IR_OnKeyboardPress(int cmd) NoClipFly(cmd); return; } -#endif // DEBUG +#endif // DEBUG switch (cmd) { case kJUMP: { mstate_wishful |= mcJump; @@ -244,7 +244,7 @@ void CActor::IR_OnKeyboardHold(int cmd) NoClipFly(cmd); return; } -#endif // DEBUG +#endif // DEBUG float LookFactor = GetLookFactor(); switch (cmd) { @@ -329,7 +329,7 @@ bool CActor::use_Holder(CHolderCustom* holder) if (holderGO->CLS_ID == CLSID_OBJECT_W_STATMGUN) b = use_MountedWeapon(holder); - if (b) { // used succesfully + if (b) { // used succesfully // switch off torch... CAttachableItem* I = CAttachmentOwner::attachedItem(CLSID_DEVICE_TORCH); if (I) { @@ -367,7 +367,7 @@ void CActor::ActorUse() if (m_pInvBoxWeLookingAt && m_pInvBoxWeLookingAt->nonscript_usable()) { CUIGameSP* pGameSP = smart_cast(CurrentGameUI()); - if (pGameSP) // single + if (pGameSP) // single { if (!m_pInvBoxWeLookingAt->closed()) { pGameSP->StartCarBody(this, m_pInvBoxWeLookingAt); @@ -433,11 +433,11 @@ BOOL CActor::HUDview() const } static u16 SlotsToCheck[] = { - KNIFE_SLOT, // 0 - INV_SLOT_2, // 1 - INV_SLOT_3, // 2 - GRENADE_SLOT, // 3 - ARTEFACT_SLOT, // 10 + KNIFE_SLOT, // 0 + INV_SLOT_2, // 1 + INV_SLOT_3, // 2 + GRENADE_SLOT, // 3 + ARTEFACT_SLOT, // 10 }; void CActor::OnNextWeaponSlot() @@ -485,7 +485,7 @@ void CActor::OnPrevWeaponSlot() if (SlotsToCheck[CurSlot] == ActiveSlot) break; }; - if (CurSlot >= NumSlotsToCheck) CurSlot = NumSlotsToCheck - 1; // last in row + if (CurSlot >= NumSlotsToCheck) CurSlot = NumSlotsToCheck - 1; // last in row for (s32 i = s32(CurSlot - 1); i >= 0; i--) { @@ -570,7 +570,7 @@ void CActor::SwitchTorch() #ifdef DEBUG void CActor::NoClipFly(int cmd) { - Fvector cur_pos; // = Position(); + Fvector cur_pos; // = Position(); cur_pos.set(0, 0, 0); float scale = 1.0f; if (pInput->iGetAsyncKeyState(DIK_LSHIFT)) @@ -610,4 +610,4 @@ void CActor::NoClipFly(int cmd) Position().add(cur_pos); character_physics_support()->movement()->SetPosition(Position()); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/ActorVehicle.cpp b/src/xrGame/ActorVehicle.cpp index c3585bebc4a..b2584196827 100644 --- a/src/xrGame/ActorVehicle.cpp +++ b/src/xrGame/ActorVehicle.cpp @@ -76,7 +76,7 @@ void CActor::detach_Vehicle() // if(sh) // sh->Activate(); car->PPhysicsShell()->SplitterHolderActivate(); - m_holder->detach_Actor(); // + m_holder->detach_Actor(); // character_physics_support()->movement()->SetPosition(m_holder->ExitPosition()); character_physics_support()->movement()->SetVelocity(m_holder->ExitVelocity()); diff --git a/src/xrGame/Actor_Events.cpp b/src/xrGame/Actor_Events.cpp index 034d417d112..bb2f96ab800 100644 --- a/src/xrGame/Actor_Events.cpp +++ b/src/xrGame/Actor_Events.cpp @@ -57,7 +57,7 @@ void CActor::OnEvent(NET_Packet& P, u16 type) string64 act; xr_strcpy(act, (type == GE_TRADE_BUY) ? "buys" : "takes"); Msg("--- Actor [%d][%s] %s [%d][%s]", ID(), Name(), act, _GO->ID(), _GO->cNameSect().c_str()); -#endif // MP_LOGGING +#endif // MP_LOGGING inventory().Take(_GO, false, true); @@ -102,7 +102,7 @@ void CActor::OnEvent(NET_Packet& P, u16 type) string64 act; xr_strcpy(act, (type == GE_TRADE_SELL) ? "sells" : "rejects"); Msg("--- Actor [%d][%s] %s [%d][%s]", ID(), Name(), act, GO->ID(), GO->cNameSect().c_str()); -#endif // MP_LOGGING +#endif // MP_LOGGING VERIFY(GO->H_Parent()); if (!GO->H_Parent()) { @@ -176,7 +176,8 @@ void CActor::OnEvent(NET_Packet& P, u16 type) P.r_u16(id); IGameObject* Obj = Level().Objects.net_Find(id); - // R_ASSERT2( Obj, make_string("GEG_PLAYER_ITEM_EAT(use): Object not found. object_id = [%d]", id).c_str() + // R_ASSERT2( Obj, make_string("GEG_PLAYER_ITEM_EAT(use): Object not found. object_id = [%d]", + //id).c_str() //); VERIFY2(Obj, make_string("GEG_PLAYER_ITEM_EAT(use): Object not found. object_id = [%d]", id).c_str()); if (!Obj) { @@ -185,12 +186,14 @@ void CActor::OnEvent(NET_Packet& P, u16 type) break; } - // R_ASSERT2( !Obj->getDestroy(), make_string("GEG_PLAYER_ITEM_EAT(use): Object is destroying. object_id = + // R_ASSERT2( !Obj->getDestroy(), make_string("GEG_PLAYER_ITEM_EAT(use): Object is destroying. object_id + //= //[%d]", id).c_str() ); VERIFY2(!Obj->getDestroy(), make_string("GEG_PLAYER_ITEM_EAT(use): Object is destroying. object_id = [%d]", id).c_str()); if (Obj->getDestroy()) { - // Msg ( "! GEG_PLAYER_ITEM_EAT(use): Object is destroying. object_id + // Msg ( "! GEG_PLAYER_ITEM_EAT(use): Object is destroying. + //object_id //= [%d]", id ); break; } @@ -203,17 +206,18 @@ void CActor::OnEvent(NET_Packet& P, u16 type) if (type == GEG_PLAYER_ACTIVATEARTEFACT) { CArtefact* pArtefact = smart_cast(Obj); - // R_ASSERT2( pArtefact, make_string("GEG_PLAYER_ACTIVATEARTEFACT: Artefact not found. artefact_id = + // R_ASSERT2( pArtefact, make_string("GEG_PLAYER_ACTIVATEARTEFACT: Artefact not found. artefact_id + //= //[%d]", id).c_str() ); VERIFY2(pArtefact, make_string("GEG_PLAYER_ACTIVATEARTEFACT: Artefact not found. artefact_id = [%d]", id).c_str()); if (!pArtefact) { Msg("! GEG_PLAYER_ACTIVATEARTEFACT: Artefact not found. artefact_id = [%d]", id); - break; // 1 + break; // 1 } pArtefact->ActivateArtefact(); - break; // 1 + break; // 1 } PIItem iitem = smart_cast(Obj); @@ -226,19 +230,19 @@ void CActor::OnEvent(NET_Packet& P, u16 type) u16 slot_id = P.r_u16(); inventory().Slot(slot_id, iitem); } - break; // 2 + break; // 2 case GEG_PLAYER_ITEM2BELT: inventory().Belt(iitem); - break; // 2 + break; // 2 case GEG_PLAYER_ITEM2RUCK: inventory().Ruck(iitem); - break; // 2 + break; // 2 case GEG_PLAYER_ITEM_EAT: inventory().Eat(iitem); - break; // 2 - } // switch + break; // 2 + } // switch } - break; // 1 + break; // 1 case GEG_PLAYER_ACTIVATE_SLOT: { u16 slot_id; @@ -336,7 +340,7 @@ void CActor::MoveActor(Fvector NewPos, Fvector NewDir) r_torso.pitch = -NewDir.x; unaffected_r_torso.yaw = r_torso.yaw; unaffected_r_torso.pitch = r_torso.pitch; - unaffected_r_torso.roll = 0; // r_torso.roll; + unaffected_r_torso.roll = 0; // r_torso.roll; r_torso_tgt_roll = 0; cam_Active()->Set(-unaffected_r_torso.yaw, unaffected_r_torso.pitch, unaffected_r_torso.roll); diff --git a/src/xrGame/Actor_Feel.cpp b/src/xrGame/Actor_Feel.cpp index 78694c9196c..c9e25cebdeb 100644 --- a/src/xrGame/Actor_Feel.cpp +++ b/src/xrGame/Actor_Feel.cpp @@ -64,11 +64,11 @@ ICF static BOOL info_trace_callback(collide::rq_result& result, LPVOID params) { BOOL& bOverlaped = *(BOOL*)params; if (result.O) { - if (Level().CurrentEntity() == result.O) { // ignore self-actor + if (Level().CurrentEntity() == result.O) { // ignore self-actor return TRUE; } else - { // check obstacle flag + { // check obstacle flag if (result.O->GetSpatialData().type & STYPE_OBSTACLE) bOverlaped = TRUE; return TRUE; @@ -106,7 +106,7 @@ BOOL CActor::CanPickItem(const CFrustum& frustum, const Fvector& from, IGameObje void CActor::PickupModeUpdate() { - if (!m_bPickupMode) return; // kUSE key pressed + if (!m_bPickupMode) return; // kUSE key pressed if (!IsGameTypeSingle()) return; //подбирание объекта @@ -296,7 +296,7 @@ void CActor::Feel_Grenade_Update(float rad) // select only grenade for (; it_b != it_e; ++it_b) { - if ((*it_b)->getDestroy()) continue; // Don't touch candidates for destroy + if ((*it_b)->getDestroy()) continue; // Don't touch candidates for destroy CGrenade* grn = smart_cast(*it_b); if (!grn || grn->Initiator() == ID() || grn->Useful()) { @@ -308,7 +308,7 @@ void CActor::Feel_Grenade_Update(float rad) if (HUD().AddGrenade_ForMark(grn)) { //. Msg("__ __ Add new grenade! id = %d ", grn->ID() ); } - } // for it + } // for it HUD().Update_GrenadeView(pos_actor); } diff --git a/src/xrGame/Actor_Movement.cpp b/src/xrGame/Actor_Movement.cpp index 197d82fa0d5..6672a221287 100644 --- a/src/xrGame/Actor_Movement.cpp +++ b/src/xrGame/Actor_Movement.cpp @@ -20,15 +20,15 @@ #ifdef DEBUG #include "phdebug.h" #endif -static const float s_fLandingTime1 = 0.1f; // через сколько снять флаг Landing1 (т.е. включить следующую анимацию) -static const float s_fLandingTime2 = 0.3f; // через сколько снять флаг Landing2 (т.е. включить следующую анимацию) +static const float s_fLandingTime1 = 0.1f; // через сколько снять флаг Landing1 (т.е. включить следующую анимацию) +static const float s_fLandingTime2 = 0.3f; // через сколько снять флаг Landing2 (т.е. включить следующую анимацию) static const float s_fJumpTime = 0.3f; -static const float s_fJumpGroundTime = 0.1f; // для снятия флажка Jump если на земле +static const float s_fJumpGroundTime = 0.1f; // для снятия флажка Jump если на земле const float s_fFallTime = 0.2f; IC static void generate_orthonormal_basis1(const Fvector& dir, Fvector& updir, Fvector& right) { - right.crossproduct(dir, updir); //. <-> + right.crossproduct(dir, updir); //. <-> right.normalize(); updir.crossproduct(right, dir); } @@ -255,9 +255,9 @@ void CActor::g_cl_CheckControls(u32 mstate_wf, Fvector& vControlAccel, float& Ju vControlAccel.mul(scale); cam_eff_factor = scale; - } // scale>EPS - } //(mstate_real&mcAnyMove) - } // peOnGround || peAtWall + } // scale>EPS + } //(mstate_real&mcAnyMove) + } // peOnGround || peAtWall if (IsGameTypeSingle() && cam_eff_factor > EPS) { LPCSTR state_anm = NULL; @@ -273,7 +273,7 @@ void CActor::g_cl_CheckControls(u32 mstate_wf, Fvector& vControlAccel, float& Ju else if (mstate_real & mcBack && !(mstate_old & mcBack)) state_anm = "move_back"; - if (state_anm) { // play moving cam effect + if (state_anm) { // play moving cam effect CActor* control_entity = smart_cast(Level().CurrentControlEntity()); R_ASSERT2(control_entity, "current control entity is NULL"); CEffectorCam* ec = control_entity->Cameras().GetCamEffector(eCEActorMoving); @@ -326,22 +326,22 @@ void CActor::g_Orientate(u32 mstate_rl, float dt) switch (mstate_rl & mcAnyMove) { case mcFwd + mcLStrafe: - calc_yaw = +fwd_l_strafe_yaw; //+PI_DIV_4; + calc_yaw = +fwd_l_strafe_yaw; //+PI_DIV_4; break; case mcBack + mcRStrafe: - calc_yaw = +back_r_strafe_yaw; //+PI_DIV_4; + calc_yaw = +back_r_strafe_yaw; //+PI_DIV_4; break; case mcFwd + mcRStrafe: - calc_yaw = -fwd_r_strafe_yaw; //-PI_DIV_4; + calc_yaw = -fwd_r_strafe_yaw; //-PI_DIV_4; break; case mcBack + mcLStrafe: - calc_yaw = -back_l_strafe_yaw; //-PI_DIV_4; + calc_yaw = -back_l_strafe_yaw; //-PI_DIV_4; break; case mcLStrafe: - calc_yaw = +l_strafe_yaw; //+PI_DIV_3-EPS_L; + calc_yaw = +l_strafe_yaw; //+PI_DIV_3-EPS_L; break; case mcRStrafe: - calc_yaw = -r_strafe_yaw; //-PI_DIV_4+EPS_L; + calc_yaw = -r_strafe_yaw; //-PI_DIV_4+EPS_L; break; } diff --git a/src/xrGame/Actor_Network.cpp b/src/xrGame/Actor_Network.cpp index e758effa481..69e65900251 100644 --- a/src/xrGame/Actor_Network.cpp +++ b/src/xrGame/Actor_Network.cpp @@ -85,7 +85,7 @@ void CActor::ConvState(u32 mstate_rl, string128* buf) if (m_bJumpKeyPressed) xr_strcat(*buf, "+Jumping "); }; //-------------------------------------------------------------------- -void CActor::net_Export(NET_Packet& P) // export to server +void CActor::net_Export(NET_Packet& P) // export to server { // CSE_ALifeCreatureAbstract u8 flags = 0; @@ -93,12 +93,12 @@ void CActor::net_Export(NET_Packet& P) // export to server P.w_u32(Level().timeServer()); P.w_u8(flags); Fvector p = Position(); - P.w_vec3(p); // Position()); + P.w_vec3(p); // Position()); - P.w_float /*w_angle8*/ (angle_normalize(r_model_yaw)); // Device.vCameraDirection.getH());// - P.w_float /*w_angle8*/ (angle_normalize(unaffected_r_torso.yaw)); //(r_torso.yaw); - P.w_float /*w_angle8*/ (angle_normalize(unaffected_r_torso.pitch)); //(r_torso.pitch); - P.w_float /*w_angle8*/ (angle_normalize(unaffected_r_torso.roll)); //(r_torso.roll); + P.w_float /*w_angle8*/ (angle_normalize(r_model_yaw)); // Device.vCameraDirection.getH());// + P.w_float /*w_angle8*/ (angle_normalize(unaffected_r_torso.yaw)); //(r_torso.yaw); + P.w_float /*w_angle8*/ (angle_normalize(unaffected_r_torso.pitch)); //(r_torso.pitch); + P.w_float /*w_angle8*/ (angle_normalize(unaffected_r_torso.roll)); //(r_torso.roll); P.w_u8(u8(g_Team())); P.w_u8(u8(g_Squad())); P.w_u8(u8(g_Group())); @@ -113,7 +113,7 @@ void CActor::net_Export(NET_Packet& P) // export to server P.w_u16(u16(ms)); P.w_sdir(NET_SavedAccel); Fvector v = character_physics_support()->movement()->GetVelocity(); - P.w_sdir(v); // m_PhysicMovementControl.GetVelocity()); + P.w_sdir(v); // m_PhysicMovementControl.GetVelocity()); // P.w_float_q16 (fArmor,-500,1000); P.w_float(g_Radiation()); @@ -279,7 +279,7 @@ void CActor::net_ExportDeadBody(NET_Packet& P) }; }; -void CActor::net_Import(NET_Packet& P) // import from server +void CActor::net_Import(NET_Packet& P) // import from server { //----------------------------------------------- net_Import_Base(P); @@ -554,7 +554,7 @@ BOOL CActor::net_Spawn(CSE_Abstract* DC) r_model_yaw = E->o_torso.yaw; r_torso.yaw = E->o_torso.yaw; r_torso.pitch = E->o_torso.pitch; - r_torso.roll = 0.0f; // E->o_Angle.z; + r_torso.roll = 0.0f; // E->o_Angle.z; unaffected_r_torso.yaw = r_torso.yaw; unaffected_r_torso.pitch = r_torso.pitch; @@ -565,7 +565,7 @@ BOOL CActor::net_Spawn(CSE_Abstract* DC) else cam_Set(eacFirstEye); - cam_Active()->Set(-E->o_torso.yaw, E->o_torso.pitch, 0); // E->o_Angle.z); + cam_Active()->Set(-E->o_torso.yaw, E->o_torso.pitch, 0); // E->o_Angle.z); // *** movement state - respawn // mstate_wishful = 0; @@ -748,7 +748,7 @@ void CActor::net_Relcase(IGameObject* O) HUD().net_Relcase(O); } -BOOL CActor::net_Relevant() // relevant for export to server +BOOL CActor::net_Relevant() // relevant for export to server { if (OnServer()) { return getSVU() | getLocal(); @@ -869,7 +869,7 @@ InterpData IStartT; InterpData IRecT; InterpData IEndT; -void CActor::PH_B_CrPr() // actions & operations before physic correction-prediction steps +void CActor::PH_B_CrPr() // actions & operations before physic correction-prediction steps { // just set last update data for now // if (!m_bHasUpdate) return; @@ -912,7 +912,7 @@ void CActor::PH_B_CrPr() // actions & operations before physic correction-predi NET_Last = N; /////////////////////////////////////////////// cam_Active()->Set(-unaffected_r_torso.yaw, unaffected_r_torso.pitch, - 0); //, unaffected_r_torso.roll); // set's camera orientation + 0); //, unaffected_r_torso.roll); // set's camera orientation if (!N_A.State.enabled) { pSyncObj->set_State(N_A.State); } @@ -952,7 +952,7 @@ void CActor::PH_B_CrPr() // actions & operations before physic correction-predi }; }; -void CActor::PH_I_CrPr() // actions & operations between two phisic prediction steps +void CActor::PH_I_CrPr() // actions & operations between two phisic prediction steps { // store recalculated data, then we able to restore it after small future prediction // if (!m_bHasUpdate) return; @@ -1041,10 +1041,10 @@ void CActor::CalculateInterpolationParams() for (u32 k = 0; k < 3; k++) { SP0[k] = c * (c * (c * SCoeff[k][0] + SCoeff[k][1]) + SCoeff[k][2]) + SCoeff[k][3]; - SP1[k] = (c * c * SCoeff[k][0] * 3 + c * SCoeff[k][1] * 2 + SCoeff[k][2]) / 3; // 3 !!!! + SP1[k] = (c * c * SCoeff[k][0] * 3 + c * SCoeff[k][1] * 2 + SCoeff[k][2]) / 3; // 3 !!!! HP0[k] = c * (c * (c * HCoeff[k][0] + HCoeff[k][1]) + HCoeff[k][2]) + HCoeff[k][3]; - HP1[k] = (c * c * HCoeff[k][0] * 3 + c * HCoeff[k][1] * 2 + HCoeff[k][2]) / 3; // 3 !!!! + HP1[k] = (c * c * HCoeff[k][0] * 3 + c * HCoeff[k][1] * 2 + HCoeff[k][2]) / 3; // 3 !!!! }; SP1.add(SP0); @@ -1170,7 +1170,7 @@ void CActor::make_Interpolation() CPHSynchronize* pSyncObj = NULL; pSyncObj = PHGetSyncItem(0); if (!pSyncObj) return; - pSyncObj->set_State(PredictedState); //, PredictedState.enabled); + pSyncObj->set_State(PredictedState); //, PredictedState.enabled); VERIFY2(_valid(renderable.xform), *cName()); } else @@ -1211,7 +1211,7 @@ void CActor::make_Interpolation() { for (int k = 0; k < 3; k++) SpeedVector[k] = (factor * factor * SCoeff[k][0] * 3 + factor * SCoeff[k][1] * 2 + SCoeff[k][2]) / - 3; // 3 !!!! + 3; // 3 !!!! ResPosition.set(IPosS); } @@ -1229,7 +1229,7 @@ void CActor::make_Interpolation() } character_physics_support()->movement()->SetPosition(ResPosition); character_physics_support()->movement()->SetVelocity(SpeedVector); - cam_Active()->Set(-unaffected_r_torso.yaw, unaffected_r_torso.pitch, 0); //, unaffected_r_torso.roll); + cam_Active()->Set(-unaffected_r_torso.yaw, unaffected_r_torso.pitch, 0); //, unaffected_r_torso.roll); }; } else @@ -1405,7 +1405,7 @@ void CActor::OnRender_Network() float size = 0.2f; // dbg_draw_piramid(Position(), m_PhysicMovementControl->GetVelocity(), size/2, -r_model_yaw, color_rgba(255, 255, - //255, 255)); + // 255, 255)); //----------------------------------------------------------------------------------------------------- if (g_Alive()) { if (dbg_net_Draw_Flags.test(dbg_draw_autopickupbox)) { @@ -1480,7 +1480,7 @@ void CActor::OnRender_Network() dbg_draw_piramid(IStart.Pos, IStart.Vel, size, -IStart.o_model, color_rgba(255, 0, 0, 255)); // Fvector tmp, tmp1; tmp1.set(0, .1f, 0); // dbg_draw_piramid(tmp.add(IStartT.Pos, tmp1), IStartT.Vel, size, -IStartT.o_model, color_rgba(155, 0, 0, - //155)); + // 155)); dbg_draw_piramid(IRec.Pos, IRec.Vel, size, -IRec.o_model, color_rgba(0, 0, 255, 255)); // dbg_draw_piramid(tmp.add(IRecT.Pos, tmp1), IRecT.Vel, size, -IRecT.o_model, color_rgba(0, 0, 155, 155)); dbg_draw_piramid(IEnd.Pos, IEnd.Vel, size, -IEnd.o_model, color_rgba(0, 255, 0, 255)); @@ -1554,7 +1554,7 @@ void CActor::OnRender_Network() point1S[k] = c * (c * (c * SCoeff[k][0] + SCoeff[k][1]) + SCoeff[k][2]) + SCoeff[k][3]; point1H[k] = c * (c * (c * HCoeff[k][0] + HCoeff[k][1]) + HCoeff[k][2]) + HCoeff[k][3]; - tS[k] = (c * c * SCoeff[k][0] * 3 + c * SCoeff[k][1] * 2 + SCoeff[k][2]) / 3; // 3 !!!! + tS[k] = (c * c * SCoeff[k][0] * 3 + c * SCoeff[k][1] * 2 + SCoeff[k][2]) / 3; // 3 !!!! tH[k] = (c * c * HCoeff[k][0] * 3 + c * HCoeff[k][1] * 2 + HCoeff[k][2]); }; @@ -1645,7 +1645,7 @@ void CActor::OnRender_Network() u16 NumBones = PHGetSyncItemsNumber(); for (u16 i = 0; i < NumBones; i++) { - SPHNetState state; // = m_States[i]; + SPHNetState state; // = m_States[i]; PHGetSyncItem(i)->get_State(state); Fmatrix M; @@ -1772,7 +1772,7 @@ void CActor::OnHitHealthLoss(float NewHealth) if (m_iLastHitterID != u16(-1)) { #ifndef MASTER_GOLD Msg("On hit health loss of actor[%d], last hitter[%d]", ID(), m_iLastHitterID); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD NET_Packet P; u_EventGen(P, GE_GAME_EVENT, ID()); P.w_u16(GAME_EVENT_PLAYER_HITTED); @@ -1798,7 +1798,7 @@ void CActor::OnCriticalHitHealthLoss() if (m_iLastHitterID != u16(-1)) { #ifndef MASTER_GOLD Msg("On hit of actor[%d], last hitter[%d]", ID(), m_iLastHitterID); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD NET_Packet P; u_EventGen(P, GE_GAME_EVENT, ID()); P.w_u16(GAME_EVENT_PLAYER_HITTED); @@ -1890,7 +1890,7 @@ void CActor::OnCriticalWoundHealthLoss() if (GameID() == eGameIDSingle || !OnServer()) return; #ifdef DEBUG Msg("--- %s is bleed out", *cName()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG //------------------------------- NET_Packet P; u_EventGen(P, GE_GAME_EVENT, ID()); @@ -1969,6 +1969,6 @@ void CActor::On_B_NotCurrentEntity() { #ifndef MASTER_GOLD Msg("CActor::On_B_NotCurrentEntity"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD inventory().Items_SetCurrentEntityHud(false); }; diff --git a/src/xrGame/Actor_Weapon.cpp b/src/xrGame/Actor_Weapon.cpp index d703957f150..ed6d39e94c4 100644 --- a/src/xrGame/Actor_Weapon.cpp +++ b/src/xrGame/Actor_Weapon.cpp @@ -107,10 +107,10 @@ void CActor::SetWeaponHideState(u16 State, bool bSet) }; } static u16 BestWeaponSlots[] = { - INV_SLOT_3, // 2 - INV_SLOT_2, // 1 - GRENADE_SLOT, // 3 - KNIFE_SLOT, // 0 + INV_SLOT_3, // 2 + INV_SLOT_2, // 1 + GRENADE_SLOT, // 3 + KNIFE_SLOT, // 0 }; void CActor::SelectBestWeapon(IGameObject* O) { @@ -125,12 +125,12 @@ void CActor::SelectBestWeapon(IGameObject* O) CInventoryItem* pIItem = smart_cast(O); bool NeedToSelectBestWeapon = false; - if (pArtefact && pArtefact->H_Parent()) // just take an artefact + if (pArtefact && pArtefact->H_Parent()) // just take an artefact return; if ((pWeapon || pGrenade || pArtefact) && pIItem) { NeedToSelectBestWeapon = true; - if ((GameID() == eGameIDArtefactHunt) || (GameID() == eGameIDCaptureTheArtefact)) // only for test... + if ((GameID() == eGameIDArtefactHunt) || (GameID() == eGameIDCaptureTheArtefact)) // only for test... { if (pIItem->BaseSlot() == INV_SLOT_2 || pIItem->BaseSlot() == INV_SLOT_3) { CInventoryItem* pIItemInSlot = inventory().ItemFromSlot(pIItem->BaseSlot()); @@ -148,14 +148,14 @@ void CActor::SelectBestWeapon(IGameObject* O) if (best_item && best_item->can_kill()) { #ifdef DEBUG Msg("--- Selecting best weapon [%d], Frame[%d]", BestWeaponSlots[i], Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG inventory().Activate(BestWeaponSlots[i]); } else { #ifdef DEBUG Msg("--- Weapon is not best..."); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } } return; diff --git a/src/xrGame/AdvancedDetector.cpp b/src/xrGame/AdvancedDetector.cpp index b97b9f33aa2..ae9c49319d6 100644 --- a/src/xrGame/AdvancedDetector.cpp +++ b/src/xrGame/AdvancedDetector.cpp @@ -37,7 +37,7 @@ void CAdvancedDetector::UpdateAf() float min_dist = flt_max; Fvector detector_pos = Position(); - for (; it_b != it_e; ++it_b) // only nearest + for (; it_b != it_e; ++it_b) // only nearest { CArtefact* pAf = it_b->first; if (pAf->H_Parent()) continue; diff --git a/src/xrGame/Artefact.cpp b/src/xrGame/Artefact.cpp index 2c849b0be94..7e714b91cba 100644 --- a/src/xrGame/Artefact.cpp +++ b/src/xrGame/Artefact.cpp @@ -21,7 +21,7 @@ #include "xrAICore/Navigation/PatrolPath/patrol_path.h" #include "xrAICore/Navigation/PatrolPath/patrol_path_storage.h" -#define FASTMODE_DISTANCE (50.f) // distance to camera from sphere, when zone switches to fast update sequence +#define FASTMODE_DISTANCE (50.f) // distance to camera from sphere, when zone switches to fast update sequence #define CHOOSE_MAX(x, inst_x, y, inst_y, z, inst_z) \ if (x > y) \ @@ -95,7 +95,7 @@ BOOL CArtefact::net_Spawn(CSE_Abstract* DC) IKinematicsAnimated* K = smart_cast(Visual()); if (K) K->PlayCycle("idle"); - o_fastmode = FALSE; // start initially with fast-mode enabled + o_fastmode = FALSE; // start initially with fast-mode enabled o_render_frame = 0; SetState(eHidden); @@ -173,14 +173,14 @@ void CArtefact::Interpolate() if (OnServer()) return; net_updateInvData* p = NetSync(); - while (p->NET_IItem.size() > 1) // in real no interpolation, just get latest state + while (p->NET_IItem.size() > 1) // in real no interpolation, just get latest state { p->NET_IItem.pop_front(); } inherited::Interpolate(); if (p->NET_IItem.size()) { - p->NET_IItem.clear(); // same as p->NET_IItem.pop_front(); + p->NET_IItem.clear(); // same as p->NET_IItem.pop_front(); } } @@ -460,7 +460,7 @@ void CArtefact::ForceTransform(const Fmatrix& m) { VERIFY(PPhysicsShell()); XFORM().set(m); - PPhysicsShell()->SetGlTransformDynamic(m); // XFORM().set(m); + PPhysicsShell()->SetGlTransformDynamic(m); // XFORM().set(m); } void CArtefact::CreateArtefactActivation() @@ -555,7 +555,7 @@ void SArtefactDetectorsSupport::UpdateOnFrame() if (m_parent->getVisible() && m_parent->GetAfRank() != 0 && m_switchVisTime + 5000 < Device.dwTimeGlobal) SetVisible(false); - u32 dwDt = 2 * 3600 * 1000 / 10; // 2 hour of game time + u32 dwDt = 2 * 3600 * 1000 / 10; // 2 hour of game time if (!m_parent->getVisible() && m_switchVisTime + dwDt < Device.dwTimeGlobal) { m_switchVisTime = Device.dwTimeGlobal; if (m_parent->Position().distance_to(Device.vCameraPosition) > 40.0f) Blink(); diff --git a/src/xrGame/BlackGraviArtifact.cpp b/src/xrGame/BlackGraviArtifact.cpp index 26b12551a3b..526e112a689 100644 --- a/src/xrGame/BlackGraviArtifact.cpp +++ b/src/xrGame/BlackGraviArtifact.cpp @@ -203,16 +203,16 @@ void CBlackGraviArtefact::GraviStrike() NET_Packet P; SHit HS; - HS.GenHeader(GE_HIT, pGameObject->ID()); // u_EventGen (P,GE_HIT, - //pGameObject->ID()); - HS.whoID = ID(); // P.w_u16 (ID()); - HS.weaponID = ID(); // P.w_u16 (ID()); - HS.dir = strike_dir; // P.w_dir (strike_dir); - HS.power = hit_power; // P.w_float (hit_power); - HS.boneID = element; // P.w_s16 (element); - HS.p_in_bone_space = bone_pos; // P.w_vec3 (bone_pos); - HS.impulse = impulse; // P.w_float (impulse); - HS.hit_type = (ALife::eHitTypeWound); // P.w_u16 (u16(ALife::eHitTypeWound)); + HS.GenHeader(GE_HIT, pGameObject->ID()); // u_EventGen (P,GE_HIT, + // pGameObject->ID()); + HS.whoID = ID(); // P.w_u16 (ID()); + HS.weaponID = ID(); // P.w_u16 (ID()); + HS.dir = strike_dir; // P.w_dir (strike_dir); + HS.power = hit_power; // P.w_float (hit_power); + HS.boneID = element; // P.w_s16 (element); + HS.p_in_bone_space = bone_pos; // P.w_vec3 (bone_pos); + HS.impulse = impulse; // P.w_float (impulse); + HS.hit_type = (ALife::eHitTypeWound); // P.w_u16 (u16(ALife::eHitTypeWound)); HS.Write_Packet(P); u_EventSend(P); diff --git a/src/xrGame/BreakableObject.cpp b/src/xrGame/BreakableObject.cpp index 177e3c34bc1..324167f2673 100644 --- a/src/xrGame/BreakableObject.cpp +++ b/src/xrGame/BreakableObject.cpp @@ -163,7 +163,7 @@ void CBreakableObject::CreateBroken() m_Shell->SmoothElementsInertia(0.3f); Fobb b; Visual()->getVisData().box.getradius(b.m_halfsize); - m_Shell->SetMaxAABBRadius(_max(_max(b.m_halfsize.x, b.m_halfsize.y), b.m_halfsize.z) * 2.f); //+2.f + m_Shell->SetMaxAABBRadius(_max(_max(b.m_halfsize.x, b.m_halfsize.y), b.m_halfsize.z) * 2.f); //+2.f } void CBreakableObject::ActivateBroken() diff --git a/src/xrGame/BreakableObject.h b/src/xrGame/BreakableObject.h index a12a7b4dabe..2dfdb9e1e16 100644 --- a/src/xrGame/BreakableObject.h +++ b/src/xrGame/BreakableObject.h @@ -41,7 +41,7 @@ class CBreakableObject : public CPhysicsShellHolder, public ICollisionDamageRece virtual void Load(LPCSTR section); virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); - virtual void shedule_Update(u32 dt); // Called by sheduler + virtual void shedule_Update(u32 dt); // Called by sheduler virtual void UpdateCL(); virtual BOOL renderable_ShadowGenerate() { return FALSE; } virtual BOOL renderable_ShadowReceive() { return TRUE; } @@ -71,4 +71,4 @@ class CBreakableObject : public CPhysicsShellHolder, public ICollisionDamageRece virtual void CollisionHit(u16 source_id, u16 bone_id, float power, const Fvector& dir, Fvector& pos); }; -#endif // BreakableObjectH +#endif // BreakableObjectH diff --git a/src/xrGame/CalculateTriangle.h b/src/xrGame/CalculateTriangle.h index b48aa4881d6..b3c75c5182b 100644 --- a/src/xrGame/CalculateTriangle.h +++ b/src/xrGame/CalculateTriangle.h @@ -95,7 +95,7 @@ IC float DistToFragmenton(const dReal* point, const dReal* pt1, const dReal* pt2 dVector3 L = {pt1[0] - point[0], pt1[1] - point[1], pt1[2] - point[2]}; dReal sq_mag_V = dDOT(V, V); dReal dot_L_V = dDOT(L, V); - dReal t = -dot_L_V / sq_mag_V; // t + dReal t = -dot_L_V / sq_mag_V; // t if (t < 0.f) { c = 1; dVectorSet(p, pt1); diff --git a/src/xrGame/CameraFirstEye.h b/src/xrGame/CameraFirstEye.h index 6b366bde658..31ff8288908 100644 --- a/src/xrGame/CameraFirstEye.h +++ b/src/xrGame/CameraFirstEye.h @@ -29,4 +29,4 @@ class CCameraFirstEye : public CCameraBase } }; -#endif // __CAMERALOOK_H__ +#endif // __CAMERALOOK_H__ diff --git a/src/xrGame/CameraLook.cpp b/src/xrGame/CameraLook.cpp index c9ad0808fd3..9dba5290de3 100644 --- a/src/xrGame/CameraLook.cpp +++ b/src/xrGame/CameraLook.cpp @@ -95,7 +95,7 @@ void CCameraLook2::OnActivate(CCameraBase* old_cam) void CCameraLook2::Update(Fvector& point, Fvector&) { - if (!m_locked_enemy) { // autoaim + if (!m_locked_enemy) { // autoaim if (pInput->iGetAsyncKeyState(cam_dik)) { const CVisualMemoryManager::VISIBLES& vVisibles = Actor()->memory().visual().objects(); CVisualMemoryManager::VISIBLES::const_iterator v_it = vVisibles.begin(); @@ -206,7 +206,7 @@ void CCameraFixedLook::Move(int cmd, float val, float factor) void CCameraFixedLook::Update(Fvector& point, Fvector& noise_dangle) { Fquaternion new_dir; - new_dir.slerp(m_current_dir, m_final_dir, Device.fTimeDelta); // 1 sec + new_dir.slerp(m_current_dir, m_final_dir, Device.fTimeDelta); // 1 sec m_current_dir.set(new_dir); Fmatrix rm; diff --git a/src/xrGame/CameraRecoil.h b/src/xrGame/CameraRecoil.h index f31af22b2d2..6ffd28bc0e5 100644 --- a/src/xrGame/CameraRecoil.h +++ b/src/xrGame/CameraRecoil.h @@ -47,6 +47,6 @@ struct CameraRecoil VERIFY(!fis_zero(MaxAngleVert)); VERIFY(!fis_zero(MaxAngleHorz)); } -}; // struct CameraRecoil +}; // struct CameraRecoil -#endif // CAMERA_RECOIL_H_INCLUDED +#endif // CAMERA_RECOIL_H_INCLUDED diff --git a/src/xrGame/Car.cpp b/src/xrGame/Car.cpp index e62ab8c8909..01abbd3f95e 100644 --- a/src/xrGame/Car.cpp +++ b/src/xrGame/Car.cpp @@ -5,9 +5,9 @@ #include "ParticlesObject.h" #ifdef DEBUG -#include "xrEngine/StatGraph.h" #include "PHDebug.h" -#endif // DEBUG +#include "xrEngine/StatGraph.h" +#endif // DEBUG #include "PHDestroyable.h" @@ -198,13 +198,13 @@ void CCar::SpawnInitPhysics(CSE_Abstract* D) { CSE_PHSkeleton* so = smart_cast(D); R_ASSERT(so); - ParseDefinitions(); // parse ini filling in m_driving_wheels,m_steering_wheels,m_breaking_wheels - CreateSkeleton(D); // creates m_pPhysicsShell & fill in bone_map + ParseDefinitions(); // parse ini filling in m_driving_wheels,m_steering_wheels,m_breaking_wheels + CreateSkeleton(D); // creates m_pPhysicsShell & fill in bone_map IKinematics* K = smart_cast(Visual()); - K->CalculateBones_Invalidate(); // this need to call callbacks + K->CalculateBones_Invalidate(); // this need to call callbacks K->CalculateBones(TRUE); - Init(); // inits m_driving_wheels,m_steering_wheels,m_breaking_wheels values using recieved in ParceDefinitions & - // from bone_map + Init(); // inits m_driving_wheels,m_steering_wheels,m_breaking_wheels values using recieved in ParceDefinitions & + // from bone_map // PPhysicsShell()->add_ObjectContactCallback(ActorObstacleCallback); SetDefaultNetState(so); CPHUpdateObject::Activate(); @@ -376,7 +376,7 @@ void CCar::shedule_Update(u32 dt) if (CDelayedActionFuse::isActive() && CDelayedActionFuse::Update(GetfHealth())) { // CarExplode(); } - if (b_exploded && !m_explosion_flags.test(flExploding) && !getEnabled()) //! m_bExploding + if (b_exploded && !m_explosion_flags.test(flExploding) && !getEnabled()) //! m_bExploding setEnabled(TRUE); #ifdef DEBUG DbgSheduleUpdate(); @@ -634,7 +634,7 @@ bool CCar::is_Door(u16 id, xr_map::iterator& i) } else { - if (i->second.joint) // temp for fake doors + if (i->second.joint) // temp for fake doors return true; else return false; @@ -712,10 +712,10 @@ void CCar::ParseDefinitions() m_min_rpm *= (1.f / 60.f * 2.f * M_PI); m_power_rpm = ini->r_float("car_definition", "max_power_rpm"); - m_power_rpm *= (1.f / 60.f * 2.f * M_PI); // + m_power_rpm *= (1.f / 60.f * 2.f * M_PI); // m_torque_rpm = ini->r_float("car_definition", "max_torque_rpm"); - m_torque_rpm *= (1.f / 60.f * 2.f * M_PI); // + m_torque_rpm *= (1.f / 60.f * 2.f * M_PI); // m_power_increment_factor = READ_IF_EXISTS(ini, r_float, "car_definition", "power_increment_factor", m_power_increment_factor); @@ -830,7 +830,7 @@ void CCar::Init() } m_steer_angle = 0.f; // ref_wheel.Init(); - m_ref_radius = ini->r_float("car_definition", "reference_radius"); // ref_wheel.radius; + m_ref_radius = ini->r_float("car_definition", "reference_radius"); // ref_wheel.radius; b_exploded = false; b_engine_on = false; b_clutch = false; @@ -980,9 +980,9 @@ void CCar::StopEngine() // StopExhausts(); AscCall(ascSndStall); AscCall(ascExhoustStop); - NeutralDrive(); // set zero speed + NeutralDrive(); // set zero speed b_engine_on = false; - UpdatePower(); // set engine friction; + UpdatePower(); // set engine friction; m_current_rpm = 0.f; } @@ -992,16 +992,16 @@ void CCar::Stall() // StopExhausts(); AscCall(ascSndStall); AscCall(ascExhoustStop); - NeutralDrive(); // set zero speed + NeutralDrive(); // set zero speed b_engine_on = false; - UpdatePower(); // set engine friction; + UpdatePower(); // set engine friction; m_current_rpm = 0.f; } void CCar::ReleasePedals() { Clutch(); - NeutralDrive(); // set zero speed - UpdatePower(); // set engine friction; + NeutralDrive(); // set zero speed + UpdatePower(); // set engine friction; } void CCar::SwitchEngine() @@ -1045,7 +1045,7 @@ void CCar::UpdatePower() void CCar::SteerRight() { - b_wheels_limited = true; // no need to limit wheels when stiring + b_wheels_limited = true; // no need to limit wheels when stiring m_pPhysicsShell->Enable(); xr_vector::iterator i, e; i = m_steering_wheels.begin(); @@ -1056,7 +1056,7 @@ void CCar::SteerRight() } void CCar::SteerLeft() { - b_wheels_limited = true; // no need to limit wheels when stiring + b_wheels_limited = true; // no need to limit wheels when stiring m_pPhysicsShell->Enable(); xr_vector::iterator i, e; i = m_steering_wheels.begin(); @@ -1375,7 +1375,7 @@ bool CCar::Use(const Fvector& pos, const Fvector& dir, const Fvector& foot_pos) } RQR.r_clear(); - collide::ray_defs Q(pos, dir, 3.f, CDB::OPT_CULL, collide::rqtObject); // CDB::OPT_ONLYFIRST CDB::OPT_ONLYNEAREST + collide::ray_defs Q(pos, dir, 3.f, CDB::OPT_CULL, collide::rqtObject); // CDB::OPT_ONLYFIRST CDB::OPT_ONLYNEAREST VERIFY(!fis_zero(Q.dir.square_magnitude())); if (g_pGameLevel->ObjectSpace.RayQuery(RQR, CForm, Q)) { collide::rq_results& R = RQR; diff --git a/src/xrGame/Car.h b/src/xrGame/Car.h index e8798bc5a55..6dbd0755783 100644 --- a/src/xrGame/Car.h +++ b/src/xrGame/Car.h @@ -31,8 +31,8 @@ struct dSurfaceParameters; // defs #ifdef DEBUG -#include "xrEngine/StatGraph.h" #include "PHDebug.h" +#include "xrEngine/StatGraph.h" #endif class CScriptEntityAction; @@ -81,7 +81,7 @@ class CCar : public CEntity, //////////////////////////////////////////////////////////////////////////////////////// virtual bool CanRemoveObject(); //////////////////////////////////////////////////////////////////////// - static BONE_P_MAP bone_map; // interface for PhysicsShell + static BONE_P_MAP bone_map; // interface for PhysicsShell static void ActorObstacleCallback( bool& do_colide, bool bo1, dContact& c, SGameMtl* material_1, SGameMtl* material_2); virtual void PhDataUpdate(float step); @@ -144,7 +144,7 @@ class CCar : public CEntity, float m_break_start; float m_break_time; float m_breaks_to_back_rate; - float m_power_neutral_factor; // multiplier for power when accelerator is not pressed (0-1,0.25) + float m_power_neutral_factor; // multiplier for power when accelerator is not pressed (0-1,0.25) bool b_exploded; struct SWheel : public CDamagableHealthItem @@ -168,7 +168,7 @@ class CCar : public CEntity, static void WheellCollisionCallback( bool& do_colide, bool bo1, dContact& c, SGameMtl* material_1, SGameMtl* material_2); - void Init(); // asumptions: bone_map is 1. ini parsed 2. filled in 3. bone_id is set + void Init(); // asumptions: bone_map is 1. ini parsed 2. filled in 3. bone_id is set void Load(LPCSTR section); void RestoreNetState(const CSE_ALifeCar::SWheelState& a_state); void SaveNetState(NET_Packet& P); @@ -211,7 +211,7 @@ class CCar : public CEntity, float hi_limit; float steering_velocity; float steering_torque; - bool limited; // zero limited for idle steering drive + bool limited; // zero limited for idle steering drive float GetSteerAngle(); void Init(); @@ -367,7 +367,7 @@ class CCar : public CEntity, ~SCarSound(); Fvector relative_pos; float volume; - u32 engine_start_delay; // snd_engine starts after engine_start_delay ms by snd_engine_start + u32 engine_start_delay; // snd_engine starts after engine_start_delay ms by snd_engine_start u32 time_state_start; CCar* pcar; } * m_car_sound; @@ -398,7 +398,7 @@ class CCar : public CEntity, xr_map m_doors; xr_vector m_doors_update; xr_vector m_gear_ratious; - xr_vector m_sits_transforms; // m_sits_transforms[0] - driver_place + xr_vector m_sits_transforms; // m_sits_transforms[0] - driver_place float m_current_gear_ratio; ///////////////////////////////////////////////////////////// @@ -408,7 +408,7 @@ class CCar : public CEntity, float m_doors_torque_factor; ///////////////////////////////////////////////////////////// - float m_max_power; // best rpm + float m_max_power; // best rpm float m_power_increment_factor; float m_power_decrement_factor; float m_rpm_increment_factor; @@ -424,8 +424,8 @@ class CCar : public CEntity, float m_fSaveMaxRPM; float m_max_rpm; float m_min_rpm; - float m_power_rpm; // max power - float m_torque_rpm; // max torque + float m_power_rpm; // max power + float m_torque_rpm; // max torque float m_steering_speed; float m_ref_radius; @@ -492,7 +492,7 @@ class CCar : public CEntity, void DriveForward(); void DriveBack(); void ParseDefinitions(); - void CreateSkeleton(CSE_Abstract* po); // creates m_pPhysicsShell + void CreateSkeleton(CSE_Abstract* po); // creates m_pPhysicsShell void Init(); void PlayExhausts(); @@ -500,7 +500,7 @@ class CCar : public CEntity, void UpdateExhausts(); void ClearExhausts(); void UpdateFuel(float time_delta); - float AddFuel(float ammount); // ammount - fuel to load, ret - fuel loaded + float AddFuel(float ammount); // ammount - fuel to load, ret - fuel loaded public: void CarExplode(); @@ -540,7 +540,7 @@ class CCar : public CEntity, virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); virtual void UpdateCL(); - virtual void UpdateEx(float fov); // called by owner + virtual void UpdateEx(float fov); // called by owner virtual void shedule_Update(u32 dt); virtual void renderable_Render(); @@ -548,9 +548,9 @@ class CCar : public CEntity, virtual bool bfAssignObject(CScriptEntityAction* tpEntityAction); // Network - virtual void net_Export(NET_Packet& P); // export to server - virtual void net_Import(NET_Packet& P); // import from server - virtual BOOL net_Relevant() { return getLocal(); }; // relevant for export to server + virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server + virtual BOOL net_Relevant() { return getLocal(); }; // relevant for export to server virtual BOOL UsedAI_Locations(); virtual void net_Relcase(IGameObject* O); // Input diff --git a/src/xrGame/CarDoors.cpp b/src/xrGame/CarDoors.cpp index 5d9439c1c28..349614e9f31 100644 --- a/src/xrGame/CarDoors.cpp +++ b/src/xrGame/CarDoors.cpp @@ -460,7 +460,7 @@ void CCar::SDoor::GetExitPosition(Fvector& pos) // CBoneInstance bi=K->LL_GetBoneInstance(bone_id); CBoneData& bd = K->LL_GetData(bone_id); K->LL_GetBindTransform(bones_bind_forms); - Fobb bb; //=bd.obb; + Fobb bb; //=bd.obb; Fmatrix pf; pf.mul(pcar->XFORM(), bones_bind_forms[bone_id]); @@ -585,7 +585,7 @@ bool CCar::SDoor::TestPass(const Fvector& pos, const Fvector& dir) bool CCar::SDoor::CanEnter(const Fvector& pos, const Fvector& dir, const Fvector& foot_pos) { // if(!joint) return true;//temp for fake doors - return (state == opened || state == broken || !joint) && TestPass(foot_pos, dir) && IsInArea(pos, dir); // + return (state == opened || state == broken || !joint) && TestPass(foot_pos, dir) && IsInArea(pos, dir); // } void CCar::SDoor::SaveNetState(NET_Packet& P) @@ -689,15 +689,15 @@ void CCar::SDoor::SDoorway::Init(SDoor* adoor) if (_abs(door_axis_in_door.x) > _abs(door_axis_in_door.y)) { if (_abs(door_axis_in_door.x) > _abs(door_axis_in_door.z)) { // door axis aligned along x - door_plane_axes.y = 0; // door axis is x (door_plane_axes.y stores door axis direction (i,j,k)=(0,1,2) + door_plane_axes.y = 0; // door axis is x (door_plane_axes.y stores door axis direction (i,j,k)=(0,1,2) door->joint->PSecond_element()->get_Extensions( door_transform.i, janchor.dotproduct(door_transform.i), lo_ext, hi_ext); - door->door_plane_ext.y = hi_ext - lo_ext; // door extension along door axis + door->door_plane_ext.y = hi_ext - lo_ext; // door extension along door axis door->joint->PSecond_element()->get_Extensions( door_transform.j, janchor.dotproduct(door_transform.j), lo_ext, hi_ext); - door_plane_ext.x = hi_ext - lo_ext; // door extensions - door_plane_axes.x = 1; // door_plane_axes.x stores door direction it may be j or k in this point + door_plane_ext.x = hi_ext - lo_ext; // door extensions + door_plane_axes.x = 1; // door_plane_axes.x stores door direction it may be j or k in this point door->joint->PSecond_element()->get_Extensions( door_transform.k, janchor.dotproduct(door_transform.k), lo_ext, hi_ext); diff --git a/src/xrGame/CarSound.cpp b/src/xrGame/CarSound.cpp index b39b6ac6e8b..ca1a8f314f3 100644 --- a/src/xrGame/CarSound.cpp +++ b/src/xrGame/CarSound.cpp @@ -26,7 +26,7 @@ void CCar::SCarSound::Init() if (ini->section_exist("car_sound") && ini->line_exist("car_sound", "snd_volume")) { volume = ini->r_float("car_sound", "snd_volume"); - snd_engine.create(ini->r_string("car_sound", "snd_name"), st_Effect, sg_SourceType); // + snd_engine.create(ini->r_string("car_sound", "snd_name"), st_Effect, sg_SourceType); // snd_engine_start.create(READ_IF_EXISTS(ini, r_string, "car_sound", "engine_start", "car\\test_car_start"), st_Effect, sg_SourceType); snd_engine_stop.create( diff --git a/src/xrGame/CarWeapon.cpp b/src/xrGame/CarWeapon.cpp index 211820a8bfa..47c692f21ad 100644 --- a/src/xrGame/CarWeapon.cpp +++ b/src/xrGame/CarWeapon.cpp @@ -41,9 +41,9 @@ CCarWeapon::CCarWeapon(CPhysicsShellHolder* obj) m_fire_bone = K->LL_BoneID(pUserData->r_string("mounted_weapon_definition", "fire_bone")); m_min_gun_speed = pUserData->r_float("mounted_weapon_definition", "min_gun_speed"); m_max_gun_speed = pUserData->r_float("mounted_weapon_definition", "max_gun_speed"); - CBoneData& bdX = K->LL_GetData(m_rotate_x_bone); // VERIFY(bdX.IK_data.type==jtJoint); + CBoneData& bdX = K->LL_GetData(m_rotate_x_bone); // VERIFY(bdX.IK_data.type==jtJoint); m_lim_x_rot.set(bdX.IK_data.limits[0].limit.x, bdX.IK_data.limits[0].limit.y); - CBoneData& bdY = K->LL_GetData(m_rotate_y_bone); // VERIFY(bdY.IK_data.type==jtJoint); + CBoneData& bdY = K->LL_GetData(m_rotate_y_bone); // VERIFY(bdY.IK_data.type==jtJoint); m_lim_y_rot.set(bdY.IK_data.limits[1].limit.x, bdY.IK_data.limits[1].limit.y); xr_vector matrices; @@ -163,13 +163,13 @@ void CCarWeapon::UpdateBarrelDir() XFi.invert(m_object->XFORM()); Fvector dep; XFi.transform_dir(dep, m_destEnemyDir); - { // x angle + { // x angle m_i_bind_x_xform.transform_dir(dep); dep.normalize(); m_tgt_x_rot = angle_normalize_signed(m_bind_x_rot - dep.getP()); clamp(m_tgt_x_rot, -m_lim_x_rot.y, -m_lim_x_rot.x); } - { // y angle + { // y angle m_i_bind_y_xform.transform_dir(dep); dep.normalize(); m_tgt_y_rot = angle_normalize_signed(m_bind_y_rot - dep.getH()); diff --git a/src/xrGame/CarWeapon.h b/src/xrGame/CarWeapon.h index b9b33fe055e..09cc885f254 100644 --- a/src/xrGame/CarWeapon.h +++ b/src/xrGame/CarWeapon.h @@ -61,7 +61,7 @@ class CCarWeapon : public CShootingObject Fvector m_fire_dir, m_fire_pos, m_fire_norm; Fmatrix m_i_bind_x_xform, m_i_bind_y_xform, m_fire_bone_xform; - Fvector2 m_lim_x_rot, m_lim_y_rot; // in bone space + Fvector2 m_lim_x_rot, m_lim_y_rot; // in bone space float m_min_gun_speed, m_max_gun_speed; CCartridge* m_Ammo; float m_barrel_speed; diff --git a/src/xrGame/CarWheels.cpp b/src/xrGame/CarWheels.cpp index de488f37785..c332620d604 100644 --- a/src/xrGame/CarWheels.cpp +++ b/src/xrGame/CarWheels.cpp @@ -235,7 +235,7 @@ float CCar::SWheelDrive::ASpeed() CPhysicsJoint* J = pwheel->joint; if (!J) return 0.f; // return (dJointGetHinge2Angle2Rate(J->GetDJoint()))*pos_fvd;//dFabs - return (J->GetAxisAngleRate(1)) * pos_fvd; // dFabs + return (J->GetAxisAngleRate(1)) * pos_fvd; // dFabs } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void CCar::SWheelSteer::Init() @@ -248,7 +248,7 @@ void CCar::SWheelSteer::Init() { case jtWheel: pos_right = - bone_map.find(pwheel->bone_id)->second.element->mXFORM.i.y; //.dotproduct(pwheel->car->m_root_transform.j); + bone_map.find(pwheel->bone_id)->second.element->mXFORM.i.y; //.dotproduct(pwheel->car->m_root_transform.j); break; default: NODEFAULT; @@ -267,7 +267,7 @@ void CCar::SWheelSteer::Init() void CCar::SWheelSteer::SteerRight() { - limited = true; // no need to limit wheels when steering + limited = true; // no need to limit wheels when steering if (pos_right > 0) { pwheel->SetSteerHiLimit(hi_limit); pwheel->ApplySteerAxisVel(pwheel->car->m_steering_speed); @@ -280,7 +280,7 @@ void CCar::SWheelSteer::SteerRight() } void CCar::SWheelSteer::SteerLeft() { - limited = true; // no need to limit wheels when steering + limited = true; // no need to limit wheels when steering if (pos_right < 0) { pwheel->SetSteerHiLimit(hi_limit); pwheel->ApplySteerAxisVel(pwheel->car->m_steering_speed); @@ -340,7 +340,7 @@ float CCar::SWheelSteer::GetSteerAngle() { VERIFY(pwheel); VERIFY(pwheel->joint); - return -pos_right * pwheel->joint->GetAxisAngle(0); // dJointGetHinge2Angle1 (pwheel->joint->GetDJoint()); + return -pos_right * pwheel->joint->GetAxisAngle(0); // dJointGetHinge2Angle1 (pwheel->joint->GetDJoint()); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/xrGame/CdkeyDecode/base32.c b/src/xrGame/CdkeyDecode/base32.c index 8096a24f1ef..206ec905f8a 100644 --- a/src/xrGame/CdkeyDecode/base32.c +++ b/src/xrGame/CdkeyDecode/base32.c @@ -101,7 +101,7 @@ int CleanForBase32(char* newstr, const char* oldstr, int maxoutput) continue; } ch = *oldstr; - if (numout + 1 == maxoutput) // see if we will overflow + if (numout + 1 == maxoutput) // see if we will overflow return 0; *newstr++ = islower(ch) ? ch - ('a' - 'A') : ch; numout++; diff --git a/src/xrGame/CdkeyDecode/cdkeydecode.c b/src/xrGame/CdkeyDecode/cdkeydecode.c index bf65f2a80f7..cd9e348b68c 100644 --- a/src/xrGame/CdkeyDecode/cdkeydecode.c +++ b/src/xrGame/CdkeyDecode/cdkeydecode.c @@ -1,6 +1,6 @@ -#define KEY_LENGTH 8 // 64 bit -#define CHECK_LENGTH 2 // 16 bit -#define MAX_EXTRA_DATA_LENGTH 16 // 16 bytes of data +#define KEY_LENGTH 8 // 64 bit +#define CHECK_LENGTH 2 // 16 bit +#define MAX_EXTRA_DATA_LENGTH 16 // 16 bytes of data #define MAX_ENCODED_KEY (((MAX_EXTRA_DATA_LENGTH + KEY_LENGTH + CHECK_LENGTH) * 8 + 4) / 5) #include #include "base32.h" @@ -15,7 +15,7 @@ int DecodeKeyData(const char* key, unsigned char* extradata) if (!CleanForBase32(cleankey, key, MAX_ENCODED_KEY + 1)) return 0; keybytes = ConvertFromBase32((char*)keyandcheck, cleankey, (int)strlen(cleankey)); - if (keybytes <= 0) return 0; // decoded incorrectly + if (keybytes <= 0) return 0; // decoded incorrectly extradatalen = keybytes - KEY_LENGTH - CHECK_LENGTH; if (extradatalen <= 0) return 0; for (i = 0; i < extradatalen; i++) @@ -45,7 +45,7 @@ int VerifyClientCheck(const char* key, unsigned short cskey) if (!CleanForBase32(cleankey, key, MAX_ENCODED_KEY + 1)) return 0; keybytes = ConvertFromBase32((char*)keyandcheck, cleankey, (int)strlen(cleankey)); - if (keybytes <= 0) return 0; // decoded incorrectly + if (keybytes <= 0) return 0; // decoded incorrectly extradatalen = keybytes - KEY_LENGTH - CHECK_LENGTH; correctcheck = CreateCheck(keyandcheck, KEY_LENGTH + extradatalen, cskey); diff --git a/src/xrGame/CharacterPhysicsSupport.cpp b/src/xrGame/CharacterPhysicsSupport.cpp index f7482898c7a..e3c1e4121f6 100644 --- a/src/xrGame/CharacterPhysicsSupport.cpp +++ b/src/xrGame/CharacterPhysicsSupport.cpp @@ -36,7 +36,7 @@ #ifdef DEBUG #include "PHDebug.h" extern BOOL death_anim_debug; -#endif // DEBUG +#endif // DEBUG #include "xrEngine/device.h" @@ -49,7 +49,7 @@ extern BOOL death_anim_debug; // dBodyID body1=dGeomGetBody( c.geom.g1 ); // dBodyID body2=dGeomGetBody( c.geom.g2 ); // if( !body1 || !body2 || ( dGeomUserDataHasCallback( c.geom.g1,NodynamicsCollide )&& dGeomUserDataHasCallback( -//c.geom.g2, NodynamicsCollide ) ) ) +// c.geom.g2, NodynamicsCollide ) ) ) // return; // do_colide = false; //} @@ -64,7 +64,7 @@ CCharacterPhysicsSupport::~CCharacterPhysicsSupport() set_collision_hit_callback(0); if (m_flags.test(fl_skeleton_in_shell)) { if (m_physics_skeleton) m_physics_skeleton->Deactivate(); - xr_delete(m_physics_skeleton); //! b_skeleton_in_shell + xr_delete(m_physics_skeleton); //! b_skeleton_in_shell } xr_delete(m_PhysicMovementControl); xr_delete(m_collision_activating_delay); @@ -164,7 +164,7 @@ void CCharacterPhysicsSupport::in_NetSpawn(CSE_Abstract* e) ka->CalculateBones(TRUE); return; } - CPHDestroyable::Init(); // this zerows colbacks !!; + CPHDestroyable::Init(); // this zerows colbacks !!; IRenderVisual* pVisual = m_EntityAlife.Visual(); IKinematicsAnimated* ka = smart_cast(pVisual); IKinematics* pK = smart_cast(pVisual); @@ -180,9 +180,9 @@ void CCharacterPhysicsSupport::in_NetSpawn(CSE_Abstract* e) ka->PlayCycle("death_init"); } else if (!m_EntityAlife.animation_movement_controlled()) - ka->PlayCycle("death_init"); ///непонятно зачем это вообще надо запускать - ///этот хак нужен, потому что некоторым монстрам - ///анимация после спона, может быть вообще не назначена + ka->PlayCycle("death_init"); ///непонятно зачем это вообще надо запускать + ///этот хак нужен, потому что некоторым монстрам + ///анимация после спона, может быть вообще не назначена pK->CalculateBones_Invalidate(); pK->CalculateBones(TRUE); @@ -284,7 +284,7 @@ void CCharacterPhysicsSupport::SpawnInitPhysics(CSE_Abstract* e) } void CCharacterPhysicsSupport::SpawnCharacterCreate() { - if (HACK_TERRIBLE_DONOT_COLLIDE_ON_SPAWN(m_EntityAlife)) //|| m_EntityAlife.animation_movement_controlled( ) + if (HACK_TERRIBLE_DONOT_COLLIDE_ON_SPAWN(m_EntityAlife)) //|| m_EntityAlife.animation_movement_controlled( ) return; CreateCharacterSafe(); // if( m_eType != etStalker ) @@ -441,7 +441,7 @@ void CCharacterPhysicsSupport::KillHit(SHit& H) CAI_Stalker* const holder = m_EntityAlife.cast_stalker(); if (holder && (holder->wounded() || holder->movement().current_params().cover())) m = MotionID(); - if (m.valid()) //&& cmp( prev_pose, mXFORM ) + if (m.valid()) //&& cmp( prev_pose, mXFORM ) { destroy(m_interactive_motion); if (false && b_death_anim_velocity) @@ -494,7 +494,7 @@ void CCharacterPhysicsSupport::in_Hit(SHit& H, bool is_killing) if (!m_pPhysicsShell && is_killing) KillHit(H); if (m_flags.test(fl_use_hit_anims) && Type() != etBitting && - !m_flags.test(fl_death_anim_on)) //&& Type() == etStalker + !m_flags.test(fl_death_anim_on)) //&& Type() == etStalker { m_hit_animations.PlayHitMotion(H.direction(), H.bone_space_position(), H.bone(), m_EntityAlife); } @@ -521,7 +521,7 @@ IC void CCharacterPhysicsSupport::UpdateDeathAnims() if (!m_flags.test(fl_death_anim_on) && !is_imotion( - m_interactive_motion)) //! m_flags.test(fl_use_death_motion)//!b_death_anim_on&&m_pPhysicsShell->isFullActive() + m_interactive_motion)) //! m_flags.test(fl_use_death_motion)//!b_death_anim_on&&m_pPhysicsShell->isFullActive() { DestroyIKController(); smart_cast(m_EntityAlife.Visual())->PlayCycle("death_init"); @@ -570,9 +570,9 @@ void CCharacterPhysicsSupport::in_UpdateCL() m_character_shell_control.CalculateTimeDelta(); if (m_pPhysicsShell) { VERIFY(m_pPhysicsShell->isFullActive()); - m_pPhysicsShell->SetRagDoll(); //Теперь шела относиться к классу объектов cbClassRagDoll + m_pPhysicsShell->SetRagDoll(); //Теперь шела относиться к классу объектов cbClassRagDoll - if (!is_imotion(m_interactive_motion)) //! m_flags.test(fl_use_death_motion) + if (!is_imotion(m_interactive_motion)) //! m_flags.test(fl_use_death_motion) m_pPhysicsShell->InterpolateGlobalTransform(&mXFORM); else m_interactive_motion->update(); @@ -1020,7 +1020,7 @@ void CCharacterPhysicsSupport::CreateShell(IGameObject* who, Fvector& dp, Fvecto for (u16 I = K->LL_BoneCount() - 1; I != u16(-1); --I) K->LL_GetBoneInstance(I).reset_callback(); // - if (anim_mov_ctrl) // we do not whant to move by long animation in root + if (anim_mov_ctrl) // we do not whant to move by long animation in root BR.set_callback_overwrite(TRUE); // K->CalculateBones_Invalidate(); @@ -1048,7 +1048,7 @@ void CCharacterPhysicsSupport::CreateShell(IGameObject* who, Fvector& dp, Fvecto m_pPhysicsShell->SetCallbacks(); // - if (anim_mov_ctrl) // we do not whant to move by long animation in root + if (anim_mov_ctrl) // we do not whant to move by long animation in root BR.set_callback_overwrite(TRUE); if (!DoCharacterShellCollide()) m_pPhysicsShell->DisableCharacterCollision(); @@ -1066,7 +1066,7 @@ void CCharacterPhysicsSupport::CreateShell(IGameObject* who, Fvector& dp, Fvecto m_flags.set(fl_skeleton_in_shell, TRUE); if (IsGameTypeSingle()) { - m_pPhysicsShell->SetPrefereExactIntegration(); // use exact integration for ragdolls in single + m_pPhysicsShell->SetPrefereExactIntegration(); // use exact integration for ragdolls in single m_pPhysicsShell->SetRemoveCharacterCollLADisable(); } else diff --git a/src/xrGame/CharacterPhysicsSupport.h b/src/xrGame/CharacterPhysicsSupport.h index 2388b715652..3f7a8a38abc 100644 --- a/src/xrGame/CharacterPhysicsSupport.h +++ b/src/xrGame/CharacterPhysicsSupport.h @@ -182,4 +182,4 @@ class CCharacterPhysicsSupport : public CPHSkeleton, public CPHDestroyable void UpdateCollisionActivatingDellay(); void SpawnCharacterCreate(); }; -#endif // CHARACTER_PHYSICS_SUPPORT \ No newline at end of file +#endif // CHARACTER_PHYSICS_SUPPORT \ No newline at end of file diff --git a/src/xrGame/ClimableObject.cpp b/src/xrGame/ClimableObject.cpp index 64964b8e31d..09563b5c3c3 100644 --- a/src/xrGame/ClimableObject.cpp +++ b/src/xrGame/ClimableObject.cpp @@ -7,9 +7,9 @@ #include "xrPhysics/extendedgeom.h" #include "xrServer_Objects_ALife.h" #ifdef DEBUG -#include "debug_renderer.h" #include "Level.h" #include "PHDebug.h" +#include "debug_renderer.h" #endif #ifdef DEBUG @@ -118,11 +118,11 @@ void CClimableObject::net_Destroy() // m_pStaticShell->Deactivate(); // xr_delete(m_pStaticShell); } -void CClimableObject::shedule_Update(u32 dt) // Called by shedule +void CClimableObject::shedule_Update(u32 dt) // Called by shedule { inherited::shedule_Update(dt); } -void CClimableObject::UpdateCL() // Called each frame, so no need for d +void CClimableObject::UpdateCL() // Called each frame, so no need for d { inherited::UpdateCL(); } diff --git a/src/xrGame/ClimableObject.h b/src/xrGame/ClimableObject.h index 938bec714be..ecadf3234f6 100644 --- a/src/xrGame/ClimableObject.h +++ b/src/xrGame/ClimableObject.h @@ -29,8 +29,8 @@ class CClimableObject : public CPhysicsShellHolder, virtual void Load(LPCSTR section); virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); - virtual void shedule_Update(u32 dt); // Called by sheduler - virtual void UpdateCL(); // Called each frame, so no need for dt + virtual void shedule_Update(u32 dt); // Called by sheduler + virtual void UpdateCL(); // Called each frame, so no need for dt virtual void Center(Fvector& C) const; virtual float Radius() const; //////////////////////////////////////////////////////////////////// @@ -51,11 +51,11 @@ class CClimableObject : public CPhysicsShellHolder, virtual const Fvector& Norm() const { return m_norm; } virtual float DDNorm(Fvector& dir) const; virtual bool BeforeLadder(CPHCharacter* actor, float tolerance = 0.f) const; - virtual float DDLowerP(CPHCharacter* actor, Fvector& out_dir) const; // returns distance and dir to lover point - virtual float DDUpperP(CPHCharacter* actor, Fvector& out_dir) const; // returns distance and dir to upper point + virtual float DDLowerP(CPHCharacter* actor, Fvector& out_dir) const; // returns distance and dir to lover point + virtual float DDUpperP(CPHCharacter* actor, Fvector& out_dir) const; // returns distance and dir to upper point void DToAxis(CPHCharacter* actor, Fvector& dir) const; - virtual float DDToAxis(CPHCharacter* actor, Fvector& out_dir) const; // returns distance and dir to ladder axis + virtual float DDToAxis(CPHCharacter* actor, Fvector& out_dir) const; // returns distance and dir to ladder axis void POnAxis(CPHCharacter* actor, Fvector& P) const; virtual float AxDistToUpperP(CPHCharacter* actor) const; diff --git a/src/xrGame/ContextMenu.h b/src/xrGame/ContextMenu.h index 3b4863b96bd..44e90ef6d20 100644 --- a/src/xrGame/ContextMenu.h +++ b/src/xrGame/ContextMenu.h @@ -24,4 +24,4 @@ class CContextMenu void Render(CGameFont* F, u32 cT, u32 cI, float s); void Select(int num); }; -#endif // __XR_CONTEXTMENU_H__ +#endif // __XR_CONTEXTMENU_H__ diff --git a/src/xrGame/CustomDetector.h b/src/xrGame/CustomDetector.h index b254a8b8a00..6aa92379df9 100644 --- a/src/xrGame/CustomDetector.h +++ b/src/xrGame/CustomDetector.h @@ -11,7 +11,7 @@ class CInventoryOwner; struct ITEM_TYPE { - Fvector2 freq; // min,max + Fvector2 freq; // min,max HUD_SOUND_ITEM detect_snds; shared_str zone_map_location; @@ -177,4 +177,4 @@ class CZoneList : public CDetectList public: CZoneList(); virtual ~CZoneList(); -}; // class CZoneList +}; // class CZoneList diff --git a/src/xrGame/CustomMonster.cpp b/src/xrGame/CustomMonster.cpp index 1bb783463c7..e7c93d3ae2b 100644 --- a/src/xrGame/CustomMonster.cpp +++ b/src/xrGame/CustomMonster.cpp @@ -55,16 +55,16 @@ #include "xrPhysics/IPHWorld.h" #ifdef DEBUG -#include "debug_renderer.h" #include "animation_movement_controller.h" -#endif // DEBUG +#include "debug_renderer.h" +#endif // DEBUG void SetActorVisibility(u16 who, float value); extern int g_AI_inactive_time; #ifndef MASTER_GOLD Flags32 psAI_Flags = {aiObstaclesAvoiding | aiUseSmartCovers}; -#endif // MASTER_GOLD +#endif // MASTER_GOLD void CCustomMonster::SAnimState::Create(IKinematicsAnimated* K, LPCSTR base) { @@ -89,7 +89,7 @@ void CCustomMonster::SAnimState::Create(IKinematicsAnimated* K, LPCSTR base) ////////////////////////////////////////////////////////////////////// CCustomMonster::CCustomMonster() - : // this is non-polymorphic call of the virtual function cast_entity_alive + : // this is non-polymorphic call of the virtual function cast_entity_alive // just to remove warning C4355 if we use this instead Feel::Vision(cast_game_object()) { @@ -117,7 +117,7 @@ CCustomMonster::~CCustomMonster() #ifdef DEBUG Msg("dumping client spawn manager stuff for object with id %d", ID()); if (!g_dedicated_server) Level().client_spawn_manager().dump(ID()); -#endif // DEBUG +#endif // DEBUG if (!g_dedicated_server) Level().client_spawn_manager().clear(ID()); } @@ -256,7 +256,7 @@ void CCustomMonster::mk_orientation(Fvector& dir, Fmatrix& mR) } } -void CCustomMonster::net_Export(NET_Packet& P) // export to server +void CCustomMonster::net_Export(NET_Packet& P) // export to server { R_ASSERT(Local()); @@ -324,14 +324,14 @@ void CCustomMonster::shedule_Update(u32 DT) if (false && g_mt_config.test(mtAiVision)) #ifndef DEBUG Device.seqParallel.push_back(fastdelegate::FastDelegate0<>(this, &CCustomMonster::Exec_Visibility)); -#else // DEBUG +#else // DEBUG { if (!psAI_Flags.test(aiStalker) || !!smart_cast(Level().CurrentEntity())) Device.seqParallel.push_back(fastdelegate::FastDelegate0<>(this, &CCustomMonster::Exec_Visibility)); else Exec_Visibility(); } -#endif // DEBUG +#endif // DEBUG else Exec_Visibility(); memory().update(dt); @@ -533,7 +533,7 @@ void CCustomMonster::UpdateCL() #ifdef DEBUG if (IsMyCamera()) UpdateCamera(); -#endif // DEBUG +#endif // DEBUG update_animation_movement_controller(); @@ -695,7 +695,7 @@ BOOL CCustomMonster::net_Spawn(CSE_Abstract* DC) if (!g_Alive()) { set_death_time(); // Msg ("%6d : Object [%d][%s][%s] is spawned - //DEAD",Device.dwTimeGlobal,ID(),*cName(),*cNameSect()); + // DEAD",Device.dwTimeGlobal,ID(),*cName(),*cNameSect()); } if (ai().get_level_graph() && UsedAI_Locations() && (e->ID_Parent == 0xffff)) { @@ -741,7 +741,7 @@ BOOL CCustomMonster::net_Spawn(CSE_Abstract* DC) // Sheduler shedule.t_min = 100; - shedule.t_max = 250; // This equaltiy is broken by Dima :-( // 30 * NET_Latency / 4; + shedule.t_max = 250; // This equaltiy is broken by Dima :-( // 30 * NET_Latency / 4; m_moving_object = new moving_object(this); @@ -1015,7 +1015,7 @@ bool CCustomMonster::update_critical_wounded(const u16& bone_id, const float& po m_critical_wound_accumulator += power - m_critical_wound_decrease_quant * time_delta; clamp(m_critical_wound_accumulator, 0.f, m_critical_wound_threshold); -#if 0 // def _DEBUG +#if 0 // def _DEBUG Msg ( "%6d [%s] update_critical_wounded: %f[%f] (%f,%f) [%f]", Device.dwTimeGlobal, @@ -1026,7 +1026,7 @@ bool CCustomMonster::update_critical_wounded(const u16& bone_id, const float& po m_critical_wound_decrease_quant, time_delta ); -#endif // DEBUG +#endif // DEBUG m_last_hit_time = Device.dwTimeGlobal; if (m_critical_wound_accumulator < m_critical_wound_threshold) return (false); @@ -1093,7 +1093,7 @@ void CCustomMonster::OnRender() P2.y += 0.1f; if (!fis_zero(P1.distance_to_sqr(P2), EPS_L)) Level().debug_renderer().draw_line(Fidentity, P1, P2, color0); - if ((path.size() - 1) == I) // песледний box? + if ((path.size() - 1) == I) // песледний box? Level().debug_renderer().draw_aabb(P1, radius0, radius0, radius0, color1); else Level().debug_renderer().draw_aabb(P1, radius0, radius0, radius0, color2); @@ -1195,7 +1195,7 @@ void CCustomMonster::OnRender() text_tree.add_line(i ? "box1" : "box2", result); } -#endif // #if 0 +#endif // #if 0 if (m_jump_picks.size() < 1) return; @@ -1284,7 +1284,7 @@ void CCustomMonster::OnRender() Level().debug_renderer().draw_line(unit, v2, v3, color_xrgb(255, 255, 255)); } } -#endif // DEBUG +#endif // DEBUG void CCustomMonster::spatial_move() { diff --git a/src/xrGame/CustomMonster.h b/src/xrGame/CustomMonster.h index d7ced295474..dab999ff2b6 100644 --- a/src/xrGame/CustomMonster.h +++ b/src/xrGame/CustomMonster.h @@ -85,14 +85,14 @@ class CCustomMonster : public CEntityAlive, u32 m_dwLastUpdateTime; // Fmatrix m_tServerTransform; - u32 m_dwCurrentTime; // time updated in UpdateCL + u32 m_dwCurrentTime; // time updated in UpdateCL struct net_update { - u32 dwTimeStamp; // server(game) timestamp - float o_model; // model yaw - SRotation o_torso; // torso in world coords - Fvector p_pos; // in world coords + u32 dwTimeStamp; // server(game) timestamp + float o_model; // model yaw + SRotation o_torso; // torso in world coords + Fvector p_pos; // in world coords float fHealth; // non-exported (temporal) @@ -110,9 +110,9 @@ class CCustomMonster : public CEntityAlive, }; xr_deque NET; net_update NET_Last; - BOOL NET_WasInterpolating; // previous update was by interpolation or by extrapolation - u32 NET_Time; // server time of last update - //------------------------------ + BOOL NET_WasInterpolating; // previous update was by interpolation or by extrapolation + u32 NET_Time; // server time of last update + //------------------------------ virtual bool feel_touch_on_contact(IGameObject*); virtual bool feel_touch_contact(IGameObject*); @@ -148,8 +148,8 @@ class CCustomMonster : public CEntityAlive, virtual void UpdateCL(); // Network - virtual void net_Export(NET_Packet& P); // export to server - virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server virtual void net_Relcase(IGameObject* O); virtual void SelectAnimation(const Fvector& _view, const Fvector& _move, float speed) = 0; @@ -257,7 +257,7 @@ class CCustomMonster : public CEntityAlive, public: IC const bool& already_dead() const { return (m_already_dead); }; - virtual bool use_simplified_visual() const { return false; } //(already_dead());}; + virtual bool use_simplified_visual() const { return false; } //(already_dead());}; virtual void on_enemy_change(const CEntityAlive* enemy); virtual CVisualMemoryManager* visual_memory() const; @@ -330,7 +330,7 @@ class CCustomMonster : public CEntityAlive, #ifdef DEBUG xr_vector m_jump_picks; xr_vector m_jump_collide_tris; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG }; #include "custommonster_inline.h" \ No newline at end of file diff --git a/src/xrGame/CustomOutfit.cpp b/src/xrGame/CustomOutfit.cpp index 69d23f1789a..0153bf7d3b0 100644 --- a/src/xrGame/CustomOutfit.cpp +++ b/src/xrGame/CustomOutfit.cpp @@ -70,7 +70,7 @@ void CCustomOutfit::Load(LPCSTR section) m_HitTypeProtection[ALife::eHitTypeTelepatic] = pSettings->r_float(section, "telepatic_protection"); m_HitTypeProtection[ALife::eHitTypeChemicalBurn] = pSettings->r_float(section, "chemical_burn_protection"); m_HitTypeProtection[ALife::eHitTypeExplosion] = pSettings->r_float(section, "explosion_protection"); - m_HitTypeProtection[ALife::eHitTypeFireWound] = 0.f; // pSettings->r_float(section,"fire_wound_protection"); + m_HitTypeProtection[ALife::eHitTypeFireWound] = 0.f; // pSettings->r_float(section,"fire_wound_protection"); // m_HitTypeProtection[ALife::eHitTypePhysicStrike]= pSettings->r_float(section,"physic_strike_protection"); m_HitTypeProtection[ALife::eHitTypeLightBurn] = m_HitTypeProtection[ALife::eHitTypeBurn]; m_boneProtection->m_fHitFracActor = pSettings->r_float(section, "hit_fraction_actor"); @@ -162,7 +162,7 @@ float CCustomOutfit::HitThroughArmor(float hit_power, s16 element, float ap, boo { //пуля НЕ пробила бронь NewHitPower *= m_boneProtection->m_fHitFracActor; - add_wound = false; //раны нет + add_wound = false; //раны нет } } else @@ -284,7 +284,7 @@ bool CCustomOutfit::install_upgrade_impl(LPCSTR section, bool test) result |= process_if_exists( section, "fire_wound_protection", &CInifile::r_float, m_HitTypeProtection[ALife::eHitTypeFireWound], test); // result |= process_if_exists( section, "physic_strike_protection", &CInifile::r_float, - //m_HitTypeProtection[ALife::eHitTypePhysicStrike], test ); + // m_HitTypeProtection[ALife::eHitTypePhysicStrike], test ); LPCSTR str; bool result2 = process_if_exists_set(section, "nightvision_sect", &CInifile::r_string, str, test); if (result2 && !test) { diff --git a/src/xrGame/CustomRocket.cpp b/src/xrGame/CustomRocket.cpp index e54ea4fd6f2..7e1f58a1ee4 100644 --- a/src/xrGame/CustomRocket.cpp +++ b/src/xrGame/CustomRocket.cpp @@ -246,7 +246,7 @@ void CCustomRocket::ObjectContactCallback( if (l_pUD->pushing_neg) { Fvector velocity; l_this->PHGetLinearVell(velocity); - if (velocity.square_magnitude() > EPS) { //. desync? + if (velocity.square_magnitude() > EPS) { //. desync? velocity.normalize(); Triangle neg_tri; CalculateTriangle(l_pUD->neg_tri, g, neg_tri, Level().ObjectSpace.GetStaticVerts()); @@ -443,7 +443,7 @@ void CCustomRocket::StopEngine() void CCustomRocket::UpdateEnginePh() { if (Level().In_NetCorrectionPrediction()) return; - float force = m_fEngineImpulse * fixed_step; // * Device.fTimeDelta; + float force = m_fEngineImpulse * fixed_step; // * Device.fTimeDelta; float k_back = 1.f; Fvector l_pos, l_dir; l_pos.set(0, 0, -2.f); @@ -458,7 +458,7 @@ void CCustomRocket::UpdateEnginePh() l_dir.invert(); m_pPhysicsShell->applyImpulseTrace(l_pos, l_dir, force); l_dir.set(0, 1.f, 0); - force = m_fEngineImpulseUp * fixed_step; // * Device.fTimeDelta; + force = m_fEngineImpulseUp * fixed_step; // * Device.fTimeDelta; m_pPhysicsShell->applyImpulse(l_dir, force); // m_pPhysicsShell->set_AngularVel() @@ -541,7 +541,7 @@ void CCustomRocket::UpdateParticles() Fvector dir = particles_xform.k; Fvector::generate_orthonormal_basis(particles_xform.k, particles_xform.j, particles_xform.i); particles_xform.c.set(XFORM().c); - dir.normalize_safe(); // 1m offset fake -( + dir.normalize_safe(); // 1m offset fake -( particles_xform.c.add(dir); if (m_pEngineParticles) m_pEngineParticles->UpdateParent(particles_xform, vel); diff --git a/src/xrGame/CustomRocket.h b/src/xrGame/CustomRocket.h index 016ac171d58..1a4d2ddc861 100644 --- a/src/xrGame/CustomRocket.h +++ b/src/xrGame/CustomRocket.h @@ -88,10 +88,10 @@ class CCustomRocket : public CPhysicItem, public CPHUpdateObject enum ERocketState { - eInactive, //ракета неактивна и находиться в инвентаре - eEngine, //включен двигатель - eFlying, //просто летим - eCollide //произошло столкновение с препятствием + eInactive, //ракета неактивна и находиться в инвентаре + eEngine, //включен двигатель + eFlying, //просто летим + eCollide //произошло столкновение с препятствием }; //текущее состояние ракеты diff --git a/src/xrGame/CustomZone.cpp b/src/xrGame/CustomZone.cpp index 9ecc57521b7..0cf59752564 100644 --- a/src/xrGame/CustomZone.cpp +++ b/src/xrGame/CustomZone.cpp @@ -18,8 +18,8 @@ #include "xrserver_objects_alife_monsters.h" #include "zone_effector.h" -#define WIND_RADIUS (4 * Radius()) //расстояние до актера, когда появляется ветер -#define FASTMODE_DISTANCE (50.f) // distance to camera from sphere, when zone switches to fast update sequence +#define WIND_RADIUS (4 * Radius()) //расстояние до актера, когда появляется ветер +#define FASTMODE_DISTANCE (50.f) // distance to camera from sphere, when zone switches to fast update sequence CCustomZone::CCustomZone(void) { @@ -170,7 +170,7 @@ void CCustomZone::Load(LPCSTR section) m_dwBlowoutParticlesTime = m_StateTime[eZoneStateBlowout]; #ifndef MASTER_GOLD Msg("! ERROR: invalid 'blowout_particles_time' in '%s'", section); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } else @@ -182,7 +182,7 @@ void CCustomZone::Load(LPCSTR section) m_dwBlowoutLightTime = m_StateTime[eZoneStateBlowout]; #ifndef MASTER_GOLD Msg("! ERROR: invalid 'blowout_light_time' in '%s'", section); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } else @@ -194,7 +194,7 @@ void CCustomZone::Load(LPCSTR section) m_dwBlowoutSoundTime = m_StateTime[eZoneStateBlowout]; #ifndef MASTER_GOLD Msg("! ERROR: invalid 'blowout_sound_time' in '%s'", section); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } else @@ -206,7 +206,7 @@ void CCustomZone::Load(LPCSTR section) m_dwBlowoutExplosionTime = m_StateTime[eZoneStateBlowout]; #ifndef MASTER_GOLD Msg("! ERROR: invalid 'blowout_explosion_time' in '%s'", section); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } else @@ -224,7 +224,7 @@ void CCustomZone::Load(LPCSTR section) m_dwBlowoutWindTimeEnd = u32(m_StateTime[eZoneStateBlowout] - 1); #ifndef MASTER_GOLD Msg("! ERROR: invalid 'blowout_wind_time_end' in '%s'", section); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } m_fBlowoutWindPowerMax = pSettings->r_float(section, "blowout_wind_power"); @@ -276,7 +276,7 @@ BOOL CCustomZone::net_Spawn(CSE_Abstract* DC) m_fAttenuation = pSettings->r_float(cNameSect(), "attenuation"); m_owner_id = Z->m_owner_id; if (m_owner_id != u32(-1)) - m_ttl = Device.dwTimeGlobal + 40000; // 40 sec + m_ttl = Device.dwTimeGlobal + 40000; // 40 sec else m_ttl = u32(-1); @@ -644,7 +644,7 @@ void CCustomZone::UpdateIdleLight() VERIFY(m_pIdleLAnim); int frame = 0; - u32 clr = m_pIdleLAnim->CalculateBGR(Device.fTimeGlobal, frame); // возвращает в формате BGR + u32 clr = m_pIdleLAnim->CalculateBGR(Device.fTimeGlobal, frame); // возвращает в формате BGR Fcolor fclr; fclr.set((float)color_get_B(clr) / 255.f, (float)color_get_G(clr) / 255.f, (float)color_get_R(clr) / 255.f, 1.f); @@ -760,7 +760,7 @@ void CCustomZone::PlayBoltEntranceParticles() CCF_Shape::shape_def& s = *it; switch (s.type) { - case 0: // sphere + case 0: // sphere { sP0 = s.data.sphere.P; XF.transform_tiny(sP0); @@ -791,7 +791,7 @@ void CCustomZone::PlayBoltEntranceParticles() } } break; - case 1: // box + case 1: // box break; } } @@ -1310,10 +1310,10 @@ void CCustomZone::CalcDistanceTo(const Fvector& P, float& dist, float& radius) float d = 0.0f; switch (s.type) { - case 0: // sphere + case 0: // sphere sP = s.data.sphere.P; break; - case 1: // box + case 1: // box sP = s.data.box.c; break; } diff --git a/src/xrGame/CustomZone.h b/src/xrGame/CustomZone.h index 912b0acdb3f..26a8199cdd4 100644 --- a/src/xrGame/CustomZone.h +++ b/src/xrGame/CustomZone.h @@ -78,10 +78,10 @@ class CCustomZone : public CSpaceRestrictor, public Feel::Touch virtual CCustomZone* cast_custom_zone() { return this; } //различные состояния в которых может находиться зона typedef enum { - eZoneStateIdle = 0, //состояние зоны, когда внутри нее нет активных объектов - eZoneStateAwaking, //пробуждение зоны (объект попал в зону) - eZoneStateBlowout, //выброс - eZoneStateAccumulate, //накапливание энергии, после выброса + eZoneStateIdle = 0, //состояние зоны, когда внутри нее нет активных объектов + eZoneStateAwaking, //пробуждение зоны (объект попал в зону) + eZoneStateBlowout, //выброс + eZoneStateAccumulate, //накапливание энергии, после выброса eZoneStateDisabled, eZoneStateMax } EZoneState; diff --git a/src/xrGame/DelayedActionFuse.cpp b/src/xrGame/DelayedActionFuse.cpp index ce745fdfc30..ca8109e7761 100644 --- a/src/xrGame/DelayedActionFuse.cpp +++ b/src/xrGame/DelayedActionFuse.cpp @@ -16,7 +16,7 @@ void CDelayedActionFuse::SetTimer(float current_condition) VERIFY(!fis_zero(m_fTime) || m_dafflags.test(flNoConditionChange)); if (!m_dafflags.test(flNoConditionChange)) m_fSpeedChangeCondition /= m_fTime; // Msg("to_expl moment %f",m_fTime); - m_fTime += Device.fTimeGlobal; //+current_condition/m_fSpeedChangeCondition; + m_fTime += Device.fTimeGlobal; //+current_condition/m_fSpeedChangeCondition; // Msg("expl moment %f",m_fTime); StartTimerEffects(); } @@ -34,7 +34,7 @@ void CDelayedActionFuse::Initialize(float time, float critical_condition) VERIFY(time >= 0.f && critical_condition >= 0.f); if (!fis_zero(time)) { - m_fSpeedChangeCondition = critical_condition; // time; + m_fSpeedChangeCondition = critical_condition; // time; m_fTime = time; } else @@ -57,7 +57,7 @@ bool CDelayedActionFuse::Update(float current_condition) // float t=current_condition/m_fSpeedChangeCondition; // if(t 0.f) delta_condition = 0.f; //. + if (delta_condition > 0.f) delta_condition = 0.f; //. ChangeCondition(delta_condition); ret = current_condition + delta_condition <= 0.f; } diff --git a/src/xrGame/DemoInfo.cpp b/src/xrGame/DemoInfo.cpp index 2b9c556ed83..803fe248daf 100644 --- a/src/xrGame/DemoInfo.cpp +++ b/src/xrGame/DemoInfo.cpp @@ -81,10 +81,10 @@ void demo_player_info::load_from_player(game_PlayerState* player_state) R_ASSERT(tmp_game); s16 tmp_team = tmp_game->ModifyTeam(player_state->team); if (tmp_team < 0) { - tmp_team = 2; // spectator + tmp_team = 2; // spectator } if ((tmp_game->Type() == eGameIDDeathmatch) && (tmp_team != 2)) { - tmp_team = 0; // in deathmatch if player is not spectator, he is in green team + tmp_team = 0; // in deathmatch if player is not spectator, he is in green team } m_team = static_cast(tmp_team); } diff --git a/src/xrGame/DemoInfo.h b/src/xrGame/DemoInfo.h index 08d657b4955..731299277cb 100644 --- a/src/xrGame/DemoInfo.h +++ b/src/xrGame/DemoInfo.h @@ -43,7 +43,7 @@ class demo_player_info : private Noncopyable u8 const get_team() const { return m_team; }; u8 const get_rank() const { return m_rank; }; static u32 const demo_info_max_size; -}; // class demo_player_info +}; // class demo_player_info class demo_info : private Noncopyable { @@ -77,6 +77,6 @@ class demo_info : private Noncopyable demo_player_info const* get_player(u32 player_index) const; static u32 const max_demo_info_size; -}; // class DemoInfo +}; // class DemoInfo -#endif //#ifndef DEMOINFO_H +#endif //#ifndef DEMOINFO_H diff --git a/src/xrGame/DemoInfo_Loader.h b/src/xrGame/DemoInfo_Loader.h index a907f85792b..5a9cb178bc6 100644 --- a/src/xrGame/DemoInfo_Loader.h +++ b/src/xrGame/DemoInfo_Loader.h @@ -17,6 +17,6 @@ class demo_info_loader ~demo_info_loader(); demo_info const* get_demofile_info(LPCSTR demo_file_name); -}; // class demo_info_loader +}; // class demo_info_loader -#endif //#ifndef DEMO_INFO_LOADER \ No newline at end of file +#endif //#ifndef DEMO_INFO_LOADER \ No newline at end of file diff --git a/src/xrGame/DemoPLay_Control.cpp b/src/xrGame/DemoPLay_Control.cpp index 57038161c89..f28b614afce 100644 --- a/src/xrGame/DemoPLay_Control.cpp +++ b/src/xrGame/DemoPLay_Control.cpp @@ -103,7 +103,7 @@ void demoplay_control::activate_filer(EAction const action, shared_str const& pa break; default: { FATAL("unknown action to filter"); } - }; // switch (action) + }; // switch (action) } void demoplay_control::deactivate_filter() { @@ -132,7 +132,7 @@ void demoplay_control::deactivate_filter() break; default: { FATAL("unknown action to remove filter"); } - }; // switch (action) + }; // switch (action) } void demoplay_control::process_action() { @@ -163,8 +163,8 @@ void __stdcall demoplay_control::on_kill_impl(u32 message, u32 subtype, NET_Pack process_action(); return; } - packet.r_u8(); // kill type - packet.r_u16(); // killed_id + packet.r_u8(); // kill type + packet.r_u16(); // killed_id u16 killer_id = packet.r_u16(); game_PlayerState* killerps = Game().GetPlayerByGameID(killer_id); if (!killerps) return; @@ -187,7 +187,7 @@ void __stdcall demoplay_control::on_die_impl(u32 message, u32 subtype, NET_Packe process_action(); return; } - packet.r_u8(); // kill type + packet.r_u8(); // kill type u16 killed_id = packet.r_u16(); game_PlayerState* killedps = Game().GetPlayerByGameID(killed_id); if (!killedps) return; @@ -211,7 +211,7 @@ void __stdcall demoplay_control::on_artefactdelivering_impl(u32 message, u32 sub return; } EGameIDs current_game_type = static_cast(GameID()); - u16 deliverer_id = 0; // who deliver the artefact + u16 deliverer_id = 0; // who deliver the artefact if (current_game_type == eGameIDCaptureTheArtefact) { u8 delivererTeam; packet.r_u8(delivererTeam); diff --git a/src/xrGame/DemoPlay_Control.h b/src/xrGame/DemoPlay_Control.h index 6928c0ff76b..71b46ee977a 100644 --- a/src/xrGame/DemoPlay_Control.h +++ b/src/xrGame/DemoPlay_Control.h @@ -13,12 +13,12 @@ class demoplay_control enum EAction { - on_round_start = 0, // ignore param - on_kill, // param contains the name of a killer - on_die, // param contains the name of a victim - on_artefactdelivering, // param contains the name of a player that delivered the art - on_artefactcapturing, // param contains the name of a player that captured the art - on_artefactloosing // param contains the name of a player that loosed the art + on_round_start = 0, // ignore param + on_kill, // param contains the name of a killer + on_die, // param contains the name of a victim + on_artefactdelivering, // param contains the name of a player that delivered the art + on_artefactcapturing, // param contains the name of a player that captured the art + on_artefactloosing // param contains the name of a player that loosed the art }; void pause_on(EAction const action, shared_str const& param); @@ -36,7 +36,7 @@ class demoplay_control rewinding, waiting_for_actions }; - static const float rewind_speed; // speed for rewinding ... + static const float rewind_speed; // speed for rewinding ... ECurrentControlMode m_current_mode; EAction m_current_action; @@ -55,7 +55,7 @@ class demoplay_control void activate_filer(EAction const action, shared_str const& param); void deactivate_filter(); - void process_action(); // pause game and changes demo play speed if it's need + void process_action(); // pause game and changes demo play speed if it's need void __stdcall on_round_start_impl(u32 message, u32 subtype, NET_Packet& packet); void __stdcall on_kill_impl(u32 message, u32 subtype, NET_Packet& packet); @@ -63,6 +63,6 @@ class demoplay_control void __stdcall on_artefactdelivering_impl(u32 message, u32 subtype, NET_Packet& packet); void __stdcall on_artefactcapturing_impl(u32 message, u32 subtype, NET_Packet& packet); void __stdcall on_artefactloosing_impl(u32 message, u32 subtype, NET_Packet& packet); -}; // class demoplay_control +}; // class demoplay_control -#endif //#ifndef DEMOPLAY_CONTROL \ No newline at end of file +#endif //#ifndef DEMOPLAY_CONTROL \ No newline at end of file diff --git a/src/xrGame/DestroyablePhysicsObject.cpp b/src/xrGame/DestroyablePhysicsObject.cpp index dca2cf1f6c0..83f69b78b06 100644 --- a/src/xrGame/DestroyablePhysicsObject.cpp +++ b/src/xrGame/DestroyablePhysicsObject.cpp @@ -69,7 +69,8 @@ BOOL CDestroyablePhysicsObject::net_Spawn(CSE_Abstract* DC) return res; } -// void CDestroyablePhysicsObject::Hit (float P,Fvector &dir,IGameObject *who,s16 element,Fvector +// void CDestroyablePhysicsObject::Hit (float P,Fvector &dir,IGameObject *who,s16 +// element,Fvector // p_in_object_space, float impulse, ALife::EHitType hit_type) void CDestroyablePhysicsObject::Hit(SHit* pHDS) { @@ -142,7 +143,7 @@ void CDestroyablePhysicsObject::shedule_Update(u32 dt) bool CDestroyablePhysicsObject::CanRemoveObject() { - return !CParticlesPlayer::IsPlaying() && !m_destroy_sound._feedback(); //&& sound! + return !CParticlesPlayer::IsPlaying() && !m_destroy_sound._feedback(); //&& sound! } IFactoryObject* CDestroyablePhysicsObject::_construct() { diff --git a/src/xrGame/DisablingParams.cpp b/src/xrGame/DisablingParams.cpp index dd6ad626477..a926d212918 100644 --- a/src/xrGame/DisablingParams.cpp +++ b/src/xrGame/DisablingParams.cpp @@ -4,11 +4,11 @@ SAllDDWParams worldDisablingParams = { // object { - {0.001f, 0.1f}, // translational vel , accel - {0.005f, 0.05f}, // rotational vel , accel - 64 // level2 frames 2^ + {0.001f, 0.1f}, // translational vel , accel + {0.005f, 0.05f}, // rotational vel , accel + 64 // level2 frames 2^ }, - 1.5f // reanable factor + 1.5f // reanable factor }; void SOneDDOParams::Mul(float v) diff --git a/src/xrGame/DynamicHeightMap.cpp b/src/xrGame/DynamicHeightMap.cpp index 354bd9c4587..97bbb718b34 100644 --- a/src/xrGame/DynamicHeightMap.cpp +++ b/src/xrGame/DynamicHeightMap.cpp @@ -119,7 +119,7 @@ void CHM_Static::Update() bb.grow(EPS_L); // Select polygons - XRC.BBoxMode(0); // BBOX_TRITEST + XRC.BBoxMode(0); // BBOX_TRITEST XRC.BBoxCollide(precalc_identity, g_pGameLevel->ObjectSpace.GetStaticModel(), precalc_identity, bb); u32 triCount = XRC.GetBBoxContactCount(); if (0 == triCount) { diff --git a/src/xrGame/DynamicHeightMap.h b/src/xrGame/DynamicHeightMap.h index 96ff167930d..b6485e30b73 100644 --- a/src/xrGame/DynamicHeightMap.h +++ b/src/xrGame/DynamicHeightMap.h @@ -7,9 +7,9 @@ #pragma once const int dhm_line = 4; -const int dhm_matrix = (dhm_line + 1 + dhm_line); // 9x9 array -const float dhm_size = 4.f; // 4m per slot -const int dhm_precision = 16; // 32x32 subdivs per slot +const int dhm_matrix = (dhm_line + 1 + dhm_line); // 9x9 array +const float dhm_size = 4.f; // 4m per slot +const int dhm_precision = 16; // 32x32 subdivs per slot const int dhm_total = dhm_matrix * dhm_matrix; // @@ -45,15 +45,15 @@ class CHM_Static Fvector v[3]; }; - Slot pool[dhm_matrix * dhm_matrix]; // pool - Slot* data[dhm_matrix][dhm_matrix]; // database - int c_x, c_z; // center of heighmap + Slot pool[dhm_matrix * dhm_matrix]; // pool + Slot* data[dhm_matrix][dhm_matrix]; // database + int c_x, c_z; // center of heighmap svector task; xr_vector polys; public: void Update(); - float Query(float x, float z); // 2D query + float Query(float x, float z); // 2D query CHM_Static(); }; @@ -63,7 +63,7 @@ class CHM_Dynamic { public: void Update(); - float Query(float x, float z); // 2D query + float Query(float x, float z); // 2D query }; // @@ -74,8 +74,8 @@ class CHeightMap u32 dwFrame; public: - float Query(float x, float z); // 2D query - Fvector Query(Fvector& pos, Fvector& dir); // 3D ray-query + float Query(float x, float z); // 2D query + Fvector Query(Fvector& pos, Fvector& dir); // 3D ray-query }; -#endif // !defined(AFX_DYNAMICHEIGHTMAP_H__5A5BD0B8_1FC7_4067_A5A4_D40422E8B6D1__INCLUDED_) +#endif // !defined(AFX_DYNAMICHEIGHTMAP_H__5A5BD0B8_1FC7_4067_A5A4_D40422E8B6D1__INCLUDED_) diff --git a/src/xrGame/EffectorBobbing.h b/src/xrGame/EffectorBobbing.h index 1da779b8fd2..746e5ff2e89 100644 --- a/src/xrGame/EffectorBobbing.h +++ b/src/xrGame/EffectorBobbing.h @@ -32,4 +32,4 @@ class CEffectorBobbing : public CEffectorCam void SetState(u32 st, bool limping, bool ZoomMode); }; -#endif //_EFFECTOR_BOBBING_H +#endif //_EFFECTOR_BOBBING_H diff --git a/src/xrGame/EffectorShot.cpp b/src/xrGame/EffectorShot.cpp index 51f4a7de754..d1fae600370 100644 --- a/src/xrGame/EffectorShot.cpp +++ b/src/xrGame/EffectorShot.cpp @@ -81,7 +81,7 @@ void CWeaponShotEffector::Relax() float dt = Device.fTimeDelta; - if (m_angle_horz >= 0.0f) // h + if (m_angle_horz >= 0.0f) // h { m_angle_horz -= relax_speed_horz * dt; } @@ -90,7 +90,7 @@ void CWeaponShotEffector::Relax() m_angle_horz += relax_speed_horz * dt; } - if (m_angle_vert >= 0.0f) // v + if (m_angle_vert >= 0.0f) // v { m_angle_vert -= m_cam_recoil.RelaxSpeed * dt; if (m_angle_vert < 0.0f) { @@ -125,7 +125,7 @@ void CWeaponShotEffector::Update() m_prev_angle_horz = m_angle_horz; // Msg( " <<[%d] v=%.4f dv=%.4f a=%d s=%d fr=%d", m_shot_numer, m_angle_vert, m_delta_vert, m_actived, - //m_first_shot, Device.dwFrame ); + // m_first_shot, Device.dwFrame ); } void CWeaponShotEffector::GetDeltaAngle(Fvector& angle) @@ -153,8 +153,8 @@ void CWeaponShotEffector::SetRndSeed(s32 Seed) void CWeaponShotEffector::ChangeHP(float* pitch, float* yaw) { - *pitch -= m_delta_vert; // y = pitch = p = vert - *yaw -= m_delta_horz; // x = yaw = h = horz + *pitch -= m_delta_vert; // y = pitch = p = vert + *yaw -= m_delta_horz; // x = yaw = h = horz // if ( m_first_shot ) // { @@ -167,7 +167,7 @@ void CWeaponShotEffector::ChangeHP(float* pitch, float* yaw) // m_actived = false; // } // Msg( "[%d] pitch = %.4f yaw = %.4f fs=%d a=%d fr=%d", m_shot_numer, *pitch, *yaw, m_first_shot, - //m_actived, Device.dwFrame ); + // m_actived, Device.dwFrame ); } //----------------------------------------------------------------------------- diff --git a/src/xrGame/EffectorShot.h b/src/xrGame/EffectorShot.h index 4504e516287..558f03e97da 100644 --- a/src/xrGame/EffectorShot.h +++ b/src/xrGame/EffectorShot.h @@ -68,8 +68,9 @@ class CCameraShotEffector : public CWeaponShotEffector, public CEffectorCam CActor* m_pActor; public: - //- CCameraShotEffector (float max_angle, float relax_speed, float max_angle_horz, float step_angle_horz, - //float angle_frac); + //- CCameraShotEffector (float max_angle, float relax_speed, float max_angle_horz, float + //step_angle_horz, + // float angle_frac); CCameraShotEffector(const CameraRecoil& cam_recoil); virtual ~CCameraShotEffector(); diff --git a/src/xrGame/ElevatorState.cpp b/src/xrGame/ElevatorState.cpp index c77815ebc8a..47aca69d85d 100644 --- a/src/xrGame/ElevatorState.cpp +++ b/src/xrGame/ElevatorState.cpp @@ -14,8 +14,8 @@ static const float start_climbing_dist = 0.f; static const float stop_climbing_dist = 0.1f; static const float out_dist = 1.5f; -static const float look_angle_cosine = 0.9238795f; // 22.5 -static const float lookup_angle_sine = 0.34202014f; // 20 +static const float look_angle_cosine = 0.9238795f; // 22.5 +static const float lookup_angle_sine = 0.34202014f; // 20 extern class CPHWorld* ph_world; CElevatorState::CElevatorState() { @@ -218,7 +218,7 @@ void CElevatorState::UpdateClimbingCommon(const Fvector& d_to_ax, float to_ax, c //. Msg("force applied"); } #endif - m_character->ApplyForce(d_to_ax, m_character->Mass() * ph_world->Gravity()); // + m_character->ApplyForce(d_to_ax, m_character->Mass() * ph_world->Gravity()); // } } bool CElevatorState::GetControlDir(Fvector& dir) @@ -342,14 +342,14 @@ void CElevatorState::Deactivate() CElevatorState::SEnertionState CElevatorState::m_etable[CElevatorState::clbNoState][CElevatorState::clbNoState] = { // clbNone clbNearUp clbNearDown clbClimbingUp clbClimbingDown clbDepart - //clbNoLadder - /*clbNone */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNone - /*clbNearUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearUp - /*clbNearDown */ {{0, 0}, {0.0f, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearDown - /*clbClimbingUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingUp - /*clbClimbingDown */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingDown - /*clbDepart */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {depart_dist, depart_time}}, // clbDepart - /*clbNoLadder */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}} // clbNoLadder + // clbNoLadder + /*clbNone */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNone + /*clbNearUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearUp + /*clbNearDown */ {{0, 0}, {0.0f, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearDown + /*clbClimbingUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingUp + /*clbClimbingDown */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingDown + /*clbDepart */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {depart_dist, depart_time}}, // clbDepart + /*clbNoLadder */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}} // clbNoLadder }; bool CElevatorState::StateSwitchInertion(Estate new_state) diff --git a/src/xrGame/ElevatorState.h b/src/xrGame/ElevatorState.h index 86e6332beb5..46e627c2ff9 100644 --- a/src/xrGame/ElevatorState.h +++ b/src/xrGame/ElevatorState.h @@ -32,7 +32,7 @@ class CElevatorState CClimableObject* m_ladder; CPHCharacter* m_character; - Fvector m_start_position; // for depart state + Fvector m_start_position; // for depart state u32 m_start_time; public: diff --git a/src/xrGame/Entity.cpp b/src/xrGame/Entity.cpp index 1ebb497c774..6b879569b38 100644 --- a/src/xrGame/Entity.cpp +++ b/src/xrGame/Entity.cpp @@ -94,7 +94,8 @@ float CEntity::CalcCondition(float hit) return hit; } -// void CEntity::Hit (float perc, Fvector &dir, IGameObject* who, s16 element,Fvector position_in_object_space, float +// void CEntity::Hit (float perc, Fvector &dir, IGameObject* who, s16 element,Fvector position_in_object_space, +// float // impulse, ALife::EHitType hit_type) void CEntity::Hit(SHit* pHDS) { @@ -113,7 +114,7 @@ void CEntity::Hit(SHit* pHDS) vLocalDir.invert(); // hit impulse - if (pHDS->impulse) HitImpulse(pHDS->impulse, pHDS->dir, vLocalDir); // @@@: WT + if (pHDS->impulse) HitImpulse(pHDS->impulse, pHDS->dir, vLocalDir); // @@@: WT // Calc amount (correct only on local player) float lost_health = CalcCondition(pHDS->damage()); diff --git a/src/xrGame/EntityCondition.h b/src/xrGame/EntityCondition.h index 65e51fe7693..92204c0b069 100644 --- a/src/xrGame/EntityCondition.h +++ b/src/xrGame/EntityCondition.h @@ -166,10 +166,10 @@ class CEntityCondition : public CEntityConditionSimple, public CHitImmunity //очистка массива ран //все величины от 0 до 1 - float m_fPower; //сила - float m_fRadiation; //доза радиактивного облучения - float m_fPsyHealth; //здоровье - float m_fEntityMorale; //мораль + float m_fPower; //сила + float m_fRadiation; //доза радиактивного облучения + float m_fPsyHealth; //здоровье + float m_fEntityMorale; //мораль //максимальные величины // float m_fSatietyMax; @@ -204,7 +204,7 @@ class CEntityCondition : public CEntityConditionSimple, public CHitImmunity SConditionChangeV m_change_v; float m_fMinWoundSize; - bool m_bIsBleeding; //есть кровотечение + bool m_bIsBleeding; //есть кровотечение //части хита, затрачиваемые на уменьшение здоровья и силы float m_fHealthHitPart; diff --git a/src/xrGame/Explosive.cpp b/src/xrGame/Explosive.cpp index dd44271f002..9991314dc13 100644 --- a/src/xrGame/Explosive.cpp +++ b/src/xrGame/Explosive.cpp @@ -22,8 +22,8 @@ #include "xrmessages.h" #ifdef DEBUG -#include "xrEngine/StatGraph.h" #include "PHDebug.h" +#include "xrEngine/StatGraph.h" #endif #include "xrPhysics/MathUtils.h" @@ -37,9 +37,9 @@ #define EFFECTOR_RADIUS 30.f const u16 TEST_RAYS_PER_OBJECT = 5; const u16 BLASTED_OBJ_PROCESSED_PER_FRAME = 3; -const float exp_dist_extinction_factor = 3.f; //(>1.f, 1.f -means no dist change of exp effect) on the dist of - //m_fBlastRadius exp. wave effect in exp_dist_extinction_factor times - //less than maximum +const float exp_dist_extinction_factor = 3.f; //(>1.f, 1.f -means no dist change of exp effect) on the dist of + // m_fBlastRadius exp. wave effect in exp_dist_extinction_factor times +// less than maximum CExplosive::CExplosive(void) { @@ -312,7 +312,7 @@ float CExplosive::TestPassEffect(const Fvector& source_p, const Fvector& dir, fl void CExplosive::Explode() { VERIFY(0xffff != Initiator()); - VERIFY(m_explosion_flags.test(flReadyToExplode)); // m_bReadyToExplode + VERIFY(m_explosion_flags.test(flReadyToExplode)); // m_bReadyToExplode VERIFY(!physics_world()->Processing()); // m_bExploding = true; m_explosion_flags.set(flExploding, TRUE); @@ -458,11 +458,11 @@ void CExplosive::UpdateCL() { // VERIFY(!this->getDestroy()); VERIFY(!physics_world()->Processing()); - if (!m_explosion_flags.test(flExploding)) return; // !m_bExploding + if (!m_explosion_flags.test(flExploding)) return; // !m_bExploding if (m_explosion_flags.test(flExploded)) { CGameObject* go = cast_game_object(); go->processing_deactivate(); - m_explosion_flags.set(flExploding, FALSE); // m_bExploding = false; + m_explosion_flags.set(flExploding, FALSE); // m_bExploding = false; OnAfterExplosion(); return; } @@ -519,7 +519,7 @@ void CExplosive::OnBeforeExplosion() if (m_bHideInExplosion) { HideExplosive(); // Msg("---------CExplosive OnBeforeExplosion setVisible(false) [%d] frame[%d]",cast_game_object()->ID(), - //Device.dwFrame); + // Device.dwFrame); } } void CExplosive::HideExplosive() @@ -561,7 +561,7 @@ void CExplosive::ExplodeParams(const Fvector& pos, const Fvector& dir) // m_bReadyToExplode = true; m_explosion_flags.set(flReadyToExplode, TRUE); m_vExplodePos = pos; - m_vExplodePos.y += 0.1f; // fake + m_vExplodePos.y += 0.1f; // fake m_vExplodeDir = dir; } @@ -571,7 +571,7 @@ void CExplosive::GenExplodeEvent(const Fvector& pos, const Fvector& normal) // if( m_bExplodeEventSent ) // return; - VERIFY(!m_explosion_flags.test(flExplodEventSent)); //! m_bExplodeEventSent + VERIFY(!m_explosion_flags.test(flExplodEventSent)); //! m_bExplodeEventSent VERIFY(0xffff != Initiator()); NET_Packet P; @@ -648,7 +648,7 @@ void CExplosive::ExplodeWaveProcessObject(collide::rq_results& storage, CPhysics if (l_pGO->Visual()) l_pGO->Center(l_goPos); else - return; //мне непонятно зачем наносить хит от взрыва по объектам не имеющим вижуал - поэтому игнорируем + return; //мне непонятно зачем наносить хит от взрыва по объектам не имеющим вижуал - поэтому игнорируем #ifdef DEBUG if (ph_dbg_draw_mask.test(phDbgDrawExplosions)) { @@ -668,18 +668,18 @@ void CExplosive::ExplodeWaveProcessObject(collide::rq_results& storage, CPhysics l_dir.y += m_fUpThrowFactor; // rmag -модуль l_dir после l_dir.y += m_fUpThrowFactor, // модуль=_sqrt(l_dir^2+y^2+2.*(l_dir,y)),y=(0,m_fUpThrowFactor,0) (до этого модуль l_dir =1) - l_dir.mul(1.f / rmag); //перенормировка + l_dir.mul(1.f / rmag); //перенормировка NET_Packet P; SHit HS; - HS.GenHeader(GE_HIT, l_pGO->ID()); // cast_game_object()->u_EventGen (P,GE_HIT,l_pGO->ID()); - HS.whoID = Initiator(); // P.w_u16 (Initiator()); - HS.weaponID = cast_game_object()->ID(); // P.w_u16 (cast_game_object()->ID()); - HS.dir = l_dir; // P.w_dir (l_dir); - HS.power = l_hit; // P.w_float (l_hit); - HS.p_in_bone_space = l_goPos; // P.w_vec3 (l_goPos); - HS.impulse = l_impuls; // P.w_float (l_impuls); - HS.hit_type = (m_eHitTypeBlast); // P.w_u16 (u16(m_eHitTypeBlast)); - HS.boneID = 0; // P.w_s16 (0); + HS.GenHeader(GE_HIT, l_pGO->ID()); // cast_game_object()->u_EventGen (P,GE_HIT,l_pGO->ID()); + HS.whoID = Initiator(); // P.w_u16 (Initiator()); + HS.weaponID = cast_game_object()->ID(); // P.w_u16 (cast_game_object()->ID()); + HS.dir = l_dir; // P.w_dir (l_dir); + HS.power = l_hit; // P.w_float (l_hit); + HS.p_in_bone_space = l_goPos; // P.w_vec3 (l_goPos); + HS.impulse = l_impuls; // P.w_float (l_impuls); + HS.hit_type = (m_eHitTypeBlast); // P.w_u16 (u16(m_eHitTypeBlast)); + HS.boneID = 0; // P.w_s16 (0); HS.Write_Packet(P); cast_game_object()->u_EventSend(P); } diff --git a/src/xrGame/Explosive.h b/src/xrGame/Explosive.h index dfc0938797a..b02b731d50f 100644 --- a/src/xrGame/Explosive.h +++ b/src/xrGame/Explosive.h @@ -35,7 +35,7 @@ class CExplosive : public IDamageSource static float ExplosionEffect(collide::rq_results& storage, CExplosive* exp_obj, CPhysicsShellHolder* blasted_obj, const Fvector& expl_centre, const float expl_radius); - virtual void OnEvent(NET_Packet& P, u16 type); //{inherited::OnEvent( P, type);} + virtual void OnEvent(NET_Packet& P, u16 type); //{inherited::OnEvent( P, type);} virtual void OnAfterExplosion(); virtual void OnBeforeExplosion(); virtual void SetCurrentParentID(u16 parent_id) { m_iCurrentParentID = parent_id; } diff --git a/src/xrGame/ExplosiveRocket.h b/src/xrGame/ExplosiveRocket.h index e4b15f255c6..0f630b10584 100644 --- a/src/xrGame/ExplosiveRocket.h +++ b/src/xrGame/ExplosiveRocket.h @@ -54,13 +54,13 @@ class CExplosiveRocket : public CCustomRocket, public CInventoryItem, public CEx virtual void OnH_B_Chield() { inherited::OnH_B_Chield(); } virtual void renderable_Render() { inherited::renderable_Render(); } virtual void make_Interpolation(); - virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps + virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps #ifdef DEBUG - virtual void PH_Ch_CrPr(); // + virtual void PH_Ch_CrPr(); // virtual void OnRender(); #endif - virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps + virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps virtual void reinit(); virtual void reload(LPCSTR section); virtual void activate_physic_shell(); diff --git a/src/xrGame/GameObject.cpp b/src/xrGame/GameObject.cpp index cbbf0375ce6..3bf2c1b4942 100644 --- a/src/xrGame/GameObject.cpp +++ b/src/xrGame/GameObject.cpp @@ -48,8 +48,8 @@ extern MagicBox3 MagicMinBox(int iQuantity, const Fvector* akPoint); #ifdef DEBUG -#include "debug_renderer.h" #include "PHDebug.h" +#include "debug_renderer.h" #endif ENGINE_API bool g_dedicated_server; @@ -300,7 +300,7 @@ void CGameObject::net_Destroy() if (!Level().IsDemoPlayStarted()) { Level().SetControlEntity(0); } - Level().SetEntity(0); // do not switch !!! + Level().SetEntity(0); // do not switch !!! } Level().RemoveObject_From_4CrPr(this); @@ -395,7 +395,7 @@ void CGameObject::OnEvent(NET_Packet& P, u16 type) } #ifdef MP_LOGGING Msg("--- Object: GE_DESTROY of [%d][%s]", ID(), cNameSect().c_str()); -#endif // MP_LOGGING +#endif // MP_LOGGING setDestroy(TRUE); // MakeMeCrow (); @@ -469,7 +469,7 @@ BOOL CGameObject::net_Spawn(CSE_Abstract* DC) // Net params setLocal(E->s_flags.is(M_SPAWN_OBJECT_LOCAL)); - if (Level().IsDemoPlay()) //&& OnClient()) + if (Level().IsDemoPlay()) //&& OnClient()) { if (!demo_spectator) { setLocal(FALSE); @@ -674,7 +674,7 @@ void CGameObject::spawn_supplies() if (V && xr_strlen(V)) { int n = _GetItemCount(V); string16 temp; - if (n > 0) j = atoi(_GetItem(V, 0, temp)); // count + if (n > 0) j = atoi(_GetItem(V, 0, temp)); // count if (NULL != strstr(V, "prob=")) p = (float)atof(strstr(V, "prob=") + 5); if (fis_zero(p)) p = 1.f; @@ -913,18 +913,18 @@ IGameObject* CGameObject::H_SetParent(IGameObject* new_parent, bool just_before_ VERIFY2(!new_parent || !old_parent, "Before set parent - execute H_SetParent(0)"); // if (Parent) Parent->H_ChildRemove (this); if (!old_parent) - OnH_B_Chield(); // before attach + OnH_B_Chield(); // before attach else - OnH_B_Independent(just_before_destroy); // before detach + OnH_B_Independent(just_before_destroy); // before detach if (new_parent) spatial_unregister(); else spatial_register(); Parent = new_parent; if (!old_parent) - OnH_A_Chield(); // after attach + OnH_A_Chield(); // after attach else - OnH_A_Independent(); // after detach + OnH_A_Independent(); // after detach // if (Parent) Parent->H_ChildAdd (this); MakeMeCrow(); return old_parent; @@ -967,7 +967,7 @@ void CGameObject::setDestroy(BOOL _destroy) #endif #ifdef MP_LOGGING Msg("cl setDestroy [%d][%d]", ID(), Device.dwFrame); -#endif //#ifdef MP_LOGGING +#endif //#ifdef MP_LOGGING } else VERIFY(!g_pGameLevel->Objects.registered_object_to_destroy(this)); @@ -1123,7 +1123,7 @@ void CGameObject::shedule_Update(u32 dt) if (NeedToDestroyObject()) { #ifndef MASTER_GOLD Msg("--NeedToDestroyObject for [%d][%d]", ID(), Device.dwFrame); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD DestroyObject(); } // Msg("-SUB-:[%x][%s] CGameObject::shedule_Update",smart_cast(this),*cName()); @@ -1443,9 +1443,9 @@ void CGameObject::OnRender() renderer.draw_obb(T, bd, color_rgba(255, 255, 255, 255)); } } -#endif // DEBUG +#endif // DEBUG -using namespace luabind; // XXX: is it required here? +using namespace luabind; // XXX: is it required here? bool CGameObject::use(IGameObject* obj) { diff --git a/src/xrGame/GameObject.h b/src/xrGame/GameObject.h index b4b7b457c4b..e55ecddbd3b 100644 --- a/src/xrGame/GameObject.h +++ b/src/xrGame/GameObject.h @@ -174,8 +174,8 @@ class CGameObject : public IGameObject, virtual void cNameVisual_set(shared_str N) override; virtual shared_str shedule_Name() const override { return cName(); }; // Properties - virtual void processing_activate() override; // request to enable UpdateCL - virtual void processing_deactivate() override; // request to disable UpdateCL + virtual void processing_activate() override; // request to enable UpdateCL + virtual void processing_deactivate() override; // request to disable UpdateCL virtual bool processing_enabled() override { return !!Props.bActiveCounter; } virtual void setVisible(BOOL _visible) override; virtual BOOL getVisible() const override { return Props.bVisible; } @@ -218,21 +218,21 @@ class CGameObject : public IGameObject, static void u_EventSend(NET_Packet& P, u32 dwFlags = DPNSEND_GUARANTEED); // Methods virtual void Load(LPCSTR section) override; - virtual void UpdateCL() override; // Called each frame, so no need for dt + virtual void UpdateCL() override; // Called each frame, so no need for dt virtual void OnChangeVisual() override; // object serialization virtual void net_Save(NET_Packet& packet) override; virtual void net_Load(IReader& reader) override; virtual BOOL net_SaveRelevant() override; - virtual void net_Export(NET_Packet& packet) override {} // export to server - virtual void net_Import(NET_Packet& packet) override {} // import from server + virtual void net_Export(NET_Packet& packet) override {} // export to server + virtual void net_Import(NET_Packet& packet) override {} // import from server virtual BOOL net_Spawn(CSE_Abstract* entity) override; virtual void net_Destroy() override; virtual void net_ImportInput(NET_Packet& packet) override {} - virtual BOOL net_Relevant() override { return getLocal(); } // send messages only if active and local + virtual BOOL net_Relevant() override { return getLocal(); } // send messages only if active and local virtual void net_MigrateInactive(NET_Packet& packet) override { Props.net_Local = FALSE; } virtual void net_MigrateActive(NET_Packet& packet) override { Props.net_Local = TRUE; } - virtual void net_Relcase(IGameObject* O) override; // destroy all links to another objects + virtual void net_Relcase(IGameObject* O) override; // destroy all links to another objects virtual void save(NET_Packet& output_packet) override; virtual void load(IReader& input_packet); // Position stack @@ -240,7 +240,7 @@ class CGameObject : public IGameObject, virtual GameObjectSavedPosition ps_Element(u32 ID) const override; virtual void ForceTransform(const Fmatrix& m) override {} virtual void OnHUDDraw(CCustomHUD* hud) override {} - virtual BOOL Ready() override { return getReady(); } // update only if active and fully initialized by/for network + virtual BOOL Ready() override { return getReady(); } // update only if active and fully initialized by/for network virtual void renderable_Render() override; virtual void OnEvent(NET_Packet& P, u16 type) override; virtual void Hit(SHit* pHDS) override {} @@ -249,9 +249,9 @@ class CGameObject : public IGameObject, //игровое имя объекта virtual LPCSTR Name() const override; // Active/non active - virtual void OnH_B_Chield() override; // before + virtual void OnH_B_Chield() override; // before virtual void OnH_B_Independent(bool just_before_destroy) override; - virtual void OnH_A_Chield() override; // after + virtual void OnH_A_Chield() override; // after virtual void OnH_A_Independent() override; virtual void On_SetEntity() override {} virtual void On_LostEntity() override {} @@ -279,14 +279,14 @@ class CGameObject : public IGameObject, virtual void reload(LPCSTR section) override; ///////////////////// network ///////////////////////////////////////// virtual bool object_removed() const override { return m_bObjectRemoved; } - virtual void make_Interpolation() override {} // interpolation from last visible to corrected position/rotation - virtual void PH_B_CrPr() override {} // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr() override {} // actions & operations after correction before prediction steps + virtual void make_Interpolation() override {} // interpolation from last visible to corrected position/rotation + virtual void PH_B_CrPr() override {} // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr() override {} // actions & operations after correction before prediction steps #ifdef DEBUG virtual void PH_Ch_CrPr() override {} virtual void dbg_DrawSkeleton() override; #endif - virtual void PH_A_CrPr() override {} // actions & operations after phisic correction-prediction steps + virtual void PH_A_CrPr() override {} // actions & operations after phisic correction-prediction steps virtual void CrPr_SetActivationStep(u32 Step) override { m_dwCrPr_ActivationStep = Step; } virtual u32 CrPr_GetActivationStep() override { return m_dwCrPr_ActivationStep; } virtual void CrPr_SetActivated(bool Activate) override { m_bCrPr_Activated = Activate; } @@ -359,7 +359,7 @@ class CGameObject : public IGameObject, protected: virtual void spawn_supplies(); -private: // XXX: move to GameObjectBase +private: // XXX: move to GameObjectBase void init(); void setup_parent_ai_locations(bool assign_position = true); void validate_ai_locations(bool decrement_reference = true); @@ -369,4 +369,4 @@ class CGameObject : public IGameObject, }; #pragma pack(pop) -#endif // !defined(AFX_GAMEOBJECT_H__3DA72D03_C759_4688_AEBB_89FA812AA873__INCLUDED_) +#endif // !defined(AFX_GAMEOBJECT_H__3DA72D03_C759_4688_AEBB_89FA812AA873__INCLUDED_) diff --git a/src/xrGame/GamePersistent.cpp b/src/xrGame/GamePersistent.cpp index 0aea6b5c10d..d42f9a1f4ec 100644 --- a/src/xrGame/GamePersistent.cpp +++ b/src/xrGame/GamePersistent.cpp @@ -35,17 +35,17 @@ #ifndef MASTER_GOLD #include "custommonster.h" -#endif // MASTER_GOLD +#endif // MASTER_GOLD #ifndef _EDITOR #include "ai_debug.h" -#endif // _EDITOR +#endif // _EDITOR //#ifdef DEBUG_MEMORY_MANAGER // static void * ode_alloc (size_t size) { return Memory.mem_alloc(size,"ODE"); //} // static void * ode_realloc (void *ptr, size_t oldsize, size_t newsize) { return -//Memory.mem_realloc(ptr,newsize,"ODE"); } +// Memory.mem_realloc(ptr,newsize,"ODE"); } // static void ode_free (void *ptr, size_t size) { return xr_free(ptr); } //#else // DEBUG_MEMORY_MANAGER // static void * ode_alloc (size_t size) { return xr_malloc(size); } @@ -256,7 +256,7 @@ void CGamePersistent::WeathersUpdate() { CEnvAmbient::SSndChannel& ch = **I; R_ASSERT(idx < 20); - if (ambient_sound_next_time[idx] == 0) // first + if (ambient_sound_next_time[idx] == 0) // first { ambient_sound_next_time[idx] = Device.dwTimeGlobal + ch.get_rnd_sound_first_time(); } @@ -275,13 +275,13 @@ void CGamePersistent::WeathersUpdate() #ifdef DEBUG if (!snd._handle() && strstr(Core.Params, "-nosound")) continue; -#endif // DEBUG +#endif // DEBUG VERIFY(snd._handle()); u32 _length_ms = iFloor(snd.get_length_sec() * 1000.0f); ambient_sound_next_time[idx] = Device.dwTimeGlobal + _length_ms + ch.get_rnd_sound_time(); // Msg("- Playing ambient sound channel [%s] - //file[%s]",ch.m_load_section.c_str(),snd._handle()->file_name()); + // file[%s]",ch.m_load_section.c_str(),snd._handle()->file_name()); } } /* @@ -404,9 +404,9 @@ bool allow_intro() { #ifdef MASTER_GOLD if (g_SASH.IsRunning()) -#else // #ifdef MASTER_GOLD +#else // #ifdef MASTER_GOLD if ((0 != strstr(Core.Params, "-nointro")) || g_SASH.IsRunning()) -#endif // #ifdef MASTER_GOLD +#endif // #ifdef MASTER_GOLD { return false; } @@ -533,14 +533,14 @@ void CGamePersistent::OnFrame() if (Level().IsDemoPlay()) { CSpectator* tmp_spectr = smart_cast(Level().CurrentControlEntity()); if (tmp_spectr) { - tmp_spectr->UpdateCL(); // updating spectator in pause (pause ability of demo play) + tmp_spectr->UpdateCL(); // updating spectator in pause (pause ability of demo play) } } #ifndef MASTER_GOLD if (Level().CurrentViewEntity() && IsGameTypeSingle()) { if (!g_actor || (g_actor->ID() != Level().CurrentViewEntity()->ID())) { CCustomMonster* custom_monster = smart_cast(Level().CurrentViewEntity()); - if (custom_monster) // can be spectator in multiplayer + if (custom_monster) // can be spectator in multiplayer custom_monster->UpdateCamera(); } else @@ -583,11 +583,11 @@ void CGamePersistent::OnFrame() } } } -#endif // DEBUG +#endif // DEBUG } } } -#else // MASTER_GOLD +#else // MASTER_GOLD if (g_actor && IsGameTypeSingle()) { CCameraBase* C = NULL; if (!Actor()->Holder()) @@ -598,7 +598,7 @@ void CGamePersistent::OnFrame() Actor()->Cameras().UpdateFromCamera(C); Actor()->Cameras().ApplyDevice(VIEWPORT_NEAR); } -#endif // MASTER_GOLD +#endif // MASTER_GOLD } __super ::OnFrame(); @@ -610,7 +610,7 @@ void CGamePersistent::OnFrame() if (0 != pDemoFile) { if (Device.dwTimeGlobal > uTime2Change) { // Change level + play demo - if (pDemoFile->elapsed() < 3) pDemoFile->seek(0); // cycle + if (pDemoFile->elapsed() < 3) pDemoFile->seek(0); // cycle // Read params string512 params; @@ -623,7 +623,7 @@ void CGamePersistent::OnFrame() Engine.Event.Defer("KERNEL:disconnect"); Engine.Event.Defer("KERNEL:start", size_t(xr_strdup(_Trim(o_server))), size_t(xr_strdup(_Trim(o_client)))); Engine.Event.Defer("GAME:demo", size_t(xr_strdup(_Trim(o_demo))), u64(o_time)); - uTime2Change = 0xffffffff; // Block changer until Event received + uTime2Change = 0xffffffff; // Block changer until Event received } } @@ -806,7 +806,7 @@ void CGamePersistent::SetEffectorDOF(const Fvector& needed_dof) { if (m_bPickableDOF) return; m_dof[0] = needed_dof; - m_dof[2] = m_dof[1]; // current + m_dof[2] = m_dof[1]; // current } void CGamePersistent::RestoreEffectorDOF() @@ -818,8 +818,8 @@ void CGamePersistent::RestoreEffectorDOF() // m_dof [4]; // 0-dest 1-current 2-from 3-original void CGamePersistent::UpdateDof() { - static float diff_far = pSettings->r_float("zone_pick_dof", "far"); // 70.0f; - static float diff_near = pSettings->r_float("zone_pick_dof", "near"); //-70.0f; + static float diff_far = pSettings->r_float("zone_pick_dof", "far"); // 70.0f; + static float diff_near = pSettings->r_float("zone_pick_dof", "near"); //-70.0f; if (m_bPickableDOF) { Fvector pick_dof; @@ -827,14 +827,14 @@ void CGamePersistent::UpdateDof() pick_dof.x = pick_dof.y + diff_near; pick_dof.z = pick_dof.y + diff_far; m_dof[0] = pick_dof; - m_dof[2] = m_dof[1]; // current + m_dof[2] = m_dof[1]; // current } if (m_dof[1].similar(m_dof[0])) return; float td = Device.fTimeDelta; Fvector diff; diff.sub(m_dof[0], m_dof[2]); - diff.mul(td / 0.2f); // 0.2 sec + diff.mul(td / 0.2f); // 0.2 sec m_dof[1].add(diff); (m_dof[0].x < m_dof[2].x) ? clamp(m_dof[1].x, m_dof[0].x, m_dof[2].x) : clamp(m_dof[1].x, m_dof[2].x, m_dof[0].x); (m_dof[0].y < m_dof[2].y) ? clamp(m_dof[1].y, m_dof[0].y, m_dof[2].y) : clamp(m_dof[1].y, m_dof[2].y, m_dof[0].y); diff --git a/src/xrGame/GamePersistent.h b/src/xrGame/GamePersistent.h index bc93f2b4a0b..aa8e51bb770 100644 --- a/src/xrGame/GamePersistent.h +++ b/src/xrGame/GamePersistent.h @@ -13,7 +13,7 @@ class CGamePersistent : public IGame_Persistent, public IEventReceiver { // ambient particles CParticlesObject* ambient_particles; - u32 ambient_sound_next_time[20]; // max snd channels + u32 ambient_sound_next_time[20]; // max snd channels u32 ambient_effect_next_time; u32 ambient_effect_stop_time; @@ -27,7 +27,7 @@ class CGamePersistent : public IGame_Persistent, public IEventReceiver CUISequencer* m_intro; EVENT eQuickLoad; - Fvector m_dof[4]; // 0-dest 1-current 2-from 3-original + Fvector m_dof[4]; // 0-dest 1-current 2-from 3-original fastdelegate::FastDelegate0<> m_intro_event; @@ -99,4 +99,4 @@ IC CGamePersistent& GamePersistent() return *((CGamePersistent*)g_pGamePersistent); } -#endif // GamePersistentH +#endif // GamePersistentH diff --git a/src/xrGame/GametaskManager.cpp b/src/xrGame/GametaskManager.cpp index b7909e11b95..914a60a6884 100644 --- a/src/xrGame/GametaskManager.cpp +++ b/src/xrGame/GametaskManager.cpp @@ -41,7 +41,7 @@ bool task_prio_pred(const SGameTaskKey& k1, const SGameTaskKey& k2) CGameTaskManager::CGameTaskManager() { m_gametasks_wrapper = new CGameTaskWrapper(); - m_gametasks_wrapper->registry().init(0); // actor's id + m_gametasks_wrapper->registry().init(0); // actor's id m_flags.zero(); m_flags.set(eChanged, TRUE); m_gametasks = NULL; @@ -66,7 +66,7 @@ vGameTasks& CGameTaskManager::GetGameTasks() m_gametasks = &m_gametasks_wrapper->registry().objects(); #ifdef DEBUG Msg("m_gametasks size=%d", m_gametasks->size()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } return *m_gametasks; @@ -95,8 +95,8 @@ CGameTask* CGameTaskManager::GiveGameTaskToActor(CGameTask* t, u32 timeToComplet GetGameTasks().push_back(SGameTaskKey(t->m_ID)); GetGameTasks().back().game_task = t; t->m_ReceiveTime = Level().GetGameTime(); - t->m_TimeToComplete = t->m_ReceiveTime + timeToComplete * 1000; // ms - t->m_timer_finish = t->m_ReceiveTime + timer_ttl * 1000; // ms + t->m_TimeToComplete = t->m_ReceiveTime + timeToComplete * 1000; // ms + t->m_timer_finish = t->m_ReceiveTime + timer_ttl * 1000; // ms std::stable_sort(GetGameTasks().begin(), GetGameTasks().end(), task_prio_pred); diff --git a/src/xrGame/GlobalFeelTouch.hpp b/src/xrGame/GlobalFeelTouch.hpp index dbf8a87c82a..b19c36720d8 100644 --- a/src/xrGame/GlobalFeelTouch.hpp +++ b/src/xrGame/GlobalFeelTouch.hpp @@ -14,6 +14,6 @@ class GlobalFeelTouch : public Feel::Touch // virtual void feel_touch_deny (IGameObject* O, DWORD T); - implemented in inherited class bool is_object_denied(IGameObject const* O); -}; // class GlobalFeelTouch +}; // class GlobalFeelTouch -#endif //#ifndef GLOBAL_FEEL_TOUCH_HPP \ No newline at end of file +#endif //#ifndef GLOBAL_FEEL_TOUCH_HPP \ No newline at end of file diff --git a/src/xrGame/GraviZone.cpp b/src/xrGame/GraviZone.cpp index 378fd1e4f39..846fd0eac17 100644 --- a/src/xrGame/GraviZone.cpp +++ b/src/xrGame/GraviZone.cpp @@ -23,14 +23,14 @@ void CBaseGraviZone::Load(LPCSTR section) { inherited::Load(section); - m_fThrowInImpulse = pSettings->r_float(section, "throw_in_impulse"); // 800.f; - m_fThrowInImpulseAlive = pSettings->r_float(section, "throw_in_impulse_alive"); // 800.f; + m_fThrowInImpulse = pSettings->r_float(section, "throw_in_impulse"); // 800.f; + m_fThrowInImpulseAlive = pSettings->r_float(section, "throw_in_impulse_alive"); // 800.f; m_fThrowInAtten = pSettings->r_float(section, "throw_in_atten"); - m_fBlowoutRadiusPercent = pSettings->r_float(section, "blowout_radius_percent"); // 0.3f; + m_fBlowoutRadiusPercent = pSettings->r_float(section, "blowout_radius_percent"); // 0.3f; - m_fTeleHeight = pSettings->r_float(section, "tele_height"); // 1.5f; - m_dwTimeToTele = pSettings->r_u32(section, "time_to_tele"); // 7000; - m_dwTelePause = pSettings->r_u32(section, "tele_pause"); // 1000 + m_fTeleHeight = pSettings->r_float(section, "tele_height"); // 1.5f; + m_dwTimeToTele = pSettings->r_u32(section, "time_to_tele"); // 7000; + m_dwTelePause = pSettings->r_u32(section, "tele_pause"); // 1000 if (pSettings->line_exist(section, "tele_particles_big")) m_sTeleParticlesBig = pSettings->r_string(section, "tele_particles_big"); @@ -192,7 +192,7 @@ void CBaseGraviZone::AffectThrow(SZoneObjectInfo* O, CPhysicsShellHolder* GO, co { Fvector position_in_bone_space; - float power = Power(dist, Radius()); // Power(GO->Position().distance_to(zone_center)); + float power = Power(dist, Radius()); // Power(GO->Position().distance_to(zone_center)); float impulse = m_fHitImpulseScale * power * GO->GetMass(); if (power > 0.01f) { diff --git a/src/xrGame/Grenade.cpp b/src/xrGame/Grenade.cpp index 45bd54ff59e..1fafd955bb4 100644 --- a/src/xrGame/Grenade.cpp +++ b/src/xrGame/Grenade.cpp @@ -116,7 +116,7 @@ void CGrenade::State(u32 state) if (Local()) { #ifndef MASTER_GOLD Msg("Destroying local grenade[%d][%d]", ID(), Device.dwFrame); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD DestroyObject(); } }; @@ -170,7 +170,7 @@ void CGrenade::Throw() pGrenade->SetInitiator(H_Parent()->ID()); } inherited::Throw(); - m_fake_missile->processing_activate(); //@sliph + m_fake_missile->processing_activate(); //@sliph m_thrown = true; } @@ -313,7 +313,7 @@ BOOL CGrenade::UsedAI_Locations() { #pragma todo( \ "Dima to Yura : It crashes, because on net_Spawn object doesn't use AI locations, but on net_Destroy it does use them") - return inherited::UsedAI_Locations(); // m_dwDestroyTime == 0xffffffff; + return inherited::UsedAI_Locations(); // m_dwDestroyTime == 0xffffffff; } void CGrenade::net_Relcase(IGameObject* O) diff --git a/src/xrGame/Grenade.h b/src/xrGame/Grenade.h index c7700fb44a0..bedec8602e7 100644 --- a/src/xrGame/Grenade.h +++ b/src/xrGame/Grenade.h @@ -23,7 +23,7 @@ class CGrenade : public CMissile, public CExplosive virtual void DiscardState(); virtual void OnEvent(NET_Packet& P, u16 type); - virtual bool DropGrenade(); // in this case if grenade state is eReady, it should Throw + virtual bool DropGrenade(); // in this case if grenade state is eReady, it should Throw virtual void OnAnimationEnd(u32 state); virtual void UpdateCL(); @@ -46,7 +46,7 @@ class CGrenade : public CMissile, public CExplosive virtual void DeactivateItem(); virtual bool GetBriefInfo(II_BriefInfo& info); - virtual void SendHiddenItem(); // same as OnHiddenItem but for client... (sends message to a server)... + virtual void SendHiddenItem(); // same as OnHiddenItem but for client... (sends message to a server)... protected: ALife::_TIME_ID m_dwGrenadeRemoveTime; ALife::_TIME_ID m_dwGrenadeIndependencyTime; diff --git a/src/xrGame/HUDCrosshair.cpp b/src/xrGame/HUDCrosshair.cpp index 47537da93f7..dc993c834bf 100644 --- a/src/xrGame/HUDCrosshair.cpp +++ b/src/xrGame/HUDCrosshair.cpp @@ -65,7 +65,7 @@ void CHUDCrosshair::OnRenderFirstBulletDispertion() GlobalEnv.UIRender->StartPrimitive(10, IUIRender::ptLineList, UI().m_currentPointType); - u32 fb_cross_color = color_rgba(255, 0, 0, 255); // red + u32 fb_cross_color = color_rgba(255, 0, 0, 255); // red float cross_length = /*cross_length_perc*/ 0.008f * scr_size.x; float min_radius = min_radius_perc * scr_size.x; diff --git a/src/xrGame/HUDManager.cpp b/src/xrGame/HUDManager.cpp index 0995acbe0c2..350c758a7ce 100644 --- a/src/xrGame/HUDManager.cpp +++ b/src/xrGame/HUDManager.cpp @@ -26,9 +26,9 @@ CFontManager::CFontManager() { Device.seqDeviceReset.Add(this, REG_PRIORITY_HIGH); - m_all_fonts.push_back(&pFontMedium); // used cpp - m_all_fonts.push_back(&pFontDI); // used cpp - m_all_fonts.push_back(&pFontArial14); // used xml + m_all_fonts.push_back(&pFontMedium); // used cpp + m_all_fonts.push_back(&pFontDI); // used cpp + m_all_fonts.push_back(&pFontArial14); // used xml m_all_fonts.push_back(&pFontGraffiti19Russian); m_all_fonts.push_back(&pFontGraffiti22Russian); m_all_fonts.push_back(&pFontLetterica16Russian); @@ -65,7 +65,7 @@ void CFontManager::InitializeFonts() LPCSTR CFontManager::GetFontTexName(LPCSTR section) { static char* tex_names[] = {"texture800", "texture", "texture1600"}; - int def_idx = 1; // default 1024x768 + int def_idx = 1; // default 1024x768 int idx = def_idx; #if 0 u32 w = Device.dwWidth; diff --git a/src/xrGame/HangingLamp.cpp b/src/xrGame/HangingLamp.cpp index a6590e7726c..84bee629cba 100644 --- a/src/xrGame/HangingLamp.cpp +++ b/src/xrGame/HangingLamp.cpp @@ -156,8 +156,8 @@ BOOL CHangingLamp::net_Spawn(CSE_Abstract* DC) TurnOn(); else { - processing_activate(); // temporal enable - TurnOff(); // -> and here is disable :) + processing_activate(); // temporal enable + TurnOff(); // -> and here is disable :) } setVisible((BOOL) !!Visual()); @@ -254,7 +254,7 @@ void CHangingLamp::UpdateCL() if (lanim) { int frame; - u32 clr = lanim->CalculateBGR(Device.fTimeGlobal, frame); // возвращает в формате BGR + u32 clr = lanim->CalculateBGR(Device.fTimeGlobal, frame); // возвращает в формате BGR Fcolor fclr; fclr.set((float)color_get_B(clr), (float)color_get_G(clr), (float)color_get_R(clr), 1.f); fclr.mul_rgb(fBrightness / 255.f); @@ -288,7 +288,7 @@ void CHangingLamp::TurnOn() K->LL_SetBoneVisible(light_bone, TRUE, TRUE); K->CalculateBones_Invalidate(); K->CalculateBones(TRUE); - K->LL_SetBoneVisible(light_bone, TRUE, TRUE); // hack + K->LL_SetBoneVisible(light_bone, TRUE, TRUE); // hack } processing_activate(); m_bState = 1; @@ -309,7 +309,7 @@ void CHangingLamp::TurnOff() make_string("can not Turn Off lamp: %s, visual %s - because all bones become invisible", cNameVisual().c_str(), cName().c_str())); } - if (!PPhysicsShell()) // if we have physiccs_shell it will call processing deactivate when disable + if (!PPhysicsShell()) // if we have physiccs_shell it will call processing deactivate when disable processing_deactivate(); m_bState = 0; } @@ -367,9 +367,9 @@ void CHangingLamp::CreateBody(CSE_ALifeObjectHangingLamp* lamp) m_pPhysicsShell->build_FromKinematics(pKinematics, &bone_map); m_pPhysicsShell->set_PhysicsRefObject(this); m_pPhysicsShell->mXFORM.set(XFORM()); - m_pPhysicsShell->Activate(true); //, + m_pPhysicsShell->Activate(true); //, // m_pPhysicsShell->SmoothElementsInertia(0.3f); - m_pPhysicsShell->SetAirResistance(); // 0.0014f,1.5f + m_pPhysicsShell->SetAirResistance(); // 0.0014f,1.5f ///////////////////////////////////////////////////////////////////////////// BONE_P_PAIR_IT i = bone_map.begin(), e = bone_map.end(); diff --git a/src/xrGame/HangingLamp.h b/src/xrGame/HangingLamp.h index ad3fb3c7a01..564ff01f564 100644 --- a/src/xrGame/HangingLamp.h +++ b/src/xrGame/HangingLamp.h @@ -16,7 +16,7 @@ class CPhysicsElement; class CSE_ALifeObjectHangingLamp; class CPHElement; class CHangingLamp : public CPhysicsShellHolder, public CPHSkeleton -{ // need m_pPhysicShell +{ // need m_pPhysicShell typedef CPhysicsShellHolder inherited; private: @@ -45,8 +45,8 @@ class CHangingLamp : public CPhysicsShellHolder, public CPHSkeleton virtual void Load(LPCSTR section); virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); - virtual void shedule_Update(u32 dt); // Called by sheduler - virtual void UpdateCL(); // Called each frame, so no need for dt + virtual void shedule_Update(u32 dt); // Called by sheduler + virtual void UpdateCL(); // Called each frame, so no need for dt virtual void SpawnInitPhysics(CSE_Abstract* D); virtual CPhysicsShellHolder* PPhysicsShellHolder() { return PhysicsShellHolder(); }; @@ -67,4 +67,4 @@ class CHangingLamp : public CPhysicsShellHolder, public CPHSkeleton virtual float Radius() const; }; -#endif // HangingLampH +#endif // HangingLampH diff --git a/src/xrGame/Helicopter.cpp b/src/xrGame/Helicopter.cpp index 69376f3dbad..8a8f9e32acc 100644 --- a/src/xrGame/Helicopter.cpp +++ b/src/xrGame/Helicopter.cpp @@ -90,7 +90,7 @@ void CHelicopter::Load(LPCSTR section) HUD_SOUND_ITEM::LoadSound(section, "snd_shoot_rocket", m_sndShotRocket, SOUND_TYPE_WEAPON_SHOOTING); CRocketLauncher::Load(section); - UseFireTrail(m_enemy.bUseFireTrail); // temp force reloar disp params + UseFireTrail(m_enemy.bUseFireTrail); // temp force reloar disp params m_sAmmoType = pSettings->r_string(section, "ammo_class"); m_CurrentAmmo.Load(*m_sAmmoType, 0); @@ -311,7 +311,7 @@ void CHelicopter::MoveStep() if (aaa) Log("2-m_movement.curLinearSpeed=", m_movement.curLinearSpeed); } else - { // go stopping + { // go stopping if (!fis_zero(m_movement.curLinearSpeed)) { m_movement.curLinearAcc = -m_movement.LinearAcc_bk; @@ -470,7 +470,7 @@ void CHelicopter::load(IReader& input_packet) m_enemy.load(input_packet); input_packet.r_fvector3(XFORM().c); m_barrel_dir_tolerance = input_packet.r_float(); - UseFireTrail(m_enemy.bUseFireTrail); // force reloar disp params + UseFireTrail(m_enemy.bUseFireTrail); // force reloar disp params load_data(m_use_rocket_on_attack, input_packet); load_data(m_use_mgun_on_attack, input_packet); diff --git a/src/xrGame/Helicopter2.cpp b/src/xrGame/Helicopter2.cpp index b3af178df0c..94b226a58f9 100644 --- a/src/xrGame/Helicopter2.cpp +++ b/src/xrGame/Helicopter2.cpp @@ -85,7 +85,7 @@ void CHelicopter::UpdateHeliParticles() if (m_lanim) { int frame; - u32 clr = m_lanim->CalculateBGR(Device.fTimeGlobal, frame); // тючтЁр•рхЄ т ЇюЁьрЄх BGR + u32 clr = m_lanim->CalculateBGR(Device.fTimeGlobal, frame); // тючтЁр•рхЄ т ЇюЁьрЄх BGR Fcolor fclr; fclr.set((float)color_get_B(clr), (float)color_get_G(clr), (float)color_get_R(clr), 1.f); fclr.mul_rgb(m_light_brightness / 255.f); @@ -113,7 +113,7 @@ void CHelicopter::SetDestPosition(Fvector* pos) m_movement.SetDestPosition(pos); #ifndef MASTER_GOLD if (bDebug) Msg("---SetDestPosition %f %f %f", pos->x, pos->y, pos->z); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } float CHelicopter::GetDistanceToDestPosition() @@ -154,8 +154,8 @@ float CHelicopter::GetMaxVelocity() //////////////////////Start By JoHnY/////////////////////// void CHelicopter::SetLinearAcc(float LAcc_fw, float LAcc_bw) { - m_movement.LinearAcc_fw = LAcc_fw; //ускорение разгона - m_movement.LinearAcc_bk = LAcc_bw; //ускорение торможения + m_movement.LinearAcc_fw = LAcc_fw; //ускорение разгона + m_movement.LinearAcc_bk = LAcc_bw; //ускорение торможения } //////////////////////End By JoHnY///////////////////////// void CHelicopter::SetSpeedInDestPoint(float sp) @@ -163,7 +163,7 @@ void CHelicopter::SetSpeedInDestPoint(float sp) m_movement.SetSpeedInDestPoint(sp); #ifndef MASTER_GOLD if (bDebug) Msg("---SetSpeedInDestPoint %f", sp); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } float CHelicopter::GetSpeedInDestPoint(float sp) @@ -175,7 +175,7 @@ void CHelicopter::SetOnPointRangeDist(float d) m_movement.onPointRangeDist = d; #ifndef MASTER_GOLD if (bDebug) Msg("---SetOnPointRangeDist %f", d); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } float CHelicopter::GetOnPointRangeDist() diff --git a/src/xrGame/HelicopterMovementManager.cpp b/src/xrGame/HelicopterMovementManager.cpp index 426de8d8c0c..5d75351168d 100644 --- a/src/xrGame/HelicopterMovementManager.cpp +++ b/src/xrGame/HelicopterMovementManager.cpp @@ -112,7 +112,7 @@ void SHeliMovementState::UpdatePatrolPath() currPatrolPath->begin(currPatrolVertex, b, e); if (b != e) { if (need_to_del_path && - currPatrolVertex->data().flags()) // fake flags that signals entrypoint for round path + currPatrolVertex->data().flags()) // fake flags that signals entrypoint for round path SetPointFlags(currPatrolVertex->vertex_id(), 0); currPatrolVertex = currPatrolPath->vertex((*b).vertex_id()); @@ -182,8 +182,7 @@ void SHeliMovementState::getPathAltitude(Fvector& point, float base_altitude) VERIFY(_valid(point)); - float minY = - boundingVolume.min.y; //+(m_boundingVolume.max.y-m_boundingVolume.min.y)*m_heli->m_data.m_alt_korridor; + float minY = boundingVolume.min.y; //+(m_boundingVolume.max.y-m_boundingVolume.min.y)*m_heli->m_data.m_alt_korridor; float maxY = boundingVolume.max.y + base_altitude; clamp(point.y, minY, maxY); VERIFY(_valid(point)); @@ -306,7 +305,7 @@ void SHeliMovementState::CreateRoundPoints( float height = center.y; float round_len = 2 * PI * radius; - static float dist = 30.0f; // dist between points + static float dist = 30.0f; // dist between points float td = 2 * PI * dist / round_len; float dir_h = 0.0f; @@ -330,7 +329,7 @@ void SHeliMovementState::goByRoundPath(Fvector center_, float radius_, bool cloc if (r_verify > radius_) { #ifndef MASTER_GOLD Msg("! Helicopter: cannot build round path R=%f. Min R=%f", radius_, r_verify); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } diff --git a/src/xrGame/HelicopterWeapon.cpp b/src/xrGame/HelicopterWeapon.cpp index aab0cf01e43..bba4cd83ce0 100644 --- a/src/xrGame/HelicopterWeapon.cpp +++ b/src/xrGame/HelicopterWeapon.cpp @@ -165,7 +165,7 @@ void CHelicopter::MGunFireStart() m_enemy.fire_trail_length_curr = half_trail * 2.0f; clamp(m_enemy.fire_trail_length_curr, 0.0f, m_enemy.fire_trail_length_des); // Msg("Start fire. Desired length=%f, - //cur_length=%f",m_enemy.fire_trail_length_des,m_enemy.fire_trail_length_curr); + // cur_length=%f",m_enemy.fire_trail_length_des,m_enemy.fire_trail_length_curr); } else m_enemy.fire_trail_length_curr = m_enemy.fire_trail_length_des; @@ -265,7 +265,7 @@ void CHelicopter::UpdateMGunDir() XFi.invert(XFORM()); Fvector dep; XFi.transform_tiny(dep, m_enemy.destEnemyPos); - { // x angle + { // x angle Fvector A_; A_.sub(dep, m_bind_x); m_i_bind_x_xform.transform_dir(A_); @@ -275,7 +275,7 @@ void CHelicopter::UpdateMGunDir() clamp(m_tgt_rot.x, -m_lim_x_rot.y, -m_lim_x_rot.x); if (!fsimilar(sv_x, m_tgt_rot.x, EPS_L)) m_allow_fire = FALSE; } - { // y angle + { // y angle Fvector A_; A_.sub(dep, m_bind_y); m_i_bind_y_xform.transform_dir(A_); diff --git a/src/xrGame/Hit.cpp b/src/xrGame/Hit.cpp index 8addcec75ba..32b752175a0 100644 --- a/src/xrGame/Hit.cpp +++ b/src/xrGame/Hit.cpp @@ -94,7 +94,7 @@ void SHit::Read_Packet_Cont(NET_Packet Packet) aim_bullet = Packet.r_u16() != 0; else aim_bullet = false; - hit_type = (ALife::EHitType)Packet.r_u16(); // hit type + hit_type = (ALife::EHitType)Packet.r_u16(); // hit type if (hit_type == ALife::eHitTypeFireWound) { Packet.r_float(armor_piercing); diff --git a/src/xrGame/HitMarker.cpp b/src/xrGame/HitMarker.cpp index 00b0960ec23..672a5a84a23 100644 --- a/src/xrGame/HitMarker.cpp +++ b/src/xrGame/HitMarker.cpp @@ -25,7 +25,7 @@ void CHitMarker::InitShader(LPCSTR tex_name) void CHitMarker::InitShader_Grenade(LPCSTR tex_name) { - hShader_Grenade->create("hud\\default", tex_name); // "hud\\default2" + hShader_Grenade->create("hud\\default", tex_name); // "hud\\default2" } //-------------------------------------------------------------------- @@ -145,7 +145,7 @@ void CHitMarker::net_Relcase(IGameObject* obj) (*it_b)->removed_grenade = true; // break; } - } // for + } // for } //========================================================================================== diff --git a/src/xrGame/HitMarker.h b/src/xrGame/HitMarker.h index da04ec470c9..1526aa6d92b 100644 --- a/src/xrGame/HitMarker.h +++ b/src/xrGame/HitMarker.h @@ -69,4 +69,4 @@ class CHitMarker void net_Relcase(IGameObject* obj); }; -#endif // __XR_HITMARKER_H__ +#endif // __XR_HITMARKER_H__ diff --git a/src/xrGame/HudItem.cpp b/src/xrGame/HudItem.cpp index 20f81dab553..e388c59c090 100644 --- a/src/xrGame/HudItem.cpp +++ b/src/xrGame/HudItem.cpp @@ -253,13 +253,13 @@ void CHudItem::on_a_hud_attach() PlayHUDMotion_noCB(m_current_motion, FALSE); #ifdef DEBUG // Msg("continue playing [%s][%d]",m_current_motion.c_str(), Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } else { #ifdef DEBUG // Msg("no active motion"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } } diff --git a/src/xrGame/HudItem.h b/src/xrGame/HudItem.h index 3e2952958f2..e06ac92ff62 100644 --- a/src/xrGame/HudItem.h +++ b/src/xrGame/HudItem.h @@ -103,10 +103,10 @@ class CHudItem : public CHUDState virtual void SendDeactivateItem(); virtual void OnActiveItem(){}; virtual void OnHiddenItem(){}; - virtual void SendHiddenItem(); // same as OnHiddenItem but for client... (sends message to a server)... + virtual void SendHiddenItem(); // same as OnHiddenItem but for client... (sends message to a server)... virtual void OnMoveToRuck(const SInvItemPlace& prev); - bool IsHidden() const { return GetState() == eHidden; } // Does weapon is in hidden state + bool IsHidden() const { return GetState() == eHidden; } // Does weapon is in hidden state bool IsHiding() const { return GetState() == eHiding; } bool IsShowing() const { return GetState() == eShowing; } virtual void SwitchState(u32 S); diff --git a/src/xrGame/HudSound.cpp b/src/xrGame/HudSound.cpp index aa680c8d70c..d51a192f68f 100644 --- a/src/xrGame/HudSound.cpp +++ b/src/xrGame/HudSound.cpp @@ -25,7 +25,7 @@ void HUD_SOUND_ITEM::LoadSound(LPCSTR section, LPCSTR line, HUD_SOUND_ITEM& hud_ LoadSound(section, sound_line, s.snd, type, &s.volume, &s.delay); xr_sprintf(sound_line, "%s%d", line, ++k); - } // while + } // while } void HUD_SOUND_ITEM::LoadSound(LPCSTR section, LPCSTR line, ref_sound& snd, int type, float* volume, float* delay) diff --git a/src/xrGame/HudSound.h b/src/xrGame/HudSound.h index 4e53a1543e4..78780e9d205 100644 --- a/src/xrGame/HudSound.h +++ b/src/xrGame/HudSound.h @@ -36,8 +36,8 @@ struct HUD_SOUND_ITEM struct SSnd { ref_sound snd; - float delay; //задержка перед проигрыванием - float volume; //громкость + float delay; //задержка перед проигрыванием + float volume; //громкость }; shared_str m_alias; SSnd* m_activeSnd; diff --git a/src/xrGame/IKFoot.cpp b/src/xrGame/IKFoot.cpp index c3a88832e09..e8853d0e539 100644 --- a/src/xrGame/IKFoot.cpp +++ b/src/xrGame/IKFoot.cpp @@ -28,16 +28,16 @@ void CIKFoot::Create(IKinematics* K, LPCSTR section, u16 bones[4]) /// defaults m_ref_bone = 2; if (m_ref_bone == 2) { - m_foot_normal.v.set(1, 0, 0); // 2 + m_foot_normal.v.set(1, 0, 0); // 2 m_foot_normal.bone = 2; - m_foot_direction.v.set(0, 0, 1); // 2 + m_foot_direction.v.set(0, 0, 1); // 2 m_foot_direction.bone = 2; } else { - m_foot_normal.v.set(0, 0, -1); // 3 + m_foot_normal.v.set(0, 0, -1); // 3 m_foot_normal.bone = 3; - m_foot_direction.v.set(1, 0, 0); // 3 + m_foot_direction.v.set(1, 0, 0); // 3 m_foot_direction.bone = 3; } @@ -208,13 +208,13 @@ int ik_allign_free_foot = 0; ik_goal_matrix::e_collide_state CIKFoot::CollideFoot(float angle, float& out_angle, const Fvector& global_toe, const Fvector& foot_normal, const Fvector& global_bone_pos, const Fplane& p, const Fvector& ax) const { - float dfoot_tri = -p.d - p.n.dotproduct(global_bone_pos); // dist from foot bone pos to tri plain + float dfoot_tri = -p.d - p.n.dotproduct(global_bone_pos); // dist from foot bone pos to tri plain Fvector axp; axp.sub(global_toe, global_bone_pos); float dfoot_toe = p.n.dotproduct(axp); out_angle = angle; if (dfoot_tri < m_foot_width * _abs(foot_normal.dotproduct(p.n))) return ik_goal_matrix::cl_aligned; - axp.sub(Fvector().mul(ax, axp.dotproduct(ax))); // vector from nc_toe to ax + axp.sub(Fvector().mul(ax, axp.dotproduct(ax))); // vector from nc_toe to ax float dtoe_ax = axp.magnitude(); out_angle = 0.f; @@ -229,7 +229,7 @@ ik_goal_matrix::e_collide_state CIKFoot::CollideFoot(float angle, float& out_ang return ik_goal_matrix::cl_rotational; } -static const float min_dot = 0.9f; // M_SQRT1_2;//M_SQRT1_2; +static const float min_dot = 0.9f; // M_SQRT1_2;//M_SQRT1_2; bool CIKFoot::make_shift( Fmatrix& xm, const Fvector& cl_point, bool collide, const Fplane& p, const Fvector& pick_dir) const @@ -297,9 +297,9 @@ bool CIKFoot::GetFootStepMatrix(ik_goal_matrix& m, const Fmatrix& g_anim, const { const Fmatrix global_anim = g_anim; Fvector local_point; - ToePosition(local_point); // toe position in bone[2] space + ToePosition(local_point); // toe position in bone[2] space Fvector global_point; - global_anim.transform_tiny(global_point, local_point); // non collided toe in global space + global_anim.transform_tiny(global_point, local_point); // non collided toe in global space Fvector foot_normal; FootNormal(foot_normal); global_anim.transform_dir(foot_normal); @@ -332,7 +332,7 @@ bool CIKFoot::GetFootStepMatrix(ik_goal_matrix& m, const Fmatrix& g_anim, const Fmatrix xm; xm.set(global_anim); ik_goal_matrix::e_collide_state cl_state = ik_goal_matrix::cl_undefined; - if (rotation) //! collide || ik_allign_free_foot + if (rotation) //! collide || ik_allign_free_foot cl_state = rotate(xm, p, foot_normal, global_point, collide); if (b_make_shift && make_shift(xm, local_point, collide, p, cld.m_pick_dir)) switch (cl_state) diff --git a/src/xrGame/IKLimbsController.cpp b/src/xrGame/IKLimbsController.cpp index 183f049e3c9..7cdd5c0eede 100644 --- a/src/xrGame/IKLimbsController.cpp +++ b/src/xrGame/IKLimbsController.cpp @@ -14,7 +14,7 @@ #include "xrCore/Animation/Motion.hpp" #ifdef DEBUG #include "PHDebug.h" -#endif // DEBUG +#endif // DEBUG CIKLimbsController::CIKLimbsController() : m_object(0), m_legs_blend(0) { @@ -55,7 +55,7 @@ void CIKLimbsController::LimbCalculate(SCalculateData& cd) { cd.do_collide = m_legs_blend && - !cd.m_limb->KinematicsAnimated()->LL_GetMotionDef(m_legs_blend->motionID)->marks.empty(); // m_legs_blend->; + !cd.m_limb->KinematicsAnimated()->LL_GetMotionDef(m_legs_blend->motionID)->marks.empty(); // m_legs_blend->; cd.m_limb->ApplyState(cd); } @@ -187,9 +187,9 @@ void CIKLimbsController::ObjectShift(float static_shift, const SCalculateData cd CPhysicsShellHolder* sh = smart_cast(m_object); VERIFY(sh); // CCharacterPhysicsSupport *ch = sh->character_physics_support(); - _object_shift.freeze(!!Device.Paused()); // ch->interactive_motion() || + _object_shift.freeze(!!Device.Paused()); // ch->interactive_motion() || - if (cnt_in_step != sz && PredictObjectShift(cd)) // cnt_in_step > 0 && + if (cnt_in_step != sz && PredictObjectShift(cd)) // cnt_in_step > 0 && return; StaticObjectShift(cd); } @@ -246,7 +246,7 @@ void CIKLimbsController::Calculate() root_bi.set_callback(root_bi.callback_type(), 0, root_bi.callback_param(), TRUE); - if (ik_shift_object) //&& ! m_object->animation_movement_controlled( ) + if (ik_shift_object) //&& ! m_object->animation_movement_controlled( ) { ShiftObject(cd); } diff --git a/src/xrGame/InfoDocument.cpp b/src/xrGame/InfoDocument.cpp index 84d3816fef4..31510ac3a0d 100644 --- a/src/xrGame/InfoDocument.cpp +++ b/src/xrGame/InfoDocument.cpp @@ -64,9 +64,9 @@ void CInfoDocument::OnH_A_Chield() if (m_Info.size()) { NET_Packet P; u_EventGen(P, GE_INFO_TRANSFER, H_Parent()->ID()); - P.w_u16(ID()); //отправитель - P.w_stringZ(m_Info); //сообщение - P.w_u8(1); //добавление сообщения + P.w_u16(ID()); //отправитель + P.w_stringZ(m_Info); //сообщение + P.w_u8(1); //добавление сообщения u_EventSend(P); } } diff --git a/src/xrGame/Inventory.cpp b/src/xrGame/Inventory.cpp index 41dd5a9d59a..5e6ab03fa3e 100644 --- a/src/xrGame/Inventory.cpp +++ b/src/xrGame/Inventory.cpp @@ -51,7 +51,7 @@ CInventory::CInventory() m_fMaxWeight = pSettings->r_float("inventory", "max_weight"); u32 sz = pSettings->r_s32("inventory", "slots_count"); - m_slots.resize(sz + 1); // first is [1] + m_slots.resize(sz + 1); // first is [1] m_iActiveSlot = NO_ACTIVE_SLOT; m_iNextActiveSlot = NO_ACTIVE_SLOT; @@ -243,14 +243,14 @@ bool CInventory::DropItem(CGameObject* pObj, bool just_before_destroy, bool dont if (just_before_destroy) { #ifdef DEBUG Msg("---DropItem activating slot [-1], forced, Frame[%d]", Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG Activate(NO_ACTIVE_SLOT, true); } else { #ifdef DEBUG Msg("---DropItem activating slot [-1], Frame[%d]", Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG Activate(NO_ACTIVE_SLOT); } } @@ -340,7 +340,7 @@ bool CInventory::Slot(u16 slot_id, PIItem pIItem, bool bNotActivate, bool strict } #ifdef MP_LOGGING Msg("--- Actor [%d] places to slot item [%d]", GetOwner()->object_id(), pIItem->object_id()); -#endif //#ifdef MP_LOGGING +#endif //#ifdef MP_LOGGING } else { @@ -360,7 +360,7 @@ bool CInventory::Slot(u16 slot_id, PIItem pIItem, bool bNotActivate, bool strict { #ifdef DEBUG Msg("---To Slot: activating slot [%d], Frame[%d]", slot_id, Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG Activate(slot_id); } SInvItemPlace p = pIItem->m_ItemCurrPlace; @@ -488,8 +488,9 @@ void CInventory::Activate(u16 slot, bool bForce) // LPCSTR const name = smart_cast(m_pOwner)->cName().c_str(); // if ( !xr_strcmp("jup_b43_stalker_assistant_pri6695", name) ) // LogStackTrace (""); - // Msg ( "[%6d][%s] CInventory::Activate changing next active slot to %d", Device.dwTimeGlobal, - //name, slot ); + // Msg ( "[%6d][%s] CInventory::Activate changing next active slot to %d", + //Device.dwTimeGlobal, + // name, slot ); // } m_iNextActiveSlot = slot; #ifdef DEBUG @@ -504,7 +505,7 @@ void CInventory::Activate(u16 slot, bool bForce) #ifdef DEBUG // Msg("--- Activating slot [%d], inventory owner: [%s], Frame[%d]", slot, m_pOwner->Name(), Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG //активный слот не выбран if (GetActiveSlot() == NO_ACTIVE_SLOT) { @@ -514,13 +515,13 @@ void CInventory::Activate(u16 slot, bool bForce) // if ( !xr_strcmp("jup_b43_stalker_assistant_pri6695", name) ) // LogStackTrace (""); // Msg ( "[%6d][%s] CInventory::Activate changing next active slot2 to %d", - //Device.dwTimeGlobal, name, slot ); + // Device.dwTimeGlobal, name, slot ); // } m_iNextActiveSlot = slot; } else { - if (slot == GRENADE_SLOT) // fake for grenade + if (slot == GRENADE_SLOT) // fake for grenade { PIItem gr = SameSlot(GRENADE_SLOT, NULL, true); if (gr) Slot(GRENADE_SLOT, gr); @@ -538,9 +539,9 @@ void CInventory::Activate(u16 slot, bool bForce) tempItem->SendDeactivateItem(); #ifdef DEBUG // Msg("--- Inventory owner [%s]: send deactivate item [%s]", m_pOwner->Name(), active_item->NameItem()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } - else // in case where weapon is going to destroy + else // in case where weapon is going to destroy { if (tmp_item) tmp_item->ActivateItem(); @@ -548,8 +549,9 @@ void CInventory::Activate(u16 slot, bool bForce) //! LPCSTR const name = smart_cast(m_pOwner)->cName().c_str(); // if ( !xr_strcmp("jup_b43_stalker_assistant_pri6695", name) ) // LogStackTrace (""); - //! Msg ("[%6d][%s] CInventory::Activate changing active slot from %d to %d", Device.dwTimeGlobal, - //!name, m_iActiveSlot, slot ); + //! Msg ("[%6d][%s] CInventory::Activate changing active slot from %d to %d", + //!Device.dwTimeGlobal, + //! name, m_iActiveSlot, slot ); //! } m_iActiveSlot = slot; @@ -558,8 +560,9 @@ void CInventory::Activate(u16 slot, bool bForce) // LPCSTR const name = smart_cast(m_pOwner)->cName().c_str(); // if ( !xr_strcmp("jup_b43_stalker_assistant_pri6695", name) && !slot ) // LogStackTrace (""); - // Msg ( "[%6d][%s] CInventory::Activate changing next active slot3 to %d", Device.dwTimeGlobal, - //name, slot ); + // Msg ( "[%6d][%s] CInventory::Activate changing next active slot3 to %d", + //Device.dwTimeGlobal, + // name, slot ); // } m_iNextActiveSlot = slot; } @@ -749,7 +752,8 @@ void CInventory::Update() // LPCSTR const name = smart_cast(m_pOwner)->cName().c_str(); // if ( !xr_strcmp("jup_b43_stalker_assistant_pri6695", name) ) // LogStackTrace (""); - // Msg ("[%6d][%s] CInventory::Activate changing active slot from %d to next active slot + // Msg ("[%6d][%s] CInventory::Activate changing active slot from %d to next active + //slot //%d", Device.dwTimeGlobal, name, m_iActiveSlot, GetNextActiveSlot() ); // } m_iActiveSlot = GetNextActiveSlot(); @@ -799,7 +803,7 @@ void CInventory::UpdateDropItem(PIItem pIItem) P.w_u16(u16(pIItem->object().ID())); pIItem->object().u_EventSend(P); } - } // dropManual + } // dropManual } //ищем на поясе гранату такоже типа @@ -981,7 +985,7 @@ bool CInventory::Eat(PIItem pIItem) #ifdef MP_LOGGING Msg("--- Actor [%d] use or eat [%d][%s]", entity_alive->ID(), pItemToEat->object().ID(), pItemToEat->object().cNameSect().c_str()); -#endif // MP_LOGGING +#endif // MP_LOGGING if (IsGameTypeSingle() && Actor()->m_inventory == this) Actor()->callback(GameObject::eUseObject)((smart_cast(pIItem))->lua_game_object()); @@ -1136,7 +1140,7 @@ u32 CInventory::BeltWidth() const return outfit->get_artefact_count(); } } - return 0; // m_iMaxBelt; + return 0; // m_iMaxBelt; } void CInventory::AddAvailableItems(TIItemContainer& items_container, bool for_trade) const @@ -1231,7 +1235,7 @@ void CInventory::TryActivatePrevSlot() if (prev_active_item && !IsSlotBlocked(prev_active_item) && m_slots[PrevActiveSlot].CanBeActivated()) { #ifndef MASTER_GOLD Msg("Set slots blocked: activating prev slot [%d], Frame[%d]", PrevActiveSlot, Device.dwFrame); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD Activate(PrevActiveSlot); SetPrevActiveSlot(NO_ACTIVE_SLOT); } @@ -1251,7 +1255,7 @@ void CInventory::TryDeactivateActiveSlot() if (active_item && (IsSlotBlocked(active_item) || !m_slots[ActiveSlot].CanBeActivated())) { #ifndef MASTER_GOLD Msg("Set slots blocked: activating slot [-1], Frame[%d]", Device.dwFrame); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD ItemFromSlot(ActiveSlot)->DiscardState(); Activate(NO_ACTIVE_SLOT); SetPrevActiveSlot(ActiveSlot); diff --git a/src/xrGame/Inventory.h b/src/xrGame/Inventory.h index 1c140b5768d..d14ed774744 100644 --- a/src/xrGame/Inventory.h +++ b/src/xrGame/Inventory.h @@ -28,7 +28,7 @@ class priority_group private: xr_set m_sections; -}; // class priority_group +}; // class priority_group typedef xr_vector TISlotArr; @@ -47,7 +47,7 @@ class CInventory void Clear(); IC u16 FirstSlot() const { return KNIFE_SLOT; } - IC u16 LastSlot() const { return LAST_SLOT; } // not "end" + IC u16 LastSlot() const { return LAST_SLOT; } // not "end" IC bool SlotIsPersistent(u16 slot_id) const { return m_slots[slot_id].m_bPersistent; } bool Slot(u16 slot_id, PIItem pIItem, bool bNotActivate = false, bool strict_placement = false); bool Belt(PIItem pIItem, bool strict_placement = false); @@ -87,7 +87,7 @@ class CInventory PIItem Get(const u16 id, bool bSearchRuck) const; // Ищет на поясе или в рюкзаке IItem с указанным CLS_ID PIItem Get(CLASS_ID cls_id, bool bSearchRuck) const; - PIItem GetAny(LPCSTR name) const; // search both (ruck and belt) + PIItem GetAny(LPCSTR name) const; // search both (ruck and belt) PIItem item(CLASS_ID cls_id) const; // get all the items with the same section name diff --git a/src/xrGame/InventoryOwner.h b/src/xrGame/InventoryOwner.h index bacc908b8fb..b5f32c8c874 100644 --- a/src/xrGame/InventoryOwner.h +++ b/src/xrGame/InventoryOwner.h @@ -62,7 +62,7 @@ class CInventoryOwner : public CAttachmentOwner //торговля и общение с персонажем virtual bool AllowItemToTrade(CInventoryItem const* item, const SInvItemPlace& place) const; - virtual void OnFollowerCmd(int cmd){}; // redefine for CAI_Stalkker + virtual void OnFollowerCmd(int cmd){}; // redefine for CAI_Stalkker bool bDisableBreakDialog; //инициализация объекта торговли CTrade* GetTrade(); diff --git a/src/xrGame/Level.cpp b/src/xrGame/Level.cpp index b9057cc33d8..7d62b4badf0 100644 --- a/src/xrGame/Level.cpp +++ b/src/xrGame/Level.cpp @@ -336,7 +336,7 @@ void CLevel::ProcessGameEvents() } case M_FILE_TRANSFER: { - if (m_file_transfer) // in case of net_Stop + if (m_file_transfer) // in case of net_Stop m_file_transfer->on_message(&P); break; } @@ -476,7 +476,7 @@ void CLevel::OnFrame() F->OutNext("0x%08x: P(%d), BPS(%2.1fK), MRR(%2d), MSR(%2d), Retried(%2d), Blocked(%2d)", // Server->game->get_option_s(*C->Name,"name",*C->Name), C->ID.value(), C->stats.getPing(), - float(C->stats.getBPS()), // /1024, + float(C->stats.getBPS()), // /1024, C->stats.getMPS_Receive(), C->stats.getMPS_Send(), C->stats.getRetriedCount(), C->stats.dwTimesBlocked); } @@ -609,7 +609,7 @@ void CLevel::OnRender() CInventoryItem* pIItem = smart_cast(_O); if (pIItem) pIItem->OnRender(); } - if (dbg_net_Draw_Flags.test(dbg_draw_skeleton)) // draw skeleton + if (dbg_net_Draw_Flags.test(dbg_draw_skeleton)) // draw skeleton { CGameObject* pGO = smart_cast(_O); if (pGO && pGO != Level().CurrentViewEntity() && !pGO->H_Parent()) { @@ -789,7 +789,7 @@ void CLevel::make_NetCorrectionPrediction() obj->PH_I_CrPr(); } if (!InterpolationDisabled()) { - for (u32 i = 0; i < lvInterpSteps; i++) // second prediction "real current" to "future" position + for (u32 i = 0; i < lvInterpSteps; i++) // second prediction "real current" to "future" position { physics_world()->Step(); } diff --git a/src/xrGame/Level.h b/src/xrGame/Level.h index 1bb12e3c920..456356c4394 100644 --- a/src/xrGame/Level.h +++ b/src/xrGame/Level.h @@ -57,13 +57,13 @@ class CLevel : public IGame_Level, public IPureClient public: struct AIStatistics { - CStatTimer Think; // thinking - CStatTimer Range; // query: range - CStatTimer Path; // query: path - CStatTimer Node; // query: node - CStatTimer Vis; // visibility detection - total - CStatTimer VisQuery; // visibility detection - portal traversal and frustum culling - CStatTimer VisRayTests; // visibility detection - ray casting + CStatTimer Think; // thinking + CStatTimer Range; // query: range + CStatTimer Path; // query: path + CStatTimer Node; // query: node + CStatTimer Vis; // visibility detection - total + CStatTimer VisQuery; // visibility detection - portal traversal and frustum culling + CStatTimer VisRayTests; // visibility detection - ray casting AIStatistics() { FrameStart(); } void FrameStart() @@ -119,11 +119,11 @@ class CLevel : public IGame_Level, public IPureClient EVENT eEntitySpawn; // Statistics CStatGraph* pStatGraphS = nullptr; - u32 m_dwSPC; // SendedPacketsCount - u32 m_dwSPS; // SendedPacketsSize + u32 m_dwSPC; // SendedPacketsCount + u32 m_dwSPS; // SendedPacketsSize CStatGraph* pStatGraphR = nullptr; - u32 m_dwRPC; // ReceivedPacketsCount - u32 m_dwRPS; // ReceivedPacketsSize + u32 m_dwRPC; // ReceivedPacketsCount + u32 m_dwRPS; // ReceivedPacketsSize private: struct ClientStatistics { @@ -201,7 +201,7 @@ class CLevel : public IGame_Level, public IPureClient void BlockCheatLoad(); bool Connect2Server(const char* options); void SendClientDigestToServer(); - shared_str m_client_digest; // for screenshots + shared_str m_client_digest; // for screenshots public: shared_str const get_cdkey_digest() const { return m_client_digest; } @@ -238,7 +238,7 @@ class CLevel : public IGame_Level, public IPureClient protected: bool net_start_result_total; bool connected_to_server; - bool deny_m_spawn; // only for debug... + bool deny_m_spawn; // only for debug... bool sended_request_connection_data; void MakeReconnect(); LevelMapSyncData map_data; @@ -308,11 +308,11 @@ class CLevel : public IGame_Level, public IPureClient void ClientSave(); u32 Objects_net_Save(NET_Packet* _Packet, u32 start, u32 count); virtual void Send(NET_Packet& P, u32 dwFlags = DPNSEND_GUARANTEED, u32 dwTimeout = 0); - void g_cl_Spawn(LPCSTR name, u8 rp, u16 flags, Fvector pos); // only ask server - void g_sv_Spawn(CSE_Abstract* E); // server reply/command spawning + void g_cl_Spawn(LPCSTR name, u8 rp, u16 flags, Fvector pos); // only ask server + void g_sv_Spawn(CSE_Abstract* E); // server reply/command spawning // Save/Load/State - void SLS_Load(LPCSTR name); // Game Load - void SLS_Default(); // Default/Editor Load + void SLS_Load(LPCSTR name); // Game Load + void SLS_Default(); // Default/Editor Load IC CSpaceRestrictionManager& space_restriction_manager(); IC CSeniorityHierarchyHolder& seniority_holder(); IC CClientSpawnManager& client_spawn_manager(); @@ -320,7 +320,7 @@ class CLevel : public IGame_Level, public IPureClient #ifdef DEBUG IC CDebugRenderer& debug_renderer(); #endif - void __stdcall script_gc(); // GC-cycle + void __stdcall script_gc(); // GC-cycle IC CPHCommander& ph_commander(); IC CPHCommander& ph_commander_scripts(); IC CPHCommander& ph_commander_physics_worldstep(); diff --git a/src/xrGame/LevelFogOfWar.cpp b/src/xrGame/LevelFogOfWar.cpp index 5adfc5fcd10..842f497df13 100644 --- a/src/xrGame/LevelFogOfWar.cpp +++ b/src/xrGame/LevelFogOfWar.cpp @@ -35,7 +35,7 @@ CLevelFogOfWar* CFogOfWarMngr::GetFogOfWar(const shared_str& level_name) if (it != GetFogStorage().end()) return &(*it); else - { // create new or load... + { // create new or load... GetFogStorage().resize(GetFogStorage().size() + 1); CLevelFogOfWar& F = GetFogStorage().back(); F.Init(level_name); @@ -66,7 +66,7 @@ void CLevelFogOfWar::Init(const shared_str& level) if (gameLtx.line_exist(m_level_name, "bound_rect")) tmp = gameLtx.r_fvector4(m_level_name, "bound_rect"); else - tmp.set(-10000.0f, -10000.0f, 10000.0f, 10000.0f); //. hack + tmp.set(-10000.0f, -10000.0f, 10000.0f, 10000.0f); //. hack m_levelRect.set(tmp.x, tmp.y, tmp.z, tmp.w); @@ -83,10 +83,10 @@ void CLevelFogOfWar::Init(const shared_str& level) void CLevelFogOfWar::Open(Fvector2 pos) { - if (!m_rowNum || !m_rowNum) return; // invalid map + if (!m_rowNum || !m_rowNum) return; // invalid map if (!(pos.x >= m_levelRect.lt.x && pos.y >= m_levelRect.lt.y && pos.x <= m_levelRect.rb.x && pos.y <= m_levelRect.rb.y)) - return; // invalid position + return; // invalid position VERIFY2((pos.x >= m_levelRect.lt.x && pos.y >= m_levelRect.lt.y && pos.x <= m_levelRect.rb.x && pos.y <= m_levelRect.rb.y), "invalid position for opening FogOfWar map cell"); @@ -180,7 +180,7 @@ void CLevelFogOfWar::Draw() Frect vis_rect; vis_rect.set(clip_rect.lt.x - map_abs_pos.x, clip_rect.lt.y - map_abs_pos.y, clip_rect.rb.x - map_abs_pos.x, - clip_rect.rb.y - map_abs_pos.y); // vis_rect now in pixels + clip_rect.rb.y - map_abs_pos.y); // vis_rect now in pixels tgt.set(float(vis_rect.x1), float(vis_rect.y1), float(vis_rect.x2), float(vis_rect.y2)); tgt.div(m->GetCurrentZoom(), m->GetCurrentZoom()); diff --git a/src/xrGame/LevelGraphDebugRender.cpp b/src/xrGame/LevelGraphDebugRender.cpp index 0f12b818654..99ee44bbd3e 100644 --- a/src/xrGame/LevelGraphDebugRender.cpp +++ b/src/xrGame/LevelGraphDebugRender.cpp @@ -337,7 +337,7 @@ void LevelGraphDebugRender::DrawGameGraph() Fvector center = {0.f, 5.f, 0.f}; Fvector bounds = {3.f, 0.f, 3.f}; // draw back plane -#if 0 // XXX: disabled in original, reenable? +#if 0 // XXX: disabled in original, reenable? Fvector vertices[4]; xform.transform_tiny(vertices[0], {center.x-bounds.x, center.y+bounds.y, center.z+bounds.z}); xform.transform_tiny(vertices[1], {center.x+bounds.x, center.y+bounds.y, center.z+bounds.z}); @@ -365,7 +365,7 @@ void LevelGraphDebugRender::DrawGameGraph() if (psAI_Flags.test(aiDrawGameGraphStalkers)) DrawStalkers(i); if (psAI_Flags.test(aiDrawGameGraphObjects)) DrawObjects(i); } -#if 0 // XXX: update/delete +#if 0 // XXX: update/delete for (int i = 0; i<(int)ai().game_graph().header().vertex_count(); i++) { Fvector t1 = ai().game_graph().vertex(i)->game_point(); @@ -620,10 +620,10 @@ void LevelGraphDebugRender::DrawNodes() result.mad(result, pl.n, tt); return result; }; - Fvector v1 = createVertex(PL, {vertexPos.x - st, vertexPos.y, vertexPos.z - st}); // minX, minZ - Fvector v2 = createVertex(PL, {vertexPos.x + st, vertexPos.y, vertexPos.z - st}); // maxX, minZ - Fvector v3 = createVertex(PL, {vertexPos.x + st, vertexPos.y, vertexPos.z + st}); // maxX, maxZ - Fvector v4 = createVertex(PL, {vertexPos.x - st, vertexPos.y, vertexPos.z + st}); // minX, maxZ + Fvector v1 = createVertex(PL, {vertexPos.x - st, vertexPos.y, vertexPos.z - st}); // minX, minZ + Fvector v2 = createVertex(PL, {vertexPos.x + st, vertexPos.y, vertexPos.z - st}); // maxX, minZ + Fvector v3 = createVertex(PL, {vertexPos.x + st, vertexPos.y, vertexPos.z + st}); // maxX, maxZ + Fvector v4 = createVertex(PL, {vertexPos.x - st, vertexPos.y, vertexPos.z + st}); // minX, maxZ // render quad GlobalEnv.DRender->dbg_DrawTRI(Fidentity, v3, v2, v1, colorT); GlobalEnv.DRender->dbg_DrawTRI(Fidentity, v1, v4, v3, colorT); @@ -819,4 +819,4 @@ void LevelGraphDebugRender::DrawDebugNode() } } -#endif // DEBUG +#endif // DEBUG diff --git a/src/xrGame/LevelGraphDebugRender.hpp b/src/xrGame/LevelGraphDebugRender.hpp index cadce4d6388..1a6bed72be5 100644 --- a/src/xrGame/LevelGraphDebugRender.hpp +++ b/src/xrGame/LevelGraphDebugRender.hpp @@ -40,4 +40,4 @@ class LevelGraphDebugRender void Render(CGameGraph& gameGraph, CLevelGraph& levelGraph); }; -#endif // DEBUG +#endif // DEBUG diff --git a/src/xrGame/Level_Bullet_Manager.cpp b/src/xrGame/Level_Bullet_Manager.cpp index 69aced16c70..86e95e7d9e1 100644 --- a/src/xrGame/Level_Bullet_Manager.cpp +++ b/src/xrGame/Level_Bullet_Manager.cpp @@ -28,9 +28,9 @@ float const CBulletManager::parent_ignore_distance = 3.f; #ifdef DEBUG float air_resistance_epsilon = .1f; -#else // #ifdef DEBUG +#else // #ifdef DEBUG static float const air_resistance_epsilon = .1f; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG float g_bullet_time_factor = 1.f; SBullet::SBullet() @@ -92,16 +92,16 @@ void SBullet::Init(const Fvector& position, const Fvector& direction, float star } CBulletManager::CBulletManager() -#if 0 // def CONFIG_PROFILE_LOCKS +#if 0 // def CONFIG_PROFILE_LOCKS : m_Lock(MUTEX_PROFILE_ID(CBulletManager)) #ifdef DEBUG ,m_thread_id(GetCurrentThreadId()) -#endif // #ifdef DEBUG -#else // #ifdef CONFIG_PROFILE_LOCKS +#endif // #ifdef DEBUG +#else // #ifdef CONFIG_PROFILE_LOCKS #ifdef DEBUG : m_thread_id(GetCurrentThreadId()) -#endif // #ifdef DEBUG -#endif // #ifdef CONFIG_PROFILE_LOCKS +#endif // #ifdef DEBUG +#endif // #ifdef CONFIG_PROFILE_LOCKS { m_Bullets.clear(); m_Bullets.reserve(100); @@ -279,11 +279,11 @@ static Fvector trajectory_position(Fvector const& start_position, Fvector const& Fvector const& base_gravity, float base_air_resistance, float const base_time) { Fvector const& gravity = - base_gravity; // g_use_new_ballistics ? Fvector(base_gravity).mul(_sqr(factor)) : base_gravity; + base_gravity; // g_use_new_ballistics ? Fvector(base_gravity).mul(_sqr(factor)) : base_gravity; float const& air_resistance = - base_air_resistance; // g_use_new_ballistics ? base_air_resistance*factor : base_air_resistance; - Fvector const& start_velocity = base_start_velocity; // g_use_new_ballistics ? Fvector(base_start_velocity).mul( - // factor ) : base_start_velocity; + base_air_resistance; // g_use_new_ballistics ? base_air_resistance*factor : base_air_resistance; + Fvector const& start_velocity = base_start_velocity; // g_use_new_ballistics ? Fvector(base_start_velocity).mul( + // factor ) : base_start_velocity; float const time = base_time; float const parabolic_time = _max(0.f, 1.f / air_resistance - air_resistance_epsilon); @@ -446,7 +446,7 @@ void CBulletManager::add_bullet_point(Fvector const& start_position, Fvector& pr m_bullet_points.push_back(previous_position); m_bullet_points.push_back(temp); previous_position = temp; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } static void update_bullet_parabolic( @@ -596,9 +596,9 @@ bool CBulletManager::trajectory_check_error(Fvector& previous_position, collide: bullet_test_callback_data data; data.pBullet = • -#if 1 // def DEBUG +#if 1 // def DEBUG data.high_time = high; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG bullet.flags.ricochet_was = 0; bullet.dir = start_to_target; @@ -662,7 +662,7 @@ bool CBulletManager::process_bullet(collide::rq_results& storage, SBullet& bulle float const air_resistance = (GameID() == eGameIDSingle) ? m_fAirResistanceK : bullet.air_resistance; bullet.tracer_start_position = bullet.bullet_pos; -#if 0 // def DEBUG +#if 0 // def DEBUG extern BOOL g_bDrawBulletHit; if (g_bDrawBulletHit) { @@ -851,7 +851,7 @@ void CBulletManager::Render() GlobalEnv.UIRender->CacheSetCullMode(IUIRender::cmCCW); } -void CBulletManager::CommitRenderSet() // @ the end of frame +void CBulletManager::CommitRenderSet() // @ the end of frame { m_BulletsRendered = m_Bullets; if (g_mt_config.test(mtBullets)) { @@ -862,7 +862,7 @@ void CBulletManager::CommitRenderSet() // @ the end of frame UpdateWorkload(); } } -void CBulletManager::CommitEvents() // @ the start of frame +void CBulletManager::CommitEvents() // @ the start of frame { if (m_Events.size() > 1000) Msg("! too many bullets during single frame: %d", m_Events.size()); @@ -901,7 +901,7 @@ void CBulletManager::RegisterEvent( if (breakpoint) DEBUG_BREAK; } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_Events.push_back(_event()); _event& E = m_Events.back(); diff --git a/src/xrGame/Level_Bullet_Manager.h b/src/xrGame/Level_Bullet_Manager.h index 0e10ed80f9f..60e37a78c13 100644 --- a/src/xrGame/Level_Bullet_Manager.h +++ b/src/xrGame/Level_Bullet_Manager.h @@ -10,40 +10,40 @@ //коэфициенты и параметры патрона struct SBullet_Hit { - float power; // power * cartridge - float impulse; // impulse * cartridge + float power; // power * cartridge + float impulse; // impulse * cartridge }; //структура, описывающая пулю и ее свойства в полете struct SBullet { - u32 init_frame_num; //номер кадра на котором была запущена пуля + u32 init_frame_num; //номер кадра на котором была запущена пуля union { struct { - u16 ricochet_was : 1; //пуля срикошетила - u16 explosive : 1; // special explosive mode for particles + u16 ricochet_was : 1; //пуля срикошетила + u16 explosive : 1; // special explosive mode for particles u16 allow_tracer : 1; - u16 allow_ricochet : 1; //разрешить рикошет - u16 allow_sendhit : 1; // statistics + u16 allow_ricochet : 1; //разрешить рикошет + u16 allow_sendhit : 1; // statistics //. u16 skipped_frame : 1 ; //пропуск первой отрисовки - u16 aim_bullet : 1; //прицеленная пуля( вылетевшая первой после длительного молчания оружия (1-3 сек.)) - u16 magnetic_beam : 1; //магнитный луч (нет отклонения после пробивания, не падает скорость после - //пробивания) + u16 aim_bullet : 1; //прицеленная пуля( вылетевшая первой после длительного молчания оружия (1-3 сек.)) + u16 magnetic_beam : 1; //магнитный луч (нет отклонения после пробивания, не падает скорость после + //пробивания) }; u16 _storage; } flags; u16 bullet_material_idx; - Fvector bullet_pos; //текущая позиция + Fvector bullet_pos; //текущая позиция Fvector dir; - float speed; //текущая скорость + float speed; //текущая скорость - u16 parent_id; // ID персонажа который иницировал действие - u16 weapon_id; // ID оружия из которого была выпущены пуля + u16 parent_id; // ID персонажа который иницировал действие + u16 weapon_id; // ID оружия из которого была выпущены пуля - float fly_dist; //дистанция которую пуля пролетела + float fly_dist; //дистанция которую пуля пролетела Fvector tracer_start_position; Fvector start_position; @@ -57,9 +57,9 @@ struct SBullet //------------------------------------------------------------------- float air_resistance; //------------------------------------------------------------------- - float max_speed; // maxspeed*cartridge - float max_dist; // maxdist*cartridge - float armor_piercing; // ap + float max_speed; // maxspeed*cartridge + float max_dist; // maxdist*cartridge + float armor_piercing; // ap float wallmark_size; //------------------------------------------------------------------- u8 m_u8ColorID; @@ -115,7 +115,7 @@ class CBulletManager { EventType Type; BOOL dynamic; - BOOL Repeated; // последовательное повторное попадание в динамический объект + BOOL Repeated; // последовательное повторное попадание в динамический объект SBullet_Hit hit_result; SBullet bullet; Fvector normal; @@ -132,8 +132,8 @@ class CBulletManager //список пуль находящихся в данный момент на уровне //. Lock m_Lock ; - BulletVec m_Bullets; // working set, locked - BulletVec m_BulletsRendered; // copy for rendering + BulletVec m_Bullets; // working set, locked + BulletVec m_BulletsRendered; // copy for rendering xr_vector<_event> m_Events; #ifdef DEBUG @@ -141,7 +141,7 @@ class CBulletManager typedef xr_vector BulletPoints; BulletPoints m_bullet_points; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG //отрисовка трассеров от пуль CTracer tracers; @@ -212,8 +212,8 @@ class CBulletManager float maximum_distance, const CCartridge& cartridge, float const air_resistance_factor, bool SendHit, bool AimBullet = false); - void CommitEvents(); // @ the start of frame - void CommitRenderSet(); // @ the end of frame + void CommitEvents(); // @ the start of frame + void CommitRenderSet(); // @ the end of frame void Render(); }; @@ -222,7 +222,7 @@ struct bullet_test_callback_data Fvector collide_position; SBullet* pBullet; float collide_time; -#if 1 // def DEBUG +#if 1 // def DEBUG float high_time; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG }; diff --git a/src/xrGame/Level_GameSpy_Funcs.cpp b/src/xrGame/Level_GameSpy_Funcs.cpp index 88de2dea2dd..dd96cd45106 100644 --- a/src/xrGame/Level_GameSpy_Funcs.cpp +++ b/src/xrGame/Level_GameSpy_Funcs.cpp @@ -10,7 +10,7 @@ void CLevel::OnGameSpyChallenge(NET_Packet* P) { #ifndef MASTER_GOLD Msg("xrGS::CDKey::Level : Responding on Challenge"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD u8 Reauth = P->r_u8(); string64 ChallengeStr; diff --git a/src/xrGame/Level_SLS_Default.cpp b/src/xrGame/Level_SLS_Default.cpp index b4fcc5b98af..b247fd81263 100644 --- a/src/xrGame/Level_SLS_Default.cpp +++ b/src/xrGame/Level_SLS_Default.cpp @@ -2,7 +2,7 @@ #include "stdafx.h" #include "xrserver.h" -void CLevel::SLS_Default() // Default/Editor Load +void CLevel::SLS_Default() // Default/Editor Load { // Signal main actor spawn /* diff --git a/src/xrGame/Level_SLS_Load.cpp b/src/xrGame/Level_SLS_Load.cpp index 302f80d6cf8..80e6d6f6eb9 100644 --- a/src/xrGame/Level_SLS_Load.cpp +++ b/src/xrGame/Level_SLS_Load.cpp @@ -1,6 +1,6 @@ #include "Level.h" #include "stdafx.h" -void CLevel::net_Load(LPCSTR name) // Game Load +void CLevel::net_Load(LPCSTR name) // Game Load { } diff --git a/src/xrGame/Level_SLS_Save.cpp b/src/xrGame/Level_SLS_Save.cpp index d8265f8e4fb..ab20f793624 100644 --- a/src/xrGame/Level_SLS_Save.cpp +++ b/src/xrGame/Level_SLS_Save.cpp @@ -3,7 +3,7 @@ #include "stdafx.h" #include "xrserver.h" -void CLevel::net_Save(LPCSTR name) // Game Save +void CLevel::net_Save(LPCSTR name) // Game Save { if (0 == Server) { Msg("KERNEL::Can't save game on pure client"); diff --git a/src/xrGame/Level_bullet_manager_firetrace.cpp b/src/xrGame/Level_bullet_manager_firetrace.cpp index b37b2d238a2..08d02433c59 100644 --- a/src/xrGame/Level_bullet_manager_firetrace.cpp +++ b/src/xrGame/Level_bullet_manager_firetrace.cpp @@ -107,8 +107,8 @@ BOOL CBulletManager::test_callback(const collide::ray_defs& rd, IGameObject* obj } #endif if (Random.randF(0.f, 1.f) > (ahp * hpf)) { - bRes = FALSE; // don't hit actor - play_whine = true; // play whine sound + bRes = FALSE; // don't hit actor + play_whine = true; // play whine sound } else { @@ -116,13 +116,13 @@ BOOL CBulletManager::test_callback(const collide::ray_defs& rd, IGameObject* obj Level().BulletManager().m_rq_results.r_clear(); if (cform->_RayQuery(rd, Level().BulletManager().m_rq_results)) { - bRes = TRUE; // hit actor - play_whine = false; // don't play whine sound + bRes = TRUE; // hit actor + play_whine = false; // don't play whine sound } else { - bRes = FALSE; // don't hit actor - play_whine = true; // play whine sound + bRes = FALSE; // don't hit actor + play_whine = true; // play whine sound } } } @@ -255,7 +255,7 @@ void CBulletManager::DynamicObjectHit(CBulletManager::_event& E) if (g_clear) E.Repeated = false; if (GameID() == eGameIDSingle) E.Repeated = false; - bool NeedShootmark = true; //! E.Repeated; + bool NeedShootmark = true; //! E.Repeated; if (smart_cast(E.R.O)) { game_PlayerState* ps = Game().GetPlayerByGameID(E.R.O->ID()); @@ -307,7 +307,7 @@ void CBulletManager::DynamicObjectHit(CBulletManager::_event& E) Game().m_WeaponUsageStatistic->CollectData()) { CActor* pActor = smart_cast(E.R.O); - if (pActor) // && pActor->g_Alive()) + if (pActor) // && pActor->g_Alive()) { Game().m_WeaponUsageStatistic->OnBullet_Hit(&E.bullet, E.R.O->ID(), (s16)E.R.element, E.point); AddStatistic = true; @@ -370,8 +370,9 @@ bool CBulletManager::ObjectHit(SBullet_Hit* hit_res, SBullet* bullet, const Fvec } if (DOT(hit_normal, bullet->dir) < 0) { if (bullet->density_mode) { - // Log("WARNING: Material in material found while bullet tracing. Incorrect behaviour of shooting - //is possible."); + // Log("WARNING: Material in material found while bullet tracing. Incorrect behaviour of + //shooting + // is possible."); } bullet->density_mode = true; SGameMtl* mtl = GMLib.GetMaterialByIdx(target_material); @@ -389,7 +390,7 @@ bool CBulletManager::ObjectHit(SBullet_Hit* hit_res, SBullet* bullet, const Fvec //коэффициент уменьшение силы с падением скорости float speed_factor = bullet->speed / bullet->max_speed; //получить силу хита выстрела с учетом патрона - *hit_res = bullet->hit_param; // default param + *hit_res = bullet->hit_param; // default param hit_res->power = bullet->hit_param.power * speed_factor; @@ -398,7 +399,7 @@ bool CBulletManager::ObjectHit(SBullet_Hit* hit_res, SBullet* bullet, const Fvec SGameMtl* mtl = GMLib.GetMaterialByIdx(target_material); float mtl_ap = mtl->fShootFactor; - float shoot_factor = 0.0f; // default >> пуля НЕ пробила материал! + float shoot_factor = 0.0f; // default >> пуля НЕ пробила материал! float ap = bullet->armor_piercing; if (ap > EPS && ap >= mtl_ap) { @@ -415,7 +416,7 @@ bool CBulletManager::ObjectHit(SBullet_Hit* hit_res, SBullet* bullet, const Fvec int bullet_state = 0; #endif - if (fsimilar(mtl_ap, 0.0f)) //Если материал полностью простреливаемый (кусты) + if (fsimilar(mtl_ap, 0.0f)) //Если материал полностью простреливаемый (кусты) { #ifdef DEBUG bullet_state = 2; @@ -439,7 +440,7 @@ bool CBulletManager::ObjectHit(SBullet_Hit* hit_res, SBullet* bullet, const Fvec random_dir(tgt_dir, new_dir, deg2rad(10.0f)); float ricoshet_factor = bullet->dir.dotproduct(tgt_dir); - float f = Random.randF(0.5f, 0.8f); //(0.5f,1.f); + float f = Random.randF(0.5f, 0.8f); //(0.5f,1.f); if ((f < ricoshet_factor) && !mtl->Flags.test(SGameMtl::flNoRicoshet) && bullet->flags.allow_ricochet) { // уменьшение скорости полета в зависимости от угла падения пули (чем прямее угол, тем больше потеря) bullet->flags.allow_ricochet = 0; @@ -468,9 +469,9 @@ bool CBulletManager::ObjectHit(SBullet_Hit* hit_res, SBullet* bullet, const Fvec else { //пробивание материала - speed_scale = shoot_factor; // mtl->fShootFactor; + speed_scale = shoot_factor; // mtl->fShootFactor; - bullet->bullet_pos.mad(bullet->bullet_pos, bullet->dir, EPS); // fake + bullet->bullet_pos.mad(bullet->bullet_pos, bullet->dir, EPS); // fake //ввести коэффициент случайности при простреливании Fvector rand_normal; rand_normal.random_dir(bullet->dir, deg2rad(2.0f), Random); diff --git a/src/xrGame/Level_input.cpp b/src/xrGame/Level_input.cpp index da67e7621aa..11eec73afd1 100644 --- a/src/xrGame/Level_input.cpp +++ b/src/xrGame/Level_input.cpp @@ -49,7 +49,7 @@ void CLevel::IR_OnMouseWheel(int direction) if (Device.Paused() #ifdef DEBUG && !psActorFlags.test(AF_NO_CLIP) -#endif // DEBUG +#endif // DEBUG ) return; @@ -81,7 +81,7 @@ void CLevel::IR_OnMouseMove(int dx, int dy) if (Device.Paused() && !IsDemoPlay() #ifdef DEBUG && !psActorFlags.test(AF_NO_CLIP) -#endif // DEBUG +#endif // DEBUG ) return; if (CURRENT_ENTITY()) { @@ -106,7 +106,7 @@ void CLevel::IR_OnKeyboardPress(int key) #ifdef INGAME_EDITOR if (Device.editor() && (pInput->iGetAsyncKeyState(DIK_LALT) || pInput->iGetAsyncKeyState(DIK_RALT))) return; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR bool b_ui_exist = (!!CurrentGameUI()); @@ -115,14 +115,14 @@ void CLevel::IR_OnKeyboardPress(int key) if (_curr == kPAUSE) { #ifdef INGAME_EDITOR if (Device.editor()) return; -#endif // INGAME_EDITOR +#endif // INGAME_EDITOR if (!g_block_pause && (IsGameTypeSingle() || IsDemoPlay())) { #ifdef DEBUG if (psActorFlags.test(AF_NO_CLIP)) Device.Pause(!Device.Paused(), TRUE, TRUE, "li_pause_key_no_clip"); else -#endif // DEBUG +#endif // DEBUG Device.Pause(!Device.Paused(), TRUE, TRUE, "li_pause_key"); } return; @@ -145,7 +145,7 @@ void CLevel::IR_OnKeyboardPress(int key) case kQUIT: { if (b_ui_exist && CurrentGameUI()->TopInputReceiver()) { - if (CurrentGameUI()->IR_UIOnKeyboardPress(key)) return; // special case for mp and main_menu + if (CurrentGameUI()->IR_UIOnKeyboardPress(key)) return; // special case for mp and main_menu CurrentGameUI()->TopInputReceiver()->HideDialog(); } else @@ -164,7 +164,7 @@ void CLevel::IR_OnKeyboardPress(int key) if (Device.Paused() && !IsDemoPlay() #ifdef DEBUG && !psActorFlags.test(AF_NO_CLIP) -#endif // DEBUG +#endif // DEBUG ) return; @@ -179,7 +179,7 @@ void CLevel::IR_OnKeyboardPress(int key) FS.get_path("$game_config$")->m_Flags.set(FS_Path::flNeedRescan, TRUE); FS.get_path("$game_scripts$")->m_Flags.set(FS_Path::flNeedRescan, TRUE); FS.rescan_pathes(); -#endif // DEBUG +#endif // DEBUG string_path saved_game, command; strconcat(sizeof(saved_game), saved_game, Core.UserName, " - ", "quicksave"); if (!CSavedGameWrapper::valid_saved_game(saved_game)) return; @@ -211,9 +211,9 @@ void CLevel::IR_OnKeyboardPress(int key) #ifdef DEBUG if (!m_bEnvPaused) SetEnvironmentGameTimeFactor(GetEnvironmentGameTime(), g_fTimeFactor); -#else // DEBUG +#else // DEBUG SetEnvironmentGameTimeFactor(GetEnvironmentGameTime(), g_fTimeFactor); -#endif // DEBUG +#endif // DEBUG break; } @@ -224,9 +224,9 @@ void CLevel::IR_OnKeyboardPress(int key) SetGameTimeFactor(1000.f); #ifdef DEBUG if (!m_bEnvPaused) SetEnvironmentGameTimeFactor(GetEnvironmentGameTime(), 1000.f); -#else // DEBUG +#else // DEBUG SetEnvironmentGameTimeFactor(GetEnvironmentGameTime(), 1000.f); -#endif // DEBUG +#endif // DEBUG break; } @@ -242,7 +242,7 @@ void CLevel::IR_OnKeyboardPress(int key) m_bEnvPaused = !m_bEnvPaused; break; } -#endif // DEBUG +#endif // DEBUG case DIK_NUMPAD5: { if (GameID() != eGameIDSingle) { @@ -416,9 +416,9 @@ void CLevel::IR_OnKeyboardPress(int key) // m_bSynchronization = false; // } // return; -#endif // DEBUG +#endif // DEBUG } -#endif // MASTER_GOLD +#endif // MASTER_GOLD if (bindConsoleCmds.execute(key)) return; @@ -444,7 +444,7 @@ void CLevel::IR_OnKeyboardRelease(int key) if (Device.Paused() #ifdef DEBUG && !psActorFlags.test(AF_NO_CLIP) -#endif // DEBUG +#endif // DEBUG ) return; @@ -480,13 +480,13 @@ void CLevel::IR_OnKeyboardHold(int key) } } -#endif // DEBUG +#endif // DEBUG if (CurrentGameUI() && CurrentGameUI()->IR_UIOnKeyboardHold(key)) return; if (Device.Paused() && !Level().IsDemoPlay() #ifdef DEBUG && !psActorFlags.test(AF_NO_CLIP) -#endif // DEBUG +#endif // DEBUG ) return; if (CURRENT_ENTITY()) { diff --git a/src/xrGame/Level_load.cpp b/src/xrGame/Level_load.cpp index 05ad7ca6c7a..074cef28069 100644 --- a/src/xrGame/Level_load.cpp +++ b/src/xrGame/Level_load.cpp @@ -53,7 +53,7 @@ bool CLevel::Load_GameSpecific_After() ver = OBJ->r_u32(); #ifndef MASTER_GOLD Msg("PS new version, %d", ver); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD continue; } } diff --git a/src/xrGame/Level_network.cpp b/src/xrGame/Level_network.cpp index 9de14832e8e..c28d9047bbf 100644 --- a/src/xrGame/Level_network.cpp +++ b/src/xrGame/Level_network.cpp @@ -56,7 +56,7 @@ void CLevel::remove_objects() Objects.Update(false); #ifdef DEBUG Msg("Update objects list..."); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG Objects.dump_all_objects(); } @@ -90,7 +90,7 @@ void CLevel::remove_objects() #ifdef DEBUG if (!g_dedicated_server) if (!client_spawn_manager().registry().empty()) client_spawn_manager().dump(); -#endif // DEBUG +#endif // DEBUG if (!g_dedicated_server) { VERIFY(client_spawn_manager().registry().empty()); client_spawn_manager().clear(); @@ -105,7 +105,7 @@ void CLevel::remove_objects() #ifdef DEBUG extern void show_animation_stats(); -#endif // DEBUG +#endif // DEBUG extern CUISequencer* g_tutorial; extern CUISequencer* g_tutorial2; @@ -128,10 +128,10 @@ void CLevel::net_Stop() if (m_file_transfer) xr_delete(m_file_transfer); - if (IsDemoPlay() && m_current_spectator) // destroying demo spectator ... + if (IsDemoPlay() && m_current_spectator) // destroying demo spectator ... { m_current_spectator->setDestroy(TRUE); - SetControlEntity(NULL); // m_current_spectator == CurrentControlEntity() + SetControlEntity(NULL); // m_current_spectator == CurrentControlEntity() m_current_spectator = NULL; } else if (IsDemoSave() && !IsDemoInfoSaved()) @@ -154,7 +154,7 @@ void CLevel::net_Stop() #ifdef DEBUG show_animation_stats(); -#endif // DEBUG +#endif // DEBUG } void CLevel::ClientSend() @@ -175,7 +175,7 @@ void CLevel::ClientSend() P.w_begin(M_CL_UPDATE); P.w_u16(u16(pObj->ID())); - P.w_u32(0); // reserved place for client's ping + P.w_u32(0); // reserved place for client's ping pObj->net_Export(P); @@ -309,7 +309,7 @@ struct _NetworkProcessor : public pureFrame pureFrame* g_pNetProcessor = &NET_processor; -const int ConnectionTimeOut = 60000; // 1 min +const int ConnectionTimeOut = 60000; // 1 min bool CLevel::Connect2Server(const char* options) { @@ -396,7 +396,7 @@ void CLevel::OnBuildVersionChallenge() Msg("* Sending auth value ..."); #else u64 auth = FS.auth_get(); -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG P.w_u64(auth); SecureSend(P, net_flags(TRUE, TRUE, TRUE, TRUE)); }; @@ -416,23 +416,23 @@ void CLevel::OnConnectResult(NET_Packet* P) m_bConnectResult = false; switch (res1) { - case ecr_data_verification_failed: // Standart error + case ecr_data_verification_failed: // Standart error { if (strstr(ResultStr, "Data verification failed. Cheater?")) MainMenu()->SetErrorDialog(CMainMenu::ErrDifferentVersion); } break; - case ecr_cdkey_validation_failed: // GameSpy CDKey + case ecr_cdkey_validation_failed: // GameSpy CDKey { if (!xr_strcmp(ResultStr, "Invalid CD Key")) - MainMenu()->SetErrorDialog(CMainMenu::ErrCDKeyInvalid); //, ResultStr); + MainMenu()->SetErrorDialog(CMainMenu::ErrCDKeyInvalid); //, ResultStr); if (!xr_strcmp(ResultStr, "CD Key in use")) - MainMenu()->SetErrorDialog(CMainMenu::ErrCDKeyInUse); //, ResultStr); + MainMenu()->SetErrorDialog(CMainMenu::ErrCDKeyInUse); //, ResultStr); if (!xr_strcmp(ResultStr, "Your CD Key is disabled. Contact customer service.")) - MainMenu()->SetErrorDialog(CMainMenu::ErrCDKeyDisabled); //, ResultStr); + MainMenu()->SetErrorDialog(CMainMenu::ErrCDKeyDisabled); //, ResultStr); } break; - case ecr_password_verification_failed: // login+password + case ecr_password_verification_failed: // login+password { MainMenu()->SetErrorDialog(CMainMenu::ErrInvalidPassword); } @@ -462,7 +462,7 @@ void CLevel::OnConnectResult(NET_Packet* P) }; m_sConnectResult = ResultStr; if (IsDemoSave() && result) { - P->r_u8(); // server client or not + P->r_u8(); // server client or not shared_str server_options; P->r_stringZ(server_options); StartSaveDemo(server_options); diff --git a/src/xrGame/Level_network_Demo.cpp b/src/xrGame/Level_network_Demo.cpp index e72fcfa6f1a..1f0690194a3 100644 --- a/src/xrGame/Level_network_Demo.cpp +++ b/src/xrGame/Level_network_Demo.cpp @@ -72,7 +72,7 @@ void CLevel::StartPlayDemo() FS.update_path(demo_msg_path, "$logs$", "dbg_msg.log"); tmp_msg_filter->dbg_set_message_log_file(demo_msg_path); } -#endif //#ifdef MP_LOGGING +#endif //#ifdef MP_LOGGING } void CLevel::RestartPlayDemo() @@ -82,7 +82,7 @@ void CLevel::RestartPlayDemo() return; } if (IsDemoPlayStarted()) { - remove_objects(); // WARNING ! need to be in DemoPlayStarted mode . + remove_objects(); // WARNING ! need to be in DemoPlayStarted mode . // After remove_objects() invokation there where left a serveral (20) UpdateCLs so: #ifdef DEBUG VERIFY(g_pGameLevel); @@ -186,14 +186,14 @@ bool CLevel::LoadPacket(NET_Packet& dest_packet, u32 global_time_delta) m_reader->r(&tmp_hdr, sizeof(DemoPacket)); m_prev_packet_dtime = tmp_hdr.m_time_global_delta; - if (map_data.m_sended_map_name_request ? /// ??? + if (map_data.m_sended_map_name_request ? /// ??? (tmp_hdr.m_time_global_delta <= global_time_delta) : (tmp_hdr.m_time_global_delta < global_time_delta)) { R_ASSERT2(tmp_hdr.m_packet_size < NET_PacketSizeLimit, "bad demo packet"); m_reader->r(dest_packet.B.data, tmp_hdr.m_packet_size); dest_packet.B.count = tmp_hdr.m_packet_size; - dest_packet.timeReceive = tmp_hdr.m_timeReceive; // not used .. + dest_packet.timeReceive = tmp_hdr.m_timeReceive; // not used .. dest_packet.r_pos = 0; if (m_reader->elapsed() <= sizeof(DemoPacket)) { StopPlayDemo(); @@ -229,7 +229,7 @@ void CLevel::SpawnDemoSpectator() specentity->set_name_replace(mp_cl_game->local_player->getName()); specentity->s_flags.assign( M_SPAWN_OBJECT_LOCAL | M_SPAWN_OBJECT_ASPLAYER | - M_SPAWN_OBJECT_PHANTOM); // M_SPAWN_OBJECT_PHANTOM is ONLY to indicate thath this is a fake spectator + M_SPAWN_OBJECT_PHANTOM); // M_SPAWN_OBJECT_PHANTOM is ONLY to indicate thath this is a fake spectator tmp_sv_game->assign_RP(specentity, Level().game->local_player); g_sv_Spawn(specentity); diff --git a/src/xrGame/Level_network_Demo.h b/src/xrGame/Level_network_Demo.h index 278454de58d..717b42e37cd 100644 --- a/src/xrGame/Level_network_Demo.h +++ b/src/xrGame/Level_network_Demo.h @@ -6,7 +6,7 @@ BOOL m_DemoSave = false; BOOL m_DemoSaveStarted = false; u32 m_StartGlobalTime; // XXX nitrocaster: why not CurrentControlEntity* ? -IGameObject* m_current_spectator = nullptr; // in real, this is CurrentControlEntity +IGameObject* m_current_spectator = nullptr; // in real, this is CurrentControlEntity message_filter* m_msg_filter = nullptr; demoplay_control* m_demoplay_control = nullptr; @@ -43,8 +43,8 @@ void RestartPlayDemo(); void StopPlayDemo(); float GetDemoPlayPos() const; // void SetDemoPlayPos(float const pos); -float GetDemoPlaySpeed() const; // Device.time_factor() -void SetDemoPlaySpeed(float const time_factor); // Device.time_factor( +float GetDemoPlaySpeed() const; // Device.time_factor() +void SetDemoPlaySpeed(float const time_factor); // Device.time_factor( message_filter* GetMessageFilter(); demoplay_control* GetDemoPlayControl(); BOOL IsDemoPlay() diff --git a/src/xrGame/Level_network_digest_computer.cpp b/src/xrGame/Level_network_digest_computer.cpp index d1070050c45..967a2dfabeb 100644 --- a/src/xrGame/Level_network_digest_computer.cpp +++ b/src/xrGame/Level_network_digest_computer.cpp @@ -7,7 +7,7 @@ char const* ComputeClientDigest(string128& dest) { string128 cd_key; string128 md5hash; - GetCDKey_FromRegistry(cd_key); // cd_key is not longer than 64 bytes ! + GetCDKey_FromRegistry(cd_key); // cd_key is not longer than 64 bytes ! int cd_keylen = xr_strlen(cd_key); if (!cd_keylen) { dest[0] = 0; diff --git a/src/xrGame/Level_network_map_sync.cpp b/src/xrGame/Level_network_map_sync.cpp index 95532f55c23..9bc39254e30 100644 --- a/src/xrGame/Level_network_map_sync.cpp +++ b/src/xrGame/Level_network_map_sync.cpp @@ -6,7 +6,7 @@ #include "xrEngine/xr_ioconsole.h" #include "xrServerMapSync.h" -static const u32 r_buffer_size = 131072; // 128 Kb +static const u32 r_buffer_size = 131072; // 128 Kb void CLevel::CalculateLevelCrc32() { void* read_buffer = _alloca(r_buffer_size); @@ -43,16 +43,16 @@ bool CLevel::synchronize_map_data() #ifndef MASTER_GOLD Msg("* synchronizing map data..."); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD map_data.CheckToSendMapSync(); #ifdef DEBUG Msg("--- Waiting for server map name..."); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG ClientReceive(); - if ((map_data.m_wait_map_time >= 1000) && (!map_data.m_map_sync_received) && !IsDemoPlay()) // about 5 seconds + if ((map_data.m_wait_map_time >= 1000) && (!map_data.m_map_sync_received) && !IsDemoPlay()) // about 5 seconds { Msg("Wait map data time out: reconnecting..."); MakeReconnect(); @@ -74,7 +74,7 @@ bool CLevel::synchronize_map_data() } if (map_data.IsInvalidClientChecksum()) { connected_to_server = FALSE; - return false; //!!! + return false; //!!! } return synchronize_client(); } @@ -96,11 +96,11 @@ bool CLevel::synchronize_client() } #ifdef DEBUG Msg("--- Waiting for server configuration..."); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (Server) { ClientReceive(); Server->Update(); - } // if OnClient ClientReceive method called in upper invokation + } // if OnClient ClientReceive method called in upper invokation // Sleep(5); return !!game_configured; } diff --git a/src/xrGame/Level_network_map_sync.h b/src/xrGame/Level_network_map_sync.h index 1d9abff83f6..aeb82b3e28e 100644 --- a/src/xrGame/Level_network_map_sync.h +++ b/src/xrGame/Level_network_map_sync.h @@ -6,8 +6,8 @@ struct LevelMapSyncData bool m_sended_map_name_request; bool m_map_sync_received; bool m_map_loaded; - shared_str m_name; // map name that currently loaded - shared_str m_map_version; // map version that currently loaded + shared_str m_name; // map name that currently loaded + shared_str m_map_version; // map version that currently loaded shared_str m_map_download_url; u32 m_level_geom_crc32; @@ -32,6 +32,6 @@ struct LevelMapSyncData void ReceiveServerMapSync(NET_Packet& P); inline bool IsInvalidMapOrVersion() { return invalid_map_or_version; } inline bool IsInvalidClientChecksum() { return invalid_geom_checksum; } -}; // class LevelMapSyncData +}; // class LevelMapSyncData #endif \ No newline at end of file diff --git a/src/xrGame/Level_network_messages.cpp b/src/xrGame/Level_network_messages.cpp index 2b5fb7cce3d..8fe7b6332fb 100644 --- a/src/xrGame/Level_network_messages.cpp +++ b/src/xrGame/Level_network_messages.cpp @@ -79,7 +79,7 @@ void CLevel::ClientReceive() { case M_SPAWN: { - if (!bReady) //! m_bGameConfigStarted || + if (!bReady) //! m_bGameConfigStarted || { Msg("! Unconventional M_SPAWN received : map_data[%s] | bReady[%s] | deny_m_spawn[%s]", (map_data.m_map_sync_received) ? "true" : "false", (bReady) ? "true" : "false", @@ -240,18 +240,18 @@ void CLevel::ClientReceive() case M_SV_CONFIG_FINISHED: { game_configured = TRUE; #ifdef DEBUG Msg("- Game configuring : Finished "); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (IsDemoPlayStarted() && !m_current_spectator) { SpawnDemoSpectator(); } } break; - case M_MIGRATE_DEACTIVATE: // TO: Changing server, just deactivate + case M_MIGRATE_DEACTIVATE: // TO: Changing server, just deactivate { NODEFAULT; } break; - case M_MIGRATE_ACTIVATE: // TO: Changing server, full state + case M_MIGRATE_ACTIVATE: // TO: Changing server, full state { NODEFAULT; } @@ -285,7 +285,7 @@ void CLevel::ClientReceive() case M_CHANGE_LEVEL: { #ifdef DEBUG Msg("--- Changing level message received..."); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (m_type == M_LOAD_GAME) { string256 saved_name; P->r_stringZ_s(saved_name); @@ -419,7 +419,7 @@ void CLevel::ClientReceive() if (g_bDebugEvents) ProcessGameEvents(); } break; - case M_STATISTIC_UPDATE_RESPOND: // deprecated, see xrServer::OnMessage + case M_STATISTIC_UPDATE_RESPOND: // deprecated, see xrServer::OnMessage { /*Msg("--- CL: On Update Respond"); if (!game) break; diff --git a/src/xrGame/Level_network_spawn.cpp b/src/xrGame/Level_network_spawn.cpp index 8eabb122b16..df89f30fda3 100644 --- a/src/xrGame/Level_network_spawn.cpp +++ b/src/xrGame/Level_network_spawn.cpp @@ -76,7 +76,7 @@ void CLevel::g_cl_Spawn(LPCSTR name, u8 rp, u16 flags, Fvector pos) extern Flags32 psAI_Flags; extern float debug_on_frame_gather_stats_frequency; #include "ai_debug.h" -#endif // DEBUG +#endif // DEBUG void CLevel::g_sv_Spawn(CSE_Abstract* E) { @@ -88,8 +88,8 @@ void CLevel::g_sv_Spawn(CSE_Abstract* E) E_mem = Memory.mem_usage(); Memory.stat_calls = 0; } -#endif // DEBUG_MEMORY_MANAGER - //----------------------------------------------------------------- +#endif // DEBUG_MEMORY_MANAGER + //----------------------------------------------------------------- // CTimer T(false); #ifdef DEBUG @@ -110,7 +110,7 @@ void CLevel::g_sv_Spawn(CSE_Abstract* E) // T.Start (); #ifdef DEBUG_MEMORY_MANAGER mem_alloc_gather_stats(false); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER if (0 == O || (!O->net_Spawn(E))) { O->net_Destroy(); if (!g_dedicated_server) client_spawn_manager().clear(O->ID()); @@ -118,13 +118,13 @@ void CLevel::g_sv_Spawn(CSE_Abstract* E) Msg("! Failed to spawn entity '%s'", *E->s_name); #ifdef DEBUG_MEMORY_MANAGER mem_alloc_gather_stats(!!psAI_Flags.test(aiDebugOnFrameAllocs)); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER } else { #ifdef DEBUG_MEMORY_MANAGER mem_alloc_gather_stats(!!psAI_Flags.test(aiDebugOnFrameAllocs)); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER if (!g_dedicated_server) client_spawn_manager().callback(O); // Msg ("--spawn--SPAWN: %f ms",1000.f*T.GetAsync()); @@ -132,7 +132,7 @@ void CLevel::g_sv_Spawn(CSE_Abstract* E) if (IsDemoPlayStarted()) { if (E->s_flags.is(M_SPAWN_OBJECT_PHANTOM)) { SetControlEntity(O); - SetEntity(O); // do not switch !!! + SetEntity(O); // do not switch !!! SetDemoSpectator(O); } } @@ -143,7 +143,7 @@ void CLevel::g_sv_Spawn(CSE_Abstract* E) if (pGO) pGO->On_B_NotCurrentEntity(); } SetControlEntity(O); - SetEntity(O); // do not switch !!! + SetEntity(O); // do not switch !!! } } @@ -176,7 +176,7 @@ void CLevel::g_sv_Spawn(CSE_Abstract* E) temp.r_seek (0); O->net_Import (temp); } - }*/ //:( + }*/ //:( //--------------------------------------------------------- Game().OnSpawn(O); @@ -187,7 +187,7 @@ void CLevel::g_sv_Spawn(CSE_Abstract* E) lua_gc(ai().script_engine().lua(), LUA_GCCOLLECT, 0); Msg("* %20s : %d bytes, %d ops", *E->s_name, Memory.mem_usage() - E_mem, Memory.stat_calls); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER } CSE_Abstract* CLevel::spawn_item( diff --git a/src/xrGame/Level_network_start_client.cpp b/src/xrGame/Level_network_start_client.cpp index f383dcbb3d0..7e331c1d070 100644 --- a/src/xrGame/Level_network_start_client.cpp +++ b/src/xrGame/Level_network_start_client.cpp @@ -76,18 +76,18 @@ bool CLevel::net_start_client3() LPCSTR level_ver = NULL; LPCSTR download_url = NULL; - if (psNET_direct_connect) // single + if (psNET_direct_connect) // single { shared_str const& server_options = Server->GetConnectOptions(); - level_name = name().c_str(); // Server->level_name (server_options).c_str(); - level_ver = Server->level_version(server_options).c_str(); // 1.0 + level_name = name().c_str(); // Server->level_name (server_options).c_str(); + level_ver = Server->level_version(server_options).c_str(); // 1.0 } - else // multiplayer + else // multiplayer { level_name = get_net_DescriptionData().map_name; level_ver = get_net_DescriptionData().map_version; download_url = get_net_DescriptionData().download_url; - rescan_mp_archives(); // because if we are using psNET_direct_connect, we not download map... + rescan_mp_archives(); // because if we are using psNET_direct_connect, we not download map... } // Determine internal level-ID int level_id = pApp->Level_ID(level_name, level_ver, true); @@ -105,7 +105,7 @@ bool CLevel::net_start_client3() } #ifdef DEBUG Msg("--- net_start_client3: level_id [%d], level_name[%s], level_version[%s]", level_id, level_name, level_ver); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG map_data.m_name = level_name; map_data.m_map_version = level_ver; map_data.m_map_download_url = download_url; @@ -232,7 +232,7 @@ bool CLevel::net_start_client6() #ifdef DEBUG Msg("--- net_start_client6"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (game) { game->OnConnected(); diff --git a/src/xrGame/Level_secure_messaging.cpp b/src/xrGame/Level_secure_messaging.cpp index fb70288db9b..bbf32dfc2b6 100644 --- a/src/xrGame/Level_secure_messaging.cpp +++ b/src/xrGame/Level_secure_messaging.cpp @@ -5,13 +5,13 @@ void CLevel::OnSecureMessage(NET_Packet& P) { NET_Packet dec_packet; - dec_packet.B.count = P.B.count - sizeof(u16) - sizeof(u32); // - r_begin - crypt_check_sum + dec_packet.B.count = P.B.count - sizeof(u16) - sizeof(u32); // - r_begin - crypt_check_sum P.r(dec_packet.B.data, dec_packet.B.count); u32 checksum = secure_messaging::decrypt(dec_packet.B.data, dec_packet.B.count, m_secret_key); u32 real_checksum = 0; P.r_u32(real_checksum); - VERIFY(checksum == real_checksum); // cheater tries to change incoming data packet - need crash - game_events->insert(dec_packet); // if checksum != real_checksum will be delayed crash ... + VERIFY(checksum == real_checksum); // cheater tries to change incoming data packet - need crash + game_events->insert(dec_packet); // if checksum != real_checksum will be delayed crash ... } void CLevel::OnSecureKeySync(NET_Packet& P) @@ -22,7 +22,7 @@ void CLevel::OnSecureKeySync(NET_Packet& P) NET_Packet ack_key; ack_key.w_begin(M_SECURE_KEY_SYNC); - ack_key.w_s32(new_seed); // this parameter only for DEBUG ! + ack_key.w_s32(new_seed); // this parameter only for DEBUG ! Send(ack_key, net_flags(TRUE, TRUE, TRUE)); } diff --git a/src/xrGame/Level_start.cpp b/src/xrGame/Level_start.cpp index f58b7d104d3..c2cb26b5f1b 100644 --- a/src/xrGame/Level_start.cpp +++ b/src/xrGame/Level_start.cpp @@ -250,7 +250,7 @@ bool CLevel::net_start6() MainMenu()->SwitchToMultiplayerMenu(); } else if (!map_data.m_map_loaded && map_data.m_name.size() && - m_bConnectResult) // if (map_data.m_name == "") - level not loaded, see CLevel::net_start_client3 + m_bConnectResult) // if (map_data.m_name == "") - level not loaded, see CLevel::net_start_client3 { LPCSTR level_id_string = NULL; LPCSTR dialog_string = NULL; @@ -313,7 +313,7 @@ void CLevel::InitializeClientGame(NET_Packet& P) xr_delete(game); #ifdef DEBUG Msg("- Game configuring : Started "); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG CLASS_ID clsid = game_GameState::getCLASS_ID(game_type_name, false); game = smart_cast(NEW_INSTANCE(clsid)); game->set_type_name(game_type_name); diff --git a/src/xrGame/MPPlayersBag.cpp b/src/xrGame/MPPlayersBag.cpp index a6fd1674a79..dba26e3ca58 100644 --- a/src/xrGame/MPPlayersBag.cpp +++ b/src/xrGame/MPPlayersBag.cpp @@ -26,7 +26,7 @@ void CMPPlayersBag::OnEvent(NET_Packet& P, u16 type) #ifdef MP_LOGGING Msg("--- Rukzak [%d] takes [%d][%s]", ID(), O->ID(), O->cNameSect().c_str()); -#endif // MP_LOGGING +#endif // MP_LOGGING O->H_SetParent(this); O->Position().set(Position()); @@ -39,7 +39,7 @@ void CMPPlayersBag::OnEvent(NET_Packet& P, u16 type) #ifdef MP_LOGGING Msg("--- Rukzak [%d] rejects [%d][%s]", ID(), O->ID(), O->cNameSect().c_str()); -#endif // MP_LOGGING +#endif // MP_LOGGING O->H_SetParent(0, !P.r_eof() && P.r_u8()); } diff --git a/src/xrGame/MainMenu.cpp b/src/xrGame/MainMenu.cpp index 12132eaa367..801ad06c74f 100644 --- a/src/xrGame/MainMenu.cpp +++ b/src/xrGame/MainMenu.cpp @@ -204,7 +204,7 @@ void CMainMenu::Activate(bool bActivate) Device.seqRender.Remove(g_pGameLevel); CCameraManager::ResetPP(); }; - Device.seqRender.Add(this, 4); // 1-console 2-cursor 3-tutorial + Device.seqRender.Add(this, 4); // 1-console 2-cursor 3-tutorial Console->Execute("stat_memory"); } diff --git a/src/xrGame/MainMenu.h b/src/xrGame/MainMenu.h index 467688c9716..0cb54d14807 100644 --- a/src/xrGame/MainMenu.h +++ b/src/xrGame/MainMenu.h @@ -21,12 +21,12 @@ namespace gamespy_gp class account_manager; class login_manager; -} // namespace gamespy_gp +} // namespace gamespy_gp namespace gamespy_profile { class profile_store; class stats_submitter; -} // namespace gamespy_profile +} // namespace gamespy_profile class atlas_submit_queue; diff --git a/src/xrGame/MathUtils.cpp b/src/xrGame/MathUtils.cpp index 121ec4214e1..ead18fcd700 100644 --- a/src/xrGame/MathUtils.cpp +++ b/src/xrGame/MathUtils.cpp @@ -72,22 +72,22 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float v_smag = v.square_magnitude(); const float sq_r = r * r; - if (sq_sin < EPS) // paralel + if (sq_sin < EPS) // paralel { float tr1, tr2; - float sq_dist = v_smag - Lr * Lr; // + float sq_dist = v_smag - Lr * Lr; // if (sq_dist > sq_r) return false; float r_dist = _sqrt(sq_r - sq_dist) + h; tr1 = Lr - r_dist; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = Lr + r_dist; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -112,14 +112,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect if (sq_sphere_dist > sq_r) return false; float diff = _sqrt(sq_r - sq_sphere_dist); tr1 = Lr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = Lr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -131,14 +131,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float diff = _sqrt(sq_r - sq_dist); tr1 = Lr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = Lr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -167,27 +167,27 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // float horde=_sqrt(sq_horde) ; float sq_c_diff = sq_horde * sq_cos * r_sq_sin; - float c_diff = _sqrt(sq_c_diff); // ccc + float c_diff = _sqrt(sq_c_diff); // ccc float cp1 = tc - c_diff; float cp2 = tc + c_diff; // cp1 h) { // sphere - float tc_h = tc - h; //!! hi (=)/; + float tc_h = tc - h; //!! hi (=)/; float sq_sphere_dist = sq_sin * tc_h * tc_h; if (sq_sphere_dist > sq_horde) return false; - float tr_c = tr - tc_h * cs; // + float tr_c = tr - tc_h * cs; // float diff = _sqrt(sq_horde - sq_sphere_dist); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -200,20 +200,20 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect if (cp2 < -h) { // sphere lo /(=) - float tc_h = tc + h; //!! + float tc_h = tc + h; //!! float sq_sphere_dist = sq_sin * tc_h * tc_h; if (sq_sphere_dist > sq_horde) return false; - float tr_c = tr - tc_h * cs; //!! + float tr_c = tr - tc_h * cs; //!! float diff = _sqrt(sq_horde - sq_sphere_dist); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -230,14 +230,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // cylinder (=/=) float diff = c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -252,7 +252,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // mixed//cyl hi sphere (=/) float diff = c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -264,7 +264,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sphere_dist); tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -275,18 +275,18 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect return true; } } - else // cp1<=-h + else // cp1<=-h { if (cp2 < h) { // mixed//lo sphere cyl (/=) - float tc_h = tc + h; //(tc-(-h)) + float tc_h = tc + h; //(tc-(-h)) float sq_sphere_dist = sq_sin * tc_h * tc_h; // if(sq_sphere_dist>sq_horde)return false; float diff = _sqrt(sq_horde - sq_sphere_dist); float tr_c = tr - tc_h * cs; tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -294,7 +294,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect { float diff = c_diff / cs; tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -313,7 +313,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -341,14 +341,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // cylinder float diff = -c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -359,13 +359,13 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect return true; } else - { // cp1>-h&&cp2>h + { // cp1>-h&&cp2>h - float tc_h = tc - h; // hi sphere/cyl + float tc_h = tc - h; // hi sphere/cyl float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -373,7 +373,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect { diff = -c_diff / cs; tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -384,13 +384,13 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect return true; } } - else // cp1<-h + else // cp1<-h { if (cp2 < h) { // cyl/lo sphere float diff = -c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -401,7 +401,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -411,7 +411,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect R = tr1; return true; } - else // cp2>=h + else // cp2>=h { //-(--)- //sphere hi&&lo @@ -419,7 +419,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // ///////////////////////////////////////////// if (tr1 < 0.f) { if (bCull) @@ -430,7 +430,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect tr_c = tr - tc_h * cs; diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -459,38 +459,38 @@ void capped_cylinder_ray_collision_test() R = 3; // inside - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // false , + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // false , dir.set(0, 0, 1); - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // false + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // false // outside pos.set(-3, 0, 0); dir.set(1, 0, 0); R = 4; - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // true , 2 + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // true , 2 R = 1; - RAYvsCYLINDER(c, pos, dir, R, FALSE); // false + RAYvsCYLINDER(c, pos, dir, R, FALSE); // false pos.set(0, 0, -3); dir.set(0, 0, 1); R = 4; - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, 1 + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, 1 pos.set(-3, -3, -3); dir.set(1, 1, 1); dir.normalize(); R = 10; - RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, ? + RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, ? float ir[2]; c.intersect(pos, dir, ir); // pos.set(0, 0, 0); - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true, ? + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true, ? c.intersect(pos, dir, ir); - RAYvsCYLINDER(c, pos, dir, R, TRUE); // false + RAYvsCYLINDER(c, pos, dir, R, TRUE); // false CTimer t; t.Start(); for (int i = 0; i < 1000000; i++) @@ -517,7 +517,7 @@ void capped_cylinder_ray_collision_test() c.m_height = Random.randF(0.2f, 2.f); c.m_radius = Random.randF(0.1f, 2.f); // ray - Fvector dir, pos; // float R=Random.randF(0.1f,2.f); + Fvector dir, pos; // float R=Random.randF(0.1f,2.f); dir.random_dir(); pos.random_point(Fvector().set(2, 2, 2)); c.intersect(pos, dir, ir); diff --git a/src/xrGame/MathUtils.h b/src/xrGame/MathUtils.h index f9b14387edc..9fadb70fbf1 100644 --- a/src/xrGame/MathUtils.h +++ b/src/xrGame/MathUtils.h @@ -47,7 +47,7 @@ ICF void accurate_normalize(float* a) goto aa2_largest; } else - { // aa1 is largest + { // aa1 is largest a0 /= aa1; a2 /= aa1; l = dRecipSqrt(a0 * a0 + a2 * a2 + 1); @@ -59,7 +59,7 @@ ICF void accurate_normalize(float* a) else { if (aa2 > aa0) { - aa2_largest: // aa2 is largest + aa2_largest: // aa2 is largest a0 /= aa2; a1 /= aa2; l = dRecipSqrt(a0 * a0 + a1 * a1 + 1); @@ -68,11 +68,11 @@ ICF void accurate_normalize(float* a) a[2] = (float)_copysign(l, a2); } else - { // aa0 is largest + { // aa0 is largest if (aa0 <= 0) { // dDEBUGMSG ("vector has zero size"); ... this messace is annoying - a[0] = 1; // if all a's are zero, this is where we'll end up. - a[1] = 0; // return a default unit length vector. + a[0] = 1; // if all a's are zero, this is where we'll end up. + a[1] = 0; // return a default unit length vector. a[2] = 0; return; } @@ -201,13 +201,13 @@ IC void dVectorMul(dReal* res, const dReal* av, float mt) res[1] = av[1] * mt; res[2] = av[2] * mt; } -IC void dVectorInterpolate(dReal* v, dReal* to, float k) // changes to +IC void dVectorInterpolate(dReal* v, dReal* to, float k) // changes to { dVectorMul(v, 1.f - k); dVectorMul(to, k); dVectorAdd(v, to); } -IC void dVectorInterpolate(dReal* res, const dReal* from, const dReal* to, float k) // changes to +IC void dVectorInterpolate(dReal* res, const dReal* from, const dReal* to, float k) // changes to { dVector3 tov; dVectorSet(res, from); @@ -266,7 +266,7 @@ IC void twoq_2w(const Fquaternion& q1, const Fquaternion& q2, float dt, Fvector& Fvector v1, v2; v1.set(q1.x, q1.y, q1.z); v2.set(q2.x, q2.y, q2.z); - float cosinus = q1.w * q2.w + v1.dotproduct(v2); // q1.w*q2.w+ q1.v.dotproduct(q2.v) + float cosinus = q1.w * q2.w + v1.dotproduct(v2); // q1.w*q2.w+ q1.v.dotproduct(q2.v) w.crossproduct(v1, v2); // //the signum must be inverted ? v1.mul(q2.w); @@ -570,7 +570,7 @@ IC bool valid_pos(const Fvector& P, const Fbox& B) } #ifdef DEBUG -const float DET_CHECK_EPS = 0.15f; // scale -35% !? ;) +const float DET_CHECK_EPS = 0.15f; // scale -35% !? ;) #define VERIFY_RMATRIX(M) \ { \ float d = DET(M); \ diff --git a/src/xrGame/Message_Filter.cpp b/src/xrGame/Message_Filter.cpp index 0484c996276..0cc3f089c07 100644 --- a/src/xrGame/Message_Filter.cpp +++ b/src/xrGame/Message_Filter.cpp @@ -46,7 +46,7 @@ void message_filter::msg_type_subtype_t::import(NET_Packet& packet) case M_GAMEMESSAGE: { packet.r_u32(msg_subtype); } break; - }; // switch (msg_type) + }; // switch (msg_type) } void message_filter::check_new_data(NET_Packet& packet) @@ -129,7 +129,7 @@ void message_filter::dbg_print_msg(NET_Packet& packet, msg_type_subtype_t const& xr_sprintf(tmp_string, "--- CL_EVENT [%7u][%5u]: EVENT_ID=[%d]", msg_type.msg_receive_time, msg_type.dest_obj_id, msg_type.msg_subtype); }; - }; // switch (mtype.msg_subtype) + }; // switch (mtype.msg_subtype) } break; case M_EVENT_PACK: { FATAL("can't print M_EVENT_PACK message"); @@ -181,7 +181,7 @@ void message_filter::dbg_print_msg(NET_Packet& packet, msg_type_subtype_t const& break; default: { xr_sprintf(tmp_string, "--- MESSAGE_ID[%u] [%7u]", msg_type.msg_type, msg_type.msg_receive_time); }; - }; // switch (m_type) + }; // switch (m_type) if (!xr_strcmp(tmp_string, m_last_string)) { ++m_strrepeat_count; return; diff --git a/src/xrGame/Message_Filter.h b/src/xrGame/Message_Filter.h index 5e48c441a40..063761f3537 100644 --- a/src/xrGame/Message_Filter.h +++ b/src/xrGame/Message_Filter.h @@ -49,6 +49,6 @@ class message_filter IWriter* m_msg_log_file; string256 m_last_string; u32 m_strrepeat_count; -}; // class message_filter +}; // class message_filter -#endif //#ifndef DEMO_MESSAGE_FILER \ No newline at end of file +#endif //#ifndef DEMO_MESSAGE_FILER \ No newline at end of file diff --git a/src/xrGame/Mincer.cpp b/src/xrGame/Mincer.cpp index 99db908b3d8..79aa36e46f6 100644 --- a/src/xrGame/Mincer.cpp +++ b/src/xrGame/Mincer.cpp @@ -113,7 +113,7 @@ void CMincer::Center(Fvector& C) const void CMincer::NotificateDestroy(CPHDestroyableNotificate* dn) { Fvector dir; - float power = 0.0f; // can change + float power = 0.0f; // can change float impulse; // if(!m_telekinetics.has_impacts()) return; diff --git a/src/xrGame/Missile.cpp b/src/xrGame/Missile.cpp index 8e30de36e40..2cbbf518c1c 100644 --- a/src/xrGame/Missile.cpp +++ b/src/xrGame/Missile.cpp @@ -437,7 +437,7 @@ void CMissile::Throw() { #ifndef MASTER_GOLD Msg("throw [%d]", Device.dwFrame); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD VERIFY(smart_cast(H_Parent())); setup_throw_params(); @@ -556,7 +556,7 @@ void CMissile::UpdateFireDependencies_internal() UpdateXForm(); if (GetHUDmode() && !IsHidden()) { - R_ASSERT(0); // implement this!!! + R_ASSERT(0); // implement this!!! /* // 1st person view - skeletoned CKinematics* V = smart_cast(GetHUD()->Visual()); @@ -652,7 +652,7 @@ void CMissile::setup_physic_shell() { R_ASSERT(!m_pPhysicsShell); create_physic_shell(); - m_pPhysicsShell->Activate(XFORM(), 0, XFORM()); //,true + m_pPhysicsShell->Activate(XFORM(), 0, XFORM()); //,true IKinematics* kinematics = smart_cast(Visual()); R_ASSERT(kinematics); kinematics->CalculateBones_Invalidate(); diff --git a/src/xrGame/NET_Queue.h b/src/xrGame/NET_Queue.h index ca798d95133..9cd2f844a5c 100644 --- a/src/xrGame/NET_Queue.h +++ b/src/xrGame/NET_Queue.h @@ -18,7 +18,7 @@ class NET_Event void import(NET_Packet& P) { data.clear(); - P.r_begin(ID); // VERIFY(M_EVENT==ID); + P.r_begin(ID); // VERIFY(M_EVENT==ID); switch (ID) { case M_SPAWN: diff --git a/src/xrGame/PHCollisionDamageReceiver.cpp b/src/xrGame/PHCollisionDamageReceiver.cpp index f898e24fea3..81da1f13aeb 100644 --- a/src/xrGame/PHCollisionDamageReceiver.cpp +++ b/src/xrGame/PHCollisionDamageReceiver.cpp @@ -45,15 +45,15 @@ void CPHCollisionDamageReceiver::CollisionHit(u16 source_id, u16 bone_id, float CPhysicsShellHolder* ph = PPhysicsShellHolder(); SHit HS; - HS.GenHeader(GE_HIT, ph->ID()); // ph->u_EventGen(P,GE_HIT,ph->ID()); - HS.whoID = ph->ID(); // P.w_u16 (ph->ID()); - HS.weaponID = source_id; // P.w_u16 (source_id); - HS.dir = dir; // P.w_dir (dir); - HS.power = power; // P.w_float (power); - HS.boneID = s16(bone_id); // P.w_s16 (s16(bone_id)); - HS.p_in_bone_space = pos; // P.w_vec3 (pos); - HS.impulse = 0.f; // P.w_float (0.f); - HS.hit_type = (ALife::eHitTypeStrike); // P.w_u16 (ALife::eHitTypeStrike); + HS.GenHeader(GE_HIT, ph->ID()); // ph->u_EventGen(P,GE_HIT,ph->ID()); + HS.whoID = ph->ID(); // P.w_u16 (ph->ID()); + HS.weaponID = source_id; // P.w_u16 (source_id); + HS.dir = dir; // P.w_dir (dir); + HS.power = power; // P.w_float (power); + HS.boneID = s16(bone_id); // P.w_s16 (s16(bone_id)); + HS.p_in_bone_space = pos; // P.w_vec3 (pos); + HS.impulse = 0.f; // P.w_float (0.f); + HS.hit_type = (ALife::eHitTypeStrike); // P.w_u16 (ALife::eHitTypeStrike); HS.Write_Packet(P); ph->u_EventSend(P); diff --git a/src/xrGame/PHCollisionDamageReceiver.h b/src/xrGame/PHCollisionDamageReceiver.h index 3062ee060eb..7c948832a86 100644 --- a/src/xrGame/PHCollisionDamageReceiver.h +++ b/src/xrGame/PHCollisionDamageReceiver.h @@ -32,6 +32,6 @@ class CPHCollisionDamageReceiver : public ICollisionDamageReceiver return std::find_if(m_controled_bones.begin(), m_controled_bones.end(), SFind(id)); } // static void CollisionCallback (bool& do_colide,bool bo1,dContact& c,SGameMtl* - //material_1,SGameMtl* material_2) ; + // material_1,SGameMtl* material_2) ; void CollisionHit(u16 source_id, u16 bone_id, float power, const Fvector& dir, Fvector& pos); }; diff --git a/src/xrGame/PHDebug.cpp b/src/xrGame/PHDebug.cpp index 73c01c4a13c..6ac78cc255d 100644 --- a/src/xrGame/PHDebug.cpp +++ b/src/xrGame/PHDebug.cpp @@ -865,7 +865,7 @@ void DBG_PhysBones(IGameObject& O) { CPhysicsElement* e = shell->get_ElementByStoreOrder(i); - DBG_DrawMatrix(e->XFORM(), 0.1f); // Fmatrix().mul_43( O.XFORM(),e->XFORM()) + DBG_DrawMatrix(e->XFORM(), 0.1f); // Fmatrix().mul_43( O.XFORM(),e->XFORM()) CPhysicsElement* pE = (e)->parent_element(); if (pE) DBG_DrawLine(e->XFORM().c, pE->XFORM().c, color_xrgb(255, 100, 0)); } @@ -992,11 +992,14 @@ class CPHDebugOutput : public IDebugOutput virtual void DBG_DrawOBB(const Fmatrix& m, const Fvector h, u32 c) { ::DBG_DrawOBB(m, h, c); } virtual void DBG_DrawPoint(const Fvector& p, float size, u32 c) { ::DBG_DrawPoint(p, size, c); } virtual void DBG_DrawMatrix(const Fmatrix& m, float size, u8 a = 255) { ::DBG_DrawMatrix(m, size, a); } - // virtual void DBG_DrawRotationX( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationX( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; - // virtual void DBG_DrawRotationY( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationY( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; - // virtual void DBG_DrawRotationZ( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationZ( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; virtual void _cdecl DBG_OutText(LPCSTR s, ...) { @@ -1021,13 +1024,13 @@ class CPHDebugOutput : public IDebugOutput { return ::dbg_tries_num; // make_string( "%s, _14_=%f \n", dump_string( make_string( "%s.i, ", name ).c_str(), form.i ).c_str( ) , - //form._14_ ) + + // form._14_ ) + // make_string( "%s, _24_=%f \n", dump_string( make_string( "%s.j, ", name ).c_str(), form.j ).c_str( ) , - //form._24_ ) + + // form._24_ ) + // make_string( "%s, _34_=%f \n", dump_string( make_string( "%s.k, ", name ).c_str(), form.k ).c_str( ) , - //form._34_ ) + + // form._34_ ) + // make_string( "%s, _44_=%f \n", dump_string( make_string( "%s.c, ", name ).c_str(), form.c ).c_str( ) , - //form._44_ ); + // form._44_ ); } virtual u32& dbg_saved_tries_for_active_objects() { return ::dbg_saved_tries_for_active_objects; } virtual u32& dbg_total_saved_tries() { return ::dbg_total_saved_tries; } diff --git a/src/xrGame/PHDestroyable.cpp b/src/xrGame/PHDestroyable.cpp index 14cee91b229..aaa3fa4214a 100644 --- a/src/xrGame/PHDestroyable.cpp +++ b/src/xrGame/PHDestroyable.cpp @@ -47,10 +47,10 @@ CPHDestroyable::CPHDestroyable() m_depended_objects = 0; } /////////spawn object representing destroyed -///item////////////////////////////////////////////////////////////////////////////////// +/// item////////////////////////////////////////////////////////////////////////////////// void CPHDestroyable::GenSpawnReplace(u16 ref_id, LPCSTR section, shared_str visual_name) { - CSE_Abstract* D = F_entity_Create(section); //*cNameSect() + CSE_Abstract* D = F_entity_Create(section); //*cNameSect() VERIFY(D); CSE_Visual* V = smart_cast(D); V->set_visual(*visual_name); @@ -60,7 +60,7 @@ void CPHDestroyable::GenSpawnReplace(u16 ref_id, LPCSTR section, shared_str visu // init // Send - D->s_name = section; //*cNameSect() + D->s_name = section; //*cNameSect() D->ID_Parent = u16(-1); InitServerObject(D); if (OnServer()) { @@ -300,7 +300,7 @@ void CPHDestroyable::NotificatePart(CPHDestroyableNotificate* dn) dn->PPhysicsShellHolder()->setVisible(TRUE); dn->PPhysicsShellHolder()->setEnabled(TRUE); - if (own_shell->IsGroupObject()) new_shell->RegisterToCLGroup(own_shell->GetCLGroup()); // CollideBits + if (own_shell->IsGroupObject()) new_shell->RegisterToCLGroup(own_shell->GetCLGroup()); // CollideBits CPHSkeleton* ps = dn->PPhysicsShellHolder()->PHSkeleton(); if (ps) { if (own_ini && own_ini->section_exist("autoremove_parts")) { diff --git a/src/xrGame/PHMovementControl.cpp b/src/xrGame/PHMovementControl.cpp index df0235e5fad..490c73f1686 100644 --- a/src/xrGame/PHMovementControl.cpp +++ b/src/xrGame/PHMovementControl.cpp @@ -103,7 +103,7 @@ static ALife::EHitType DefineCollisionHitType(u16 material_idx) else return ALife::eHitTypeStrike; // return (GameID() == eGameIDSingle) ? ALife::eHitTypeStrike : ALife::eHitTypePhysicStrike; -} // +} // // static Fvector old_pos={0,0,0}; // static bool bFirst=true; @@ -332,7 +332,7 @@ void CPHMovementControl::Calculate( Fvector new_position; m_character->IPosition(new_position); - int index = 0; // nearest point + int index = 0; // nearest point // float distance;//distance bool near_line; @@ -369,7 +369,7 @@ void CPHMovementControl::Calculate( float radius = dif.magnitude() * 2.f; if (m_path_size == 1) { speed = 0.f; - vPosition.set(new_position); // todo - insert it in PathNearestPoint + vPosition.set(new_position); // todo - insert it in PathNearestPoint index = 0; vPathPoint.set(path[0].position); Fvector _d; @@ -395,7 +395,7 @@ void CPHMovementControl::Calculate( m_start_index = 0; PathNearestPoint(path, new_position, index, near_line); } - vPosition.set(new_position); // for PathDirLine && PathDirPoint + vPosition.set(new_position); // for PathDirLine && PathDirPoint if (near_line) PathDIrLine(path, index, m_path_distance, precision, dir); else @@ -472,14 +472,14 @@ void CPHMovementControl::Calculate( // m_character->Reinit(); } -void CPHMovementControl::PathNearestPoint(const xr_vector& path, // in path - const Fvector& new_position, // in position - int& index, // in start from; out nearest - bool& near_line // out type +void CPHMovementControl::PathNearestPoint(const xr_vector& path, // in path + const Fvector& new_position, // in position + int& index, // in start from; out nearest + bool& near_line // out type ) { Fvector from_first, from_second, dir; - bool after_line = true; // to check first point + bool after_line = true; // to check first point Fvector path_point, vtemp; float temp; @@ -492,9 +492,9 @@ void CPHMovementControl::PathNearestPoint(const xr_vector& path, // in path - const Fvector& new_position, // in position - int& index, // in start from; out nearest - float radius, // out m_path_distance in exit radius - bool& near_line // out type +void CPHMovementControl::PathNearestPointFindUp(const xr_vector& path, // in path + const Fvector& new_position, // in position + int& index, // in start from; out nearest + float radius, // out m_path_distance in exit radius + bool& near_line // out type ) { Fvector from_first, from_second, dir; - bool after_line = true; // to check first point + bool after_line = true; // to check first point Fvector path_point, vtemp; float temp; @@ -581,10 +581,10 @@ void CPHMovementControl::PathNearestPointFindUp(const xr_vector radius) break; // exit test + if (temp > radius) break; // exit test after_line = false; } - else // after first + else // after first { - if (from_second_dir < 0.f) // befor second && after first = near line + if (from_second_dir < 0.f) // befor second && after first = near line { vtemp.set(dir); vtemp.mul(from_first_dir); @@ -614,12 +614,12 @@ void CPHMovementControl::PathNearestPointFindUp(const xr_vector radius) break; // exit test + if (temp > radius) break; // exit test } - else // after second = after this line + else // after second = after this line { after_line = true; - if (from_second.magnitude() > radius) break; // exit test + if (from_second.magnitude() > radius) break; // exit test } } } @@ -637,16 +637,15 @@ void CPHMovementControl::PathNearestPointFindUp(const xr_vector& path, // in path - const Fvector& new_position, // in position - int& index, // in start from; out nearest - float radius, // out m_path_distance in exit radius - bool& near_line // out type +void CPHMovementControl::PathNearestPointFindDown(const xr_vector& path, // in path + const Fvector& new_position, // in position + int& index, // in start from; out nearest + float radius, // out m_path_distance in exit radius + bool& near_line // out type ) { Fvector from_first, from_second, dir; - bool after_line = true; // to check first point + bool after_line = true; // to check first point Fvector path_point, vtemp; float temp; @@ -663,10 +662,10 @@ void CPHMovementControl::PathNearestPointFindDown( float from_first_dir = from_first.dotproduct(dir); float from_second_dir = from_second.dotproduct(dir); - if (from_second_dir > 0.f) // befor this line + if (from_second_dir > 0.f) // befor this line { temp = from_second.magnitude(); - if (after_line) // after previous line && befor this line = near second point (going down) + if (after_line) // after previous line && befor this line = near second point (going down) { if (temp < m_path_distance) { m_path_distance = temp; @@ -677,16 +676,16 @@ void CPHMovementControl::PathNearestPointFindDown( } } - if (temp > radius) break; // exit test + if (temp > radius) break; // exit test after_line = false; } - else // after second + else // after second { - if (from_first_dir > 0.f) // after second && before first = near line (going down) + if (from_first_dir > 0.f) // after second && before first = near line (going down) { vtemp.set(dir); vtemp.mul(from_second_dir); - path_point.add(second, vtemp); // from_second_dir <0.f !! + path_point.add(second, vtemp); // from_second_dir <0.f !! vtemp.sub(path_point, new_position); temp = vtemp.magnitude(); if (temp < m_path_distance) { @@ -696,12 +695,12 @@ void CPHMovementControl::PathNearestPointFindDown( SetPathDir(dir); near_line = true; } - if (temp > radius) break; // exit test + if (temp > radius) break; // exit test } - else // after first = after this line(going down) + else // after first = after this line(going down) { after_line = true; - if (from_first.magnitude() > radius) break; // exit test + if (from_first.magnitude() > radius) break; // exit test } } } @@ -752,7 +751,7 @@ void CPHMovementControl::PathDIrLine(const xr_vectorXFORM().k.x, pObject->XFORM().k.z); float R = _abs(poses_dir.dotproduct(plane_i) * cbox.x) + _abs(poses_dir.dotproduct(plane_k) * cbox.z); - R *= poses_dir.dotproduct(plane_cam); //(poses_dir.x*plane_cam.x+poses_dir.y*plane_cam.z); + R *= poses_dir.dotproduct(plane_cam); //(poses_dir.x*plane_cam.x+poses_dir.y*plane_cam.z); Calculate(Fvector().set(0, 0, 0), Fvector().set(1, 0, 0), 0, 0, 0, 0); m_character->SetObjectRadius(R); ach->ChooseRestrictionType(rtStalker, 1.f, m_character); @@ -1698,7 +1697,7 @@ void CPHMovementControl::actor_calculate( void CPHMovementControl::BlockDamageSet(u64 steps_num) { block_damage_step_end = physics_world()->StepsNum() + steps_num; - UpdateCollisionDamage(); // reset all saved values + UpdateCollisionDamage(); // reset all saved values } void CPHMovementControl::NetRelcase(IGameObject* O) diff --git a/src/xrGame/PHMovementControl.h b/src/xrGame/PHMovementControl.h index 2372722b229..f284e12949c 100644 --- a/src/xrGame/PHMovementControl.h +++ b/src/xrGame/PHMovementControl.h @@ -60,9 +60,9 @@ class CPHMovementControl : public IPHMovementControl void BlockDamageSet(u64 steps_num); enum JumpType { - jtStrait, // end point before uppermost point - jtCurved, // end point after uppermost point - jtHigh // end point is uppermost point + jtStrait, // end point before uppermost point + jtCurved, // end point after uppermost point + jtHigh // end point is uppermost point }; void JumpV(const Fvector& jump_velocity); void Jump(const Fvector& start_point, const Fvector& end_point, float time); @@ -72,9 +72,9 @@ class CPHMovementControl : public IPHMovementControl /// bool PhysicsOnlyMode(); void GetJumpMinVelParam(Fvector& min_vel, float& time, JumpType& type, - const Fvector& end_point); // returns vector of velocity of jump with minimal start speed + const Fvector& end_point); // returns vector of velocity of jump with minimal start speed // in min_vel and correspondent jump time in time - float JumpMinVelTime(const Fvector& end_point); // return time of jump with min start speed + float JumpMinVelTime(const Fvector& end_point); // return time of jump with min start speed // input: end_point and time; return velocity and type of jump void GetJumpParam(Fvector& velocity, JumpType& type, const Fvector& end_point, float time); bool b_exect_position; @@ -144,9 +144,9 @@ class CPHMovementControl : public IPHMovementControl bool bExernalImpulse; BOOL bSleep; bool bNonInteractiveMode; - BOOL gcontact_Was; // Приземление - float gcontact_Power; // Насколько сильно ударились - float gcontact_HealthLost; // Скоко здоровья потеряли + BOOL gcontact_Was; // Приземление + float gcontact_Power; // Насколько сильно ударились + float gcontact_HealthLost; // Скоко здоровья потеряли public: void AllocateCharacterObject(CharacterType type); @@ -229,44 +229,44 @@ class CPHMovementControl : public IPHMovementControl bool IsCharacterEnabled(); void DisableCharacter(); void Calculate(Fvector& vAccel, const Fvector& camDir, float ang_speed, float jump, float dt, bool bLight); - void Calculate(const xr_vector& path, // in path - float speed, // in speed - u32& travel_point, // in- travel start, out - current trev point - float& precesition // in- tolerance, out - precesition + void Calculate(const xr_vector& path, // in path + float speed, // in speed + u32& travel_point, // in- travel start, out - current trev point + float& precesition // in- tolerance, out - precesition ); void AddControlVel(const Fvector& vel); void SetVelocityLimit(float val); float VelocityLimit(); - void PathNearestPoint(const xr_vector& path, // in path - const Fvector& new_position, // in position - int& index, // out nearest - bool& type // out type - ); // return nearest point - void PathNearestPointFindUp(const xr_vector& path, // in path - const Fvector& new_position, // in position - int& index, // out nearest - float radius, // in exit radius - bool& near_line // out type + void PathNearestPoint(const xr_vector& path, // in path + const Fvector& new_position, // in position + int& index, // out nearest + bool& type // out type + ); // return nearest point + void PathNearestPointFindUp(const xr_vector& path, // in path + const Fvector& new_position, // in position + int& index, // out nearest + float radius, // in exit radius + bool& near_line // out type ); - void PathNearestPointFindDown(const xr_vector& path, // in path - const Fvector& new_position, // in position - int& index, // out nearest - float radius, // in exit radius - bool& near_line // out type + void PathNearestPointFindDown(const xr_vector& path, // in path + const Fvector& new_position, // in position + int& index, // out nearest + float radius, // in exit radius + bool& near_line // out type ); - void PathDIrPoint(const xr_vector& path, // in path - int index, // in index - float distance, // in distance - float precesition, // in precesition - Fvector& dir // out dir - ); - void PathDIrLine(const xr_vector& path, // in path - int index, // in point + void PathDIrPoint(const xr_vector& path, // in path + int index, // in index float distance, // in distance float precesition, // in precesition Fvector& dir // out dir ); + void PathDIrLine(const xr_vector& path, // in path + int index, // in point + float distance, // in distance + float precesition, // in precesition + Fvector& dir // out dir + ); void CorrectPathDir(const Fvector& real_path_dir, const xr_vector& path, int index, Fvector& corrected_path_dir); diff --git a/src/xrGame/PHMovementDynamicActivate.cpp b/src/xrGame/PHMovementDynamicActivate.cpp index e7044c0c0c3..4112eabe14a 100644 --- a/src/xrGame/PHMovementDynamicActivate.cpp +++ b/src/xrGame/PHMovementDynamicActivate.cpp @@ -73,7 +73,7 @@ bool CPHMovementControl::ActivateBoxDynamic( trying_times[id] = Device.dwTimeGlobal; // trying_poses[id].set(cast_fv(dBodyGetPosition(m_character->get_body()))); - m_character->GetBodyPosition(trying_poses[id]); //.set(cast_fv(dBodyGetPosition(m_character->get_body()))); + m_character->GetBodyPosition(trying_poses[id]); //.set(cast_fv(dBodyGetPosition(m_character->get_body()))); } else { diff --git a/src/xrGame/PHSkeleton.cpp b/src/xrGame/PHSkeleton.cpp index 065ace1f07e..08559411c14 100644 --- a/src/xrGame/PHSkeleton.cpp +++ b/src/xrGame/PHSkeleton.cpp @@ -131,7 +131,7 @@ void CPHSkeleton::Update(u32 dt) { CPhysicsShellHolder* obj = PPhysicsShellHolder(); CPhysicsShell* pPhysicsShell = obj->PPhysicsShell(); - if (pPhysicsShell && pPhysicsShell->isFractured()) //! ai().get_alife() && + if (pPhysicsShell && pPhysicsShell->isFractured()) //! ai().get_alife() && { PHSplit(); } @@ -263,7 +263,7 @@ void CPHSkeleton::ClearUnsplited() void CPHSkeleton::SpawnCopy() { if (PPhysicsShellHolder()->Local()) { - CSE_Abstract* D = F_entity_Create("ph_skeleton_object"); //*cNameSect() + CSE_Abstract* D = F_entity_Create("ph_skeleton_object"); //*cNameSect() R_ASSERT(D); ///////////////////////////////////////////////////////////////////////////////////////////// CSE_ALifePHSkeletonObject* l_tpALifePhysicObject = smart_cast(D); @@ -294,7 +294,7 @@ void CPHSkeleton::PHSplit() void CPHSkeleton::UnsplitSingle(CPHSkeleton* SO) { // Msg("%o,received has %d,",this,m_unsplited_shels.size()); - if (0 == m_unsplited_shels.size()) return; //. hack + if (0 == m_unsplited_shels.size()) return; //. hack CPhysicsShellHolder* obj = PPhysicsShellHolder(); CPhysicsShellHolder* O = SO->PPhysicsShellHolder(); VERIFY2(m_unsplited_shels.size(), "NO_SHELLS !!"); @@ -307,16 +307,16 @@ void CPHSkeleton::UnsplitSingle(CPHSkeleton* SO) Flags64 mask0, mask1; u16 split_bone = m_unsplited_shels.front().second; - mask1.assign(pKinematics->LL_GetBonesVisible()); // source bones mask + mask1.assign(pKinematics->LL_GetBonesVisible()); // source bones mask pKinematics->LL_SetBoneVisible(split_bone, FALSE, TRUE); pKinematics->CalculateBones_Invalidate(); pKinematics->CalculateBones(TRUE); - mask0.assign(pKinematics->LL_GetBonesVisible()); // first part mask + mask0.assign(pKinematics->LL_GetBonesVisible()); // first part mask VERIFY2(mask0.flags, "mask0 -Zero"); mask0.invert(); - mask1.and (mask0.flags); // second part mask + mask1.and (mask0.flags); // second part mask newKinematics->LL_SetBoneRoot(split_bone); VERIFY2(mask1.flags, "mask1 -Zero"); @@ -358,7 +358,7 @@ void CPHSkeleton::SetAutoRemove(u32 time /*=CSE_PHSkeleton::existence_time*/) PPhysicsShellHolder()->SheduleRegister(); } -static bool removable; // for RecursiveBonesCheck +static bool removable; // for RecursiveBonesCheck void CPHSkeleton::RecursiveBonesCheck(u16 id) { if (!removable) return; @@ -400,12 +400,12 @@ void CPHSkeleton::InitServerObject(CSE_Abstract* D) l_tpALifePhysicObject->source_id = u16(obj->ID()); l_tpALifePhysicObject->startup_animation = m_startup_anim; - D->s_name = "ph_skeleton_object"; //*cNameSect() + D->s_name = "ph_skeleton_object"; //*cNameSect() D->set_name_replace(""); //. D->s_gameid = u8(GameID()); D->s_RP = 0xff; D->ID = 0xffff; - D->ID_Parent = 0xffff; // u16(ID());// + D->ID_Parent = 0xffff; // u16(ID());// D->ID_Phantom = 0xffff; D->o_Position = obj->Position(); if (ai().get_alife()) diff --git a/src/xrGame/PHSkeleton.h b/src/xrGame/PHSkeleton.h index acd850cd0b6..79c782a6d3d 100644 --- a/src/xrGame/PHSkeleton.h +++ b/src/xrGame/PHSkeleton.h @@ -44,12 +44,12 @@ class CPHSkeleton : public CPHDestroyableNotificate virtual void SaveNetState(NET_Packet& P); virtual void RestoreNetState(CSE_PHSkeleton* po); - virtual void InitServerObject(CSE_Abstract* D); // + virtual void InitServerObject(CSE_Abstract* D); // virtual void CopySpawnInit(); - void RespawnInit(); // net_Destroy - bool Spawn(CSE_Abstract* D); // net_spawn - void Update(u32 dt); // shedule update - void Load(LPCSTR section); // client load + void RespawnInit(); // net_Destroy + bool Spawn(CSE_Abstract* D); // net_spawn + void Update(u32 dt); // shedule update + void Load(LPCSTR section); // client load public: void SetAutoRemove(u32 time = existence_time); void SetNotNeedSave(); diff --git a/src/xrGame/ParticlesObject.cpp b/src/xrGame/ParticlesObject.cpp index 781f03b2c9d..3735fa571e6 100644 --- a/src/xrGame/ParticlesObject.cpp +++ b/src/xrGame/ParticlesObject.cpp @@ -169,7 +169,7 @@ void CParticlesObject::shedule_Update(u32 _dt) u32 dt = Device.dwTimeGlobal - dwLastTime; if (dt) { if (0) - { //.psDeviceFlags.test(mtParticles)) { //. AlexMX comment this line// NO UNCOMMENT - DON'T WORK PROPERLY + { //.psDeviceFlags.test(mtParticles)) { //. AlexMX comment this line// NO UNCOMMENT - DON'T WORK PROPERLY mt_dt = dt; fastdelegate::FastDelegate0<> delegate(this, &CParticlesObject::PerformAllTheWork_mt); Device.seqParallel.push_back(delegate); @@ -205,7 +205,7 @@ void CParticlesObject::PerformAllTheWork_mt() { if (g_dedicated_server) return; - if (0 == mt_dt) return; //??? + if (0 == mt_dt) return; //??? IParticleCustom* V = smart_cast(renderable.visual); VERIFY(V); V->OnFrame(mt_dt); diff --git a/src/xrGame/ParticlesObject.h b/src/xrGame/ParticlesObject.h index 9d9d07e424a..5ac1709e7e5 100644 --- a/src/xrGame/ParticlesObject.h +++ b/src/xrGame/ParticlesObject.h @@ -14,8 +14,8 @@ class CParticlesObject : public CPS_Instance void UpdateSpatial(); protected: - bool m_bLooped; //флаг, что система зациклена - bool m_bStopping; //вызвана функция Stop() + bool m_bLooped; //флаг, что система зациклена + bool m_bStopping; //вызвана функция Stop() protected: u32 mt_dt; diff --git a/src/xrGame/ParticlesPlayer.h b/src/xrGame/ParticlesPlayer.h index ee8a3108d3b..9507c562837 100644 --- a/src/xrGame/ParticlesPlayer.h +++ b/src/xrGame/ParticlesPlayer.h @@ -21,8 +21,8 @@ class CParticlesPlayer { CParticlesObject* ps; Fvector angles; - u16 sender_id; // id - объекта, который запустил партиклы - u32 life_time; //время жизни партикла (-1) - бесконечно + u16 sender_id; // id - объекта, который запустил партиклы + u32 life_time; //время жизни партикла (-1) - бесконечно }; DEFINE_VECTOR(SParticlesInfo, ParticlesInfoList, ParticlesInfoListIt); @@ -44,12 +44,12 @@ class CParticlesPlayer private: // список костей - u64 bone_mask; // используемые кости + u64 bone_mask; // используемые кости BoneInfoVec m_Bones; IGameObject* m_self_object; protected: - bool m_bActiveBones; //есть ли косточки на которых играются партиклы + bool m_bActiveBones; //есть ли косточки на которых играются партиклы public: IC SBoneInfo* get_bone_info(u16 bone_index) diff --git a/src/xrGame/PhraseDialog.cpp b/src/xrGame/PhraseDialog.cpp index 9d15913e417..ad89a859b24 100644 --- a/src/xrGame/PhraseDialog.cpp +++ b/src/xrGame/PhraseDialog.cpp @@ -247,7 +247,7 @@ void CPhraseDialog::load_shared(LPCSTR) pXML->SetLocalRoot(phrase_list_node); -#ifdef DEBUG // debug & mixed +#ifdef DEBUG // debug & mixed LPCSTR wrong_phrase_id = pXML->CheckUniqueAttrib(phrase_list_node, "phrase", "id"); THROW3(wrong_phrase_id == NULL, *item_data.id, wrong_phrase_id); #endif diff --git a/src/xrGame/PhysicObject.cpp b/src/xrGame/PhysicObject.cpp index 8ce68cac1f3..54a42dccbe9 100644 --- a/src/xrGame/PhysicObject.cpp +++ b/src/xrGame/PhysicObject.cpp @@ -147,7 +147,7 @@ static void door_ignore(bool& do_collide, bool bo1, dContact& c, SGameMtl* /*mat CPhysicsShell* ph_shell = collide_obj->PPhysicsShell(); if (!ph_shell) { - do_collide = false; //? must be AI + do_collide = false; //? must be AI return; } VERIFY(ph_shell); @@ -427,7 +427,7 @@ void CPhysicObject::CreateBody(CSE_ALifeObjectPhysic* po) BOOL CPhysicObject::net_SaveRelevant() { - return TRUE; //! m_flags.test(CSE_ALifeObjectPhysic::flSpawnCopy); + return TRUE; //! m_flags.test(CSE_ALifeObjectPhysic::flSpawnCopy); } BOOL CPhysicObject::UsedAI_Locations() @@ -526,11 +526,11 @@ void CPhysicObject::net_Export(NET_Packet& P) net_Export_PH_Params(P, State, num_items); if (PPhysicsShell()->isEnabled()) { - P.w_u8(1); // not freezed + P.w_u8(1); // not freezed } else { - P.w_u8(0); // freezed + P.w_u8(0); // freezed } }; @@ -619,7 +619,7 @@ void CPhysicObject::net_Import(NET_Packet& P) net_Import_PH_Params(P, N, num_items); //////////////////////////////////////////// - P.r_u8(); // freezed or not.. + P.r_u8(); // freezed or not.. if (this->cast_game_object()->Local()) { return; @@ -646,7 +646,7 @@ void CPhysicObject::net_Import(NET_Packet& P) if (!m_activated) { #ifdef DEBUG Msg("Activating object [%d] before interpolation starts", ID()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG processing_activate(); m_activated = true; } @@ -695,7 +695,7 @@ void CPhysicObject::net_Import_PH_Params(NET_Packet& P, net_update_PItem& N, mas //----------- void CPhysicObject::PH_B_CrPr(){}; -void CPhysicObject::PH_I_CrPr() // actions & operations between two phisic prediction steps +void CPhysicObject::PH_I_CrPr() // actions & operations between two phisic prediction steps {}; void CPhysicObject::PH_A_CrPr() { diff --git a/src/xrGame/PhysicObject.h b/src/xrGame/PhysicObject.h index 1be97296a09..ccc2036851b 100644 --- a/src/xrGame/PhysicObject.h +++ b/src/xrGame/PhysicObject.h @@ -86,7 +86,7 @@ class CPhysicObject : public CPhysicsShellHolder, public CPHSkeleton virtual void CreatePhysicsShell(CSE_Abstract* e); virtual void net_Destroy(); virtual void Load(LPCSTR section); - virtual void shedule_Update(u32 dt); // + virtual void shedule_Update(u32 dt); // virtual void UpdateCL(); virtual void net_Save(NET_Packet& P); virtual BOOL net_SaveRelevant(); @@ -98,9 +98,9 @@ class CPhysicObject : public CPhysicsShellHolder, public CPHSkeleton virtual void net_Export(NET_Packet& P); virtual void net_Import(NET_Packet& P); - virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps - virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps + virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps + virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps protected: virtual void SpawnInitPhysics(CSE_Abstract* D); virtual void RunStartupAnim(CSE_Abstract* D); diff --git a/src/xrGame/PhysicsGamePars.cpp b/src/xrGame/PhysicsGamePars.cpp index 47220ec297f..c875a055e33 100644 --- a/src/xrGame/PhysicsGamePars.cpp +++ b/src/xrGame/PhysicsGamePars.cpp @@ -1,8 +1,8 @@ #include "PhysicsGamePars.h" #include "stdafx.h" // float object_damage_factor = 1.f ; //times increace damage from object collision -float collide_volume_max = 200.f; // max collide sound level -float collide_volume_min = 0.f; // min collide sound level +float collide_volume_max = 200.f; // max collide sound level +float collide_volume_min = 0.f; // min collide sound level // float vel_cret_sound = 10.f ; //min vel_cret for collide sound // float vel_cret_wallmark = 30.f ; //min vel_cret for wallmark diff --git a/src/xrGame/PhysicsShellHolder.cpp b/src/xrGame/PhysicsShellHolder.cpp index 5ca2dbf1171..421077166e8 100644 --- a/src/xrGame/PhysicsShellHolder.cpp +++ b/src/xrGame/PhysicsShellHolder.cpp @@ -83,7 +83,7 @@ BOOL CPhysicsShellHolder::net_Spawn(CSE_Abstract* DC) CParticlesPlayer::net_SpawnParticles(); st_enable_state = (u8)stNotDefitnite; b_sheduled = true; - BOOL ret = inherited::net_Spawn(DC); // load + BOOL ret = inherited::net_Spawn(DC); // load // create_physic_shell (); if (PPhysicsShell() && PPhysicsShell()->isFullActive()) { PPhysicsShell()->GetGlobalTransformDynamic(&XFORM()); @@ -472,7 +472,7 @@ u16 CPhysicsShellHolder::ObjectID() const } ICollisionForm* CPhysicsShellHolder::ObjectCollisionModel() { - return CForm; // XXX: use ICollidable::GetCForm() instead + return CForm; // XXX: use ICollidable::GetCForm() instead } IKinematics* CPhysicsShellHolder::ObjectKinematics() diff --git a/src/xrGame/PhysicsShellHolder.h b/src/xrGame/PhysicsShellHolder.h index b1be92fc5a9..95ac2825bb5 100644 --- a/src/xrGame/PhysicsShellHolder.h +++ b/src/xrGame/PhysicsShellHolder.h @@ -106,7 +106,7 @@ class CPhysicsShellHolder : public CGameObject, public: virtual void on_physics_disable(); -private: // IPhysicsShellHolder +private: // IPhysicsShellHolder virtual Fmatrix& ObjectXFORM(); virtual Fvector& ObjectPosition(); virtual LPCSTR ObjectName() const; @@ -131,7 +131,7 @@ class CPhysicsShellHolder : public CGameObject, virtual bool IsActor(); virtual bool IsStalker(); // virtual void SetWeaponHideState ( u16 State, bool bSet )=0; - virtual void HideAllWeapons(bool v); //(SetWeaponHideState(INV_STATE_BLOCK_ALL,true)) + virtual void HideAllWeapons(bool v); //(SetWeaponHideState(INV_STATE_BLOCK_ALL,true)) virtual void MovementCollisionEnable(bool enable); virtual CPHSoundPlayer* ObjectPhSoundPlayer() { return ph_sound_player(); } virtual ICollisionDamageReceiver* ObjectPhCollisionDamageReceiver(); diff --git a/src/xrGame/PhysicsSkeletonObject.cpp b/src/xrGame/PhysicsSkeletonObject.cpp index 74d8a3266f9..60e5b7c71fc 100644 --- a/src/xrGame/PhysicsSkeletonObject.cpp +++ b/src/xrGame/PhysicsSkeletonObject.cpp @@ -74,7 +74,7 @@ void CPhysicsSkeletonObject::net_Save(NET_Packet& P) BOOL CPhysicsSkeletonObject::net_SaveRelevant() { - return TRUE; //! m_flags.test(CSE_ALifeObjectPhysic::flSpawnCopy); + return TRUE; //! m_flags.test(CSE_ALifeObjectPhysic::flSpawnCopy); } BOOL CPhysicsSkeletonObject::UsedAI_Locations() diff --git a/src/xrGame/PhysicsSkeletonObject.h b/src/xrGame/PhysicsSkeletonObject.h index 4b47a2b9b5c..2f2bb64fe77 100644 --- a/src/xrGame/PhysicsSkeletonObject.h +++ b/src/xrGame/PhysicsSkeletonObject.h @@ -16,8 +16,8 @@ class CPhysicsSkeletonObject : public CPhysicsShellHolder, public CPHSkeleton virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); virtual void Load(LPCSTR section); - virtual void UpdateCL(); // Called each frame, so no need for dt - virtual void shedule_Update(u32 dt); // + virtual void UpdateCL(); // Called each frame, so no need for dt + virtual void shedule_Update(u32 dt); // virtual void net_Save(NET_Packet& P); virtual BOOL net_SaveRelevant(); virtual BOOL UsedAI_Locations(); diff --git a/src/xrGame/RadioactiveZone.cpp b/src/xrGame/RadioactiveZone.cpp index 16e5249f3c1..649590fc906 100644 --- a/src/xrGame/RadioactiveZone.cpp +++ b/src/xrGame/RadioactiveZone.cpp @@ -66,7 +66,7 @@ void CRadioactiveZone::Affect(SZoneObjectInfo* O) /// Msg( "Zone hit ___ damage = %.4f Frame=%d ", send_power, Device.dwFrame ); #endif O->f_time_affected += one; - } // while + } // while } void CRadioactiveZone::feel_touch_new(IGameObject* O) @@ -75,7 +75,7 @@ void CRadioactiveZone::feel_touch_new(IGameObject* O) if (GameID() != eGameIDSingle) { if (smart_cast(O)) { CreateHit(O->ID(), ID(), Fvector().set(0, 0, 0), 0.0f, BI_NONE, Fvector().set(0, 0, 0), 0.0f, - m_eHitTypeBlowout); // ALife::eHitTypeRadiation + m_eHitTypeBlowout); // ALife::eHitTypeRadiation } }; }; diff --git a/src/xrGame/RadioactiveZone.h b/src/xrGame/RadioactiveZone.h index 1a67afeeca7..4b0ae0432a4 100644 --- a/src/xrGame/RadioactiveZone.h +++ b/src/xrGame/RadioactiveZone.h @@ -13,7 +13,7 @@ class CRadioactiveZone : public CCustomZone virtual void Load(LPCSTR section); virtual void Affect(SZoneObjectInfo* O); virtual void feel_touch_new(IGameObject* O); - virtual void UpdateWorkload(u32 dt); // related to fast-mode optimizations + virtual void UpdateWorkload(u32 dt); // related to fast-mode optimizations virtual bool feel_touch_contact(IGameObject* O); float nearest_shape_radius(SZoneObjectInfo* O); diff --git a/src/xrGame/ShootingObject.cpp b/src/xrGame/ShootingObject.cpp index 1d2d446bf6e..a631a8dd586 100644 --- a/src/xrGame/ShootingObject.cpp +++ b/src/xrGame/ShootingObject.cpp @@ -103,49 +103,47 @@ void CShootingObject::LoadFireParams(LPCSTR section) fireDispersionBase = deg2rad(pSettings->r_float(section, "fire_dispersion_base")); //сила выстрела и его мощьность - s_sHitPower = pSettings->r_string_wb(section, "hit_power"); //читаем строку силы хита пули оружия + s_sHitPower = pSettings->r_string_wb(section, "hit_power"); //читаем строку силы хита пули оружия s_sHitPowerCritical = pSettings->r_string_wb(section, "hit_power_critical"); fvHitPower[egdMaster] = - (float)atof(_GetItem(*s_sHitPower, 0, buffer)); //первый параметр - это хит для уровня игры мастер + (float)atof(_GetItem(*s_sHitPower, 0, buffer)); //первый параметр - это хит для уровня игры мастер fvHitPowerCritical[egdMaster] = - (float)atof(_GetItem(*s_sHitPowerCritical, 0, buffer)); //первый параметр - это хит для уровня игры мастер + (float)atof(_GetItem(*s_sHitPowerCritical, 0, buffer)); //первый параметр - это хит для уровня игры мастер fvHitPower[egdNovice] = fvHitPower[egdStalker] = fvHitPower[egdVeteran] = - fvHitPower[egdMaster]; //изначально параметры для других уровней сложности такие же + fvHitPower[egdMaster]; //изначально параметры для других уровней сложности такие же fvHitPowerCritical[egdNovice] = fvHitPowerCritical[egdStalker] = fvHitPowerCritical[egdVeteran] = - fvHitPowerCritical[egdMaster]; //изначально параметры для других уровней сложности такие же + fvHitPowerCritical[egdMaster]; //изначально параметры для других уровней сложности такие же - int num_game_diff_param = _GetItemCount(*s_sHitPower); //узнаём колличество параметров для хитов - if (num_game_diff_param > 1) //если задан второй параметр хита + int num_game_diff_param = _GetItemCount(*s_sHitPower); //узнаём колличество параметров для хитов + if (num_game_diff_param > 1) //если задан второй параметр хита { - fvHitPower[egdVeteran] = - (float)atof(_GetItem(*s_sHitPower, 1, buffer)); //то вычитываем его для уровня ветерана + fvHitPower[egdVeteran] = (float)atof(_GetItem(*s_sHitPower, 1, buffer)); //то вычитываем его для уровня ветерана } - if (num_game_diff_param > 2) //если задан третий параметр хита + if (num_game_diff_param > 2) //если задан третий параметр хита { - fvHitPower[egdStalker] = - (float)atof(_GetItem(*s_sHitPower, 2, buffer)); //то вычитываем его для уровня сталкера + fvHitPower[egdStalker] = (float)atof(_GetItem(*s_sHitPower, 2, buffer)); //то вычитываем его для уровня сталкера } - if (num_game_diff_param > 3) //если задан четвёртый параметр хита + if (num_game_diff_param > 3) //если задан четвёртый параметр хита { - fvHitPower[egdNovice] = (float)atof(_GetItem(*s_sHitPower, 3, buffer)); //то вычитываем его для уровня новичка + fvHitPower[egdNovice] = (float)atof(_GetItem(*s_sHitPower, 3, buffer)); //то вычитываем его для уровня новичка } - num_game_diff_param = _GetItemCount(*s_sHitPowerCritical); //узнаём колличество параметров - if (num_game_diff_param > 1) //если задан второй параметр хита + num_game_diff_param = _GetItemCount(*s_sHitPowerCritical); //узнаём колличество параметров + if (num_game_diff_param > 1) //если задан второй параметр хита { fvHitPowerCritical[egdVeteran] = - (float)atof(_GetItem(*s_sHitPowerCritical, 1, buffer)); //то вычитываем его для уровня ветерана + (float)atof(_GetItem(*s_sHitPowerCritical, 1, buffer)); //то вычитываем его для уровня ветерана } - if (num_game_diff_param > 2) //если задан третий параметр хита + if (num_game_diff_param > 2) //если задан третий параметр хита { fvHitPowerCritical[egdStalker] = - (float)atof(_GetItem(*s_sHitPowerCritical, 2, buffer)); //то вычитываем его для уровня сталкера + (float)atof(_GetItem(*s_sHitPowerCritical, 2, buffer)); //то вычитываем его для уровня сталкера } - if (num_game_diff_param > 3) //если задан четвёртый параметр хита + if (num_game_diff_param > 3) //если задан четвёртый параметр хита { fvHitPowerCritical[egdNovice] = - (float)atof(_GetItem(*s_sHitPowerCritical, 3, buffer)); //то вычитываем его для уровня новичка + (float)atof(_GetItem(*s_sHitPowerCritical, 3, buffer)); //то вычитываем его для уровня новичка } fHitImpulse = pSettings->r_float(section, "hit_impulse"); @@ -448,7 +446,7 @@ void CShootingObject::FireBullet(const Fvector& pos, const Fvector& shot_dir, fl m_fPredBulletTime = Device.fTimeGlobal; float l_fHitPower = 0.0f; - if (ParentIsActor()) //если из оружия стреляет актёр(игрок) + if (ParentIsActor()) //если из оружия стреляет актёр(игрок) { if (GameID() == eGameIDSingle) { l_fHitPower = fvHitPower[g_SingleGameDifficulty]; diff --git a/src/xrGame/ShootingObject.h b/src/xrGame/ShootingObject.h index 25352ce6634..db6f78c8653 100644 --- a/src/xrGame/ShootingObject.h +++ b/src/xrGame/ShootingObject.h @@ -42,7 +42,7 @@ class CShootingObject : public IAnticheatDumpable // Fire Params ////////////////////////////////////////////////////////////////////////// protected: - virtual void LoadFireParams(LPCSTR section); //сила выстрела + virtual void LoadFireParams(LPCSTR section); //сила выстрела virtual bool SendHitAllowed(IGameObject* pUser); virtual void FireBullet(const Fvector& pos, const Fvector& dir, float fire_disp, const CCartridge& cartridge, u16 parent_id, u16 weapon_id, bool send_hit); @@ -75,7 +75,7 @@ class CShootingObject : public IAnticheatDumpable //счетчик времени, затрачиваемого на выстрел float fShotTimeCounter; - struct SilencerKoeffs // value *= koef; + struct SilencerKoeffs // value *= koef; { float hit_power; float hit_impulse; @@ -94,7 +94,7 @@ class CShootingObject : public IAnticheatDumpable cam_dispersion = 1.0f; cam_disper_inc = 1.0f; } - }; // SilencerKoeffs + }; // SilencerKoeffs SilencerKoeffs m_silencer_koef; public: diff --git a/src/xrGame/SimpleDetector.cpp b/src/xrGame/SimpleDetector.cpp index 62e208ca858..66f6cbbe27b 100644 --- a/src/xrGame/SimpleDetector.cpp +++ b/src/xrGame/SimpleDetector.cpp @@ -37,7 +37,7 @@ void CSimpleDetector::UpdateAf() Fvector detector_pos = Position(); - for (; it_b != it_e; ++it_b) // only nearest + for (; it_b != it_e; ++it_b) // only nearest { CArtefact* pAf = it_b->first; if (pAf->H_Parent()) continue; diff --git a/src/xrGame/SleepEffector.cpp b/src/xrGame/SleepEffector.cpp index 5190c4ad2f8..762cc3552ab 100644 --- a/src/xrGame/SleepEffector.cpp +++ b/src/xrGame/SleepEffector.cpp @@ -47,7 +47,7 @@ BOOL CSleepEffectorPP::Process(SPPInfo& pp) fLifeTime = m_attack * m_total; factor = 1.0f; } - else if (AWAKING == m_eSleepState) //просыпаемся + else if (AWAKING == m_eSleepState) //просыпаемся factor = (1.0f - time_past_perc) / (1.0f - m_release); clamp(factor, 0.01f, 1.0f); diff --git a/src/xrGame/SleepEffector.h b/src/xrGame/SleepEffector.h index 4115fc54c19..b6b894860b9 100644 --- a/src/xrGame/SleepEffector.h +++ b/src/xrGame/SleepEffector.h @@ -17,10 +17,10 @@ class CSleepEffectorPP : public CEffectorPP { typedef CEffectorPP inherited; - SPPInfo state; // current state - float m_total; // total PP time - float m_attack; // attack time in percents [0..1] - float m_release; // release time in percents [0..1] + SPPInfo state; // current state + float m_total; // total PP time + float m_attack; // attack time in percents [0..1] + float m_release; // release time in percents [0..1] public: CSleepEffectorPP(const SPPInfo& ppi, float life_time, float attack_time = 0.0f, float release_time = 0.0f); diff --git a/src/xrGame/Spectator.cpp b/src/xrGame/Spectator.cpp index 5f25cdc3ab1..b0e4ad83e03 100644 --- a/src/xrGame/Spectator.cpp +++ b/src/xrGame/Spectator.cpp @@ -70,7 +70,7 @@ void CSpectator::UpdateCL() m_timer.Start(); m_fTimeDelta = 0.3f * m_fTimeDelta + 0.7f * fPreviousFrameTime; - if (m_fTimeDelta > 0.1f) m_fTimeDelta = 0.1f; // maximum 10 fps + if (m_fTimeDelta > 0.1f) m_fTimeDelta = 0.1f; // maximum 10 fps if (m_fTimeDelta < 0.0f) m_fTimeDelta = EPS_S; if (Device.Paused()) { @@ -404,9 +404,9 @@ void CSpectator::cam_Update(CActor* A) P.y -= 1.6f; XFORM().translate_over(P); if (Device.Paused()) { - Device.fTimeDelta = m_fTimeDelta; // fake, to update cam (problem with fov) + Device.fTimeDelta = m_fTimeDelta; // fake, to update cam (problem with fov) g_pGameLevel->Cameras().UpdateFromCamera(cam); - Device.fTimeDelta = 0.0f; // fake, to update cam (problem with fov) + Device.fTimeDelta = 0.0f; // fake, to update cam (problem with fov) } else { @@ -431,9 +431,9 @@ void CSpectator::cam_Update(CActor* A) cam->Update(point, dangle); // cam->vPosition.set(point0); if (Device.Paused()) { - Device.fTimeDelta = m_fTimeDelta; // fake, to update cam (problem with fov) + Device.fTimeDelta = m_fTimeDelta; // fake, to update cam (problem with fov) g_pGameLevel->Cameras().UpdateFromCamera(cam); - Device.fTimeDelta = 0.0f; // fake, to update cam (problem with fov) + Device.fTimeDelta = 0.0f; // fake, to update cam (problem with fov) } else { @@ -471,7 +471,7 @@ BOOL CSpectator::net_Spawn(CSE_Abstract* DC) } look_idx = 0; - cameras[cam_active]->Set(-E->o_Angle.y, -E->o_Angle.x, tmp_roll); // set's camera orientation + cameras[cam_active]->Set(-E->o_Angle.y, -E->o_Angle.x, tmp_roll); // set's camera orientation cameras[cam_active]->vPosition.set(E->o_Position); if (OnServer()) { @@ -543,7 +543,7 @@ void CSpectator::net_Relcase(IGameObject* O) { if (O != m_pActorToLookAt) return; - if (m_pActorToLookAt != Level().CurrentEntity()) // new spectator was spawned + if (m_pActorToLookAt != Level().CurrentEntity()) // new spectator was spawned { m_pActorToLookAt = NULL; return; @@ -552,7 +552,7 @@ void CSpectator::net_Relcase(IGameObject* O) m_pActorToLookAt = NULL; if (cam_active != eacFreeFly) { SelectNextPlayerToLook(false); - if (m_pActorToLookAt == O) // selected to look at player that will be destroyed + if (m_pActorToLookAt == O) // selected to look at player that will be destroyed { m_pActorToLookAt = NULL; } diff --git a/src/xrGame/Spectator.h b/src/xrGame/Spectator.h index 1621a533b70..3661c7c3f2f 100644 --- a/src/xrGame/Spectator.h +++ b/src/xrGame/Spectator.h @@ -16,7 +16,7 @@ class CSpectator : public CGameObject, public IInputReceiver { private: typedef CGameObject inherited; - CTimer m_timer; // for pause case (in demo mode) + CTimer m_timer; // for pause case (in demo mode) float m_fTimeDelta; protected: @@ -67,8 +67,9 @@ class CSpectator : public CGameObject, public IInputReceiver virtual void Center(Fvector& C) const { C.set(Position()); } virtual float Radius() const { return EPS; } - // virtual const Fbox& BoundingBox () const { VERIFY2(renderable.visual,*cName()); return - //renderable.visual->vis.box; } + // virtual const Fbox& BoundingBox () const { VERIFY2(renderable.visual,*cName()); + //return + // renderable.visual->vis.box; } virtual CGameObject* cast_game_object() { return this; } virtual IInputReceiver* cast_input_receiver() { return this; } virtual void net_Relcase(IGameObject* O); @@ -80,4 +81,4 @@ class CSpectator : public CGameObject, public IInputReceiver inline EActorCameras GetActiveCam() const { return cam_active; }; }; -#endif // __SPECTATOR_H__ +#endif // __SPECTATOR_H__ diff --git a/src/xrGame/TeleWhirlwind.cpp b/src/xrGame/TeleWhirlwind.cpp index 08ea38367c3..6f5d203eba5 100644 --- a/src/xrGame/TeleWhirlwind.cpp +++ b/src/xrGame/TeleWhirlwind.cpp @@ -184,7 +184,7 @@ void CTeleWhirlwindObject::raise(float step) CPhysicsElement* maxE = p->get_ElementByStoreOrder(0); for (u16 element = 0; element < element_number; ++element) { - float k = strength; // 600.f; + float k = strength; // 600.f; float predict_v_eps = 0.1f; float mag_eps = .01f; @@ -203,7 +203,7 @@ void CTeleWhirlwindObject::raise(float step) } diff.sub(lc, pos); mag = diff.magnitude(); - float accel = k / mag / mag / mag; //*E->getMass() + float accel = k / mag / mag / mag; //*E->getMass() Fvector dir; if (mag < mag_eps) { accel = 0.f; @@ -246,7 +246,7 @@ void CTeleWhirlwindObject::raise(float step) needed_diff.set(motion_dir); needed_diff.mul(needed_d); Fvector nearest_p; - nearest_p.add(pos, needed_diff); // + nearest_p.add(pos, needed_diff); // Fvector needed_vel; needed_vel.set(needed_diff); needed_vel.mul(1.f / fixed_step); diff --git a/src/xrGame/Torch.cpp b/src/xrGame/Torch.cpp index 2dadae72ee2..2c53c371858 100644 --- a/src/xrGame/Torch.cpp +++ b/src/xrGame/Torch.cpp @@ -140,7 +140,7 @@ void CTorch::SwitchNightVision(bool vision_on, bool use_sounds) m_night_vision->Start(pOutfit->m_NightVisionSect, pA, use_sounds); return; } - m_bNightVisionOn = false; // in case if there is no nightvision in helmet and outfit + m_bNightVisionOn = false; // in case if there is no nightvision in helmet and outfit } } else @@ -314,7 +314,7 @@ void CTorch::UpdateCL() offset.mad(M.k, OMNI_OFFSET.z); light_omni->set_position(offset); } - } // if (true) + } // if (true) glow_render->set_position(M.c); if (true) { @@ -323,10 +323,10 @@ void CTorch::UpdateCL() if (true /*false*/) { light_omni->set_rotation(dir, right); } - } // if (true) + } // if (true) glow_render->set_direction(dir); - } // if(actor) + } // if(actor) else { if (can_use_dynamic_lights()) { @@ -339,12 +339,12 @@ void CTorch::UpdateCL() offset.mad(M.k, OMNI_OFFSET.z); light_omni->set_position(M.c); light_omni->set_rotation(M.k, M.i); - } // if (can_use_dynamic_lights()) + } // if (can_use_dynamic_lights()) glow_render->set_position(M.c); glow_render->set_direction(M.k); } - } // if(HParent()) + } // if(HParent()) else { if (getVisible() && m_pPhysicsShell) { @@ -354,7 +354,7 @@ void CTorch::UpdateCL() light_render->set_active(false); light_omni->set_active(false); glow_render->set_active(false); - } // if (getVisible() && m_pPhysicsShell) + } // if (getVisible() && m_pPhysicsShell) } if (!m_switched_on) return; diff --git a/src/xrGame/Torch.h b/src/xrGame/Torch.h index a773e42b9cf..5a5cf0b1075 100644 --- a/src/xrGame/Torch.h +++ b/src/xrGame/Torch.h @@ -36,8 +36,8 @@ class CTorch : public CInventoryItemObject virtual void Load(LPCSTR section); virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); - virtual void net_Export(NET_Packet& P); // export to server - virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server virtual void OnH_A_Chield(); virtual void OnH_B_Independent(bool just_before_destroy); diff --git a/src/xrGame/Tracer.cpp b/src/xrGame/Tracer.cpp index a84ac3d94fa..149eab85be8 100644 --- a/src/xrGame/Tracer.cpp +++ b/src/xrGame/Tracer.cpp @@ -54,18 +54,18 @@ IC void FillSprite_Circle(const Fvector& pos, const float width, const float len // TODO: return code back to indexed rendering since we use quads // Tri 1 GlobalEnv.UIRender->PushPoint( - d.x + pos.x, d.y + pos.y, d.z + pos.z, color, t_crcl.min.x, t_crcl.max.y); // 0.f,1.f); + d.x + pos.x, d.y + pos.y, d.z + pos.z, color, t_crcl.min.x, t_crcl.max.y); // 0.f,1.f); GlobalEnv.UIRender->PushPoint( - a.x + pos.x, a.y + pos.y, a.z + pos.z, color, t_crcl.min.x, t_crcl.min.y); // 0.f,0.f); + a.x + pos.x, a.y + pos.y, a.z + pos.z, color, t_crcl.min.x, t_crcl.min.y); // 0.f,0.f); GlobalEnv.UIRender->PushPoint( - c.x + pos.x, c.y + pos.y, c.z + pos.z, color, t_crcl.max.x, t_crcl.max.y); // 1.f,1.f); + c.x + pos.x, c.y + pos.y, c.z + pos.z, color, t_crcl.max.x, t_crcl.max.y); // 1.f,1.f); // Tri 2 GlobalEnv.UIRender->PushPoint( - c.x + pos.x, c.y + pos.y, c.z + pos.z, color, t_crcl.max.x, t_crcl.max.y); // 1.f,1.f); + c.x + pos.x, c.y + pos.y, c.z + pos.z, color, t_crcl.max.x, t_crcl.max.y); // 1.f,1.f); GlobalEnv.UIRender->PushPoint( - a.x + pos.x, a.y + pos.y, a.z + pos.z, color, t_crcl.min.x, t_crcl.min.y); // 0.f,0.f); + a.x + pos.x, a.y + pos.y, a.z + pos.z, color, t_crcl.min.x, t_crcl.min.y); // 0.f,0.f); GlobalEnv.UIRender->PushPoint( - b.x + pos.x, b.y + pos.y, b.z + pos.z, color, t_crcl.max.x, t_crcl.min.y); // 1.f,0.f); + b.x + pos.x, b.y + pos.y, b.z + pos.z, color, t_crcl.max.x, t_crcl.min.y); // 1.f,0.f); // pv->set (d.x+pos.x,d.y+pos.y,d.z+pos.z, color, 0.f,1.f); pv++; // pv->set (a.x+pos.x,a.y+pos.y,a.z+pos.z, color, 0.f,0.f); pv++; diff --git a/src/xrGame/UIAchivementsIndicator.h b/src/xrGame/UIAchivementsIndicator.h index 485d6cb7812..fc2eaaeb4a3 100644 --- a/src/xrGame/UIAchivementsIndicator.h +++ b/src/xrGame/UIAchivementsIndicator.h @@ -24,4 +24,4 @@ class CUIAchivementIndicator : public CUIWindow CUIGameLog* m_achivement_log; }; -#endif //#ifndef UI_ACHIVEMENTS_INDICATOR_INCLUDED \ No newline at end of file +#endif //#ifndef UI_ACHIVEMENTS_INDICATOR_INCLUDED \ No newline at end of file diff --git a/src/xrGame/UIGameAHunt.cpp b/src/xrGame/UIGameAHunt.cpp index 817e8b58579..de985abe837 100644 --- a/src/xrGame/UIGameAHunt.cpp +++ b/src/xrGame/UIGameAHunt.cpp @@ -21,11 +21,11 @@ CUIGameAHunt::CUIGameAHunt() : m_game(NULL), m_pBuySpawnMsgBox(NULL) void CUIGameAHunt::Init(int stage) { - if (stage == 0) { // shared + if (stage == 0) { // shared inherited::Init(stage); m_buy_msg_caption = UIHelper::CreateTextWnd(*MsgConfig, "mp_ah_buy", Window); } - if (stage == 1) { // unique + if (stage == 1) { // unique m_pTeamPanels->Init(TEAM_PANELS_AHUNT_XML_NAME, "team_panels_wnd"); CUIXml uiXml; @@ -46,7 +46,7 @@ void CUIGameAHunt::Init(int stage) m_pMoneyIndicator->InitFromXML(uiXml); m_pRankIndicator->InitFromXml(uiXml); } - if (stage == 2) { // after + if (stage == 2) { // after inherited::Init(stage); Window->AttachChild(m_pReinforcementInidcator); } diff --git a/src/xrGame/UIGameCTA.cpp b/src/xrGame/UIGameCTA.cpp index 3582e82c2e8..dc653dd4499 100644 --- a/src/xrGame/UIGameCTA.cpp +++ b/src/xrGame/UIGameCTA.cpp @@ -131,7 +131,7 @@ CUIGameCTA::~CUIGameCTA() bool CUIGameCTA::IsTeamPanelsShown() { VERIFY(teamPanels); - return m_team_panels_shown; // teamPanels->IsShown(); + return m_team_panels_shown; // teamPanels->IsShown(); } void CUIGameCTA::ShowTeamPanels(bool bShow) { @@ -551,7 +551,7 @@ void CUIGameCTA::GetPurchaseItems(BuyMenuItemsCollection& dest, s32& moneyDif) R_ASSERT(m_pCurBuyMenu); preset_items const* tmpPresItems = &(m_pCurBuyMenu->GetPreset(_preset_idx_last)); if (tmpPresItems->size() == 0) { - tmpPresItems = &(m_pCurBuyMenu->GetPreset(_preset_idx_default)); //_preset_idx_origin)); + tmpPresItems = &(m_pCurBuyMenu->GetPreset(_preset_idx_default)); //_preset_idx_origin)); } preset_items::const_iterator pie = tmpPresItems->end(); for (preset_items::const_iterator pi = tmpPresItems->begin(); pi != pie; ++pi) @@ -882,7 +882,7 @@ void CUIGameCTA::LoadDefItemsForRank() { // s16* pItemID = &(PlayerDefItems[it]); // char* ItemName = pBuyMenu->GetWeaponNameByIndex(u8(((*pItemID)&0xff00)>>0x08), - //u8((*pItemID)&0x00ff)); + // u8((*pItemID)&0x00ff)); PresetItem* pDefItem = &(PlayerDefItems[it]); const shared_str& ItemName = m_pCurBuyMenu->GetWeaponNameByIndex(pDefItem->SlotID, pDefItem->ItemID); if (!ItemName.size()) continue; diff --git a/src/xrGame/UIGameCustom.cpp b/src/xrGame/UIGameCustom.cpp index f4da0dd191c..a38d792b9fe 100644 --- a/src/xrGame/UIGameCustom.cpp +++ b/src/xrGame/UIGameCustom.cpp @@ -352,7 +352,7 @@ void CMapListHelper::Load() levelsPath->_set_root(tempRoot); for (CLocatorAPI::archive& arch : FS.m_archives) { - if (arch.hSrcFile) continue; // skip if loaded + if (arch.hSrcFile) continue; // skip if loaded const char* levelName = arch.header->r_string("header", "level_name"); const char* levelVersion = arch.header->r_string("header", "level_ver"); FS.LoadArchive(arch, tempRoot); diff --git a/src/xrGame/UIGameDM.cpp b/src/xrGame/UIGameDM.cpp index 18550fe5b03..57e03d6d05e 100644 --- a/src/xrGame/UIGameDM.cpp +++ b/src/xrGame/UIGameDM.cpp @@ -60,7 +60,7 @@ void CUIGameDM::SetClGame(game_cl_GameState* g) void CUIGameDM::Init(int stage) { - if (stage == 0) { // shared + if (stage == 0) { // shared m_pTeamPanels = new UITeamPanels(); m_pMoneyIndicator = new CUIMoneyIndicator(); m_pMoneyIndicator->SetAutoDelete(true); @@ -80,7 +80,7 @@ void CUIGameDM::Init(int stage) m_demo_play_caption = UIHelper::CreateTextWnd(*MsgConfig, "mp_demo_play", Window); m_warm_up_caption = UIHelper::CreateTextWnd(*MsgConfig, "mp_warm_up", Window); } - if (stage == 1) { // unique + if (stage == 1) { // unique m_pTeamPanels->Init(TEAM_PANELS_DM_XML_NAME, "team_panels_wnd"); CUIXml uiXml; uiXml.Load(CONFIG_PATH, UI_PATH, "ui_game_dm.xml"); @@ -89,7 +89,7 @@ void CUIGameDM::Init(int stage) m_pRankIndicator->InitFromXml(uiXml); CUIXmlInit::InitTextWnd(uiXml, "fraglimit", 0, m_pFragLimitIndicator); } - if (stage == 2) { // after + if (stage == 2) { // after inherited::Init(stage); Window->AttachChild(m_pMoneyIndicator); Window->AttachChild(m_pRankIndicator); diff --git a/src/xrGame/UIGameMP.cpp b/src/xrGame/UIGameMP.cpp index 5cd90fa7724..147c5653f91 100644 --- a/src/xrGame/UIGameMP.cpp +++ b/src/xrGame/UIGameMP.cpp @@ -37,7 +37,7 @@ bool UIGameMP::IR_UIOnKeyboardPress(int dik) } #ifdef DEBUG if (dik == DIK_T) { - m_game->AddRewardTask(0); // mp_award_massacre + m_game->AddRewardTask(0); // mp_award_massacre } #endif return inherited::IR_UIOnKeyboardPress(dik); diff --git a/src/xrGame/UIGameMP.h b/src/xrGame/UIGameMP.h index 5fc396ba525..fb6cbe0ff5d 100644 --- a/src/xrGame/UIGameMP.h +++ b/src/xrGame/UIGameMP.h @@ -24,7 +24,7 @@ class UIGameMP : public CUIGameCustom shared_str const& achivement_name, shared_str const& color_animation, u32 const width, u32 const height); bool IsServerInfoShown(); - bool ShowServerInfo(); // shows only if it has some info ... + bool ShowServerInfo(); // shows only if it has some info ... virtual bool IR_UIOnKeyboardPress(int dik); virtual bool IR_UIOnKeyboardRelease(int dik); @@ -35,6 +35,6 @@ class UIGameMP : public CUIGameCustom CUIServerInfo* m_pServerInfo; CUIAchivementIndicator* m_pAchivementIdicator; game_cl_mp* m_game; -}; // class UIGameMP +}; // class UIGameMP -#endif //#ifndef UIGAMEMP_H \ No newline at end of file +#endif //#ifndef UIGAMEMP_H \ No newline at end of file diff --git a/src/xrGame/UIGameSP.cpp b/src/xrGame/UIGameSP.cpp index b0ff436a153..6d3d53ce2ff 100644 --- a/src/xrGame/UIGameSP.cpp +++ b/src/xrGame/UIGameSP.cpp @@ -169,7 +169,7 @@ void CUIGameSP::StartTalk(bool disable_break) TalkMenu->ShowDialog(true); } -void CUIGameSP::StartCarBody(CInventoryOwner* pActorInv, CInventoryOwner* pOtherOwner) // Deadbody search +void CUIGameSP::StartCarBody(CInventoryOwner* pActorInv, CInventoryOwner* pOtherOwner) // Deadbody search { if (TopInputReceiver()) return; @@ -180,7 +180,7 @@ void CUIGameSP::StartCarBody(CInventoryOwner* pActorInv, CInventoryOwner* pOther ActorMenu->ShowDialog(true); } -void CUIGameSP::StartCarBody(CInventoryOwner* pActorInv, CInventoryBox* pBox) // Deadbody search +void CUIGameSP::StartCarBody(CInventoryOwner* pActorInv, CInventoryBox* pBox) // Deadbody search { if (TopInputReceiver()) return; diff --git a/src/xrGame/UIGameTDM.cpp b/src/xrGame/UIGameTDM.cpp index 714ce75c6e3..3316aea0025 100644 --- a/src/xrGame/UIGameTDM.cpp +++ b/src/xrGame/UIGameTDM.cpp @@ -31,7 +31,7 @@ void CUIGameTDM::SetClGame(game_cl_GameState* g) void CUIGameTDM::Init(int stage) { - if (stage == 0) { // shared + if (stage == 0) { // shared m_pUITeamSelectWnd = new CUISpawnWnd(); m_team1_icon = new CUIStatic(); m_team2_icon = new CUIStatic(); @@ -45,7 +45,7 @@ void CUIGameTDM::Init(int stage) inherited::Init(stage); CUIXmlInit::InitTextWnd(*MsgConfig, "mp_tdm_buy", 0, m_buy_msg_caption); } - if (stage == 1) { // unique + if (stage == 1) { // unique m_pTeamPanels->Init(TEAM_PANELS_TDM_XML_NAME, "team_panels_wnd"); CUIXml uiXml, xml2; @@ -61,7 +61,7 @@ void CUIGameTDM::Init(int stage) m_pMoneyIndicator->InitFromXML(uiXml); m_pRankIndicator->InitFromXml(uiXml); } - if (stage == 2) { // after + if (stage == 2) { // after inherited::Init(stage); Window->AttachChild(m_team1_score); Window->AttachChild(m_team2_score); diff --git a/src/xrGame/UIPlayerItem.h b/src/xrGame/UIPlayerItem.h index 4adebbb0905..cee2d031755 100644 --- a/src/xrGame/UIPlayerItem.h +++ b/src/xrGame/UIPlayerItem.h @@ -11,7 +11,7 @@ #include "xrCore/Containers/AssociativeVector.hpp" class UITeamState; -class UITeamPanels; // for switching teams +class UITeamPanels; // for switching teams class CUIStatsIcon; class UIPlayerItem : public CUIWindow diff --git a/src/xrGame/UIStaticItem.cpp b/src/xrGame/UIStaticItem.cpp index d25f9170793..4c1bfb0817a 100644 --- a/src/xrGame/UIStaticItem.cpp +++ b/src/xrGame/UIStaticItem.cpp @@ -77,10 +77,10 @@ void CUIStaticItem::RenderInternal(const Fvector2& in_pos) RBp.x += offset; RBp.y += offset; - S[0].set(LTp.x, LTp.y, LTt.x, LTt.y); // LT - S[1].set(RBp.x, LTp.y, RBt.x, LTt.y); // RT - S[2].set(RBp.x, RBp.y, RBt.x, RBt.y); // RB - S[3].set(LTp.x, RBp.y, LTt.x, RBt.y); // LB + S[0].set(LTp.x, LTp.y, LTt.x, LTt.y); // LT + S[1].set(RBp.x, LTp.y, RBt.x, LTt.y); // RT + S[2].set(RBp.x, RBp.y, RBt.x, RBt.y); // RB + S[3].set(LTp.x, RBp.y, LTt.x, RBt.y); // LB sPoly2D D; sPoly2D* R = NULL; diff --git a/src/xrGame/UITeamHeader.cpp b/src/xrGame/UITeamHeader.cpp index 1087ff68305..e0f64532a9c 100644 --- a/src/xrGame/UITeamHeader.cpp +++ b/src/xrGame/UITeamHeader.cpp @@ -22,7 +22,7 @@ void UITeamHeader::Update() CUIStatic* fieldStatic = i->second; VERIFY2(fieldStatic, make_string("field %s not initialized", i->first.c_str()).c_str()); STRING_VALUE temp_text = m_translated_strings[i->first]; - buffer_vector::size_type new_size = temp_text.size() + 16; // i hope STRING_VALUE has size() method :) + buffer_vector::size_type new_size = temp_text.size() + 16; // i hope STRING_VALUE has size() method :) buffer_vector new_string(_alloca(new_size), new_size); xr_sprintf(new_string.begin(), new_size, "%s: %d", temp_text.c_str(), temp_value); fieldStatic->TextItemControl()->SetText(new_string.begin()); diff --git a/src/xrGame/UITeamHeader.h b/src/xrGame/UITeamHeader.h index efea4a896ae..e07c885d746 100644 --- a/src/xrGame/UITeamHeader.h +++ b/src/xrGame/UITeamHeader.h @@ -41,6 +41,6 @@ class UITeamHeader : public CUIWindow protected: private: -}; // UITeamHeader +}; // UITeamHeader -#endif // UI_TEAM_HEADER \ No newline at end of file +#endif // UI_TEAM_HEADER \ No newline at end of file diff --git a/src/xrGame/UITeamPanels.cpp b/src/xrGame/UITeamPanels.cpp index f50d4030589..5e8ecd5b2e5 100644 --- a/src/xrGame/UITeamPanels.cpp +++ b/src/xrGame/UITeamPanels.cpp @@ -109,7 +109,7 @@ void UITeamPanels::UpdatePanels() } break; }; - }; // end switch + }; // end switch i->second->Show(need_show); } need_update_panels = false; diff --git a/src/xrGame/UITeamState.cpp b/src/xrGame/UITeamState.cpp index 1d544ef75dd..5a12eda67dd 100644 --- a/src/xrGame/UITeamState.cpp +++ b/src/xrGame/UITeamState.cpp @@ -65,7 +65,7 @@ bool UITeamState::SortingLessFunction(CUIWindow* left, CUIWindow* right) void UITeamState::Init(CUIXml& uiXml, LPCSTR teamNodeName, int index) { VERIFY(teamNodeName); - mainUiXml = &uiXml; // warning ! + mainUiXml = &uiXml; // warning ! teamXmlNode = uiXml.NavigateToNode(teamNodeName, index); VERIFY2(teamXmlNode, make_string("team xml node (%s) not found", teamNodeName).c_str()); @@ -172,7 +172,7 @@ void UITeamState::AddPlayer(ClientID const& clientId) #ifdef DEBUG Msg("--- UITeamState: adding player (ClientID = 0x%08x) to %d team (0x%08x)", clientId.value(), myTeam, this); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG UIPlayerItem* tempPlayerItem = new UIPlayerItem(static_cast(ps->team), clientId, this, m_teamPanels); @@ -228,7 +228,7 @@ bool UITeamState::UpdatePlayer(ClientID const& clientId) }*/ if (Game().IsPlayerInTeam(ps, myTeam) == false) { RemovePlayer(clientId); - retVal = false; // tricky step :) player will be added by UITeamPanels::UpdatePlayer method :) + retVal = false; // tricky step :) player will be added by UITeamPanels::UpdatePlayer method :) } // warning ! after this Update tempIter will be not valid !!! Update(); @@ -287,13 +287,13 @@ void UITeamState::Update() VERIFY2(tempIter != myPlayers.end(), "player not found while deleting"); #ifdef DEBUG Msg("--- UITeamState: deleting player (ClientID = 0x%08x) from %d team (0x%08x)", i->value(), myTeam, this); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG VERIFY(m_scroll_panels.size() > tempIter->second.m_panel_number); m_scroll_panels[tempIter->second.m_panel_number].first->RemoveWindow(tempIter->second.m_player_wnd); xr_delete(tempIter->second.m_player_wnd); myPlayers.erase(tempIter); } - ReStoreAllPlayers(); // warning ! uses myPlayers + ReStoreAllPlayers(); // warning ! uses myPlayers toDeletePlayers.clear(); } TScrollPanels::iterator ite = m_scroll_panels.end(); diff --git a/src/xrGame/Weapon.cpp b/src/xrGame/Weapon.cpp index 8a79a047a70..0245a935067 100644 --- a/src/xrGame/Weapon.cpp +++ b/src/xrGame/Weapon.cpp @@ -185,7 +185,7 @@ void CWeapon::UpdateFireDependencies_internal() void CWeapon::ForceUpdateFireParticles() { - if (!GetHUDmode()) { // update particlesXFORM real bullet direction + if (!GetHUDmode()) { // update particlesXFORM real bullet direction if (!H_Parent()) return; @@ -423,11 +423,11 @@ void CWeapon::Load(LPCSTR section) Fvector def_dof; def_dof.set(-1, -1, -1); // m_zoom_params.m_ZoomDof = READ_IF_EXISTS(pSettings, r_fvector3, section, "zoom_dof", - //Fvector().set(-1,-1,-1)); + // Fvector().set(-1,-1,-1)); // m_zoom_params.m_bZoomDofEnabled = !def_dof.similar(m_zoom_params.m_ZoomDof); // m_zoom_params.m_ReloadDof = READ_IF_EXISTS(pSettings, r_fvector4, section, "reload_dof", - //Fvector4().set(-1,-1,-1,-1)); + // Fvector4().set(-1,-1,-1,-1)); m_bHasTracers = !!READ_IF_EXISTS(pSettings, r_bool, section, "tracers", true); m_u8TracerColorID = READ_IF_EXISTS(pSettings, r_u8, section, "tracers_color_ID", u8(-1)); @@ -515,7 +515,7 @@ void CWeapon::net_Destroy() BOOL CWeapon::IsUpdating() { bool bIsActiveItem = m_pInventory && m_pInventory->ActiveItem() == this; - return bIsActiveItem || bWorking; // || IsPending() || getVisible(); + return bIsActiveItem || bWorking; // || IsPending() || getVisible(); } void CWeapon::net_Export(NET_Packet& P) @@ -1077,9 +1077,9 @@ float CWeapon::GetConditionMisfireProbability() const if (GetCondition() < misfireEndCondition) return misfireEndProbability; // float mis = misfireProbability+powf(1.f-GetCondition(), 3.f)*misfireConditionK; float mis = misfireStartProbability + - ((misfireStartCondition - GetCondition()) * // condition goes from 1.f to 0.f - (misfireEndProbability - misfireStartProbability) / // probability goes from 0.f to 1.f - ((misfireStartCondition == misfireEndCondition) ? // !!!say "No" to devision by zero + ((misfireStartCondition - GetCondition()) * // condition goes from 1.f to 0.f + (misfireEndProbability - misfireStartProbability) / // probability goes from 0.f to 1.f + ((misfireStartCondition == misfireEndCondition) ? // !!!say "No" to devision by zero misfireStartCondition : (misfireStartCondition - misfireEndCondition))); clamp(mis, 0.0f, 0.99f); @@ -1154,7 +1154,7 @@ shared_str wpn_silencer = "wpn_silencer"; shared_str wpn_grenade_launcher = "wpn_launcher"; void CWeapon::UpdateHUDAddonsVisibility() -{ // actor only +{ // actor only if (!GetHUDmode()) return; //. return; @@ -1289,7 +1289,7 @@ void CWeapon::OnZoomIn() void CWeapon::OnZoomOut() { m_zoom_params.m_bIsZoomModeNow = false; - m_fRTZoomFactor = GetZoomFactor(); // store current + m_fRTZoomFactor = GetZoomFactor(); // store current m_zoom_params.m_fCurrentZoomFactor = g_fov; EnableHudInertion(TRUE); @@ -1323,7 +1323,7 @@ void CWeapon::SwitchState(u32 S) Msg("---Server is going to send GE_WPN_STATE_CHANGE to [%d], weapon_section[%s], parent[%s]", S, cNameSect().c_str(), H_Parent() ? H_Parent()->cName().c_str() : "NULL Parent"); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD SetNextState(S); if (CHudItem::object().Local() && !CHudItem::object().getDestroy() && m_pInventory && OnServer()) { @@ -1530,8 +1530,8 @@ void CWeapon::UpdateHudAdditonal(Fmatrix& trans) attachable_hud_item* hi = HudItemData(); R_ASSERT(hi); Fvector curr_offs, curr_rot; - curr_offs = hi->m_measures.m_hands_offset[0][idx]; // pos,aim - curr_rot = hi->m_measures.m_hands_offset[1][idx]; // rot,aim + curr_offs = hi->m_measures.m_hands_offset[0][idx]; // pos,aim + curr_rot = hi->m_measures.m_hands_offset[1][idx]; // rot,aim curr_offs.mul(m_zoom_params.m_fZoomRotationFactor); curr_rot.mul(m_zoom_params.m_fZoomRotationFactor); @@ -1670,7 +1670,7 @@ bool CWeapon::show_indicators() float CWeapon::GetConditionToShow() const { - return (GetCondition()); // powf(GetCondition(),4.0f)); + return (GetCondition()); // powf(GetCondition(),4.0f)); } BOOL CWeapon::ParentMayHaveAimBullet() @@ -1705,7 +1705,7 @@ void CWeapon::debug_draw_firedeps() if (hud_adj_mode == 7) render.draw_aabb(get_LastSP(), 0.005f, 0.005f, 0.005f, color_xrgb(0, 255, 0)); } -#endif // DEBUG +#endif // DEBUG } const float& CWeapon::hit_probability() const diff --git a/src/xrGame/Weapon.h b/src/xrGame/Weapon.h index 86fac412d99..0d12c44c35f 100644 --- a/src/xrGame/Weapon.h +++ b/src/xrGame/Weapon.h @@ -61,7 +61,7 @@ class CWeapon : public CHudItemObject, public CShootingObject virtual void OnH_A_Chield(); virtual void OnH_B_Independent(bool just_before_destroy); virtual void OnH_A_Independent(); - virtual void OnEvent(NET_Packet& P, u16 type); // {inherited::OnEvent(P,type);} + virtual void OnEvent(NET_Packet& P, u16 type); // {inherited::OnEvent(P,type);} virtual void Hit(SHit* pHDS); @@ -75,7 +75,7 @@ class CWeapon : public CHudItemObject, public CShootingObject virtual void OnActiveItem(); virtual void OnHiddenItem(); - virtual void SendHiddenItem(); // same as OnHiddenItem but for client... (sends message to a server)... + virtual void SendHiddenItem(); // same as OnHiddenItem but for client... (sends message to a server)... public: virtual bool can_kill() const; @@ -166,7 +166,7 @@ class CWeapon : public CHudItemObject, public CShootingObject const shared_str& GetSilencerName() const { return m_sSilencerName; } IC void ForceUpdateAmmo() { m_BriefInfo_CalcFrame = 0; } u8 GetAddonsState() const { return m_flagsAddOnState; }; - void SetAddonsState(u8 st) { m_flagsAddOnState = st; } // dont use!!! for buy menu only!!! + void SetAddonsState(u8 st) { m_flagsAddOnState = st; } // dont use!!! for buy menu only!!! protected: //состояние подключенных аддонов u8 m_flagsAddOnState; @@ -189,16 +189,16 @@ class CWeapon : public CHudItemObject, public CShootingObject protected: struct SZoomParams { - bool m_bZoomEnabled; //разрешение режима приближения + bool m_bZoomEnabled; //разрешение режима приближения bool m_bHideCrosshairInZoom; // bool m_bZoomDofEnabled; - bool m_bIsZoomModeNow; //когда режим приближения включен - float m_fCurrentZoomFactor; //текущий фактор приближения - float m_fZoomRotateTime; //время приближения + bool m_bIsZoomModeNow; //когда режим приближения включен + float m_fCurrentZoomFactor; //текущий фактор приближения + float m_fZoomRotateTime; //время приближения - float m_fIronSightZoomFactor; //коэффициент увеличения прицеливания - float m_fScopeZoomFactor; //коэффициент увеличения прицела + float m_fIronSightZoomFactor; //коэффициент увеличения прицеливания + float m_fScopeZoomFactor; //коэффициент увеличения прицела float m_fZoomRotationFactor; @@ -212,7 +212,7 @@ class CWeapon : public CHudItemObject, public CShootingObject } m_zoom_params; - float m_fRTZoomFactor; // run-time zoom factor + float m_fRTZoomFactor; // run-time zoom factor CUIWindow* m_UIScope; public: @@ -265,7 +265,7 @@ class CWeapon : public CHudItemObject, public CShootingObject protected: virtual void UpdateFireDependencies_internal(); - virtual void UpdatePosition(const Fmatrix& transform); //. + virtual void UpdatePosition(const Fmatrix& transform); //. virtual void UpdateXForm(); virtual void UpdateHudAdditonal(Fmatrix&); IC void UpdateFireDependencies() @@ -344,8 +344,8 @@ class CWeapon : public CHudItemObject, public CShootingObject virtual float GetConditionToShow() const; public: - CameraRecoil cam_recoil; // simple mode (walk, run) - CameraRecoil zoom_cam_recoil; // using zoom =(ironsight or scope) + CameraRecoil cam_recoil; // simple mode (walk, run) + CameraRecoil zoom_cam_recoil; // using zoom =(ironsight or scope) protected: //фактор увеличения дисперсии при максимальной изношености @@ -356,12 +356,12 @@ class CWeapon : public CHudItemObject, public CShootingObject // modified by Peacemaker [17.10.08] // float misfireProbability; // float misfireConditionK; - float misfireStartCondition; //изношенность, при которой появляется шанс осечки - float misfireEndCondition; //изношеность при которой шанс осечки становится константным - float misfireStartProbability; //шанс осечки при изношености больше чем misfireStartCondition - float misfireEndProbability; //шанс осечки при изношености больше чем misfireEndCondition - float conditionDecreasePerQueueShot; //увеличение изношености при выстреле очередью - float conditionDecreasePerShot; //увеличение изношености при одиночном выстреле + float misfireStartCondition; //изношенность, при которой появляется шанс осечки + float misfireEndCondition; //изношеность при которой шанс осечки становится константным + float misfireStartProbability; //шанс осечки при изношености больше чем misfireStartCondition + float misfireEndProbability; //шанс осечки при изношености больше чем misfireEndCondition + float conditionDecreasePerQueueShot; //увеличение изношености при выстреле очередью + float conditionDecreasePerShot; //увеличение изношености при одиночном выстреле public: float GetMisfireStartCondition() const { return misfireStartCondition; }; @@ -423,12 +423,12 @@ class CWeapon : public CHudItemObject, public CShootingObject virtual float GetCrosshairInertion() const { return m_crosshair_inertion; }; float GetFirstBulletDisp() const { return m_first_bullet_controller.get_fire_dispertion(); }; protected: - int iAmmoElapsed; // ammo in magazine, currently - int iMagazineSize; // size (in bullets) of magazine + int iAmmoElapsed; // ammo in magazine, currently + int iMagazineSize; // size (in bullets) of magazine //для подсчета в GetSuitableAmmoTotal mutable int m_iAmmoCurrentTotal; - mutable u32 m_BriefInfo_CalcFrame; //кадр на котором просчитали кол-во патронов + mutable u32 m_BriefInfo_CalcFrame; //кадр на котором просчитали кол-во патронов bool m_bAmmoWasSpawned; virtual bool IsNecessaryItem(const shared_str& item_sect); diff --git a/src/xrGame/WeaponAutomaticShotgun.cpp b/src/xrGame/WeaponAutomaticShotgun.cpp index 585a2482aa6..1faad55e10e 100644 --- a/src/xrGame/WeaponAutomaticShotgun.cpp +++ b/src/xrGame/WeaponAutomaticShotgun.cpp @@ -38,7 +38,7 @@ bool CWeaponAutomaticShotgun::Action(u16 cmd, u32 flags) if (inherited::Action(cmd, flags)) return true; if (m_bTriStateReload && GetState() == eReload && cmd == kWPN_FIRE && flags & CMD_START && - m_sub_state == eSubstateReloadInProcess) //остановить перезагрузку + m_sub_state == eSubstateReloadInProcess) //остановить перезагрузку { AddCartridge(1); m_sub_state = eSubstateReloadEnd; diff --git a/src/xrGame/WeaponBinocularsVision.h b/src/xrGame/WeaponBinocularsVision.h index 8b6ae3e5b3b..ecfc44db904 100644 --- a/src/xrGame/WeaponBinocularsVision.h +++ b/src/xrGame/WeaponBinocularsVision.h @@ -27,7 +27,7 @@ struct SBinocVisibleObj bool operator<(const SBinocVisibleObj& other) const { return m_flags.test(flVisObjNotValid) < other.m_flags.test(flVisObjNotValid); - } // move non-actual to tail + } // move non-actual to tail }; class CBinocularsVision diff --git a/src/xrGame/WeaponFN2000.h b/src/xrGame/WeaponFN2000.h index 6f7dc740acc..c2de797923a 100644 --- a/src/xrGame/WeaponFN2000.h +++ b/src/xrGame/WeaponFN2000.h @@ -15,4 +15,4 @@ class CWeaponFN2000 : public CWeaponMagazined virtual ~CWeaponFN2000(); }; -#endif //__XR_WEAPON_FN2000_H__ +#endif //__XR_WEAPON_FN2000_H__ diff --git a/src/xrGame/WeaponHPSA.h b/src/xrGame/WeaponHPSA.h index ae23d326443..c75e12bdd39 100644 --- a/src/xrGame/WeaponHPSA.h +++ b/src/xrGame/WeaponHPSA.h @@ -16,4 +16,4 @@ class CWeaponHPSA : public CWeaponPistol virtual ~CWeaponHPSA(); }; -#endif //__XR_WEAPON_HPSA_H__ +#endif //__XR_WEAPON_HPSA_H__ diff --git a/src/xrGame/WeaponKnife.cpp b/src/xrGame/WeaponKnife.cpp index d4b2b37e010..8d08a409935 100644 --- a/src/xrGame/WeaponKnife.cpp +++ b/src/xrGame/WeaponKnife.cpp @@ -20,7 +20,7 @@ #ifdef DEBUG #include "debug_renderer.h" extern BOOL g_bDrawBulletHit; -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG CWeaponKnife::CWeaponKnife() { @@ -246,7 +246,7 @@ void CWeaponKnife::switch2_Attacking(u32 state) if (state == eFire) PlayHUDMotion("anm_attack", FALSE, this, state); - else // eFire2 + else // eFire2 PlayHUDMotion("anm_attack2", FALSE, this, state); SetPending(TRUE); @@ -321,47 +321,47 @@ void CWeaponKnife::LoadFireParams(LPCSTR section) s_sHitPowerCritical_2 = pSettings->r_string_wb(section, "hit_power_critical_2"); fvHitPower_2[egdMaster] = - (float)atof(_GetItem(*s_sHitPower_2, 0, buffer)); //первый параметр - это хит для уровня игры мастер + (float)atof(_GetItem(*s_sHitPower_2, 0, buffer)); //первый параметр - это хит для уровня игры мастер fvHitPowerCritical_2[egdMaster] = - (float)atof(_GetItem(*s_sHitPowerCritical_2, 0, buffer)); //первый параметр - это хит для уровня игры мастер + (float)atof(_GetItem(*s_sHitPowerCritical_2, 0, buffer)); //первый параметр - это хит для уровня игры мастер fvHitPower_2[egdNovice] = fvHitPower_2[egdStalker] = fvHitPower_2[egdVeteran] = - fvHitPower_2[egdMaster]; //изначально параметры для других уровней сложности такие же + fvHitPower_2[egdMaster]; //изначально параметры для других уровней сложности такие же fvHitPowerCritical_2[egdNovice] = fvHitPowerCritical_2[egdStalker] = fvHitPowerCritical_2[egdVeteran] = - fvHitPowerCritical_2[egdMaster]; //изначально параметры для других уровней сложности такие же + fvHitPowerCritical_2[egdMaster]; //изначально параметры для других уровней сложности такие же - int num_game_diff_param = _GetItemCount(*s_sHitPower_2); //узнаём колличество параметров для хитов - if (num_game_diff_param > 1) //если задан второй параметр хита + int num_game_diff_param = _GetItemCount(*s_sHitPower_2); //узнаём колличество параметров для хитов + if (num_game_diff_param > 1) //если задан второй параметр хита { fvHitPower_2[egdVeteran] = - (float)atof(_GetItem(*s_sHitPower_2, 1, buffer)); //то вычитываем его для уровня ветерана + (float)atof(_GetItem(*s_sHitPower_2, 1, buffer)); //то вычитываем его для уровня ветерана } - if (num_game_diff_param > 2) //если задан третий параметр хита + if (num_game_diff_param > 2) //если задан третий параметр хита { fvHitPower_2[egdStalker] = - (float)atof(_GetItem(*s_sHitPower_2, 2, buffer)); //то вычитываем его для уровня сталкера + (float)atof(_GetItem(*s_sHitPower_2, 2, buffer)); //то вычитываем его для уровня сталкера } - if (num_game_diff_param > 3) //если задан четвёртый параметр хита + if (num_game_diff_param > 3) //если задан четвёртый параметр хита { fvHitPower_2[egdNovice] = - (float)atof(_GetItem(*s_sHitPower_2, 3, buffer)); //то вычитываем его для уровня новичка + (float)atof(_GetItem(*s_sHitPower_2, 3, buffer)); //то вычитываем его для уровня новичка } - num_game_diff_param = _GetItemCount(*s_sHitPowerCritical_2); //узнаём колличество параметров - if (num_game_diff_param > 1) //если задан второй параметр хита + num_game_diff_param = _GetItemCount(*s_sHitPowerCritical_2); //узнаём колличество параметров + if (num_game_diff_param > 1) //если задан второй параметр хита { fvHitPowerCritical_2[egdVeteran] = - (float)atof(_GetItem(*s_sHitPowerCritical_2, 1, buffer)); //то вычитываем его для уровня ветерана + (float)atof(_GetItem(*s_sHitPowerCritical_2, 1, buffer)); //то вычитываем его для уровня ветерана } - if (num_game_diff_param > 2) //если задан третий параметр хита + if (num_game_diff_param > 2) //если задан третий параметр хита { fvHitPowerCritical_2[egdStalker] = - (float)atof(_GetItem(*s_sHitPowerCritical_2, 2, buffer)); //то вычитываем его для уровня сталкера + (float)atof(_GetItem(*s_sHitPowerCritical_2, 2, buffer)); //то вычитываем его для уровня сталкера } - if (num_game_diff_param > 3) //если задан четвёртый параметр хита + if (num_game_diff_param > 3) //если задан четвёртый параметр хита { fvHitPowerCritical_2[egdNovice] = - (float)atof(_GetItem(*s_sHitPowerCritical_2, 3, buffer)); //то вычитываем его для уровня новичка + (float)atof(_GetItem(*s_sHitPowerCritical_2, 3, buffer)); //то вычитываем его для уровня новичка } fHitImpulse_2 = pSettings->r_float(section, "hit_impulse_2"); @@ -604,7 +604,7 @@ void CWeaponKnife::fill_shots_list( break; } break; - }; // switch (tmp_bone_data.shape.type)*/ + }; // switch (tmp_bone_data.shape.type)*/ if (intersect_res) { victims_hits_count_t::iterator tmp_vhits_iter = m_victims_hits_count.find(curr_bone.m_victim_id); if (m_perv_hits_count && (tmp_vhits_iter == m_victims_hits_count.end())) { @@ -645,7 +645,7 @@ void CWeaponKnife::make_hit_sort_vectors(Fvector& basis_hit_specific, float& max basis_hit_specific.set(0.f, 1.f, 0.f); max_dist = 0.2; } - else // if (m_eHitType == m_eHitType_2) + else // if (m_eHitType == m_eHitType_2) { // basis_hit_specific1.set(0.f, -1.f, 0.f); basis_hit_specific.set(1.f, 0.f, 0.f); @@ -686,7 +686,7 @@ u32 CWeaponKnife::SelectHitsToShot(shot_targets_t& dst_dirs, Fvector const& f_po if (m_eHitType == m_eHitType_1) { basis_vector.set(hit1_basis_vector); } - else // if (m_eHitType == m_eHitType_2) + else // if (m_eHitType == m_eHitType_2) { basis_vector.set(hit2_basis_vector); } @@ -748,7 +748,7 @@ BOOL CWeaponKnife::RayQueryCallback(collide::rq_result& result, LPVOID this_ptr) CWeaponKnife* me = static_cast(this_ptr); if (result.O && (result.O->ID() != me->m_except_id)) { me->m_last_picked_obj = result.O; - return FALSE; // first hit + return FALSE; // first hit } return TRUE; } diff --git a/src/xrGame/WeaponKnife.h b/src/xrGame/WeaponKnife.h index bd7b48f754e..e380527cfad 100644 --- a/src/xrGame/WeaponKnife.h +++ b/src/xrGame/WeaponKnife.h @@ -122,7 +122,7 @@ class CWeaponKnife : public CWeapon CCF_Skeleton::SElement const* m_bone_element; u16 m_victim_id; u16 m_shots_count; - }; // struct victim_bone_data + }; // struct victim_bone_data typedef AssociativeVector victims_hits_count_t; typedef buffer_vector> victims_shapes_list_t; @@ -143,7 +143,7 @@ class CWeaponKnife : public CWeapon CWeaponKnife* m_owner; Fvector m_start_pos; float m_query_distance; - }; // class victim_filter + }; // class victim_filter class best_victim_selector { public: @@ -161,7 +161,7 @@ class CWeaponKnife : public CWeapon float m_query_distance; u16 m_except_id; spartial_base_t::value_type& m_dest_result; - }; // struct best_victim_selector + }; // struct best_victim_selector static bool shapes_compare_predicate( victims_shapes_list_t::value_type const& left, victims_shapes_list_t::value_type const& right) diff --git a/src/xrGame/WeaponLR300.h b/src/xrGame/WeaponLR300.h index 8551ad05797..0887c2f36bc 100644 --- a/src/xrGame/WeaponLR300.h +++ b/src/xrGame/WeaponLR300.h @@ -22,4 +22,4 @@ class CWeaponLR300 : public CWeaponMagazined virtual ~CWeaponLR300(); }; -#endif //__XR_WEAPON_LR300_H__ +#endif //__XR_WEAPON_LR300_H__ diff --git a/src/xrGame/WeaponMagazined.cpp b/src/xrGame/WeaponMagazined.cpp index c5c887b6893..bbe59d8d018 100644 --- a/src/xrGame/WeaponMagazined.cpp +++ b/src/xrGame/WeaponMagazined.cpp @@ -140,7 +140,7 @@ void CWeaponMagazined::FireStart() } } else - { // misfire + { // misfire if (smart_cast(this->H_Parent()) && (Level().CurrentViewEntity() == H_Parent())) CurrentGameUI()->AddCustomStatic("gun_jammed", true); @@ -556,16 +556,16 @@ void CWeaponMagazined::OnAnimationEnd(u32 state) case eReload: ReloadMagazine(); SwitchState(eIdle); - break; // End of reload animation + break; // End of reload animation case eHiding: SwitchState(eHidden); - break; // End of Hide + break; // End of Hide case eShowing: SwitchState(eIdle); - break; // End of Show + break; // End of Show case eIdle: switch2_Idle(); - break; // Keep showing idle + break; // Keep showing idle } inherited::OnAnimationEnd(state); } @@ -605,7 +605,7 @@ void CWeaponMagazined::switch2_Fire() } #else if (!io) return; -#endif // DEBUG +#endif // DEBUG // // VERIFY2( @@ -1099,7 +1099,7 @@ float CWeaponMagazined::GetWeaponDeterioration() { // modified by Peacemaker [17.10.08] // if (!m_bHasDifferentFireModes || m_iPrefferedFireMode == -1 || u32(GetCurrentFireMode()) <= - //u32(m_iPrefferedFireMode)) + // u32(m_iPrefferedFireMode)) // return inherited::GetWeaponDeterioration(); // return m_iShotNum*conditionDecreasePerShot; return (m_iShotNum == 1) ? conditionDecreasePerShot : conditionDecreasePerQueueShot; @@ -1163,7 +1163,7 @@ bool CWeaponMagazined::GetBriefInfo(II_BriefInfo& info) if (m_pInventory->ModifyFrame() <= m_BriefInfo_CalcFrame) { return false; } - GetSuitableAmmoTotal(); // update m_BriefInfo_CalcFrame + GetSuitableAmmoTotal(); // update m_BriefInfo_CalcFrame info.grenade = ""; u32 at_size = m_ammoTypes.size(); @@ -1175,7 +1175,7 @@ bool CWeaponMagazined::GetBriefInfo(II_BriefInfo& info) { // GetSuitableAmmoTotal(); //mp = all type - xr_sprintf(int_str, "%d", GetAmmoCount(0)); // !!!!!!!!!!! == 0 temp + xr_sprintf(int_str, "%d", GetAmmoCount(0)); // !!!!!!!!!!! == 0 temp if (m_ammoType == 0) info.fmj_ammo = int_str; else diff --git a/src/xrGame/WeaponPM.h b/src/xrGame/WeaponPM.h index f357899334d..f46e6d7f2c9 100644 --- a/src/xrGame/WeaponPM.h +++ b/src/xrGame/WeaponPM.h @@ -16,4 +16,4 @@ class CWeaponPM : public CWeaponPistol virtual ~CWeaponPM(); }; -#endif //__XR_WEAPON_PM_H__ +#endif //__XR_WEAPON_PM_H__ diff --git a/src/xrGame/WeaponRG6.cpp b/src/xrGame/WeaponRG6.cpp index 8c841b858de..e2274aa30e2 100644 --- a/src/xrGame/WeaponRG6.cpp +++ b/src/xrGame/WeaponRG6.cpp @@ -100,7 +100,7 @@ void CWeaponRG6::FireStart() #endif*/ if (canfire0 != 0) { // Msg ("d[%f,%f,%f] - res [%f,%f,%f]", d.x, d.y, d.z, res[0].x, res[0].y, - //res[0].z); + // res[0].z); d = res[0]; }; } diff --git a/src/xrGame/WeaponRPG7.h b/src/xrGame/WeaponRPG7.h index e30be1b20a5..d46f66fcfb6 100644 --- a/src/xrGame/WeaponRPG7.h +++ b/src/xrGame/WeaponRPG7.h @@ -27,7 +27,7 @@ class CWeaponRPG7 : public CWeaponCustomPistol, public CRocketLauncher void UpdateMissileVisibility(); virtual void UnloadMagazine(bool spawn_ammo = true); - virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Import(NET_Packet& P); // import from server protected: virtual bool AllowBore(); virtual void PlayAnimReload(); diff --git a/src/xrGame/WeaponSVD.cpp b/src/xrGame/WeaponSVD.cpp index 7bbcd98b8f1..a4a1de9bc39 100644 --- a/src/xrGame/WeaponSVD.cpp +++ b/src/xrGame/WeaponSVD.cpp @@ -25,7 +25,7 @@ void CWeaponSVD::OnAnimationEnd(u32 state) { case eFire: { SetPending(FALSE); } - break; // End of reload animation + break; // End of reload animation } inherited::OnAnimationEnd(state); } diff --git a/src/xrGame/WeaponShotgun.cpp b/src/xrGame/WeaponShotgun.cpp index 5c7c478feef..3d00fa92fbe 100644 --- a/src/xrGame/WeaponShotgun.cpp +++ b/src/xrGame/WeaponShotgun.cpp @@ -49,7 +49,7 @@ bool CWeaponShotgun::Action(u16 cmd, u32 flags) if (inherited::Action(cmd, flags)) return true; if (m_bTriStateReload && GetState() == eReload && cmd == kWPN_FIRE && flags & CMD_START && - m_sub_state == eSubstateReloadInProcess) //остановить перезагрузку + m_sub_state == eSubstateReloadInProcess) //остановить перезагрузку { AddCartridge(1); m_sub_state = eSubstateReloadEnd; diff --git a/src/xrGame/WeaponStatMgun.cpp b/src/xrGame/WeaponStatMgun.cpp index 9fa1681a743..6c2f30c1ed2 100644 --- a/src/xrGame/WeaponStatMgun.cpp +++ b/src/xrGame/WeaponStatMgun.cpp @@ -131,14 +131,14 @@ void CWeaponStatMgun::net_Destroy() processing_deactivate(); } -void CWeaponStatMgun::net_Export(NET_Packet& P) // export to server +void CWeaponStatMgun::net_Export(NET_Packet& P) // export to server { inheritedPH::net_Export(P); P.w_u8(IsWorking() ? 1 : 0); save_data(m_destEnemyDir, P); } -void CWeaponStatMgun::net_Import(NET_Packet& P) // import from server +void CWeaponStatMgun::net_Import(NET_Packet& P) // import from server { inheritedPH::net_Import(P); u8 state = P.r_u8(); @@ -187,7 +187,7 @@ void CWeaponStatMgun::UpdateBarrelDir() XFi.invert(XFORM()); Fvector dep; XFi.transform_dir(dep, m_destEnemyDir); - { // x angle + { // x angle m_i_bind_x_xform.transform_dir(dep); dep.normalize(); m_tgt_x_rot = angle_normalize_signed(m_bind_x_rot - dep.getP()); @@ -196,7 +196,7 @@ void CWeaponStatMgun::UpdateBarrelDir() clamp(m_tgt_x_rot, -m_lim_x_rot.y, -m_lim_x_rot.x); if (!fsimilar(sv_x, m_tgt_x_rot, EPS_L)) m_allow_fire = FALSE; } - { // y angle + { // y angle m_i_bind_y_xform.transform_dir(dep); dep.normalize(); m_tgt_y_rot = angle_normalize_signed(m_bind_y_rot - dep.getH()); diff --git a/src/xrGame/WeaponStatMgun.h b/src/xrGame/WeaponStatMgun.h index 0d38200bee7..e2b0c8f3776 100644 --- a/src/xrGame/WeaponStatMgun.h +++ b/src/xrGame/WeaponStatMgun.h @@ -38,8 +38,8 @@ class CWeaponStatMgun : public CPhysicsShellHolder, public CHolderCustom, public virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); - virtual void net_Export(NET_Packet& P); // export to server - virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server virtual void UpdateCL(); @@ -53,7 +53,7 @@ class CWeaponStatMgun : public CPhysicsShellHolder, public CHolderCustom, public Fvector m_fire_dir, m_fire_pos; Fmatrix m_i_bind_x_xform, m_i_bind_y_xform, m_fire_bone_xform; - Fvector2 m_lim_x_rot, m_lim_y_rot; // in bone space + Fvector2 m_lim_x_rot, m_lim_y_rot; // in bone space CCartridge* m_Ammo; float m_barrel_speed; Fvector2 m_dAngle; diff --git a/src/xrGame/WeaponUpgrade.cpp b/src/xrGame/WeaponUpgrade.cpp index aa33a86b8eb..828ed232160 100644 --- a/src/xrGame/WeaponUpgrade.cpp +++ b/src/xrGame/WeaponUpgrade.cpp @@ -86,8 +86,7 @@ bool CWeapon::install_upgrade_disp(LPCSTR section, bool test) VERIFY(!fis_zero(cam_recoil.MaxAngleVert)); VERIFY(!fis_zero(cam_recoil.MaxAngleHorz)); - result |= - process_if_exists_deg2rad(section, "zoom_cam_relax_speed", zoom_cam_recoil.RelaxSpeed, test); // zoom_ ... + result |= process_if_exists_deg2rad(section, "zoom_cam_relax_speed", zoom_cam_recoil.RelaxSpeed, test); // zoom_ ... result |= process_if_exists_deg2rad(section, "zoom_cam_relax_speed_ai", zoom_cam_recoil.RelaxSpeed_AI, test); result |= process_if_exists_deg2rad(section, "zoom_cam_dispersion", zoom_cam_recoil.Dispersion, test); result |= process_if_exists_deg2rad(section, "zoom_cam_dispersion_inc", zoom_cam_recoil.DispersionInc, test); @@ -190,13 +189,13 @@ bool CWeapon::install_upgrade_hit(LPCSTR section, bool test) */ result |= process_if_exists_set(section, "use_aim_bullet", &CInifile::r_bool, m_bUseAimBullet, test); - if (m_bUseAimBullet) // first super bullet + if (m_bUseAimBullet) // first super bullet { result |= process_if_exists(section, "time_to_aim", &CInifile::r_float, m_fTimeToAim, test); } // LPCSTR weapon_section = cNameSect().c_str(); - float rpm = 60.0f / fOneShotTime; // pSettings->r_float( weapon_section, "rpm" ); // fOneShotTime * 60.0f; + float rpm = 60.0f / fOneShotTime; // pSettings->r_float( weapon_section, "rpm" ); // fOneShotTime * 60.0f; result2 = process_if_exists(section, "rpm", &CInifile::r_float, rpm, test); if (result2 && !test) { VERIFY(rpm > 0.0f); diff --git a/src/xrGame/account_manager.cpp b/src/xrGame/account_manager.cpp index cd265c78d33..34ff7ab4c4c 100644 --- a/src/xrGame/account_manager.cpp +++ b/src/xrGame/account_manager.cpp @@ -2,8 +2,8 @@ #include "stdafx.h" #include "xrGameSpy/GameSpy_GP.h" -#include "MainMenu.h" //for accesssing to login_manager, if there's deleting profile -#include "login_manager.h" //for deleting profile (verifying) and deleting profile class instance +#include "MainMenu.h" //for accesssing to login_manager, if there's deleting profile +#include "login_manager.h" //for deleting profile (verifying) and deleting profile class instance #define GP_UNIQUENICK_MIN_LEN 3 @@ -466,4 +466,4 @@ void __cdecl account_manager::search_profile_cb(GPConnection* connection, void* tmp_cb(true, first_match->nick); } -} // namespace gamespy_gp \ No newline at end of file +} // namespace gamespy_gp \ No newline at end of file diff --git a/src/xrGame/account_manager.h b/src/xrGame/account_manager.h index 0ef7d42f674..8bd604978aa 100644 --- a/src/xrGame/account_manager.h +++ b/src/xrGame/account_manager.h @@ -17,7 +17,7 @@ struct new_profile_data shared_str email; shared_str password; // shared_str cd_key; -}; // struct new_account_data +}; // struct new_account_data typedef mixed_delegate account_operation_cb; @@ -125,8 +125,8 @@ class account_manager : private Noncopyable /*static void __cdecl profiles_cb (GPConnection * connection, void * arg, void * param);*/ -}; // class account_manager -} // namespace gamespy_gp +}; // class account_manager +} // namespace gamespy_gp typedef gamespy_gp::account_manager gamespy_gp_account_manager; typedef gamespy_gp::suggest_nicks_cb gamespy_gp_suggest_nicks_cb; @@ -134,4 +134,4 @@ typedef gamespy_gp::account_operation_cb gamespy_gp_account_operation_cb; typedef gamespy_gp::account_profiles_cb gamespy_gp_account_profiles_cb; typedef gamespy_gp::found_email_cb gamespy_gp_found_email_cb; -#endif //#ifndef ACCOUNT_MANAGER +#endif //#ifndef ACCOUNT_MANAGER diff --git a/src/xrGame/account_manager_console.h b/src/xrGame/account_manager_console.h index 5e3f6f5a2a5..1f1234709b9 100644 --- a/src/xrGame/account_manager_console.h +++ b/src/xrGame/account_manager_console.h @@ -13,7 +13,7 @@ class CCC_CreateGameSpyAccount : public IConsole_Command { xr_strcpy(I, "Creates GameSpy account:gs_create_account "); } -}; // CCC_CreateGameSpyAccount +}; // CCC_CreateGameSpyAccount class CCC_GapySpyListProfiles : public IConsole_Command { @@ -21,7 +21,7 @@ class CCC_GapySpyListProfiles : public IConsole_Command CCC_GapySpyListProfiles(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = false; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Lists account profiles : gs_list_profiles "); } -}; // CCC_GapySpyListProfiles +}; // CCC_GapySpyListProfiles class CCC_GameSpyLogin : public IConsole_Command { @@ -29,7 +29,7 @@ class CCC_GameSpyLogin : public IConsole_Command CCC_GameSpyLogin(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = false; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Logins to GameSpy: gs_login "); } -}; // CCC_GameSpyLogin +}; // CCC_GameSpyLogin class CCC_GameSpyLogout : public IConsole_Command { @@ -37,7 +37,7 @@ class CCC_GameSpyLogout : public IConsole_Command CCC_GameSpyLogout(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = true; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Logouts from the GameSpy session."); } -}; // CCC_GameSpyLogout +}; // CCC_GameSpyLogout class CCC_GameSpyPrintProfile : public IConsole_Command { @@ -45,7 +45,7 @@ class CCC_GameSpyPrintProfile : public IConsole_Command CCC_GameSpyPrintProfile(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = true; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Prints current profile information."); } -}; // CCC_GameSpyPrintProfile +}; // CCC_GameSpyPrintProfile class CCC_GameSpySuggestUNicks : public IConsole_Command { @@ -53,7 +53,7 @@ class CCC_GameSpySuggestUNicks : public IConsole_Command CCC_GameSpySuggestUNicks(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = false; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Suggests unique nicks"); } -}; // CCC_GameSpySuggestUNicks +}; // CCC_GameSpySuggestUNicks class CCC_GameSpyRegisterUniqueNick : public IConsole_Command { @@ -61,7 +61,7 @@ class CCC_GameSpyRegisterUniqueNick : public IConsole_Command CCC_GameSpyRegisterUniqueNick(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = false; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Registers new unique nick to the current profile"); } -}; // CCC_GameSpySuggestUNicks +}; // CCC_GameSpySuggestUNicks class CCC_GameSpyDeleteProfile : public IConsole_Command { @@ -69,7 +69,7 @@ class CCC_GameSpyDeleteProfile : public IConsole_Command CCC_GameSpyDeleteProfile(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = true; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Deletes current profile."); } -}; // CCC_GameSpyDeleteProfile +}; // CCC_GameSpyDeleteProfile class CCC_GameSpyProfile : public IConsole_Command { @@ -77,6 +77,6 @@ class CCC_GameSpyProfile : public IConsole_Command CCC_GameSpyProfile(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = false; }; virtual void Execute(LPCSTR args); virtual void Info(TInfo& I) { xr_strcpy(I, "Loads current profile information."); } -}; // CCC_GameSpyProfile +}; // CCC_GameSpyProfile -#endif //#ifndef ACCOUNT_MANAGER_CONSOLE \ No newline at end of file +#endif //#ifndef ACCOUNT_MANAGER_CONSOLE \ No newline at end of file diff --git a/src/xrGame/accumulative_states.h b/src/xrGame/accumulative_states.h index 69fd69239db..4ef73af2198 100644 --- a/src/xrGame/accumulative_states.h +++ b/src/xrGame/accumulative_states.h @@ -44,7 +44,7 @@ enum enum_accumulative_player_values acpv_thunder_count, acpv_killer_victim_angle, acpv_count, -}; // enum enum_accumulative_player_values +}; // enum enum_accumulative_player_values namespace detail { @@ -53,8 +53,8 @@ struct accumulative_pair_t { static enum_accumulative_player_values const value_id = ValueId; typedef T value_type; -}; // struct accumulative_pair_t -} // namespace detail +}; // struct accumulative_pair_t +} // namespace detail #define ACCUMULATIVE_STATE_LIST Loki::NullType #define ADD_ACCUMULATIVE_STATE(id, type) \ @@ -62,6 +62,6 @@ struct accumulative_pair_t Accumulative_State_Type_##type; #define SAVE_TYPE_LIST(id, type) Accumulative_State_Type_##type -} // namespace award_system +} // namespace award_system -#endif //#ifndef ACCUMULATIVE_STATES_INCLUDED \ No newline at end of file +#endif //#ifndef ACCUMULATIVE_STATES_INCLUDED \ No newline at end of file diff --git a/src/xrGame/action_planner_inline.h b/src/xrGame/action_planner_inline.h index 4fedc329b1b..3018deccaf6 100644 --- a/src/xrGame/action_planner_inline.h +++ b/src/xrGame/action_planner_inline.h @@ -80,8 +80,9 @@ void CPlanner::update() show_current_world_state(); show_target_world_state(); - // VERIFY2 (!m_failed,"Problem solver couldn't build a valid path - verify your conditions, - //effects and goals!"); + // VERIFY2 (!m_failed,"Problem solver couldn't build a valid path - verify your + //conditions, + // effects and goals!"); } #endif @@ -168,7 +169,7 @@ LPCSTR CPlanner::action2string(const _action_id_type& action_id) TEMPLATE_SPECIALIZATION LPCSTR CPlanner::property2string(const _condition_type& property_id) { - return (evaluator(property_id).m_evaluator_name); // itoa(property_id,m_temp_string,10)); + return (evaluator(property_id).m_evaluator_name); // itoa(property_id,m_temp_string,10)); } TEMPLATE_SPECIALIZATION diff --git a/src/xrGame/action_planner_script.cpp b/src/xrGame/action_planner_script.cpp index aed98a1d20c..a65579d5ab9 100644 --- a/src/xrGame/action_planner_script.cpp +++ b/src/xrGame/action_planner_script.cpp @@ -56,7 +56,7 @@ IC static void CScriptActionPlanner_Export(lua_State* luaState) .def("clear", &CScriptActionPlanner::clear) #ifdef LOG_ACTION .def("show", &CScriptActionPlanner::show) -#endif // LOG_ACTION +#endif // LOG_ACTION , def("cast_planner", &cast_planner)]; diff --git a/src/xrGame/actor_communication.cpp b/src/xrGame/actor_communication.cpp index 747ee24d8b3..4df68dbdcd6 100644 --- a/src/xrGame/actor_communication.cpp +++ b/src/xrGame/actor_communication.cpp @@ -205,4 +205,4 @@ void CActor::DumpTasks() { Level().GameTaskManager().DumpTasks(); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/actor_defs.h b/src/xrGame/actor_defs.h index cae28e55530..25cbea8272f 100644 --- a/src/xrGame/actor_defs.h +++ b/src/xrGame/actor_defs.h @@ -45,7 +45,7 @@ enum EMoveCommand mcLLookout = (1ul << 13ul), mcRLookout = (1ul << 14ul), mcAnyMove = (mcFwd | mcBack | mcLStrafe | mcRStrafe), - mcAnyAction = (mcAnyMove | mcJump | mcFall | mcLanding | mcLanding2), // mcTurn| + mcAnyAction = (mcAnyMove | mcJump | mcFall | mcLanding | mcLanding2), // mcTurn| mcAnyState = (mcCrouch | mcAccel | mcClimb | mcSprint), mcLookout = (mcLLookout | mcRLookout), }; @@ -94,12 +94,12 @@ struct net_input //------------------------------ struct net_update { - u32 dwTimeStamp; // server(game) timestamp - float o_model; // model yaw - SRotation o_torso; // torso in world coords - Fvector p_pos; // in world coords - Fvector p_accel; // in world coords - Fvector p_velocity; // in world coords + u32 dwTimeStamp; // server(game) timestamp + float o_model; // model yaw + SRotation o_torso; // torso in world coords + Fvector p_pos; // in world coords + Fvector p_accel; // in world coords + Fvector p_velocity; // in world coords u32 mstate; int weapon; float fHealth; @@ -132,8 +132,8 @@ struct InterpData { Fvector Pos; Fvector Vel; - float o_model; // model yaw - SRotation o_torso; // torso in world coords + float o_model; // model yaw + SRotation o_torso; // torso in world coords }; -}; // namespace ACTOR_DEFS +}; // namespace ACTOR_DEFS diff --git a/src/xrGame/actor_mp_client.h b/src/xrGame/actor_mp_client.h index baaf6f3fa46..cced334037b 100644 --- a/src/xrGame/actor_mp_client.h +++ b/src/xrGame/actor_mp_client.h @@ -38,4 +38,4 @@ class CActorMP : public IAnticheatDumpable, public CActor void use_booster(NET_Packet& packet); }; -#endif // ACTOR_MP_CLIENT_H \ No newline at end of file +#endif // ACTOR_MP_CLIENT_H \ No newline at end of file diff --git a/src/xrGame/actor_mp_client_export.cpp b/src/xrGame/actor_mp_client_export.cpp index 29f83547ec0..b61e4d6c7ae 100644 --- a/src/xrGame/actor_mp_client_export.cpp +++ b/src/xrGame/actor_mp_client_export.cpp @@ -40,7 +40,8 @@ void CActorMP::fill_state(actor_mp_state& state) { if (OnClient()) { // R_ASSERT (g_Alive()); - // R_ASSERT2 (PHGetSyncItemsNumber() == 1,make_string("PHGetSyncItemsNumber() returned %d, health = + // R_ASSERT2 (PHGetSyncItemsNumber() == 1,make_string("PHGetSyncItemsNumber() returned %d, health + // = // %.2f",PHGetSyncItemsNumber(),GetfHealth())); } @@ -62,7 +63,7 @@ void CActorMP::fill_state(actor_mp_state& state) // Msg ("camera_pitch : [%f]",angle_normalize(unaffected_r_torso.pitch)); // Msg ("camera_roll : [%f]",angle_normalize(unaffected_r_torso.roll)); // } -#endif // 0 +#endif // 0 state.physics_quaternion = State.quaternion; state.physics_angular_velocity = State.angular_vel; diff --git a/src/xrGame/actor_mp_client_import.cpp b/src/xrGame/actor_mp_client_import.cpp index f47ca2b0cee..aed116a841d 100644 --- a/src/xrGame/actor_mp_client_import.cpp +++ b/src/xrGame/actor_mp_client_import.cpp @@ -49,7 +49,7 @@ void CActorMP::net_Import(NET_Packet& P) if (OnClient() && (inventory().GetActiveSlot() != ActiveSlot)) { #ifdef DEBUG Msg("Client-SetActiveSlot[%d][%d]", ActiveSlot, Device.dwFrame); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG inventory().SetActiveSlot(ActiveSlot); } diff --git a/src/xrGame/actor_mp_server.cpp b/src/xrGame/actor_mp_server.cpp index 3fbc8042f94..dc7565e056a 100644 --- a/src/xrGame/actor_mp_server.cpp +++ b/src/xrGame/actor_mp_server.cpp @@ -13,7 +13,7 @@ void CSE_ActorMP::STATE_Read(NET_Packet& packet, u16 size) #ifdef DEBUG Msg("--- Actor %d[%s] STATE_Read, health is: %2.04f", this->ID, this->name_replace(), m_state_holder.state().health); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void CSE_ActorMP::STATE_Write(NET_Packet& packet) @@ -22,7 +22,7 @@ void CSE_ActorMP::STATE_Write(NET_Packet& packet) #ifdef DEBUG Msg("--- Actor %d[%s] STATE_Write, health is: %2.04f", this->ID, this->name_replace(), m_state_holder.state().health); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } BOOL CSE_ActorMP::Net_Relevant() diff --git a/src/xrGame/actor_mp_server.h b/src/xrGame/actor_mp_server.h index 0c70704a234..b006fba9f77 100644 --- a/src/xrGame/actor_mp_server.h +++ b/src/xrGame/actor_mp_server.h @@ -29,4 +29,4 @@ class CSE_ActorMP : public CSE_ALifeCreatureActor #endif }; -#endif // ACTOR_MP_SERVER_H \ No newline at end of file +#endif // ACTOR_MP_SERVER_H \ No newline at end of file diff --git a/src/xrGame/actor_mp_state.cpp b/src/xrGame/actor_mp_state.cpp index 78b28bfdf18..fbed4d1b7bf 100644 --- a/src/xrGame/actor_mp_state.cpp +++ b/src/xrGame/actor_mp_state.cpp @@ -22,7 +22,7 @@ enum physics_state_enabled_flag = u32(1) << 14, #ifdef USE_LOGIC_ACCELERATION logic_acceleration_flag = u32(1) << 15, -#endif // USE_LOGIC_ACCELERATION +#endif // USE_LOGIC_ACCELERATION }; #if 0 @@ -32,7 +32,7 @@ enum { is_camera_yaw_the_same_as_model_yaw = u32(1) << 2, is_physics_state_enabled = u32(1) << 3, }; -#endif // 0 +#endif // 0 enum { @@ -66,15 +66,15 @@ IC bool is_similar(const u16& _0, const u16& _1) { return (_0 == _1); } -#endif // USE_DIFFERENCES +#endif // USE_DIFFERENCES IC bool actor_mp_state_holder::check(const int& flag) const { #ifdef USE_DIFFERENCES return (!!(m_mask & flag)); -#else // USE_DIFFERENCES +#else // USE_DIFFERENCES return (true); -#endif // USE_DIFFERENCES +#endif // USE_DIFFERENCES } IC void write(const u32& bit_count, const u32& value, u32& current, u32& output) @@ -141,15 +141,15 @@ bool actor_mp_state_holder::relevant(const actor_mp_state& state) m_mask |= is_similar(m_state.physics_state_enabled, state.physics_state_enabled) ? physics_state_enabled_flag : 0; #ifdef USE_LOGIC_ACCELERATION m_mask |= is_similar(m_state.logic_acceleration, state.logic_acceleration) ? logic_acceleration_flag : 0; -#endif // USE_LOGIC_ACCELERATION -#endif // USE_DIFFERENCES +#endif // USE_LOGIC_ACCELERATION +#endif // USE_DIFFERENCES m_state = state; #ifdef USE_DIFFERENCES return (!!m_mask); -#else // USE_DIFFERENCES +#else // USE_DIFFERENCES return (true); -#endif // USE_DIFFERENCES +#endif // USE_DIFFERENCES } void actor_mp_state_holder::write(NET_Packet& packet) @@ -157,7 +157,7 @@ void actor_mp_state_holder::write(NET_Packet& packet) #ifdef USE_DIFFERENCES R_ASSERT(m_mask); packet.w_u32(m_mask); -#endif // USE_DIFFERENCES +#endif // USE_DIFFERENCES packet.w_u32(m_state.time); @@ -178,22 +178,22 @@ void actor_mp_state_holder::write(NET_Packet& packet) if (check(physics_position_y_flag)) packet.w_float(m_state.physics_position.y); if (check(physics_position_z_flag)) packet.w_float(m_state.physics_position.z); if (check(model_yaw_flag)) - packet.w_float(m_state.model_yaw); // packet.w_float_q8 (m_state.model_yaw ,0.f ,PI_MUL_2); + packet.w_float(m_state.model_yaw); // packet.w_float_q8 (m_state.model_yaw ,0.f ,PI_MUL_2); if (check(camera_yaw_flag)) packet.w_float_q8( - m_state.camera_yaw, 0.f, PI_MUL_2); // packet.w_float (m_state.camera_yaw ); + m_state.camera_yaw, 0.f, PI_MUL_2); // packet.w_float (m_state.camera_yaw ); if (check(camera_pitch_flag)) packet.w_float_q8( - m_state.camera_pitch, 0.f, PI_MUL_2); // packet.w_float (m_state.camera_pitch ); + m_state.camera_pitch, 0.f, PI_MUL_2); // packet.w_float (m_state.camera_pitch ); if (check(camera_roll_flag)) packet.w_float_q8( - m_state.camera_roll, 0.f, PI_MUL_2); // packet.w_float (m_state.camera_roll ); + m_state.camera_roll, 0.f, PI_MUL_2); // packet.w_float (m_state.camera_roll ); #ifdef USE_LOGIC_ACCELERATION if (check(logic_acceleration_flag)) packet.w_sdir(m_state.logic_acceleration); -#else // USE_LOGIC_ACCELERATION +#else // USE_LOGIC_ACCELERATION m_state.logic_acceleration.set(0.f, 0.f, 0.f); -#endif // USE_LOGIC_ACCELERATION +#endif // USE_LOGIC_ACCELERATION u32 current = 0; u32 output = 0; @@ -222,7 +222,7 @@ void actor_mp_state_holder::read(NET_Packet& packet) { #ifdef USE_DIFFERENCES packet.r_u32(m_mask); -#endif // USE_DIFFERENCES +#endif // USE_DIFFERENCES packet.r_u32(m_state.time); @@ -239,22 +239,22 @@ void actor_mp_state_holder::read(NET_Packet& packet) if (check(physics_position_y_flag)) packet.r_float(m_state.physics_position.y); if (check(physics_position_z_flag)) packet.r_float(m_state.physics_position.z); if (check(model_yaw_flag)) - packet.r_float(m_state.model_yaw); // packet.r_float_q8 (m_state.model_yaw,0.f,PI_MUL_2 ); + packet.r_float(m_state.model_yaw); // packet.r_float_q8 (m_state.model_yaw,0.f,PI_MUL_2 ); if (check(camera_yaw_flag)) packet.r_float_q8( - m_state.camera_yaw, 0.f, PI_MUL_2); // packet.r_float (m_state.camera_yaw ); + m_state.camera_yaw, 0.f, PI_MUL_2); // packet.r_float (m_state.camera_yaw ); if (check(camera_pitch_flag)) packet.r_float_q8( - m_state.camera_pitch, 0.f, PI_MUL_2); // packet.r_float (m_state.camera_pitch ); + m_state.camera_pitch, 0.f, PI_MUL_2); // packet.r_float (m_state.camera_pitch ); if (check(camera_roll_flag)) packet.r_float_q8( - m_state.camera_roll, 0.f, PI_MUL_2); // packet.r_float (m_state.camera_roll ); + m_state.camera_roll, 0.f, PI_MUL_2); // packet.r_float (m_state.camera_roll ); #ifdef USE_LOGIC_ACCELERATION if (check(logic_acceleration_flag)) packet.r_sdir(m_state.logic_acceleration); -#else // USE_LOGIC_ACCELERATION +#else // USE_LOGIC_ACCELERATION m_state.logic_acceleration.set(0.f, 0.f, 0.f); -#endif // USE_LOGIC_ACCELERATION +#endif // USE_LOGIC_ACCELERATION m_state.position = m_state.physics_position; diff --git a/src/xrGame/actor_mp_state.h b/src/xrGame/actor_mp_state.h index 3c0f8de4e24..851059a8349 100644 --- a/src/xrGame/actor_mp_state.h +++ b/src/xrGame/actor_mp_state.h @@ -11,15 +11,15 @@ struct actor_mp_state Fvector physics_force; Fvector physics_torque; Fvector physics_position; - Fvector position; // should be removed in future(?) + Fvector position; // should be removed in future(?) Fvector logic_acceleration; float model_yaw; - float camera_yaw; // should be removed in future - float camera_pitch; // should be removed in future - float camera_roll; // should be removed in future + float camera_yaw; // should be removed in future + float camera_pitch; // should be removed in future + float camera_roll; // should be removed in future - u32 time; // should be removed + u32 time; // should be removed float health; float radiation; @@ -34,7 +34,7 @@ class actor_mp_state_holder private: #ifdef USE_DIFFERENCES u32 m_mask; -#endif // USE_DIFFERENCES +#endif // USE_DIFFERENCES actor_mp_state m_state; private: @@ -50,4 +50,4 @@ class actor_mp_state_holder #include "actor_mp_state_inline.h" -#endif // ACTOR_MP_STATE_H \ No newline at end of file +#endif // ACTOR_MP_STATE_H \ No newline at end of file diff --git a/src/xrGame/actor_mp_state_inline.h b/src/xrGame/actor_mp_state_inline.h index b7963b2c677..6cf911f98eb 100644 --- a/src/xrGame/actor_mp_state_inline.h +++ b/src/xrGame/actor_mp_state_inline.h @@ -12,4 +12,4 @@ IC const actor_mp_state& actor_mp_state_holder::state() const return (m_state); } -#endif // ACTOR_MP_STATE_INLINE_H \ No newline at end of file +#endif // ACTOR_MP_STATE_INLINE_H \ No newline at end of file diff --git a/src/xrGame/actor_statistic_mgr.cpp b/src/xrGame/actor_statistic_mgr.cpp index 4ac9aa7cbc7..3f95020c41a 100644 --- a/src/xrGame/actor_statistic_mgr.cpp +++ b/src/xrGame/actor_statistic_mgr.cpp @@ -55,7 +55,7 @@ void SStatSectionData::load(IReader& stream) case 0: key = "foo"; break; } s32 tmp2; - load_data(tmp2, stream); // old total_points + load_data(tmp2, stream); // old total_points } else load_data(key, stream); @@ -146,7 +146,7 @@ s32 CActorStatisticMgr::GetSectionPoints(const shared_str& key) if (key != "total") return GetSection(key).GetTotalPoints(); else - { // total + { // total s32 _total = -1; vStatSectionData& d = GetStorage(); vStatSectionData::iterator it = d.begin(); diff --git a/src/xrGame/agent_enemy_manager.cpp b/src/xrGame/agent_enemy_manager.cpp index b5df4a166f7..c8c18693848 100644 --- a/src/xrGame/agent_enemy_manager.cpp +++ b/src/xrGame/agent_enemy_manager.cpp @@ -410,7 +410,7 @@ void CAgentEnemyManager::assign_wounded() { VERIFY(m_only_wounded_left); -#if 0 // def DEBUG +#if 0 // def DEBUG u32 enemy_mask = 0; ENEMIES::iterator I = m_enemies.begin(); ENEMIES::iterator E = m_enemies.end(); @@ -419,7 +419,7 @@ void CAgentEnemyManager::assign_wounded() enemy_mask |= (*I).m_mask.get(); } VERIFY (enemy_mask == object().member().combat_mask()); -#endif // DEBUG +#endif // DEBUG u32 previous_wounded_count = m_wounded.size(); WOUNDED_ENEMY* previous_wounded = (WOUNDED_ENEMY*)_alloca(previous_wounded_count * sizeof(WOUNDED_ENEMY)); @@ -436,7 +436,7 @@ void CAgentEnemyManager::assign_wounded() VERIFY((*I).m_mask.get()); } } -#endif // DEBUG +#endif // DEBUG squad_mask_type assigned = 0; { diff --git a/src/xrGame/agent_location_manager.cpp b/src/xrGame/agent_location_manager.cpp index 81c6b6f8bc6..a8e0a953bdc 100644 --- a/src/xrGame/agent_location_manager.cpp +++ b/src/xrGame/agent_location_manager.cpp @@ -14,7 +14,7 @@ #include "cover_point.h" #include "stdafx.h" -const float MIN_SUITABLE_ENEMY_DISTANCE = 3.f; // 10.f; +const float MIN_SUITABLE_ENEMY_DISTANCE = 3.f; // 10.f; struct CRemoveOldDangerCover { @@ -84,7 +84,7 @@ bool CAgentLocationManager::suitable(CAI_Stalker* object, const CCoverPoint* loc if ((*I)->cover()->m_position.distance_to_sqr(location->position()) <= _sqr(5.f)) // so member cover is too close // if ((*I)->object().Position().distance_to_sqr(location->position()) <= - //object->Position().distance_to_sqr(location->position())) + // object->Position().distance_to_sqr(location->position())) // check if member to its cover is more close than we to our cover if ((*I)->object().Position().distance_to_sqr((*I)->cover()->m_position) <= object->Position().distance_to_sqr(location->position()) + 2.f) diff --git a/src/xrGame/agent_manager.cpp b/src/xrGame/agent_manager.cpp index 220e9ccf8c4..4f0e734b3e5 100644 --- a/src/xrGame/agent_manager.cpp +++ b/src/xrGame/agent_manager.cpp @@ -28,7 +28,7 @@ CAgentManager::~CAgentManager() VERIFY(member().members().empty()); #ifdef USE_SCHEDULER_IN_AGENT_MANAGER remove_scheduler(); -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER remove_components(); } @@ -38,10 +38,10 @@ void CAgentManager::init_scheduler() shedule.t_min = 1000; shedule.t_max = 1000; shedule_register(); -#else // USE_SCHEDULER_IN_AGENT_MANAGER +#else // USE_SCHEDULER_IN_AGENT_MANAGER m_last_update_time = 0; m_update_rate = 1000; -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER } void CAgentManager::init_components() @@ -61,7 +61,7 @@ void CAgentManager::remove_scheduler() { shedule_unregister(); } -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER void CAgentManager::remove_components() { @@ -115,7 +115,7 @@ float CAgentManager::shedule_Scale() return (.5f); } -#else // USE_SCHEDULER_IN_AGENT_MANAGER +#else // USE_SCHEDULER_IN_AGENT_MANAGER void CAgentManager::update() { @@ -127,4 +127,4 @@ void CAgentManager::update() update_impl(); } -#endif // USE_SCHEDULER_IN_AGENT_MANAGER \ No newline at end of file +#endif // USE_SCHEDULER_IN_AGENT_MANAGER \ No newline at end of file diff --git a/src/xrGame/agent_manager.h b/src/xrGame/agent_manager.h index c1cba18b9ec..294e4ec682a 100644 --- a/src/xrGame/agent_manager.h +++ b/src/xrGame/agent_manager.h @@ -21,10 +21,10 @@ class CAgentManagerPlanner; #ifdef USE_SCHEDULER_IN_AGENT_MANAGER class CAgentManager : public ScheduledBase { -#else // USE_SCHEDULER_IN_AGENT_MANAGER +#else // USE_SCHEDULER_IN_AGENT_MANAGER class CAgentManager { -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER private: CAgentCorpseManager* m_corpse; @@ -39,7 +39,7 @@ class CAgentManager private: u32 m_last_update_time; u32 m_update_rate; -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER private: void init_scheduler(); @@ -50,7 +50,7 @@ class CAgentManager #ifdef USE_SCHEDULER_IN_AGENT_MANAGER private: void remove_scheduler(); -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER public: CAgentManager(); @@ -61,9 +61,9 @@ class CAgentManager virtual float shedule_Scale(); virtual void shedule_Update(u32 time_delta); virtual shared_str shedule_Name() const { return shared_str("agent_manager"); }; -#else // USE_SCHEDULER_IN_AGENT_MANAGER +#else // USE_SCHEDULER_IN_AGENT_MANAGER void update(); -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER shared_str cName() const; void remove_links(IGameObject* object); diff --git a/src/xrGame/agent_member_manager.cpp b/src/xrGame/agent_member_manager.cpp index 8bb5169cff8..c3d75ad6ca8 100644 --- a/src/xrGame/agent_member_manager.cpp +++ b/src/xrGame/agent_member_manager.cpp @@ -98,7 +98,7 @@ void CAgentMemberManager::register_in_combat(const CAI_Stalker* object) // if (!object->group_behaviour()) // return; -#if 0 // def DEBUG +#if 0 // def DEBUG Msg ( "%6d registering stalker %s in combat: 0x%08x -> 0x%08x", Device.dwTimeGlobal, @@ -106,7 +106,7 @@ void CAgentMemberManager::register_in_combat(const CAI_Stalker* object) m_combat_mask, m_combat_mask | mask(object) ); -#endif // DEBUG +#endif // DEBUG squad_mask_type m = mask(object); m_actuality = m_actuality && ((m_combat_mask | m) == m_combat_mask); @@ -120,7 +120,7 @@ void CAgentMemberManager::unregister_in_combat(const CAI_Stalker* object) // return; // } -#if 0 // def DEBUG +#if 0 // def DEBUG Msg ( "%6d UNregistering stalker %s in combat: 0x%08x -> 0x%08x", Device.dwTimeGlobal, @@ -128,7 +128,7 @@ void CAgentMemberManager::unregister_in_combat(const CAI_Stalker* object) m_combat_mask, (m_combat_mask & (squad_mask_type(-1) ^ mask(object))) ); -#endif // DEBUG +#endif // DEBUG squad_mask_type m = mask(object); m_actuality = m_actuality && ((m_combat_mask & (squad_mask_type(-1) ^ m)) == m_combat_mask); diff --git a/src/xrGame/ai/ai_monsters_misc.h b/src/xrGame/ai/ai_monsters_misc.h index 9fb2e3c7646..c1b665f0d5e 100644 --- a/src/xrGame/ai/ai_monsters_misc.h +++ b/src/xrGame/ai/ai_monsters_misc.h @@ -32,7 +32,7 @@ typedef xr_vector MEMBER_REGISTRY; vfUpdateDynamicObjects(); \ m_bStopThinking = true; \ } -#define WRITE_QUERY_TO_LOG(S) ; // Msg(S); +#define WRITE_QUERY_TO_LOG(S) ; // Msg(S); // Msg("%d",Level().Teams[g_Team()].Squads[g_Squad()].Groups[g_Group()].m_tpaSuspiciousNodes.size());\ #else diff --git a/src/xrGame/ai/crow/ai_crow.cpp b/src/xrGame/ai/crow/ai_crow.cpp index 877ec537894..d9671aae7ce 100644 --- a/src/xrGame/ai/crow/ai_crow.cpp +++ b/src/xrGame/ai/crow/ai_crow.cpp @@ -202,16 +202,16 @@ void CAI_Crow::state_Flying(float fdt) vOffset.sub(vGoalDir, Position()); // First, tweak the pitch - if (vOffset.y > 1.0) { // We're too low + if (vOffset.y > 1.0) { // We're too low vHPB.y += fAT; if (vHPB.y > 0.8f) vHPB.y = 0.8f; } else if (vOffset.y < -1.0) - { // We're too high + { // We're too high vHPB.y -= fAT; if (vHPB.y < -0.8f) vHPB.y = -0.8f; } - else // Add damping + else // Add damping vHPB.y *= 0.95f; // Now figure out yaw changes @@ -264,7 +264,7 @@ void CAI_Crow::state_DeathFall() void CAI_Crow::Die(IGameObject* who) { inherited::Die(who); - processing_activate(); // enable UpdateCL for dead crows - especially for physics support + processing_activate(); // enable UpdateCL for dead crows - especially for physics support // and do it especially before Creating physics shell or it definitely throws processing enable/disable calls: // underflow CreateSkeleton(); @@ -356,7 +356,7 @@ void CAI_Crow::shedule_Update(u32 DT) } // Core events -void CAI_Crow::net_Export(NET_Packet& P) // export to server +void CAI_Crow::net_Export(NET_Packet& P) // export to server { R_ASSERT(Local()); @@ -430,7 +430,7 @@ void CAI_Crow::HitImpulse(float /**amount/**/, Fvector& /**vWorldDir/**/, Fvecto //--------------------------------------------------------------------- void CAI_Crow::CreateSkeleton() { - m_pPhysicsShell = P_build_Shell(this, false, (BONE_P_MAP*)0); // P_build_SimpleShell(this,0.3f,false); + m_pPhysicsShell = P_build_Shell(this, false, (BONE_P_MAP*)0); // P_build_SimpleShell(this,0.3f,false); m_pPhysicsShell->SetMaterial(smart_cast( Visual())->LL_GetData(smart_cast(Visual())->LL_GetBoneRoot()) .game_mtl_idx); diff --git a/src/xrGame/ai/monsters/ai_monster_bones.cpp b/src/xrGame/ai/monsters/ai_monster_bones.cpp index 192aa775e6b..caa85426467 100644 --- a/src/xrGame/ai/monsters/ai_monster_bones.cpp +++ b/src/xrGame/ai/monsters/ai_monster_bones.cpp @@ -32,7 +32,7 @@ void bonesBone::Turn(u32 dt) params.r_speed * _cos(PI_DIV_2m - PIm * _abs(params.target_yaw - params.cur_yaw) / params.dist_yaw); float dy; - dy = cur_speed * dt / 1000; // учитываем милисек и радианную меры + dy = cur_speed * dt / 1000; // учитываем милисек и радианную меры if (_abs(params.target_yaw - params.cur_yaw) < dy) params.cur_yaw = params.target_yaw; @@ -134,11 +134,11 @@ void bonesManipulation::Update(CBoneInstance* bone, u32 cur_time) // если выполняется наращивание угла и ни одна кость не повернулась (достигли таргета...) if (!bones_were_turned && !in_return_state) { - if ((0 == time_started) && (freeze_time > 0)) { // начинаем ждать + if ((0 == time_started) && (freeze_time > 0)) { // начинаем ждать time_started = cur_time; } - if ((0 != time_started) && (time_started + freeze_time < cur_time)) { // время вышло? + if ((0 != time_started) && (time_started + freeze_time < cur_time)) { // время вышло? time_started = 0; // делаем возврат diff --git a/src/xrGame/ai/monsters/ai_monster_bones.h b/src/xrGame/ai/monsters/ai_monster_bones.h index 45feeefce7e..d4e1638eaa9 100644 --- a/src/xrGame/ai/monsters/ai_monster_bones.h +++ b/src/xrGame/ai/monsters/ai_monster_bones.h @@ -12,7 +12,7 @@ struct bonesAxis float cur_yaw; float target_yaw; float r_speed; - float dist_yaw; // необходимо лишь для определения текущей скорости по оси + float dist_yaw; // необходимо лишь для определения текущей скорости по оси }; // бона с параметрами движения по осям @@ -24,9 +24,9 @@ struct bonesBone bonesBone() { bone = 0; } void Set(CBoneInstance* b, u8 a, float ty, float cy, float r_s); - bool NeedTurn(); // необходим поворот по оси p_axis? - void Turn(u32 dt); // выполнить поворот по оси p_axis - void Apply(); // установить углы у боны + bool NeedTurn(); // необходим поворот по оси p_axis? + void Turn(u32 dt); // выполнить поворот по оси p_axis + void Apply(); // установить углы у боны }; // управление движениями костей @@ -35,7 +35,7 @@ class bonesManipulation xr_vector m_Bones; u32 freeze_time; - bool in_return_state; // если идёт возврат к исходному положению + bool in_return_state; // если идёт возврат к исходному положению u32 time_started; u32 time_last_update; u32 time_last_delta; diff --git a/src/xrGame/ai/monsters/ai_monster_defs.h b/src/xrGame/ai/monsters/ai_monster_defs.h index feb463f83af..531a958cff6 100644 --- a/src/xrGame/ai/monsters/ai_monster_defs.h +++ b/src/xrGame/ai/monsters/ai_monster_defs.h @@ -29,8 +29,8 @@ class CBlend; #define ASP_UPPER_STATE (1 << 13) #define ASP_MOVE_SMELLING (1 << 14) -#define AA_FLAG_ATTACK_RAT (1 << 0) // аттака крыс? -#define AA_FLAG_FIRE_ANYWAY (1 << 1) // трассировка не нужна +#define AA_FLAG_ATTACK_RAT (1 << 0) // аттака крыс? +#define AA_FLAG_FIRE_ANYWAY (1 << 1) // трассировка не нужна #define CRITICAL_STAND_TIME 1400 #define TIME_STAND_RECHECK 2000 @@ -268,9 +268,9 @@ typedef shared_str anim_string; // элемент анимации struct SAnimItem { - anim_string target_name; // "stand_idle_" - int spec_id; // (-1) - any, (0 - ...) - идентификатор 3 - u8 count; // количество анимаций : "idle_0", "idle_1", "idle_2" + anim_string target_name; // "stand_idle_" + int spec_id; // (-1) - any, (0 - ...) - идентификатор 3 + u8 count; // количество анимаций : "idle_0", "idle_1", "idle_2" SVelocityParam velocity; @@ -310,7 +310,7 @@ struct SMotionItem struct { - EMotionAnim anim_left; // speed, r_speed got from turn_left member + EMotionAnim anim_left; // speed, r_speed got from turn_left member EMotionAnim anim_right; float min_angle; } turn; @@ -327,19 +327,19 @@ struct SReplacedAnim // Определение времени аттаки по анимации typedef struct { - EMotionAnim anim; // параметры конкретной анимации + EMotionAnim anim; // параметры конкретной анимации u32 anim_i3; - TTime time_from; // диапазон времени когда можно наносить hit (от) - TTime time_to; // диапазон времени когда можно наносить hit (до) + TTime time_from; // диапазон времени когда можно наносить hit (от) + TTime time_to; // диапазон времени когда можно наносить hit (до) - Fvector trace_from; // направление трассировки (относительно центра) + Fvector trace_from; // направление трассировки (относительно центра) Fvector trace_to; - u32 flags; // специальные флаги + u32 flags; // специальные флаги - float damage; // урон при данной атаке - Fvector hit_dir; // угол направления приложения силы к объекту + float damage; // урон при данной атаке + Fvector hit_dir; // угол направления приложения силы к объекту //----------------------------------------- // temp @@ -355,7 +355,7 @@ struct SAAParam { MotionID motion; float time; - float hit_power; // damage + float hit_power; // damage float impulse; Fvector impulse_dir; diff --git a/src/xrGame/ai/monsters/ai_monster_effector.cpp b/src/xrGame/ai/monsters/ai_monster_effector.cpp index d60e9b29635..6ca1ceb1a9d 100644 --- a/src/xrGame/ai/monsters/ai_monster_effector.cpp +++ b/src/xrGame/ai/monsters/ai_monster_effector.cpp @@ -75,7 +75,7 @@ BOOL CMonsterEffectorHit::ProcessCam(SCamEffectorInfo& info) Mdef.i.crossproduct(info.n, info.d); Mdef.c.set(info.p); - float period_all = period_number * PI_MUL_2; // макс. значение цикла + float period_all = period_number * PI_MUL_2; // макс. значение цикла float cur_amp = max_amp * (PI / 180) * time_left_perc; Fvector dangle; diff --git a/src/xrGame/ai/monsters/ai_monster_effector.h b/src/xrGame/ai/monsters/ai_monster_effector.h index db320ccf916..af4802c6464 100644 --- a/src/xrGame/ai/monsters/ai_monster_effector.h +++ b/src/xrGame/ai/monsters/ai_monster_effector.h @@ -9,10 +9,10 @@ class CMonsterEffector : public CEffectorPP { typedef CEffectorPP inherited; - SPPInfo state; // current state - float m_total; // total PP time - float m_attack; // attack time in percents [0..1] - float m_release; // release time in percents [0..1] + SPPInfo state; // current state + float m_total; // total PP time + float m_attack; // attack time in percents [0..1] + float m_release; // release time in percents [0..1] float m_spec_factor; diff --git a/src/xrGame/ai/monsters/ai_monster_motion_stats.h b/src/xrGame/ai/monsters/ai_monster_motion_stats.h index 623e29ec20d..f045d566a28 100644 --- a/src/xrGame/ai/monsters/ai_monster_motion_stats.h +++ b/src/xrGame/ai/monsters/ai_monster_motion_stats.h @@ -20,7 +20,7 @@ class CMotionStats }; elem _data[MAX_ELEMS]; - u32 index; // индекс всегда указывает на подготовленное место в массиве + u32 index; // индекс всегда указывает на подготовленное место в массиве public: CMotionStats(CBaseMonster* pM) : pMonster(pM), index(0){}; diff --git a/src/xrGame/ai/monsters/ai_monster_shared_data.h b/src/xrGame/ai/monsters/ai_monster_shared_data.h index ca0b0a7a0c3..7a7dccd0c00 100644 --- a/src/xrGame/ai/monsters/ai_monster_shared_data.h +++ b/src/xrGame/ai/monsters/ai_monster_shared_data.h @@ -6,7 +6,7 @@ struct SMonsterSettings // float speed factors float m_fDistToCorpse; - float m_fDamagedThreshold; // порог здоровья, ниже которого устанавливается флаг m_bDamaged + float m_fDamagedThreshold; // порог здоровья, ниже которого устанавливается флаг m_bDamaged // ------------------------------------------------------- diff --git a/src/xrGame/ai/monsters/ai_monster_squad.h b/src/xrGame/ai/monsters/ai_monster_squad.h index a2432b87cc7..1fe1826314a 100644 --- a/src/xrGame/ai/monsters/ai_monster_squad.h +++ b/src/xrGame/ai/monsters/ai_monster_squad.h @@ -11,12 +11,12 @@ class CBaseMonster; ////////////////////////////////////////////////////////////////////////// enum EMemberGoalType { - MG_AttackEnemy, // entity - MG_PanicFromEnemy, // entity - MG_InterestingSound, // position - MG_DangerousSound, // position - MG_WalkGraph, // node - MG_Rest, // node, position + MG_AttackEnemy, // entity + MG_PanicFromEnemy, // entity + MG_InterestingSound, // position + MG_DangerousSound, // position + MG_WalkGraph, // node + MG_Rest, // node, position MG_None, }; @@ -52,7 +52,7 @@ enum ESquadCommandType struct SSquadCommand { - ESquadCommandType type; // тип команды + ESquadCommandType type; // тип команды const CEntity* entity; Fvector position; diff --git a/src/xrGame/ai/monsters/ai_monster_squad_attack.cpp b/src/xrGame/ai/monsters/ai_monster_squad_attack.cpp index 9b7ce0fee7a..58622a8139f 100644 --- a/src/xrGame/ai/monsters/ai_monster_squad_attack.cpp +++ b/src/xrGame/ai/monsters/ai_monster_squad_attack.cpp @@ -211,14 +211,14 @@ void CMonsterSquad::Attack_AssignTargetDir(ENTITY_VEC& members, const CEntity* e bool b_add_left = false; - if (angle_normalize_signed(h2 - h1) > 0) { // right + if (angle_normalize_signed(h2 - h1) > 0) { // right if ((next_right_yaw < PI) && !fsimilar(next_right_yaw, PI, PI / 60.f)) b_add_left = false; else b_add_left = true; } else - { // left + { // left if ((next_left_yaw < PI) && !fsimilar(next_left_yaw, PI, PI / 60.f)) b_add_left = true; else @@ -274,7 +274,7 @@ Fvector CMonsterSquad::calc_monster_target_dir(CBaseMonster* monster, const CEnt // monster pos == enemy pos? if (enemy2monster_mag < near_zero) { VERIFY2(false, "Enemy and Monster should not have same pos!"); - Fvector dir = {1.f, 0.f, 0.f}; // happy with random dir then :) + Fvector dir = {1.f, 0.f, 0.f}; // happy with random dir then :) return dir; } diff --git a/src/xrGame/ai/monsters/ai_monster_squad_rest.cpp b/src/xrGame/ai/monsters/ai_monster_squad_rest.cpp index f8184147425..be8f669824a 100644 --- a/src/xrGame/ai/monsters/ai_monster_squad_rest.cpp +++ b/src/xrGame/ai/monsters/ai_monster_squad_rest.cpp @@ -94,7 +94,7 @@ void CMonsterSquad::Idle_AssignAction(ENTITY_VEC& members) const CEntity* entity = 0; switch (cur_type) { - case 0: // front + case 0: // front entity = front.back(); front.pop_back(); for (u32 i = 0; i < back.size(); i++) @@ -117,7 +117,7 @@ void CMonsterSquad::Idle_AssignAction(ENTITY_VEC& members) } command.position.mad(front_pos, random_dir, random_r); break; - case 1: // back + case 1: // back entity = back.back(); back.pop_back(); for (u32 i = 0; i < front.size(); i++) @@ -140,7 +140,7 @@ void CMonsterSquad::Idle_AssignAction(ENTITY_VEC& members) } command.position.mad(back_pos, random_dir, random_r); break; - case 2: // left + case 2: // left entity = left.back(); left.pop_back(); for (u32 i = 0; i < front.size(); i++) @@ -163,7 +163,7 @@ void CMonsterSquad::Idle_AssignAction(ENTITY_VEC& members) } command.position.mad(left_pos, random_dir, random_r); break; - case 3: // right + case 3: // right entity = right.back(); right.pop_back(); for (u32 i = 0; i < front.size(); i++) diff --git a/src/xrGame/ai/monsters/anti_aim_ability.cpp b/src/xrGame/ai/monsters/anti_aim_ability.cpp index 12ad67df418..cf6195a9fc2 100644 --- a/src/xrGame/ai/monsters/anti_aim_ability.cpp +++ b/src/xrGame/ai/monsters/anti_aim_ability.cpp @@ -17,7 +17,7 @@ static pcstr const s_anti_aim_max_angle_string = "anti_aim_max_angle"; static pcstr const s_anti_aim_detection_gain_speed_string = "anti_aim_detection_gain_speed"; static pcstr const s_anti_aim_detection_loose_speed_string = "anti_aim_detection_loose_speed"; -} // namespace detail +} // namespace detail anti_aim_ability::anti_aim_ability(CBaseMonster* const object) : m_object(object) { @@ -183,7 +183,7 @@ void anti_aim_ability::start_camera_effector() void anti_aim_ability::do_deactivate() { if (is_active()) { - if (m_object->Visual()) // when m_object is destroying, visual might be dead already + if (m_object->Visual()) // when m_object is destroying, visual might be dead already { m_man->deactivate(this); } @@ -260,7 +260,7 @@ void anti_aim_ability::update_schedule() DBG().get_text_tree().clear(); debug::text_tree& text_tree = DBG().get_text_tree().find_or_add("ActorView"); text_tree.add_line("detection_level", m_detection_level); -#endif // #ifdef DEBUG_STATE +#endif // #ifdef DEBUG_STATE if (!check_update_condition()) { do_deactivate(); @@ -274,7 +274,7 @@ void anti_aim_ability::update_schedule() if (is_active()) { #ifdef DEBUG_STATE text_tree.add_line("state", "activated"); -#endif // #ifdef DEBUG_STATE +#endif // #ifdef DEBUG_STATE if (Device.dwTimeGlobal < m_animation_hit_tick) { return; @@ -291,13 +291,13 @@ void anti_aim_ability::update_schedule() if (Device.dwTimeGlobal < m_last_activated_tick + (TTime)(m_timeout * 1000)) { #ifdef DEBUG_STATE text_tree.add_line("state", "colddown"); -#endif // #ifdef DEBUG_STATE +#endif // #ifdef DEBUG_STATE return; } #ifdef DEBUG_STATE text_tree.add_line("state", "deactivated"); -#endif // #ifdef DEBUG_STATE +#endif // #ifdef DEBUG_STATE if (m_last_detection_tick == 0) { m_last_detection_tick = Device.dwTimeGlobal; diff --git a/src/xrGame/ai/monsters/anti_aim_ability.h b/src/xrGame/ai/monsters/anti_aim_ability.h index 3c7cd914a88..c5e5b373592 100644 --- a/src/xrGame/ai/monsters/anti_aim_ability.h +++ b/src/xrGame/ai/monsters/anti_aim_ability.h @@ -60,4 +60,4 @@ class anti_aim_ability : public CControl_ComCustom<> void start_camera_effector(); }; -#endif // ANTI_AIM_ABILITY_H_INCLUDED \ No newline at end of file +#endif // ANTI_AIM_ABILITY_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ai/monsters/basemonster/base_monster.cpp b/src/xrGame/ai/monsters/basemonster/base_monster.cpp index d30fddf737d..a96e1b0a7cc 100644 --- a/src/xrGame/ai/monsters/basemonster/base_monster.cpp +++ b/src/xrGame/ai/monsters/basemonster/base_monster.cpp @@ -142,7 +142,7 @@ void CBaseMonster::update_pos_by_grouping_behaviour() Fvector acc = get_steer_manager()->calc_acceleration(); - acc.y = 0; // remove vertical component + acc.y = 0; // remove vertical component if (!m_last_grouping_behaviour_update_tick) { m_last_grouping_behaviour_update_tick = Device.dwTimeGlobal; @@ -406,7 +406,7 @@ void CBaseMonster::Hit(SHit* pHDS) else { hit_power *= m_fHitFracMonster; - pHDS->add_wound = false; //раны нет + pHDS->add_wound = false; //раны нет } } inherited::Hit(pHDS); @@ -473,7 +473,7 @@ void CBaseMonster::ChangeTeam(int team, int squad, int group) ai().script_engine().print_stack(); VERIFY2(g_Alive(), "you are trying to change team of a dead entity"); } -#endif // DEBUG +#endif // DEBUG // remove from current team monster_squad().remove_member((u8)g_Team(), (u8)g_Squad(), (u8)g_Group(), this); @@ -1002,4 +1002,4 @@ bool CBaseMonster::is_paused() const return ai_dbg::get_var(id_paused_var_name, monster_result) ? monster_result : monsters_result; } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/ai/monsters/basemonster/base_monster.h b/src/xrGame/ai/monsters/basemonster/base_monster.h index 0ce20060d98..994139b9692 100644 --- a/src/xrGame/ai/monsters/basemonster/base_monster.h +++ b/src/xrGame/ai/monsters/basemonster/base_monster.h @@ -181,7 +181,7 @@ class CBaseMonster : public CCustomMonster, public CStepManager virtual void ForceFinalAnimation() {} virtual void LookPosition(Fvector to_point, float angular_speed = - PI_DIV_3); // каждый монстр может по-разному реализвать эту функ (e.g. кровосос с поворотом головы и т.п.) + PI_DIV_3); // каждый монстр может по-разному реализвать эту функ (e.g. кровосос с поворотом головы и т.п.) // Team virtual void ChangeTeam(int team, int squad, int group); @@ -444,7 +444,7 @@ class CBaseMonster : public CCustomMonster, public CStepManager } }; - u8 m_show_debug_info; // 0 - none, 1 - first column, 2 - second column + u8 m_show_debug_info; // 0 - none, 1 - first column, 2 - second column void set_show_debug_info(u8 show = 1) { m_show_debug_info = show; } virtual SDebugInfo show_debug_info(); virtual void add_debug_info(debug::text_tree& root_s); @@ -476,7 +476,7 @@ class CBaseMonster : public CCustomMonster, public CStepManager virtual bool can_use_agressive_jump(const IGameObject*) { return false; } private: steering_behaviour::manager* m_steer_manager; - squad_grouping_behaviour* m_grouping_behaviour; // freed by manager + squad_grouping_behaviour* m_grouping_behaviour; // freed by manager void update_enemy_accessible_and_at_home_info(); // updates position by applying little "pushing" force @@ -597,7 +597,7 @@ bool CBaseMonster::get_debug_var(pcstr var_name, OUT Type& result) STRCONCAT(full_var_name, get_monster_class_name(), "_", var_name); return ai_dbg::get_var(full_var_name, result); } -#endif // DEBUG +#endif // DEBUG template Type CBaseMonster::override_if_debug(pcstr var_name, Type value) @@ -605,9 +605,9 @@ Type CBaseMonster::override_if_debug(pcstr var_name, Type value) #ifdef DEBUG Type debug_value; return get_debug_var(var_name, debug_value) ? debug_value : value; -#else // DEBUG +#else // DEBUG return value; -#endif // DEBUG +#endif // DEBUG } #include "base_monster_inline.h" \ No newline at end of file diff --git a/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp b/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp index d2eebc2212d..a6572674192 100644 --- a/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp +++ b/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp @@ -500,7 +500,7 @@ void add_debug_info(debug::text_tree& root_s, const SRotation& rot) root_s.add_line("roll", rot.roll); } -} // namespace detail +} // namespace detail void CBaseMonster::add_debug_info(debug::text_tree& root_s) { diff --git a/src/xrGame/ai/monsters/basemonster/base_monster_feel.cpp b/src/xrGame/ai/monsters/basemonster/base_monster_feel.cpp index d688cac2fde..c67ea3a53c2 100644 --- a/src/xrGame/ai/monsters/basemonster/base_monster_feel.cpp +++ b/src/xrGame/ai/monsters/basemonster/base_monster_feel.cpp @@ -93,17 +93,16 @@ void CBaseMonster::HitEntity( NET_Packet l_P; SHit HS; - HS.GenHeader(GE_HIT, pEntityNC->ID()); // u_EventGen (l_P,GE_HIT, pEntityNC->ID()); - HS.whoID = (ID()); // l_P.w_u16 (ID()); - HS.weaponID = (ID()); // l_P.w_u16 (ID()); - HS.dir = (hit_dir); // l_P.w_dir (hit_dir); - HS.power = (fDamage); // l_P.w_float (fDamage); - HS.boneID = (smart_cast(pEntityNC->Visual()) - ->LL_GetBoneRoot()); // l_P.w_s16 - //(smart_cast(pEntityNC->Visual())->LL_GetBoneRoot()); - HS.p_in_bone_space = (position_in_bone_space); // l_P.w_vec3 (position_in_bone_space); - HS.impulse = (impulse); // l_P.w_float (impulse); - HS.hit_type = hit_type; // l_P.w_u16 ( u16(ALife::eHitTypeWound) ); + HS.GenHeader(GE_HIT, pEntityNC->ID()); // u_EventGen (l_P,GE_HIT, pEntityNC->ID()); + HS.whoID = (ID()); // l_P.w_u16 (ID()); + HS.weaponID = (ID()); // l_P.w_u16 (ID()); + HS.dir = (hit_dir); // l_P.w_dir (hit_dir); + HS.power = (fDamage); // l_P.w_float (fDamage); + HS.boneID = (smart_cast(pEntityNC->Visual())->LL_GetBoneRoot()); // l_P.w_s16 + //(smart_cast(pEntityNC->Visual())->LL_GetBoneRoot()); + HS.p_in_bone_space = (position_in_bone_space); // l_P.w_vec3 (position_in_bone_space); + HS.impulse = (impulse); // l_P.w_float (impulse); + HS.hit_type = hit_type; // l_P.w_u16 ( u16(ALife::eHitTypeWound) ); HS.Write_Packet(l_P); u_EventSend(l_P); @@ -277,16 +276,16 @@ void CBaseMonster::Hit_Psy(IGameObject* object, float value) { NET_Packet P; SHit HS; - HS.GenHeader(GE_HIT, object->ID()); // // u_EventGen (P,GE_HIT, object->ID()); // - HS.whoID = (ID()); // own // P.w_u16 (ID()); // own - HS.weaponID = (ID()); // own // P.w_u16 (ID()); // own + HS.GenHeader(GE_HIT, object->ID()); // // u_EventGen (P,GE_HIT, object->ID()); // + HS.whoID = (ID()); // own // P.w_u16 (ID()); // own + HS.weaponID = (ID()); // own // P.w_u16 (ID()); // own HS.dir = (Fvector().set( - 0.f, 1.f, 0.f)); // direction // P.w_dir (Fvector().set(0.f,1.f,0.f)); // direction - HS.power = (value); // hit value // P.w_float (value); // hit value - HS.boneID = (BI_NONE); // bone // P.w_s16 (BI_NONE); // bone - HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); - HS.impulse = (0.f); // P.w_float (0.f); - HS.hit_type = (ALife::eHitTypeTelepatic); // P.w_u16 (u16(ALife::eHitTypeTelepatic)); + 0.f, 1.f, 0.f)); // direction // P.w_dir (Fvector().set(0.f,1.f,0.f)); // direction + HS.power = (value); // hit value // P.w_float (value); // hit value + HS.boneID = (BI_NONE); // bone // P.w_s16 (BI_NONE); // bone + HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); + HS.impulse = (0.f); // P.w_float (0.f); + HS.hit_type = (ALife::eHitTypeTelepatic); // P.w_u16 (u16(ALife::eHitTypeTelepatic)); HS.Write_Packet(P); u_EventSend(P); } @@ -295,17 +294,17 @@ void CBaseMonster::Hit_Wound(IGameObject* object, float value, const Fvector& di { NET_Packet P; SHit HS; - HS.GenHeader(GE_HIT, object->ID()); // u_EventGen (P,GE_HIT, object->ID()); - HS.whoID = (ID()); // P.w_u16 (ID()); - HS.weaponID = (ID()); // P.w_u16 (ID()); - HS.dir = (dir); // P.w_dir (dir); - HS.power = (value); // P.w_float (value); + HS.GenHeader(GE_HIT, object->ID()); // u_EventGen (P,GE_HIT, object->ID()); + HS.whoID = (ID()); // P.w_u16 (ID()); + HS.weaponID = (ID()); // P.w_u16 (ID()); + HS.dir = (dir); // P.w_dir (dir); + HS.power = (value); // P.w_float (value); HS.boneID = (smart_cast(object->Visual()) - ->LL_GetBoneRoot()); // P.w_s16 (smart_cast(object->Visual())->LL_GetBoneRoot()); - HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); - HS.impulse = (impulse); // P.w_float (impulse); - HS.hit_type = (ALife::eHitTypeWound); // P.w_u16 (u16(ALife::eHitTypeWound)); + ->LL_GetBoneRoot()); // P.w_s16 (smart_cast(object->Visual())->LL_GetBoneRoot()); + HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); + HS.impulse = (impulse); // P.w_float (impulse); + HS.hit_type = (ALife::eHitTypeWound); // P.w_u16 (u16(ALife::eHitTypeWound)); HS.Write_Packet(P); u_EventSend(P); } diff --git a/src/xrGame/ai/monsters/basemonster/base_monster_startup.cpp b/src/xrGame/ai/monsters/basemonster/base_monster_startup.cpp index 69cca6cd700..d16e61d5890 100644 --- a/src/xrGame/ai/monsters/basemonster/base_monster_startup.cpp +++ b/src/xrGame/ai/monsters/basemonster/base_monster_startup.cpp @@ -47,9 +47,9 @@ const float aom_attack_radius = 0.6f; const float aom_update_side_period = 4000; const float aom_prediction_factor = 1.3f; -} // namespace base_monster +} // namespace base_monster -} // namespace detail +} // namespace detail void CBaseMonster::Load(LPCSTR section) { @@ -332,7 +332,7 @@ BOOL CBaseMonster::net_Spawn(CSE_Abstract* DC) // if (ai().get_alife()) { // // CSE_ALifeMonsterBase *se_monster = - //smart_cast(ai().alife().objects().object(ID())); + // smart_cast(ai().alife().objects().object(ID())); // VERIFY (se_monster); // // if (se_monster->m_flags.is(CSE_ALifeMonsterBase::flNeedCheckSpawnItem)) { diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp b/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp index 771aabcdfe6..0cdf4dd964a 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp @@ -23,7 +23,7 @@ #include "xr_level_controller.h" #ifdef DEBUG #include -#endif // DEBUG +#endif // DEBUG namespace detail { @@ -45,8 +45,8 @@ char const* const full_visibility_radius_string = "full_visibility_radius"; char const* const partial_visibility_radius_string = "partial_visibility_radius"; char const* const visibility_state_change_min_delay_string = "visibility_state_change_min_delay"; -} // namespace bloodsucker -} // namespace detail +} // namespace bloodsucker +} // namespace detail u32 CAI_Bloodsucker::m_time_last_vampire = 0; @@ -284,7 +284,7 @@ void CAI_Bloodsucker::reinit() Bones.Reset(); com_man().ta_fill_data(anim_triple_vampire, "vampire_0", "vampire_1", "vampire_2", TA_EXECUTE_LOOPED, - TA_DONT_SKIP_PREPARE, 0); // ControlCom::eCapturePath | ControlCom::eCaptureMovement); + TA_DONT_SKIP_PREPARE, 0); // ControlCom::eCapturePath | ControlCom::eCaptureMovement); m_alien_control.reinit(); @@ -364,7 +364,7 @@ void CAI_Bloodsucker::vfAssignBones() smart_cast(Visual())->LL_BoneID("bip01_spine")); bone_head = &smart_cast(Visual())->LL_GetBoneInstance( smart_cast(Visual())->LL_BoneID("bip01_head")); - if (!PPhysicsShell()) //нельзя ставить колбеки, если создан физ шел - у него стоят свои колбеки!!! + if (!PPhysicsShell()) //нельзя ставить колбеки, если создан физ шел - у него стоят свои колбеки!!! { bone_spine->set_callback(bctCustom, BoneCallback, this); bone_head->set_callback(bctCustom, BoneCallback, this); @@ -396,7 +396,7 @@ void CAI_Bloodsucker::LookDirection(Fvector to_dir, float bone_turn_speed) // bone_angle = dy; //} else { // torso & bone turn // if (movement().IsMoveAlongPathFinished() || !movement().enabled()) movement().m_body.target.yaw = - //angle_normalize(-yaw); + // angle_normalize(-yaw); // if (dy / 2 < MAX_BONE_ANGLE) bone_angle = dy / 2; // else bone_angle = MAX_BONE_ANGLE; //} @@ -881,6 +881,6 @@ void CAI_Bloodsucker::debug_on_key(int key) break; } } -#endif //_DEBUG +#endif //_DEBUG -#endif // DEBUG +#endif // DEBUG diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker.h b/src/xrGame/ai/monsters/bloodsucker/bloodsucker.h index b70651ffd42..a25898e27b7 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker.h +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker.h @@ -89,11 +89,11 @@ class CAI_Bloodsucker : public CBaseMonster, public CControlledActor void clear_last_critical_hit_tick() { m_last_critical_hit_tick = 0; } private: TTime m_last_critical_hit_tick; - float m_critical_hit_chance; // 0..1 + float m_critical_hit_chance; // 0..1 float m_critical_hit_camera_effector_angle; float m_vampire_want_value; - float m_vampire_want_speed; // load from ltx + float m_vampire_want_speed; // load from ltx float m_vampire_wound; float m_vampire_gain_health; float m_vampire_distance; diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_hide_inline.h b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_hide_inline.h index 7dc8b302cfc..b2e3f1e8918 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_hide_inline.h +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_hide_inline.h @@ -88,9 +88,9 @@ void CBloodsuckerStateAttackHideAbstract::setup_substates() data.vertex = m_target_node; data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Aggressive; diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_inline.h b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_inline.h index 2f9b9a38efc..0897304ebf0 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_inline.h +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_inline.h @@ -48,9 +48,9 @@ const u32 encircle_time = 3000; const float loose_health_diff = 0.15f; const u32 change_behaviour_time = 1000; -} // namespace bloodsucker +} // namespace bloodsucker -} // namespace detail +} // namespace detail TEMPLATE_SPECIALIZATION void CBloodsuckerStateAttackAbstract::execute() @@ -180,7 +180,7 @@ void CBloodsuckerStateAttackAbstract::setup_substates() data.action.action = ACT_RUN; data.action.time_out = 0; - data.completion_dist = 1.f; // get exactly to the point + data.completion_dist = 1.f; // get exactly to the point data.time_to_rebuild = 200; data.accelerated = true; data.braking = false; diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_inline.h b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_inline.h index 0566c375186..393514dc82f 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_inline.h +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_inline.h @@ -122,9 +122,9 @@ void CStateBloodsuckerPredatorAbstract::setup_substates() data.vertex = m_target_node; data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Aggressive; @@ -156,7 +156,7 @@ void CStateBloodsuckerPredatorAbstract::setup_substates() SStateDataAction data; data.action = ACT_STAND_IDLE; - data.time_out = 0; // do not use time out + data.time_out = 0; // do not use time out data.sound_type = MonsterSound::eMonsterSoundIdle; data.sound_delay = object->db().m_dwIdleSndDelay; diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_lite_inline.h b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_lite_inline.h index 0ad361d354e..0e120f270ee 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_lite_inline.h +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator_lite_inline.h @@ -130,9 +130,9 @@ void CStateBloodsuckerPredatorLiteAbstract::setup_substates() data.vertex = m_target_node; data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Aggressive; @@ -164,7 +164,7 @@ void CStateBloodsuckerPredatorLiteAbstract::setup_substates() SStateDataAction data; data.action = ACT_STAND_IDLE; - data.time_out = 0; // do not use time out + data.time_out = 0; // do not use time out data.sound_type = MonsterSound::eMonsterSoundIdle; data.sound_delay = object->db().m_dwIdleSndDelay; diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_state_capture_jump_inline.h b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_state_capture_jump_inline.h index 4cceaec1e61..fa714f9de9a 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_state_capture_jump_inline.h +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_state_capture_jump_inline.h @@ -34,7 +34,7 @@ void CStateCaptureJumpBloodsuckerAbstract::setup_substates() SStateDataAction data; data.action = ACT_STAND_IDLE; - data.time_out = 0; // do not use time out + data.time_out = 0; // do not use time out /*data.sound_type = MonsterSound::eMonsterSoundIdle; data.sound_delay = object->db().m_dwIdleSndDelay; */ diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_vampire_effector.h b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_vampire_effector.h index dbc0f579e59..17122492f32 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker_vampire_effector.h +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker_vampire_effector.h @@ -7,8 +7,8 @@ class CVampirePPEffector : public CEffectorPP { typedef CEffectorPP inherited; - SPPInfo state; // current state - float m_total; // total PP time + SPPInfo state; // current state + float m_total; // total PP time public: CVampirePPEffector(const SPPInfo& ppi, float life_time); diff --git a/src/xrGame/ai/monsters/boar/boar.cpp b/src/xrGame/ai/monsters/boar/boar.cpp index 05c87508cc2..c98e9dbabb5 100644 --- a/src/xrGame/ai/monsters/boar/boar.cpp +++ b/src/xrGame/ai/monsters/boar/boar.cpp @@ -149,7 +149,7 @@ BOOL CAI_Boar::net_Spawn(CSE_Abstract* DC) { if (!inherited::net_Spawn(DC)) return (FALSE); - if (!PPhysicsShell()) //нельзя ставить колбеки, если создан физ шел - у него стоят свои колбеки!!! + if (!PPhysicsShell()) //нельзя ставить колбеки, если создан физ шел - у него стоят свои колбеки!!! { CBoneInstance& BI = smart_cast(Visual())->LL_GetBoneInstance( smart_cast(Visual())->LL_BoneID("bip01_head")); diff --git a/src/xrGame/ai/monsters/burer/burer.cpp b/src/xrGame/ai/monsters/burer/burer.cpp index b46a54e0aa4..4e7a642577e 100644 --- a/src/xrGame/ai/monsters/burer/burer.cpp +++ b/src/xrGame/ai/monsters/burer/burer.cpp @@ -146,58 +146,62 @@ void CBurer::Load(LPCSTR section) // SVelocityParam &velocity_drag = move().get_velocity(MonsterMovement::eVelocityParameterDrag); anim().AddAnim(eAnimStandIdle, "stand_idle_", -1, &velocity_none, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimStandTurnLeft, "stand_turn_ls_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimStandTurnRight, "stand_turn_rs_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimStandDamaged, "stand_idle_dmg_", -1, &velocity_none, PS_STAND); //, "fx_stand_f", + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + // anim().AddAnim(eAnimStandDamaged, "stand_idle_dmg_", -1, &velocity_none, PS_STAND); //, "fx_stand_f", //"fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimWalkFwd, "stand_walk_fwd_", -1, &velocity_walk, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); // anim().AddAnim(eAnimWalkDamaged, "stand_walk_fwd_dmg_", -1, &velocity_walk_dmg, PS_STAND); //, "fx_stand_f", // "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimRun, "stand_run_fwd_", -1, &velocity_run, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimRunDamaged, "stand_run_dmg_", -1, &velocity_run_dmg, PS_STAND); //, "fx_stand_f", + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + // anim().AddAnim(eAnimRunDamaged, "stand_run_dmg_", -1, &velocity_run_dmg, PS_STAND); //, "fx_stand_f", // "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimAttack, "stand_attack_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimDie, "stand_die_", -1, &velocity_none, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimShieldStart, "stand_shield_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimShieldContinue, "stand_shield_idle_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimTeleFire, "stand_power_attack_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimTelekinesis, "telekinesis_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimGraviFire, "stand_power_attack_", -1, &velocity_turn, - PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); + PS_STAND); //, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); anim().AddAnim(eAnimRunTurnLeft, "stand_run_fwd_turn_left_", -1, &velocity_run, PS_STAND); anim().AddAnim(eAnimRunTurnRight, "stand_run_fwd_turn_right_", -1, &velocity_run, PS_STAND); - // anim().AddAnim(eAnimScared, "stand_scared_", -1, &velocity_none, PS_STAND); //, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimScared, "stand_scared_", -1, &velocity_none, PS_STAND); //, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimSteal, "stand_steal_", -1, &velocity_steal, PS_STAND); //, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimSteal, "stand_steal_", -1, &velocity_steal, PS_STAND); //, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimEat, "sit_eat_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimEat, "sit_eat_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); // - // anim().AddAnim(eAnimSitIdle, "sit_idle_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimSitIdle, "sit_idle_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimCheckCorpse, "sit_check_corpse_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", + // anim().AddAnim(eAnimCheckCorpse, "sit_check_corpse_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", // "fx_stand_b", "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimSitStandUp, "sit_stand_up_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", + // anim().AddAnim(eAnimSitStandUp, "sit_stand_up_", -1, &velocity_none, PS_SIT); //, "fx_stand_f", // "fx_stand_b", "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimStandSitDown, "stand_sit_down_", -1, &velocity_none, PS_STAND); //, "fx_stand_f", + // anim().AddAnim(eAnimStandSitDown, "stand_sit_down_", -1, &velocity_none, PS_STAND); //, "fx_stand_f", // "fx_stand_b", "fx_stand_l", "fx_stand_r"); // anim().AddTransition(PS_SIT, PS_STAND, eAnimSitStandUp, false); @@ -210,8 +214,8 @@ void CBurer::Load(LPCSTR section) anim().LinkAction(ACT_WALK_BKWD, eAnimWalkFwd); anim().LinkAction(ACT_RUN, eAnimRun); // anim().LinkAction(ACT_EAT, eAnimEat); - anim().LinkAction(ACT_SLEEP, eAnimStandIdle); // eAnimSitIdle); - anim().LinkAction(ACT_REST, eAnimStandIdle); // eAnimSitIdle); + anim().LinkAction(ACT_SLEEP, eAnimStandIdle); // eAnimSitIdle); + anim().LinkAction(ACT_REST, eAnimStandIdle); // eAnimSitIdle); anim().LinkAction(ACT_DRAG, eAnimWalkFwd); anim().LinkAction(ACT_ATTACK, eAnimAttack); // anim().LinkAction(ACT_STEAL, eAnimSteal); diff --git a/src/xrGame/ai/monsters/burer/burer_state_attack_inline.h b/src/xrGame/ai/monsters/burer/burer_state_attack_inline.h index 0c92c653110..85b2d39f729 100644 --- a/src/xrGame/ai/monsters/burer/burer_state_attack_inline.h +++ b/src/xrGame/ai/monsters/burer/burer_state_attack_inline.h @@ -13,7 +13,7 @@ namespace burer { float const health_delta = 0.01f; -} // namespace detail +} // namespace detail template CStateBurerAttack::CStateBurerAttack(Object* obj) : inherited(obj) diff --git a/src/xrGame/ai/monsters/burer/burer_state_attack_run_around_inline.h b/src/xrGame/ai/monsters/burer/burer_state_attack_run_around_inline.h index 2a1d55f3827..6242d4f0bbc 100644 --- a/src/xrGame/ai/monsters/burer/burer_state_attack_run_around_inline.h +++ b/src/xrGame/ai/monsters/burer/burer_state_attack_run_around_inline.h @@ -29,17 +29,17 @@ void CStateBurerAttackRunAroundAbstract::initialize() float dist = object->Position().distance_to(object->EnemyMan.get_enemy()->Position()); - if (dist > 30.f) { // бежать к врагу + if (dist > 30.f) { // бежать к врагу selected_point.mad(object->Position(), dir_to_enemy, DIST_QUANT); } else if ((dist < 20.f) && (dist > 4.f)) - { // убегать от врага + { // убегать от врага selected_point.mad(object->Position(), dir_from_enemy, DIST_QUANT); dest_direction.sub(object->EnemyMan.get_enemy()->Position(), selected_point); dest_direction.normalize(); } else - { // выбрать случайную позицию + { // выбрать случайную позицию selected_point = random_position(object->Position(), DIST_QUANT); dest_direction.sub(object->EnemyMan.get_enemy()->Position(), selected_point); dest_direction.normalize(); diff --git a/src/xrGame/ai/monsters/burer/burer_state_attack_shield_inline.h b/src/xrGame/ai/monsters/burer/burer_state_attack_shield_inline.h index 85d88e7cddf..b9b88a1f50a 100644 --- a/src/xrGame/ai/monsters/burer/burer_state_attack_shield_inline.h +++ b/src/xrGame/ai/monsters/burer/burer_state_attack_shield_inline.h @@ -24,7 +24,7 @@ void CStateBurerShield::initialize() template void CStateBurerShield::execute() { - if (!m_started) // && current_time() > m_last_shield_started + TTime(m_shield_start_anim_length_sec*1000) ) + if (!m_started) // && current_time() > m_last_shield_started + TTime(m_shield_start_anim_length_sec*1000) ) { m_started = true; object->ActivateShield(); diff --git a/src/xrGame/ai/monsters/burer/burer_state_attack_tele_inline.h b/src/xrGame/ai/monsters/burer/burer_state_attack_tele_inline.h index 7d9dd1fdaf0..e5b49f3097e 100644 --- a/src/xrGame/ai/monsters/burer/burer_state_attack_tele_inline.h +++ b/src/xrGame/ai/monsters/burer/burer_state_attack_tele_inline.h @@ -185,7 +185,7 @@ void CStateBurerAttackTele::FindFreeObjects(xr_vector& tpO CCustomMonster* custom_monster = smart_cast(tpObjects[i]); CGrenade* grenade = smart_cast(tpObjects[i]); - if (grenade || // grenades are handled by HandleGrenades function + if (grenade || // grenades are handled by HandleGrenades function !obj || !obj->PPhysicsShell() || !obj->PPhysicsShell()->isActive() || custom_monster || (obj->spawn_ini() && obj->spawn_ini()->section_exist("ph_heavy")) || (obj->m_pPhysicsShell->getMass() < object->m_tele_object_min_mass) || diff --git a/src/xrGame/ai/monsters/chimera/chimera.cpp b/src/xrGame/ai/monsters/chimera/chimera.cpp index 4aa0131a2a0..c724ac8e485 100644 --- a/src/xrGame/ai/monsters/chimera/chimera.cpp +++ b/src/xrGame/ai/monsters/chimera/chimera.cpp @@ -129,10 +129,10 @@ void CChimera::reinit() move().load_velocity(*cNameSect(), "Velocity_JumpGround", MonsterMovement::eChimeraVelocityParameterJumpGround); - com_man().load_jump_data(0, //"jump_attack_0", - 0, //"jump_attack_0", + com_man().load_jump_data(0, //"jump_attack_0", + 0, //"jump_attack_0", "jump_attack_1", "jump_attack_2", - u32(-1), // MonsterMovement::eVelocityParameterRunNormal, + u32(-1), // MonsterMovement::eVelocityParameterRunNormal, MonsterMovement::eChimeraVelocityParameterJumpGround, 0); } diff --git a/src/xrGame/ai/monsters/chimera/chimera_attack_state.h b/src/xrGame/ai/monsters/chimera/chimera_attack_state.h index 068cdea3237..61dd95d39d1 100644 --- a/src/xrGame/ai/monsters/chimera/chimera_attack_state.h +++ b/src/xrGame/ai/monsters/chimera/chimera_attack_state.h @@ -73,8 +73,8 @@ class ChimeraAttackState : public CState float m_min_run_distance; -}; // ChimeraAttackState +}; // ChimeraAttackState #include "chimera_attack_state_inline.h" -#endif // #ifdef CHIMERA_ATTACK_STATE_H_INCLUDED \ No newline at end of file +#endif // #ifdef CHIMERA_ATTACK_STATE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ai/monsters/chimera/chimera_attack_state_inline.h b/src/xrGame/ai/monsters/chimera/chimera_attack_state_inline.h index aa84921338a..c9f7ed1a25b 100644 --- a/src/xrGame/ai/monsters/chimera/chimera_attack_state_inline.h +++ b/src/xrGame/ai/monsters/chimera/chimera_attack_state_inline.h @@ -119,8 +119,8 @@ bool ChimeraAttackState::jump(Fvector const& target, bool attack_jump) m_allow_jump = true; bool const jumped = object->com_man().jump_if_possible(target, (CEntityAlive*)object->EnemyMan.get_enemy(), - attack_jump, // use_direction_to_target - true, // use velocity bounce + attack_jump, // use_direction_to_target + true, // use velocity bounce true); m_allow_jump = false; @@ -284,7 +284,7 @@ void ChimeraAttackState::execute() #ifdef DEBUG_STATE DBG().get_text_tree().clear(); debug::text_tree& text_tree = DBG().get_text_tree().find_or_add("ActorView"); -#endif // DEBUG_STATE +#endif // DEBUG_STATE CEntityAlive* enemy = const_cast(object->EnemyMan.get_enemy()); Fvector const enemy_pos = enemy->Position(); @@ -454,7 +454,7 @@ void ChimeraAttackState::execute() #ifdef DEBUG_STATE text_tree.add_line("num_prepare_jumps", m_num_prepare_jumps); text_tree.add_line("num_attack_jumps", m_num_attack_jumps); -#endif // #ifdef DEBUG_STATE +#endif // #ifdef DEBUG_STATE object->set_action(ACT_RUN); object->path().set_use_dest_orient(false); @@ -466,4 +466,4 @@ void ChimeraAttackState::execute() object->path().set_target_point(m_target, m_target_vertex); } -#endif // #ifdef CHIMERA_ATTACK_STATE_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifdef CHIMERA_ATTACK_STATE_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ai/monsters/control_animation.cpp b/src/xrGame/ai/monsters/control_animation.cpp index 4f97f1aec68..031dbf2542a 100644 --- a/src/xrGame/ai/monsters/control_animation.cpp +++ b/src/xrGame/ai/monsters/control_animation.cpp @@ -86,7 +86,7 @@ void CControlAnimation::play() // speed only for global if (m_data.global.blend) { if (m_data.get_speed() > 0) { - m_data.global.blend->speed = m_data.get_speed(); // TODO: make factor + m_data.global.blend->speed = m_data.get_speed(); // TODO: make factor } else { @@ -117,7 +117,7 @@ void CControlAnimation::play_part(SAnimationPart& part, PlayCallback callback) /////////////////////////////////////////////////////////////////////////////// //#ifdef _DEBUG // Msg("Monster[%s] Time[%u] Anim[%s]",*(m_object->cName()), - //Device.dwTimeGlobal,*(m_object->anim().GetAnimTranslation(part.motion))); + // Device.dwTimeGlobal,*(m_object->anim().GetAnimTranslation(part.motion))); //#endif /////////////////////////////////////////////////////////////////////////////// diff --git a/src/xrGame/ai/monsters/control_animation_base.cpp b/src/xrGame/ai/monsters/control_animation_base.cpp index 38a6b29bdb2..1261ed9e702 100644 --- a/src/xrGame/ai/monsters/control_animation_base.cpp +++ b/src/xrGame/ai/monsters/control_animation_base.cpp @@ -256,7 +256,7 @@ bool CControlAnimationBase::CheckTransition(EMotionAnim from, EMotionAnim to) bool bVectEmpty = m_tTransitions.empty(); while (!bVectEmpty) - { // вход в цикл, если вектор переходов не пустой + { // вход в цикл, если вектор переходов не пустой bool from_is_good = ((I->from.state_used) ? (I->from.state == state_from) : (I->from.anim == cur_from)); bool target_is_good = ((I->target.state_used) ? (I->target.state == state_to) : (I->target.anim == to)); @@ -275,7 +275,7 @@ bool CControlAnimationBase::CheckTransition(EMotionAnim from, EMotionAnim to) if (I->chain) { cur_from = I->anim_transition; state_from = GetState(cur_from); - I = m_tTransitions.begin(); // начать сначала + I = m_tTransitions.begin(); // начать сначала continue; } else diff --git a/src/xrGame/ai/monsters/control_animation_base.h b/src/xrGame/ai/monsters/control_animation_base.h index f295ac40776..374c339d0ba 100644 --- a/src/xrGame/ai/monsters/control_animation_base.h +++ b/src/xrGame/ai/monsters/control_animation_base.h @@ -16,7 +16,7 @@ class CControlAnimationBase : public CControl_ComBase typedef CControl_ComBase inherited; protected: - REPLACED_ANIM m_tReplacedAnims; // анимации подмены + REPLACED_ANIM m_tReplacedAnims; // анимации подмены // сохранённые анимации EMotionAnim prev_motion; @@ -25,10 +25,10 @@ class CControlAnimationBase : public CControl_ComBase TTime time_start_stand; // работа с анимациями атаки - TTime aa_time_last_attack; // время последнего нанесения хита + TTime aa_time_last_attack; // время последнего нанесения хита // ------------------------------------------------------------------------- - u32 spec_params; // дополнительные параметры + u32 spec_params; // дополнительные параметры TTime fx_time_last_play; @@ -38,7 +38,7 @@ class CControlAnimationBase : public CControl_ComBase struct { bool active; - bool enable_braking; // не использовать при торможении + bool enable_braking; // не использовать при торможении EAccelType type; @@ -52,8 +52,8 @@ class CControlAnimationBase : public CControl_ComBase EMotionAnim spec_anim; - MOTION_ITEM_MAP m_tMotions; // карта соответсвий EAction к SMotionItem - TRANSITION_ANIM_VECTOR m_tTransitions; // вектор переходов из одной анимации в другую + MOTION_ITEM_MAP m_tMotions; // карта соответсвий EAction к SMotionItem + TRANSITION_ANIM_VECTOR m_tTransitions; // вектор переходов из одной анимации в другую t_fx_index default_fx_indexes; FX_MAP_STRING fx_map_string; @@ -218,7 +218,7 @@ class CControlAnimationBase : public CControl_ComBase void check_hit(MotionID motion, float time_perc); - float get_animation_length(EMotionAnim anim, u32 index) const; // anim must exist + float get_animation_length(EMotionAnim anim, u32 index) const; // anim must exist bool get_animation_info(EMotionAnim anim, u32 index, MotionID& motion, float& length) const; float get_animation_hit_time(EMotionAnim anim, u32 index) const; u32 get_animation_variants_count(EMotionAnim anim) const; @@ -229,6 +229,6 @@ class CControlAnimationBase : public CControl_ComBase EMotionAnim get_override_animation() const { return m_override_animation; } bool has_override_animation() const { return get_override_animation() != eAnimUndefined; } private: - u32 m_override_animation_index; // used if != -1 - EMotionAnim m_override_animation; // used if != eAnimUndefined + u32 m_override_animation_index; // used if != -1 + EMotionAnim m_override_animation; // used if != eAnimUndefined }; diff --git a/src/xrGame/ai/monsters/control_animation_base_accel.cpp b/src/xrGame/ai/monsters/control_animation_base_accel.cpp index d7e8c2c8587..fa5b6335613 100644 --- a/src/xrGame/ai/monsters/control_animation_base_accel.cpp +++ b/src/xrGame/ai/monsters/control_animation_base_accel.cpp @@ -143,7 +143,7 @@ bool CControlAnimationBase::accel_check_braking(float before_interval, float nom if (m_man->path_builder().is_path_end(braking_dist)) return (braking_mode = true); // проверить точки пути, где необходимо остановиться - float dist = 0.f; // дистанция до найденной точки + float dist = 0.f; // дистанция до найденной точки for (u32 i = m_man->path_builder().detail().curr_travel_point_index() + 1; i < m_man->path_builder().detail().path().size(); i++) { diff --git a/src/xrGame/ai/monsters/control_animation_base_update.cpp b/src/xrGame/ai/monsters/control_animation_base_update.cpp index 3bf8f3204ca..5508caecba2 100644 --- a/src/xrGame/ai/monsters/control_animation_base_update.cpp +++ b/src/xrGame/ai/monsters/control_animation_base_update.cpp @@ -284,7 +284,7 @@ void CControlAnimationBase::SelectVelocities() if (m_tAction == ACT_ATTACK) { float vel = item_it->velocity.velocity.angular_real; m_object->dir().set_heading_speed( - vel * m_object->m_melee_rotation_factor); // todo: make as an external factor + vel * m_object->m_melee_rotation_factor); // todo: make as an external factor } else m_object->dir().set_heading_speed(item_it->velocity.velocity.angular_real); diff --git a/src/xrGame/ai/monsters/control_com_defs.h b/src/xrGame/ai/monsters/control_com_defs.h index 4f8d8cc4202..e088fb165be 100644 --- a/src/xrGame/ai/monsters/control_com_defs.h +++ b/src/xrGame/ai/monsters/control_com_defs.h @@ -5,22 +5,22 @@ namespace ControlCom enum EControlType { // 1st level - eControlMovement = u32(0), // linear velocity - eControlPath, // path builder - eControlDir, // model direction - eControlAnimation, // animation manager - // eControlSound, // sound manager + eControlMovement = u32(0), // linear velocity + eControlPath, // path builder + eControlDir, // model direction + eControlAnimation, // animation manager + // eControlSound, // sound manager // 2nd level - eControlSequencer, // capture: anim - eControlTripleAnimation, // capture: anim + eControlSequencer, // capture: anim + eControlTripleAnimation, // capture: anim //// 3rd level - eControlJump, // capture: path, movement, triple_anim disable : fsm, dir - eControlRotationJump, // capture: path, movement, sequencer, dir - eControlRunAttack, // capture: path, movement, sequencer + eControlJump, // capture: path, movement, triple_anim disable : fsm, dir + eControlRotationJump, // capture: path, movement, sequencer, dir + eControlRunAttack, // capture: path, movement, sequencer eControlThreaten, - eControlMeleeJump, // capture: path, movement, sequencer, dir + eControlMeleeJump, // capture: path, movement, sequencer, dir eControlAnimationBase, eControlMovementBase, diff --git a/src/xrGame/ai/monsters/control_direction.h b/src/xrGame/ai/monsters/control_direction.h index 499ca93998a..cd019894333 100644 --- a/src/xrGame/ai/monsters/control_direction.h +++ b/src/xrGame/ai/monsters/control_direction.h @@ -30,7 +30,7 @@ class CControlDirection : public CControl_ComPure struct { float current_angle; - float current_speed; // current speed + float current_speed; // current speed float current_acc; void init() diff --git a/src/xrGame/ai/monsters/control_jump.cpp b/src/xrGame/ai/monsters/control_jump.cpp index bdac8720e8a..8b64be6a142 100644 --- a/src/xrGame/ai/monsters/control_jump.cpp +++ b/src/xrGame/ai/monsters/control_jump.cpp @@ -546,7 +546,7 @@ bool CControlJump::jump_intersect_geometry(Fvector const& target, IGameObject* c pass_jump_picks = &jump_picks; xr_vector collide_tris; pass_collide_tris = &collide_tris; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG Fvector const sizes = {0.8f, 1.4f, 0.8f}; @@ -562,7 +562,7 @@ bool CControlJump::jump_intersect_geometry(Fvector const& target, IGameObject* c #ifdef DEBUG m_object->m_jump_picks = jump_picks; m_object->m_jump_collide_tris = collide_tris; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return true; } @@ -570,7 +570,7 @@ bool CControlJump::jump_intersect_geometry(Fvector const& target, IGameObject* c #ifdef DEBUG m_object->m_jump_picks = jump_picks; m_object->m_jump_collide_tris = collide_tris; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return false; } diff --git a/src/xrGame/ai/monsters/control_jump.h b/src/xrGame/ai/monsters/control_jump.h index db6e72e0edb..72c0807fb55 100644 --- a/src/xrGame/ai/monsters/control_jump.h +++ b/src/xrGame/ai/monsters/control_jump.h @@ -11,9 +11,9 @@ struct SControlJumpData : public ControlCom::IComData enum EFlags { eEnablePredictPosition = u32(1) << 0, - ePrepareSkip = u32(1) << 1, // do not use prepare state + ePrepareSkip = u32(1) << 1, // do not use prepare state ePrepareInMove = u32(1) << 2, - eGlideOnPrepareFailed = u32(1) << 3, // if not set then cannot start jump + eGlideOnPrepareFailed = u32(1) << 3, // if not set then cannot start jump eGlidePlayAnimOnce = u32(1) << 4, eGroundSkip = u32(1) << 5, eUseTargetPosition = u32(1) << 6, @@ -74,10 +74,10 @@ class CControlJump : public CControl_ComCustom // run-time params u32 m_time_next_allowed; - u32 m_time_started; // time jump started - float m_jump_time; // physical-counted time of jump - float m_blend_speed; // current anim blend speed - Fvector m_target_position; // save target position for internal needs + u32 m_time_started; // time jump started + float m_jump_time; // physical-counted time of jump + float m_blend_speed; // current anim blend speed + Fvector m_target_position; // save target position for internal needs u32 m_last_saved_pos_time; Fvector m_last_saved_pos; diff --git a/src/xrGame/ai/monsters/control_manager.cpp b/src/xrGame/ai/monsters/control_manager.cpp index 11f1099f8c8..e191c8c943e 100644 --- a/src/xrGame/ai/monsters/control_manager.cpp +++ b/src/xrGame/ai/monsters/control_manager.cpp @@ -225,7 +225,7 @@ bool CControl_Manager::is_locked(CControl_Com* com) } // capture -void CControl_Manager::capture(CControl_Com* com, ControlCom::EControlType type) // who, type +void CControl_Manager::capture(CControl_Com* com, ControlCom::EControlType type) // who, type { CControl_Com* target = m_control_elems[type]; @@ -283,7 +283,7 @@ CControl_Com* CControl_Manager::get_capturer(ControlCom::EControlType type) return target->ced()->capturer(); } -void CControl_Manager::release(CControl_Com* com, ControlCom::EControlType type) // who, type +void CControl_Manager::release(CControl_Com* com, ControlCom::EControlType type) // who, type { CControl_Com* target = m_control_elems[type]; CControl_Com* capturer = target->ced()->capturer(); @@ -423,7 +423,7 @@ void CControl_Manager::check_active_com(CControl_Com* com, bool b_add) else { COM_VEC_IT it = std::find(m_active_elems.begin(), m_active_elems.end(), com); - if (it != m_active_elems.end()) (*it) = 0; // do not remove just mark + if (it != m_active_elems.end()) (*it) = 0; // do not remove just mark } } @@ -450,4 +450,4 @@ void CControl_Manager::add_debug_info(debug::text_tree& root_s) } } } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/ai/monsters/control_manager.h b/src/xrGame/ai/monsters/control_manager.h index 5eefb7abbbd..db59b922553 100644 --- a/src/xrGame/ai/monsters/control_manager.h +++ b/src/xrGame/ai/monsters/control_manager.h @@ -61,8 +61,8 @@ class CControl_Manager void set_base_controller(CControl_Com*, ControlCom::EControlType); // capturing/releasing - void capture(CControl_Com*, ControlCom::EControlType); // who, type - void release(CControl_Com*, ControlCom::EControlType); // who, type + void capture(CControl_Com*, ControlCom::EControlType); // who, type + void release(CControl_Com*, ControlCom::EControlType); // who, type bool check_capturer(CControl_Com* com, ControlCom::EControlType type); // Lain: added diff --git a/src/xrGame/ai/monsters/control_manager_custom.cpp b/src/xrGame/ai/monsters/control_manager_custom.cpp index 002d5996ea7..a02d8715cf1 100644 --- a/src/xrGame/ai/monsters/control_manager_custom.cpp +++ b/src/xrGame/ai/monsters/control_manager_custom.cpp @@ -283,7 +283,7 @@ void CControlManagerCustom::load_jump_data( { IKinematicsAnimated* skel_animated = smart_cast(m_object->Visual()); if (!skel_animated) { - return; // monster is dead, so no skeleton (early return due to bug: 18755) + return; // monster is dead, so no skeleton (early return due to bug: 18755) } m_jump->setup_data().flags.assign(flags); diff --git a/src/xrGame/ai/monsters/control_manager_custom.h b/src/xrGame/ai/monsters/control_manager_custom.h index 4ac95e20aee..cb432d6b704 100644 --- a/src/xrGame/ai/monsters/control_manager_custom.h +++ b/src/xrGame/ai/monsters/control_manager_custom.h @@ -54,7 +54,7 @@ class CControlManagerCustom : public CControl_ComBase // Sequencer void seq_init(); void seq_add(MotionID motion); - void seq_switch(); // Перейти в следующее состояние, если такового не имеется - завершить + void seq_switch(); // Перейти в следующее состояние, если такового не имеется - завершить void seq_run(MotionID motion); //------------------------------------------------------------------------------- diff --git a/src/xrGame/ai/monsters/control_movement.cpp b/src/xrGame/ai/monsters/control_movement.cpp index 2b593f81511..2d017ad7c2a 100644 --- a/src/xrGame/ai/monsters/control_movement.cpp +++ b/src/xrGame/ai/monsters/control_movement.cpp @@ -35,7 +35,7 @@ float CControlMovement::real_velocity() Log("! GetVelocity", movement_control->GetVelocity()); Log("! GetPathDir", movement_control->GetPathDir()); } -#endif // DEBUG +#endif // DEBUG clamp(tmp, 0.0f, 15.0f); VERIFY2(_abs(tmp) < 1000, "movement_control->GetXZActVelInGoingDir() returns too big speed"); return tmp; diff --git a/src/xrGame/ai/monsters/control_path_builder.cpp b/src/xrGame/ai/monsters/control_path_builder.cpp index 8133e90b9a6..b4e524c098e 100644 --- a/src/xrGame/ai/monsters/control_path_builder.cpp +++ b/src/xrGame/ai/monsters/control_path_builder.cpp @@ -103,7 +103,7 @@ void CControlPathBuilder::update_schedule() // set target // TODO: make it VERIFY // VERIFY3(m_data.target_node != u32(-1), "Error: Object set wrong path params! Object - //name:",*inherited_com::m_object->cName()); + // name:",*inherited_com::m_object->cName()); if (m_data.target_node == u32(-1)) return; detail().set_dest_position(m_data.target_position); diff --git a/src/xrGame/ai/monsters/control_path_builder.h b/src/xrGame/ai/monsters/control_path_builder.h index 20551d973d9..a08fe9dafa7 100644 --- a/src/xrGame/ai/monsters/control_path_builder.h +++ b/src/xrGame/ai/monsters/control_path_builder.h @@ -49,7 +49,7 @@ class CControlPathBuilder : public CControl_ComPure, pu // services bool is_path_end(float dist_to_end); bool valid_destination(const Fvector& pos, u32 node); - bool valid_and_accessible(Fvector& pos, u32 node); // validate with a small correction + bool valid_and_accessible(Fvector& pos, u32 node); // validate with a small correction bool is_moving_on_path(); bool get_node_in_radius(u32 src_node, float min_radius, float max_radius, u32 attempts, u32& dest_node); diff --git a/src/xrGame/ai/monsters/control_path_builder_base.h b/src/xrGame/ai/monsters/control_path_builder_base.h index 5517a550639..41ba430aed7 100644 --- a/src/xrGame/ai/monsters/control_path_builder_base.h +++ b/src/xrGame/ai/monsters/control_path_builder_base.h @@ -56,13 +56,13 @@ class CControlPathBuilderBase : public CControl_ComBase IC void set_position(const Fvector& p) { _position.set(p); } } m_target_set, m_target_found; - u32 m_time; // время перестроения пути + u32 m_time; // время перестроения пути u32 m_last_time_target_set; float m_distance_to_path_end; bool m_failed; u32 m_last_time_dir_set; - bool m_target_actual; // устанавливаемый таргет соответствует предыдущему + bool m_target_actual; // устанавливаемый таргет соответствует предыдущему struct { @@ -162,9 +162,9 @@ class CControlPathBuilderBase : public CControl_ComBase void find_target_point_set(); void find_target_point_failed(); - void select_target(); // выбрать + void select_target(); // выбрать - void set_path_builder_params(); // set params to control + void set_path_builder_params(); // set params to control void reset(); diff --git a/src/xrGame/ai/monsters/control_path_builder_base_path.cpp b/src/xrGame/ai/monsters/control_path_builder_base_path.cpp index f3089de9693..f46385f2939 100644 --- a/src/xrGame/ai/monsters/control_path_builder_base_path.cpp +++ b/src/xrGame/ai/monsters/control_path_builder_base_path.cpp @@ -21,7 +21,7 @@ bool CControlPathBuilderBase::target_point_need_update() { // если путь ещё не завершен if (!m_man->path_builder().is_path_end(m_distance_to_path_end)) { - if (m_target_actual && !global_failed()) return false; // если global_failed - игнорировать актуальность + if (m_target_actual && !global_failed()) return false; // если global_failed - игнорировать актуальность // если первый раз строим if (m_last_time_target_set == 0) return true; @@ -45,7 +45,7 @@ bool CControlPathBuilderBase::target_point_need_update() } else if ((m_state & eStatePathEnd) == eStatePathEnd) { - if (m_target_set.node() != m_object->ai_location().level_vertex_id()) return true; // физический конец пути + if (m_target_set.node() != m_object->ai_location().level_vertex_id()) return true; // физический конец пути } return false; diff --git a/src/xrGame/ai/monsters/control_rotation_jump.h b/src/xrGame/ai/monsters/control_rotation_jump.h index 99d9a681b76..cdd724691f4 100644 --- a/src/xrGame/ai/monsters/control_rotation_jump.h +++ b/src/xrGame/ai/monsters/control_rotation_jump.h @@ -10,8 +10,8 @@ struct SControlRotationJumpData : public ControlCom::IComData enum EFlags { - eStopAtOnce = u32(1) << 0, // stop at once - eRotateOnce = u32(1) << 1, // use only the first stage + eStopAtOnce = u32(1) << 0, // stop at once + eRotateOnce = u32(1) << 1, // use only the first stage }; flags32 flags; diff --git a/src/xrGame/ai/monsters/control_run_attack.cpp b/src/xrGame/ai/monsters/control_run_attack.cpp index 7eecaa7cdf5..047e4107339 100644 --- a/src/xrGame/ai/monsters/control_run_attack.cpp +++ b/src/xrGame/ai/monsters/control_run_attack.cpp @@ -84,7 +84,7 @@ void CControlRunAttack::on_event(ControlCom::EEventType type, ControlCom::IEvent m_time_next_attack = time() + Random.randI(m_min_delay, m_max_delay); m_man->notify(ControlCom::eventRunAttackEnd, 0); break; - case ControlCom::eventAnimationStart: // handle blend params + case ControlCom::eventAnimationStart: // handle blend params { // set animation speed SControlAnimationData* ctrl_data_anim = diff --git a/src/xrGame/ai/monsters/controller/controller.cpp b/src/xrGame/ai/monsters/controller/controller.cpp index 555849cb912..4d098d58644 100644 --- a/src/xrGame/ai/monsters/controller/controller.cpp +++ b/src/xrGame/ai/monsters/controller/controller.cpp @@ -51,8 +51,8 @@ const u32 default_tube_condition_min_delay = 10000; const float default_tube_condition_min_distance = 10; const float default_stamina_hit = 0.2f; -} // namespace controller -} // namespace detail +} // namespace controller +} // namespace detail CController::CController() { diff --git a/src/xrGame/ai/monsters/controller/controller.h b/src/xrGame/ai/monsters/controller/controller.h index 17936acf19c..39369bb47c0 100644 --- a/src/xrGame/ai/monsters/controller/controller.h +++ b/src/xrGame/ai/monsters/controller/controller.h @@ -14,8 +14,8 @@ class CController : public CBaseMonster, public CControlledActor typedef CBaseMonster inherited; u8 m_max_controlled_number; - ref_sound control_start_sound; // звук, который играется в голове у актера - ref_sound control_hit_sound; // звук, который играется в голове у актера + ref_sound control_start_sound; // звук, который играется в голове у актера + ref_sound control_hit_sound; // звук, который играется в голове у актера ref_sound m_sound_hit_fx; SndShockEffector* m_sndShockEffector; @@ -103,7 +103,7 @@ class CController : public CBaseMonster, public CControlledActor void TakeUnderControl(CEntity*); void UpdateControlled(); void FreeFromControl(); - void OnFreedFromControl(const CEntity*); // если монстр сам себя освободил (destroyed || die) + void OnFreedFromControl(const CEntity*); // если монстр сам себя освободил (destroyed || die) void set_controlled_task(u32 task); diff --git a/src/xrGame/ai/monsters/controller/controller_direction.cpp b/src/xrGame/ai/monsters/controller/controller_direction.cpp index e61f145d9fb..e8e05683623 100644 --- a/src/xrGame/ai/monsters/controller/controller_direction.cpp +++ b/src/xrGame/ai/monsters/controller/controller_direction.cpp @@ -33,7 +33,7 @@ void CControllerDirection::assign_bones() m_bone_spine = &kinematics->LL_GetBoneInstance(kinematics->LL_BoneID("bip01_spine")); m_bone_head = &kinematics->LL_GetBoneInstance(kinematics->LL_BoneID("bip01_head")); - if (!m_controller->PPhysicsShell()) { //нельзя ставить колбеки, если создан физ шел - у него стоят свои колбеки!!! + if (!m_controller->PPhysicsShell()) { //нельзя ставить колбеки, если создан физ шел - у него стоят свои колбеки!!! m_bone_spine->set_callback(bctCustom, bone_callback, this); m_bone_head->set_callback(bctCustom, bone_callback, this); } @@ -81,7 +81,7 @@ void CControllerDirection::head_look_point(const Fvector& look_point) // установить параметры вращения по heading float cur_yaw = m_man->direction().get_heading_current(); - float dy = _abs(angle_normalize_signed(dir_yaw - cur_yaw)); // дельта, на которую нужно поворачиваться + float dy = _abs(angle_normalize_signed(dir_yaw - cur_yaw)); // дельта, на которую нужно поворачиваться bone_angle_head = _pmt_head_bone_limit / (_pmt_head_bone_limit + _pmt_torso_bone_limit) * dy; bone_angle_torso = _pmt_torso_bone_limit / (_pmt_head_bone_limit + _pmt_torso_bone_limit) * dy; diff --git a/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp b/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp index 8141cd2d7f6..3b63d71cc8d 100644 --- a/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp +++ b/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp @@ -153,7 +153,7 @@ bool check_actor_visibility(const Fvector trace_from, const Fvector trace_to, IG return l_rq.O == Actor() || (l_rq.range >= dist - 0.1f); } -} // namespace detail +} // namespace detail extern CActor* g_actor; diff --git a/src/xrGame/ai/monsters/dog/dog.cpp b/src/xrGame/ai/monsters/dog/dog.cpp index f63b4ac2023..98d05b67937 100644 --- a/src/xrGame/ai/monsters/dog/dog.cpp +++ b/src/xrGame/ai/monsters/dog/dog.cpp @@ -345,39 +345,39 @@ LPCSTR CAI_Dog::get_current_animation() switch (current_anim) { case 1: - return "stand_idle_smelling_up_0"; //Нюхает вверх + return "stand_idle_smelling_up_0"; //Нюхает вверх case 2: - return "stand_idle_smelling_down_0"; //Нюхает вниз + return "stand_idle_smelling_down_0"; //Нюхает вниз case 3: - return "stand_idle_smelling_look_around_0"; //Нюхает по кругу + return "stand_idle_smelling_look_around_0"; //Нюхает по кругу case 4: - return "stand_idle_dig_ground_0"; //Обнюховает и роет землю + return "stand_idle_dig_ground_0"; //Обнюховает и роет землю case 5: - return "stand_idle_howl_0"; //Воет + return "stand_idle_howl_0"; //Воет case 6: - return "stand_growl_idle_0"; //Рычит стоя + return "stand_growl_idle_0"; //Рычит стоя case 7: - return "stand_idle_shake_0"; //Отряхивается !!!!! + return "stand_idle_shake_0"; //Отряхивается !!!!! case 8: - return "stand_sit_down_0"; //Садиться + return "stand_sit_down_0"; //Садиться case 9: - return "sit_idle_0"; // Cидит + return "sit_idle_0"; // Cидит case 10: - return "sit_idle_1"; //Чухается сидя + return "sit_idle_1"; //Чухается сидя case 11: - return "sit_idle_2"; //Оглядывается сидя + return "sit_idle_2"; //Оглядывается сидя case 12: - return "sit_stand_up_0"; //Встает + return "sit_stand_up_0"; //Встает case 13: - return "sit_lie_down_0"; //Ложится + return "sit_lie_down_0"; //Ложится case 14: - return "lie_to_sit_0"; //Подымается + return "lie_to_sit_0"; //Подымается case 15: - return "stand_eat_0"; //Отрывает куски + return "stand_eat_0"; //Отрывает куски case 16: - return "stand_threaten_0"; //Лает + return "stand_threaten_0"; //Лает default: - return "stand_idle_1"; //Нюхает вперед + return "stand_idle_1"; //Нюхает вперед } } diff --git a/src/xrGame/ai/monsters/dog/dog_state_manager.cpp b/src/xrGame/ai/monsters/dog/dog_state_manager.cpp index ac38bbced4e..b3050975114 100644 --- a/src/xrGame/ai/monsters/dog/dog_state_manager.cpp +++ b/src/xrGame/ai/monsters/dog/dog_state_manager.cpp @@ -21,9 +21,9 @@ namespace dog { const float atack_decision_maxdist = 6.f; -} // dog +} // dog -} // detail +} // detail CStateManagerDog::CStateManagerDog(CAI_Dog* monster) : inherited(monster) { diff --git a/src/xrGame/ai/monsters/energy_holder.h b/src/xrGame/ai/monsters/energy_holder.h index 6e51f9766f6..62c359949df 100644 --- a/src/xrGame/ai/monsters/energy_holder.h +++ b/src/xrGame/ai/monsters/energy_holder.h @@ -3,13 +3,13 @@ class CEnergyHolder { // энергия - float m_value; // текущее значение энергии - float m_restore_vel; // скорость восстановления (ltx-param) - float m_decline_vel; // скорость уменьшения энергии в активном состоянии (ltx-param) - float m_critical_value; // критическое значение энергии, меньше которого активность будет отключена (ltx-param) - float m_activate_value; // значение энергии, больше которого активность может быть восстановлена (ltx-param) - u32 m_time_last_update; // время последнего обновления энергии - float m_aggressive_restore_vel; // скорость агрессивного восстановления (ltx-param) + float m_value; // текущее значение энергии + float m_restore_vel; // скорость восстановления (ltx-param) + float m_decline_vel; // скорость уменьшения энергии в активном состоянии (ltx-param) + float m_critical_value; // критическое значение энергии, меньше которого активность будет отключена (ltx-param) + float m_activate_value; // значение энергии, больше которого активность может быть восстановлена (ltx-param) + u32 m_time_last_update; // время последнего обновления энергии + float m_aggressive_restore_vel; // скорость агрессивного восстановления (ltx-param) // активность bool m_active; diff --git a/src/xrGame/ai/monsters/group_states/group_state_attack_inline.h b/src/xrGame/ai/monsters/group_states/group_state_attack_inline.h index 8e894bd29c4..a96f257007e 100644 --- a/src/xrGame/ai/monsters/group_states/group_state_attack_inline.h +++ b/src/xrGame/ai/monsters/group_states/group_state_attack_inline.h @@ -339,8 +339,8 @@ void CStateGroupAttackAbstract::setup_substates() data.vertex = 0; data.point = object->EnemyMan.get_enemy()->Position(); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 15.f + m_delta_distance; // get exactly to the point + data.action.time_out = 0; // do not use time out + data.completion_dist = 15.f + m_delta_distance; // get exactly to the point data.time_to_rebuild = object->get_attack_rebuild_time(); data.accelerated = true; data.braking = false; @@ -359,8 +359,8 @@ void CStateGroupAttackAbstract::setup_substates() data.vertex = 0; data.point = object->EnemyMan.get_enemy()->Position(); data.action.action = ACT_WALK_FWD; - data.action.time_out = 0; // do not use time out - data.completion_dist = 10.f + m_delta_distance; // get exactly to the point + data.action.time_out = 0; // do not use time out + data.completion_dist = 10.f + m_delta_distance; // get exactly to the point data.time_to_rebuild = object->get_attack_rebuild_time(); data.accelerated = true; data.braking = false; @@ -379,14 +379,14 @@ void CStateGroupAttackAbstract::setup_substates() data.vertex = 0; data.point = object->EnemyMan.get_enemy()->Position(); data.action.action = ACT_HOME_WALK_GROWL; - data.action.time_out = 0; // do not use time out + data.action.time_out = 0; // do not use time out if (m_drive_out) { - data.completion_dist = 1.f; // get exactly to the point + data.completion_dist = 1.f; // get exactly to the point } else { - data.completion_dist = 6.f + m_delta_distance; // get exactly to the point + data.completion_dist = 6.f + m_delta_distance; // get exactly to the point } data.time_to_rebuild = object->get_attack_rebuild_time(); data.accelerated = true; diff --git a/src/xrGame/ai/monsters/group_states/group_state_custom_inline.h b/src/xrGame/ai/monsters/group_states/group_state_custom_inline.h index 14bf9b5cc2b..fab569e62fe 100644 --- a/src/xrGame/ai/monsters/group_states/group_state_custom_inline.h +++ b/src/xrGame/ai/monsters/group_states/group_state_custom_inline.h @@ -35,7 +35,7 @@ void CStateCustomGroupAbstract::setup_substates() SStateDataAction data; data.action = ACT_STAND_IDLE; - data.time_out = 0; // do not use time out + data.time_out = 0; // do not use time out switch (object->get_number_animation()) { case u32(5): data.sound_type = MonsterSound::eMonsterSoundSteal; break; diff --git a/src/xrGame/ai/monsters/group_states/group_state_eat_drag_inline.h b/src/xrGame/ai/monsters/group_states/group_state_eat_drag_inline.h index 922281edfd6..82094c95fe7 100644 --- a/src/xrGame/ai/monsters/group_states/group_state_eat_drag_inline.h +++ b/src/xrGame/ai/monsters/group_states/group_state_eat_drag_inline.h @@ -159,11 +159,11 @@ bool CStateGroupDragAbstract::check_completion() return true; } - if (m_cover_vertex_id != u32(-1)) { // valid vertex so wait path end + if (m_cover_vertex_id != u32(-1)) { // valid vertex so wait path end if (object->Position().distance_to(m_cover_position) < 2.f) return true; } else - { // invalid vertex so check distanced that passed + { // invalid vertex so check distanced that passed if (m_corpse_start_position.distance_to(object->Position()) > object->Home->get_min_radius()) return true; } diff --git a/src/xrGame/ai/monsters/group_states/group_state_eat_inline.h b/src/xrGame/ai/monsters/group_states/group_state_eat_inline.h index a9c3ebae0ea..a14f1113268 100644 --- a/src/xrGame/ai/monsters/group_states/group_state_eat_inline.h +++ b/src/xrGame/ai/monsters/group_states/group_state_eat_inline.h @@ -270,7 +270,7 @@ void CStateGroupEatAbstract::setup_substates() debug::log_text_tree(tree); FATAL("Debug info has been added, plz save log"); } -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG if ((corpse->m_pPhysicsShell == NULL) || (!corpse->m_pPhysicsShell->isActive())) { nearest_bone_pos = corpse->Position(); diff --git a/src/xrGame/ai/monsters/group_states/group_state_hear_danger_sound_inline.h b/src/xrGame/ai/monsters/group_states/group_state_hear_danger_sound_inline.h index 97cd8703458..a9c9a3d6382 100644 --- a/src/xrGame/ai/monsters/group_states/group_state_hear_danger_sound_inline.h +++ b/src/xrGame/ai/monsters/group_states/group_state_hear_danger_sound_inline.h @@ -121,8 +121,8 @@ void CStateGroupHearDangerousSoundAbstract::setup_substates() } data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 3.f; // get exactly to the point + data.action.time_out = 0; // do not use time out + data.completion_dist = 3.f; // get exactly to the point data.time_to_rebuild = 0; data.accelerated = true; data.braking = true; diff --git a/src/xrGame/ai/monsters/group_states/group_state_home_point_attack_inline.h b/src/xrGame/ai/monsters/group_states/group_state_home_point_attack_inline.h index b821e72d71b..481ffe298e3 100644 --- a/src/xrGame/ai/monsters/group_states/group_state_home_point_attack_inline.h +++ b/src/xrGame/ai/monsters/group_states/group_state_home_point_attack_inline.h @@ -14,11 +14,11 @@ namespace detail { namespace dog { -const float scare_distance2enemy = 20.f; // distance on which dog can be scared of enemy +const float scare_distance2enemy = 20.f; // distance on which dog can be scared of enemy -} // namespace dog +} // namespace dog -} // namespace detail +} // namespace detail ////////////////////////////////////////////////////////////////////////// // Construct Substates @@ -198,9 +198,9 @@ void CStateGroupAttackMoveToHomePointAbstract::setup_substates() data.vertex = m_target_node; data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out + data.action.time_out = 0; // do not use time out data.completion_dist = 1.f; - data.time_to_rebuild = 0; // do not rebuild + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Aggressive; diff --git a/src/xrGame/ai/monsters/group_states/group_state_rest_idle_inline.h b/src/xrGame/ai/monsters/group_states/group_state_rest_idle_inline.h index d8feff25c82..ef8002a0574 100644 --- a/src/xrGame/ai/monsters/group_states/group_state_rest_idle_inline.h +++ b/src/xrGame/ai/monsters/group_states/group_state_rest_idle_inline.h @@ -132,9 +132,9 @@ void CStateGroupRestIdleAbstract::setup_substates() } } data.action.action = m_move_type ? ACT_WALK_FWD : ACT_HOME_WALK_SMELLING; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Calm; @@ -169,9 +169,9 @@ void CStateGroupRestIdleAbstract::setup_substates() } } data.action.action = m_move_type ? ACT_WALK_FWD : ACT_HOME_WALK_SMELLING; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Calm; @@ -202,7 +202,7 @@ void CStateGroupRestIdleAbstract::setup_substates() SStateDataAction data; data.action = ACT_STAND_IDLE; - data.time_out = 0; // do not use time out + data.time_out = 0; // do not use time out if (object->get_number_animation() == u32(6)) { data.sound_type = MonsterSound::eMonsterSoundThreaten; } diff --git a/src/xrGame/ai/monsters/group_states/state_adapter.h b/src/xrGame/ai/monsters/group_states/state_adapter.h index 59dbd59fd9c..d573fb7b7fe 100644 --- a/src/xrGame/ai/monsters/group_states/state_adapter.h +++ b/src/xrGame/ai/monsters/group_states/state_adapter.h @@ -48,4 +48,4 @@ class CMonsterStateAdapter : public CState<_Object> CMonsterStateInterface* m_impl; }; -#endif // GROUP_STATE_ADAPTER_H_INCLUDED \ No newline at end of file +#endif // GROUP_STATE_ADAPTER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ai/monsters/invisibility.h b/src/xrGame/ai/monsters/invisibility.h index 8b69bfca7e1..a6e18a9da77 100644 --- a/src/xrGame/ai/monsters/invisibility.h +++ b/src/xrGame/ai/monsters/invisibility.h @@ -13,9 +13,9 @@ class CInvisibility bool m_manual; - bool m_active; // - float m_energy; // [0..1] - float m_speed; // energy change speed (external) + bool m_active; // + float m_energy; // [0..1] + float m_speed; // energy change speed (external) protected: virtual void reload(LPCSTR section); diff --git a/src/xrGame/ai/monsters/monster_aura.cpp b/src/xrGame/ai/monsters/monster_aura.cpp index 4fda7ae1953..e691d6c8703 100644 --- a/src/xrGame/ai/monsters/monster_aura.cpp +++ b/src/xrGame/ai/monsters/monster_aura.cpp @@ -16,7 +16,7 @@ static pcstr const s_sound_string = "_sound"; static pcstr const s_detect_sound_string = "_detect_sound"; static pcstr const s_enable_for_dead_string = "_enable_for_dead"; -} // namespace detail +} // namespace detail monster_aura::monster_aura(CBaseMonster* const object, pcstr const name) : m_object(object), m_pp_effector_name(NULL), m_pp_index(0) @@ -39,10 +39,10 @@ float monster_aura::override_if_debug(pcstr var_name, float const value) const STRCONCAT(full_var_name, m_name, var_name); return m_object->override_if_debug(full_var_name, value); -#else // DEBUG - var_name; // prevent warning +#else // DEBUG + var_name; // prevent warning return value; -#endif // DEBUG +#endif // DEBUG } float monster_aura::calculate() const diff --git a/src/xrGame/ai/monsters/monster_aura.h b/src/xrGame/ai/monsters/monster_aura.h index 366660ad1c8..2dab78ef8b2 100644 --- a/src/xrGame/ai/monsters/monster_aura.h +++ b/src/xrGame/ai/monsters/monster_aura.h @@ -42,4 +42,4 @@ class monster_aura float xr_stdcall get_post_process_factor() const; }; -#endif // MONSTER_AURA_H_INCLUDED \ No newline at end of file +#endif // MONSTER_AURA_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ai/monsters/monster_home.cpp b/src/xrGame/ai/monsters/monster_home.cpp index be68cd61d1c..64c3ad022c1 100644 --- a/src/xrGame/ai/monsters/monster_home.cpp +++ b/src/xrGame/ai/monsters/monster_home.cpp @@ -29,9 +29,9 @@ void check_path(const CBaseMonster* monster, const CPatrolPath* path) .level(ai().game_graph().vertex(path->vertices().begin()->second->data().game_vertex_id())->level_id()) .name())); } -#else // DEBUG +#else // DEBUG #define check_path(a, b) -#endif // DEBUG +#endif // DEBUG void CMonsterHome::load(LPCSTR line) { diff --git a/src/xrGame/ai/monsters/monster_sound_defs.h b/src/xrGame/ai/monsters/monster_sound_defs.h index 6494bd65257..b2f32fc8a1d 100644 --- a/src/xrGame/ai/monsters/monster_sound_defs.h +++ b/src/xrGame/ai/monsters/monster_sound_defs.h @@ -38,8 +38,8 @@ enum EVirtualChannels { eBaseChannel = u32(1) << 7, eChannelIndependent = - u32(1) << 15, // can be played in any time with any conditions (need shift operator for every id) - eCaptureAllChannels = u32(-1), // play only this one + u32(1) << 15, // can be played in any time with any conditions (need shift operator for every id) + eCaptureAllChannels = u32(-1), // play only this one }; }; diff --git a/src/xrGame/ai/monsters/monster_sound_memory.h b/src/xrGame/ai/monsters/monster_sound_memory.h index 3b7478785ed..b0e35710e74 100644 --- a/src/xrGame/ai/monsters/monster_sound_memory.h +++ b/src/xrGame/ai/monsters/monster_sound_memory.h @@ -39,11 +39,11 @@ typedef struct tagSoundElement { const IGameObject* who; TSoundDangerValue type; - Fvector position; // позиция звука, не объекта, издавшего звук + Fvector position; // позиция звука, не объекта, издавшего звук float power; - TTime time; // время обнаружения звука + TTime time; // время обнаружения звука - int value; // оценочное значение данного звука + int value; // оценочное значение данного звука tagSoundElement() { @@ -76,7 +76,7 @@ typedef struct tagSoundElement class CMonsterSoundMemory { - TTime time_memory; // время хранения звуков + TTime time_memory; // время хранения звуков xr_vector Sounds; CBaseMonster* monster; @@ -97,7 +97,7 @@ class CMonsterSoundMemory int GetNumSounds() { return Sounds.size(); } void GetFirstSound(SoundElem& s, bool& bDangerous); - void GetSound(SoundElem& s, bool& bDangerous); // возвращает самый опасный звук + void GetSound(SoundElem& s, bool& bDangerous); // возвращает самый опасный звук SoundElem& GetSound(); bool get_sound_from_object(const IGameObject* who, SoundElem& value); diff --git a/src/xrGame/ai/monsters/monster_state_manager_inline.h b/src/xrGame/ai/monsters/monster_state_manager_inline.h index 03b8aab4d85..cf8901ffa9d 100644 --- a/src/xrGame/ai/monsters/monster_state_manager_inline.h +++ b/src/xrGame/ai/monsters/monster_state_manager_inline.h @@ -11,9 +11,9 @@ void CMonsterStateManagerAbstract::reinit() } namespace detail -{ // helper function implemented in file alife_simulator.cpp +{ // helper function implemented in file alife_simulator.cpp bool object_exists_in_alife_registry(u32 id); -} // namespace detail +} // namespace detail TEMPLATE_SPECIALIZATION void CMonsterStateManagerAbstract::update() diff --git a/src/xrGame/ai/monsters/poltergeist/poltergeist.h b/src/xrGame/ai/monsters/poltergeist/poltergeist.h index d05d9c323c9..0faad89ac00 100644 --- a/src/xrGame/ai/monsters/poltergeist/poltergeist.h +++ b/src/xrGame/ai/monsters/poltergeist/poltergeist.h @@ -86,7 +86,7 @@ class CPoltergeist : public CBaseMonster, public CTelekinesis, public CEnergyHol ref_sound m_strange_sound; // Movement - Fvector m_current_position; // Позиция на ноде + Fvector m_current_position; // Позиция на ноде // Dynamic Height u32 time_height_updated; @@ -188,7 +188,7 @@ class CPolterFlame : public CPolterSpecialAbility u32 m_hit_delay; u32 m_count; - u32 m_delay; // between 2 flames + u32 m_delay; // between 2 flames u32 m_time_flame_started; diff --git a/src/xrGame/ai/monsters/poltergeist/poltergeist_flame_thrower.cpp b/src/xrGame/ai/monsters/poltergeist/poltergeist_flame_thrower.cpp index eefb289a026..386a7d662ea 100644 --- a/src/xrGame/ai/monsters/poltergeist/poltergeist_flame_thrower.cpp +++ b/src/xrGame/ai/monsters/poltergeist/poltergeist_flame_thrower.cpp @@ -171,19 +171,19 @@ void CPolterFlame::update_schedule() NET_Packet P; SHit HS; - HS.GenHeader(GE_HIT, elem->target_object->ID()); // u_EventGen - //(P,GE_HIT, - //element->target_object->ID()); - HS.whoID = (m_object->ID()); // P.w_u16 (ID()); - HS.weaponID = (m_object->ID()); // P.w_u16 (ID()); - HS.dir = (elem->target_dir); // P.w_dir (element->target_dir); - HS.power = (hit_value); // P.w_float (m_flame_hit_value); - HS.boneID = (BI_NONE); // P.w_s16 (BI_NONE); + HS.GenHeader(GE_HIT, elem->target_object->ID()); // u_EventGen + //(P,GE_HIT, + // element->target_object->ID()); + HS.whoID = (m_object->ID()); // P.w_u16 (ID()); + HS.weaponID = (m_object->ID()); // P.w_u16 (ID()); + HS.dir = (elem->target_dir); // P.w_dir (element->target_dir); + HS.power = (hit_value); // P.w_float (m_flame_hit_value); + HS.boneID = (BI_NONE); // P.w_s16 (BI_NONE); HS.p_in_bone_space = (Fvector().set( - 0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); - HS.impulse = (0.f); // P.w_float (0.f); + 0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); + HS.impulse = (0.f); // P.w_float (0.f); HS.hit_type = - (ALife::eHitTypeBurn); // P.w_u16 (u16(ALife::eHitTypeBurn)); + (ALife::eHitTypeBurn); // P.w_u16 (u16(ALife::eHitTypeBurn)); HS.Write_Packet(P); m_object->u_EventSend(P); diff --git a/src/xrGame/ai/monsters/poltergeist/poltergeist_movement.cpp b/src/xrGame/ai/monsters/poltergeist/poltergeist_movement.cpp index 42e8c667d31..4249fad4797 100644 --- a/src/xrGame/ai/monsters/poltergeist/poltergeist_movement.cpp +++ b/src/xrGame/ai/monsters/poltergeist/poltergeist_movement.cpp @@ -31,8 +31,8 @@ void CPoltergeisMovementManager::move_along_path( // Вычислить пройденную дистанцию, определить целевую позицию на маршруте, // изменить detail().curr_travel_point_index() - float desirable_speed = old_desirable_speed(); // желаемая скорость объекта - float dist = desirable_speed * time_delta; // пройденное расстояние в соостветствие с желаемой скоростью + float desirable_speed = old_desirable_speed(); // желаемая скорость объекта + float dist = desirable_speed * time_delta; // пройденное расстояние в соостветствие с желаемой скоростью float desirable_dist = dist; // определить целевую точку diff --git a/src/xrGame/ai/monsters/poltergeist/poltergeist_state_manager.cpp b/src/xrGame/ai/monsters/poltergeist/poltergeist_state_manager.cpp index d16fb38702d..18d10a2205e 100644 --- a/src/xrGame/ai/monsters/poltergeist/poltergeist_state_manager.cpp +++ b/src/xrGame/ai/monsters/poltergeist/poltergeist_state_manager.cpp @@ -114,13 +114,13 @@ void CStateManagerPoltergeist::polter_attack() // object->FireFlame(enemy); // time_next_flame_attack = cur_time + Random.randI(object->m_flame_delay.min, (b_aggressive) ? - //object->m_flame_delay.aggressive : object->m_flame_delay.normal); + // object->m_flame_delay.aggressive : object->m_flame_delay.normal); //} // if (time_next_tele_attack < cur_time) { // //object->ProcessTelekinesis(enemy); // time_next_tele_attack = cur_time + Random.randI(object->m_tele_delay.min, (b_aggressive) ? - //object->m_tele_delay.aggressive : object->m_tele_delay.normal); + // object->m_tele_delay.aggressive : object->m_tele_delay.normal); //} // if (time_next_scare_attack < cur_time) { @@ -130,6 +130,6 @@ void CStateManagerPoltergeist::polter_attack() // object->StrangeSounds(enemy->Position()); // // time_next_scare_attack = cur_time + Random.randI(object->m_scare_delay.min, (b_aggressive) ? - //object->m_scare_delay.aggressive : object->m_scare_delay.normal); + // object->m_scare_delay.aggressive : object->m_scare_delay.normal); //} } diff --git a/src/xrGame/ai/monsters/poltergeist/poltergeist_telekinesis.cpp b/src/xrGame/ai/monsters/poltergeist/poltergeist_telekinesis.cpp index 73c48577286..17a3b4e58be 100644 --- a/src/xrGame/ai/monsters/poltergeist/poltergeist_telekinesis.cpp +++ b/src/xrGame/ai/monsters/poltergeist/poltergeist_telekinesis.cpp @@ -239,7 +239,7 @@ bool CPolterTele::tele_raise_objects() // bool rotate = false; // CTelekinesis::activate (obj, m_pmt_tele_raise_speed, m_pmt_tele_object_height, m_pmt_tele_time_object_keep, - //rotate); + // rotate); //} if (!tele_objects.empty()) { @@ -274,7 +274,7 @@ struct SCollisionHitCallback : public ICollisionHitCallback if (cs > min_cs * 0.5f) hl = m_pmt_object_collision_damage; VERIFY(m_object); di->SetInitiated(); - m_object->set_collision_hit_callback(0); // delete this!! + m_object->set_collision_hit_callback(0); // delete this!! } }; diff --git a/src/xrGame/ai/monsters/pseudodog/pseudodog.cpp b/src/xrGame/ai/monsters/pseudodog/pseudodog.cpp index ce4bd48e0d2..7859dc2d01d 100644 --- a/src/xrGame/ai/monsters/pseudodog/pseudodog.cpp +++ b/src/xrGame/ai/monsters/pseudodog/pseudodog.cpp @@ -11,13 +11,13 @@ #ifdef _DEBUG #include -#include "xrAICore/Navigation/ai_object_location.h" -#include "level_debug.h" -#include "xrAICore/Navigation/level_graph.h" #include "ai_space.h" #include "alife_simulator.h" -#include "xrServerEntities/xrServer_Object_Base.h" +#include "level_debug.h" +#include "xrAICore/Navigation/ai_object_location.h" +#include "xrAICore/Navigation/level_graph.h" #include "xrServer.h" +#include "xrServerEntities/xrServer_Object_Base.h" #endif CAI_PseudoDog::CAI_PseudoDog() diff --git a/src/xrGame/ai/monsters/pseudodog/pseudodog.h b/src/xrGame/ai/monsters/pseudodog/pseudodog.h index fc2e5e79a02..a196a355ca1 100644 --- a/src/xrGame/ai/monsters/pseudodog/pseudodog.h +++ b/src/xrGame/ai/monsters/pseudodog/pseudodog.h @@ -12,7 +12,7 @@ class CAI_PseudoDog : public CBaseMonster TTime m_time_became_angry; - TTime time_growling; // время нахождения в состоянии пугания + TTime time_growling; // время нахождения в состоянии пугания enum { diff --git a/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.cpp b/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.cpp index 738a771e0a9..f47062851bb 100644 --- a/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.cpp +++ b/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.cpp @@ -95,41 +95,58 @@ void CPseudoGigant::Load(LPCSTR section) anim().AddAnim(eAnimLieToSleep, "lie_to_sleep_", -1, &velocity_none, PS_LIE, "fx_stand_f", "fx_stand_b", "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimStandIdle, "stand_idle_", -1, &velocity_none, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimStandIdle, "stand_idle_", -1, &velocity_none, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimStandTurnLeft, "stand_turn_ls_", -1, &velocity_turn, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimStandTurnLeft, "stand_turn_ls_", -1, &velocity_turn, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimStandTurnRight, "stand_turn_rs_", -1, &velocity_turn, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimStandTurnRight, "stand_turn_rs_", -1, &velocity_turn, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimLieIdle, "stand_sleep_", -1, &velocity_none, PS_LIE, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimLieIdle, "stand_sleep_", -1, &velocity_none, PS_LIE, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimSitIdle, "sit_idle_", -1, &velocity_none, PS_SIT, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimSitIdle, "sit_idle_", -1, &velocity_none, PS_SIT, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimSleep, "stand_sleep_", -1, &velocity_none, PS_LIE, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimSleep, "stand_sleep_", -1, &velocity_none, PS_LIE, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimWalkFwd, "stand_walk_fwd_", -1, &velocity_walk, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimWalkFwd, "stand_walk_fwd_", -1, &velocity_walk, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); // anim().AddAnim(eAnimWalkDamaged, "stand_walk_fwd_dmg_", -1, &velocity_walk_dmg, PS_STAND, "fx_stand_f", // "fx_stand_b", "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimRun, "stand_run_fwd_", -1, &velocity_run, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimRun, "stand_run_fwd_", -1, &velocity_run, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimRunDamaged, "stand_run_dmg_", -1, &velocity_run_dmg, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimRunDamaged, "stand_run_dmg_", -1, &velocity_run_dmg, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimEat, "stand_eat_", -1, &velocity_none, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimEat, "stand_eat_", -1, &velocity_none, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimAttack, "stand_attack_", -1, &velocity_turn, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimAttack, "stand_attack_", -1, &velocity_turn, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimLookAround, "stand_idle_", -1, &velocity_none, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimLookAround, "stand_idle_", -1, &velocity_none, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimSteal, "stand_steal_", -1, &velocity_steal, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimSteal, "stand_steal_", -1, &velocity_steal, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimDie, "stand_idle_", -1, &velocity_none, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimDie, "stand_idle_", -1, &velocity_none, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimStandLieDown, "stand_lie_down_", -1, &velocity_none, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimStandLieDown, "stand_lie_down_", -1, &velocity_none, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimLieToSleep, "lie_to_sleep_", -1, &velocity_none, PS_LIE, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimLieToSleep, "lie_to_sleep_", -1, &velocity_none, PS_LIE, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); - // anim().AddAnim(eAnimThreaten, "stand_kick_", -1, &velocity_none, PS_STAND, "fx_stand_f", "fx_stand_b", + // anim().AddAnim(eAnimThreaten, "stand_kick_", -1, &velocity_none, PS_STAND, "fx_stand_f", + // "fx_stand_b", // "fx_stand_l", "fx_stand_r"); // anim().AddAnim(eAnimRunTurnLeft, "stand_run_left_", -1, &velocity_run, PS_STAND); @@ -321,17 +338,17 @@ void CPseudoGigant::on_threaten_execute() NET_Packet l_P; SHit HS; - HS.GenHeader(GE_HIT, pA->ID()); // u_EventGen (l_P,GE_HIT, pA->ID()); - HS.whoID = (ID()); // l_P.w_u16 (ID()); - HS.weaponID = (ID()); // l_P.w_u16 (ID()); - HS.dir = (Fvector().set(0.f, 1.f, 0.f)); // l_P.w_dir (Fvector().set(0.f,1.f,0.f)); - HS.power = (hit_value); // l_P.w_float (m_kick_damage); + HS.GenHeader(GE_HIT, pA->ID()); // u_EventGen (l_P,GE_HIT, pA->ID()); + HS.whoID = (ID()); // l_P.w_u16 (ID()); + HS.weaponID = (ID()); // l_P.w_u16 (ID()); + HS.dir = (Fvector().set(0.f, 1.f, 0.f)); // l_P.w_dir (Fvector().set(0.f,1.f,0.f)); + HS.power = (hit_value); // l_P.w_float (m_kick_damage); HS.boneID = (smart_cast( - pA->Visual())->LL_GetBoneRoot()); // l_P.w_s16 (smart_cast(pA->Visual())->LL_GetBoneRoot()); - HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // l_P.w_vec3 (Fvector().set(0.f,0.f,0.f)); - HS.impulse = (80 * pA->character_physics_support()->movement()->GetMass()); // l_P.w_float (20 * - //pA->movement_control()->GetMass()); - HS.hit_type = (ALife::eHitTypeStrike); // l_P.w_u16 ( u16(ALife::eHitTypeWound) ); + pA->Visual())->LL_GetBoneRoot()); // l_P.w_s16 (smart_cast(pA->Visual())->LL_GetBoneRoot()); + HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // l_P.w_vec3 (Fvector().set(0.f,0.f,0.f)); + HS.impulse = (80 * pA->character_physics_support()->movement()->GetMass()); // l_P.w_float (20 * + // pA->movement_control()->GetMass()); + HS.hit_type = (ALife::eHitTypeStrike); // l_P.w_u16 ( u16(ALife::eHitTypeWound) ); HS.Write_Packet(l_P); u_EventSend(l_P); } diff --git a/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.h b/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.h index 5237d5f5ec3..0d483e4c276 100644 --- a/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.h +++ b/src/xrGame/ai/monsters/pseudogigant/pseudo_gigant.h @@ -19,8 +19,8 @@ class CPseudoGigant : public CBaseMonster, public CControlledEntityr_bool(section, "Cannibalism"); m_dwEatCorpseInterval = pSettings->r_s32(section, "EatCorpseInterval"); - m_fNullASpeed = pSettings->r_float(section, "AngularStandSpeed") / 180.f * PI; // PI_MUL_2 - m_fMinASpeed = pSettings->r_float(section, "AngularMinSpeed") / 180.f * PI; // PI_MUL_2 - m_fMaxASpeed = pSettings->r_float(section, "AngularMaxSpeed") / 180.f * PI; //.2f - m_fAttackASpeed = pSettings->r_float(section, "AngularAttackSpeed") / 180.f * PI; //.15f; + m_fNullASpeed = pSettings->r_float(section, "AngularStandSpeed") / 180.f * PI; // PI_MUL_2 + m_fMinASpeed = pSettings->r_float(section, "AngularMinSpeed") / 180.f * PI; // PI_MUL_2 + m_fMaxASpeed = pSettings->r_float(section, "AngularMaxSpeed") / 180.f * PI; //.2f + m_fAttackASpeed = pSettings->r_float(section, "AngularAttackSpeed") / 180.f * PI; //.15f; m_phMass = pSettings->r_float(section, "corp_mass"); m_dwActiveScheduleMin = shedule.t_min; diff --git a/src/xrGame/ai/monsters/rats/ai_rat.h b/src/xrGame/ai/monsters/rats/ai_rat.h index 8aa8cb12db9..da52c2dabc6 100644 --- a/src/xrGame/ai/monsters/rats/ai_rat.h +++ b/src/xrGame/ai/monsters/rats/ai_rat.h @@ -23,7 +23,7 @@ class rat_state_manager; namespace steering_behaviour { class manager; -} // namespace steering_behaviour +} // namespace steering_behaviour class CAI_Rat : public CCustomMonster, public CEatableItem { private: @@ -414,12 +414,12 @@ class CAI_Rat : public CCustomMonster, public CEatableItem virtual const SRotation Orientation() const { return (inherited::Orientation()); }; public: virtual void make_Interpolation(); - virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps + virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps #ifdef DEBUG - virtual void PH_Ch_CrPr(); // + virtual void PH_Ch_CrPr(); // #endif - virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps + virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps virtual void OnH_A_Chield(); virtual void create_physic_shell(); virtual void setup_physic_shell(); diff --git a/src/xrGame/ai/monsters/rats/ai_rat_feel.cpp b/src/xrGame/ai/monsters/rats/ai_rat_feel.cpp index fcc957e0c4a..5edb7e0805a 100644 --- a/src/xrGame/ai/monsters/rats/ai_rat_feel.cpp +++ b/src/xrGame/ai/monsters/rats/ai_rat_feel.cpp @@ -38,9 +38,9 @@ void CAI_Rat::feel_sound_new( m_fMorale += m_fMoraleDeathQuant; else if (((eType & SOUND_TYPE_WEAPON_SHOOTING) == SOUND_TYPE_WEAPON_SHOOTING) && !memory().enemy().selected()) - m_fMorale += m_fMoraleFearQuant; /// fDistance; + m_fMorale += m_fMoraleFearQuant; /// fDistance; else if ((eType & SOUND_TYPE_MONSTER_ATTACKING) == SOUND_TYPE_MONSTER_ATTACKING) - m_fMorale += m_fMoraleSuccessAttackQuant; /// fDistance; + m_fMorale += m_fMoraleSuccessAttackQuant; /// fDistance; } } diff --git a/src/xrGame/ai/monsters/rats/ai_rat_fire.cpp b/src/xrGame/ai/monsters/rats/ai_rat_fire.cpp index b75a41c77f9..355e0696a2d 100644 --- a/src/xrGame/ai/monsters/rats/ai_rat_fire.cpp +++ b/src/xrGame/ai/monsters/rats/ai_rat_fire.cpp @@ -24,7 +24,7 @@ void CAI_Rat::Exec_Action(float /**dt/**/) case eRatActionAttackBegin: { u32 dwTime = Device.dwTimeGlobal; - sound().play(eRatSoundAttack); //,0,0,m_dwHitInterval+1,m_dwHitInterval); + sound().play(eRatSoundAttack); //,0,0,m_dwHitInterval+1,m_dwHitInterval); if (memory().enemy().selected() && memory().enemy().selected()->g_Alive() && (dwTime - m_dwStartAttackTime > m_dwHitInterval)) { @@ -45,16 +45,16 @@ void CAI_Rat::Exec_Action(float /**dt/**/) u16 id_from = ID(); NET_Packet l_P; SHit HS; - HS.GenHeader(GE_HIT, id_to); // u_EventGen (l_P,GE_HIT, id_to); - HS.whoID = (id_from); // l_P.w_u16 (id_from); - HS.weaponID = (id_from); // l_P.w_u16 (id_from); - HS.dir = (tDirection); // l_P.w_dir (tDirection); - HS.power = (m_fHitPower); // l_P.w_float (m_fHitPower); - HS.boneID = (0); // l_P.w_s16 (0); + HS.GenHeader(GE_HIT, id_to); // u_EventGen (l_P,GE_HIT, id_to); + HS.whoID = (id_from); // l_P.w_u16 (id_from); + HS.weaponID = (id_from); // l_P.w_u16 (id_from); + HS.dir = (tDirection); // l_P.w_dir (tDirection); + HS.power = (m_fHitPower); // l_P.w_float (m_fHitPower); + HS.boneID = (0); // l_P.w_s16 (0); HS.p_in_bone_space = - (position_in_bone_space); // l_P.w_vec3 (position_in_bone_space); - HS.impulse = (0.f); // l_P.w_float (0.f); - HS.hit_type = (ALife::eHitTypeWound); // l_P.w_u16 ((u16)ALife::eHitTypeWound); + (position_in_bone_space); // l_P.w_vec3 (position_in_bone_space); + HS.impulse = (0.f); // l_P.w_float (0.f); + HS.hit_type = (ALife::eHitTypeWound); // l_P.w_u16 ((u16)ALife::eHitTypeWound); HS.Write_Packet(l_P); u_EventSend(l_P); } @@ -130,12 +130,12 @@ void CAI_Rat::update_morale() case aiRatFreePassive: { if (m_fMorale < m_fMoraleNormalValue) { - m_fMorale += m_fMoraleRestoreQuant; //*(1.f - fDistance/m_fMoraleNullRadius); + m_fMorale += m_fMoraleRestoreQuant; //*(1.f - fDistance/m_fMoraleNullRadius); if (m_fMorale > m_fMoraleNormalValue) m_fMorale = m_fMoraleNormalValue; } else if (m_fMorale > m_fMoraleNormalValue) { - m_fMorale -= m_fMoraleRestoreQuant; //*(fDistance/m_fMoraleNullRadius); + m_fMorale -= m_fMoraleRestoreQuant; //*(fDistance/m_fMoraleNullRadius); if (m_fMorale < m_fMoraleNormalValue) m_fMorale = m_fMoraleNormalValue; } break; diff --git a/src/xrGame/ai/monsters/rats/ai_rat_fsm.cpp b/src/xrGame/ai/monsters/rats/ai_rat_fsm.cpp index 718788b5dda..8ee8b7f1a09 100644 --- a/src/xrGame/ai/monsters/rats/ai_rat_fsm.cpp +++ b/src/xrGame/ai/monsters/rats/ai_rat_fsm.cpp @@ -65,22 +65,22 @@ void CAI_Rat::Think() break; } case aiRatFreeActive: - { // aiRatFreeHuntingActive + { // aiRatFreeHuntingActive FreeHuntingActive(); break; } case aiRatFreePassive: - { // aiRatFreeHuntingPassive + { // aiRatFreeHuntingPassive FreeHuntingPassive(); break; } case aiRatAttackRange: - { // aiRatAttackFire + { // aiRatAttackFire AttackFire(); break; } case aiRatAttackMelee: - { // aiRatAttackRun + { // aiRatAttackRun AttackRun(); break; } @@ -282,7 +282,7 @@ void CAI_Rat::UnderFire() vfUpdateTime(m_fTimeUpdateDelta); - if (m_bStateChanged) //(Device.dwTimeGlobal - m_previous_query_time > TIME_TO_GO) || !m_previous_query_time) + if (m_bStateChanged) //(Device.dwTimeGlobal - m_previous_query_time > TIME_TO_GO) || !m_previous_query_time) m_tGoalDir = m_tSpawnPosition; m_fSpeed = m_fAttackSpeed; @@ -413,7 +413,7 @@ void CAI_Rat::Retreat() m_fAttackSuccessProbability, m_fAttackSuccessProbability, m_fAttackSuccessProbability, g_Team(), g_Squad(), g_Group(), aiRatAttackRun, aiRatAttackRun, aiRatAttackRun, aiRatRetreat, aiRatRetreat, this, 30.f)); // ERatStates eState = - //ERatStates(dwfChooseAction(m_dwActionRefreshRate,m_fAttackSuccessProbability,m_fAttackSuccessProbability,m_fAttackSuccessProbability,m_fAttackSuccessProbability,g_Team(),g_Squad(),g_Group(),aiRatAttackRun,aiRatAttackRun,aiRatAttackRun,aiRatAttackRun,aiRatAttackRun,this,30.f)); + // ERatStates(dwfChooseAction(m_dwActionRefreshRate,m_fAttackSuccessProbability,m_fAttackSuccessProbability,m_fAttackSuccessProbability,m_fAttackSuccessProbability,g_Team(),g_Squad(),g_Group(),aiRatAttackRun,aiRatAttackRun,aiRatAttackRun,aiRatAttackRun,aiRatAttackRun,this,30.f)); if (eState != m_eCurrentState) { eState = ERatStates( dwfChooseAction(m_dwActionRefreshRate, m_fAttackSuccessProbability, m_fAttackSuccessProbability, @@ -478,7 +478,7 @@ void CAI_Rat::Pursuit() CHECK_IF_SWITCH_TO_NEW_STATE_THIS_UPDATE((m_fMorale < m_fMoraleNormalValue), aiRatUnderFire); // if ((m_tLastSound.dwTime >= m_dwLastUpdateTime) && ((m_tLastSound.eSoundType & SOUND_TYPE_WEAPON_BULLET_HIT) == - //SOUND_TYPE_WEAPON_BULLET_HIT)) { + // SOUND_TYPE_WEAPON_BULLET_HIT)) { if ((m_tLastSound.dwTime >= m_dwLastUpdateTime) && (!m_tLastSound.tpEntity || ((!memory().item().selected() || (memory().item().selected()->ID() != m_tLastSound.tpEntity->ID())) && @@ -654,7 +654,7 @@ void CAI_Rat::EatCorpse() } // IKinematicsAnimated *V= - //smart_cast(const_cast(memory().item().selected())->Visual()); + // smart_cast(const_cast(memory().item().selected())->Visual()); // R_ASSERT (V); // u16 head_bone = V->LL_BoneID("bip01_head"); // Fmatrix l_tMatrix; diff --git a/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp b/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp index 8f9911e54ec..857220cf7a7 100644 --- a/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp +++ b/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp @@ -179,7 +179,7 @@ void CAI_Rat::make_turn() m_tHPB.x = -movement().m_body.current.yaw; m_tHPB.y = -movement().m_body.current.pitch; - XFORM().setHPB(m_tHPB.x, m_tHPB.y, 0.f); // m_tHPB.z); + XFORM().setHPB(m_tHPB.x, m_tHPB.y, 0.f); // m_tHPB.z); Position() = tSavedPosition; } @@ -225,16 +225,16 @@ Fvector CAI_Rat::calc_position() tOffset.sub(m_tGoalDir, Position()); if (!m_bStraightForward) { - if (tOffset.y > 1.0) { // We're too low + if (tOffset.y > 1.0) { // We're too low m_tHPB.y += fAT; if (m_tHPB.y > 0.8f) m_tHPB.y = 0.8f; } else if (tOffset.y < -1.0) - { // We're too high + { // We're too high m_tHPB.y -= fAT; if (m_tHPB.y < -0.8f) m_tHPB.y = -0.8f; } - else // Add damping + else // Add damping m_tHPB.y *= 0.95f; } diff --git a/src/xrGame/ai/monsters/state_inline.h b/src/xrGame/ai/monsters/state_inline.h index 38c5a7c48aa..f69f7f70359 100644 --- a/src/xrGame/ai/monsters/state_inline.h +++ b/src/xrGame/ai/monsters/state_inline.h @@ -35,7 +35,7 @@ void CStateAbstract::initialize() { time_state_started = Device.dwTimeGlobal; - current_substate = u32(-1); // means need reselect state + current_substate = u32(-1); // means need reselect state prev_substate = u32(-1); } diff --git a/src/xrGame/ai/monsters/states/monster_state_attack_camp_inline.h b/src/xrGame/ai/monsters/states/monster_state_attack_camp_inline.h index 2553d33a3e9..74112b616ae 100644 --- a/src/xrGame/ai/monsters/states/monster_state_attack_camp_inline.h +++ b/src/xrGame/ai/monsters/states/monster_state_attack_camp_inline.h @@ -124,9 +124,9 @@ void CStateMonsterAttackCampAbstract::setup_substates() data.vertex = m_target_node; data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 1.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 1.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = false; data.accel_type = eAT_Aggressive; @@ -145,7 +145,7 @@ void CStateMonsterAttackCampAbstract::setup_substates() data.point.mad(object->Position(), dir, 10.f); data.action.action = ACT_STAND_IDLE; - data.action.time_out = 10000; // do not use time out + data.action.time_out = 10000; // do not use time out data.action.sound_type = MonsterSound::eMonsterSoundIdle; data.action.sound_delay = object->db().m_dwIdleSndDelay; data.face_delay = 0; diff --git a/src/xrGame/ai/monsters/states/monster_state_attack_on_run.h b/src/xrGame/ai/monsters/states/monster_state_attack_on_run.h index b35b2de247d..4b8ab83b05d 100644 --- a/src/xrGame/ai/monsters/states/monster_state_attack_on_run.h +++ b/src/xrGame/ai/monsters/states/monster_state_attack_on_run.h @@ -41,7 +41,7 @@ class CStateMonsterAttackOnRun : public CState<_Object> { left = 0, right = 1 - }; // coupled + }; // coupled aim_side m_attack_side; aim_side m_prepare_side; TTime m_prepare_side_chosen_time; @@ -88,4 +88,4 @@ inline bool is_valid_point_to_move(Fvector const& point); #include "monster_state_attack_on_run_inline.h" -#endif // MONSTER_STATE_ATTACK_ON_RUN_H \ No newline at end of file +#endif // MONSTER_STATE_ATTACK_ON_RUN_H \ No newline at end of file diff --git a/src/xrGame/ai/monsters/states/monster_state_attack_on_run_inline.h b/src/xrGame/ai/monsters/states/monster_state_attack_on_run_inline.h index 6ff0898d857..e58cf138fe5 100644 --- a/src/xrGame/ai/monsters/states/monster_state_attack_on_run_inline.h +++ b/src/xrGame/ai/monsters/states/monster_state_attack_on_run_inline.h @@ -21,8 +21,8 @@ namespace monsters TTime const max_go_far_time = 6000; TTime const update_side_period = 5000; -} // namespace monsters -} // namespace detail +} // namespace monsters +} // namespace detail TEMPLATE_SIGNATURE ATTACK_ON_RUN_STATE::CStateMonsterAttackOnRun(_Object* obj) : inherited(obj) @@ -103,7 +103,7 @@ void ATTACK_ON_RUN_STATE::set_movement_phaze(phaze const new_phaze) m_prepare_side_chosen_time = current_time(); if (m_phaze == go_close) { - m_attack_side_chosen_time = 0; // recalc attack_side + m_attack_side_chosen_time = 0; // recalc attack_side } else if (m_phaze == go_prepare) { @@ -224,7 +224,7 @@ void ATTACK_ON_RUN_STATE::update_movement_target() DBG().get_text_tree().clear(); debug::text_tree& text_tree = DBG().get_text_tree().find_or_add("ActorView"); text_tree.add_line("attacking", m_attacking); -#endif // DEBUG_STATE +#endif // DEBUG_STATE TTime const max_go_close_time = (TTime)(1000 * object->get_attack_on_move_max_go_close_time()); float const far_radius = object->get_attack_on_move_far_radius(); @@ -284,7 +284,7 @@ void ATTACK_ON_RUN_STATE::update_movement_target() #ifdef DEBUG_STATE text_tree.add_line("phaze", m_phaze == go_prepare ? "preparation" : "close"); text_tree.add_line("reach_old_target", m_reach_old_target); -#endif // DEBUG_STATE +#endif // DEBUG_STATE if (m_reach_old_target) { self2target = m_target - self_pos; @@ -332,7 +332,7 @@ void ATTACK_ON_RUN_STATE::update_movement_target() Fvector dir2target = Fvector().crossproduct(self2predicted, cr_fvector3(0, 1, 0)).normalize(); #ifdef DEBUG_STATE text_tree.add_line("type", 1); -#endif // DEBUG_STATE +#endif // DEBUG_STATE if (self_dir.dotproduct(dir2target) < 0) { dir2target.invert(); } @@ -431,7 +431,7 @@ void ATTACK_ON_RUN_STATE::update_attack() #ifdef DEBUG_STATE debug::text_tree& text_tree = DBG().get_text_tree().find_or_add("ActorView"); -#endif // #ifdef DEBUG_STATE +#endif // #ifdef DEBUG_STATE float velocity = object->movement().speed(); Fvector self_to_enemy_xz = enemy_pos - object->Position(); @@ -465,7 +465,7 @@ void ATTACK_ON_RUN_STATE::update_attack() text_tree.add_line("good_attack_angle", good_attack_angle); // text_tree.add_line ("see_enemy_now", see_enemy_now); text_tree.add_line("good_attack_dist", good_attack_dist); -#endif // #ifdef DEBUG_STATE +#endif // #ifdef DEBUG_STATE if (good_attack_angle && good_attack_dist) { can_attack = true; @@ -518,7 +518,7 @@ void ATTACK_ON_RUN_STATE::execute() object->anim().accel_set_braking(false); object->path().set_target_point(m_target, m_target_vertex); - object->path().set_rebuild_time(m_attacking ? 20 : 150); // object->get_attack_rebuild_time()); + object->path().set_rebuild_time(m_attacking ? 20 : 150); // object->get_attack_rebuild_time()); object->path().set_use_covers(); object->path().set_cover_params(0.1f, 30.f, 1.f, 30.f); @@ -592,4 +592,4 @@ bool ATTACK_ON_RUN_STATE::check_completion() #undef TEMPLATE_SIGNATURE #undef ATTACK_ON_RUN_STATE -#endif // MONSTER_STATE_ATTACK_ON_RUN_INLINE_H +#endif // MONSTER_STATE_ATTACK_ON_RUN_INLINE_H diff --git a/src/xrGame/ai/monsters/states/monster_state_eat_drag_inline.h b/src/xrGame/ai/monsters/states/monster_state_eat_drag_inline.h index fcab5c512c9..83686f5f058 100644 --- a/src/xrGame/ai/monsters/states/monster_state_eat_drag_inline.h +++ b/src/xrGame/ai/monsters/states/monster_state_eat_drag_inline.h @@ -98,11 +98,11 @@ bool CStateMonsterDragAbstract::check_completion() return true; } - if (m_cover_vertex_id != u32(-1)) { // valid vertex so wait path end + if (m_cover_vertex_id != u32(-1)) { // valid vertex so wait path end if (object->Position().distance_to(m_cover_position) < 2.f) return true; } else - { // invalid vertex so check distanced that passed + { // invalid vertex so check distanced that passed if (m_corpse_start_position.distance_to(object->Position()) > 20.f) return true; } diff --git a/src/xrGame/ai/monsters/states/monster_state_help_sound_inline.h b/src/xrGame/ai/monsters/states/monster_state_help_sound_inline.h index 615ca236153..080054b059b 100644 --- a/src/xrGame/ai/monsters/states/monster_state_help_sound_inline.h +++ b/src/xrGame/ai/monsters/states/monster_state_help_sound_inline.h @@ -51,9 +51,9 @@ void CStateMonsterHearHelpSoundAbstract::setup_substates() data.vertex = object->SoundMemory.hear_help_sound_node(); data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Aggressive; diff --git a/src/xrGame/ai/monsters/states/monster_state_home_point_danger_inline.h b/src/xrGame/ai/monsters/states/monster_state_home_point_danger_inline.h index 0d2ed5ce25e..c57beb94100 100644 --- a/src/xrGame/ai/monsters/states/monster_state_home_point_danger_inline.h +++ b/src/xrGame/ai/monsters/states/monster_state_home_point_danger_inline.h @@ -118,9 +118,9 @@ void CStateMonsterDangerMoveToHomePointAbstract::setup_substates() data.vertex = m_target_node; data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_RUN; - data.action.time_out = 0; // do not use time out - data.completion_dist = 1.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 1.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = false; data.accel_type = eAT_Aggressive; @@ -152,7 +152,7 @@ void CStateMonsterDangerMoveToHomePointAbstract::setup_substates() SStateDataAction data; data.action = ACT_LOOK_AROUND; - data.time_out = 7000; // do not use time out + data.time_out = 7000; // do not use time out data.sound_type = MonsterSound::eMonsterSoundAggressive; data.sound_delay = object->db().m_dwIdleSndDelay; diff --git a/src/xrGame/ai/monsters/states/monster_state_rest_idle_inline.h b/src/xrGame/ai/monsters/states/monster_state_rest_idle_inline.h index a6255ad40af..b830fca9e02 100644 --- a/src/xrGame/ai/monsters/states/monster_state_rest_idle_inline.h +++ b/src/xrGame/ai/monsters/states/monster_state_rest_idle_inline.h @@ -82,9 +82,9 @@ void CStateMonsterRestIdleAbstract::setup_substates() data.vertex = m_target_node; data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_WALK_FWD; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = true; data.accel_type = eAT_Calm; @@ -116,7 +116,7 @@ void CStateMonsterRestIdleAbstract::setup_substates() SStateDataAction data; data.action = ACT_REST; - data.time_out = 0; // do not use time out + data.time_out = 0; // do not use time out data.sound_type = MonsterSound::eMonsterSoundIdle; data.sound_delay = object->db().m_dwIdleSndDelay; diff --git a/src/xrGame/ai/monsters/states/monster_state_smart_terrain_task_inline.h b/src/xrGame/ai/monsters/states/monster_state_smart_terrain_task_inline.h index 410833cc32c..4872dea3e1b 100644 --- a/src/xrGame/ai/monsters/states/monster_state_smart_terrain_task_inline.h +++ b/src/xrGame/ai/monsters/states/monster_state_smart_terrain_task_inline.h @@ -87,9 +87,9 @@ void CStateMonsterSmartTerrainTaskAbstract::setup_substates() data.vertex = m_current_task->level_vertex_id(); data.point = ai().level_graph().vertex_position(data.vertex); data.action.action = ACT_WALK_FWD; - data.action.time_out = 0; // do not use time out - data.completion_dist = 0.f; // get exactly to the point - data.time_to_rebuild = 0; // do not rebuild + data.action.time_out = 0; // do not use time out + data.completion_dist = 0.f; // get exactly to the point + data.time_to_rebuild = 0; // do not rebuild data.accelerated = true; data.braking = false; data.accel_type = eAT_Calm; diff --git a/src/xrGame/ai/monsters/states/state_data.h b/src/xrGame/ai/monsters/states/state_data.h index 7eea067b1e5..84cf76b0874 100644 --- a/src/xrGame/ai/monsters/states/state_data.h +++ b/src/xrGame/ai/monsters/states/state_data.h @@ -53,7 +53,7 @@ struct SStateDataMoveToPoint ////////////////////////////////////////////////////////////////////////// struct SStateDataMoveToPointEx : public SStateDataMoveToPoint { - u32 time_to_rebuild; // u32(-1) - не перестраивать, 0-по-умолчанию, ... + u32 time_to_rebuild; // u32(-1) - не перестраивать, 0-по-умолчанию, ... SStateDataMoveToPointEx() { time_to_rebuild = u32(-1); } }; diff --git a/src/xrGame/ai/monsters/telekinesis_inline.h b/src/xrGame/ai/monsters/telekinesis_inline.h index 8f707aec08d..2ee988bc56d 100644 --- a/src/xrGame/ai/monsters/telekinesis_inline.h +++ b/src/xrGame/ai/monsters/telekinesis_inline.h @@ -92,7 +92,7 @@ void CTelekinesis<_Object>::UpdateSched() switch (cur_obj->get_state()) { case TS_Raise: - if (cur_obj->check_height()) cur_obj->prepare_keep(); // начать удержание предмета + if (cur_obj->check_height()) cur_obj->prepare_keep(); // начать удержание предмета break; case TS_Keep: if (cur_obj->time_keep_elapsed()) { diff --git a/src/xrGame/ai/monsters/telekinetic_object.cpp b/src/xrGame/ai/monsters/telekinetic_object.cpp index 45782303649..5c6035465b8 100644 --- a/src/xrGame/ai/monsters/telekinetic_object.cpp +++ b/src/xrGame/ai/monsters/telekinetic_object.cpp @@ -56,7 +56,7 @@ void CTelekineticObject::set_sound(const ref_sound& snd_hold, const ref_sound& s void CTelekineticObject::raise_update() { - if (check_height() || check_raise_time_out()) prepare_keep(); // начать удержание предмета + if (check_height() || check_raise_time_out()) prepare_keep(); // начать удержание предмета // else if (check_raise_time_out()) release(); else { diff --git a/src/xrGame/ai/monsters/zombie/zombie.h b/src/xrGame/ai/monsters/zombie/zombie.h index d0e7dbe7300..880b9a9b997 100644 --- a/src/xrGame/ai/monsters/zombie/zombie.h +++ b/src/xrGame/ai/monsters/zombie/zombie.h @@ -46,7 +46,7 @@ class CZombie : public CBaseMonster, public CControlledEntity float health_death_threshold; u8 fake_death_left; - bool fake_death_fall_down(); // return true if everything is ok + bool fake_death_fall_down(); // return true if everything is ok void fake_death_stand_up(); #ifdef _DEBUG diff --git a/src/xrGame/ai/phantom/phantom.cpp b/src/xrGame/ai/phantom/phantom.cpp index 50fa8b5c6dc..0404031bbc4 100644 --- a/src/xrGame/ai/phantom/phantom.cpp +++ b/src/xrGame/ai/phantom/phantom.cpp @@ -71,7 +71,7 @@ BOOL CPhantom::net_Spawn(CSE_Abstract* DC) u_EventSend(P); } - SwitchToState(stBirth); // initial state (changed on load method in inherited::) + SwitchToState(stBirth); // initial state (changed on load method in inherited::) // inherited if (!inherited::net_Spawn(DC)) return FALSE; @@ -322,15 +322,15 @@ void CPhantom::PsyHit(const IGameObject* object, float value) { NET_Packet P; SHit HS; - HS.GenHeader(GE_HIT, object->ID()); // // u_EventGen (P,GE_HIT, object->ID()); - HS.whoID = (ID()); // own // P.w_u16 (object->ID()); - HS.weaponID = (ID()); // own // P.w_u16 (object->ID()); - HS.dir = (Fvector().set(0.f, 1.f, 0.f)); // direction // P.w_dir (Fvector().set(0.f,1.f,0.f)); - HS.power = (value); // hit value // P.w_float (value); - HS.boneID = (BI_NONE); // bone // P.w_s16 (BI_NONE); - HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); - HS.impulse = (0.f); // P.w_float (0.f); - HS.hit_type = (ALife::eHitTypeTelepatic); // P.w_u16 (u16(ALife::eHitTypeTelepatic)); + HS.GenHeader(GE_HIT, object->ID()); // // u_EventGen (P,GE_HIT, object->ID()); + HS.whoID = (ID()); // own // P.w_u16 (object->ID()); + HS.weaponID = (ID()); // own // P.w_u16 (object->ID()); + HS.dir = (Fvector().set(0.f, 1.f, 0.f)); // direction // P.w_dir (Fvector().set(0.f,1.f,0.f)); + HS.power = (value); // hit value // P.w_float (value); + HS.boneID = (BI_NONE); // bone // P.w_s16 (BI_NONE); + HS.p_in_bone_space = (Fvector().set(0.f, 0.f, 0.f)); // P.w_vec3 (Fvector().set(0.f,0.f,0.f)); + HS.impulse = (0.f); // P.w_float (0.f); + HS.hit_type = (ALife::eHitTypeTelepatic); // P.w_u16 (u16(ALife::eHitTypeTelepatic)); HS.Write_Packet(P); u_EventSend(P); @@ -346,7 +346,7 @@ void CPhantom::load(IReader& input_packet) { SwitchToState(EState(input_packet.r_s32())); } -void CPhantom::net_Export(NET_Packet& P) // export to server +void CPhantom::net_Export(NET_Packet& P) // export to server { // export R_ASSERT(Local()); diff --git a/src/xrGame/ai/position_prediction.h b/src/xrGame/ai/position_prediction.h index 721eaa428d5..4b7ac46bb44 100644 --- a/src/xrGame/ai/position_prediction.h +++ b/src/xrGame/ai/position_prediction.h @@ -43,6 +43,6 @@ class position_prediction TTime m_last_prediction_time; Fvector m_last_update_enemy_pos; -}; // class position_prediction +}; // class position_prediction -#endif // #ifndef POSITION_PREDICTION_H_INCLUDED \ No newline at end of file +#endif // #ifndef POSITION_PREDICTION_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ai/stalker/ai_stalker.cpp b/src/xrGame/ai/stalker/ai_stalker.cpp index b9c5d5403b6..fbd3acdec17 100644 --- a/src/xrGame/ai/stalker/ai_stalker.cpp +++ b/src/xrGame/ai/stalker/ai_stalker.cpp @@ -63,12 +63,12 @@ #include "xr_level_controller.h" #ifdef DEBUG -#include "alife_simulator.h" -#include "alife_object_registry.h" #include "Level.h" +#include "alife_object_registry.h" +#include "alife_simulator.h" #include "map_location.h" #include "map_manager.h" -#endif // DEBUG +#endif // DEBUG using namespace StalkerSpace; @@ -86,7 +86,7 @@ CAI_Stalker::CAI_Stalker() #ifdef DEBUG m_debug_planner = 0; m_dbg_hud_draw = false; -#endif // DEBUG +#endif // DEBUG m_registered_in_combat_on_migration = false; } @@ -114,13 +114,13 @@ void CAI_Stalker::reinit() #ifdef DEBUG_MEMORY_MANAGER u32 start = 0; if (g_bMEMO) start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER LoadSounds(*cNameSect()); #ifdef DEBUG_MEMORY_MANAGER if (g_bMEMO) Msg("CAI_Stalker::LoadSounds() : %d", Memory.mem_usage() - start); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER m_pPhysics_support->in_Init(); @@ -248,8 +248,8 @@ void CAI_Stalker::LoadSounds(LPCSTR section) u32(eStalkerSoundMaskMovingInDanger), eStalkerSoundRunningInDanger, head_bone_name, new CStalkerSoundData(this)); // sound().add (pSettings->r_string(section,"sound_walking_in_danger"), 100, - //SOUND_TYPE_MONSTER_TALKING, 6, u32(eStalkerSoundMaskMovingInDanger), eStalkerSoundWalkingInDanger, - //head_bone_name, new CStalkerSoundData(this)); + // SOUND_TYPE_MONSTER_TALKING, 6, u32(eStalkerSoundMaskMovingInDanger), eStalkerSoundWalkingInDanger, + // head_bone_name, new CStalkerSoundData(this)); sound().add(pSettings->r_string(section, "sound_kill_wounded"), 100, SOUND_TYPE_MONSTER_TALKING, 5, u32(eStalkerSoundMaskKillWounded), eStalkerSoundKillWounded, head_bone_name, new CStalkerSoundData(this)); sound().add(pSettings->r_string(section, "sound_enemy_critically_wounded"), 100, SOUND_TYPE_MONSTER_TALKING, 4, @@ -267,13 +267,13 @@ void CAI_Stalker::reload(LPCSTR section) #ifdef DEBUG_MEMORY_MANAGER u32 start = 0; if (g_bMEMO) start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER brain().setup(this); #ifdef DEBUG_MEMORY_MANAGER if (g_bMEMO) Msg("brain().setup() : %d", Memory.mem_usage() - start); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER CCustomMonster::reload(section); if (!already_dead()) CStepManager::reload(section); @@ -402,23 +402,23 @@ void CAI_Stalker::reload(LPCSTR section) READ_IF_EXISTS(pSettings, r_u32, queue_sect, "auto_max_queue_interval_close", 500); // m_pstl_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,queue_sect,"pstl_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,queue_sect,"pstl_queue_fire_dist_close", 15.0f); m_pstl_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, queue_sect, "pstl_queue_fire_dist_med", 15.0f); m_pstl_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, queue_sect, "pstl_queue_fire_dist_far", 30.0f); // m_shtg_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,queue_sect,"shtg_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,queue_sect,"shtg_queue_fire_dist_close", 15.0f); m_shtg_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, queue_sect, "shtg_queue_fire_dist_med", 15.0f); m_shtg_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, queue_sect, "shtg_queue_fire_dist_far", 30.0f); // m_snp_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,queue_sect,"snp_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,queue_sect,"snp_queue_fire_dist_close", 15.0f); m_snp_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, queue_sect, "snp_queue_fire_dist_med", 15.0f); m_snp_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, queue_sect, "snp_queue_fire_dist_far", 30.0f); // m_mchg_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,queue_sect,"mchg_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,queue_sect,"mchg_queue_fire_dist_close", 15.0f); m_mchg_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, queue_sect, "mchg_queue_fire_dist_med", 15.0f); m_mchg_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, queue_sect, "mchg_queue_fire_dist_far", 30.0f); // m_auto_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,queue_sect,"auto_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,queue_sect,"auto_queue_fire_dist_close", 15.0f); m_auto_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, queue_sect, "auto_queue_fire_dist_med", 15.0f); m_auto_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, queue_sect, "auto_queue_fire_dist_far", 30.0f); } @@ -530,29 +530,29 @@ void CAI_Stalker::reload(LPCSTR section) READ_IF_EXISTS(pSettings, r_u32, *cNameSect(), "auto_max_queue_interval_close", 500); // m_pstl_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"pstl_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"pstl_queue_fire_dist_close", 15.0f); m_pstl_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "pstl_queue_fire_dist_med", 15.0f); m_pstl_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "pstl_queue_fire_dist_far", 30.0f); // m_shtg_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"shtg_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"shtg_queue_fire_dist_close", 15.0f); m_shtg_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "shtg_queue_fire_dist_med", 15.0f); m_shtg_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "shtg_queue_fire_dist_far", 30.0f); // m_snp_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"snp_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"snp_queue_fire_dist_close", 15.0f); m_snp_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "snp_queue_fire_dist_med", 15.0f); m_snp_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "snp_queue_fire_dist_far", 30.0f); // m_mchg_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"mchg_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,*cNameSect(),"mchg_queue_fire_dist_close", 15.0f); m_mchg_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "mchg_queue_fire_dist_med", 15.0f); m_mchg_queue_fire_dist_far = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "mchg_queue_fire_dist_far", 30.0f); // m_auto_queue_fire_dist_close = - //READ_IF_EXISTS(pSettings,r_float,**cNameSect(),"auto_queue_fire_dist_close", 15.0f); + // READ_IF_EXISTS(pSettings,r_float,**cNameSect(),"auto_queue_fire_dist_close", 15.0f); m_auto_queue_fire_dist_med = READ_IF_EXISTS(pSettings, r_float, *cNameSect(), "auto_queue_fire_dist_med", 15.0f); m_auto_queue_fire_dist_far = @@ -627,7 +627,7 @@ BOOL CAI_Stalker::net_Spawn(CSE_Abstract* DC) #ifdef DEBUG_MEMORY_MANAGER u32 start = 0; if (g_bMEMO) start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER CSE_Abstract* e = (CSE_Abstract*)(DC); CSE_ALifeHumanStalker* tpHuman = smart_cast(e); @@ -648,13 +648,13 @@ BOOL CAI_Stalker::net_Spawn(CSE_Abstract* DC) #ifdef DEBUG_MEMORY_MANAGER u32 _start = 0; if (g_bMEMO) _start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER animation().reload(); #ifdef DEBUG_MEMORY_MANAGER if (g_bMEMO) Msg("CStalkerAnimationManager::reload() : %d", Memory.mem_usage() - _start); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER movement().m_head.current.yaw = movement().m_head.target.yaw = movement().m_body.current.yaw = movement().m_body.target.yaw = angle_normalize_signed(-tpHuman->o_torso.yaw); @@ -720,13 +720,13 @@ BOOL CAI_Stalker::net_Spawn(CSE_Abstract* DC) map_location->SetHint(cName()); } -#endif // _DEBUG +#endif // _DEBUG #ifdef DEBUG_MEMORY_MANAGER if (g_bMEMO) { Msg("CAI_Stalker::net_Spawn() : %d", Memory.mem_usage() - start); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER if (SpecificCharacter().terrain_sect().size()) { movement().locations().Load(*SpecificCharacter().terrain_sect()); @@ -753,7 +753,7 @@ void CAI_Stalker::net_Destroy() xr_vector>::const_iterator I; I = std::find(Device.seqParallel.begin(), Device.seqParallel.end(), f); VERIFY(I == Device.seqParallel.end()); -#endif // DEBUG +#endif // DEBUG xr_delete(m_ce_close); xr_delete(m_ce_far); @@ -1037,10 +1037,10 @@ void CAI_Stalker::shedule_Update(u32 DT) #ifndef USE_SCHEDULER_IN_AGENT_MANAGER agent_manager().update(); -#endif // USE_SCHEDULER_IN_AGENT_MANAGER +#endif // USE_SCHEDULER_IN_AGENT_MANAGER // bool check = !!memory().enemy().selected(); -#if 0 // def DEBUG +#if 0 // def DEBUG memory().visual().check_visibles(); #endif if (false && g_mt_config.test(mtAiVision)) @@ -1198,7 +1198,7 @@ void CAI_Stalker::Think() // try { movement().update(update_delta); // } -#if 0 // def DEBUG +#if 0 // def DEBUG catch (luabind::cast_failed &message) { Msg ("! Expression \"%s\" from luabind::object to %s",message.what(),message.info().name()); movement().initialize (); @@ -1217,7 +1217,7 @@ void CAI_Stalker::Think() movement().update (update_delta); throw; } -#endif // DEBUG +#endif // DEBUG STOP_PROFILE STOP_PROFILE @@ -1271,7 +1271,7 @@ IFactoryObject* CAI_Stalker::_construct() #ifdef DEBUG_MEMORY_MANAGER u32 start = 0; if (g_bMEMO) start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER m_pPhysics_support = new CCharacterPhysicsSupport(CCharacterPhysicsSupport::etStalker, this); CCustomMonster::_construct(); @@ -1286,7 +1286,7 @@ IFactoryObject* CAI_Stalker::_construct() #ifdef DEBUG_MEMORY_MANAGER if (g_bMEMO) Msg("CAI_Stalker::_construct() : %d", Memory.mem_usage() - start); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER return (this); } diff --git a/src/xrGame/ai/stalker/ai_stalker.h b/src/xrGame/ai/stalker/ai_stalker.h index b2823c5b44a..04364684744 100644 --- a/src/xrGame/ai/stalker/ai_stalker.h +++ b/src/xrGame/ai/stalker/ai_stalker.h @@ -212,14 +212,14 @@ class CAI_Stalker : public CCustomMonster, public CObjectHandler, public CAI_Phr // PDA && Dialogs // virtual void ReceivePdaMessage (u16 who, EPdaMsg msg, shared_str - //info_id); + // info_id); virtual void UpdateAvailableDialogs(CPhraseDialogManager* partner); // scripts virtual CWeapon* GetCurrentWeapon() const; virtual u32 GetWeaponAmmo() const; // virtual CInventoryItem *GetCurrentEquipment () const; <- moved to - //InventoryOwner::GetCurrentOutfit + // InventoryOwner::GetCurrentOutfit virtual CInventoryItem* GetMedikit() const; virtual CInventoryItem* GetFood() const; virtual bool bfAssignMovement(CScriptEntityAction* tpEntityAction); @@ -402,7 +402,7 @@ class CAI_Stalker : public CCustomMonster, public CObjectHandler, public CAI_Phr virtual void UpdateCamera(); virtual bool can_attach(const CInventoryItem* inventory_item) const; // because we don't want to use this feature for stalkers - virtual bool use_simplified_visual() const { return false; } //(already_dead());}; + virtual bool use_simplified_visual() const { return false; } //(already_dead());}; #ifdef DEBUG void debug_planner(const script_planner* planner); #endif @@ -667,7 +667,7 @@ class CAI_Stalker : public CCustomMonster, public CObjectHandler, public CAI_Phr #ifdef DEBUG xr_vector m_throw_picks; xr_vector m_throw_collide_tris; -#endif // DEBUG +#endif // DEBUG public: IC const bool& throw_enabled(); diff --git a/src/xrGame/ai/stalker/ai_stalker_cover.cpp b/src/xrGame/ai/stalker/ai_stalker_cover.cpp index 18355a099c1..df120db90df 100644 --- a/src/xrGame/ai/stalker/ai_stalker_cover.cpp +++ b/src/xrGame/ai/stalker/ai_stalker_cover.cpp @@ -32,7 +32,7 @@ extern const float MIN_SUITABLE_ENEMY_DISTANCE = 3.f; static int g_advance_search_count = 0; static int g_near_cover_search_count = 0; static int g_far_cover_search_count = 0; -#endif // _DEBUG +#endif // _DEBUG void CAI_Stalker::subscribe_on_best_cover_changed(const on_best_cover_changed_delegate& delegate) { @@ -189,7 +189,7 @@ void CAI_Stalker::update_best_cover_actuality(const Fvector& position_to_cover_f if (m_best_cover->position().distance_to_sqr(position_to_cover_from) < _sqr(MIN_SUITABLE_ENEMY_DISTANCE)) { m_best_cover_actual = false; -#if 0 // def _DEBUG +#if 0 // def _DEBUG Msg ("* [%6d][%s] enemy too close",Device.dwTimeGlobal,*cName()); #endif return; @@ -198,7 +198,7 @@ void CAI_Stalker::update_best_cover_actuality(const Fvector& position_to_cover_f float cover_value = best_cover_value(position_to_cover_from); if (cover_value >= m_best_cover_value + 1.f) { m_best_cover_actual = false; -#if 0 // def _DEBUG +#if 0 // def _DEBUG Msg ("* [%6d][%s] cover became too bad",Device.dwTimeGlobal,*cName()); #endif return; @@ -210,7 +210,7 @@ void CAI_Stalker::update_best_cover_actuality(const Fvector& position_to_cover_f // return; // } - if (false) //! m_best_cover_can_try_advance) + if (false) //! m_best_cover_can_try_advance) return; if (m_best_cover_advance_cover == m_best_cover) return; diff --git a/src/xrGame/ai/stalker/ai_stalker_debug.cpp b/src/xrGame/ai/stalker/ai_stalker_debug.cpp index 2d96d476996..1d3fbc4b065 100644 --- a/src/xrGame/ai/stalker/ai_stalker_debug.cpp +++ b/src/xrGame/ai/stalker/ai_stalker_debug.cpp @@ -1099,7 +1099,7 @@ static Fmatrix aim_on_actor(Fvector const& bone_position, Fvector const& weapon_ Fvector().mad(weapon_position, weapon_direction, weapon_position.distance_to(target)); renderer.draw_line(Fidentity, weapon_position, weapon_position_target, color_xrgb(255, 0, 255)); } -#endif // #ifdef DEBUG_RENDER +#endif // #ifdef DEBUG_RENDER Fvector const weapon2bone = Fvector().sub(bone_position, weapon_position); float const offset = weapon2bone.dotproduct(weapon_direction); @@ -1110,7 +1110,7 @@ static Fmatrix aim_on_actor(Fvector const& bone_position, Fvector const& weapon_ temp.c = current_point; renderer.draw_ellipse(temp, color_xrgb(0, 0, 255)); } -#endif // #ifdef DEBUG_RENDER +#endif // #ifdef DEBUG_RENDER Fvector const bone2current = Fvector().sub(current_point, bone_position); float const sphere_radius_sqr = bone2current.square_magnitude(); @@ -1143,7 +1143,7 @@ static Fmatrix aim_on_actor(Fvector const& bone_position, Fvector const& weapon_ temp.c = bone_position; renderer.draw_ellipse(temp, color_xrgb(255, 255, 0)); } -#endif // #ifdef DEBUG_RENDER +#endif // #ifdef DEBUG_RENDER Fmatrix transform0; { @@ -1201,7 +1201,7 @@ static Fmatrix aim_on_actor(Fvector const& bone_position, Fvector const& weapon_ temp.c.add(bone_position); renderer.draw_ellipse(temp, color_xrgb(0, 255, 255)); } -#endif // #ifdef DEBUG_RENDER +#endif // #ifdef DEBUG_RENDER return (transform); } @@ -1226,7 +1226,7 @@ static void fill_bones(CAI_Stalker& self, Fmatrix const& transform, IKinematicsA CBlend* const blend = kinematics_animated->LL_PlayCycle(i, animation, 0, 0, 0, 1); if (blend) blend->timeCurrent = 0.f;//blend->timeTotal - (SAMPLE_SPF + EPS); -#else // #if 0 +#else // #if 0 u32 const blend_count = kinematics_animated->LL_PartBlendsCount(i); for (u32 j = 0; j < blend_count; ++j) { @@ -1236,7 +1236,7 @@ static void fill_bones(CAI_Stalker& self, Fmatrix const& transform, IKinematicsA *new_blend = *blend; new_blend->channel = 1; } -#endif // #if 0 +#endif // #if 0 } animation_movement_controller const* controller = self.animation_movement(); @@ -1312,7 +1312,7 @@ static void draw_bones(IKinematics& kinematics, Fvector const& box_size, u32 con renderer.draw_line(Fidentity, temp2.c, temp.c, line_color); } } -#endif // #ifdef DEBUG_RENDER +#endif // #ifdef DEBUG_RENDER static void draw_animation_bones( CAI_Stalker& self, Fmatrix const& transform, IKinematicsAnimated* kinematics_animated, LPCSTR animation_id) @@ -1344,9 +1344,9 @@ static void draw_animation_bones( actor_kinematics->Bone_GetAnimPos (player_head, actor_kinematics->LL_BoneID("bip01_head"), 1, false); player_head.mulA_43 (Actor()->XFORM()); Fvector target = player_head.c; -#else // #if 0 +#else // #if 0 Fvector target = self.sight().aiming_position(); -#endif // #if 0 +#endif // #if 0 Fmatrix spine_offset; Fmatrix shoulder_offset; @@ -1358,7 +1358,7 @@ static void draw_animation_bones( draw_bones( *kinematics, Fvector().set(.011f, .011f, .011f), color_xrgb(0, 255, 0), color_xrgb(0, 255, 255), &transform); -#endif // #ifdef DEBUG_RENDER +#endif // #ifdef DEBUG_RENDER Fmatrix weapon_bone_0; @@ -1532,7 +1532,7 @@ static void draw_animation_bones( renderer.draw_obb(g_stalker_skeleton[weapon_bone_id1], Fvector().set(.01f, .01f, .01f), color_xrgb(255, 0, 0)); renderer.draw_line( Fidentity, g_stalker_skeleton[weapon_bone_id0].c, g_stalker_skeleton[weapon_bone_id1].c, color_xrgb(255, 0, 0)); -#endif // #ifdef DEBUG_RENDER +#endif // #ifdef DEBUG_RENDER } Fvector g_debug_position_0 = Fvector().set(0.f, 0.f, 0.f); @@ -1556,7 +1556,7 @@ void CAI_Stalker::OnRender() draw_animation_bones (*this, m_start_transform, kinematics, "loophole_3_attack_idle_0"); // draw_animation_bones (*this, XFORM(), kinematics, "loophole_3_attack_in_0"); -#else // #if 0 +#else // #if 0 if (inventory().ActiveItem()) { Fvector position, direction, temp; g_fireParams(0, position, direction); @@ -1604,7 +1604,7 @@ void CAI_Stalker::OnRender() direction.setHP (yaw,pitch + safety_fire_angle); Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); } -#endif // #if 0 +#endif // #if 0 inherited::OnRender(); @@ -1737,7 +1737,7 @@ void CAI_Stalker::OnRender() if (g_Alive()) movement().get_doors_actor().render(); -#endif // #if 0 +#endif // #if 0 } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/ai/stalker/ai_stalker_feel.cpp b/src/xrGame/ai/stalker/ai_stalker_feel.cpp index 2273bb52fc6..5fefde3724d 100644 --- a/src/xrGame/ai/stalker/ai_stalker_feel.cpp +++ b/src/xrGame/ai/stalker/ai_stalker_feel.cpp @@ -18,7 +18,7 @@ #ifdef DEBUG #include "ai_debug.h" extern Flags32 psAI_Flags; -#endif // DEBUG +#endif // DEBUG bool CAI_Stalker::feel_vision_isRelevant(IGameObject* O) { @@ -40,7 +40,7 @@ void CAI_Stalker::renderable_Render() if (g_Alive()) { if (psAI_Flags.test(aiAnimationStats)) animation().add_animation_stats(); } -#endif // DEBUG +#endif // DEBUG } void CAI_Stalker::Exec_Look(float dt) diff --git a/src/xrGame/ai/stalker/ai_stalker_fire.cpp b/src/xrGame/ai/stalker/ai_stalker_fire.cpp index 937df17b30d..fe0e2b2d3c3 100644 --- a/src/xrGame/ai/stalker/ai_stalker_fire.cpp +++ b/src/xrGame/ai/stalker/ai_stalker_fire.cpp @@ -101,7 +101,7 @@ void CAI_Stalker::g_fireParams(const CHudItem* pHudItem, Fvector& P, Fvector& D) if (!inventory().ActiveItem()) { #ifdef DEBUG Msg("! CAI_Stalker::g_fireParams() : VERIFY(inventory().ActiveItem())"); -#endif // DEBUG +#endif // DEBUG P = Position(); D = Fvector().set(0.f, 0.f, 1.f); return; @@ -230,7 +230,7 @@ void CAI_Stalker::Hit(SHit* pHDS) } } - if (wounded()) //уже лежит => добивание + if (wounded()) //уже лежит => добивание { hit_power = 1000.f; } @@ -280,7 +280,8 @@ void CAI_Stalker::Hit(SHit* pHDS) HDS._dump(); } #endif - // int fx_index = iFloor(tpKinematics->LL_GetBoneInstance(HDS.bone()).get_param(1) + + // int fx_index = iFloor(tpKinematics->LL_GetBoneInstance(HDS.bone()).get_param(1) + //+ //(angle_difference(movement().m_body.current.yaw,-yaw) <= PI_DIV_2 ? 0 : 1)); // if (fx_index != -1) // animation().play_fx (power_factor,fx_index); @@ -891,7 +892,7 @@ void CAI_Stalker::check_throw_trajectory(const float& throw_time) #ifdef DEBUG trajectory_picks = &m_throw_picks; collide_tris = &m_throw_collide_tris; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG Fvector box_size = {0.f, 0.f, 0.f}; // Fvector box_size = { 0.1f, 0.1f , 0.1f }; @@ -955,7 +956,7 @@ void CAI_Stalker::update_throw_params() #ifdef DEBUG m_throw_picks.clear(); -#endif // DEBUG +#endif // DEBUG return; } @@ -998,9 +999,9 @@ bool CAI_Stalker::critical_wound_external_conditions_suitable() switch (active_weapon->animation_slot()) { - case 1: // pistols - case 2: // automatic weapon - case 3: // rifles + case 1: // pistols + case 2: // automatic weapon + case 3: // rifles break; default: return (false); } @@ -1066,7 +1067,7 @@ bool CAI_Stalker::can_cry_enemy_is_wounded() const } #ifdef DEBUG return (false); -#endif // DEBUG +#endif // DEBUG } void CAI_Stalker::on_critical_wound_initiator(const CAI_Stalker* critically_wounded) diff --git a/src/xrGame/ai/stalker/ai_stalker_impl.h b/src/xrGame/ai/stalker/ai_stalker_impl.h index dc698095c68..1475efb43e5 100644 --- a/src/xrGame/ai/stalker/ai_stalker_impl.h +++ b/src/xrGame/ai/stalker/ai_stalker_impl.h @@ -26,7 +26,7 @@ IC Fvector CAI_Stalker::weapon_shot_effector_direction(const Fvector& current) c { #if 1 return current; -#else // #if 1 +#else // #if 1 VERIFY(weapon_shot_effector().IsActive()); Fvector result; weapon_shot_effector().GetDeltaAngle(result); @@ -37,5 +37,5 @@ IC Fvector CAI_Stalker::weapon_shot_effector_direction(const Fvector& current) c result.setHP(-result.y + y, -result.x + p); return (result); -#endif // #if 1 +#endif // #if 1 } \ No newline at end of file diff --git a/src/xrGame/ai/stalker/ai_stalker_script.cpp b/src/xrGame/ai/stalker/ai_stalker_script.cpp index d0d30e371de..f3dcf971b4a 100644 --- a/src/xrGame/ai/stalker/ai_stalker_script.cpp +++ b/src/xrGame/ai/stalker/ai_stalker_script.cpp @@ -178,7 +178,7 @@ SCRIPT_EXPORT(CStalkerPlanner, (CScriptActionPlanner), { luabind::value("sound_running_in_danger", StalkerSpace::eStalkerSoundRunningInDanger), // luabind::value("sound_walking_in_danger", - //StalkerSpace::eStalkerSoundWalkingInDanger), + // StalkerSpace::eStalkerSoundWalkingInDanger), luabind::value("sound_kill_wounded", StalkerSpace::eStalkerSoundKillWounded), luabind::value("sound_enemy_critically_wounded", StalkerSpace::eStalkerSoundEnemyCriticallyWounded), luabind::value( diff --git a/src/xrGame/ai/stalker/ai_stalker_script_entity.cpp b/src/xrGame/ai/stalker/ai_stalker_script_entity.cpp index 2d6aa0e17a3..583cc56ec7e 100644 --- a/src/xrGame/ai/stalker/ai_stalker_script_entity.cpp +++ b/src/xrGame/ai/stalker/ai_stalker_script_entity.cpp @@ -243,8 +243,9 @@ bool CAI_Stalker::bfAssignObject(CScriptEntityAction* tpEntityAction) // l_tObjectAction.m_bCompleted = true; // } // else - // ai().script_engine().script_log(LuaMessageType::Error,"cannot reload active item because it is not - //selected!"); + // ai().script_engine().script_log(LuaMessageType::Error,"cannot reload active item because it is + //not + // selected!"); break; } case eObjectActionActivate: diff --git a/src/xrGame/ai/trader/ai_trader.cpp b/src/xrGame/ai/trader/ai_trader.cpp index 40e8e9966a7..81d152a753c 100644 --- a/src/xrGame/ai/trader/ai_trader.cpp +++ b/src/xrGame/ai/trader/ai_trader.cpp @@ -135,7 +135,7 @@ BOOL CAI_Trader::net_Spawn(CSE_Abstract* DC) bone_head->set_callback(bctCustom, BoneCallback, this); shedule.t_min = 100; - shedule.t_max = 2500; // This equaltiy is broken by Dima :-( // 30 * NET_Latency / 4; + shedule.t_max = 2500; // This equaltiy is broken by Dima :-( // 30 * NET_Latency / 4; return (TRUE); } diff --git a/src/xrGame/ai/weighted_random.h b/src/xrGame/ai/weighted_random.h index 049cbbabfca..bc6962a7ae3 100644 --- a/src/xrGame/ai/weighted_random.h +++ b/src/xrGame/ai/weighted_random.h @@ -19,4 +19,4 @@ struct weighted_random float generate(); }; -#endif // WEIGHTED_RANDOM \ No newline at end of file +#endif // WEIGHTED_RANDOM \ No newline at end of file diff --git a/src/xrGame/ai_debug.h b/src/xrGame/ai_debug.h index f75782f0779..38258960f53 100644 --- a/src/xrGame/ai_debug.h +++ b/src/xrGame/ai_debug.h @@ -37,7 +37,7 @@ #define aiDrawVisibilityRays (1 << 26) #define aiAnimationStats (1 << 27) #define aiDrawGameGraphRealPos (1 << 28) -#endif // DEBUG +#endif // DEBUG #ifndef MASTER_GOLD #define aiIgnoreActor (1 << 24) @@ -46,4 +46,4 @@ #define aiUseSmartCovers (1 << 30) #define aiUseSmartCoversAnimationSlot (1 << 31) extern Flags32 psAI_Flags; -#endif // MASTER_GOLD \ No newline at end of file +#endif // MASTER_GOLD \ No newline at end of file diff --git a/src/xrGame/ai_debug_variables.cpp b/src/xrGame/ai_debug_variables.cpp index 256b43901c8..afa8e48fa70 100644 --- a/src/xrGame/ai_debug_variables.cpp +++ b/src/xrGame/ai_debug_variables.cpp @@ -86,4 +86,4 @@ void show_var(const char* name) } } -} // namespace ai_dbg \ No newline at end of file +} // namespace ai_dbg \ No newline at end of file diff --git a/src/xrGame/ai_debug_variables.h b/src/xrGame/ai_debug_variables.h index a728d8dbd7d..6afbe125b3d 100644 --- a/src/xrGame/ai_debug_variables.h +++ b/src/xrGame/ai_debug_variables.h @@ -9,6 +9,6 @@ bool get_var(const char* name, float& value); bool get_var(const char* name, u32& value); bool get_var(const char* name, bool& value); -} // namespace ai_dbg +} // namespace ai_dbg -#endif // AI_DEBUG_VARIABLES_H_INCLUDED \ No newline at end of file +#endif // AI_DEBUG_VARIABLES_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ai_obstacle.h b/src/xrGame/ai_obstacle.h index 0a9fc4bb159..67babe3f905 100644 --- a/src/xrGame/ai_obstacle.h +++ b/src/xrGame/ai_obstacle.h @@ -65,4 +65,4 @@ class ai_obstacle #include "ai_obstacle_inline.h" -#endif // AI_OBSTACLE_H \ No newline at end of file +#endif // AI_OBSTACLE_H \ No newline at end of file diff --git a/src/xrGame/ai_obstacle_inline.h b/src/xrGame/ai_obstacle_inline.h index d2b66c0383a..d1bd29a5c7b 100644 --- a/src/xrGame/ai_obstacle_inline.h +++ b/src/xrGame/ai_obstacle_inline.h @@ -50,4 +50,4 @@ IC const MagicBox3 ai_obstacle::min_box() return (m_min_box); } -#endif // AI_OBSTACLE_INLINE_H \ No newline at end of file +#endif // AI_OBSTACLE_INLINE_H \ No newline at end of file diff --git a/src/xrGame/ai_space.cpp b/src/xrGame/ai_space.cpp index 9b0dc682723..ee4068b41fa 100644 --- a/src/xrGame/ai_space.cpp +++ b/src/xrGame/ai_space.cpp @@ -55,7 +55,7 @@ void CAI_Space::init() CAI_Space::~CAI_Space() { unload(); - xr_delete(GlobalEnv.ScriptEngine); // XXX: wrapped into try..catch(...) in vanilla source + xr_delete(GlobalEnv.ScriptEngine); // XXX: wrapped into try..catch(...) in vanilla source xr_delete(m_doors_manager); xr_delete(m_moving_objects); xr_delete(m_cover_manager); @@ -121,7 +121,7 @@ void CAI_Space::LoadCommonScripts() void CAI_Space::SetupScriptEngine() { - XRay::ScriptExporter::Reset(); // mark all nodes as undone + XRay::ScriptExporter::Reset(); // mark all nodes as undone GlobalEnv.ScriptEngine->init(XRay::ScriptExporter::Export, true); RegisterScriptClasses(); object_factory().register_script(); diff --git a/src/xrGame/ai_space.h b/src/xrGame/ai_space.h index 8f20b31304d..1c0cc75e6e5 100644 --- a/src/xrGame/ai_space.h +++ b/src/xrGame/ai_space.h @@ -24,7 +24,7 @@ class moving_objects; namespace doors { class manager; -} // namespace doors +} // namespace doors class CAI_Space : public AISpaceBase { diff --git a/src/xrGame/aimers_base.cpp b/src/xrGame/aimers_base.cpp index 4934143a43b..2d600c88b9c 100644 --- a/src/xrGame/aimers_base.cpp +++ b/src/xrGame/aimers_base.cpp @@ -54,7 +54,7 @@ void base::aim_at_position( VPUSH(object_position), VPUSH(object_direction) ); -#endif // #if 0 +#endif // #if 0 VERIFY2(_valid(bone_position), make_string("[%f][%f][%f]", VPUSH(bone_position))); VERIFY2(_valid(object_position), make_string("[%f][%f][%f]", VPUSH(object_position))); diff --git a/src/xrGame/aimers_base.h b/src/xrGame/aimers_base.h index 240edf9f9fa..58be587845b 100644 --- a/src/xrGame/aimers_base.h +++ b/src/xrGame/aimers_base.h @@ -42,10 +42,10 @@ class base : private Noncopyable Fvector const& m_target; MotionID m_animation_id; bool m_animation_start; -}; // class position_bone_aimer +}; // class position_bone_aimer -} // namespace aimers +} // namespace aimers #include "aimers_base_inline.h" -#endif // #ifndef AIMERS_BASE_H_INCLUDED \ No newline at end of file +#endif // #ifndef AIMERS_BASE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/aimers_base_inline.h b/src/xrGame/aimers_base_inline.h index b6cba0f637d..8e308e025ee 100644 --- a/src/xrGame/aimers_base_inline.h +++ b/src/xrGame/aimers_base_inline.h @@ -70,4 +70,4 @@ inline void aimers::base::fill_bones(u32 const (&bones)[bone_count0], u16 const root_bone.set_callback(bctCustom, callback, callback_params); } -#endif // #ifndef AIMERS_BASE_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifndef AIMERS_BASE_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/aimers_bone.h b/src/xrGame/aimers_bone.h index 7e9a6b04372..8c961049a52 100644 --- a/src/xrGame/aimers_bone.h +++ b/src/xrGame/aimers_bone.h @@ -35,10 +35,10 @@ class bone : public base Fmatrix m_result[bone_count]; Fmatrix m_bones[bone_count]; u16 m_bones_ids[bone_count]; -}; // class bone +}; // class bone -} // namespace aimers +} // namespace aimers #include "aimers_bone_inline.h" -#endif // #ifndef AIMERS_BONE_H_INCLUDED \ No newline at end of file +#endif // #ifndef AIMERS_BONE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/aimers_bone_inline.h b/src/xrGame/aimers_bone_inline.h index 0fafd69979a..e668bce8539 100644 --- a/src/xrGame/aimers_bone_inline.h +++ b/src/xrGame/aimers_bone_inline.h @@ -84,12 +84,12 @@ void BONE::compute_bone(u32 const bone_id) float const sin_alpha = cross_product.magnitude(); float const cos_alpha = current_direction.dotproduct(target_direction); m_result[bone_id].rotation (cross_product.normalize(), atan2f(sin_alpha, cos_alpha)); -#else // #if 0 +#else // #if 0 m_result[bone_id] = Fidentity; -#endif // #if 0 +#endif // #if 0 } #undef BONE #undef TEMPLATE_SPECIALIZATION -#endif // #ifndef AIMERS_BONE_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifndef AIMERS_BONE_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/aimers_weapon.cpp b/src/xrGame/aimers_weapon.cpp index c41d9833a6e..6560938e277 100644 --- a/src/xrGame/aimers_weapon.cpp +++ b/src/xrGame/aimers_weapon.cpp @@ -49,9 +49,9 @@ weapon::weapon(CGameObject* object, LPCSTR animation_id, bool animation_start, F compute_bone(bone_id1); bone.set_callback(bctCustom, old_callback, old_callback_param); -#else // #if 0 +#else // #if 0 m_result[bone_id1] = Fidentity; -#endif // #if 0 +#endif // #if 0 } void weapon::compute_bone(u32 const bone_id) diff --git a/src/xrGame/aimers_weapon.h b/src/xrGame/aimers_weapon.h index cea9f7bc7e3..02622818cdd 100644 --- a/src/xrGame/aimers_weapon.h +++ b/src/xrGame/aimers_weapon.h @@ -36,7 +36,7 @@ class weapon : public base weapon_bone_id0, weapon_bone_id1, parent_weapon_bone_id0, - }; // enum + }; // enum private: Fmatrix m_result[2]; @@ -44,10 +44,10 @@ class weapon : public base Fmatrix m_local_bones[5]; CWeapon const& m_weapon; u16 m_bones_ids[5]; -}; // class weapon +}; // class weapon -} // namespace aimers +} // namespace aimers #include "aimers_weapon_inline.h" -#endif // #ifndef AIMERS_WEAPON_H_INCLUDED \ No newline at end of file +#endif // #ifndef AIMERS_WEAPON_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/aimers_weapon_inline.h b/src/xrGame/aimers_weapon_inline.h index cb8cb4f3f25..c8b948533fe 100644 --- a/src/xrGame/aimers_weapon_inline.h +++ b/src/xrGame/aimers_weapon_inline.h @@ -15,4 +15,4 @@ inline Fmatrix const& aimers::weapon::get_bone(u32 const& bone_id) const return (m_result[bone_id]); } -#endif // #ifndef AIMERS_WEAPON_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifndef AIMERS_WEAPON_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/alife_anomalous_zone.cpp b/src/xrGame/alife_anomalous_zone.cpp index 68c2dd04a39..ccc428d5a76 100644 --- a/src/xrGame/alife_anomalous_zone.cpp +++ b/src/xrGame/alife_anomalous_zone.cpp @@ -23,7 +23,7 @@ CSE_ALifeItemWeapon* CSE_ALifeAnomalousZone::tpfGetBestWeapon(ALife::EHitType& t { m_tpCurrentBestWeapon = 0; m_tTimeID = ai().alife().time_manager().game_time(); - fHitPower = 1.0f; // m_maxPower; + fHitPower = 1.0f; // m_maxPower; tHitType = m_tHitType; return (m_tpCurrentBestWeapon); } diff --git a/src/xrGame/alife_creature_abstract.cpp b/src/xrGame/alife_creature_abstract.cpp index 2c7d13399af..003674ab32f 100644 --- a/src/xrGame/alife_creature_abstract.cpp +++ b/src/xrGame/alife_creature_abstract.cpp @@ -26,7 +26,7 @@ void CSE_ALifeCreatureAbstract::on_spawn() monster_community.set(pSettings->r_string(s_name, "species")); if (monster_community.team() != 255) s_team = monster_community.team(); - if (!g_Alive()) m_game_death_time = 0; // alife().time_manager().game_time(); + if (!g_Alive()) m_game_death_time = 0; // alife().time_manager().game_time(); } void CSE_ALifeCreatureActor::add_online(const bool& update_registries) diff --git a/src/xrGame/alife_dynamic_object.cpp b/src/xrGame/alife_dynamic_object.cpp index 0f02e0493ca..5fbdcd14165 100644 --- a/src/xrGame/alife_dynamic_object.cpp +++ b/src/xrGame/alife_dynamic_object.cpp @@ -251,7 +251,7 @@ void CSE_ALifeDynamicObject::clear_client_data() #ifdef DEBUG if (!client_data.empty()) Msg("CSE_ALifeDynamicObject::switch_offline: client_data is cleared for [%d][%s]", ID, name_replace()); -#endif // DEBUG +#endif // DEBUG if (!keep_saved_data_anyway()) client_data.clear(); } diff --git a/src/xrGame/alife_graph_registry.cpp b/src/xrGame/alife_graph_registry.cpp index 96999d345be..3f9c894071a 100644 --- a/src/xrGame/alife_graph_registry.cpp +++ b/src/xrGame/alife_graph_registry.cpp @@ -148,7 +148,7 @@ void CALifeGraphRegistry::detach(CSE_Abstract& object, CSE_ALifeInventoryItem* i item->base()->name_replace(), item->base()->ID, object.name_replace(), object.ID, *item->base()->s_name); } -#endif // DEBUG +#endif // DEBUG // R_ASSERT2 (value,"Can't detach an item which is not on my own"); } } diff --git a/src/xrGame/alife_online_offline_group_brain.cpp b/src/xrGame/alife_online_offline_group_brain.cpp index 108bc4d441e..db7c386e85a 100644 --- a/src/xrGame/alife_online_offline_group_brain.cpp +++ b/src/xrGame/alife_online_offline_group_brain.cpp @@ -12,19 +12,19 @@ #include "xrServer_Objects_ALife_Monsters.h" #ifdef XRGAME_EXPORTS -#include "alife_monster_movement_manager.h" +#include "ai_space.h" +#include "alife_graph_registry.h" #include "alife_monster_detail_path_manager.h" +#include "alife_monster_movement_manager.h" #include "alife_monster_patrol_path_manager.h" -#include "ai_space.h" -#include "ef_storage.h" -#include "ef_primary.h" +#include "alife_object_registry.h" #include "alife_simulator.h" -#include "alife_graph_registry.h" -#include "movement_manager_space.h" #include "alife_smart_terrain_registry.h" -#include "alife_object_registry.h" #include "alife_time_manager.h" #include "date_time.h" +#include "ef_primary.h" +#include "ef_storage.h" +#include "movement_manager_space.h" #ifdef DEBUG #include "Level.h" #include "map_location.h" @@ -94,4 +94,4 @@ void CALifeOnlineOfflineGroupBrain::on_switch_offline() movement().on_switch_offline(); } -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS diff --git a/src/xrGame/alife_registry_wrappers.h b/src/xrGame/alife_registry_wrappers.h index 4a12d9dcd0b..e678db52441 100644 --- a/src/xrGame/alife_registry_wrappers.h +++ b/src/xrGame/alife_registry_wrappers.h @@ -60,7 +60,8 @@ class CGameTaskWrapper : public CALifeRegistryWrapperObject > +//. class CFogOfWarWrapper : public CALifeRegistryWrapperObject +//> //{}; class CActorStatisticsWrapper : public CALifeRegistryWrapperObject> { diff --git a/src/xrGame/alife_simulator.cpp b/src/xrGame/alife_simulator.cpp index 20fd233f989..ce6fdc2cf75 100644 --- a/src/xrGame/alife_simulator.cpp +++ b/src/xrGame/alife_simulator.cpp @@ -19,7 +19,7 @@ #ifdef DEBUG #include "moving_objects.h" -#endif // DEBUG +#endif // DEBUG LPCSTR alife_section = "alife"; @@ -37,7 +37,7 @@ CALifeSimulator::CALifeSimulator(IPureServer* server, shared_str* command_line) ai().SetupScriptEngine(); #ifdef DEBUG ai().moving_objects().clear(); -#endif // DEBUG +#endif // DEBUG } ai().set_alife(this); @@ -104,7 +104,7 @@ struct string_prdicate { return !xr_strcmp(m_value, value.first); } -}; // struct string_prdicate +}; // struct string_prdicate IReader const* CALifeSimulator::get_config(shared_str config) const { @@ -135,4 +135,4 @@ bool object_exists_in_alife_registry(u32 id) return false; } -} // detail \ No newline at end of file +} // detail \ No newline at end of file diff --git a/src/xrGame/alife_simulator.h b/src/xrGame/alife_simulator.h index 577ea66fd41..cd29cc1415e 100644 --- a/src/xrGame/alife_simulator.h +++ b/src/xrGame/alife_simulator.h @@ -26,9 +26,9 @@ class CALifeSimulator : public CALifeUpdateManager, public CALifeInteractionMana virtual void destroy(); IReader const* get_config(shared_str config) const; -#if 0 // def DEBUG +#if 0 // def DEBUG void validate (); -#endif // DEBUG +#endif // DEBUG private: typedef xr_list> configs_type; diff --git a/src/xrGame/alife_simulator_base.h b/src/xrGame/alife_simulator_base.h index 582b6411008..e502e95d476 100644 --- a/src/xrGame/alife_simulator_base.h +++ b/src/xrGame/alife_simulator_base.h @@ -37,7 +37,7 @@ namespace upgrade { class Manager; } -} // namespace upgrade, inventory +} // namespace upgrade, inventory class CALifeSimulatorBase : public IPureDestroyableObject { diff --git a/src/xrGame/alife_simulator_script.cpp b/src/xrGame/alife_simulator_script.cpp index 41e1f5de455..da26b209ab8 100644 --- a/src/xrGame/alife_simulator_script.cpp +++ b/src/xrGame/alife_simulator_script.cpp @@ -61,7 +61,7 @@ CSE_ALifeDynamicObject* alife_object(const CALifeSimulator* self, LPCSTR name) return (0); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG CSE_ALifeDynamicObject* alife_object(const CALifeSimulator* self, ALife::_OBJECT_ID id, bool no_assert) { @@ -393,7 +393,7 @@ SCRIPT_EXPORT(CALifeSimulator, (), { } }); -#if 0 // def DEBUG +#if 0 // def DEBUG struct dummy { int count; lua_State* state; @@ -426,4 +426,4 @@ void CALifeSimulator::validate () ); } } -#endif // DEBUG +#endif // DEBUG diff --git a/src/xrGame/alife_storage_manager.cpp b/src/xrGame/alife_storage_manager.cpp index b4fb0e70d66..d615878c74b 100644 --- a/src/xrGame/alife_storage_manager.cpp +++ b/src/xrGame/alife_storage_manager.cpp @@ -88,9 +88,9 @@ void CALifeStorageManager::save(LPCSTR save_name_no_check, bool update_name) #ifdef DEBUG Msg("* Game %s is successfully saved to file '%s' (%d bytes compressed to %d)", m_save_name, temp, source_count, dest_count + 4); -#else // DEBUG +#else // DEBUG Msg("* Game %s is successfully saved to file '%s'", m_save_name, temp); -#endif // DEBUG +#endif // DEBUG if (!update_name) xr_strcpy(m_save_name, save); } diff --git a/src/xrGame/alife_switch_manager.cpp b/src/xrGame/alife_switch_manager.cpp index 63784d5af79..baf3d99610d 100644 --- a/src/xrGame/alife_switch_manager.cpp +++ b/src/xrGame/alife_switch_manager.cpp @@ -19,7 +19,7 @@ #ifdef DEBUG #include "Level.h" -#endif // DEBUG +#endif // DEBUG using namespace ALife; @@ -144,7 +144,7 @@ bool CALifeSwitchManager::synchronize_location(CSE_ALifeDynamicObject* I) VERIFY3(test[i - 1] != test[i], "Child is registered twice in the child list", (*I).name_replace()); } } -#endif // DEBUG +#endif // DEBUG // check if we do not use ai locations if (!I->used_ai_locations()) return (true); diff --git a/src/xrGame/alife_trader_abstract.cpp b/src/xrGame/alife_trader_abstract.cpp index d8b5b9611e4..507838144d8 100644 --- a/src/xrGame/alife_trader_abstract.cpp +++ b/src/xrGame/alife_trader_abstract.cpp @@ -67,7 +67,7 @@ void CSE_ALifeTraderAbstract::vfInitInventory() // m_iCumulativeItemVolume = 0; } -#if 0 // def DEBUG +#if 0 // def DEBUG bool CSE_ALifeTraderAbstract::check_inventory_consistency () { int volume = 0; @@ -175,8 +175,9 @@ void add_online_impl(CSE_ALifeDynamicObject* object, const bool& update_registri object->name_replace(), "*SERVER*"); #endif - // R_ASSERT3 (ai().level_graph().valid_vertex_id(l_tpALifeDynamicObject->m_tNodeID),"Invalid - //vertex for object ",l_tpALifeInventoryItem->name_replace()); + // R_ASSERT3 + //(ai().level_graph().valid_vertex_id(l_tpALifeDynamicObject->m_tNodeID),"Invalid + // vertex for object ",l_tpALifeInventoryItem->name_replace()); l_tpALifeDynamicObject->o_Position = object->o_Position; l_tpALifeDynamicObject->m_tNodeID = object->m_tNodeID; object->alife().server().Process_spawn(tNetPacket, clientID, FALSE, l_tpALifeInventoryItem->base()); diff --git a/src/xrGame/alife_update_manager.cpp b/src/xrGame/alife_update_manager.cpp index 04fb009225d..55c3f8d559a 100644 --- a/src/xrGame/alife_update_manager.cpp +++ b/src/xrGame/alife_update_manager.cpp @@ -71,7 +71,7 @@ CALifeUpdateManager::~CALifeUpdateManager() float CALifeUpdateManager::shedule_Scale() { - return (.5f); // (schedule_min + schedule_max)*0.5f + return (.5f); // (schedule_min + schedule_max)*0.5f } void CALifeUpdateManager::update_switch() @@ -234,7 +234,7 @@ void CALifeUpdateManager::new_game(LPCSTR save_name) #ifdef DEBUG save(save_name); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG Msg("* New game is successfully created!"); } @@ -324,7 +324,7 @@ void CALifeUpdateManager::jump_to_level(LPCSTR level_name) const if (failed) { #ifndef MASTER_GOLD Msg("! Cannot build path via game graph from the current level to the level %s!", level_name); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD float min_dist = flt_max; Fvector current = ai().game_graph().vertex(graph().actor()->m_tGraphID)->game_point(); GameGraph::_GRAPH_ID n = ai().game_graph().header().vertex_count(); diff --git a/src/xrGame/ammunition_groups.cpp b/src/xrGame/ammunition_groups.cpp index 006bab2495e..f9cab433bd1 100644 --- a/src/xrGame/ammunition_groups.cpp +++ b/src/xrGame/ammunition_groups.cpp @@ -82,4 +82,4 @@ bool ammunition_group::is_item_in_group(u16 item_id, enum_group_id gid) const return true; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/ammunition_groups.h b/src/xrGame/ammunition_groups.h index 0920e2059d8..67765173f66 100644 --- a/src/xrGame/ammunition_groups.h +++ b/src/xrGame/ammunition_groups.h @@ -23,7 +23,7 @@ class ammunition_group gid_double_barred, gid_hand_grenades, gid_cool_weapons, - }; // enum_group_id + }; // enum_group_id static u16 const gid_any = u16(-1); ammunition_group(); @@ -39,6 +39,6 @@ class ammunition_group ammun_groups_map_t m_wpn_groups; }; -} // namespace award_system +} // namespace award_system -#endif //#ifndef AMMUNITION_GROUPS_INCLUDED \ No newline at end of file +#endif //#ifndef AMMUNITION_GROUPS_INCLUDED \ No newline at end of file diff --git a/src/xrGame/animation_movement_controller.cpp b/src/xrGame/animation_movement_controller.cpp index e690d95530f..844c7ed9da8 100644 --- a/src/xrGame/animation_movement_controller.cpp +++ b/src/xrGame/animation_movement_controller.cpp @@ -118,7 +118,7 @@ void animation_movement_controller::GetInitalPositionBlenSpeed() bool animation_movement_controller::IsBlending() const { - return is_blending_in(*m_control_blend); // inital_position_blending || + return is_blending_in(*m_control_blend); // inital_position_blending || } float blend_linear_accel = 1.f; float blend_angular_accel = 1.f; @@ -308,7 +308,7 @@ anim: %s anim set: %s", else if (local_animation) { float blend_time = m_control_blend->timeCurrent; - m_control_blend->timeCurrent = m_control_blend->timeTotal - SAMPLE_SPF; //(SAMPLE_SPF+EPS); + m_control_blend->timeCurrent = m_control_blend->timeTotal - SAMPLE_SPF; //(SAMPLE_SPF+EPS); Fmatrix root; animation_root_position(root); m_startObjXForm.mulB_43(root); @@ -401,10 +401,10 @@ float change_pos_delta = 0.02f; // float sq_diff = Fvector().sub( m_pObjXForm.c,m_update_vis_pos).magnitude(); // // float change_pos_sq_delta = change_pos_delta * change_pos_delta * (( Device.fTimeDelta/0.01f )*( -//Device.fTimeDelta/0.01f )); +// Device.fTimeDelta/0.01f )); // // if( pos_sq_delta > change_pos_sq_delta || sphere.P.square_magnitude() + change_pos_sq_delta + pos_sq_delta > -//sphere.R*sphere.R ) +// sphere.R*sphere.R ) // { // m_update_vis_pos = m_pObjXForm.c; // m_pKinematicsC->LL_VisBoxInvalidate(); diff --git a/src/xrGame/animation_script_callback.cpp b/src/xrGame/animation_script_callback.cpp index 4e50b166f6e..ab0e8581c40 100644 --- a/src/xrGame/animation_script_callback.cpp +++ b/src/xrGame/animation_script_callback.cpp @@ -70,7 +70,7 @@ void anim_script_callback::anim_callback(CBlend* B) ////////////////////BLEND UPDATE////////////////////////////////////////////// - if (B->timeTotal - B->timeCurrent - END_EPS < B->timeCurrent) // this cool expression sims to work for all cases! + if (B->timeTotal - B->timeCurrent - END_EPS < B->timeCurrent) // this cool expression sims to work for all cases! { VERIFY(B->speed > 0.f); ths->on_end = true; diff --git a/src/xrGame/anticheat_dumpable_object.h b/src/xrGame/anticheat_dumpable_object.h index eca2216b247..dc0416ed484 100644 --- a/src/xrGame/anticheat_dumpable_object.h +++ b/src/xrGame/anticheat_dumpable_object.h @@ -8,4 +8,4 @@ class IAnticheatDumpable virtual shared_str const GetAnticheatSectionName() const { return ""; } }; -#endif //#ifndef ANTICHEAT_DUMPABLE_OBJECT \ No newline at end of file +#endif //#ifndef ANTICHEAT_DUMPABLE_OBJECT \ No newline at end of file diff --git a/src/xrGame/artefact_activation.cpp b/src/xrGame/artefact_activation.cpp index a88308540d1..9891baa990b 100644 --- a/src/xrGame/artefact_activation.cpp +++ b/src/xrGame/artefact_activation.cpp @@ -158,7 +158,7 @@ void SArtefactActivation::SpawnAnomaly() LPCSTR str = pSettings->r_string("artefact_spawn_zones", *m_af->cNameSect()); VERIFY3(3 == _GetItemCount(str), "Bad record format in artefact_spawn_zones", str); float zone_radius = (float)atof(_GetItem(str, 1, tmp)); - LPCSTR zone_sect = _GetItem(str, 0, tmp); // must be last call of _GetItem... (LPCSTR !!!) + LPCSTR zone_sect = _GetItem(str, 0, tmp); // must be last call of _GetItem... (LPCSTR !!!) Fvector pos; m_af->Center(pos); @@ -193,8 +193,8 @@ shared_str clear_brackets(LPCSTR src) xr_strcpy(_original, src); u32 _len = xr_strlen(_original); if (0 == _len) return shared_str(""); - if ('"' == _original[_len - 1]) _original[_len - 1] = 0; // skip end - if ('"' == _original[0]) return shared_str(&_original[0] + 1); // skip begin + if ('"' == _original[_len - 1]) _original[_len - 1] = 0; // skip end + if ('"' == _original[0]) return shared_str(&_original[0] + 1); // skip begin return shared_str(_original); } diff --git a/src/xrGame/artefact_activation.h b/src/xrGame/artefact_activation.h index 7a070422bca..96996e4e1a9 100644 --- a/src/xrGame/artefact_activation.h +++ b/src/xrGame/artefact_activation.h @@ -60,6 +60,6 @@ class SArtefactActivation private: bool m_in_process; -}; // class SArtefactActivation +}; // class SArtefactActivation -#endif // ARTEFACT_ACTIVATION \ No newline at end of file +#endif // ARTEFACT_ACTIVATION \ No newline at end of file diff --git a/src/xrGame/atlas_stalkercoppc_v1.h b/src/xrGame/atlas_stalkercoppc_v1.h index ced0afa008a..81e3b04d20e 100644 --- a/src/xrGame/atlas_stalkercoppc_v1.h +++ b/src/xrGame/atlas_stalkercoppc_v1.h @@ -23,151 +23,151 @@ extern int ATLAS_GET_STAT_PAGE_BY_NAME(char* statName); // KEYS // Use these key ID's to report match data for your game. -#define KEY_BestScore_KillsInRow 3 // [TYPE: int] [DESC: kills in row] -#define KEY_BestScore_KnifeKillsInRow 4 // [TYPE: int] [DESC: knife kills in row] -#define KEY_BestScore_BackstabsKillsInRow 5 // [TYPE: int] [DESC: knife backstabs kills in row] -#define KEY_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] [DESC: headshots kills in row] -#define KEY_BestScore_EyeKillsInRow 7 // [TYPE: int] [DESC: eye kills in row] -#define KEY_BestScore_BleedKillsInRow 8 // [TYPE: int] [DESC: bleed kills in row] -#define KEY_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] [DESC: explosive kills in row] -#define KEY_AwardMasscare 10 // [TYPE: int] -#define KEY_AwardMasscareLastRewardDate 11 // [TYPE: int] -#define KEY_AwardParanoia 12 // [TYPE: int] -#define KEY_AwardParanoiaLastRewardDate 13 // [TYPE: int] -#define KEY_AwardOverwhelmingSuperiority 14 // [TYPE: int] -#define KEY_AwardOverwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] -#define KEY_AwardBlitzkrieg 16 // [TYPE: int] -#define KEY_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] -#define KEY_AwardDryVictory 18 // [TYPE: int] -#define KEY_AwardDryVictoryLastRewardDate 19 // [TYPE: int] -#define KEY_AwardMultichampion 20 // [TYPE: int] -#define KEY_AwardMultichampionLastRewardDate 21 // [TYPE: int] -#define KEY_AwardMad 22 // [TYPE: int] -#define KEY_AwardMadLastRewardDate 23 // [TYPE: int] -#define KEY_AwardAchillesHeel 24 // [TYPE: int] -#define KEY_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] -#define KEY_AwardFasterThanBullets 26 // [TYPE: int] -#define KEY_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] -#define KEY_AwardHarvestTime 28 // [TYPE: int] -#define KEY_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] -#define KEY_AwardSkewer 30 // [TYPE: int] -#define KEY_AwardSkewerLastRewardDate 31 // [TYPE: int] -#define KEY_AwardDoubleShotDoubleKill 32 // [TYPE: int] -#define KEY_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] -#define KEY_AwardClimber 34 // [TYPE: int] -#define KEY_AwardClimberLastRewardDate 35 // [TYPE: int] -#define KEY_AwardOpener 36 // [TYPE: int] -#define KEY_AwardOpenerLastRewardDate 37 // [TYPE: int] -#define KEY_AwardToughy 38 // [TYPE: int] -#define KEY_AwardToughyLastRewardDate 39 // [TYPE: int] -#define KEY_AwardInvincibleFury 40 // [TYPE: int] -#define KEY_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] -#define KEY_AwardOculist 42 // [TYPE: int] -#define KEY_AwardOculistLastRewardDate 43 // [TYPE: int] -#define KEY_AwardLightingReflexes 44 // [TYPE: int] -#define KEY_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] -#define KEY_AwardSprinterStopper 46 // [TYPE: int] -#define KEY_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] -#define KEY_AwardMarksMan 48 // [TYPE: int] -#define KEY_AwardMarksManLastRewardDate 49 // [TYPE: int] -#define KEY_AwardPeaceAmbassador 50 // [TYPE: int] -#define KEY_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] -#define KEY_AwardDeadlyAccuracy 52 // [TYPE: int] -#define KEY_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] -#define KEY_AwardRemembrance 54 // [TYPE: int] -#define KEY_AwardRemembranceLastRewardDate 55 // [TYPE: int] -#define KEY_AwardAvenger 56 // [TYPE: int] -#define KEY_AwardAvengerLastRewardDate 57 // [TYPE: int] -#define KEY_AwardCherub 58 // [TYPE: int] -#define KEY_AwardCherubLastRewardDate 59 // [TYPE: int] -#define KEY_AwardDignity 60 // [TYPE: int] -#define KEY_AwardDignityLastRewardDate 61 // [TYPE: int] -#define KEY_AwardStalkerFlair 62 // [TYPE: int] -#define KEY_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] -#define KEY_AwardLucky 64 // [TYPE: int] -#define KEY_AwardLuckyLastRewardDate 65 // [TYPE: int] -#define KEY_AwardBlackList 66 // [TYPE: int] -#define KEY_AwardBlackListLastRewardDate 67 // [TYPE: int] -#define KEY_AwardSilentDeath 68 // [TYPE: int] -#define KEY_AwardSilentDeathLastRewardDate 69 // [TYPE: int] -#define KEY_PlayerName 70 // [TYPE: string] +#define KEY_BestScore_KillsInRow 3 // [TYPE: int] [DESC: kills in row] +#define KEY_BestScore_KnifeKillsInRow 4 // [TYPE: int] [DESC: knife kills in row] +#define KEY_BestScore_BackstabsKillsInRow 5 // [TYPE: int] [DESC: knife backstabs kills in row] +#define KEY_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] [DESC: headshots kills in row] +#define KEY_BestScore_EyeKillsInRow 7 // [TYPE: int] [DESC: eye kills in row] +#define KEY_BestScore_BleedKillsInRow 8 // [TYPE: int] [DESC: bleed kills in row] +#define KEY_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] [DESC: explosive kills in row] +#define KEY_AwardMasscare 10 // [TYPE: int] +#define KEY_AwardMasscareLastRewardDate 11 // [TYPE: int] +#define KEY_AwardParanoia 12 // [TYPE: int] +#define KEY_AwardParanoiaLastRewardDate 13 // [TYPE: int] +#define KEY_AwardOverwhelmingSuperiority 14 // [TYPE: int] +#define KEY_AwardOverwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] +#define KEY_AwardBlitzkrieg 16 // [TYPE: int] +#define KEY_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] +#define KEY_AwardDryVictory 18 // [TYPE: int] +#define KEY_AwardDryVictoryLastRewardDate 19 // [TYPE: int] +#define KEY_AwardMultichampion 20 // [TYPE: int] +#define KEY_AwardMultichampionLastRewardDate 21 // [TYPE: int] +#define KEY_AwardMad 22 // [TYPE: int] +#define KEY_AwardMadLastRewardDate 23 // [TYPE: int] +#define KEY_AwardAchillesHeel 24 // [TYPE: int] +#define KEY_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] +#define KEY_AwardFasterThanBullets 26 // [TYPE: int] +#define KEY_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] +#define KEY_AwardHarvestTime 28 // [TYPE: int] +#define KEY_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] +#define KEY_AwardSkewer 30 // [TYPE: int] +#define KEY_AwardSkewerLastRewardDate 31 // [TYPE: int] +#define KEY_AwardDoubleShotDoubleKill 32 // [TYPE: int] +#define KEY_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] +#define KEY_AwardClimber 34 // [TYPE: int] +#define KEY_AwardClimberLastRewardDate 35 // [TYPE: int] +#define KEY_AwardOpener 36 // [TYPE: int] +#define KEY_AwardOpenerLastRewardDate 37 // [TYPE: int] +#define KEY_AwardToughy 38 // [TYPE: int] +#define KEY_AwardToughyLastRewardDate 39 // [TYPE: int] +#define KEY_AwardInvincibleFury 40 // [TYPE: int] +#define KEY_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] +#define KEY_AwardOculist 42 // [TYPE: int] +#define KEY_AwardOculistLastRewardDate 43 // [TYPE: int] +#define KEY_AwardLightingReflexes 44 // [TYPE: int] +#define KEY_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] +#define KEY_AwardSprinterStopper 46 // [TYPE: int] +#define KEY_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] +#define KEY_AwardMarksMan 48 // [TYPE: int] +#define KEY_AwardMarksManLastRewardDate 49 // [TYPE: int] +#define KEY_AwardPeaceAmbassador 50 // [TYPE: int] +#define KEY_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] +#define KEY_AwardDeadlyAccuracy 52 // [TYPE: int] +#define KEY_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] +#define KEY_AwardRemembrance 54 // [TYPE: int] +#define KEY_AwardRemembranceLastRewardDate 55 // [TYPE: int] +#define KEY_AwardAvenger 56 // [TYPE: int] +#define KEY_AwardAvengerLastRewardDate 57 // [TYPE: int] +#define KEY_AwardCherub 58 // [TYPE: int] +#define KEY_AwardCherubLastRewardDate 59 // [TYPE: int] +#define KEY_AwardDignity 60 // [TYPE: int] +#define KEY_AwardDignityLastRewardDate 61 // [TYPE: int] +#define KEY_AwardStalkerFlair 62 // [TYPE: int] +#define KEY_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] +#define KEY_AwardLucky 64 // [TYPE: int] +#define KEY_AwardLuckyLastRewardDate 65 // [TYPE: int] +#define KEY_AwardBlackList 66 // [TYPE: int] +#define KEY_AwardBlackListLastRewardDate 67 // [TYPE: int] +#define KEY_AwardSilentDeath 68 // [TYPE: int] +#define KEY_AwardSilentDeathLastRewardDate 69 // [TYPE: int] +#define KEY_PlayerName 70 // [TYPE: string] /////////////////////////////////////////////////////////////////////////////// // STATS // Use these stat ID's to query aggregate statistics for your game. -#define STAT_AwardAchillesHeel 1 // [TYPE: int] -#define STAT_AwardAchillesHeelLastRewardDate 2 // [TYPE: int] -#define STAT_AwardAvenger 3 // [TYPE: int] -#define STAT_AwardAvengerLastRewardDate 4 // [TYPE: int] -#define STAT_AwardBlackList 5 // [TYPE: int] -#define STAT_AwardBlackListLastRewardDate 6 // [TYPE: int] -#define STAT_AwardBlitzkrieg 7 // [TYPE: int] -#define STAT_AwardBlitzkriegLastRewardDate 8 // [TYPE: int] -#define STAT_AwardCherub 9 // [TYPE: int] -#define STAT_AwardCherubLastRewardDate 10 // [TYPE: int] -#define STAT_AwardClimber 11 // [TYPE: int] -#define STAT_AwardClimberLastRewardDate 12 // [TYPE: int] -#define STAT_AwardDeadlyAccuracy 13 // [TYPE: int] -#define STAT_AwardDeadlyAccuracyLastRewardDate 14 // [TYPE: int] -#define STAT_AwardDignity 15 // [TYPE: int] -#define STAT_AwardDignityLastRewardDate 16 // [TYPE: int] -#define STAT_AwardDoubleShotDoubleKill 17 // [TYPE: int] -#define STAT_AwardDoubleShotDoubleKillLastRewardDate 18 // [TYPE: int] -#define STAT_AwardDryVictory 19 // [TYPE: int] -#define STAT_AwardDryVictoryLastRewardDate 20 // [TYPE: int] -#define STAT_AwardFasterThanBullets 21 // [TYPE: int] -#define STAT_AwardFasterThanBulletsLastRewardDate 22 // [TYPE: int] -#define STAT_AwardHarvestTime 23 // [TYPE: int] -#define STAT_AwardHarvestTimeLastRewardDate 24 // [TYPE: int] -#define STAT_AwardInvincibleFury 25 // [TYPE: int] -#define STAT_AwardInvincibleFuryLastRewardDate 26 // [TYPE: int] -#define STAT_AwardLightingReflexes 27 // [TYPE: int] -#define STAT_AwardLightingReflexesLastRewardDate 28 // [TYPE: int] -#define STAT_AwardLucky 29 // [TYPE: int] -#define STAT_AwardLuckyLastRewardDate 30 // [TYPE: int] -#define STAT_AwardMad 31 // [TYPE: int] -#define STAT_AwardMadLastRewardDate 32 // [TYPE: int] -#define STAT_AwardMarksman 33 // [TYPE: int] -#define STAT_AwardMarksmanLastRewardDate 34 // [TYPE: int] -#define STAT_AwardMasscare 35 // [TYPE: int] -#define STAT_AwardMasscareLastRewardDate 36 // [TYPE: int] -#define STAT_AwardMultichampion 37 // [TYPE: int] -#define STAT_AwardMultichampionLastRewardDate 38 // [TYPE: int] -#define STAT_AwardOculist 39 // [TYPE: int] -#define STAT_AwardOculistLastRewardDate 40 // [TYPE: int] -#define STAT_AwardOpener 41 // [TYPE: int] -#define STAT_AwardOpenerLastRewardDate 42 // [TYPE: int] -#define STAT_AwardOwerwhelmingSuperiority 43 // [TYPE: int] -#define STAT_AwardOwerwhelmingSuperiorityLastRewardDate 44 // [TYPE: int] -#define STAT_AwardParanoia 45 // [TYPE: int] -#define STAT_AwardParanoiaLastRewardDate 46 // [TYPE: int] -#define STAT_AwardPeaceAmbassador 47 // [TYPE: int] -#define STAT_AwardPeaceAmbassadorLastRewardDate 48 // [TYPE: int] -#define STAT_AwardRemembrance 49 // [TYPE: int] -#define STAT_AwardRemembranceLastRewardDate 50 // [TYPE: int] -#define STAT_AwardSilentDeath 51 // [TYPE: int] -#define STAT_AwardSilentDeathLastRewardDate 52 // [TYPE: int] -#define STAT_AwardSkewer 53 // [TYPE: int] -#define STAT_AwardSkewerLastRewardDate 54 // [TYPE: int] -#define STAT_AwardSprinterStopper 55 // [TYPE: int] -#define STAT_AwardSprinterStopperLastRewardDate 56 // [TYPE: int] -#define STAT_AwardStalkerFlair 57 // [TYPE: int] -#define STAT_AwardStalkerFlairLastRewardDate 58 // [TYPE: int] -#define STAT_AwardToughy 59 // [TYPE: int] -#define STAT_AwardToughyLastRewardDate 60 // [TYPE: int] -#define STAT_BestScore_BackstabsKillsInRow 61 // [TYPE: int] -#define STAT_BestScore_BleedKillsInRow 62 // [TYPE: int] -#define STAT_BestScore_ExplosiveKillsInRow 63 // [TYPE: int] -#define STAT_BestScore_EyeKillsInRow 64 // [TYPE: int] -#define STAT_BestScore_HeadshotsKillsInRow 65 // [TYPE: int] -#define STAT_BestScore_KillsInRow 66 // [TYPE: int] -#define STAT_BestScore_KnifeKillsInRow 67 // [TYPE: int] -#define STAT_PlayerName 68 // [TYPE: string] [DESC: contains players name] +#define STAT_AwardAchillesHeel 1 // [TYPE: int] +#define STAT_AwardAchillesHeelLastRewardDate 2 // [TYPE: int] +#define STAT_AwardAvenger 3 // [TYPE: int] +#define STAT_AwardAvengerLastRewardDate 4 // [TYPE: int] +#define STAT_AwardBlackList 5 // [TYPE: int] +#define STAT_AwardBlackListLastRewardDate 6 // [TYPE: int] +#define STAT_AwardBlitzkrieg 7 // [TYPE: int] +#define STAT_AwardBlitzkriegLastRewardDate 8 // [TYPE: int] +#define STAT_AwardCherub 9 // [TYPE: int] +#define STAT_AwardCherubLastRewardDate 10 // [TYPE: int] +#define STAT_AwardClimber 11 // [TYPE: int] +#define STAT_AwardClimberLastRewardDate 12 // [TYPE: int] +#define STAT_AwardDeadlyAccuracy 13 // [TYPE: int] +#define STAT_AwardDeadlyAccuracyLastRewardDate 14 // [TYPE: int] +#define STAT_AwardDignity 15 // [TYPE: int] +#define STAT_AwardDignityLastRewardDate 16 // [TYPE: int] +#define STAT_AwardDoubleShotDoubleKill 17 // [TYPE: int] +#define STAT_AwardDoubleShotDoubleKillLastRewardDate 18 // [TYPE: int] +#define STAT_AwardDryVictory 19 // [TYPE: int] +#define STAT_AwardDryVictoryLastRewardDate 20 // [TYPE: int] +#define STAT_AwardFasterThanBullets 21 // [TYPE: int] +#define STAT_AwardFasterThanBulletsLastRewardDate 22 // [TYPE: int] +#define STAT_AwardHarvestTime 23 // [TYPE: int] +#define STAT_AwardHarvestTimeLastRewardDate 24 // [TYPE: int] +#define STAT_AwardInvincibleFury 25 // [TYPE: int] +#define STAT_AwardInvincibleFuryLastRewardDate 26 // [TYPE: int] +#define STAT_AwardLightingReflexes 27 // [TYPE: int] +#define STAT_AwardLightingReflexesLastRewardDate 28 // [TYPE: int] +#define STAT_AwardLucky 29 // [TYPE: int] +#define STAT_AwardLuckyLastRewardDate 30 // [TYPE: int] +#define STAT_AwardMad 31 // [TYPE: int] +#define STAT_AwardMadLastRewardDate 32 // [TYPE: int] +#define STAT_AwardMarksman 33 // [TYPE: int] +#define STAT_AwardMarksmanLastRewardDate 34 // [TYPE: int] +#define STAT_AwardMasscare 35 // [TYPE: int] +#define STAT_AwardMasscareLastRewardDate 36 // [TYPE: int] +#define STAT_AwardMultichampion 37 // [TYPE: int] +#define STAT_AwardMultichampionLastRewardDate 38 // [TYPE: int] +#define STAT_AwardOculist 39 // [TYPE: int] +#define STAT_AwardOculistLastRewardDate 40 // [TYPE: int] +#define STAT_AwardOpener 41 // [TYPE: int] +#define STAT_AwardOpenerLastRewardDate 42 // [TYPE: int] +#define STAT_AwardOwerwhelmingSuperiority 43 // [TYPE: int] +#define STAT_AwardOwerwhelmingSuperiorityLastRewardDate 44 // [TYPE: int] +#define STAT_AwardParanoia 45 // [TYPE: int] +#define STAT_AwardParanoiaLastRewardDate 46 // [TYPE: int] +#define STAT_AwardPeaceAmbassador 47 // [TYPE: int] +#define STAT_AwardPeaceAmbassadorLastRewardDate 48 // [TYPE: int] +#define STAT_AwardRemembrance 49 // [TYPE: int] +#define STAT_AwardRemembranceLastRewardDate 50 // [TYPE: int] +#define STAT_AwardSilentDeath 51 // [TYPE: int] +#define STAT_AwardSilentDeathLastRewardDate 52 // [TYPE: int] +#define STAT_AwardSkewer 53 // [TYPE: int] +#define STAT_AwardSkewerLastRewardDate 54 // [TYPE: int] +#define STAT_AwardSprinterStopper 55 // [TYPE: int] +#define STAT_AwardSprinterStopperLastRewardDate 56 // [TYPE: int] +#define STAT_AwardStalkerFlair 57 // [TYPE: int] +#define STAT_AwardStalkerFlairLastRewardDate 58 // [TYPE: int] +#define STAT_AwardToughy 59 // [TYPE: int] +#define STAT_AwardToughyLastRewardDate 60 // [TYPE: int] +#define STAT_BestScore_BackstabsKillsInRow 61 // [TYPE: int] +#define STAT_BestScore_BleedKillsInRow 62 // [TYPE: int] +#define STAT_BestScore_ExplosiveKillsInRow 63 // [TYPE: int] +#define STAT_BestScore_EyeKillsInRow 64 // [TYPE: int] +#define STAT_BestScore_HeadshotsKillsInRow 65 // [TYPE: int] +#define STAT_BestScore_KillsInRow 66 // [TYPE: int] +#define STAT_BestScore_KnifeKillsInRow 67 // [TYPE: int] +#define STAT_PlayerName 68 // [TYPE: string] [DESC: contains players name] #ifdef __cplusplus } #endif -#endif // _ATLAS_STALKERCOPPC_V1_H_ +#endif // _ATLAS_STALKERCOPPC_V1_H_ diff --git a/src/xrGame/atlas_stalkercs_v1.h b/src/xrGame/atlas_stalkercs_v1.h index 225073c105f..b8fc3402324 100644 --- a/src/xrGame/atlas_stalkercs_v1.h +++ b/src/xrGame/atlas_stalkercs_v1.h @@ -23,149 +23,149 @@ extern int ATLAS_GET_STAT_PAGE_BY_NAME(char* statName); // KEYS // Use these key ID's to report match data for your game. -#define KEY_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] -#define KEY_AwardRemembrance 54 // [TYPE: int] -#define KEY_AwardRemembranceLastRewardDate 55 // [TYPE: int] -#define KEY_AwardAvenger 56 // [TYPE: int] -#define KEY_AwardAvengerLastRewardDate 57 // [TYPE: int] -#define KEY_AwardCherub 58 // [TYPE: int] -#define KEY_AwardCherubLastRewardDate 59 // [TYPE: int] -#define KEY_AwardDignity 60 // [TYPE: int] -#define KEY_AwardDignityLastRewardDate 61 // [TYPE: int] -#define KEY_AwardStalkerFlair 62 // [TYPE: int] -#define KEY_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] -#define KEY_AwardLucky 64 // [TYPE: int] -#define KEY_AwardLuckyLastRewardDate 65 // [TYPE: int] -#define KEY_AwardBlackList 66 // [TYPE: int] -#define KEY_AwardBlackListLastRewardDate 67 // [TYPE: int] -#define KEY_AwardSilentDeath 68 // [TYPE: int] -#define KEY_AwardSilentDeathLastRewardDate 69 // [TYPE: int] -#define KEY_AwardMasscare 10 // [TYPE: int] -#define KEY_AwardMasscareLastRewardDate 11 // [TYPE: int] -#define KEY_AwardParanoia 12 // [TYPE: int] -#define KEY_AwardParanoiaLastRewardDate 13 // [TYPE: int] -#define KEY_AwardOverwhelmingSuperiority 14 // [TYPE: int] -#define KEY_AwardOverwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] -#define KEY_AwardBlitzkrieg 16 // [TYPE: int] -#define KEY_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] -#define KEY_AwardDryVictory 18 // [TYPE: int] -#define KEY_AwardDryVictoryLastRewardDate 19 // [TYPE: int] -#define KEY_AwardMultichampion 20 // [TYPE: int] -#define KEY_AwardMultichampionLastRewardDate 21 // [TYPE: int] -#define KEY_AwardMad 22 // [TYPE: int] -#define KEY_AwardMadLastRewardDate 23 // [TYPE: int] -#define KEY_AwardAchillesHeel 24 // [TYPE: int] -#define KEY_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] -#define KEY_AwardFasterThanBullets 26 // [TYPE: int] -#define KEY_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] -#define KEY_AwardHarvestTime 28 // [TYPE: int] -#define KEY_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] -#define KEY_AwardSkewer 30 // [TYPE: int] -#define KEY_AwardSkewerLastRewardDate 31 // [TYPE: int] -#define KEY_AwardDoubleShotDoubleKill 32 // [TYPE: int] -#define KEY_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] -#define KEY_AwardClimber 34 // [TYPE: int] -#define KEY_AwardClimberLastRewardDate 35 // [TYPE: int] -#define KEY_AwardOpener 36 // [TYPE: int] -#define KEY_AwardOpenerLastRewardDate 37 // [TYPE: int] -#define KEY_AwardToughy 38 // [TYPE: int] -#define KEY_AwardToughyLastRewardDate 39 // [TYPE: int] -#define KEY_AwardInvincibleFury 40 // [TYPE: int] -#define KEY_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] -#define KEY_AwardOculist 42 // [TYPE: int] -#define KEY_AwardOculistLastRewardDate 43 // [TYPE: int] -#define KEY_AwardLightingReflexes 44 // [TYPE: int] -#define KEY_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] -#define KEY_AwardSprinterStopper 46 // [TYPE: int] -#define KEY_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] -#define KEY_AwardMarksMan 48 // [TYPE: int] -#define KEY_AwardMarksManLastRewardDate 49 // [TYPE: int] -#define KEY_AwardPeaceAmbassador 50 // [TYPE: int] -#define KEY_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] -#define KEY_AwardDeadlyAccuracy 52 // [TYPE: int] -#define KEY_BestScore_KillsInRow 3 // [TYPE: int] [DESC: kills in row] -#define KEY_BestScore_KnifeKillsInRow 4 // [TYPE: int] [DESC: knife kills in row] -#define KEY_BestScore_BackstabsKillsInRow 5 // [TYPE: int] [DESC: knife backstabs kills in row] -#define KEY_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] [DESC: headshots kills in row] -#define KEY_BestScore_EyeKillsInRow 7 // [TYPE: int] [DESC: eye kills in row] -#define KEY_BestScore_BleedKillsInRow 8 // [TYPE: int] [DESC: bleed kills in row] -#define KEY_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] [DESC: explosive kills in row] +#define KEY_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] +#define KEY_AwardRemembrance 54 // [TYPE: int] +#define KEY_AwardRemembranceLastRewardDate 55 // [TYPE: int] +#define KEY_AwardAvenger 56 // [TYPE: int] +#define KEY_AwardAvengerLastRewardDate 57 // [TYPE: int] +#define KEY_AwardCherub 58 // [TYPE: int] +#define KEY_AwardCherubLastRewardDate 59 // [TYPE: int] +#define KEY_AwardDignity 60 // [TYPE: int] +#define KEY_AwardDignityLastRewardDate 61 // [TYPE: int] +#define KEY_AwardStalkerFlair 62 // [TYPE: int] +#define KEY_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] +#define KEY_AwardLucky 64 // [TYPE: int] +#define KEY_AwardLuckyLastRewardDate 65 // [TYPE: int] +#define KEY_AwardBlackList 66 // [TYPE: int] +#define KEY_AwardBlackListLastRewardDate 67 // [TYPE: int] +#define KEY_AwardSilentDeath 68 // [TYPE: int] +#define KEY_AwardSilentDeathLastRewardDate 69 // [TYPE: int] +#define KEY_AwardMasscare 10 // [TYPE: int] +#define KEY_AwardMasscareLastRewardDate 11 // [TYPE: int] +#define KEY_AwardParanoia 12 // [TYPE: int] +#define KEY_AwardParanoiaLastRewardDate 13 // [TYPE: int] +#define KEY_AwardOverwhelmingSuperiority 14 // [TYPE: int] +#define KEY_AwardOverwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] +#define KEY_AwardBlitzkrieg 16 // [TYPE: int] +#define KEY_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] +#define KEY_AwardDryVictory 18 // [TYPE: int] +#define KEY_AwardDryVictoryLastRewardDate 19 // [TYPE: int] +#define KEY_AwardMultichampion 20 // [TYPE: int] +#define KEY_AwardMultichampionLastRewardDate 21 // [TYPE: int] +#define KEY_AwardMad 22 // [TYPE: int] +#define KEY_AwardMadLastRewardDate 23 // [TYPE: int] +#define KEY_AwardAchillesHeel 24 // [TYPE: int] +#define KEY_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] +#define KEY_AwardFasterThanBullets 26 // [TYPE: int] +#define KEY_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] +#define KEY_AwardHarvestTime 28 // [TYPE: int] +#define KEY_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] +#define KEY_AwardSkewer 30 // [TYPE: int] +#define KEY_AwardSkewerLastRewardDate 31 // [TYPE: int] +#define KEY_AwardDoubleShotDoubleKill 32 // [TYPE: int] +#define KEY_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] +#define KEY_AwardClimber 34 // [TYPE: int] +#define KEY_AwardClimberLastRewardDate 35 // [TYPE: int] +#define KEY_AwardOpener 36 // [TYPE: int] +#define KEY_AwardOpenerLastRewardDate 37 // [TYPE: int] +#define KEY_AwardToughy 38 // [TYPE: int] +#define KEY_AwardToughyLastRewardDate 39 // [TYPE: int] +#define KEY_AwardInvincibleFury 40 // [TYPE: int] +#define KEY_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] +#define KEY_AwardOculist 42 // [TYPE: int] +#define KEY_AwardOculistLastRewardDate 43 // [TYPE: int] +#define KEY_AwardLightingReflexes 44 // [TYPE: int] +#define KEY_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] +#define KEY_AwardSprinterStopper 46 // [TYPE: int] +#define KEY_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] +#define KEY_AwardMarksMan 48 // [TYPE: int] +#define KEY_AwardMarksManLastRewardDate 49 // [TYPE: int] +#define KEY_AwardPeaceAmbassador 50 // [TYPE: int] +#define KEY_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] +#define KEY_AwardDeadlyAccuracy 52 // [TYPE: int] +#define KEY_BestScore_KillsInRow 3 // [TYPE: int] [DESC: kills in row] +#define KEY_BestScore_KnifeKillsInRow 4 // [TYPE: int] [DESC: knife kills in row] +#define KEY_BestScore_BackstabsKillsInRow 5 // [TYPE: int] [DESC: knife backstabs kills in row] +#define KEY_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] [DESC: headshots kills in row] +#define KEY_BestScore_EyeKillsInRow 7 // [TYPE: int] [DESC: eye kills in row] +#define KEY_BestScore_BleedKillsInRow 8 // [TYPE: int] [DESC: bleed kills in row] +#define KEY_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] [DESC: explosive kills in row] /////////////////////////////////////////////////////////////////////////////// // STATS // Use these stat ID's to query aggregate statistics for your game. -#define STAT_AwardAchillesHeel 24 // [TYPE: int] -#define STAT_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] -#define STAT_AwardAvenger 56 // [TYPE: int] -#define STAT_AwardAvengerLastRewardDate 57 // [TYPE: int] -#define STAT_AwardBlackList 66 // [TYPE: int] -#define STAT_AwardBlackListLastRewardDate 67 // [TYPE: int] -#define STAT_AwardBlitzkrieg 16 // [TYPE: int] -#define STAT_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] -#define STAT_AwardCherub 58 // [TYPE: int] -#define STAT_AwardCherubLastRewardDate 59 // [TYPE: int] -#define STAT_AwardClimber 34 // [TYPE: int] -#define STAT_AwardClimberLastRewardDate 35 // [TYPE: int] -#define STAT_AwardDeadlyAccuracy 52 // [TYPE: int] -#define STAT_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] -#define STAT_AwardDignity 60 // [TYPE: int] -#define STAT_AwardDignityLastRewardDate 61 // [TYPE: int] -#define STAT_AwardDoubleShotDoubleKill 32 // [TYPE: int] -#define STAT_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] -#define STAT_AwardDryVictory 18 // [TYPE: int] -#define STAT_AwardDryVictoryLastRewardDate 19 // [TYPE: int] -#define STAT_AwardFasterThanBullets 26 // [TYPE: int] -#define STAT_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] -#define STAT_AwardHarvestTime 28 // [TYPE: int] -#define STAT_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] -#define STAT_AwardInvincibleFury 40 // [TYPE: int] -#define STAT_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] -#define STAT_AwardLightingReflexes 44 // [TYPE: int] -#define STAT_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] -#define STAT_AwardLucky 64 // [TYPE: int] -#define STAT_AwardLuckyLastRewardDate 65 // [TYPE: int] -#define STAT_AwardMad 22 // [TYPE: int] -#define STAT_AwardMadLastRewardDate 23 // [TYPE: int] -#define STAT_AwardMarksman 48 // [TYPE: int] -#define STAT_AwardMarksmanLastRewardDate 49 // [TYPE: int] -#define STAT_AwardMasscare 10 // [TYPE: int] -#define STAT_AwardMasscareLastRewardDate 11 // [TYPE: int] -#define STAT_AwardMultichampion 20 // [TYPE: int] -#define STAT_AwardMultichampionLastRewardDate 21 // [TYPE: int] -#define STAT_AwardOculist 42 // [TYPE: int] -#define STAT_AwardOculistLastRewardDate 43 // [TYPE: int] -#define STAT_AwardOpener 36 // [TYPE: int] -#define STAT_AwardOpenerLastRewardDate 37 // [TYPE: int] -#define STAT_AwardOwerwhelmingSuperiority 14 // [TYPE: int] -#define STAT_AwardOwerwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] -#define STAT_AwardParanoia 12 // [TYPE: int] -#define STAT_AwardParanoiaLastRewardDate 13 // [TYPE: int] -#define STAT_AwardPeaceAmbassador 50 // [TYPE: int] -#define STAT_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] -#define STAT_AwardRemembrance 54 // [TYPE: int] -#define STAT_AwardRemembranceLastRewardDate 55 // [TYPE: int] -#define STAT_AwardSilentDeath 68 // [TYPE: int] -#define STAT_AwardSilentDeathLastRewardDate 69 // [TYPE: int] -#define STAT_AwardSkewer 30 // [TYPE: int] -#define STAT_AwardSkewerLastRewardDate 31 // [TYPE: int] -#define STAT_AwardSprinterStopper 46 // [TYPE: int] -#define STAT_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] -#define STAT_AwardStalkerFlair 62 // [TYPE: int] -#define STAT_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] -#define STAT_AwardToughy 38 // [TYPE: int] -#define STAT_AwardToughyLastRewardDate 39 // [TYPE: int] -#define STAT_BestScore_BackstabsKillsInRow 5 // [TYPE: int] -#define STAT_BestScore_BleedKillsInRow 8 // [TYPE: int] -#define STAT_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] -#define STAT_BestScore_EyeKillsInRow 7 // [TYPE: int] -#define STAT_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] -#define STAT_BestScore_KillsInRow 3 // [TYPE: int] -#define STAT_BestScore_KnifeKillsInRow 4 // [TYPE: int] +#define STAT_AwardAchillesHeel 24 // [TYPE: int] +#define STAT_AwardAchillesHeelLastRewardDate 25 // [TYPE: int] +#define STAT_AwardAvenger 56 // [TYPE: int] +#define STAT_AwardAvengerLastRewardDate 57 // [TYPE: int] +#define STAT_AwardBlackList 66 // [TYPE: int] +#define STAT_AwardBlackListLastRewardDate 67 // [TYPE: int] +#define STAT_AwardBlitzkrieg 16 // [TYPE: int] +#define STAT_AwardBlitzkriegLastRewardDate 17 // [TYPE: int] +#define STAT_AwardCherub 58 // [TYPE: int] +#define STAT_AwardCherubLastRewardDate 59 // [TYPE: int] +#define STAT_AwardClimber 34 // [TYPE: int] +#define STAT_AwardClimberLastRewardDate 35 // [TYPE: int] +#define STAT_AwardDeadlyAccuracy 52 // [TYPE: int] +#define STAT_AwardDeadlyAccuracyLastRewardDate 53 // [TYPE: int] +#define STAT_AwardDignity 60 // [TYPE: int] +#define STAT_AwardDignityLastRewardDate 61 // [TYPE: int] +#define STAT_AwardDoubleShotDoubleKill 32 // [TYPE: int] +#define STAT_AwardDoubleShotDoubleKillLastRewardDate 33 // [TYPE: int] +#define STAT_AwardDryVictory 18 // [TYPE: int] +#define STAT_AwardDryVictoryLastRewardDate 19 // [TYPE: int] +#define STAT_AwardFasterThanBullets 26 // [TYPE: int] +#define STAT_AwardFasterThanBulletsLastRewardDate 27 // [TYPE: int] +#define STAT_AwardHarvestTime 28 // [TYPE: int] +#define STAT_AwardHarvestTimeLastRewardDate 29 // [TYPE: int] +#define STAT_AwardInvincibleFury 40 // [TYPE: int] +#define STAT_AwardInvincibleFuryLastRewardDate 41 // [TYPE: int] +#define STAT_AwardLightingReflexes 44 // [TYPE: int] +#define STAT_AwardLightingReflexesLastRewardDate 45 // [TYPE: int] +#define STAT_AwardLucky 64 // [TYPE: int] +#define STAT_AwardLuckyLastRewardDate 65 // [TYPE: int] +#define STAT_AwardMad 22 // [TYPE: int] +#define STAT_AwardMadLastRewardDate 23 // [TYPE: int] +#define STAT_AwardMarksman 48 // [TYPE: int] +#define STAT_AwardMarksmanLastRewardDate 49 // [TYPE: int] +#define STAT_AwardMasscare 10 // [TYPE: int] +#define STAT_AwardMasscareLastRewardDate 11 // [TYPE: int] +#define STAT_AwardMultichampion 20 // [TYPE: int] +#define STAT_AwardMultichampionLastRewardDate 21 // [TYPE: int] +#define STAT_AwardOculist 42 // [TYPE: int] +#define STAT_AwardOculistLastRewardDate 43 // [TYPE: int] +#define STAT_AwardOpener 36 // [TYPE: int] +#define STAT_AwardOpenerLastRewardDate 37 // [TYPE: int] +#define STAT_AwardOwerwhelmingSuperiority 14 // [TYPE: int] +#define STAT_AwardOwerwhelmingSuperiorityLastRewardDate 15 // [TYPE: int] +#define STAT_AwardParanoia 12 // [TYPE: int] +#define STAT_AwardParanoiaLastRewardDate 13 // [TYPE: int] +#define STAT_AwardPeaceAmbassador 50 // [TYPE: int] +#define STAT_AwardPeaceAmbassadorLastRewardDate 51 // [TYPE: int] +#define STAT_AwardRemembrance 54 // [TYPE: int] +#define STAT_AwardRemembranceLastRewardDate 55 // [TYPE: int] +#define STAT_AwardSilentDeath 68 // [TYPE: int] +#define STAT_AwardSilentDeathLastRewardDate 69 // [TYPE: int] +#define STAT_AwardSkewer 30 // [TYPE: int] +#define STAT_AwardSkewerLastRewardDate 31 // [TYPE: int] +#define STAT_AwardSprinterStopper 46 // [TYPE: int] +#define STAT_AwardSprinterStopperLastRewardDate 47 // [TYPE: int] +#define STAT_AwardStalkerFlair 62 // [TYPE: int] +#define STAT_AwardStalkerFlairLastRewardDate 63 // [TYPE: int] +#define STAT_AwardToughy 38 // [TYPE: int] +#define STAT_AwardToughyLastRewardDate 39 // [TYPE: int] +#define STAT_BestScore_BackstabsKillsInRow 5 // [TYPE: int] +#define STAT_BestScore_BleedKillsInRow 8 // [TYPE: int] +#define STAT_BestScore_ExplosiveKillsInRow 9 // [TYPE: int] +#define STAT_BestScore_EyeKillsInRow 7 // [TYPE: int] +#define STAT_BestScore_HeadshotsKillsInRow 6 // [TYPE: int] +#define STAT_BestScore_KillsInRow 3 // [TYPE: int] +#define STAT_BestScore_KnifeKillsInRow 4 // [TYPE: int] #ifdef __cplusplus } #endif -#endif // _ATLAS_STALKERCS_V1_H_ +#endif // _ATLAS_STALKERCS_V1_H_ diff --git a/src/xrGame/atlas_submit_queue.cpp b/src/xrGame/atlas_submit_queue.cpp index ffeaa5997e5..5769cef074f 100644 --- a/src/xrGame/atlas_submit_queue.cpp +++ b/src/xrGame/atlas_submit_queue.cpp @@ -52,7 +52,7 @@ void atlas_submit_queue::submit_reward(gamespy_profile::enum_awards_t const awar submit_task tmp_task; tmp_task.m_data_type = submit_task::edt_award_id; tmp_task.m_award_id = award_id; - tmp_task.m_awards_count = tmp_iter->second.m_count; //+1 was on quick_reward_with_award + tmp_task.m_awards_count = tmp_iter->second.m_count; //+1 was on quick_reward_with_award m_reward_tasks.push_back(tmp_task); update(); diff --git a/src/xrGame/atlas_submit_queue.h b/src/xrGame/atlas_submit_queue.h index ae65a437bb3..ed08e1257a9 100644 --- a/src/xrGame/atlas_submit_queue.h +++ b/src/xrGame/atlas_submit_queue.h @@ -40,7 +40,7 @@ class atlas_submit_queue : private Noncopyable gamespy_profile::enum_awards_t m_award_id; u32 m_awards_count; // gamespy_profile::all_best_scores_t* m_best_scores_ptr; - }; // struct submit_task + }; // struct submit_task typedef xr_deque reward_tasks_t; reward_tasks_t m_reward_tasks; gamespy_profile::all_best_scores_t m_best_results_to_submit; @@ -56,6 +56,6 @@ class atlas_submit_queue : private Noncopyable bool m_atlas_in_process; void __stdcall atlas_submitted(bool result, char const* err_string); -}; // class atlas_submit_quque +}; // class atlas_submit_quque -#endif //#ifndef ATLAS_SUBMIT_QUEUE_INCLUDED \ No newline at end of file +#endif //#ifndef ATLAS_SUBMIT_QUEUE_INCLUDED \ No newline at end of file diff --git a/src/xrGame/attachable_item.cpp b/src/xrGame/attachable_item.cpp index fbcef943fc2..7ddfbb01fb7 100644 --- a/src/xrGame/attachable_item.cpp +++ b/src/xrGame/attachable_item.cpp @@ -212,4 +212,4 @@ void attach_draw_adjust_mode() xr_sprintf(_text, "attach_angle_offset IS [%3.3f][%3.3f][%3.3f]", _ang.x, _ang.y, _ang.z); F->OutNext(_text); } -#endif // #ifdef DEBUG \ No newline at end of file +#endif // #ifdef DEBUG \ No newline at end of file diff --git a/src/xrGame/attachment_owner.cpp b/src/xrGame/attachment_owner.cpp index 535b6033c4c..0c6bb50908c 100644 --- a/src/xrGame/attachment_owner.cpp +++ b/src/xrGame/attachment_owner.cpp @@ -87,7 +87,7 @@ void CAttachmentOwner::attach(CInventoryItem* inventory_item) for (; I != E; ++I) { if ((*I)->item().object().ID() == inventory_item->object().ID()) - return; // already attached, fake, I'll repair It + return; // already attached, fake, I'll repair It // VERIFY ((*I)->ID() != inventory_item->object().ID()); } diff --git a/src/xrGame/awards_store.cpp b/src/xrGame/awards_store.cpp index b3175d18037..54c8efcf6b2 100644 --- a/src/xrGame/awards_store.cpp +++ b/src/xrGame/awards_store.cpp @@ -90,7 +90,7 @@ all_awards_t& awards_store::get_player_awards() bool awards_store::is_sake_equal_to_file() const { VERIFY(!m_ltx_awards_result.empty()); - if (m_ltx_awards_result.empty()) return true; // unknown + if (m_ltx_awards_result.empty()) return true; // unknown for (all_awards_t::const_iterator i = m_ltx_awards_result.begin(), ie = m_ltx_awards_result.end(); i != ie; ++i) { @@ -118,7 +118,7 @@ void awards_store::process_award(SAKEField* award_params) void awards_store::process_aw_out_response(SAKEGetMyRecordsOutput* tmp_out, int const out_fields_count) { - VERIFY(tmp_out->mNumRecords <= 1); // one raw + VERIFY(tmp_out->mNumRecords <= 1); // one raw if (tmp_out->mNumRecords == 0) return; for (int i = 0; i < out_fields_count; ++i) @@ -147,4 +147,4 @@ void __cdecl awards_store::get_my_awards_cb( my_inst->m_award_operation_cb.clear(); } -} // namespace gamespy_profile +} // namespace gamespy_profile diff --git a/src/xrGame/awards_store.h b/src/xrGame/awards_store.h index 37f5457e7fe..a9ca5745c9e 100644 --- a/src/xrGame/awards_store.h +++ b/src/xrGame/awards_store.h @@ -47,8 +47,8 @@ class awards_store : Noncopyable static void __cdecl get_my_awards_cb( SAKE sake, SAKERequest request, SAKERequestResult result, void* inputData, void* outputData, void* userData); -}; // class award_system +}; // class award_system -} // namespace gamespy_profile +} // namespace gamespy_profile -#endif //#ifndef AWARD_SYSTEM_INCLUDED \ No newline at end of file +#endif //#ifndef AWARD_SYSTEM_INCLUDED \ No newline at end of file diff --git a/src/xrGame/battleye_system.cpp b/src/xrGame/battleye_system.cpp index fd7535fa6b9..d28f81046b3 100644 --- a/src/xrGame/battleye_system.cpp +++ b/src/xrGame/battleye_system.cpp @@ -73,7 +73,7 @@ bool BattlEyeSystem::ReloadServerDLL(xrServer* xr_server) } server = xr_new(xr_server); - if (server->IsLoaded()) // (1) if loaded from BEServer.dll (new version) + if (server->IsLoaded()) // (1) if loaded from BEServer.dll (new version) { server->AddConnectedPlayers(); if (!DeleteFile(old_file_name)) { @@ -96,7 +96,7 @@ bool BattlEyeSystem::ReloadServerDLL(xrServer* xr_server) } server = xr_new(xr_server); - if (server->IsLoaded()) // (2) if loaded from BEServer.dll (prev version) + if (server->IsLoaded()) // (2) if loaded from BEServer.dll (prev version) { server->AddConnectedPlayers(); return true; @@ -130,7 +130,7 @@ bool BattlEyeSystem::ReloadClientDLL() } client = xr_new(); - if (client->IsLoaded()) // (1) if loaded from BEClient.dll (new version) + if (client->IsLoaded()) // (1) if loaded from BEClient.dll (new version) { if (!DeleteFile(old_file_name)) { Msg("! Could not delete old %s", old_file_name); @@ -152,7 +152,7 @@ bool BattlEyeSystem::ReloadClientDLL() } client = xr_new(); - if (client->IsLoaded()) // (2) if loaded from BEClient.dll (prev version) + if (client->IsLoaded()) // (2) if loaded from BEClient.dll (prev version) { return true; } @@ -252,10 +252,10 @@ bool BattlEyeSystem::TestLoadClient() { m_test_load_client = false; if (g_dedicated_server) { - return true; // false = Error + return true; // false = Error } - if (LoadClient()) // test load + if (LoadClient()) // test load { xr_delete(client); client = NULL; @@ -332,4 +332,4 @@ bool BattlEyeSystem::InitDLL(LPCSTR dll_name, string_path& out_file) return true; } -#endif // BATTLEYE +#endif // BATTLEYE diff --git a/src/xrGame/battleye_system.h b/src/xrGame/battleye_system.h index d3bf7b8a7fd..2be272cd16e 100644 --- a/src/xrGame/battleye_system.h +++ b/src/xrGame/battleye_system.h @@ -57,8 +57,8 @@ class BattlEyeSystem //- int auto_update; -}; // class BattlEyeSystem +}; // class BattlEyeSystem -#endif // BATTLEYE +#endif // BATTLEYE -#endif // XR_BATTLEYE_H_INCLUDED +#endif // XR_BATTLEYE_H_INCLUDED diff --git a/src/xrGame/best_scores_helper.cpp b/src/xrGame/best_scores_helper.cpp index 2ad67cd5444..ee1f2ed38ad 100644 --- a/src/xrGame/best_scores_helper.cpp +++ b/src/xrGame/best_scores_helper.cpp @@ -125,10 +125,10 @@ bool best_scores_helper::OnPlayerKilled( case SKT_EYESHOT: { ++m_eyeshots_kills_in_row; } break; - }; // switch (kill_type.second) + }; // switch (kill_type.second) ++m_kills_in_row; return false; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/best_scores_helper.h b/src/xrGame/best_scores_helper.h index d882ea097e4..81551620fca 100644 --- a/src/xrGame/best_scores_helper.h +++ b/src/xrGame/best_scores_helper.h @@ -58,8 +58,8 @@ class best_scores_helper : public reward_event_handler void reset_stats(); void reset_max(); void write_max(); -}; // class best_scores_helper +}; // class best_scores_helper -} // namespace award_system +} // namespace award_system -#endif //#ifndef BEST_SCORES_HELPER_INCLUDED \ No newline at end of file +#endif //#ifndef BEST_SCORES_HELPER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/best_scores_store.cpp b/src/xrGame/best_scores_store.cpp index d39b95ba8f0..3b0084ee8cf 100644 --- a/src/xrGame/best_scores_store.cpp +++ b/src/xrGame/best_scores_store.cpp @@ -121,7 +121,7 @@ void __cdecl best_scores_store::get_my_player_scores_cb( void best_scores_store::process_scores_out_response(SAKEGetMyRecordsOutput* tmp_out, int const out_fields_count) { - VERIFY(tmp_out->mNumRecords <= 1); // one raw + VERIFY(tmp_out->mNumRecords <= 1); // one raw if (tmp_out->mNumRecords == 0) { for (int i = 0; i < bst_score_types_count; ++i) { @@ -134,9 +134,9 @@ void best_scores_store::process_scores_out_response(SAKEGetMyRecordsOutput* tmp_ { enum_best_score_type bst = get_best_score_type_by_sname(tmp_out->mRecords[0][i].mName); if (bst == bst_score_types_count) continue; - s32 bs_value = tmp_out->mRecords[0][i].mValue.mInt; // one raw + s32 bs_value = tmp_out->mRecords[0][i].mValue.mInt; // one raw m_result_scores.insert(std::make_pair(bst, bs_value)); }; } -} // namespace gamespy_profile \ No newline at end of file +} // namespace gamespy_profile \ No newline at end of file diff --git a/src/xrGame/best_scores_store.h b/src/xrGame/best_scores_store.h index 93252a51d34..131f9851a7d 100644 --- a/src/xrGame/best_scores_store.h +++ b/src/xrGame/best_scores_store.h @@ -47,8 +47,8 @@ class best_scores_store static void __cdecl get_my_player_scores_cb( SAKE sake, SAKERequest request, SAKERequestResult result, void* inputData, void* outputData, void* userData); -}; // best_scores_store +}; // best_scores_store -} // namespace gamespy_profile +} // namespace gamespy_profile -#endif //#ifndef BEST_SCORES_SYSTEM_INCLUDED \ No newline at end of file +#endif //#ifndef BEST_SCORES_SYSTEM_INCLUDED \ No newline at end of file diff --git a/src/xrGame/black_list.cpp b/src/xrGame/black_list.cpp index 4a638e77371..83ef901b8ee 100644 --- a/src/xrGame/black_list.cpp +++ b/src/xrGame/black_list.cpp @@ -41,4 +41,4 @@ void black_list::OnPlayerSpawned(game_PlayerState const* ps) } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/black_list.h b/src/xrGame/black_list.h index 50c30250613..79a6f3b9255 100644 --- a/src/xrGame/black_list.h +++ b/src/xrGame/black_list.h @@ -26,12 +26,12 @@ class black_list : public player_state_param protected: // data of the vector is u32 - kill time AssociativeVector m_victims; -}; // class black_list +}; // class black_list ADD_ACCUMULATIVE_STATE(acpv_black_list, black_list); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_black_list, black_list) -} // namespace award_system +} // namespace award_system -#endif //#ifndef BLACK_LIST_INCLUDED \ No newline at end of file +#endif //#ifndef BLACK_LIST_INCLUDED \ No newline at end of file diff --git a/src/xrGame/bone_groups.cpp b/src/xrGame/bone_groups.cpp index 878cfa3c111..aebf0487c3f 100644 --- a/src/xrGame/bone_groups.cpp +++ b/src/xrGame/bone_groups.cpp @@ -41,4 +41,4 @@ bool bone_group::is_bone_in_group(u16 bone_id, enum_group_id gid) const return (tmp_iter->second == gid); } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/bone_groups.h b/src/xrGame/bone_groups.h index 36d8afda992..4f44b6fa1c1 100644 --- a/src/xrGame/bone_groups.h +++ b/src/xrGame/bone_groups.h @@ -15,7 +15,7 @@ class bone_group gid_head = 0x00, gid_eyes, gid_spine, - }; // enum enum_group_id + }; // enum enum_group_id static u16 const gid_any = u16(-1); bone_group(); @@ -28,8 +28,8 @@ class bone_group typedef AssociativeVector bone_groups_map_t; bone_groups_map_t m_bone_groups; -}; // class bone_group +}; // class bone_group -} // namespace award_system +} // namespace award_system -#endif //#ifndef BONE_GROUP_INCLUDED \ No newline at end of file +#endif //#ifndef BONE_GROUP_INCLUDED \ No newline at end of file diff --git a/src/xrGame/car_memory.h b/src/xrGame/car_memory.h index 4abf333478b..1fd7a0eb11f 100644 --- a/src/xrGame/car_memory.h +++ b/src/xrGame/car_memory.h @@ -38,4 +38,4 @@ class car_memory : public vision_client void set_camera(const Fvector& position, const Fvector& direction, const Fvector& normal); }; -#endif // CAR_MEMORY_H \ No newline at end of file +#endif // CAR_MEMORY_H \ No newline at end of file diff --git a/src/xrGame/cdkey_ban_list.h b/src/xrGame/cdkey_ban_list.h index 1958ba9378c..714c71b9a3a 100644 --- a/src/xrGame/cdkey_ban_list.h +++ b/src/xrGame/cdkey_ban_list.h @@ -30,7 +30,7 @@ class cdkey_ban_list ip_address admin_ip_addr; shared_str admin_name; - shared_str admin_hexstr_digest; // ;) gg, for bad admins + shared_str admin_hexstr_digest; // ;) gg, for bad admins banned_client(); bool load(CInifile* ini, shared_str const& name_sect); @@ -40,6 +40,6 @@ class cdkey_ban_list typedef xr_vector ban_list_t; ban_list_t m_ban_list; -}; // class cdkey_ban_list +}; // class cdkey_ban_list -#endif //#ifndef CDKEY_BAN_LIST_H +#endif //#ifndef CDKEY_BAN_LIST_H diff --git a/src/xrGame/character_hit_animations.cpp b/src/xrGame/character_hit_animations.cpp index f3210d5ce0e..014afafe2a0 100644 --- a/src/xrGame/character_hit_animations.cpp +++ b/src/xrGame/character_hit_animations.cpp @@ -39,10 +39,10 @@ void character_hit_animation_controller::SetupHitMotions(IKinematicsAnimated& ca */ if (tune_hit_anims) g_params = ghit_anims_params; - bkhit_motion = ca.LL_MotionID("hitback17"); // hitback2.skl + bkhit_motion = ca.LL_MotionID("hitback17"); // hitback2.skl fvhit_motion = ca.LL_MotionID("hitfront17"); - rthit_motion = ca.LL_MotionID("hitf_right17"); // hitright - lthit_motion = ca.LL_MotionID("hitf_left17"); // hitleft + rthit_motion = ca.LL_MotionID("hitf_right17"); // hitright + lthit_motion = ca.LL_MotionID("hitf_left17"); // hitleft turn_right = ca.LL_MotionID("hit_right_shoulder17"); turn_left = ca.LL_MotionID("hit_left_shoulder17"); @@ -51,7 +51,7 @@ void character_hit_animation_controller::SetupHitMotions(IKinematicsAnimated& ca hit_downl = ca.LL_MotionID("hit_downl"); hit_downr = ca.LL_MotionID("hit_downr"); - base_bone = smart_cast(&ca)->LL_BoneID("bip01_spine1"); // bip01_spine1 + base_bone = smart_cast(&ca)->LL_BoneID("bip01_spine1"); // bip01_spine1 for (u16 i = 0; num_anims > i; ++i) block_blends[i] = 0; } @@ -115,7 +115,7 @@ void character_hit_animation_controller::PlayHitMotion( hit_point.x = 0; float rotational_ammount = - hit_point.magnitude() * g_params.power_factor * g_params.rotational_power_factor; //_abs(torqu.x) + hit_point.magnitude() * g_params.power_factor * g_params.rotational_power_factor; //_abs(torqu.x) if (torqu.x < 0) play_cycle(CA, hit_downr, 3, block_blends[7], 1); diff --git a/src/xrGame/character_hit_animations_params.h b/src/xrGame/character_hit_animations_params.h index f1cc33b389b..7934d750bb3 100644 --- a/src/xrGame/character_hit_animations_params.h +++ b/src/xrGame/character_hit_animations_params.h @@ -3,7 +3,7 @@ struct hit_animation_global_params { hit_animation_global_params(); - float power_factor; // 2.f; + float power_factor; // 2.f; float rotational_power_factor; float side_sensitivity_threshold; float anim_channel_factor; diff --git a/src/xrGame/character_shell_control.cpp b/src/xrGame/character_shell_control.cpp index 85c171829fc..9185d678a7c 100644 --- a/src/xrGame/character_shell_control.cpp +++ b/src/xrGame/character_shell_control.cpp @@ -13,7 +13,7 @@ #ifdef DEBUG extern BOOL death_anim_debug; -#endif // DEBUG +#endif // DEBUG character_shell_control::character_shell_control() : m_shot_up_factor(0.f), m_after_death_velocity_factor(1.f), m_was_wounded(false), m_Pred_Time(0.0) diff --git a/src/xrGame/character_shell_control.h b/src/xrGame/character_shell_control.h index 0f2559aa7b9..bbe2354d528 100644 --- a/src/xrGame/character_shell_control.h +++ b/src/xrGame/character_shell_control.h @@ -40,7 +40,7 @@ class character_shell_control float skeleton_skin_ddelay_after_wound; float skeleton_skin_remain_time_after_wound; - float m_Pred_Time; //Для вычисления дельта времени между пересчётами сопротивления в джоинтах и коэффициента NPC + float m_Pred_Time; //Для вычисления дельта времени между пересчётами сопротивления в джоинтах и коэффициента NPC float m_time_delta; float pelvis_factor_low_pose_detect; BOOL character_have_wounded_state; diff --git a/src/xrGame/client_spawn_manager.cpp b/src/xrGame/client_spawn_manager.cpp index 433ac66c979..5e211f825cf 100644 --- a/src/xrGame/client_spawn_manager.cpp +++ b/src/xrGame/client_spawn_manager.cpp @@ -190,7 +190,7 @@ void CClientSpawnManager::dump(ALife::_OBJECT_ID requesting_id) const Msg("! CClientSpawnManager::dump[id %d waits for %d]", requesting_id, (*i).first); } } -#endif // DEBUG +#endif // DEBUG void CClientSpawnManager::clear() { diff --git a/src/xrGame/client_spawn_manager.h b/src/xrGame/client_spawn_manager.h index 6409a0c220c..1484dd1c5a7 100644 --- a/src/xrGame/client_spawn_manager.h +++ b/src/xrGame/client_spawn_manager.h @@ -56,7 +56,7 @@ class CClientSpawnManager IC const REQUEST_REGISTRY& registry() const; void dump() const; void dump(ALife::_OBJECT_ID requesting_id) const; -#endif // DEBUG +#endif // DEBUG }; #include "client_spawn_manager_inline.h" diff --git a/src/xrGame/client_spawn_manager_inline.h b/src/xrGame/client_spawn_manager_inline.h index 26d9c9c5fdc..502e1abc9eb 100644 --- a/src/xrGame/client_spawn_manager_inline.h +++ b/src/xrGame/client_spawn_manager_inline.h @@ -17,4 +17,4 @@ IC const CClientSpawnManager::REQUEST_REGISTRY& CClientSpawnManager::registry() { return (m_registry); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/command_switch_counter.h b/src/xrGame/command_switch_counter.h index c18ef0309b3..c9efea6fc47 100644 --- a/src/xrGame/command_switch_counter.h +++ b/src/xrGame/command_switch_counter.h @@ -21,12 +21,12 @@ class command_switch_counter : public player_state_param virtual void OnPlayerChangeTeam(s8 team) { ++m_counter; }; private: u32 m_counter; -}; // class command_switch_counter +}; // class command_switch_counter ADD_ACCUMULATIVE_STATE(acpv_command_switch_count, command_switch_counter); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_command_switch_count, command_switch_counter) -} // namespace award_system +} // namespace award_system -#endif //#ifndef COMMAND_SWITCH_COUNTER_INCLUDED \ No newline at end of file +#endif //#ifndef COMMAND_SWITCH_COUNTER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/configs_common.cpp b/src/xrGame/configs_common.cpp index f5bdae58588..a1fcb291b36 100644 --- a/src/xrGame/configs_common.cpp +++ b/src/xrGame/configs_common.cpp @@ -12,11 +12,11 @@ u8 const p_number[crypto::xr_dsa::public_key_length] = { 0xf6, 0x8d, 0x89, 0x0c, 0xf2, 0xeb, 0xed, 0x94, 0x92, 0x42, 0x27, 0x59, 0x6c, 0xdc, 0x19, 0x72, 0xa4, 0xd1, 0xc2, 0xe7, 0x49, 0x78, 0xa9, 0x31, 0xf6, 0x72, 0xa3, 0xde, 0x95, 0x97, 0x4c, 0xb3, 0x74, 0xa1, 0xb1, 0x43, 0x31, 0x67, 0x51, 0x54, 0xba, 0x03, 0xa4, 0x9d, 0x9c, 0x10, 0x26, 0xeb, 0x28, 0x42, 0x4e, 0x41, -}; // p_number +}; // p_number u8 const q_number[crypto::xr_dsa::private_key_length] = { 0xfb, 0x9b, 0x74, 0x86, 0xb1, 0x44, 0x2f, 0xb3, 0x66, 0x73, 0xb8, 0x6b, 0x67, 0xe7, 0xd8, 0x6c, 0x0a, 0x16, 0x12, 0xd1, -}; // q_number +}; // q_number u8 const g_number[crypto::xr_dsa::public_key_length] = { 0x1e, 0xd2, 0xb7, 0xd6, 0x6b, 0x3b, 0xbb, 0x7a, 0xb9, 0xca, 0xd7, 0x10, 0x39, 0x40, 0x85, 0xdb, 0x97, 0x20, 0xf2, 0xa4, 0xe6, 0x2f, 0x3d, 0x38, 0x95, 0x0a, 0x0b, 0x50, 0xe0, 0xa3, 0xa9, 0xa8, 0x6d, 0x4c, 0x63, 0x76, 0x82, 0x73, @@ -25,7 +25,7 @@ u8 const g_number[crypto::xr_dsa::public_key_length] = { 0x20, 0xf2, 0x79, 0x05, 0x70, 0x60, 0x1e, 0x27, 0xa4, 0xda, 0xf7, 0x7d, 0xa0, 0x49, 0x02, 0xc0, 0xb4, 0x87, 0xd2, 0xa7, 0x7c, 0xad, 0x88, 0xec, 0x5f, 0xe8, 0x5e, 0xee, 0x61, 0x3d, 0x9e, 0x29, 0x72, 0xb4, 0x16, 0x32, 0x13, 0x9d, 0x83, 0x1e, 0x00, 0x2c, 0xb0, 0x89, 0x30, 0xe3, 0xe6, 0xd4, 0x13, 0x05, 0x7e, 0xf4, -}; // g_number +}; // g_number u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x34, 0x7a, 0xe8, 0x4b, 0x69, 0x50, 0xcb, 0x66, 0xc7, 0xd3, 0xf7, 0x43, 0xc8, 0x6c, 0xd2, 0xc7, 0xdb, 0x0e, 0x4e, 0x45, 0xaf, 0xbf, 0xee, 0x5e, 0x98, 0x09, 0x62, 0x11, 0xde, 0xc6, 0x14, 0xf4, 0xc9, 0x4d, 0x83, 0x07, 0xa3, 0x50, @@ -34,6 +34,6 @@ u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x79, 0x6c, 0x5b, 0xb7, 0x03, 0xf1, 0xae, 0x5b, 0x2b, 0xea, 0x79, 0xc3, 0x2a, 0x91, 0xeb, 0xed, 0x2c, 0x66, 0x6f, 0x46, 0x58, 0xb2, 0x02, 0x28, 0x06, 0x63, 0x75, 0xf8, 0x61, 0x70, 0xdf, 0x5f, 0xf8, 0x47, 0xc5, 0x08, 0x1a, 0x38, 0xf6, 0x1d, 0x8d, 0xee, 0x3f, 0xd9, 0x42, 0x54, 0xb6, 0x64, 0x50, 0xb7, 0x04, 0x73, -}; // public_key +}; // public_key -} // namespace mp_anticheat +} // namespace mp_anticheat diff --git a/src/xrGame/configs_common.h b/src/xrGame/configs_common.h index 479b33c35d7..57c0447897d 100644 --- a/src/xrGame/configs_common.h +++ b/src/xrGame/configs_common.h @@ -10,6 +10,6 @@ extern u8 const q_number[crypto::xr_dsa::private_key_length]; extern u8 const g_number[crypto::xr_dsa::public_key_length]; extern u8 const public_key[crypto::xr_dsa::public_key_length]; -} // namespace mp_anticheat +} // namespace mp_anticheat -#endif // CONFIGS_COMMON_INCLUDED \ No newline at end of file +#endif // CONFIGS_COMMON_INCLUDED \ No newline at end of file diff --git a/src/xrGame/configs_dump_verifyer.cpp b/src/xrGame/configs_dump_verifyer.cpp index f305e9b4f42..36bbf0a6436 100644 --- a/src/xrGame/configs_dump_verifyer.cpp +++ b/src/xrGame/configs_dump_verifyer.cpp @@ -73,7 +73,7 @@ bool const configs_verifyer::verify_dsign(u8* data, u32 data_size, sha_checksum_ shared_str tmp_dsign = tmp_ini.r_string(cd_info_secion, cd_digital_sign_key); xr_strcat(dst_buffer, dst_size, add_str); - src_data_size += xr_strlen(dst_buffer) + 1; // zero ending + src_data_size += xr_strlen(dst_buffer) + 1; // zero ending bool ret = m_verifyer.verify(data, src_data_size, tmp_dsign); if (!ret) return false; @@ -210,4 +210,4 @@ bool const configs_verifyer::verify(u8* data, u32 data_size, string256& diff) return true; } -} // namespace mp_anticheat \ No newline at end of file +} // namespace mp_anticheat \ No newline at end of file diff --git a/src/xrGame/configs_dump_verifyer.h b/src/xrGame/configs_dump_verifyer.h index 74529233582..f11fb6b2dd8 100644 --- a/src/xrGame/configs_dump_verifyer.h +++ b/src/xrGame/configs_dump_verifyer.h @@ -11,7 +11,7 @@ class dump_verifyer : public xr_dsa_verifyer public: dump_verifyer(); ~dump_verifyer(); -}; // class dump_verifyer +}; // class dump_verifyer class configs_verifyer { @@ -32,8 +32,8 @@ class configs_verifyer mp_config_sections m_original_config; mp_active_params m_original_ap; -}; // configs_verifyer +}; // configs_verifyer -} // namespace mp_anticheat +} // namespace mp_anticheat -#endif //#ifndef CONFIGS_DUMP_VERIFYER \ No newline at end of file +#endif //#ifndef CONFIGS_DUMP_VERIFYER \ No newline at end of file diff --git a/src/xrGame/configs_dumper.cpp b/src/xrGame/configs_dumper.cpp index 939aecef6ac..82406ea8ea2 100644 --- a/src/xrGame/configs_dumper.cpp +++ b/src/xrGame/configs_dumper.cpp @@ -31,7 +31,7 @@ configs_dumper::~configs_dumper() { if (m_make_start_event) { SetEvent(m_make_start_event); - WaitForSingleObject(m_make_done_event, INFINITE); // thread stoped + WaitForSingleObject(m_make_done_event, INFINITE); // thread stoped CloseHandle(m_make_done_event); CloseHandle(m_make_start_event); } @@ -59,7 +59,7 @@ struct ExistDumpPredicate if (dump_obj->GetAnticheatSectionName() == section_name) return true; return false; } -}; // struct ExistDumpPredicate +}; // struct ExistDumpPredicate typedef buffer_vector active_objects_t; static active_objects_t::size_type get_active_objects(active_objects_t& dest) @@ -226,7 +226,7 @@ void configs_dumper::dumper_thread(void* my_ptr) DWORD wait_result = WaitForSingleObject(this_ptr->m_make_start_event, INFINITE); while ((wait_result != WAIT_ABANDONED) || (wait_result != WAIT_FAILED)) { - if (!this_ptr->is_active()) break; // error + if (!this_ptr->is_active()) break; // error this_ptr->timer_begin("writing configs"); this_ptr->write_configs(); this_ptr->timer_end(); @@ -276,7 +276,7 @@ void configs_dumper::timer_end() { Msg("* %s : %u ms", m_timer_comment.c_str(), m_debug_timer.GetElapsed_ms()); } -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG // dump_signer @@ -314,4 +314,4 @@ void dump_signer::feel_private_dsa_key() m_private_key.m_value[19] = 0x17; } -} // namespace mp_anticheat \ No newline at end of file +} // namespace mp_anticheat \ No newline at end of file diff --git a/src/xrGame/configs_dumper.h b/src/xrGame/configs_dumper.h index f7354afdb4f..83a5553a210 100644 --- a/src/xrGame/configs_dumper.h +++ b/src/xrGame/configs_dumper.h @@ -51,7 +51,7 @@ class configs_dumper : public ScheduledBase { ds_not_active = 0x00, ds_active = 0x01 - }; // enum_dumper_state + }; // enum_dumper_state void realloc_compress_buffer(u32 need_size); u8* m_buffer_for_compress; @@ -80,8 +80,8 @@ class configs_dumper : public ScheduledBase inline void timer_begin(LPCSTR comment) {} inline void timer_end() {} #endif -}; // class configs_dumper +}; // class configs_dumper -} // namespace mp_anticheat +} // namespace mp_anticheat #endif \ No newline at end of file diff --git a/src/xrGame/console_commands.cpp b/src/xrGame/console_commands.cpp index bf251ec460f..f973c012efe 100644 --- a/src/xrGame/console_commands.cpp +++ b/src/xrGame/console_commands.cpp @@ -49,18 +49,18 @@ #include "ai_debug_variables.h" #include "xrPhysics/console_vars.h" #ifdef DEBUG +#include "CharacterPhysicsSupport.h" +#include "LevelGraphDebugRender.hpp" #include "PHDebug.h" #include "ui/UIDebugFonts.h" #include "xrAICore/Navigation/game_graph.h" -#include "LevelGraphDebugRender.hpp" -#include "CharacterPhysicsSupport.h" -#endif // DEBUG +#endif // DEBUG string_path g_last_saved_game; #ifdef DEBUG extern float air_resistance_epsilon; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG extern void show_smart_cast_stats(); extern void clear_smart_cast_stats(); @@ -81,7 +81,7 @@ extern BOOL net_sv_control_hit; extern int g_dwInputUpdateDelta; #ifdef DEBUG extern BOOL g_ShowAnimationInfo; -#endif // DEBUG +#endif // DEBUG extern BOOL g_bShowHitSectors; // extern BOOL g_bDebugDumpPhysicsStep ; extern ESingleGameDifficulty g_SingleGameDifficulty; @@ -185,7 +185,7 @@ class CCC_MemCheckpoint : public IConsole_Command virtual void Save(IWriter* F) {} }; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // console commands class CCC_GameDifficulty : public CCC_Token { @@ -235,14 +235,14 @@ class CCC_ALifePath : public IConsole_Command // timer.Start (); // float fValue = ai().m_tpAStar->ffFindMinimalPath(id1,id2); // Msg ("* %7.2f[%d] : %11I64u cycles (%.3f - //microseconds)",fValue,ai().m_tpAStar->m_tpaNodes.size(),timer.GetElapsed_ticks(),timer.GetElapsed_ms()*1000.f); + // microseconds)",fValue,ai().m_tpAStar->m_tpaNodes.size(),timer.GetElapsed_ticks(),timer.GetElapsed_ms()*1000.f); } else Msg("! not enough parameters!"); } } }; -#endif // DEBUG +#endif // DEBUG class CCC_ALifeTimeFactor : public IConsole_Command { @@ -445,7 +445,7 @@ class CCC_DemoPlay : public IConsole_Command LPSTR comma = strchr(const_cast(args), ','); if (comma) { loops = atoi(comma + 1); - *comma = 0; //. :) + *comma = 0; //. :) } strconcat(sizeof(fn), fn, args, ".xrdemo"); FS.update_path(fn, "$game_saves$", fn); @@ -574,10 +574,10 @@ class CCC_ALifeSave : public IConsole_Command #ifdef DEBUG Msg("Screenshot overhead : %f milliseconds", timer.GetElapsed_sec() * 1000.f); #endif - } // virtual void Execute + } // virtual void Execute virtual void fill_tips(vecTips& tips, u32 mode) { get_files_list(tips, "$game_saves$", SAVE_EXTENSION); } -}; // CCC_ALifeSave +}; // CCC_ALifeSave class CCC_ALifeLoadFrom : public IConsole_Command { @@ -642,7 +642,7 @@ class CCC_ALifeLoadFrom : public IConsole_Command } virtual void fill_tips(vecTips& tips, u32 mode) { get_files_list(tips, "$game_saves$", SAVE_EXTENSION); } -}; // CCC_ALifeLoadFrom +}; // CCC_ALifeLoadFrom class CCC_LoadLastSave : public IConsole_Command { @@ -849,7 +849,7 @@ class CCC_ScriptDbg : public IConsole_Command xr_strcpy(I, "restarts script debugger or start if no script debugger presents"); } }; -#endif // #if defined(USE_DEBUGGER) && !defined(USE_LUA_STUDIO) +#endif // #if defined(USE_DEBUGGER) && !defined(USE_LUA_STUDIO) #if defined(USE_DEBUGGER) && defined(USE_LUA_STUDIO) class CCC_ScriptLuaStudioConnect : public IConsole_Command @@ -865,7 +865,7 @@ class CCC_ScriptLuaStudioDisconnect : public IConsole_Command CCC_ScriptLuaStudioDisconnect(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = true; }; virtual void Execute(LPCSTR args) { ai().script_engine().disconnect_from_debugger(); }; }; -#endif // #if defined(USE_DEBUGGER) && defined(USE_LUA_STUDIO) +#endif // #if defined(USE_DEBUGGER) && defined(USE_LUA_STUDIO) class CCC_DumpInfos : public IConsole_Command { @@ -1054,7 +1054,7 @@ class CCC_PHGravity : public IConsole_Command S[xr_strlen(S) - 1] = 0; } }; -#endif // DEBUG +#endif // DEBUG class CCC_PHFps : public IConsole_Command { @@ -1205,7 +1205,7 @@ class CCC_ScriptCommand : public IConsole_Command ai().script_engine().print_output(ai().script_engine().lua(), *m_script_name, l_iErrorCode); } - } // void Execute + } // void Execute virtual void Status(TStatus& S) { xr_strcpy(S, " (Specify script and function name!)"); } virtual void Save(IWriter* F) {} @@ -1241,7 +1241,7 @@ class CCC_TimeFactor : public IConsole_Command } }; -#endif // MASTER_GOLD +#endif // MASTER_GOLD #include "GamePersistent.h" @@ -1453,7 +1453,7 @@ class CCC_MemAllocClearStats : public IConsole_Command virtual void Execute(LPCSTR) { mem_alloc_clear_stats(); } }; -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER class CCC_DumpModelBones : public IConsole_Command { @@ -1564,9 +1564,9 @@ class CCC_InvDropAllItems : public IConsole_Command Msg("! ActorMenu is not in state `Inventory`"); } } -}; // CCC_InvDropAllItems +}; // CCC_InvDropAllItems -#endif // DEBUG +#endif // DEBUG class CCC_DumpObjects : public IConsole_Command { @@ -1660,7 +1660,7 @@ void CCC_RegisterCommands() CMD1(CCC_MemStats, "stat_memory"); #ifdef DEBUG CMD1(CCC_MemCheckpoint, "stat_memory_checkpoint"); -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG // game CMD3(CCC_Mask, "g_crouch_toggle", &psActorFlags, AF_CROUCH_TOGGLE); CMD1(CCC_GameDifficulty, "g_game_difficulty"); @@ -1669,24 +1669,24 @@ void CCC_RegisterCommands() // alife #ifdef DEBUG - CMD1(CCC_ALifePath, "al_path"); // build path + CMD1(CCC_ALifePath, "al_path"); // build path -#endif // DEBUG +#endif // DEBUG - CMD1(CCC_ALifeSave, "save"); // save game - CMD1(CCC_ALifeLoadFrom, "load"); // load game from ... - CMD1(CCC_LoadLastSave, "load_last_save"); // load last saved game from ... + CMD1(CCC_ALifeSave, "save"); // save game + CMD1(CCC_ALifeLoadFrom, "load"); // load game from ... + CMD1(CCC_LoadLastSave, "load_last_save"); // load last saved game from ... - CMD1(CCC_FlushLog, "flush"); // flush log + CMD1(CCC_FlushLog, "flush"); // flush log CMD1(CCC_ClearLog, "clear_log"); #ifndef MASTER_GOLD - CMD1(CCC_ALifeTimeFactor, "al_time_factor"); // set time factor - CMD1(CCC_ALifeSwitchDistance, "al_switch_distance"); // set switch distance - CMD1(CCC_ALifeProcessTime, "al_process_time"); // set process time - CMD1(CCC_ALifeObjectsPerUpdate, "al_objects_per_update"); // set process time - CMD1(CCC_ALifeSwitchFactor, "al_switch_factor"); // set switch factor -#endif // #ifndef MASTER_GOLD + CMD1(CCC_ALifeTimeFactor, "al_time_factor"); // set time factor + CMD1(CCC_ALifeSwitchDistance, "al_switch_distance"); // set switch distance + CMD1(CCC_ALifeProcessTime, "al_process_time"); // set process time + CMD1(CCC_ALifeObjectsPerUpdate, "al_objects_per_update"); // set process time + CMD1(CCC_ALifeSwitchFactor, "al_switch_factor"); // set switch factor +#endif // #ifndef MASTER_GOLD CMD3(CCC_Mask, "hud_weapon", &psHUD_Flags, HUD_WEAPON); CMD3(CCC_Mask, "hud_info", &psHUD_Flags, HUD_INFO); @@ -1704,14 +1704,14 @@ void CCC_RegisterCommands() #ifdef DEBUG CMD4(CCC_Float, "hud_fov", &psHUD_FOV, 0.1f, 1.0f); CMD4(CCC_Float, "fov", &g_fov, 5.0f, 180.0f); -#endif // DEBUG +#endif // DEBUG // Demo -#if 1 // ndef MASTER_GOLD +#if 1 // ndef MASTER_GOLD CMD1(CCC_DemoPlay, "demo_play"); CMD1(CCC_DemoRecord, "demo_record"); CMD1(CCC_DemoRecordSetPos, "demo_set_cam_position"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD #ifndef MASTER_GOLD // ai @@ -1725,7 +1725,7 @@ void CCC_RegisterCommands() CMD3(CCC_Mask, "mt_level_sounds", &g_mt_config, mtLevelSounds); CMD3(CCC_Mask, "mt_alife", &g_mt_config, mtALife); CMD3(CCC_Mask, "mt_map", &g_mt_config, mtMap); -#endif // MASTER_GOLD +#endif // MASTER_GOLD #ifndef MASTER_GOLD CMD3(CCC_Mask, "ai_obstacles_avoiding", &psAI_Flags, aiObstaclesAvoiding); @@ -1734,7 +1734,7 @@ void CCC_RegisterCommands() CMD3(CCC_Mask, "ai_use_smart_covers_animation_slots", &psAI_Flags, (u32)aiUseSmartCoversAnimationSlot); CMD4(CCC_Float, "ai_smart_factor", &g_smart_cover_factor, 0.f, 1000000.f); CMD3(CCC_Mask, "lua_debug", &g_LuaDebug, 1); -#endif // MASTER_GOLD +#endif // MASTER_GOLD #ifdef DEBUG CMD4(CCC_Integer, "lua_gcstep", &psLUA_GCSTEP, 1, 1000); @@ -1793,7 +1793,7 @@ void CCC_RegisterCommands() CMD4(CCC_Float, "debug_on_frame_gather_stats_frequency", &debug_on_frame_gather_stats_frequency, 0.f, 1.f); CMD1(CCC_MemAllocShowStats, "debug_on_frame_show_stats"); CMD1(CCC_MemAllocClearStats, "debug_on_frame_clear_stats"); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER CMD1(CCC_DumpModelBones, "debug_dump_model_bones"); @@ -1808,23 +1808,23 @@ void CCC_RegisterCommands() CMD1(CCC_ScriptDbg, "script_debug_break"); CMD1(CCC_ScriptDbg, "script_debug_stop"); CMD1(CCC_ScriptDbg, "script_debug_restart"); -#endif // #if defined(USE_DEBUGGER) && !defined(USE_LUA_STUDIO) +#endif // #if defined(USE_DEBUGGER) && !defined(USE_LUA_STUDIO) #if defined(USE_DEBUGGER) && defined(USE_LUA_STUDIO) CMD1(CCC_ScriptLuaStudioConnect, "lua_studio_connect"); CMD1(CCC_ScriptLuaStudioDisconnect, "lua_studio_disconnect"); -#endif // #if defined(USE_DEBUGGER) && defined(USE_LUA_STUDIO) +#endif // #if defined(USE_DEBUGGER) && defined(USE_LUA_STUDIO) CMD1(CCC_ShowMonsterInfo, "ai_monster_info"); CMD1(CCC_DebugFonts, "debug_fonts"); CMD1(CCC_TuneAttachableItem, "dbg_adjust_attachable_item"); CMD1(CCC_ShowAnimationStats, "ai_show_animation_stats"); -#endif // DEBUG +#endif // DEBUG #ifndef MASTER_GOLD CMD3(CCC_Mask, "ai_ignore_actor", &psAI_Flags, aiIgnoreActor); -#endif // MASTER_GOLD +#endif // MASTER_GOLD // Physics CMD1(CCC_PHFps, "ph_frequency"); @@ -1838,7 +1838,7 @@ void CCC_RegisterCommands() CMD4(CCC_Integer, "ph_tri_clear_disable_count", &ph_console::ph_tri_clear_disable_count, 0, 255); CMD4(CCC_FloatBlock, "ph_tri_query_ex_aabb_rate", &ph_console::ph_tri_query_ex_aabb_rate, 1.01f, 3.f); CMD3(CCC_Mask, "g_no_clip", &psActorFlags, AF_NO_CLIP); -#endif // DEBUG +#endif // DEBUG #ifndef MASTER_GOLD CMD1(CCC_JumpToLevel, "jump_to_level"); @@ -1847,7 +1847,7 @@ void CCC_RegisterCommands() CMD1(CCC_Script, "run_script"); CMD1(CCC_ScriptCommand, "run_string"); CMD1(CCC_TimeFactor, "time_factor"); -#endif // MASTER_GOLD +#endif // MASTER_GOLD CMD3(CCC_Mask, "g_autopickup", &psActorFlags, AF_AUTOPICKUP); CMD3(CCC_Mask, "g_dynamic_music", &psActorFlags, AF_DYNAMIC_MUSIC); @@ -2011,7 +2011,7 @@ void CCC_RegisterCommands() #ifndef MASTER_GOLD CMD1(CCC_StartTimeSingle, "start_time_single"); CMD4(CCC_TimeFactorSingle, "time_factor_single", &g_fTimeFactor, 0.f, 1000.0f); -#endif // MASTER_GOLD +#endif // MASTER_GOLD g_uCommonFlags.zero(); g_uCommonFlags.set(flAiUseTorchDynamicLights, TRUE); @@ -2021,7 +2021,7 @@ void CCC_RegisterCommands() #ifndef MASTER_GOLD CMD4(CCC_Vector3, "psp_cam_offset", &CCameraLook2::m_cam_offset, Fvector().set(-1000, -1000, -1000), Fvector().set(1000, 1000, 1000)); -#endif // MASTER_GOLD +#endif // MASTER_GOLD CMD1(CCC_GSCheckForUpdates, "check_for_updates"); #ifdef DEBUG @@ -2054,7 +2054,7 @@ void CCC_RegisterCommands() #ifdef DEBUG CMD4(CCC_Float, "ai_smart_cover_animation_speed_factor", &g_smart_cover_animation_speed_factor, .1f, 10.f); CMD4(CCC_Float, "air_resistance_epsilon", &air_resistance_epsilon, .0f, 1.f); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG CMD4(CCC_Integer, "g_sleep_time", &psActorSleepTime, 1, 24); @@ -2075,7 +2075,7 @@ void CCC_RegisterCommands() extern BOOL g_ai_aim_use_smooth_aim; CMD4(CCC_Integer, "ai_aim_use_smooth_aim", &g_ai_aim_use_smooth_aim, 0, 1); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG extern float g_ai_aim_min_speed; CMD4(CCC_Float, "ai_aim_min_speed", &g_ai_aim_min_speed, 0.f, 10.f * PI); @@ -2089,7 +2089,7 @@ void CCC_RegisterCommands() #ifdef DEBUG extern BOOL g_debug_doors; CMD4(CCC_Integer, "ai_debug_doors", &g_debug_doors, 0, 1); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG *g_last_saved_game = 0; diff --git a/src/xrGame/console_commands_mp.cpp b/src/xrGame/console_commands_mp.cpp index 816e750ffc8..36c8e3e0d89 100644 --- a/src/xrGame/console_commands_mp.cpp +++ b/src/xrGame/console_commands_mp.cpp @@ -28,7 +28,7 @@ LPCSTR AddHyphens(LPCSTR c); LPCSTR DelHyphens(LPCSTR c); extern float g_cl_lvInterp; -extern int g_cl_InterpolationType; // 0 - Linear, 1 - BSpline, 2 - HSpline +extern int g_cl_InterpolationType; // 0 - Linear, 1 - BSpline, 2 - HSpline extern u32 g_cl_InterpolationMaxPoints; extern int g_cl_save_demo; extern string64 gsCDKey; @@ -251,7 +251,7 @@ class CCC_Dbg_NumObjects : public IConsole_Command } virtual void Info(TInfo& I) { xr_strcpy(I, "dbg Num Objects"); } }; -#endif // DEBUG +#endif // DEBUG extern void WriteCDKey_ToRegistry(LPSTR cdkey); @@ -283,10 +283,10 @@ class CCC_GSCDKey : public CCC_String if (!MainMenu()->ValidateCDKey()) { #ifdef DEBUG Msg("! Invalid CD-Key"); -#endif // DEBUG +#endif // DEBUG } } - } // Execute + } // Execute virtual void Save(IWriter* F){}; virtual void fill_tips(vecTips& tips, u32 mode) @@ -381,7 +381,7 @@ class CCC_KickPlayerByID : public IConsole_Command if (!g_pGameLevel || !Level().Server || !Level().Server->GetGameState()) return; u32 len = xr_strlen(args); - if ((len == 0) || (len >= 128)) // one digit and raid:%u + if ((len == 0) || (len >= 128)) // one digit and raid:%u return; ClientID client_id(0); @@ -448,7 +448,7 @@ static char const* exclude_raid_from_args(LPCSTR args, LPSTR dest, size_t dest_s if (raidstr <= tmp_str) *raidstr = 0; else - *(raidstr - 1) = 0; // with ' ' + *(raidstr - 1) = 0; // with ' ' } dest[dest_size - 1] = 0; return dest; @@ -462,7 +462,7 @@ class CCC_MakeScreenshot : public IConsole_Command { if (!g_pGameLevel || !Level().Server || !Level().Server->GetGameState()) return; u32 len = xr_strlen(args_); - if ((len == 0) || (len >= 256)) // two digits and raid:%u + if ((len == 0) || (len >= 256)) // two digits and raid:%u return; ClientID client_id = 0; @@ -496,7 +496,7 @@ class CCC_MakeScreenshot : public IConsole_Command .c_str()); } -}; // class CCC_MakeScreenshot +}; // class CCC_MakeScreenshot class CCC_MakeConfigDump : public IConsole_Command { @@ -506,7 +506,7 @@ class CCC_MakeConfigDump : public IConsole_Command { if (!g_pGameLevel || !Level().Server || !Level().Server->GetGameState()) return; u32 len = xr_strlen(args_); - if ((len == 0) || (len >= 256)) // two digits and raid:%u + if ((len == 0) || (len >= 256)) // two digits and raid:%u return; ClientID client_id = 0; @@ -540,7 +540,7 @@ class CCC_MakeConfigDump : public IConsole_Command .c_str()); } -}; // class CCC_MakeConfigDump +}; // class CCC_MakeConfigDump class CCC_SetDemoPlaySpeed : public IConsole_Command { @@ -558,7 +558,7 @@ class CCC_SetDemoPlaySpeed : public IConsole_Command }; virtual void Info(TInfo& I) { xr_strcpy(I, "Set demo play speed (0.0, 8.0]"); } -}; // class CCC_SetDemoPlaySpeed +}; // class CCC_SetDemoPlaySpeed class DemoPlayControlArgParser { @@ -608,7 +608,7 @@ class DemoPlayControlArgParser { return " [player name]"; } -}; // class DemoPlayControlArgParser +}; // class DemoPlayControlArgParser class CCC_DemoPlayPauseOn : public IConsole_Command, public DemoPlayControlArgParser { @@ -638,7 +638,7 @@ class CCC_DemoPlayPauseOn : public IConsole_Command, public DemoPlayControlArgPa DemoPlayControlArgParser::GetInfoString()); xr_strcpy(I, info_str); } -}; // class CCC_DemoPlayPauseOn +}; // class CCC_DemoPlayPauseOn class CCC_DemoPlayCancelPauseOn : public IConsole_Command { @@ -656,7 +656,7 @@ class CCC_DemoPlayCancelPauseOn : public IConsole_Command }; virtual void Info(TInfo& I) { xr_strcpy(I, "Cancels mpdemoplay_pause_on."); } -}; // class CCC_DemoPlayCancelPauseOn +}; // class CCC_DemoPlayCancelPauseOn class CCC_DemoPlayRewindUntil : public IConsole_Command, public DemoPlayControlArgParser { @@ -686,7 +686,7 @@ class CCC_DemoPlayRewindUntil : public IConsole_Command, public DemoPlayControlA DemoPlayControlArgParser::GetInfoString()); xr_strcpy(I, info_str); } -}; // class CCC_DemoPlayRewindUntil +}; // class CCC_DemoPlayRewindUntil class CCC_DemoPlayStopRewind : public IConsole_Command { @@ -704,7 +704,7 @@ class CCC_DemoPlayStopRewind : public IConsole_Command }; virtual void Info(TInfo& I) { xr_strcpy(I, "Stops rewinding (mpdemoplay_rewind_until)."); } -}; // class CCC_DemoPlayStopRewind +}; // class CCC_DemoPlayStopRewind class CCC_DemoPlayRestart : public IConsole_Command { @@ -720,7 +720,7 @@ class CCC_DemoPlayRestart : public IConsole_Command }; virtual void Info(TInfo& I) { xr_strcpy(I, "Restarts playing demo."); } -}; // class CCC_DemoPlayRestart +}; // class CCC_DemoPlayRestart class CCC_MulDemoPlaySpeed : public IConsole_Command { @@ -784,7 +784,7 @@ class CCC_ScreenshotAllPlayers : public IConsole_Command xr_strcpy(I, "Make screenshot of each player in the game. Format: \"screenshot_all"); } -}; // class CCC_ScreenshotAllPlayers +}; // class CCC_ScreenshotAllPlayers class CCC_ConfigsDumpAll : public IConsole_Command { @@ -810,7 +810,7 @@ class CCC_ConfigsDumpAll : public IConsole_Command { xr_strcpy(I, "Make config dump of each player in the game. Format: \"config_dump_all"); } -}; // class CCC_ConfigsDumpAll +}; // class CCC_ConfigsDumpAll #ifdef DEBUG @@ -824,9 +824,9 @@ class CCC_DbgMakeScreenshot : public IConsole_Command ClientID server_id(Level().Server->GetServerClient()->ID); Level().Server->MakeScreenshot(server_id, server_id); } -}; // CCC_DbgMakeScreenshot +}; // CCC_DbgMakeScreenshot -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG class CCC_BanPlayerByCDKEY : public IConsole_Command { @@ -839,7 +839,7 @@ class CCC_BanPlayerByCDKEY : public IConsole_Command if (!tmp_sv_game) return; u32 len = xr_strlen(args_); - if ((len == 0) || (len >= 256)) // two digits and raid:%u + if ((len == 0) || (len >= 256)) // two digits and raid:%u return; ClientID client_id = 0; @@ -926,7 +926,7 @@ class CCC_UnBanPlayerByIndex : public IConsole_Command game_sv_mp* tmp_sv_game = smart_cast(Level().Server->GetGameState()); if (!tmp_sv_game) return; u32 len = xr_strlen(args_); - if ((len == 0) || (len >= 64)) // one digit and raid:%u + if ((len == 0) || (len >= 64)) // one digit and raid:%u return; if (!strncmp(args_, LAST_PRINTED_PLAYER_BANNED_STR, sizeof(LAST_PRINTED_PLAYER_BANNED_STR) - 1)) { @@ -1022,7 +1022,7 @@ class CCC_BanPlayerByIP : public IConsole_Command if (!g_pGameLevel || !Level().Server) return; //----------- string4096 buff; - exclude_raid_from_args(args_, buff, sizeof(buff)); // xr_strcpy(buff, args_); + exclude_raid_from_args(args_, buff, sizeof(buff)); // xr_strcpy(buff, args_); u32 len = xr_strlen(buff); if (0 == len) return; @@ -1072,7 +1072,7 @@ class CCC_UnBanPlayerByIP : public IConsole_Command if (!xr_strlen(args)) return; string4096 buff; - exclude_raid_from_args(args, buff, sizeof(buff)); // xr_strcpy(buff, args_); + exclude_raid_from_args(args, buff, sizeof(buff)); // xr_strcpy(buff, args_); if (!xr_strlen(buff)) return; ip_address Address; @@ -1743,7 +1743,7 @@ class CCC_RadminCmd : public IConsole_Command P.w_stringZ("logoff"); Level().Send(P, net_flags(TRUE, TRUE)); - } // logoff + } // logoff else { NET_Packet P; @@ -1881,12 +1881,12 @@ void register_mp_console_commands() #ifdef DEBUG CMD3(CCC_Mask, "net_dump_size", &psNET_Flags, NETFLAG_DBG_DUMPSIZE); CMD1(CCC_Dbg_NumObjects, "net_dbg_objects"); -#endif // DEBUG +#endif // DEBUG CMD3(CCC_GSCDKey, "cdkey", gsCDKey, sizeof(gsCDKey)); CMD4(CCC_Integer, "g_eventdelay", &g_dwEventDelay, 0, 1000); CMD4(CCC_Integer, "g_corpsenum", (int*)&g_dwMaxCorpses, 0, 100); - CMD1(CCC_KickPlayerByName, "sv_kick"); // saved for backward compatibility + CMD1(CCC_KickPlayerByName, "sv_kick"); // saved for backward compatibility CMD1(CCC_KickPlayerByID, "sv_kick_id"); // CMD1(CCC_BanPlayerByName, "sv_banplayer" ); @@ -1949,7 +1949,7 @@ void register_mp_console_commands() // CMD4(CCC_Integer, "sv_statistic_save_auto", &g_bStatisticSaveAuto, 0, 1); #ifndef MASTER_GOLD CMD4(CCC_AuthCheck, "sv_no_auth_check", &g_SV_Disable_Auth_Check, 0, 1); -#endif // MASTER_GOLD +#endif // MASTER_GOLD CMD4(CCC_Integer, "sv_artefact_spawn_force", &g_SV_Force_Artefact_Spawn, 0, 1); @@ -1986,15 +1986,15 @@ void register_mp_console_commands() CMD4(CCC_SV_Float, "sv_vote_quota", &g_sv_mp_fVoteQuota, 0.0f, 1.0f); CMD4(CCC_SV_Float, "sv_vote_time", &g_sv_mp_fVoteTime, 0.5f, 10.0f); - CMD4(CCC_SV_Integer, "sv_forcerespawn", (int*)&g_sv_dm_dwForceRespawn, 0, 3600); // sec + CMD4(CCC_SV_Integer, "sv_forcerespawn", (int*)&g_sv_dm_dwForceRespawn, 0, 3600); // sec CMD4(CCC_SV_Integer, "sv_fraglimit", &g_sv_dm_dwFragLimit, 0, 1000); - CMD4(CCC_SV_Integer, "sv_timelimit", &g_sv_dm_dwTimeLimit, 0, 180); // min + CMD4(CCC_SV_Integer, "sv_timelimit", &g_sv_dm_dwTimeLimit, 0, 180); // min CMD4(CCC_SV_Integer, "sv_dmgblockindicator", (int*)&g_sv_dm_bDamageBlockIndicators, 0, 1); - CMD4(CCC_SV_Integer, "sv_dmgblocktime", (int*)&g_sv_dm_dwDamageBlockTime, 0, 600); // sec + CMD4(CCC_SV_Integer, "sv_dmgblocktime", (int*)&g_sv_dm_dwDamageBlockTime, 0, 600); // sec CMD4(CCC_SV_Integer, "sv_anomalies_enabled", (int*)&g_sv_dm_bAnomaliesEnabled, 0, 1); - CMD4(CCC_SV_Integer, "sv_anomalies_length", (int*)&g_sv_dm_dwAnomalySetLengthTime, 0, 180); // min + CMD4(CCC_SV_Integer, "sv_anomalies_length", (int*)&g_sv_dm_dwAnomalySetLengthTime, 0, 180); // min CMD4(CCC_SV_Integer, "sv_pda_hunt", (int*)&g_sv_dm_bPDAHunt, 0, 1); - CMD4(CCC_SV_Integer, "sv_warm_up", (int*)&g_sv_dm_dwWarmUp_MaxTime, 0, 3600); // sec + CMD4(CCC_SV_Integer, "sv_warm_up", (int*)&g_sv_dm_dwWarmUp_MaxTime, 0, 3600); // sec CMD4(CCC_Integer, "sv_max_ping_limit", (int*)&g_sv_dwMaxClientPing, 1, 2000); @@ -2006,10 +2006,10 @@ void register_mp_console_commands() CMD4(CCC_SV_Integer, "sv_teamkill_limit", &g_sv_tdm_iTeamKillLimit, 0, 100); CMD4(CCC_SV_Integer, "sv_teamkill_punish", (int*)&g_sv_tdm_bTeamKillPunishment, 0, 1); - CMD4(CCC_SV_Integer, "sv_artefact_respawn_delta", (int*)&g_sv_ah_dwArtefactRespawnDelta, 0, 600); // sec + CMD4(CCC_SV_Integer, "sv_artefact_respawn_delta", (int*)&g_sv_ah_dwArtefactRespawnDelta, 0, 600); // sec CMD4(CCC_SV_Integer, "sv_artefacts_count", (int*)&g_sv_ah_dwArtefactsNum, 1, 100); - CMD4(CCC_SV_Integer, "sv_artefact_stay_time", (int*)&g_sv_ah_dwArtefactStayTime, 0, 180); // min - CMD4(CCC_SV_Integer, "sv_reinforcement_time", (int*)&g_sv_ah_iReinforcementTime, -1, 3600); // sec + CMD4(CCC_SV_Integer, "sv_artefact_stay_time", (int*)&g_sv_ah_dwArtefactStayTime, 0, 180); // min + CMD4(CCC_SV_Integer, "sv_reinforcement_time", (int*)&g_sv_ah_iReinforcementTime, -1, 3600); // sec CMD4(CCC_SV_Integer, "sv_bearercantsprint", (int*)&g_sv_ah_bBearerCantSprint, 0, 1); CMD4(CCC_SV_Integer, "sv_shieldedbases", (int*)&g_sv_ah_bShildedBases, 0, 1); CMD4(CCC_SV_Integer, "sv_returnplayers", (int*)&g_sv_ah_bAfReturnPlayersToBases, 0, 1); @@ -2024,20 +2024,20 @@ void register_mp_console_commands() CMD1(CCC_SvChat, "chat"); //----------------- - CMD3(CCC_Token, "sv_adm_menu_ban_time", &g_sv_adm_menu_ban_time, g_ban_times); // min + CMD3(CCC_Token, "sv_adm_menu_ban_time", &g_sv_adm_menu_ban_time, g_ban_times); // min // CMD4(CCC_Integer, "sv_adm_menu_ban_time", (int*)&g_sv_adm_menu_ban_time, 1, 60); //min - CMD4(CCC_Integer, "sv_adm_menu_ping_limit", (int*)&g_sv_adm_menu_ping_limit, 1, 200); // min + CMD4(CCC_Integer, "sv_adm_menu_ping_limit", (int*)&g_sv_adm_menu_ping_limit, 1, 200); // min - CMD4(CCC_Integer, "sv_invincible_time", (int*)&g_sv_cta_dwInvincibleTime, 0, 60); // sec - CMD4(CCC_Integer, "sv_artefact_returning_time", (int*)&g_sv_cta_artefactReturningTime, 0, 5 * 60); // sec + CMD4(CCC_Integer, "sv_invincible_time", (int*)&g_sv_cta_dwInvincibleTime, 0, 60); // sec + CMD4(CCC_Integer, "sv_artefact_returning_time", (int*)&g_sv_cta_artefactReturningTime, 0, 5 * 60); // sec CMD4(CCC_Integer, "sv_activated_return", (int*)&g_sv_cta_activatedArtefactRet, 0, 1) - CMD4(CCC_Integer, "sv_show_player_scores_time", (int*)&g_sv_cta_PlayerScoresDelayTime, 1, 20); // sec + CMD4(CCC_Integer, "sv_show_player_scores_time", (int*)&g_sv_cta_PlayerScoresDelayTime, 1, 20); // sec CMD4(CCC_Integer, "sv_cta_runkup_to_arts_div", (int*)&g_sv_cta_rankUpToArtsCountDiv, 0, 10); CMD1(CCC_CompressorStatus, "net_compressor_status"); CMD4(CCC_SV_Integer, "net_compressor_enabled", (int*)&g_net_compressor_enabled, 0, 1); CMD4(CCC_SV_Integer, "net_compressor_gather_stats", (int*)&g_net_compressor_gather_stats, 0, 1); CMD1(CCC_MpStatistics, "sv_dump_online_statistics"); - CMD4(CCC_SV_Integer, "sv_dump_online_statistics_period", (int*)&g_sv_mp_iDumpStatsPeriod, 0, 60); // min + CMD4(CCC_SV_Integer, "sv_dump_online_statistics_period", (int*)&g_sv_mp_iDumpStatsPeriod, 0, 60); // min #ifdef DEBUG CMD4(CCC_SV_Integer, "cl_dbg_min_ping", (int*)&lag_simmulator_min_ping, 0, 1000); CMD4(CCC_SV_Integer, "cl_dbg_max_ping", (int*)&lag_simmulator_max_ping, 0, 1000); diff --git a/src/xrGame/cover_evaluators.cpp b/src/xrGame/cover_evaluators.cpp index 81f9b112714..61c0932b852 100644 --- a/src/xrGame/cover_evaluators.cpp +++ b/src/xrGame/cover_evaluators.cpp @@ -72,7 +72,7 @@ void CCoverEvaluatorBase::evaluate(CCoverPoint const* cover_point, float weight) #ifndef MASTER_GOLD if (!psAI_Flags.test(aiUseSmartCovers)) return; -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD smart_cover::cover const* tmp = static_cast(cover_point); if (tmp->is_combat_cover()) evaluate_smart_cover(tmp, weight); @@ -224,7 +224,7 @@ void CCoverEvaluatorBest::evaluate_smart_cover(smart_cover::cover const* smart_c m_selected = smart_cover; m_loophole = best_loophole; // Msg ("Loophole is NULL CCoverEvaluatorBest::evaluate_cover"); -#endif // #if 1 +#endif // #if 1 } ////////////////////////////////////////////////////////////////////////// diff --git a/src/xrGame/cover_manager.cpp b/src/xrGame/cover_manager.cpp index 6a1c17bc774..a6ccc763ab8 100644 --- a/src/xrGame/cover_manager.cpp +++ b/src/xrGame/cover_manager.cpp @@ -145,7 +145,7 @@ struct predicate return (!m_object->inside(cover->position())); } }; -} // namespace smart_cover +} // namespace smart_cover void CCoverManager::remove_nearby_covers(smart_cover::cover const& cover, smart_cover::object const& object) const { diff --git a/src/xrGame/cta_game_artefact.cpp b/src/xrGame/cta_game_artefact.cpp index 2faf8ef6f55..72d7c10c337 100644 --- a/src/xrGame/cta_game_artefact.cpp +++ b/src/xrGame/cta_game_artefact.cpp @@ -73,7 +73,7 @@ void CtaGameArtefact::OnAnimationEnd(u32 state) if (!H_Parent()) { #ifndef MASTER_GOLD Msg("! ERROR: enemy artefact activation, H_Parent is NULL."); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } inherited::OnAnimationEnd(state); @@ -89,7 +89,7 @@ void CtaGameArtefact::UpdateCLChild() if (!m_artefact_rpoint) { #ifdef DEBUG Msg("--- Waiting for sync packet, for artefact rpoint."); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return; } @@ -125,7 +125,7 @@ void CtaGameArtefact::CreateArtefactActivation() P.w_u8(0); P.w_vec3(*m_artefact_rpoint); CGameObject::u_EventSend(P); - MoveTo(*m_artefact_rpoint); // for server net_Import + MoveTo(*m_artefact_rpoint); // for server net_Import } // deactivate_physics_shell(); } diff --git a/src/xrGame/cta_game_artefact.h b/src/xrGame/cta_game_artefact.h index 340d494153a..72545d1d8e6 100644 --- a/src/xrGame/cta_game_artefact.h +++ b/src/xrGame/cta_game_artefact.h @@ -37,6 +37,6 @@ class CtaGameArtefact : public CArtefact game_cl_CaptureTheArtefact* m_game; Fvector3 const* m_artefact_rpoint; ETeam m_my_team; -}; // class CtaGameArtefact +}; // class CtaGameArtefact -#endif // CTA_GAME_ARTEFACT \ No newline at end of file +#endif // CTA_GAME_ARTEFACT \ No newline at end of file diff --git a/src/xrGame/cta_game_artefact_activation.h b/src/xrGame/cta_game_artefact_activation.h index 1f0482c0957..24fb3b2bad6 100644 --- a/src/xrGame/cta_game_artefact_activation.h +++ b/src/xrGame/cta_game_artefact_activation.h @@ -27,6 +27,6 @@ class CtaArtefactActivation : public SArtefactActivation private: typedef SArtefactActivation inherited; -}; // class CtaArtefactActivation +}; // class CtaArtefactActivation -#endif // CTA_GAME_ARTEFACT_ACTIVATION +#endif // CTA_GAME_ARTEFACT_ACTIVATION diff --git a/src/xrGame/damage_manager.cpp b/src/xrGame/damage_manager.cpp index 5625de5cb0c..89085f029dc 100644 --- a/src/xrGame/damage_manager.cpp +++ b/src/xrGame/damage_manager.cpp @@ -80,7 +80,7 @@ void CDamageManager::load_section(LPCSTR section, CInifile const* ini) CInifile::Sect& damages = ini->r_section(section); for (CInifile::SectCIt i = damages.Data.begin(); damages.Data.end() != i; ++i) { - if (xr_strcmp(*(*i).first, "default")) { // read all except default line + if (xr_strcmp(*(*i).first, "default")) { // read all except default line VERIFY(m_object); int bone = kinematics->LL_BoneID(i->first); R_ASSERT2(BI_NONE != bone, *(*i).first); diff --git a/src/xrGame/danger_manager.cpp b/src/xrGame/danger_manager.cpp index e4e71e2d472..fd4816cb3b0 100644 --- a/src/xrGame/danger_manager.cpp +++ b/src/xrGame/danger_manager.cpp @@ -159,42 +159,42 @@ float CDangerManager::do_evaluate(const CDangerObject& object) const switch (object.type()) { case CDangerObject::eDangerTypeBulletRicochet: - { // I perceived bullet(knife) ricochet + { // I perceived bullet(knife) ricochet result += 3000.f; break; } case CDangerObject::eDangerTypeAttackSound: - { // someone is shooting + { // someone is shooting result += 2500.f; break; } case CDangerObject::eDangerTypeEntityAttacked: - { // someone is hit + { // someone is hit result += 2000.f; break; } case CDangerObject::eDangerTypeEntityDeath: - { // someone becomes dead + { // someone becomes dead result += 3000.f; break; } case CDangerObject::eDangerTypeFreshEntityCorpse: - { // I see a corpse + { // I see a corpse result += 2250.f; break; } case CDangerObject::eDangerTypeAttacked: - { // someone is attacked + { // someone is attacked result += 2000.f; break; } case CDangerObject::eDangerTypeGrenade: - { // grenade to explode nearby + { // grenade to explode nearby result += 1000.f; break; } case CDangerObject::eDangerTypeEnemySound: - { // grenade to explode nearby + { // grenade to explode nearby result += 1000.f; break; } @@ -277,7 +277,7 @@ void CDangerManager::add(const CHitObject& object) void CDangerManager::add(const CDangerObject& object) { - if (m_object->memory().enemy().selected() && object.object()) // && !object.object()->g_Alive()) + if (m_object->memory().enemy().selected() && object.object()) // && !object.object()->g_Alive()) ignore(object.object()); if (!is_useful(object)) return; diff --git a/src/xrGame/date_time.cpp b/src/xrGame/date_time.cpp index 3d2cf4c03ec..3f7a0f6102e 100644 --- a/src/xrGame/date_time.cpp +++ b/src/xrGame/date_time.cpp @@ -35,7 +35,7 @@ CHECK_YEAR (2013); #undef CHECK_YEAR -#endif // #if 0 +#endif // #if 0 static u64 generate_time_impl(u32 years, u32 months, u32 days, u32 hours, u32 minutes, u32 seconds, u32 milliseconds) { @@ -150,7 +150,7 @@ u64 generate_time(u32 years, u32 months, u32 days, u32 hours, u32 minutes, u32 s split_time_impl (result + milliseconds_in_day, l_years, l_months, l_days, l_hours, l_minutes, l_seconds, l_milliseconds); split_time_impl (result, l_years, l_months, l_days, l_hours, l_minutes, l_seconds, l_milliseconds); } -#endif // #if 0 +#endif // #if 0 u32 l_years, l_months, l_days, l_hours, l_minutes, l_seconds, l_milliseconds; split_time_impl(result, l_years, l_months, l_days, l_hours, l_minutes, l_seconds, l_milliseconds); u64 const new_result = generate_time_impl(l_years, l_months, l_days, l_hours, l_minutes, l_seconds, l_milliseconds); @@ -163,7 +163,7 @@ u64 generate_time(u32 years, u32 months, u32 days, u32 hours, u32 minutes, u32 s VERIFY(minutes == l_minutes); VERIFY(seconds == l_seconds); VERIFY(milliseconds == l_milliseconds); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (result); } @@ -173,5 +173,5 @@ void split_time(u64 time, u32& years, u32& months, u32& days, u32& hours, u32& m #ifdef DEBUG u64 const test_time = generate_time_impl(years, months, days, hours, minutes, seconds, milliseconds); VERIFY(test_time == time); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } \ No newline at end of file diff --git a/src/xrGame/dbg_draw_frustum.cpp b/src/xrGame/dbg_draw_frustum.cpp index b48a7fbddfa..d9d987cb926 100644 --- a/src/xrGame/dbg_draw_frustum.cpp +++ b/src/xrGame/dbg_draw_frustum.cpp @@ -29,7 +29,7 @@ void MK_Frustum(CFrustum& F, float FOV, float _FAR, float A, Fvector& P, Fvector COP.set(P); // calculate the corner vertices of the window - Fvector sPts[4]; // silhouette points (corners of window) + Fvector sPts[4]; // silhouette points (corners of window) Fvector Offset, T; Offset.add(D, COP); @@ -86,7 +86,7 @@ void dbg_draw_frustum(float FOV, float _FAR, float A, Fvector& P, Fvector& D, Fv COP.set(P); // calculate the corner vertices of the window - Fvector sPts[4]; // silhouette points (corners of window) + Fvector sPts[4]; // silhouette points (corners of window) Fvector Offset, T; Offset.add(D, COP); diff --git a/src/xrGame/death_anims_predicates.cpp b/src/xrGame/death_anims_predicates.cpp index fcb8b8ee45e..0d4c90f04ea 100644 --- a/src/xrGame/death_anims_predicates.cpp +++ b/src/xrGame/death_anims_predicates.cpp @@ -291,17 +291,15 @@ void death_anims::setup(IKinematicsAnimated* k, LPCSTR section, CInifile const* VERIFY(ini); VERIFY(anims.empty()); anims.resize(types_number); - anims[0] = - (new type_motion0()) - ->setup(k, ini, section, "kill_enertion"); // 1. Инерционное движение вперед от попадания в голову - anims[1] = (new type_motion1())->setup(k, ini, section, "kill_burst"); // 2. Изрешетить пулями - anims[2] = (new type_motion2())->setup(k, ini, section, "kill_shortgun"); // 3. Шотган - - anims[6] = - (new type_motion3())->setup(k, ini, section, "kill_headshot"); // 4. Хедшот (по вероятности), кроме 5 (4) - anims[4] = (new type_motion4())->setup(k, ini, section, "kill_sniper_headshot"); // 5. Снайперка в голову. - anims[5] = (new type_motion5())->setup(k, ini, section, "kill_sniper_body"); // 6. Снайперка в тело. - anims[3] = (new type_motion6())->setup(k, ini, section, "kill_grenade"); // 7. Гранта + anims[0] = (new type_motion0()) + ->setup(k, ini, section, "kill_enertion"); // 1. Инерционное движение вперед от попадания в голову + anims[1] = (new type_motion1())->setup(k, ini, section, "kill_burst"); // 2. Изрешетить пулями + anims[2] = (new type_motion2())->setup(k, ini, section, "kill_shortgun"); // 3. Шотган + + anims[6] = (new type_motion3())->setup(k, ini, section, "kill_headshot"); // 4. Хедшот (по вероятности), кроме 5 (4) + anims[4] = (new type_motion4())->setup(k, ini, section, "kill_sniper_headshot"); // 5. Снайперка в голову. + anims[5] = (new type_motion5())->setup(k, ini, section, "kill_sniper_body"); // 6. Снайперка в тело. + anims[3] = (new type_motion6())->setup(k, ini, section, "kill_grenade"); // 7. Гранта if (ini->line_exist(section, "random_death_animations")) rnd_anims.setup(k, ini->r_string(section, "random_death_animations")); } diff --git a/src/xrGame/debug_renderer.cpp b/src/xrGame/debug_renderer.cpp index 432fe037b6e..02cebc58c2d 100644 --- a/src/xrGame/debug_renderer.cpp +++ b/src/xrGame/debug_renderer.cpp @@ -19,14 +19,14 @@ void CDebugRenderer::add_lines( void CDebugRenderer::draw_obb(const Fmatrix& matrix, const u32& color) { Fvector aabb[8]; - matrix.transform_tiny(aabb[0], Fvector().set(-1, -1, -1)); // 0 - matrix.transform_tiny(aabb[1], Fvector().set(-1, +1, -1)); // 1 - matrix.transform_tiny(aabb[2], Fvector().set(+1, +1, -1)); // 2 - matrix.transform_tiny(aabb[3], Fvector().set(+1, -1, -1)); // 3 - matrix.transform_tiny(aabb[4], Fvector().set(-1, -1, +1)); // 4 - matrix.transform_tiny(aabb[5], Fvector().set(-1, +1, +1)); // 5 - matrix.transform_tiny(aabb[6], Fvector().set(+1, +1, +1)); // 6 - matrix.transform_tiny(aabb[7], Fvector().set(+1, -1, +1)); // 7 + matrix.transform_tiny(aabb[0], Fvector().set(-1, -1, -1)); // 0 + matrix.transform_tiny(aabb[1], Fvector().set(-1, +1, -1)); // 1 + matrix.transform_tiny(aabb[2], Fvector().set(+1, +1, -1)); // 2 + matrix.transform_tiny(aabb[3], Fvector().set(+1, -1, -1)); // 3 + matrix.transform_tiny(aabb[4], Fvector().set(-1, -1, +1)); // 4 + matrix.transform_tiny(aabb[5], Fvector().set(-1, +1, +1)); // 5 + matrix.transform_tiny(aabb[6], Fvector().set(+1, +1, +1)); // 6 + matrix.transform_tiny(aabb[7], Fvector().set(+1, -1, +1)); // 7 u16 aabb_id[12 * 2] = {0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 1, 5, 2, 6, 3, 7, 0, 4}; @@ -119,4 +119,4 @@ void CDebugRenderer::draw_ellipse(const Fmatrix& matrix, const u32& color) add_lines((Fvector*)&vertices[0], sizeof(vertices) / sizeof(Fvector), &pairs[0], sizeof(pairs) / (2 * sizeof(u16)), color); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/debug_renderer.h b/src/xrGame/debug_renderer.h index 25d314c637e..27f04bdf709 100644 --- a/src/xrGame/debug_renderer.h +++ b/src/xrGame/debug_renderer.h @@ -32,4 +32,4 @@ class CDebugRenderer #include "debug_renderer_inline.h" -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/debug_text_tree.cpp b/src/xrGame/debug_text_tree.cpp index e2293905f06..4e29d8df502 100644 --- a/src/xrGame/debug_text_tree.cpp +++ b/src/xrGame/debug_text_tree.cpp @@ -74,13 +74,13 @@ struct texttree_log_helper void operator()(const char* s, int num_siblings) { Msg(s); } }; -} // namespace detail +} // namespace detail void draw_text_tree(text_tree& tree, - int indent, // in spaces + int indent, // in spaces int ori_x, int ori_y, - int offs, // skip offs lines - int column_size, // in pixels + int offs, // skip offs lines + int column_size, // in pixels int max_rows, u32 color1, u32 color2) { detail::texttree_draw_helper::s_params.color1 = color1; @@ -152,7 +152,7 @@ void text_tree::clear() void text_tree::prepare(int current_indent, int indent, Columns& columns) { - num_siblings = 1; // including ourselves + num_siblings = 1; // including ourselves for (Children::iterator i = children.begin(); i != children.end(); ++i) { @@ -181,4 +181,4 @@ void text_tree::prepare(int current_indent, int indent, Columns& columns) } } -} // namespace debug \ No newline at end of file +} // namespace debug \ No newline at end of file diff --git a/src/xrGame/debug_text_tree.h b/src/xrGame/debug_text_tree.h index e8abf6f77ec..51b3693bb7a 100644 --- a/src/xrGame/debug_text_tree.h +++ b/src/xrGame/debug_text_tree.h @@ -13,7 +13,7 @@ namespace debug { class text_tree { -public: // START INTERFACE +public: // START INTERFACE text_tree(char separator = ':', int group_id_ = 0) : group_id(group_id_), shown(true), separator(separator) {} void toggle_show(int group_id); @@ -45,7 +45,7 @@ class text_tree void output(OutFunc func, int indent = 4); virtual ~text_tree() { clear(); } -private: // END INTERFACE +private: // END INTERFACE typedef xr_list Children; typedef xr_vector Columns; typedef xr_vector Strings; @@ -63,21 +63,21 @@ class text_tree int num_siblings; text_tree& add_line(); - text_tree(const text_tree& t); // no copying allowed + text_tree(const text_tree& t); // no copying allowed }; void draw_text_tree(text_tree& tree, - int indent, // in spaces + int indent, // in spaces int ori_x, int ori_y, - int offs, // skip offs lines - int column_size, // in pixels + int offs, // skip offs lines + int column_size, // in pixels int max_rows, u32 color1, u32 color2); void log_text_tree(text_tree& tree); #include "debug_text_tree_inline.h" -} // namespace debug +} // namespace debug IC xr_string __cdecl make_xrstr(LPCSTR format, ...) { @@ -115,4 +115,4 @@ IC xr_string __cdecl make_xrstr(const xr_string& s) return s; } -#endif // defined(AI_DEBUG_TEXT_TREE_H_INCLUDED) +#endif // defined(AI_DEBUG_TEXT_TREE_H_INCLUDED) diff --git a/src/xrGame/detail_path_manager.cpp b/src/xrGame/detail_path_manager.cpp index d4886c97b14..45459e39dfc 100644 --- a/src/xrGame/detail_path_manager.cpp +++ b/src/xrGame/detail_path_manager.cpp @@ -119,7 +119,7 @@ void CDetailPathManager::build_path(const xr_vector& level_path, u32 interm Msg("! DetailPathManager has failed : from [%f,%f,%f] to [%f,%f,%f]", VPUSH(ai().level_graph().vertex_position(level_path.front())), VPUSH(ai().level_graph().vertex_position(level_path.back()))); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD #ifdef DEBUG Msg("! DetailPathManager has failed for object %s : from [%f,%f,%f] to [%f,%f,%f]", m_restricted_object ? *m_restricted_object->object().cName() : "unknown", diff --git a/src/xrGame/detail_path_manager.h b/src/xrGame/detail_path_manager.h index c80bb2929ce..c6bc728f30f 100644 --- a/src/xrGame/detail_path_manager.h +++ b/src/xrGame/detail_path_manager.h @@ -86,12 +86,12 @@ class CDetailPathManager eDirectionTypeFN = u32(1), eDirectionTypeSP = u32(0), eDirectionTypeSN = u32(2), - eDirectionTypePP = eDirectionTypeFP | eDirectionTypeSP, // both linear velocities are positive - eDirectionTypeNN = eDirectionTypeFN | eDirectionTypeSN, // both linear velocities are negative + eDirectionTypePP = eDirectionTypeFP | eDirectionTypeSP, // both linear velocities are positive + eDirectionTypeNN = eDirectionTypeFN | eDirectionTypeSN, // both linear velocities are negative eDirectionTypePN = - eDirectionTypeFP | eDirectionTypeSN, // the first linear velocity is positive, the second one - negative + eDirectionTypeFP | eDirectionTypeSN, // the first linear velocity is positive, the second one - negative eDirectionTypeNP = - eDirectionTypeFN | eDirectionTypeSP, // the first linear velocity is negative, the second one - positive + eDirectionTypeFN | eDirectionTypeSP, // the first linear velocity is negative, the second one - positive }; private: diff --git a/src/xrGame/detail_path_manager_inline.h b/src/xrGame/detail_path_manager_inline.h index 3cf2696ac1b..124fe0f2d46 100644 --- a/src/xrGame/detail_path_manager_inline.h +++ b/src/xrGame/detail_path_manager_inline.h @@ -81,7 +81,7 @@ IC void CDetailPathManager::set_dest_position(const Fvector& dest_position) if (!(!m_restricted_object || m_restricted_object->accessible(dest_position))) { xrDebug::LogStackTrace("error call stack"); } -#endif // DEBUG +#endif // DEBUG THROW2(!m_restricted_object || m_restricted_object->accessible(dest_position), "Old movement destination is not accessible after changing restrictions!"); @@ -291,4 +291,4 @@ IC xr_vector& CDetailPathManager::key_points() { return (m_key_points); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/detail_path_manager_smooth.cpp b/src/xrGame/detail_path_manager_smooth.cpp index a0b1533645f..e41c7645009 100644 --- a/src/xrGame/detail_path_manager_smooth.cpp +++ b/src/xrGame/detail_path_manager_smooth.cpp @@ -769,7 +769,7 @@ void CDetailPathManager::add_patrol_point() void CDetailPathManager::build_smooth_path(const xr_vector& level_path, u32 intermediate_index) { // Msg ("[%6d][%s] started to build detail - //path",Device.dwFrame,*m_restricted_object->object().cName()); + // path",Device.dwFrame,*m_restricted_object->object().cName()); START_PROFILE("Build Path/Detail Path"); m_failed = true; diff --git a/src/xrGame/doors.h b/src/xrGame/doors.h index 58327b2076c..4f4309c9eac 100644 --- a/src/xrGame/doors.h +++ b/src/xrGame/doors.h @@ -16,11 +16,11 @@ enum door_state { door_state_open, door_state_closed, -}; // enum door_state +}; // enum door_state extern float const g_door_length; extern float const g_door_open_time; -} // namespace doors +} // namespace doors -#endif // #ifndef DOORS_H_INCLUDED \ No newline at end of file +#endif // #ifndef DOORS_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/doors_actor.cpp b/src/xrGame/doors_actor.cpp index 68603a1ff5f..9e80809fdf3 100644 --- a/src/xrGame/doors_actor.cpp +++ b/src/xrGame/doors_actor.cpp @@ -55,7 +55,7 @@ void actor::revert_states(doors_type& doors, door_state const state) (*i)->change_state(this, state); #ifdef DEBUG VERIFY(!(*i)->check_initiator(this)); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } doors.clear_not_free(); @@ -110,7 +110,7 @@ class passed_doors_predicate actor* m_actor; door_state m_state; float m_danger_distance; -}; // class passed_doors_predicate +}; // class passed_doors_predicate void actor::process_doors(float const average_speed, doors_type& processed_doors, temp_doors_type const& new_doors, door_state const start_state, door_state const stop_state) @@ -134,7 +134,7 @@ void actor::process_doors(float const average_speed, doors_type& processed_doors #ifdef DEBUG BOOL g_debug_doors = 1; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG bool actor::add_new_door(float const average_speed, door* const door, doors_type const& processed_doors, doors_type& locked_doors, temp_doors_type& new_doors, door_state const state) @@ -142,7 +142,7 @@ bool actor::add_new_door(float const average_speed, door* const door, doors_type if (door->is_locked(state)) { #ifdef DEBUG if (g_debug_doors) Msg("actor[%s] is waiting for the locked door[%s]", get_name(), door->get_name()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return false; } @@ -153,7 +153,7 @@ bool actor::add_new_door(float const average_speed, door* const door, doors_type if (g_debug_doors) Msg("actor[%s] is waiting for the door[%s] blocked by %s", get_name(), door->get_name(), door->get_initiators_ids().c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return false; } @@ -165,7 +165,7 @@ bool actor::add_new_door(float const average_speed, door* const door, doors_type if (g_debug_doors) Msg("actor[%s] is waiting for the door[%s] blocked by %s", get_name(), door->get_name(), door->get_initiators_ids().c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return false; } } @@ -208,7 +208,7 @@ bool actor::update_doors(doors_type const& detected_doors, float const average_s #ifdef DEBUG m_detected_doors = detected_doors; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG stalker_movement_manager_smart_cover const& movement = m_object.movement(); @@ -281,4 +281,4 @@ void actor::render() const renderer.draw_line(Fidentity, matrix.c, temp, color_xrgb(255, 0, 0)); } } -#endif // #ifdef DEBUG \ No newline at end of file +#endif // #ifdef DEBUG \ No newline at end of file diff --git a/src/xrGame/doors_actor.h b/src/xrGame/doors_actor.h index 78ca2d04abb..61c22e92f56 100644 --- a/src/xrGame/doors_actor.h +++ b/src/xrGame/doors_actor.h @@ -26,7 +26,7 @@ class actor : private Noncopyable pcstr get_name() const; #ifdef DEBUG void render() const; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG private: typedef buffer_vector temp_doors_type; @@ -43,10 +43,10 @@ class actor : private Noncopyable doors_type m_closed_doors; #ifdef DEBUG doors_type m_detected_doors; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG CAI_Stalker const& m_object; -}; // class actor +}; // class actor -} // namespace doors +} // namespace doors -#endif // #ifndef DOORS_ACTOR_H_INCLUDED \ No newline at end of file +#endif // #ifndef DOORS_ACTOR_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/doors_door.cpp b/src/xrGame/doors_door.cpp index 8863424cff8..eb6b4562834 100644 --- a/src/xrGame/doors_door.cpp +++ b/src/xrGame/doors_door.cpp @@ -56,7 +56,7 @@ door::~door() #ifdef DEBUG m_initiators.clear_and_free(); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } Fvector const& door::position() const @@ -114,7 +114,7 @@ bool door::is_blocked(door_state const state) const #ifdef DEBUG extern BOOL g_debug_doors; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG void door::lock() { @@ -126,7 +126,7 @@ void door::lock() m_locked = true; #ifdef DEBUG if (g_debug_doors) Msg("door[%s] is locked", m_object.cName().c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void door::unlock() @@ -139,7 +139,7 @@ void door::unlock() m_locked = false; #ifdef DEBUG if (g_debug_doors) Msg("door[%s] is unlocked", m_object.cName().c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void door::change_state() @@ -155,7 +155,7 @@ void door::change_state() if (g_debug_doors) Msg("door[%s] started to change its state to [%s]", m_object.cName().c_str(), m_target_state == door_state_open ? "open" : "closed"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void door::change_state(actor* const initiator, door_state const start_state, door_state const stop_state) @@ -174,7 +174,7 @@ void door::change_state(actor* const initiator, door_state const start_state, do if (g_debug_doors) Msg("door[%s] added initiator[%s] to keep door %s", m_object.cName().c_str(), initiator->get_name(), m_target_state == door_state_open ? "open" : "closed"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // if ( !xr_strcmp( "sim_default_duty_28212", initiator->get_name()) ) { // int i=0; (void)i; // } @@ -187,7 +187,7 @@ void door::change_state(actor* const initiator, door_state const start_state, do if (g_debug_doors) Msg("door[%s] added initiator[%s] to keep door %s", m_object.cName().c_str(), initiator->get_name(), m_target_state == door_state_open ? "open" : "closed"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // if ( !xr_strcmp( "sim_default_duty_28212", initiator->get_name()) ) { // int i=0; (void)i; // } @@ -204,7 +204,7 @@ void door::change_state(actor* const initiator, door_state const start_state, do if (g_debug_doors) Msg("door[%s] removed initiator[%s] to keep door %s", m_object.cName().c_str(), initiator->get_name(), m_target_state == door_state_open ? "open" : "closed"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // if ( !xr_strcmp( "sim_default_duty_28212", initiator->get_name()) ) { // int i=0; (void)i; // } @@ -219,7 +219,7 @@ void door::change_state(actor* const initiator, door_state const start_state, do if (g_debug_doors) Msg("door[%s] restores its state to %s", m_object.cName().c_str(), m_target_state == door_state_open ? "open" : "closed"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // if ( !xr_strcmp( "sim_default_duty_28212", initiator->get_name()) ) { // int i=0; (void)i; // } @@ -295,4 +295,4 @@ bool door::check_initiator(actor const* const initiator) const { return std::find(m_initiators.begin(), m_initiators.end(), initiator) != m_initiators.end(); } -#endif // #ifdef DEBUG \ No newline at end of file +#endif // #ifdef DEBUG \ No newline at end of file diff --git a/src/xrGame/doors_door.h b/src/xrGame/doors_door.h index c490020cc21..91ae6fbd363 100644 --- a/src/xrGame/doors_door.h +++ b/src/xrGame/doors_door.h @@ -27,7 +27,7 @@ class door : private Noncopyable LPCSTR get_name() const; shared_str get_initiators_ids() const; bool check_initiator(actor const* initiator) const; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG void lock(); void unlock(); @@ -55,8 +55,8 @@ class door : private Noncopyable door_state m_target_state; Fvector m_registered_position; bool m_locked; -}; // class door +}; // class door -} // namespace doors +} // namespace doors -#endif // #ifndef DOORS_DOOR_H_INCLUDED \ No newline at end of file +#endif // #ifndef DOORS_DOOR_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/doors_manager.cpp b/src/xrGame/doors_manager.cpp index be329940ac5..74045451391 100644 --- a/src/xrGame/doors_manager.cpp +++ b/src/xrGame/doors_manager.cpp @@ -42,7 +42,7 @@ manager::~manager() // door const* const found = m_doors.find( game_object->lua_game_object()->m_door->position() ); // if ( !found ) { // Msg ( "object[\"shkaf_work_01_door_0000\"] has been unregistered already[0x%08x]?", -//game_object->lua_game_object()->m_door ); +// game_object->lua_game_object()->m_door ); // return; // } // diff --git a/src/xrGame/doors_manager.h b/src/xrGame/doors_manager.h index b178d09879f..0ddca8dccd4 100644 --- a/src/xrGame/doors_manager.h +++ b/src/xrGame/doors_manager.h @@ -47,8 +47,8 @@ class manager : private Noncopyable private: doors_tree_type m_doors; doors_type m_nearest_doors; -}; // class manager +}; // class manager -} // namespace doors +} // namespace doors -#endif // #ifndef DOORS_MANAGER_H_INCLUDED \ No newline at end of file +#endif // #ifndef DOORS_MANAGER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/double_shot_double_kill.h b/src/xrGame/double_shot_double_kill.h index 0ba4ddb234a..d8e661bc8d8 100644 --- a/src/xrGame/double_shot_double_kill.h +++ b/src/xrGame/double_shot_double_kill.h @@ -35,12 +35,12 @@ class double_shot_double_kill : public player_state_param kills_times_t m_kills; u32 m_shot_count; -}; // class double_shot_double_kill +}; // class double_shot_double_kill ADD_ACCUMULATIVE_STATE(acpv_double_shot_double_kill_time, double_shot_double_kill); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_double_shot_double_kill_time, double_shot_double_kill) -} // namespace award_system +} // namespace award_system -#endif //#ifndef DOUBLE_SHOT_DOUBLE_KILL_INCLUDED \ No newline at end of file +#endif //#ifndef DOUBLE_SHOT_DOUBLE_KILL_INCLUDED \ No newline at end of file diff --git a/src/xrGame/dynamic_obstacles_avoider.cpp b/src/xrGame/dynamic_obstacles_avoider.cpp index cd19484e488..49e39c34b84 100644 --- a/src/xrGame/dynamic_obstacles_avoider.cpp +++ b/src/xrGame/dynamic_obstacles_avoider.cpp @@ -33,7 +33,7 @@ bool dynamic_obstacles_avoider::movement_enabled() const } #ifdef DEBUG return (false); -#endif // DEBUG +#endif // DEBUG } bool dynamic_obstacles_avoider::process_query(const bool& change_path_state) diff --git a/src/xrGame/eatable_item_object.h b/src/xrGame/eatable_item_object.h index 83ca88b452e..6192ee1f842 100644 --- a/src/xrGame/eatable_item_object.h +++ b/src/xrGame/eatable_item_object.h @@ -40,8 +40,8 @@ class CEatableItemObject : public CEatableItem, public CPhysicItem virtual void OnEvent(NET_Packet& P, u16 type); virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); - virtual void net_Import(NET_Packet& P); // import from server - virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Export(NET_Packet& P); // export to server virtual void save(NET_Packet& output_packet); virtual void load(IReader& input_packet); virtual BOOL net_SaveRelevant() { return TRUE; } @@ -54,12 +54,12 @@ class CEatableItemObject : public CEatableItem, public CPhysicItem public: ////////// network ////////////////////////////////////////////////// virtual void make_Interpolation(); - virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps + virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps #ifdef DEBUG - virtual void PH_Ch_CrPr(); // + virtual void PH_Ch_CrPr(); // #endif - virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps + virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps virtual bool NeedToDestroyObject() const; protected: diff --git a/src/xrGame/ef_base.h b/src/xrGame/ef_base.h index 15ac5647e82..24c2b84d525 100644 --- a/src/xrGame/ef_base.h +++ b/src/xrGame/ef_base.h @@ -8,7 +8,7 @@ #pragma once -#define OUT_MESSAGE(s1, s2) // Msg(s1,s2); +#define OUT_MESSAGE(s1, s2) // Msg(s1,s2); class CEntityAlive; class CSE_ALifeObject; diff --git a/src/xrGame/ef_primary.cpp b/src/xrGame/ef_primary.cpp index a9320f489f4..29f29838c82 100644 --- a/src/xrGame/ef_primary.cpp +++ b/src/xrGame/ef_primary.cpp @@ -267,7 +267,7 @@ float CEnemyRukzakWeightFunction::ffGetValue() else { // CSE_ALifeHumanAbstract *l_tpALifeHumanAbstract = - //smart_cast(ef_storage().alife().member()); + // smart_cast(ef_storage().alife().member()); // if (l_tpALifeHumanAbstract) // m_fLastValue = l_tpALifeHumanAbstract->m_fCumulativeItemMass; // else diff --git a/src/xrGame/enemy_manager.cpp b/src/xrGame/enemy_manager.cpp index 75b82d351e0..602410c8b7e 100644 --- a/src/xrGame/enemy_manager.cpp +++ b/src/xrGame/enemy_manager.cpp @@ -32,7 +32,7 @@ static const u32 ENEMY_INERTIA_TIME_FROM_ACTOR = 6000; #ifdef _DEBUG bool g_enemy_manager_second_update = false; -#endif // _DEBUG +#endif // _DEBUG #define USE_EVALUATOR @@ -129,10 +129,10 @@ float CEnemyManager::evaluate(const CEntityAlive* object) const float distance = m_object->Position().distance_to_sqr(object->Position()); return (penalty + distance / 100.f + ai().ef_storage().m_pfVictoryProbability->ffGetValue() / 100.f); -#else // USE_EVALUATOR +#else // USE_EVALUATOR float distance = m_object->Position().distance_to_sqr(object->Position()); return (1000.f * (visible ? 0.f : 1.f) + distance); -#endif // USE_EVALUATOR +#endif // USE_EVALUATOR } bool CEnemyManager::expedient(const CEntityAlive* object) const @@ -299,10 +299,10 @@ void CEnemyManager::process_wounded(bool& only_wounded) } if (only_wounded) { -#if 0 // def _DEBUG +#if 0 // def _DEBUG if (g_enemy_manager_second_update) Msg ("%6d ONLY WOUNDED LEFT %s",Device.dwTimeGlobal,*m_object->cName()); -#endif // _DEBUG +#endif // _DEBUG return; } @@ -385,10 +385,10 @@ void CEnemyManager::update() Level().autosave_manager().inc_not_ready(); } -#if 0 // def _DEBUG +#if 0 // def _DEBUG if (g_enemy_manager_second_update && selected() && smart_cast(selected()) && smart_cast(selected())->wounded()) Msg ("%6d WOUNDED CHOOSED %s",Device.dwTimeGlobal,*m_object->cName()); -#endif // _DEBUG +#endif // _DEBUG STOP_PROFILE } diff --git a/src/xrGame/entity_alive.cpp b/src/xrGame/entity_alive.cpp index b47ad46d5fe..72d2dd085b0 100644 --- a/src/xrGame/entity_alive.cpp +++ b/src/xrGame/entity_alive.cpp @@ -320,7 +320,7 @@ float CEntityAlive::CalcCondition(float /**hit/**/) conditions().UpdateCondition(); // dont call inherited::CalcCondition it will be meaningless - return conditions().GetHealthLost(); //*100.f; + return conditions().GetHealthLost(); //*100.f; } /////////////////////////////////////////////////////////////////////// @@ -718,7 +718,7 @@ struct element_predicate { return element.elem_id < element_id; } -}; // struct element_predicate +}; // struct element_predicate struct sort_surface_area_predicate { @@ -726,7 +726,7 @@ struct sort_surface_area_predicate { return left.second > right.second; } -}; // struct sort_surface_area_predicate +}; // struct sort_surface_area_predicate void CEntityAlive::OnChangeVisual() { @@ -858,7 +858,7 @@ Fvector CEntityAlive::get_new_local_point_on_mesh(u16& bone_id) const } case SBoneShape::stCylinder: { - float const total_square = (shape.cylinder.m_height + shape.cylinder.m_radius); // *2*PI*c_cylinder.m_radius + float const total_square = (shape.cylinder.m_height + shape.cylinder.m_radius); // *2*PI*c_cylinder.m_radius float const random_value = ::Random.randF(total_square); float const angle = ::Random.randF(2.f * PI); diff --git a/src/xrGame/entity_alive.h b/src/xrGame/entity_alive.h index 95a08ed9368..958f079734b 100644 --- a/src/xrGame/entity_alive.h +++ b/src/xrGame/entity_alive.h @@ -178,10 +178,10 @@ class CEntityAlive : public CEntity virtual u32 ef_detector_type() const; public: - virtual void OnHitHealthLoss(float NewHealth){}; //вызывается если entity теряет здоровье - virtual void OnCriticalHitHealthLoss(){}; //вызывается если entity умрет от хита - virtual void OnCriticalWoundHealthLoss(){}; //вызывается если entity умрет от потери крови - virtual void OnCriticalRadiationHealthLoss(){}; //вызывается если entity умрет от радиации + virtual void OnHitHealthLoss(float NewHealth){}; //вызывается если entity теряет здоровье + virtual void OnCriticalHitHealthLoss(){}; //вызывается если entity умрет от хита + virtual void OnCriticalWoundHealthLoss(){}; //вызывается если entity умрет от потери крови + virtual void OnCriticalRadiationHealthLoss(){}; //вызывается если entity умрет от радиации virtual CVisualMemoryManager* visual_memory() const { return (0); } virtual void net_Relcase(IGameObject* O); diff --git a/src/xrGame/event_conditions_collection.cpp b/src/xrGame/event_conditions_collection.cpp index 3b9ad39d741..8faebfd5f50 100644 --- a/src/xrGame/event_conditions_collection.cpp +++ b/src/xrGame/event_conditions_collection.cpp @@ -96,7 +96,7 @@ enum enum_hit_params_args hpa_bfunc, hpa_hit_distance, hpa_args_count -}; // enum enum_hit_params_args +}; // enum enum_hit_params_args bool event_conditions_collection::hit_params(arguments_t& arguments) { @@ -122,7 +122,7 @@ enum enum_kill_params_args kpa_kill_spec_kill_type, kpa_kill_time_period, kpa_args_count -}; // enum enum_kill_params_args +}; // enum enum_kill_params_args bool event_conditions_collection::kill_params(arguments_t& arguments) { @@ -146,7 +146,7 @@ enum enum_accumul_params_args cpa_bfunc, cpa_value, cpa_args_count -}; // enum enum_accumul_params_args +}; // enum enum_accumul_params_args bool event_conditions_collection::accumul_params(arguments_t& arguments) { @@ -178,7 +178,7 @@ bool event_conditions_collection::execute_condition(event_condition_t* cond) case eo_hit_params: result = hit_params(cond->m_arguments); break; case eo_kill_params: result = kill_params(cond->m_arguments); break; case eo_accumul_value_params: result = accumul_params(cond->m_arguments); break; - }; // switch (cond->m_operation) + }; // switch (cond->m_operation) return result; } @@ -327,4 +327,4 @@ event_condition_t* event_conditions_collection::add_accumm_value_condition( return add_condition(eo_accumul_value_params, args_buffer); } -} // namespace award_system +} // namespace award_system diff --git a/src/xrGame/event_conditions_collection.h b/src/xrGame/event_conditions_collection.h index dcf46b0adba..81a1cd91e66 100644 --- a/src/xrGame/event_conditions_collection.h +++ b/src/xrGame/event_conditions_collection.h @@ -13,10 +13,10 @@ enum enum_event_operation eo_logical_and = 0x00, eo_logical_or, // player predicates - eo_hit_params, // count, weapon_id, bone_id, operation for fly_dist, bullet fly_dist argument - eo_kill_params, // count, weapon_id, bone_id, operation for fly_dist, bullet fly_dist argument - eo_accumul_value_params // param name, operation for argument, argument -}; // enum enum_event_operation + eo_hit_params, // count, weapon_id, bone_id, operation for fly_dist, bullet fly_dist argument + eo_kill_params, // count, weapon_id, bone_id, operation for fly_dist, bullet fly_dist argument + eo_accumul_value_params // param name, operation for argument, argument +}; // enum enum_event_operation struct event_condition_t; @@ -31,7 +31,7 @@ struct event_argument_type at_u32_bfunction, at_operation, at_condition - }; // enum enum_type + }; // enum enum_type union union_argument_value { @@ -42,18 +42,18 @@ struct event_argument_type u32_binary_function* u32_function_ptr; enum_event_operation operation_value; event_condition_t* cond_ptr_value; - }; // union union_argument_value + }; // union union_argument_value enum_argument_type m_argument_type_tag; union_argument_value m_argument_value; -}; // struct event_argument_type +}; // struct event_argument_type typedef xr_vector arguments_t; struct event_condition_t { enum_event_operation m_operation; arguments_t m_arguments; -}; // struct event_condition_t +}; // struct event_condition_t struct event_root_condition_t { @@ -61,7 +61,7 @@ struct event_root_condition_t u32 m_rise_count; u32 m_game_mask; event_condition_t* m_root_condition; -}; // event_root_condition_t +}; // event_root_condition_t typedef fastdelegate::FastDelegate event_action_delegate_t; @@ -110,8 +110,8 @@ class event_conditions_collection bool execute_condition(event_condition_t* cond); void execute_root_condtiion(event_root_conditions_t::value_type& rcond); -}; // class event_conditions_collection +}; // class event_conditions_collection -} // namespace award_system +} // namespace award_system -#endif //#ifndef EVENT_CONDITIONS_COLLECTION_INCLUDED +#endif //#ifndef EVENT_CONDITIONS_COLLECTION_INCLUDED diff --git a/src/xrGame/faster_than_bullets_time.cpp b/src/xrGame/faster_than_bullets_time.cpp index c0b90038308..e2bd474f29c 100644 --- a/src/xrGame/faster_than_bullets_time.cpp +++ b/src/xrGame/faster_than_bullets_time.cpp @@ -75,4 +75,4 @@ void faster_than_bullets_time::OnPlayerKilled( } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/faster_than_bullets_time.h b/src/xrGame/faster_than_bullets_time.h index ffaaef7151a..6c9b9477eb0 100644 --- a/src/xrGame/faster_than_bullets_time.h +++ b/src/xrGame/faster_than_bullets_time.h @@ -24,12 +24,12 @@ class faster_than_bullets_time : public player_state_param protected: u32 m_no_demag_time; -}; // class faster_than_bullets_time +}; // class faster_than_bullets_time ADD_ACCUMULATIVE_STATE(acpv_faster_than_bullets_time, faster_than_bullets_time); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_faster_than_bullets_time, faster_than_bullets_time) -} // namespace award_system +} // namespace award_system -#endif //#ifndef FASTER_THAN_BULLETS_INCLUDED \ No newline at end of file +#endif //#ifndef FASTER_THAN_BULLETS_INCLUDED \ No newline at end of file diff --git a/src/xrGame/file_transfer.cpp b/src/xrGame/file_transfer.cpp index 154f3cc1cd8..d938e210f10 100644 --- a/src/xrGame/file_transfer.cpp +++ b/src/xrGame/file_transfer.cpp @@ -44,7 +44,7 @@ server_site::~server_site() } void server_site::stop_transfer_sessions( - buffer_vector const& tsessions) // notifies sending_rejected_by_peer + buffer_vector const& tsessions) // notifies sending_rejected_by_peer { for (buffer_vector::const_iterator i = tsessions.begin(), ie = tsessions.end(); i != ie; ++i) { @@ -52,7 +52,7 @@ void server_site::stop_transfer_sessions( } } -void server_site::stop_receiving_sessions(buffer_vector const& rsessions) // notifies receiving_timeout +void server_site::stop_receiving_sessions(buffer_vector const& rsessions) // notifies receiving_timeout { for (buffer_vector::const_iterator i = rsessions.begin(), ie = rsessions.end(); i != ie; ++i) { @@ -69,7 +69,7 @@ void server_site::update_transfer() for (transfer_sessions_t::iterator ti = m_transfers.begin(), tie = m_transfers.end(); ti != tie; ++ti) { - IClient* tmp_client = Level().Server->GetClientByID(ti->first.first); // dst + IClient* tmp_client = Level().Server->GetClientByID(ti->first.first); // dst if (!tmp_client) { Msg("! ERROR: SV: client [%u] not found for transfering file", ti->first); to_stop_transfers.push_back(ti->first); @@ -85,7 +85,7 @@ void server_site::update_transfer() NET_Packet tmp_packet; tmp_packet.w_begin(M_FILE_TRANSFER); tmp_packet.w_u8(receive_data); - tmp_packet.w_u32(ti->first.second.value()); // src + tmp_packet.w_u32(ti->first.second.value()); // src bool complete = tmp_ftnode->make_data_packet(tmp_packet); Level().Server->SendTo(tmp_client->ID, tmp_packet, net_flags(TRUE, TRUE, TRUE)); if (complete) { @@ -561,4 +561,4 @@ void client_site::dbg_update_statgraph() } #endif -} // namespace file_transfer \ No newline at end of file +} // namespace file_transfer \ No newline at end of file diff --git a/src/xrGame/file_transfer.h b/src/xrGame/file_transfer.h index c2a8e50521f..9f6db8052a3 100644 --- a/src/xrGame/file_transfer.h +++ b/src/xrGame/file_transfer.h @@ -89,6 +89,6 @@ class client_site }; }; -}; // namespace file_transfer +}; // namespace file_transfer -#endif //#ifndef FILETRANSFER \ No newline at end of file +#endif //#ifndef FILETRANSFER \ No newline at end of file diff --git a/src/xrGame/filereceiver_node.cpp b/src/xrGame/filereceiver_node.cpp index 84de233a1cb..8fa74f546ff 100644 --- a/src/xrGame/filereceiver_node.cpp +++ b/src/xrGame/filereceiver_node.cpp @@ -63,4 +63,4 @@ void split_received_to_buffers(u8* data_ptr, u32 data_size, buffer_vector& dst_buffers); -} // namespace file_transfer +} // namespace file_transfer -#endif //#ifndef FILERECEIVER_NODE \ No newline at end of file +#endif //#ifndef FILERECEIVER_NODE \ No newline at end of file diff --git a/src/xrGame/filetransfer_common.h b/src/xrGame/filetransfer_common.h index a412d30adbb..662bb1cd43e 100644 --- a/src/xrGame/filetransfer_common.h +++ b/src/xrGame/filetransfer_common.h @@ -3,17 +3,17 @@ namespace file_transfer { -u32 const data_max_chunk_size = 4096; // 4Kb on update ~ 80 Kb/sec -u32 const data_min_chunk_size = 128; // 2.5 Kb/sec +u32 const data_max_chunk_size = 4096; // 4Kb on update ~ 80 Kb/sec +u32 const data_min_chunk_size = 128; // 2.5 Kb/sec -enum sending_status_t // state for callback +enum sending_status_t // state for callback { sending_data = 0x00, sending_aborted_by_user = 0x01, sending_rejected_by_peer = 0x02, sending_complete = 0x03 }; -enum receiving_status_t // state for callback +enum receiving_status_t // state for callback { receiving_data = 0x00, receiving_aborted_by_peer = 0x01, @@ -22,11 +22,11 @@ enum receiving_status_t // state for callback receiving_complete = 0x04 }; -enum ft_command_t // command byte to M_FILE_TRANSFER message ... +enum ft_command_t // command byte to M_FILE_TRANSFER message ... { - receive_data = 0x00, // means that packet contain new chunk of data - abort_receive = 0x01, // this command send by source site, if he aborts file receiving .. - receive_rejected = 0x02 // this command send by dest site, if he doesn't want file.. + receive_data = 0x00, // means that packet contain new chunk of data + abort_receive = 0x01, // this command send by source site, if he aborts file receiving .. + receive_rejected = 0x02 // this command send by dest site, if he doesn't want file.. }; typedef fastdelegate::FastDelegate3 sending_state_callback_t; @@ -38,6 +38,6 @@ typedef std::pair const_buffer_t; void make_reject_packet(NET_Packet& packet, ClientID const& client); void make_abort_packet(NET_Packet& packet, ClientID const& client); -} // namespace file_transfer +} // namespace file_transfer -#endif //#ifndef FILETRANSFER_COMMON \ No newline at end of file +#endif //#ifndef FILETRANSFER_COMMON \ No newline at end of file diff --git a/src/xrGame/filetransfer_node.cpp b/src/xrGame/filetransfer_node.cpp index e0d9f53b7d3..1ad708b68e0 100644 --- a/src/xrGame/filetransfer_node.cpp +++ b/src/xrGame/filetransfer_node.cpp @@ -277,14 +277,14 @@ void filetransfer_node::calculate_chunk_size(u32 peak_throughput, u32 current_th { if ((Device.dwTimeGlobal - m_last_chunksize_update_time) < 1000) return; - if (m_last_peak_throughput < peak_throughput) // peak throughput is increasing, so we can increase upload size :) + if (m_last_peak_throughput < peak_throughput) // peak throughput is increasing, so we can increase upload size :) { m_chunk_size += data_min_chunk_size; #ifdef MP_LOGGING Msg("* peak throughout is not reached - increasing upload rate : (m_chunk_size: %d)", m_chunk_size); #endif } - else // peak is reached + else // peak is reached { if (OnServer()) { m_chunk_size = data_max_chunk_size; diff --git a/src/xrGame/filetransfer_node.h b/src/xrGame/filetransfer_node.h index a193c3c8311..781e21e14a5 100644 --- a/src/xrGame/filetransfer_node.h +++ b/src/xrGame/filetransfer_node.h @@ -17,7 +17,7 @@ class file_reader : private Noncopyable virtual u32 size() = 0; virtual u32 tell() = 0; virtual bool opened() const = 0; -}; // class file_reader +}; // class file_reader class disk_file_reader : public file_reader { @@ -31,7 +31,7 @@ class disk_file_reader : public file_reader virtual u32 size(); virtual u32 tell(); virtual bool opened() const; -}; // class disk_file_reader +}; // class disk_file_reader class memory_reader : public file_reader { @@ -45,7 +45,7 @@ class memory_reader : public file_reader virtual u32 size(); virtual u32 tell(); virtual bool opened() const; -}; // class memory_reader +}; // class memory_reader class buffers_vector_reader : public file_reader { @@ -68,12 +68,12 @@ class buffers_vector_reader : public file_reader u32 m_current_buf_offs; u32 m_complete_buffers_size; u32 m_sum_size; -}; // class buffer_vector_reader +}; // class buffer_vector_reader class memory_writer_reader : public file_reader { CMemoryWriter* m_writer_as_src; - u32 m_writer_pointer; // to read .. + u32 m_writer_pointer; // to read .. u32 const m_writer_max_size; public: @@ -84,7 +84,7 @@ class memory_writer_reader : public file_reader virtual u32 size(); virtual u32 tell(); virtual bool opened() const; -}; // class memory_writer_reader +}; // class memory_writer_reader class filetransfer_node { @@ -111,7 +111,7 @@ class filetransfer_node ~filetransfer_node(); void calculate_chunk_size(u32 peak_throughput, u32 current_throughput); - bool make_data_packet(NET_Packet& packet); // returns true if this is a last packet ... + bool make_data_packet(NET_Packet& packet); // returns true if this is a last packet ... void signal_callback(sending_status_t status); bool is_complete(); bool is_ready_to_send(); @@ -120,8 +120,8 @@ class filetransfer_node bool opened() const; // inline IReader* get_reader () { return m_reader; }; inline u32 const get_chunk_size() const { return m_chunk_size; }; -}; // class filetransfer_node +}; // class filetransfer_node -} // namespace file_transfer +} // namespace file_transfer -#endif //#ifndef FILETRANSFER_NODE \ No newline at end of file +#endif //#ifndef FILETRANSFER_NODE \ No newline at end of file diff --git a/src/xrGame/fire_disp_controller.cpp b/src/xrGame/fire_disp_controller.cpp index 90220d8055b..d7bedce15c5 100644 --- a/src/xrGame/fire_disp_controller.cpp +++ b/src/xrGame/fire_disp_controller.cpp @@ -5,7 +5,7 @@ #include "stdafx.h" #include "weapon.h" -float const CFireDispertionController::default_inertion = 5.91f; // time to pass value of dispertion = 1 +float const CFireDispertionController::default_inertion = 5.91f; // time to pass value of dispertion = 1 CFireDispertionController::CFireDispertionController() { diff --git a/src/xrGame/fire_disp_controller.h b/src/xrGame/fire_disp_controller.h index 12dd3a50831..0b91a2b48ad 100644 --- a/src/xrGame/fire_disp_controller.h +++ b/src/xrGame/fire_disp_controller.h @@ -15,6 +15,6 @@ class CFireDispertionController void SetDispertion(float const new_disp); float GetCurrentDispertion() const; void Update(); -}; // class CFireDispertionController +}; // class CFireDispertionController -#endif //#ifndef FIRE_DISP_CONTROLLER \ No newline at end of file +#endif //#ifndef FIRE_DISP_CONTROLLER \ No newline at end of file diff --git a/src/xrGame/firedeps.h b/src/xrGame/firedeps.h index 03e30a5e9c2..ca791821074 100644 --- a/src/xrGame/firedeps.h +++ b/src/xrGame/firedeps.h @@ -2,11 +2,11 @@ struct firedeps { - Fmatrix m_FireParticlesXForm; //направление для партиклов огня и дыма - Fvector vLastFP; // fire point - Fvector vLastFP2; // fire point2 - Fvector vLastFD; // fire direction - Fvector vLastSP; // shell point + Fmatrix m_FireParticlesXForm; //направление для партиклов огня и дыма + Fvector vLastFP; // fire point + Fvector vLastFP2; // fire point2 + Fvector vLastFD; // fire direction + Fvector vLastSP; // shell point firedeps() { diff --git a/src/xrGame/first_bullet_controller.h b/src/xrGame/first_bullet_controller.h index 8aaf189ddf0..1e43fb1daf7 100644 --- a/src/xrGame/first_bullet_controller.h +++ b/src/xrGame/first_bullet_controller.h @@ -16,6 +16,6 @@ class first_bullet_controller bool is_bullet_first(float actor_linear_velocity) const; inline float get_fire_dispertion() const { return m_fire_dispertion; }; void make_shot(); -}; // class first_bullet_controller +}; // class first_bullet_controller -#endif //#ifndef FIRST_BULLET_CONTROLLER \ No newline at end of file +#endif //#ifndef FIRST_BULLET_CONTROLLER \ No newline at end of file diff --git a/src/xrGame/flare.cpp b/src/xrGame/flare.cpp index 87db244a313..7f26f566a05 100644 --- a/src/xrGame/flare.cpp +++ b/src/xrGame/flare.cpp @@ -101,7 +101,7 @@ void CFlare::OnAnimationEnd(u32 state) void CFlare::SwitchOn() { - static int lt = 1; // IRender_Light::POINT + static int lt = 1; // IRender_Light::POINT static bool ls = true; light_render = GlobalEnv.Render->light_create(); light_render->set_type((IRender_Light::LT)lt); @@ -137,7 +137,7 @@ void CFlare::UpdateCL() SwitchOff(); return; } - if (_c + 2.0f > m_work_time_sec) // 2sec + if (_c + 2.0f > m_work_time_sec) // 2sec { DropFlare(); } diff --git a/src/xrGame/game_base.cpp b/src/xrGame/game_base.cpp index 398d020ec5d..e2996ee1b7f 100644 --- a/src/xrGame/game_base.cpp +++ b/src/xrGame/game_base.cpp @@ -150,24 +150,24 @@ void game_PlayerState::skip_Import(NET_Packet& P) { BOOL bFullUpdate = !!P.r_u8(); - P.r_u8(); // team ); + P.r_u8(); // team ); - P.r_s16(); // m_iRivalKills ); - P.r_s16(); // m_iSelfKills ); - P.r_s16(); // m_iTeamKills ); - P.r_s16(); // m_iDeaths ); + P.r_s16(); // m_iRivalKills ); + P.r_s16(); // m_iSelfKills ); + P.r_s16(); // m_iTeamKills ); + P.r_s16(); // m_iDeaths ); - P.r_s32(); // money_for_round ); - P.r_u8(); // rank ); - P.r_u8(); // af_count ); - P.r_u16(); // flags__ ); - P.r_u16(); // ping ); + P.r_s32(); // money_for_round ); + P.r_u8(); // rank ); + P.r_u8(); // af_count ); + P.r_u16(); // flags__ ); + P.r_u16(); // ping ); - P.r_u16(); // GameID ); - P.r_s8(); // skin ); - P.r_u8(); // m_bCurrentVoteAgreed ); + P.r_u16(); // GameID ); + P.r_s8(); // skin ); + P.r_u8(); // m_bCurrentVoteAgreed ); - P.r_u32(); // DeathTime + P.r_u32(); // DeathTime if (bFullUpdate) { player_account::skip_Import(P); } diff --git a/src/xrGame/game_base.h b/src/xrGame/game_base.h index b4ecbda8473..42923c7959f 100644 --- a/src/xrGame/game_base.h +++ b/src/xrGame/game_base.h @@ -7,7 +7,7 @@ #pragma pack(push, 1) -struct game_PlayerState; // fw +struct game_PlayerState; // fw class NET_Packet; struct RPoint diff --git a/src/xrGame/game_base_kill_type.h b/src/xrGame/game_base_kill_type.h index bb68d8b3282..5419d7c395d 100644 --- a/src/xrGame/game_base_kill_type.h +++ b/src/xrGame/game_base_kill_type.h @@ -17,7 +17,7 @@ enum SPECIAL_KILL_TYPE SKT_KNIFEKILL, SKT_PDA, - SKT_KIR, // Kill in Row + SKT_KIR, // Kill in Row SKT_NEWRANK, SKT_EYESHOT, diff --git a/src/xrGame/game_cl_artefacthunt.cpp b/src/xrGame/game_cl_artefacthunt.cpp index cfe82d21bff..28b1588bb50 100644 --- a/src/xrGame/game_cl_artefacthunt.cpp +++ b/src/xrGame/game_cl_artefacthunt.cpp @@ -173,7 +173,7 @@ void game_cl_ArtefactHunt::TranslateGameMessage(u32 msg, NET_Packet& P) switch (msg) { //-------------------UI MESSAGES - case GAME_EVENT_ARTEFACT_TAKEN: // ahunt + case GAME_EVENT_ARTEFACT_TAKEN: // ahunt { u16 PlayerID, Team; P.r_u16(PlayerID); @@ -199,7 +199,7 @@ void game_cl_ArtefactHunt::TranslateGameMessage(u32 msg, NET_Packet& P) PlaySndMessage(ID_AF_TEAM1_TAKE_ENEMY + ModifyTeam(Game().local_player->team)); } break; - case GAME_EVENT_ARTEFACT_DROPPED: // ahunt + case GAME_EVENT_ARTEFACT_DROPPED: // ahunt { u16 PlayerID, Team; P.r_u16(PlayerID); @@ -219,7 +219,7 @@ void game_cl_ArtefactHunt::TranslateGameMessage(u32 msg, NET_Packet& P) PlaySndMessage(ID_AF_LOST); } break; - case GAME_EVENT_ARTEFACT_ONBASE: // ahunt + case GAME_EVENT_ARTEFACT_ONBASE: // ahunt { u16 PlayerID, Team; P.r_u16(PlayerID); @@ -244,7 +244,7 @@ void game_cl_ArtefactHunt::TranslateGameMessage(u32 msg, NET_Packet& P) PlaySndMessage(ID_AF_TEAM1_ONBASE_ENEMY + ModifyTeam(Game().local_player->team)); } break; - case GAME_EVENT_ARTEFACT_SPAWNED: // ahunt + case GAME_EVENT_ARTEFACT_SPAWNED: // ahunt { xr_sprintf(Text, "%s%s", Color_Main, *st.translate("mp_art_spowned")); if (CurrentGameUI()) CurrentGameUI()->CommonMessageOut(Text); @@ -253,7 +253,7 @@ void game_cl_ArtefactHunt::TranslateGameMessage(u32 msg, NET_Packet& P) PlaySndMessage(ID_NEW_AF); } break; - case GAME_EVENT_ARTEFACT_DESTROYED: // ahunt + case GAME_EVENT_ARTEFACT_DESTROYED: // ahunt { xr_sprintf(Text, "%s%s", Color_Main, *st.translate("mp_art_destroyed")); u16 ArtefactID = P.r_u16(); @@ -306,7 +306,7 @@ void game_cl_ArtefactHunt::GetMapEntities(xr_vector& dst) VERIFY(pArtefact); IGameObject* pParent = pArtefact->H_Parent(); - if (!pParent) { // Artefact alone + if (!pParent) { // Artefact alone D.color = color_artefact; D.pos = pArtefact->Position(); dst.push_back(D); diff --git a/src/xrGame/game_cl_artefacthunt.h b/src/xrGame/game_cl_artefacthunt.h index 98cac85c8e5..3441507560a 100644 --- a/src/xrGame/game_cl_artefacthunt.h +++ b/src/xrGame/game_cl_artefacthunt.h @@ -26,10 +26,10 @@ class game_cl_ArtefactHunt : public game_cl_TeamDeathmatch virtual void OnBuySpawnMenu_Ok(); public: - u8 artefactsNum; // ah - u16 artefactBearerID; // ah,ZoneMap + u8 artefactsNum; // ah + u16 artefactBearerID; // ah,ZoneMap u16 old_artefactBearerID; - u8 teamInPossession; // ah,ZoneMap + u8 teamInPossession; // ah,ZoneMap u8 old_teamInPossession; u16 artefactID; u16 old_artefactID; diff --git a/src/xrGame/game_cl_base.cpp b/src/xrGame/game_cl_base.cpp index 1a6118bb6f6..ff54b66cd6d 100644 --- a/src/xrGame/game_cl_base.cpp +++ b/src/xrGame/game_cl_base.cpp @@ -18,7 +18,7 @@ LPCSTR GameTypeToString(EGameIDs gt, bool bShort); game_cl_GameState::game_cl_GameState() { - local_player = createPlayerState(NULL); // initializing account info + local_player = createPlayerState(NULL); // initializing account info m_WeaponUsageStatistic = NULL; m_game_type_name = 0; @@ -80,7 +80,7 @@ struct not_exsiting_clients_deleter { VERIFY(exist_clients); existing_clients_vector_t::iterator tmp_iter = std::find(exist_clients->begin(), exist_clients->end(), - value.first // key + value.first // key ); if (tmp_iter != exist_clients->end()) return false; @@ -93,7 +93,7 @@ struct not_exsiting_clients_deleter xr_delete(value.second); return true; } -}; // not_present_clients_deleter +}; // not_present_clients_deleter void game_cl_GameState::net_import_state(NET_Packet& P) { @@ -142,9 +142,9 @@ void game_cl_GameState::net_import_state(NET_Packet& P) } else { - if (ID == local_svdpnid) // Level().GetClientID()) + if (ID == local_svdpnid) // Level().GetClientID()) { - game_PlayerState::skip_Import(P); // this mean that local_player not created yet .. + game_PlayerState::skip_Import(P); // this mean that local_player not created yet .. continue; } @@ -334,7 +334,7 @@ void game_cl_GameState::sv_GameEventGen(NET_Packet& P) P.w_begin(M_EVENT); P.w_u32(Level().timeServer()); P.w_u16(u16(GE_GAME_EVENT & 0xffff)); - P.w_u16(0); // dest==0 + P.w_u16(0); // dest==0 } void game_cl_GameState::sv_EventSend(NET_Packet& P) diff --git a/src/xrGame/game_cl_base.h b/src/xrGame/game_cl_base.h index ce62777ab42..25bbbca6360 100644 --- a/src/xrGame/game_cl_base.h +++ b/src/xrGame/game_cl_base.h @@ -67,7 +67,7 @@ class game_cl_GameState : public game_GameState, public ScheduledBase virtual void Init(){}; virtual void net_import_state(NET_Packet& P); virtual void net_import_update(NET_Packet& P); - virtual void net_import_GameTime(NET_Packet& P); // update GameTime only for remote clients + virtual void net_import_GameTime(NET_Packet& P); // update GameTime only for remote clients virtual void net_signal(NET_Packet& P); virtual bool OnKeyboardPress(int key); diff --git a/src/xrGame/game_cl_base_weapon_usage_statistic.cpp b/src/xrGame/game_cl_base_weapon_usage_statistic.cpp index 45f53ba0ce6..2e96c69ab31 100644 --- a/src/xrGame/game_cl_base_weapon_usage_statistic.cpp +++ b/src/xrGame/game_cl_base_weapon_usage_statistic.cpp @@ -36,7 +36,7 @@ void HitData::net_save(NET_Packet* P, victims_table const& vt, bone_table const& { P->w_vec3(Pos0); P->w_vec3(Pos1); - P->w_u8(vt.get_id_by_name(TargetName)); // P->w_stringZ(TargetName); + P->w_u8(vt.get_id_by_name(TargetName)); // P->w_stringZ(TargetName); // P->w_stringZ(BoneName); P->w_s16(BoneID); P->w_u8(Deadly ? 1 : 0); @@ -46,9 +46,9 @@ void HitData::net_load(NET_Packet* P, victims_table const& vt, bone_table const& { P->r_vec3(Pos0); P->r_vec3(Pos1); - TargetName = vt.get_name_by_id(P->r_u8()); // P->r_stringZ(TargetName); + TargetName = vt.get_name_by_id(P->r_u8()); // P->r_stringZ(TargetName); P->r_s16(BoneID); - BoneName = bt.get_name_by_id(BoneID); // P->r_stringZ(BoneName); + BoneName = bt.get_name_by_id(BoneID); // P->r_stringZ(BoneName); Deadly = !!P->r_u8(); count = P->r_u8(); Completed = true; @@ -82,7 +82,7 @@ void Weapon_Statistic::net_save(NET_Packet* P, victims_table const& vt, bone_tab victims_table const& vtable; bone_table const& btable; - CompleteFilter& operator=(CompleteFilter& copy) { return *this; }; // C4512 + CompleteFilter& operator=(CompleteFilter& copy) { return *this; }; // C4512 public: CompleteFilter(u32& hits_count_result, NET_Packet* P, victims_table const& vt, bone_table const& bt) : complete_hits_count(hits_count_result), packet_to_write(P), vtable(vt), btable(bt){}; @@ -109,7 +109,7 @@ void Weapon_Statistic::net_save(NET_Packet* P, victims_table const& vt, bone_tab u32 hit_count_position = P->w_tell(); u32 complete_hits = 0; - P->w_u32(0); // <- complete_hits_count + P->w_u32(0); // <- complete_hits_count // P->w_u16(m_explosion_kills); // P->w_u16(m_bleed_kills); @@ -364,10 +364,10 @@ WeaponUsageStatistic::WeaponUsageStatistic() : m_mutex(MUTEX_PROFILE_ID(WeaponUsageStatistic)) { } -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { Clear(); - m_dwUpdateTimeDelta = 30000; // 30 seconds + m_dwUpdateTimeDelta = 30000; // 30 seconds m_bCollectStatistic = false; }; @@ -407,7 +407,7 @@ PLAYERS_STATS_it WeaponUsageStatistic::FindPlayer(LPCSTR PlayerName) if (!GetPlayer(PlayerName, pPlayerI)) { #ifdef DEBUG Msg("--- Adding new player [%s] to statistics", PlayerName); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG aPlayersStatistic.push_back(Player_Statistic(PlayerName)); pPlayerI = aPlayersStatistic.end() - 1; }; @@ -432,7 +432,7 @@ WEAPON_STATS_it Player_Statistic::FindPlayersWeapon(LPCSTR WeaponName) pWeaponI->InvName = pSettings->r_string_wb(WeaponName, "inv_name"); #ifdef DEBUG Msg("--- Just added weapon %s to statistics", WeaponName); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } return pWeaponI; }; @@ -903,7 +903,7 @@ void WeaponUsageStatistic::SVUpdateAliveTimes() void WeaponUsageStatistic::Update() { if (!CollectData()) return; - SVUpdateAliveTimes(); // update client alive time and servers total alive times + SVUpdateAliveTimes(); // update client alive time and servers total alive times if (!OnServer()) return; if (Level().timeServer() > (m_dwLastUpdateTime + m_dwUpdateTimeDelta)) { //--------------------------------------------- diff --git a/src/xrGame/game_cl_base_weapon_usage_statistic.h b/src/xrGame/game_cl_base_weapon_usage_statistic.h index abcf1f0c25c..a4d316b19bc 100644 --- a/src/xrGame/game_cl_base_weapon_usage_statistic.h +++ b/src/xrGame/game_cl_base_weapon_usage_statistic.h @@ -143,7 +143,7 @@ struct Player_Statistic u32 m_dwNumRespawned[STAT_TEAM_COUNT]; u8 m_dwArtefacts[STAT_TEAM_COUNT]; - u32 m_dwSpecialKills[4]; // headshot, backstab, knifekill, eyeshot + u32 m_dwSpecialKills[4]; // headshot, backstab, knifekill, eyeshot u8 m_dwCurrentTeam; @@ -168,8 +168,8 @@ struct Player_Statistic void Write(FILE* pFile); void WriteLtx(CInifile& ini, LPCSTR sect); - u32 create_victims_table(victims_table& victims_table); // retutns size in bytes of table - u32 create_bone_table(bone_table& bone_table); // retutns size in bytes of table + u32 create_victims_table(victims_table& victims_table); // retutns size in bytes of table + u32 create_bone_table(bone_table& bone_table); // retutns size in bytes of table }; DEF_VECTOR(PLAYERS_STATS, Player_Statistic); diff --git a/src/xrGame/game_cl_capture_the_artefact.cpp b/src/xrGame/game_cl_capture_the_artefact.cpp index 24d41952050..fec0c88b1d3 100644 --- a/src/xrGame/game_cl_capture_the_artefact.cpp +++ b/src/xrGame/game_cl_capture_the_artefact.cpp @@ -250,7 +250,7 @@ void game_cl_CaptureTheArtefact::TranslateGameMessage(u32 msg, NET_Packet& P) //-------------------UI MESSAGES case GAME_EVENT_ARTEFACT_TAKEN: { - ClientID clientId; // who took the artefact + ClientID clientId; // who took the artefact u8 artefactOwnerTeam; P.r_u8(artefactOwnerTeam); P.r_clientID(clientId); @@ -305,9 +305,9 @@ void game_cl_CaptureTheArtefact::TranslateGameMessage(u32 msg, NET_Packet& P) // Update UI statistics } break; - case GAME_EVENT_ARTEFACT_DROPPED: // ahunt + case GAME_EVENT_ARTEFACT_DROPPED: // ahunt { - ClientID clientId; // who dropped the artefact + ClientID clientId; // who dropped the artefact u8 artefactOwnerTeam; P.r_u8(artefactOwnerTeam); P.r_clientID(clientId); @@ -334,7 +334,7 @@ void game_cl_CaptureTheArtefact::TranslateGameMessage(u32 msg, NET_Packet& P) if (ps) { xr_sprintf(Text, "%s%s %s%s", CTeamInfo::GetTeam_color_tag(ModifyTeam(ps->team) + 1), ps->getName(), Color_Main, - st.translate("mp_has_dropped_artefact").c_str()); // need translate + st.translate("mp_has_dropped_artefact").c_str()); // need translate if (m_reward_generator) m_reward_generator->OnPlayerDropArtefact(ps); } @@ -350,11 +350,11 @@ void game_cl_CaptureTheArtefact::TranslateGameMessage(u32 msg, NET_Packet& P) { u8 delivererTeam; P.r_u8(delivererTeam); - u16 deliverer_id; // who deliver the artefact + u16 deliverer_id; // who deliver the artefact P.r_u16(deliverer_id); game_PlayerState const* ps = GetPlayerByGameID(deliverer_id); - if (!local_player) // can be NULL, because not actor or spectator spawned yet... + if (!local_player) // can be NULL, because not actor or spectator spawned yet... return; if (m_reward_generator) m_reward_generator->OnPlayerBringArtefact(ps); @@ -981,7 +981,7 @@ bool game_cl_CaptureTheArtefact::CanBeReady() } #ifndef MASTER_GOLD Msg("---CanBeReady = true: [%s][%d]", local_player->getName(), local_player->GameID); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return true; } @@ -1061,10 +1061,10 @@ void game_cl_CaptureTheArtefact::OnGameRoundStarted() { inherited::OnGameRoundStarted(); if (local_player && IsLocalPlayerInitialized()) { - OnTeamChanged(); // updates buy menu... + OnTeamChanged(); // updates buy menu... #ifdef DEBUG Msg("--- CTA: Round started !!!"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } if (m_reward_generator) m_reward_generator->OnRoundStart(); } @@ -1101,7 +1101,7 @@ void game_cl_CaptureTheArtefact::PlayRankChangedSnd() { if (!local_player) return; - if (local_player->rank >= 4) // need to add new sound + if (local_player->rank >= 4) // need to add new sound return; ETeam my_team = static_cast(local_player->team); diff --git a/src/xrGame/game_cl_capture_the_artefact.h b/src/xrGame/game_cl_capture_the_artefact.h index 597b16b97e7..4c42b2c6741 100644 --- a/src/xrGame/game_cl_capture_the_artefact.h +++ b/src/xrGame/game_cl_capture_the_artefact.h @@ -37,7 +37,7 @@ class game_cl_CaptureTheArtefact : public game_cl_mp bool haveGotUpdate; // bool sendedSpawnMe; - u16 greenArtefactOwner; // GameID, if 0, then no body took the artefact + u16 greenArtefactOwner; // GameID, if 0, then no body took the artefact u16 blueArtefactOwner; const shared_str& GetLocalPlayerTeamSection() const; diff --git a/src/xrGame/game_cl_capture_the_artefact_captions_manager.cpp b/src/xrGame/game_cl_capture_the_artefact_captions_manager.cpp index 115472700c9..e1edd75401d 100644 --- a/src/xrGame/game_cl_capture_the_artefact_captions_manager.cpp +++ b/src/xrGame/game_cl_capture_the_artefact_captions_manager.cpp @@ -175,7 +175,7 @@ u32 CTAGameClCaptionsManager::SetWarmupTime(u32 current_warmup_time, u32 current CStringTable st; ConvertTime2String(time_str, time_remains); - warmup_message[0] = 0; // bad style + warmup_message[0] = 0; // bad style if (time_remains > 10000) { strconcat(sizeof(warmup_message), warmup_message, *st.translate("mp_time2start"), " ", time_str); } diff --git a/src/xrGame/game_cl_capture_the_artefact_captions_manager.h b/src/xrGame/game_cl_capture_the_artefact_captions_manager.h index b84d98b1a67..a9b6921a40e 100644 --- a/src/xrGame/game_cl_capture_the_artefact_captions_manager.h +++ b/src/xrGame/game_cl_capture_the_artefact_captions_manager.h @@ -40,6 +40,6 @@ class CTAGameClCaptionsManager : private Noncopyable u32 SetWarmupTime(u32 current_warmup_time, u32 current_time); void SetTimeLimit(u32 time_limit, u32 current_time); -}; // end class CTAGameClCaptionsManager +}; // end class CTAGameClCaptionsManager -#endif // GAME_CL_CTA_CAPTIONS_MANAGER \ No newline at end of file +#endif // GAME_CL_CTA_CAPTIONS_MANAGER \ No newline at end of file diff --git a/src/xrGame/game_cl_capturetheartefact_buywnd.cpp b/src/xrGame/game_cl_capturetheartefact_buywnd.cpp index 046c61d70d5..51c3f154ffc 100644 --- a/src/xrGame/game_cl_capturetheartefact_buywnd.cpp +++ b/src/xrGame/game_cl_capturetheartefact_buywnd.cpp @@ -14,7 +14,7 @@ void game_cl_CaptureTheArtefact::OnBuyMenu_Ok() { #ifdef DEBUG Msg("--- CTA: Buy menu OK..."); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG typedef CUIGameCTA::BuyMenuItemsCollection TBuyCol; VERIFY2(m_game_ui, "game ui not initialized"); diff --git a/src/xrGame/game_cl_deathmatch.h b/src/xrGame/game_cl_deathmatch.h index 15762779dae..2c22f65d3bc 100644 --- a/src/xrGame/game_cl_deathmatch.h +++ b/src/xrGame/game_cl_deathmatch.h @@ -21,10 +21,10 @@ class game_cl_Deathmatch : public game_cl_mp public: game_cl_Deathmatch(); virtual ~game_cl_Deathmatch(); - s32 m_s32FragLimit; // dm,tdm,ah - s32 m_s32TimeLimit; // dm + s32 m_s32FragLimit; // dm,tdm,ah + s32 m_s32TimeLimit; // dm bool m_bDamageBlockIndicators; - xr_vector teams; // dm,tdm,ah + xr_vector teams; // dm,tdm,ah u32 m_u32ForceRespawn; u32 m_cl_dwWarmUp_Time; @@ -119,7 +119,7 @@ class game_cl_Deathmatch : public game_cl_mp virtual char* getTeamSection(int Team); virtual void SetCurrentBuyMenu(); - virtual void SetCurrentSkinMenu(); // {pCurSkinMenu = pSkinMenuTeam0; }; + virtual void SetCurrentSkinMenu(); // {pCurSkinMenu = pSkinMenuTeam0; }; virtual void OnSpectatorSelect(); diff --git a/src/xrGame/game_cl_deathmatch_buywnd.cpp b/src/xrGame/game_cl_deathmatch_buywnd.cpp index 63658640702..5c35c278974 100644 --- a/src/xrGame/game_cl_deathmatch_buywnd.cpp +++ b/src/xrGame/game_cl_deathmatch_buywnd.cpp @@ -42,7 +42,7 @@ void game_cl_Deathmatch::OnBuyMenu_Ok() PRESET_ITEMS tmpItems; tmpItems.clear(); - const preset_items* _p = &(pCurBuyMenu->GetPreset(_preset_idx_last)); //_preset_idx_last : _preset_idx_origin); + const preset_items* _p = &(pCurBuyMenu->GetPreset(_preset_idx_last)); //_preset_idx_last : _preset_idx_origin); if (_p->size() == 0) { if (!pActor || !pActor->g_Alive()) _p = &(pCurBuyMenu->GetPreset(_preset_idx_origin)); } @@ -117,7 +117,7 @@ void game_cl_Deathmatch::OnBuyMenu_DefaultItems() pCurBuyMenu->SectionToSlot(u8((ItemID&0xff00)>>0x08), u8(ItemID&0x00ff), false); }; -*/ //--------------------------------------------------------- +*/ //--------------------------------------------------------- SetBuyMenuItems(&PlayerDefItems, TRUE); }; @@ -371,7 +371,7 @@ void game_cl_Deathmatch::LoadDefItemsForRank(IBuyWnd* pBuyMenu) { // s16* pItemID = &(PlayerDefItems[it]); // char* ItemName = pBuyMenu->GetWeaponNameByIndex(u8(((*pItemID)&0xff00)>>0x08), - //u8((*pItemID)&0x00ff)); + // u8((*pItemID)&0x00ff)); PresetItem* pDefItem = &(PlayerDefItems[it]); const shared_str& ItemName = pBuyMenu->GetWeaponNameByIndex(pDefItem->SlotID, pDefItem->ItemID); if (!ItemName.size()) continue; diff --git a/src/xrGame/game_cl_mp.cpp b/src/xrGame/game_cl_mp.cpp index 7c20215b912..c90eedf4150 100644 --- a/src/xrGame/game_cl_mp.cpp +++ b/src/xrGame/game_cl_mp.cpp @@ -43,7 +43,7 @@ #include "reward_manager.h" #include "stats_submitter.h" -#include "xrServer_info.h" //for enum_server_info_type +#include "xrServer_info.h" //for enum_server_info_type #define KILLEVENT_ICONS "ui\\ui_hud_mp_icon_death" #define RADIATION_ICONS "ui\\ui_mn_radiations_hard" @@ -93,7 +93,7 @@ game_cl_mp::game_cl_mp() xr_sprintf(BuySpawnText, "You can buy a spawn for %d $. Press Yes to pay.", abs(m_iSpawn_Cost)); pBuySpawnMsgBox->SetText(BuySpawnText); -*/ //----------------------------------------------------------- +*/ //----------------------------------------------------------- m_reward_generator = NULL; m_ready_to_open_buy_menu = true; m_reward_manager = NULL; @@ -192,7 +192,7 @@ bool game_cl_mp::OnKeyboardPress(int key) CGameObject* GO = smart_cast(curr); #ifdef DEBUG Msg("---I'm ready (ID = %d) sending player ready packet !!!", GO->ID()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG NET_Packet P; GO->u_EventGen(P, GE_GAME_EVENT, GO->ID()); P.w_u16(GAME_EVENT_PLAYER_READY); @@ -203,7 +203,7 @@ bool game_cl_mp::OnKeyboardPress(int key) { #ifdef DEBUG Msg("---I'm not ready, is_actor = %d, is_spectator = %d", is_actor, is_spectator); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return false; } }; @@ -342,7 +342,7 @@ void game_cl_mp::TranslateGameMessage(u32 msg, NET_Packet& P) switch (msg) { - case GAME_EVENT_PLAYER_KILLED: // dm + case GAME_EVENT_PLAYER_KILLED: // dm { OnPlayerKilled(P); } @@ -386,7 +386,7 @@ void game_cl_mp::TranslateGameMessage(u32 msg, NET_Packet& P) case GAME_EVENT_ROUND_STARTED: { OnGameRoundStarted(); #ifdef DEBUG Msg("--- On round started !!!"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } break; case GAME_EVENT_ROUND_END: @@ -395,7 +395,7 @@ void game_cl_mp::TranslateGameMessage(u32 msg, NET_Packet& P) P.r_stringZ(reason); #ifdef DEBUG Msg("--- On round end !!!"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } break; case GAME_EVENT_SERVER_STRING_MESSAGE: @@ -477,7 +477,7 @@ void game_cl_mp::ChatSay(LPCSTR phrase, bool bAll) NET_Packet P; P.w_begin(M_CHAT_MESSAGE); - P.w_s16((bAll) ? -1 : local_player->team); // -1 = all, 0 = green, 1 = blue + P.w_s16((bAll) ? -1 : local_player->team); // -1 = all, 0 = green, 1 = blue P.w_stringZ(local_player->getName()); P.w_stringZ(phrase); P.w_s16(team); @@ -595,7 +595,7 @@ void game_cl_mp::shedule_Update(u32 dt) if (m_pMessageBox && m_pMessageBox->IsShown()) { m_pMessageBox->HideDialog(); } - if (m_pVoteRespondWindow && m_pVoteRespondWindow->IsShown()) // && IsVotingActive()) + if (m_pVoteRespondWindow && m_pVoteRespondWindow->IsShown()) // && IsVotingActive()) { m_pVoteRespondWindow->HideDialog(); } @@ -800,7 +800,7 @@ void game_cl_mp::OnPlayerKilled(NET_Packet& P) if (!pPlayer) { #ifndef MASTER_GOLD Msg("! Non existant player[%d] killed by [%d] with [%d]", KilledID, KillerID, WeaponID); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } R_ASSERT(pPlayer); @@ -817,7 +817,7 @@ void game_cl_mp::OnPlayerKilled(NET_Packet& P) switch (KillType) { //----------------------------------------------------------- - case KT_HIT: // from hit + case KT_HIT: // from hit { string1024 sWeapon = "", sSpecial = ""; if (pWeapon) { @@ -875,7 +875,7 @@ void game_cl_mp::OnPlayerKilled(NET_Packet& P) //------------------------------------------- switch (SpecialKill) { - case SKT_NONE: // not special + case SKT_NONE: // not special { if (pOKiller && pOKiller == Level().CurrentViewEntity()) { // if (pWeapon && pWeapon->CLS_ID == CLSID_OBJECT_W_KNIFE) @@ -885,7 +885,7 @@ void game_cl_mp::OnPlayerKilled(NET_Packet& P) }; } break; - case SKT_HEADSHOT: // Head Shot + case SKT_HEADSHOT: // Head Shot { BONUSES_it it = std::find(m_pBonusList.begin(), m_pBonusList.end(), "headshot"); if (it != m_pBonusList.end() && (*it == "headshot")) { @@ -919,7 +919,7 @@ void game_cl_mp::OnPlayerKilled(NET_Packet& P) if (pOKiller && pOKiller == Level().CurrentViewEntity()) PlaySndMessage(ID_ASSASSIN); } break; - case SKT_BACKSTAB: // BackStab + case SKT_BACKSTAB: // BackStab { BONUSES_it it = std::find(m_pBonusList.begin(), m_pBonusList.end(), "backstab"); if (it != m_pBonusList.end() && (*it == "backstab")) { @@ -957,7 +957,7 @@ void game_cl_mp::OnPlayerKilled(NET_Packet& P) } break; //----------------------------------------------------------- - case KT_BLEEDING: // from bleeding + case KT_BLEEDING: // from bleeding { KMS.m_initiator.m_shader = GetBloodLossIconsShader(); KMS.m_initiator.m_rect.x1 = 238; @@ -993,7 +993,7 @@ void game_cl_mp::OnPlayerKilled(NET_Packet& P) } break; //----------------------------------------------------------- - case KT_RADIATION: // from radiation + case KT_RADIATION: // from radiation { KMS.m_initiator.m_shader = GetRadiationIconsShader(); KMS.m_initiator.m_rect.x1 = 215; @@ -1105,7 +1105,7 @@ void game_cl_mp::net_import_state(NET_Packet& P) bool game_cl_mp::Is_Spectator_Camera_Allowed(CSpectator::EActorCameras Camera) { - if (Level().IsDemoPlay()) // all cameras allowed in demo play mode + if (Level().IsDemoPlay()) // all cameras allowed in demo play mode return true; /* switch (Camera) @@ -1483,8 +1483,8 @@ void game_cl_mp::start_receive_server_info(ClientID const& svclient_id) tmp_binder->m_file_name = ""; tmp_binder->m_owner = this; tmp_binder->m_active = true; - tmp_binder->m_downloaded_size = 0; // initial value for rendering - tmp_binder->m_max_size = 1; // avoiding division by zero + tmp_binder->m_downloaded_size = 0; // initial value for rendering + tmp_binder->m_max_size = 1; // avoiding division by zero file_transfer::receiving_state_callback_t receiving_cb_info = fastdelegate::MakeDelegate(tmp_binder, &game_cl_mp::fr_callback_binder::receiving_serverinfo_callback); @@ -1522,8 +1522,8 @@ void game_cl_mp::PrepareToReceiveFile( tmp_binder->m_file_name = screen_shot_fn; tmp_binder->m_owner = this; tmp_binder->m_active = true; - tmp_binder->m_downloaded_size = 0; // initial value for rendering - tmp_binder->m_max_size = 1; // avoiding division by zero + tmp_binder->m_downloaded_size = 0; // initial value for rendering + tmp_binder->m_max_size = 1; // avoiding division by zero tmp_binder->m_response_type = response_event; file_transfer::receiving_state_callback_t receiving_cb = @@ -1591,7 +1591,7 @@ void __stdcall game_cl_mp::fr_callback_binder::receiving_file_callback( } break; default: NODEFAULT; - }; // switch (m_response_type) + }; // switch (m_response_type) m_active = false; } diff --git a/src/xrGame/game_cl_mp.h b/src/xrGame/game_cl_mp.h index fc08aa123e2..5a38a7414d2 100644 --- a/src/xrGame/game_cl_mp.h +++ b/src/xrGame/game_cl_mp.h @@ -17,7 +17,7 @@ class CUIMessageBoxEx; namespace award_system { class reward_manager; -} // namespace award_system +} // namespace award_system struct SND_Message { @@ -43,7 +43,7 @@ struct SND_Message struct cl_TeamStruct { - shared_str caSection; // имя секции комманды + shared_str caSection; // имя секции комманды //----------------------------------- ui_shader IndicatorShader; ui_shader InvincibleShader; @@ -305,8 +305,8 @@ class game_cl_mp : public game_cl_GameState shared_str m_file_name; string256 m_diff; u32 m_detect_time; - static u32 const max_showing_time = 10000; // 10 seconds - }; // struct detected_cheater_t + static u32 const max_showing_time = 10000; // 10 seconds + }; // struct detected_cheater_t void add_detected_cheater(shared_str const& file_name, string256 diff); private: diff --git a/src/xrGame/game_cl_mp_messages_menu.cpp b/src/xrGame/game_cl_mp_messages_menu.cpp index 58792ce4d5f..3b7509abab4 100644 --- a/src/xrGame/game_cl_mp_messages_menu.cpp +++ b/src/xrGame/game_cl_mp_messages_menu.cpp @@ -57,9 +57,9 @@ void game_cl_mp::AddMessageMenu(LPCSTR menu_section, LPCSTR snd_path, LPCSTR tea pNewTeamSound->push_back(cl_Message_Sound()); cl_Message_Sound* pMsgSound = &(pNewTeamSound->back()); pMsgSound->mSound_Voice.create( - FileName_Voice, st_Effect, sg_SourceType); // Msg("-- %s Loaded", FileName_Voice); + FileName_Voice, st_Effect, sg_SourceType); // Msg("-- %s Loaded", FileName_Voice); pMsgSound->mSound_Radio.create( - FileName_Radio, st_Effect, sg_SourceType); // Msg("-- %s Loaded", FileName_Radio); + FileName_Radio, st_Effect, sg_SourceType); // Msg("-- %s Loaded", FileName_Radio); } else { diff --git a/src/xrGame/game_cl_mp_snd_messages.cpp b/src/xrGame/game_cl_mp_snd_messages.cpp index 859115ee99f..3d72a6f2d92 100644 --- a/src/xrGame/game_cl_mp_snd_messages.cpp +++ b/src/xrGame/game_cl_mp_snd_messages.cpp @@ -35,7 +35,7 @@ struct sound_ptr_search_predicate return false; } u32 m_search_id; -}; // struct sound_ptr_search_predicate +}; // struct sound_ptr_search_predicate void game_cl_mp::PlaySndMessage(u32 ID) { diff --git a/src/xrGame/game_cl_mp_snd_messages.h b/src/xrGame/game_cl_mp_snd_messages.h index e4046feec71..e3dda82d4de 100644 --- a/src/xrGame/game_cl_mp_snd_messages.h +++ b/src/xrGame/game_cl_mp_snd_messages.h @@ -2,7 +2,7 @@ enum { - ID_HEADSHOT = 0, // 0 + ID_HEADSHOT = 0, // 0 ID_ASSASSIN, ID_BUTCHER, ID_READY, diff --git a/src/xrGame/game_cl_teamdeathmatch.cpp b/src/xrGame/game_cl_teamdeathmatch.cpp index f02bb737c41..8d52f0891d3 100644 --- a/src/xrGame/game_cl_teamdeathmatch.cpp +++ b/src/xrGame/game_cl_teamdeathmatch.cpp @@ -33,7 +33,7 @@ const shared_str game_cl_TeamDeathmatch::GetTeamMenu(s16 team) }; #ifdef DEBUG return NULL; -#endif // DEBUG +#endif // DEBUG } game_cl_TeamDeathmatch::game_cl_TeamDeathmatch() @@ -111,7 +111,7 @@ void game_cl_TeamDeathmatch::TranslateGameMessage(u32 msg, NET_Packet& P) switch (msg) { - case GAME_EVENT_PLAYER_JOIN_TEAM: // tdm + case GAME_EVENT_PLAYER_JOIN_TEAM: // tdm { string64 PlayerName; P.r_stringZ(PlayerName); @@ -119,7 +119,7 @@ void game_cl_TeamDeathmatch::TranslateGameMessage(u32 msg, NET_Packet& P) P.r_u16(Team); xr_sprintf(Text, "%s%s %s%s %s%s", - "", // no color + "", // no color PlayerName, Color_Main, *st.translate("mp_joined"), CTeamInfo::GetTeam_color_tag(int(Team)), CTeamInfo::GetTeam_name(int(Team))); if (CurrentGameUI()) CurrentGameUI()->CommonMessageOut(Text); @@ -128,7 +128,7 @@ void game_cl_TeamDeathmatch::TranslateGameMessage(u32 msg, NET_Packet& P) } break; - case PLAYER_CHANGE_TEAM: // tdm + case PLAYER_CHANGE_TEAM: // tdm { u16 PlayerID, OldTeam, NewTeam; P.r_u16(PlayerID); diff --git a/src/xrGame/game_events_handler.h b/src/xrGame/game_events_handler.h index c6670490f57..42a50562d23 100644 --- a/src/xrGame/game_events_handler.h +++ b/src/xrGame/game_events_handler.h @@ -26,8 +26,8 @@ class game_events_handler virtual void OnPlayerRankChanged() = 0; virtual void OnRoundEnd() = 0; virtual void OnRoundStart() = 0; -}; // class game_events_handler +}; // class game_events_handler -} // namespace award_system +} // namespace award_system -#endif //#ifndef GAME_EVENTS_HANDLER_INCLUDED \ No newline at end of file +#endif //#ifndef GAME_EVENTS_HANDLER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/game_state_accumulator.cpp b/src/xrGame/game_state_accumulator.cpp index 263b55c6ad5..3f9f3cd26c2 100644 --- a/src/xrGame/game_state_accumulator.cpp +++ b/src/xrGame/game_state_accumulator.cpp @@ -275,7 +275,7 @@ bool game_state_accumulator::check_hit_params(u32 count, ammunition_group::enum_ bone_group::enum_group_id m_bone_gid; float_binary_function* m_func; float m_right_arg; - }; // struct hit_fetcher + }; // struct hit_fetcher if (!m_local_player) return false; @@ -322,7 +322,7 @@ bool game_state_accumulator::check_kill_params(u32 count, ammunition_group::enum KILL_TYPE m_kill_type; SPECIAL_KILL_TYPE m_spec_kill; ammunition_group::enum_group_id m_weapon_gid; - }; // struct kills_fetcher + }; // struct kills_fetcher if (!m_local_player) return false; @@ -459,4 +459,4 @@ bool game_state_accumulator::is_enemies(game_PlayerState const* left_player, gam return false; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/game_state_accumulator.h b/src/xrGame/game_state_accumulator.h index 5761d56af8d..176fd7ad344 100644 --- a/src/xrGame/game_state_accumulator.h +++ b/src/xrGame/game_state_accumulator.h @@ -17,7 +17,7 @@ namespace award_system { #ifdef DEBUG extern char* player_values_strtable[]; -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG class game_state_accumulator : public game_events_handler { @@ -99,10 +99,10 @@ class game_state_accumulator : public game_events_handler ammunition_group m_amm_groups; bone_group m_bone_groups; -}; // class game_state_accumulator +}; // class game_state_accumulator #include "game_state_accumulator_inline.h" -} // namespace award_system +} // namespace award_system -#endif //#ifndef GAME_STATE_ACCUMULATOR_INCLUDED \ No newline at end of file +#endif //#ifndef GAME_STATE_ACCUMULATOR_INCLUDED \ No newline at end of file diff --git a/src/xrGame/game_state_accumulator_state_register.cpp b/src/xrGame/game_state_accumulator_state_register.cpp index 02e6ed27f79..9fb03ccb3ca 100644 --- a/src/xrGame/game_state_accumulator_state_register.cpp +++ b/src/xrGame/game_state_accumulator_state_register.cpp @@ -41,7 +41,7 @@ char* player_values_strtable[] = { "move_velocity", "move_angular_velocity", "sprinter_victim_velocity", "marksman_count", "ambassador", "remembrance", "avenger", "cherub_ready", "stalker_flair", "black_list", "thunder_count", "killer_victim_angle_cos", }; -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG void game_state_accumulator::init_accumulative_values() { @@ -51,4 +51,4 @@ void game_state_accumulator::init_accumulative_values() init_acpv_list(); } -} // namespace award_system +} // namespace award_system diff --git a/src/xrGame/game_sv_artefacthunt.cpp b/src/xrGame/game_sv_artefacthunt.cpp index 5c6f604841c..d0ff110ddc8 100644 --- a/src/xrGame/game_sv_artefacthunt.cpp +++ b/src/xrGame/game_sv_artefacthunt.cpp @@ -27,7 +27,7 @@ extern BOOL g_sv_tdm_bAutoTeamSwap; u32 g_sv_ah_dwArtefactRespawnDelta = 30; int g_sv_ah_dwArtefactsNum = 10; u32 g_sv_ah_dwArtefactStayTime = 3; -int g_sv_ah_iReinforcementTime = 15; // 0 - Immediate, -1 - after artefact spawn , other - reinforcement +int g_sv_ah_iReinforcementTime = 15; // 0 - Immediate, -1 - after artefact spawn , other - reinforcement BOOL g_sv_ah_bBearerCantSprint = FALSE; BOOL g_sv_ah_bShildedBases = TRUE; BOOL g_sv_ah_bAfReturnPlayersToBases = TRUE; @@ -359,7 +359,7 @@ void game_sv_ArtefactHunt::assign_RP(CSE_Abstract* E, game_PlayerState* ps_who) u32 Team = RP_2_Use(E); #ifdef DEBUG Msg("--- ArtefactHunt RPoint for %s uses team %d", ps_who->getName(), Team); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG R_ASSERT(rpoints[Team].size()); xr_vector& rps = rpoints[Team]; @@ -370,7 +370,7 @@ void game_sv_ArtefactHunt::assign_RP(CSE_Abstract* E, game_PlayerState* ps_who) if (!assign_rp_tmp(ps_who, rps, rpID, rpIDEnemy, EnemyIt, true)) { #ifdef DEBUG Msg("--- No free Arthfacthunt rpoints found, trying to find rpoints with enemies!"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG assign_rp_tmp(ps_who, rps, rpID, rpIDEnemy, EnemyIt, false); } @@ -733,7 +733,7 @@ void game_sv_ArtefactHunt::SpawnArtefact() else return; - E->s_flags.assign(M_SPAWN_OBJECT_LOCAL); // flags + E->s_flags.assign(M_SPAWN_OBJECT_LOCAL); // flags Assign_Artefact_RPoint(E); @@ -903,7 +903,7 @@ void game_sv_ArtefactHunt::Assign_Artefact_RPoint(CSE_Abstract* E) u32 ID = ArtefactChooserRandom.randI((int)rp.size()); #ifndef MASTER_GOLD Msg("---select artefact RPoint [%d]", ID); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD r = rp[ID]; E->o_Position.set(r.P); E->o_Angle.set(r.A); @@ -917,7 +917,7 @@ void game_sv_ArtefactHunt::OnTimelimitExceed() m_phase = u16((winning_team) ? GAME_PHASE_TEAM2_SCORES : GAME_PHASE_TEAM1_SCORES); switch_Phase(m_phase); - OnDelayedRoundEnd(eRoundEnd_TimeLimit); // "Team Final Score" + OnDelayedRoundEnd(eRoundEnd_TimeLimit); // "Team Final Score" }; void game_sv_ArtefactHunt::net_Export_State(NET_Packet& P, ClientID id_to) @@ -1260,7 +1260,7 @@ void game_sv_ArtefactHunt::CheckForTeamElimination() m_phase = u16((WinTeam == 1) ? GAME_PHASE_TEAM2_ELIMINATED : GAME_PHASE_TEAM1_ELIMINATED); switch_Phase(m_phase); - OnDelayedTeamEliminated(); // OnDelayedRoundEnd( eRoundEnd_FragLimit ); //?? "Team Eliminated" + OnDelayedTeamEliminated(); // OnDelayedRoundEnd( eRoundEnd_FragLimit ); //?? "Team Eliminated" RemoveArtefact(); } @@ -1298,7 +1298,7 @@ void game_sv_ArtefactHunt::CheckForTeamWin() m_phase = u16((WinTeam == 2) ? GAME_PHASE_TEAM2_SCORES : GAME_PHASE_TEAM1_SCORES); switch_Phase(m_phase); - OnDelayedRoundEnd(eRoundEnd_ArtrefactLimit); //"Team Final Score" + OnDelayedRoundEnd(eRoundEnd_ArtrefactLimit); //"Team Final Score" } void game_sv_ArtefactHunt::check_Player_for_Invincibility(game_PlayerState* ps) @@ -1328,7 +1328,7 @@ void game_sv_ArtefactHunt::ReadOptions(shared_str& options) { inherited::ReadOptions(options); //------------------------------- - g_sv_ah_dwArtefactRespawnDelta = get_option_i(*options, "ardelta", g_sv_ah_dwArtefactRespawnDelta); // sec + g_sv_ah_dwArtefactRespawnDelta = get_option_i(*options, "ardelta", g_sv_ah_dwArtefactRespawnDelta); // sec g_sv_ah_dwArtefactsNum = get_option_i(*options, "anum", g_sv_ah_dwArtefactsNum); g_sv_ah_dwArtefactStayTime = get_option_i(*options, "astime", g_sv_ah_dwArtefactStayTime); g_sv_dm_dwFragLimit = 0; diff --git a/src/xrGame/game_sv_artefacthunt.h b/src/xrGame/game_sv_artefacthunt.h index 55f56fede7f..1e2062466da 100644 --- a/src/xrGame/game_sv_artefacthunt.h +++ b/src/xrGame/game_sv_artefacthunt.h @@ -34,9 +34,9 @@ class game_sv_ArtefactHunt : public game_sv_TeamDeathmatch //. u8 m_LastRespawnPointID; CRandom ArtefactChooserRandom; - u16 artefactBearerID; // ah,ZoneMap + u16 artefactBearerID; // ah,ZoneMap u16 m_iAfBearerMenaceID; - u8 teamInPossession; // ah,ZoneMap + u8 teamInPossession; // ah,ZoneMap bool bNoLostMessage; bool m_bArtefactWasBringedToBase; @@ -74,7 +74,7 @@ class game_sv_ArtefactHunt : public game_sv_TeamDeathmatch virtual LPCSTR type_name() const { return "artefacthunt"; }; // Events virtual void OnEvent(NET_Packet& tNetPacket, u16 type, u32 time, ClientID sender); - virtual void OnRoundStart(); // старт раунда + virtual void OnRoundStart(); // старт раунда virtual KILL_RES GetKillResult(game_PlayerState* pKiller, game_PlayerState* pVictim); virtual bool OnKillResult(KILL_RES KillResult, game_PlayerState* pKiller, game_PlayerState* pVictim); virtual void OnGiveBonus(KILL_RES KillResult, game_PlayerState* pKiller, game_PlayerState* pVictim, @@ -114,7 +114,7 @@ class game_sv_ArtefactHunt : public game_sv_TeamDeathmatch void RemoveArtefact(); void Assign_Artefact_RPoint(CSE_Abstract* E); - virtual void net_Export_State(NET_Packet& P, ClientID id_to); // full state + virtual void net_Export_State(NET_Packet& P, ClientID id_to); // full state bool ArtefactSpawn_Allowed(); //------------------------------------------------------------------------------- virtual void RespawnAllNotAlivePlayers(); diff --git a/src/xrGame/game_sv_base.cpp b/src/xrGame/game_sv_base.cpp index 1dde1a0dce7..4f077b63e7b 100644 --- a/src/xrGame/game_sv_base.cpp +++ b/src/xrGame/game_sv_base.cpp @@ -90,7 +90,7 @@ u16 game_sv_GameState::get_id_2_eid(ClientID id) return E->ID; } -game_PlayerState* game_sv_GameState::get_eid(u16 id) // if exist +game_PlayerState* game_sv_GameState::get_eid(u16 id) // if exist { CSE_Abstract* entity = get_entity_from_eid(id); @@ -119,7 +119,7 @@ game_PlayerState* game_sv_GameState::get_eid(u16 id) // if exist return NULL; } -void* game_sv_GameState::get_client(u16 id) // if exist +void* game_sv_GameState::get_client(u16 id) // if exist { CSE_Abstract* entity = get_entity_from_eid(id); if (entity && entity->owner && entity->owner->ps && entity->owner->ps->GameID == id) return entity->owner; @@ -479,7 +479,7 @@ void game_sv_GameState::assign_RP(CSE_Abstract* E, game_PlayerState* ps_who) l_uc_team = tpSpectator->g_team(); #ifdef DEBUG Msg("--- game_sv_GameState RPoint for Spectators uses team [%d]", l_uc_team); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } else { @@ -488,7 +488,7 @@ void game_sv_GameState::assign_RP(CSE_Abstract* E, game_PlayerState* ps_who) l_uc_team = tpTeamed->g_team(); #ifdef DEBUG Msg("--- game_sv_GameState RPoint for AlifeCreature uses team [%d]", l_uc_team); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } else { @@ -502,7 +502,7 @@ void game_sv_GameState::assign_RP(CSE_Abstract* E, game_PlayerState* ps_who) Msg("---Size of rpoints of team [%d] is [%d]", l_uc_team, rp.size()); #endif //----------------------------------------------------------- - xr_vector xrp; // = rpoints[l_uc_team]; + xr_vector xrp; // = rpoints[l_uc_team]; for (u32 i = 0; i < rp.size(); i++) { if (rp[i].TimeToUnfreeze < Level().timeServer()) xrp.push_back(i); @@ -524,7 +524,7 @@ void game_sv_GameState::assign_RP(CSE_Abstract* E, game_PlayerState* ps_who) //----------------------------------------------------------- #ifdef DEBUG Msg("--- Result rpoint is [%d]", rpoint); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG RPoint& r = rp[rpoint]; if (!tpSpectator) { r.TimeToUnfreeze = Level().timeServer() + g_sv_base_dwRPointFreezeTime; @@ -547,14 +547,14 @@ void game_sv_GameState::SetPointFreezed(RPoint* rp) CSE_Abstract* game_sv_GameState::spawn_begin(LPCSTR N) { CSE_Abstract* A = F_entity_Create(N); - R_ASSERT(A); // create SE - A->s_name = N; // ltx-def - //. A->s_gameid = u8(m_type); // game-type - A->s_RP = 0xFE; // use supplied - A->ID = 0xffff; // server must generate ID - A->ID_Parent = 0xffff; // no-parent - A->ID_Phantom = 0xffff; // no-phantom - A->RespawnTime = 0; // no-respawn + R_ASSERT(A); // create SE + A->s_name = N; // ltx-def + //. A->s_gameid = u8(m_type); // game-type + A->s_RP = 0xFE; // use supplied + A->ID = 0xffff; // server must generate ID + A->ID_Parent = 0xffff; // no-parent + A->ID_Phantom = 0xffff; // no-phantom + A->RespawnTime = 0; // no-respawn return A; } @@ -578,7 +578,7 @@ void game_sv_GameState::GenerateGameMessage(NET_Packet& P) void game_sv_GameState::u_EventGen(NET_Packet& P, u16 type, u16 dest) { P.w_begin(M_EVENT); - P.w_u32(Level().timeServer()); // Device.TimerAsync()); + P.w_u32(Level().timeServer()); // Device.TimerAsync()); P.w_u16(type); P.w_u16(dest); } @@ -715,7 +715,7 @@ void game_sv_GameState::OnEvent(NET_Packet& tNetPacket, u16 type, u32 time, Clie u16 id_src = tNetPacket.r_u16(); CSE_Abstract* e_src = get_entity_from_eid(id_src); - if (!e_src) // && !IsGameTypeSingle() added by andy because of Phantom does not have server entity + if (!e_src) // && !IsGameTypeSingle() added by andy because of Phantom does not have server entity { if (IsGameTypeSingle()) break; @@ -754,7 +754,7 @@ void game_sv_GameState::OnEvent(NET_Packet& tNetPacket, u16 type, u32 time, Clie CL->ps->m_online_time = Level().timeServer(); CL->ps->DeathTime = Device.dwTimeGlobal; - if (psNET_direct_connect) // IsGameTypeSingle()) + if (psNET_direct_connect) // IsGameTypeSingle()) break; if (Level().IsDemoPlay()) break; @@ -804,7 +804,7 @@ bool game_sv_GameState::CheckNewPlayer(xrClientData* CL) if (error_msg) { m_server->SendProfileCreationError(CL, error_msg); - if (CL != m_server->GetServerClient()) // CL can be NULL + if (CL != m_server->GetServerClient()) // CL can be NULL CleanDelayedEventFor(tmp_client_id); return false; } @@ -906,7 +906,7 @@ class EventDeleteForClientPredicate private: EventDeleteForClientPredicate& operator=(EventDeleteForClientPredicate const& copy) {} ClientID const m_client_id; -}; // class EventDeleteForClientPredicate +}; // class EventDeleteForClientPredicate void game_sv_GameState::CleanDelayedEventFor(ClientID const& clientId) { @@ -998,7 +998,7 @@ void game_sv_GameState::OnRoundStart() } }; rpointsBlocked.clear(); -} // старт раунда +} // старт раунда void game_sv_GameState::OnRoundEnd() { @@ -1014,7 +1014,7 @@ void game_sv_GameState::OnRoundEnd() if (round_end_reason == eRoundEnd_GameRestartedFast) { m_bFastRestart = true; } -} // конец раунда +} // конец раунда void game_sv_GameState::SaveMapList() { @@ -1188,7 +1188,7 @@ class NameSearcherPredicate private: char const* m_name; IClient const* m_exclude; -}; // class NameSearcherPredicate +}; // class NameSearcherPredicate bool game_sv_GameState::FindPlayerName(char const* name, IClient const* to_exclude) { @@ -1231,7 +1231,7 @@ void game_sv_GameState::CheckPlayerName(xrClientData* CL) R_ASSERT(!CL->ps->m_account.is_online()); char const* current_name = NULL; - if (CL->ps->m_account.name().size()) // in case of logging from gamespy login page + if (CL->ps->m_account.name().size()) // in case of logging from gamespy login page { current_name = CL->ps->getName(); } diff --git a/src/xrGame/game_sv_base.h b/src/xrGame/game_sv_base.h index acf6b1536f5..4e46087c46b 100644 --- a/src/xrGame/game_sv_base.h +++ b/src/xrGame/game_sv_base.h @@ -187,7 +187,7 @@ class game_sv_GameState : public game_GameState, public IServerGameState virtual void OnVoteStop() override{}; // Main accessors virtual game_PlayerState* get_eid(u16 id) override; - virtual void* get_client(u16 id) override; // if exist + virtual void* get_client(u16 id) override; // if exist // virtual game_PlayerState* get_it (u32 it); virtual game_PlayerState* get_id(ClientID id) override; @@ -223,21 +223,21 @@ class game_sv_GameState : public game_GameState, public IServerGameState virtual BOOL OnPreCreate(CSE_Abstract* E) { return TRUE; }; virtual void OnCreate(u16 id_who){}; virtual void OnPostCreate(u16 id_who){}; - virtual BOOL OnTouch(u16 eid_who, u16 eid_target, BOOL bForced = FALSE) = 0; // TRUE=allow ownership, FALSE=denied + virtual BOOL OnTouch(u16 eid_who, u16 eid_target, BOOL bForced = FALSE) = 0; // TRUE=allow ownership, FALSE=denied virtual void OnDetach(u16 eid_who, u16 eid_target) = 0; virtual BOOL OnActivate(u16 eid_who, u16 eid_target) { return TRUE; }; virtual void OnDestroyObject(u16 eid_who); - virtual void OnHit(u16 id_hitter, u16 id_hitted, NET_Packet& P); //кто-то получил Hit - virtual void OnPlayerHitPlayer(u16 id_hitter, u16 id_hitted, NET_Packet& P){}; //игрок получил Hit + virtual void OnHit(u16 id_hitter, u16 id_hitted, NET_Packet& P); //кто-то получил Hit + virtual void OnPlayerHitPlayer(u16 id_hitter, u16 id_hitted, NET_Packet& P){}; //игрок получил Hit // Main virtual void Create(shared_str& options); virtual void Update(); - virtual void net_Export_State(NET_Packet& P, ClientID id_to); // full state + virtual void net_Export_State(NET_Packet& P, ClientID id_to); // full state virtual void net_Export_Update( - NET_Packet& P, ClientID id_to, ClientID id); // just incremental update for specific client - virtual void net_Export_GameTime(NET_Packet& P); // update GameTime only for remote clients + NET_Packet& P, ClientID id_to, ClientID id); // just incremental update for specific client + virtual void net_Export_GameTime(NET_Packet& P); // update GameTime only for remote clients virtual bool change_level(NET_Packet& net_packet, ClientID sender); virtual void save_game(NET_Packet& net_packet, ClientID sender); diff --git a/src/xrGame/game_sv_capture_the_artefact.cpp b/src/xrGame/game_sv_capture_the_artefact.cpp index 4c08cad33c4..a3978045c38 100644 --- a/src/xrGame/game_sv_capture_the_artefact.cpp +++ b/src/xrGame/game_sv_capture_the_artefact.cpp @@ -24,12 +24,12 @@ #include "xrserver_objects_alife_monsters.h" //------------------------------------------------------------- -u32 g_sv_cta_dwInvincibleTime = 5; // 5 seconds +u32 g_sv_cta_dwInvincibleTime = 5; // 5 seconds // u32 g_sv_cta_dwAnomalySetLengthTime = 3; //3 seconds -u32 g_sv_cta_artefactReturningTime = 45; // 45 seconds +u32 g_sv_cta_artefactReturningTime = 45; // 45 seconds u32 g_sv_cta_activatedArtefactRet = 0; // s32 g_sv_cta_ScoreLimit = 3; -u32 g_sv_cta_PlayerScoresDelayTime = 3; // 3 seconds +u32 g_sv_cta_PlayerScoresDelayTime = 3; // 3 seconds float g_sv_cta_artefactsBaseRadius = 1.0f; u32 g_sv_cta_rankUpToArtsCountDiv = 1; //------------------------------------------------------------- @@ -189,8 +189,7 @@ void game_sv_CaptureTheArtefact::Update() case GAME_PHASE_PENDING: CheckStatisticsReady(); if (!roundStarted && - Level() - .m_bGameConfigStarted) ////in case of starting server stage (net_start 1..6) we can't do restart .... + Level().m_bGameConfigStarted) ////in case of starting server stage (net_start 1..6) we can't do restart .... { if (CheckForAllPlayersReady()) { if (HasMapRotation() && SwitchToNextMap()) { @@ -216,7 +215,7 @@ void game_sv_CaptureTheArtefact::Update() { currentTime = Level().timeServer(); if (nextReinforcementTime <= currentTime) { - OnRoundEnd(); // OnRoundEnd("Finish"); + OnRoundEnd(); // OnRoundEnd("Finish"); } } break; @@ -303,7 +302,7 @@ void game_sv_CaptureTheArtefact::SM_SwitchOnNextActivePlayer() SM_SwitchOnPlayer(pNewObject); #ifndef MASTER_GOLD Msg("---SM Switched on player %s", pNewObject->cName().c_str()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD }; bool game_sv_CaptureTheArtefact::CheckForRoundStart() @@ -524,7 +523,7 @@ void game_sv_CaptureTheArtefact::OnPlayerReady(ClientID id_who) #ifndef MASTER_GOLD VERIFY(xrCData->ps); Msg("---Respawning player %s - he's ready", xrCData->ps->getName()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD RespawnPlayer(id_who, false); pOwner = xrCData->owner; CSE_ALifeCreatureActor* pA = smart_cast(pOwner); @@ -573,14 +572,14 @@ void game_sv_CaptureTheArtefact::Create(shared_str& options) teams[etBlueTeam].score = 0; #ifndef MASTER_GOLD Msg("---Starting new round, scores: [ %d : %d ]", teams[etGreenTeam].score, teams[etBlueTeam].score); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD m_iMoney_for_BuySpawn = READ_IF_EXISTS(pSettings, r_s32, "capturetheartefact_gamedata", "spawn_cost", -10000); m_not_free_ammo_str = READ_IF_EXISTS(pSettings, r_string, "capturetheartefact_gamedata", "not_free_ammo", ""); } void game_sv_CaptureTheArtefact::OnRoundStart() { - m_AnomalyIds.clear(); // important !!! + m_AnomalyIds.clear(); // important !!! m_dwSM_LastSwitchTime = 0; m_dwSM_CurViewEntity = 0; @@ -596,7 +595,7 @@ void game_sv_CaptureTheArtefact::OnRoundStart() } } - bool m_bFastRestartBefore = m_bFastRestart; // fake, because next inherited::OnRoundStart() sets it to false :( + bool m_bFastRestartBefore = m_bFastRestart; // fake, because next inherited::OnRoundStart() sets it to false :( inherited::OnRoundStart(); roundStarted = TRUE; // Respawn all players and some info @@ -689,7 +688,7 @@ void game_sv_CaptureTheArtefact::BalanceTeams() u32 NumToMove; struct team_counter { - u32 l_teams[2]; // etGreenTeam , etBlueTeam + u32 l_teams[2]; // etGreenTeam , etBlueTeam team_counter() { l_teams[0] = 0; @@ -1780,7 +1779,7 @@ void game_sv_CaptureTheArtefact::FillDeathActorRejectItems(CSE_ActorMP* actor, x if (!item) { #ifndef MASTER_GOLD Msg("! ERROR: item from slot %d is NULL", active_slot); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } @@ -1788,7 +1787,7 @@ void game_sv_CaptureTheArtefact::FillDeathActorRejectItems(CSE_ActorMP* actor, x if (!server_item) { #ifndef MASTER_GOLD Msg("! ERROR: server entity is NULL, object ID[%d]", item->object_id()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } @@ -1867,7 +1866,7 @@ void game_sv_CaptureTheArtefact::MoveArtefactToPoint(CSE_ALifeItemArtefact* arte // artefact->o_Position.set(toPoint.P); VERIFY(artefact->cast_inventory_item()); - artefact->cast_inventory_item()->State.position.set(toPoint.P); // settings position to server object + artefact->cast_inventory_item()->State.position.set(toPoint.P); // settings position to server object CArtefact* OArtefact = smart_cast(Level().Objects.net_Find(artefact->ID)); @@ -1875,7 +1874,7 @@ void game_sv_CaptureTheArtefact::MoveArtefactToPoint(CSE_ALifeItemArtefact* arte make_string("artefact not found. artefact_id = [%d]. CTA:MoveArtefactToPoint()", artefact->ID).c_str()); OArtefact->StopActivation(); - OArtefact->MoveTo(toPoint.P); // to server client object + OArtefact->MoveTo(toPoint.P); // to server client object NET_Packet MovePacket; MovePacket.w_begin(M_MOVE_ARTEFACTS); @@ -1883,7 +1882,7 @@ void game_sv_CaptureTheArtefact::MoveArtefactToPoint(CSE_ALifeItemArtefact* arte MovePacket.w_u16(artefact->ID); MovePacket.w_vec3(toPoint.P); m_server->SendBroadcast(BroadcastCID, MovePacket, - net_flags(TRUE, TRUE)); // and to all clients, because it will freeze and will not send updates... + net_flags(TRUE, TRUE)); // and to all clients, because it will freeze and will not send updates... } void game_sv_CaptureTheArtefact::MoveLifeActors() @@ -1935,7 +1934,7 @@ void game_sv_CaptureTheArtefact::RespawnClient(xrClientData const* pclient) #ifndef MASTER_GOLD VERIFY(pclient->ps); Msg("---Respawning dead player [%s]", pclient->ps->getName()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD RespawnPlayer(pclient->ID, true); VERIFY(pclient->ps); TGameIDToBoughtFlag::const_iterator buyer_iter = m_dead_buyers.find(pclient->ID); @@ -2088,7 +2087,7 @@ void game_sv_CaptureTheArtefact::StartNewRound() VERIFY(TeamList.size() >= 2); #ifndef MASTER_GOLD Msg("---Starting new round, scores: [ %d : %d ]", teams[etGreenTeam].score, teams[etBlueTeam].score); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } void game_sv_CaptureTheArtefact::PrepareClientForNewRound(IClient* client) @@ -2180,7 +2179,7 @@ void game_sv_CaptureTheArtefact::CheckForArtefactDelivering() if (!xrCData) { #ifdef MP_LOGGING Msg("! WARNING: bad actor [%d] tries to deliver artefact", tempActor->ID); -#endif //#ifdef MP_LOGGING +#endif //#ifdef MP_LOGGING continue; } if (!xrCData->net_Ready) { @@ -2224,7 +2223,7 @@ BOOL game_sv_CaptureTheArtefact::CheckForRoundEnd() bool game_sv_CaptureTheArtefact::ResetInvincibility(ClientID const clientId) { xrClientData* tempClient = m_server->ID_to_client(clientId); - if (!tempClient) // when the time comes, we'll delete this element in collection + if (!tempClient) // when the time comes, we'll delete this element in collection return false; if (!tempClient->ps) return false; @@ -2323,7 +2322,7 @@ void game_sv_CaptureTheArtefact::ReadOptions(shared_str& options) //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ g_sv_dm_bAnomaliesEnabled = (get_option_i(*options, "ans", (isAnomaliesEnabled() ? 1 : 0)) != 0); - g_sv_dm_dwAnomalySetLengthTime = get_option_i(*options, "anslen", g_sv_dm_dwAnomalySetLengthTime); // in (min) + g_sv_dm_dwAnomalySetLengthTime = get_option_i(*options, "anslen", g_sv_dm_dwAnomalySetLengthTime); // in (min) g_sv_dm_bPDAHunt = (get_option_i(*options, "pdahunt", (isPDAHuntEnabled() ? 1 : 0)) != 0); g_sv_dm_bDamageBlockIndicators = (get_option_i(*options, "dmbi", (g_sv_dm_bDamageBlockIndicators ? 1 : 0)) != 0); g_sv_dm_dwWarmUp_MaxTime = get_option_i(*options, "warmup", g_sv_dm_dwWarmUp_MaxTime); @@ -2343,9 +2342,9 @@ void game_sv_CaptureTheArtefact::ReadOptions(shared_str& options) g_sv_ah_iReinforcementTime = get_option_i(*options, "reinf", g_sv_ah_iReinforcementTime); if (g_sv_ah_iReinforcementTime <= 0) g_sv_ah_iReinforcementTime = 1; //---------------------------------------------------------------------------- - g_sv_cta_dwInvincibleTime = get_option_i(*options, "dmgblock", g_sv_cta_dwInvincibleTime); // in (sec) - g_sv_cta_artefactReturningTime = get_option_i(*options, "artrettime", g_sv_cta_artefactReturningTime); // in (sec) - g_sv_cta_activatedArtefactRet = get_option_i(*options, "actret", g_sv_cta_activatedArtefactRet); // in (sec) + g_sv_cta_dwInvincibleTime = get_option_i(*options, "dmgblock", g_sv_cta_dwInvincibleTime); // in (sec) + g_sv_cta_artefactReturningTime = get_option_i(*options, "artrettime", g_sv_cta_artefactReturningTime); // in (sec) + g_sv_cta_activatedArtefactRet = get_option_i(*options, "actret", g_sv_cta_activatedArtefactRet); // in (sec) m_bSpectatorMode = false; if (!g_dedicated_server && (get_option_i(*options, "spectr", -1) != -1)) { diff --git a/src/xrGame/game_sv_capture_the_artefact.h b/src/xrGame/game_sv_capture_the_artefact.h index 5857dae3672..819122f617e 100644 --- a/src/xrGame/game_sv_capture_the_artefact.h +++ b/src/xrGame/game_sv_capture_the_artefact.h @@ -67,11 +67,11 @@ class game_sv_CaptureTheArtefact : public game_sv_mp typedef std::pair TAnomalyStartedPair; typedef xr_vector TAnomalySet; - typedef std::pair TGIDCPair; // GameIDCountPair + typedef std::pair TGIDCPair; // GameIDCountPair typedef xr_multimap TMultiMap; typedef xr_map - TGameIDToBoughtFlag; // this map shows what player already bought items when he was dead... + TGameIDToBoughtFlag; // this map shows what player already bought items when he was dead... TAnomaliesVector m_AnomaliesPermanent; TAnomalySet m_AnomalySet; @@ -131,17 +131,17 @@ class game_sv_CaptureTheArtefact : public game_sv_mp enum buyMenuPlayerState { - buyMenuPlayerClosesBuyMenu = 0, // this value set in OnCloseBuyMenu - buyMenuPlayerOpensBuyMenu = 1, // this value set in OnPlayerOpenBuyMenu - buyMenuPlayerReadyToSpawn = 2 // this value set in RespawnDeadPlayers + buyMenuPlayerClosesBuyMenu = 0, // this value set in OnCloseBuyMenu + buyMenuPlayerOpensBuyMenu = 1, // this value set in OnPlayerOpenBuyMenu + buyMenuPlayerReadyToSpawn = 2 // this value set in RespawnDeadPlayers }; typedef AssociativeVector TBuyMenuPlayerStates; TBuyMenuPlayerStates m_buyMenuPlayerStates; - virtual void OnPlayerOpenBuyMenu(xrClientData const* pclient); // this method invokes only if player dead + virtual void OnPlayerOpenBuyMenu(xrClientData const* pclient); // this method invokes only if player dead virtual void OnPlayerCloseBuyMenu( - xrClientData const* pclient); // if client state buyMenuPlayerReadyToSpawn respawn player - void OnCloseBuyMenuFromAll(); // just clears buy menu player states associative vector + xrClientData const* pclient); // if client state buyMenuPlayerReadyToSpawn respawn player + void OnCloseBuyMenuFromAll(); // just clears buy menu player states associative vector bool CheckIfPlayerInBuyMenu(xrClientData const* pclient); void SetReadyToSpawnPlayer(xrClientData const* pclient); @@ -249,7 +249,7 @@ class game_sv_CaptureTheArtefact : public game_sv_mp virtual void OnPlayerHitPlayer(u16 id_hitter, u16 id_hitted, NET_Packet& P); virtual void OnPlayerHitPlayer_Case(game_PlayerState* ps_hitter, game_PlayerState* ps_hitted, SHit* pHitS); - virtual BOOL OnTouch(u16 eid_who, u16 eid_target, BOOL bForced = FALSE); // TRUE=allow ownership, FALSE=denied + virtual BOOL OnTouch(u16 eid_who, u16 eid_target, BOOL bForced = FALSE); // TRUE=allow ownership, FALSE=denied virtual void OnDetach(u16 eid_who, u16 eid_target); virtual BOOL OnActivate(u16 eid_who, u16 eid_target); virtual void OnEvent(NET_Packet& tNetPacket, u16 type, u32 time, ClientID sender); diff --git a/src/xrGame/game_sv_capture_the_artefact_buy_event.cpp b/src/xrGame/game_sv_capture_the_artefact_buy_event.cpp index 9095f81c62d..8d10f2873f5 100644 --- a/src/xrGame/game_sv_capture_the_artefact_buy_event.cpp +++ b/src/xrGame/game_sv_capture_the_artefact_buy_event.cpp @@ -63,7 +63,7 @@ void game_sv_CaptureTheArtefact::OnPlayerCloseBuyMenu(xrClientData const* pclien #ifdef DEBUG Msg("--- Player [%s] closes buy menu", pclient->ps->getName()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (temp_iter->second == buyMenuPlayerReadyToSpawn) { RespawnClient(pclient); } @@ -79,7 +79,7 @@ void game_sv_CaptureTheArtefact::OnPlayerOpenBuyMenu(xrClientData const* pclient // mode"); #ifdef DEBUG Msg("--- Player [%s] opens buy menu", pclient->ps->getName()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_buyMenuPlayerStates.insert(std::make_pair(pclient, buyMenuPlayerOpensBuyMenu)); } @@ -100,7 +100,7 @@ void game_sv_CaptureTheArtefact::SetReadyToSpawnPlayer(xrClientData const* pclie // mode"); #ifdef DEBUG Msg("--- Player [%s] opens buy menu", pclient->ps->getName()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_buyMenuPlayerStates.insert(std::make_pair(pclient, buyMenuPlayerReadyToSpawn)); } diff --git a/src/xrGame/game_sv_capture_the_artefact_process_event.cpp b/src/xrGame/game_sv_capture_the_artefact_process_event.cpp index 10ed1a5ecb0..9ba54917eb4 100644 --- a/src/xrGame/game_sv_capture_the_artefact_process_event.cpp +++ b/src/xrGame/game_sv_capture_the_artefact_process_event.cpp @@ -27,7 +27,7 @@ void game_sv_CaptureTheArtefact::OnEvent(NET_Packet& tNetPacket, u16 type, u32 t u16 pl_id = tNetPacket.r_u16(); // warning, in editor green team zone has 1 id, blue team zone has id 2 u8 z_t_id = tNetPacket.r_u8(); - z_t_id--; // :( !!! + z_t_id--; // :( !!! OnObjectEnterTeamBase(pl_id, z_t_id); } break; @@ -36,10 +36,10 @@ void game_sv_CaptureTheArtefact::OnEvent(NET_Packet& tNetPacket, u16 type, u32 t { u16 pl_id = tNetPacket.r_u16(); u8 z_t_id = tNetPacket.r_u8(); - z_t_id--; // :( !!! + z_t_id--; // :( !!! OnObjectLeaveTeamBase(pl_id, z_t_id); } break; default: inherited::OnEvent(tNetPacket, type, time, sender); - }; // switch + }; // switch } \ No newline at end of file diff --git a/src/xrGame/game_sv_deathmatch.cpp b/src/xrGame/game_sv_deathmatch.cpp index fa9b52dad3f..71b6612727d 100644 --- a/src/xrGame/game_sv_deathmatch.cpp +++ b/src/xrGame/game_sv_deathmatch.cpp @@ -481,7 +481,7 @@ void game_sv_Deathmatch::Update() case GAME_PHASE_PLAYER_SCORES: { if (m_delayedRoundEnd && m_roundEndDelay < Device.TimerAsync()) { - OnRoundEnd(); // eRoundEnd_Finish + OnRoundEnd(); // eRoundEnd_Finish } } break; @@ -493,7 +493,7 @@ INT g_sv_Wait_For_Players_Ready = 1; bool game_sv_Deathmatch::checkForRoundStart() { - if (!Level().m_bGameConfigStarted) // in case of starting server stage (net_start 1..6) we can't do restart .... + if (!Level().m_bGameConfigStarted) // in case of starting server stage (net_start 1..6) we can't do restart .... return false; if (m_bFastRestart || @@ -747,7 +747,7 @@ void game_sv_Deathmatch::assign_RP(CSE_Abstract* E, game_PlayerState* ps_who) u32 Team = RP_2_Use(E); #ifdef DEBUG Msg("--- Deathmatch RPoint for %s uses team %d", ps_who->getName(), Team); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG VERIFY(rpoints[Team].size()); CSE_Spectator* pSpectator = smart_cast(E); @@ -1021,7 +1021,7 @@ void game_sv_Deathmatch::SpawnWeaponsForActor(CSE_Abstract* pE, game_PlayerState u16 ItemID = ps->pItemList.front(); #ifdef DEBUG Msg("--- Server: spawning item [%d] for actor [%s]", ItemID, ps->getName()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG SpawnWeapon4Actor( pA->ID, *m_strWeaponsData->GetItemName(ItemID & 0x00FF), u8((ItemID & 0xFF00) >> 0x08), ps->pItemList); // Game().m_WeaponUsageStatistic->OnWeaponBought(ps, *m_strWeaponsData->GetItemName(ItemID& 0x00FF)); @@ -1192,7 +1192,7 @@ void game_sv_Deathmatch::LoadTeamData(const shared_str& caSection) LoadSkinsForTeam(caSection, &NewTeam.aSkins); LoadDefItemsForTeam(caSection, /*&NewTeam.aWeapons, */ &NewTeam.aDefaultItems); //------------------------------------------------------------- - if (pSettings->section_exist(caSection)) // money + if (pSettings->section_exist(caSection)) // money { NewTeam.m_iM_Start = GetMoneyAmount(caSection, "money_start"); NewTeam.m_iM_OnRespawn = GetMoneyAmount(caSection, "money_respawn"); @@ -1457,7 +1457,7 @@ void game_sv_Deathmatch::Send_EventPack_for_AnomalySet(u32 AnomalySet, u8 Event) //----------------------------------- NET_Packet P; u_EventGen(P, GE_ZONE_STATE_CHANGE, ID); - P.w_u8(u8(Event)); // eZoneStateDisabled + P.w_u8(u8(Event)); // eZoneStateDisabled //----------------------------------- EventPack.w_u8(u8(P.B.count)); EventPack.w(&P.B.data, P.B.count); @@ -1486,7 +1486,7 @@ void game_sv_Deathmatch::StartAnomalies(int AnomalySet) ASetID.erase(ASetID.begin() + ID); /////////////////////////////////////////////////// if (m_dwLastAnomalySetID < m_AnomalySetsList.size()) { - Send_EventPack_for_AnomalySet(m_dwLastAnomalySetID, CCustomZone::eZoneStateDisabled); // Disable + Send_EventPack_for_AnomalySet(m_dwLastAnomalySetID, CCustomZone::eZoneStateDisabled); // Disable }; /////////////////////////////////////////////////// if (AnomalySet != -1 && AnomalySet < (int)m_AnomalySetsList.size()) { @@ -1496,7 +1496,7 @@ void game_sv_Deathmatch::StartAnomalies(int AnomalySet) else m_dwLastAnomalySetID = NewAnomalySetID; - if (IsAnomaliesEnabled()) Send_EventPack_for_AnomalySet(m_dwLastAnomalySetID, CCustomZone::eZoneStateIdle); // Idle + if (IsAnomaliesEnabled()) Send_EventPack_for_AnomalySet(m_dwLastAnomalySetID, CCustomZone::eZoneStateIdle); // Idle m_dwLastAnomalyStartTime = Level().timeServer(); #ifdef DEBUG Msg("Anomaly Set %d Activated", m_dwLastAnomalySetID); @@ -1602,7 +1602,7 @@ BOOL game_sv_Deathmatch::OnTouch(u16 eid_who, u16 eid_what, BOOL bForced) NET_Packet P; u_EventGen(P, GE_DESTROY, e_what->ID); m_server->OnMessageSync( - P, m_server->GetServerClient()->ID); // m_server->OnMessage(P, m_server->GetServerClient()->ID); + P, m_server->GetServerClient()->ID); // m_server->OnMessage(P, m_server->GetServerClient()->ID); //------------------------------- game_PlayerState* pKiller = get_eid(eid_who); @@ -1938,7 +1938,7 @@ void game_sv_Deathmatch::OnPostCreate(u16 eid_who) //----------------------------------------------------------------------------- NET_Packet P; u_EventGen(P, GE_ZONE_STATE_CHANGE, eid_who); - P.w_u8(u8(CCustomZone::eZoneStateDisabled)); // eZoneStateDisabled + P.w_u8(u8(CCustomZone::eZoneStateDisabled)); // eZoneStateDisabled u_EventSend(P); //----------------------------------------------------------------------------- return; @@ -2005,13 +2005,13 @@ void game_sv_Deathmatch::ReadOptions(shared_str& options) //------------------------------- g_sv_dm_dwForceRespawn = get_option_i(*options, "frcrspwn", g_sv_dm_dwForceRespawn); g_sv_dm_dwFragLimit = get_option_i(*options, "fraglimit", g_sv_dm_dwFragLimit); - g_sv_dm_dwTimeLimit = get_option_i(*options, "timelimit", g_sv_dm_dwTimeLimit); // in (min) - g_sv_dm_dwDamageBlockTime = get_option_i(*options, "dmgblock", g_sv_dm_dwDamageBlockTime); // in (sec) + g_sv_dm_dwTimeLimit = get_option_i(*options, "timelimit", g_sv_dm_dwTimeLimit); // in (min) + g_sv_dm_dwDamageBlockTime = get_option_i(*options, "dmgblock", g_sv_dm_dwDamageBlockTime); // in (sec) //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ g_sv_dm_bDamageBlockIndicators = (get_option_i(*options, "dmbi", (g_sv_dm_bDamageBlockIndicators ? 1 : 0)) != 0); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ g_sv_dm_bAnomaliesEnabled = (get_option_i(*options, "ans", (IsAnomaliesEnabled() ? 1 : 0)) != 0); - g_sv_dm_dwAnomalySetLengthTime = get_option_i(*options, "anslen", g_sv_dm_dwAnomalySetLengthTime); // in (min) + g_sv_dm_dwAnomalySetLengthTime = get_option_i(*options, "anslen", g_sv_dm_dwAnomalySetLengthTime); // in (min) //----------------------------------------------------------------------- m_bSpectatorMode = false; if (!g_dedicated_server && (get_option_i(*options, "spectr", -1) != -1)) { @@ -2148,14 +2148,14 @@ void game_sv_Deathmatch::FillDeathActorRejectItems(CSE_ActorMP* actor, xr_vector if (!item) { #ifndef MASTER_GOLD Msg("! ERROR: item from slot[%d] is NULL", active_slot); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } CSE_Abstract* server_item = m_server->ID_to_entity(item->object_id()); if (!server_item) { #ifndef MASTER_GOLD Msg("! ERROR: server entity is NULL, object_id = [%d]", item->object_id()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } diff --git a/src/xrGame/game_sv_deathmatch.h b/src/xrGame/game_sv_deathmatch.h index 8de7d72c20b..5df884a01c4 100644 --- a/src/xrGame/game_sv_deathmatch.h +++ b/src/xrGame/game_sv_deathmatch.h @@ -39,7 +39,7 @@ class game_sv_Deathmatch : public game_sv_mp, private pure_relcase shared_str m_sBaseWeaponCostSection; - xr_vector teams; // dm,tdm,ah + xr_vector teams; // dm,tdm,ah LPCSTR pWinnigPlayerName; @@ -108,16 +108,16 @@ class game_sv_Deathmatch : public game_sv_mp, private pure_relcase virtual void OnEvent(NET_Packet& tNetPacket, u16 type, u32 time, ClientID sender); - virtual void OnTeamScore(u32 /**team/**/, bool); // команда выиграла - virtual void OnTeamsInDraw(){}; // ничья + virtual void OnTeamScore(u32 /**team/**/, bool); // команда выиграла + virtual void OnTeamsInDraw(){}; // ничья // Events - virtual void OnRoundStart(); // старт раунда - virtual void OnRoundEnd(); // round_end_reason // конец раунда + virtual void OnRoundStart(); // старт раунда + virtual void OnRoundEnd(); // round_end_reason // конец раунда virtual void OnDelayedRoundEnd(ERoundEnd_Result reason); virtual void OnDelayedTeamEliminated(); - virtual void OnPlayerHitPlayer(u16 id_hitter, u16 id_hitted, NET_Packet& P); //игрок получил Hit + virtual void OnPlayerHitPlayer(u16 id_hitter, u16 id_hitted, NET_Packet& P); //игрок получил Hit virtual void OnPlayerHitPlayer_Case(game_PlayerState* ps_hitter, game_PlayerState* ps_hitted, SHit* pHitS); virtual BOOL OnTouch(u16 eid_who, u16 eid_what, BOOL bForced = FALSE); @@ -162,7 +162,7 @@ class game_sv_Deathmatch : public game_sv_mp, private pure_relcase virtual void OnRender(); #endif - virtual void SetSkin(CSE_Abstract* E, u16 Team, u16 ID); // {}; + virtual void SetSkin(CSE_Abstract* E, u16 Team, u16 ID); // {}; virtual void SpawnWeaponsForActor(CSE_Abstract* pE, game_PlayerState* ps); diff --git a/src/xrGame/game_sv_deathmatch_process_event.cpp b/src/xrGame/game_sv_deathmatch_process_event.cpp index 0b4a778a89e..20c55b33f61 100644 --- a/src/xrGame/game_sv_deathmatch_process_event.cpp +++ b/src/xrGame/game_sv_deathmatch_process_event.cpp @@ -7,7 +7,7 @@ void game_sv_Deathmatch::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sen { switch (type) { - case GAME_EVENT_PLAYER_KILL: // dm only (g_kill) + case GAME_EVENT_PLAYER_KILL: // dm only (g_kill) { u16 ID = P.r_u16(); xrClientData* l_pC = (xrClientData*)get_client(ID); @@ -16,16 +16,16 @@ void game_sv_Deathmatch::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sen } break; - case GAME_EVENT_PLAYER_BUY_FINISHED: // dm only + case GAME_EVENT_PLAYER_BUY_FINISHED: // dm only { xrClientData* l_pC = m_server->ID_to_client(sender); #ifdef DEBUG Msg("--- On player [%d] buy finishing...", l_pC->ID); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG OnPlayerBuyFinished(l_pC->ID, P); } break; default: inherited::OnEvent(P, type, time, sender); - }; // switch + }; // switch } diff --git a/src/xrGame/game_sv_event_queue.cpp b/src/xrGame/game_sv_event_queue.cpp index 2db80abf827..c0e23aab5c2 100644 --- a/src/xrGame/game_sv_event_queue.cpp +++ b/src/xrGame/game_sv_event_queue.cpp @@ -5,7 +5,7 @@ GameEventQueue::GameEventQueue() #ifdef CONFIG_PROFILE_LOCKS : cs(MUTEX_PROFILE_ID(GameEventQueue)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { unused.reserve(128); for (int i = 0; i < 16; i++) @@ -53,7 +53,7 @@ GameEvent* GameEventQueue::CreateSafe(NET_Packet& P, u16 type, u32 time, ClientI if (m_blocked_clients.find(clientID) != m_blocked_clients.end()) { #ifdef DEBUG Msg("--- Ignoring event type[%d] time[%d] clientID[0x%08x]", type, time, clientID); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return NULL; } } @@ -136,14 +136,14 @@ void GameEventQueue::SetIgnoreEventsFor(bool ignore, ClientID clientID) if (ignore) { #ifdef DEBUG Msg("--- Setting ignore messages for client 0x%08x", clientID); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_blocked_clients.insert(clientID); } else { #ifdef DEBUG Msg("--- Setting receive messages for client 0x%08x", clientID); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_blocked_clients.erase(clientID); } } @@ -152,7 +152,7 @@ u32 GameEventQueue::EraseEvents(event_predicate to_del) { u32 ret_val = 0; cs.Enter(); - if (ready.empty()) // read synchronization... + if (ready.empty()) // read synchronization... { cs.Leave(); return 0; diff --git a/src/xrGame/game_sv_item_respawner.cpp b/src/xrGame/game_sv_item_respawner.cpp index dbb9c91b621..cfd7ec95a2c 100644 --- a/src/xrGame/game_sv_item_respawner.cpp +++ b/src/xrGame/game_sv_item_respawner.cpp @@ -107,10 +107,10 @@ CSE_Abstract* item_respawn_manager::make_respawn_entity(shared_str const& sectio CSE_Abstract* temp_entity = F_entity_Create(section_name.c_str()); R_ASSERT2(temp_entity, make_string("failed to create entity [%s]", section_name.c_str()).c_str()); - temp_entity->ID = 0xffff; // server must generate ID - temp_entity->ID_Parent = 0xffff; // no-parent - temp_entity->ID_Phantom = 0xffff; // no-phantom - temp_entity->RespawnTime = 0; // no-respawn + temp_entity->ID = 0xffff; // server must generate ID + temp_entity->ID_Parent = 0xffff; // no-parent + temp_entity->ID_Phantom = 0xffff; // no-phantom + temp_entity->RespawnTime = 0; // no-respawn CSE_ALifeItemWeapon* pWeapon = smart_cast(temp_entity); if (pWeapon) { @@ -159,7 +159,7 @@ u32 item_respawn_manager::load_section_items(CInifile& ini, const char* section_ if (!ini.section_exist(section_name)) { #ifndef MASTER_GOLD Msg("! ERROR: section %s not exist", section_name); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return 0; } @@ -234,7 +234,7 @@ void item_respawn_manager::add_new_rpoint(shared_str profile_sect, RPoint const& if (tmp_resp_sect == m_respawn_sections_cache.end()) { #ifndef MASTER_GOLD Msg("! ERROR: not found section %s in respawn_items.ltx", profile_sect.c_str()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } } @@ -256,7 +256,7 @@ void item_respawn_manager::add_new_rpoint(shared_str profile_sect, RPoint const& { #ifndef MASTER_GOLD Msg("! ERROR: failed to create entity [%s] with addons [%d]", iter_rsect->section_name, iter_rsect->addons); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } } @@ -305,7 +305,7 @@ u16 item_respawn_manager::respawn_item(CSE_Abstract* item_object) spawn_packet_store.write_start(); #ifdef DEBUG Msg("--- Respawning item %s - it's time...", item_object->name()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG item_object->Spawn_Write(spawn_packet_store, false); u16 skip_header; spawn_packet_store.r_begin(skip_header); @@ -320,12 +320,12 @@ void item_respawn_manager::clear_level_items() for (xr_set::iterator i = level_items_respawn.begin(); i != ie; ++i) { CSE_Abstract* entity = m_server->ID_to_entity(*i); - if (!entity) continue; // this can be in case ending of a round... + if (!entity) continue; // this can be in case ending of a round... // VERIFY2(entity, make_string("entity not found [%d]", *i).c_str()); if (entity->ID_Parent != u16(-1)) continue; #ifndef MASTER_GOLD Msg("---Destroying level item [%d] before respawn...", *i); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD m_server->Perform_destroy(entity, net_flags(TRUE, TRUE)); } level_items_respawn.clear(); diff --git a/src/xrGame/game_sv_item_respawner.h b/src/xrGame/game_sv_item_respawner.h index c8a9be48410..6b529bc0c1c 100644 --- a/src/xrGame/game_sv_item_respawner.h +++ b/src/xrGame/game_sv_item_respawner.h @@ -69,5 +69,5 @@ class item_respawn_manager void respawn_all_items(); void check_to_delete(u16 item_id); void update(u32 current_time); - void respawn_level_items(); // level_re.spawn + void respawn_level_items(); // level_re.spawn }; \ No newline at end of file diff --git a/src/xrGame/game_sv_mp.cpp b/src/xrGame/game_sv_mp.cpp index d511b5027da..eb2902761a7 100644 --- a/src/xrGame/game_sv_mp.cpp +++ b/src/xrGame/game_sv_mp.cpp @@ -54,7 +54,7 @@ game_sv_mp::game_sv_mp() : inherited() // g_pGamePersistent->Environment().SetWeather("mp_weather"); m_aRanks.clear(); //------------------------------------------------------ - round_end_reason = eRoundEnd_Force; // unknown + round_end_reason = eRoundEnd_Force; // unknown m_async_stats_request_time = 0; round_statistics_dump_fn[0] = 0; } @@ -233,12 +233,12 @@ void game_sv_mp::KillPlayer(ClientID id_who, u16 GameID) xrClientData* xrCData = m_server->ID_to_client(id_who); #ifdef DEBUG if (xrCData && xrCData->ps && xrCData->ps->getName()) Msg("--- Killing player [%s]", xrCData->ps->getName()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (xrCData && xrCData->ps && xrCData->ps->testFlag(GAME_PLAYER_FLAG_VERY_VERY_DEAD)) { #ifdef DEBUG Msg("--- Killing dead player [%s]", xrCData->ps->getName()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return; } if (xrCData) { @@ -279,12 +279,12 @@ void game_sv_mp::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sender) { switch (type) { - case GAME_EVENT_PLAYER_KILLED: // playerKillPlayer + case GAME_EVENT_PLAYER_KILLED: // playerKillPlayer { #ifdef DEBUG xrClientData* l_pC = m_server->ID_to_client(sender); if (l_pC && l_pC->ps) Msg("--- GAME_EVENT_PLAYER_KILLED: sender [%d][0x%08x]", l_pC->ps->GameID, sender); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG OnPlayerKilled(P); } break; @@ -292,11 +292,11 @@ void game_sv_mp::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sender) #ifdef DEBUG xrClientData* l_pC = m_server->ID_to_client(sender); if (l_pC && l_pC->ps) Msg("--- GAME_EVENT_PLAYER_HITTED: sender [%d][0x%08x]", l_pC->ps->GameID, sender); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG OnPlayerHitted(P); } break; - case GAME_EVENT_PLAYER_READY: // cs & dm + case GAME_EVENT_PLAYER_READY: // cs & dm { xrClientData* l_pC = m_server->ID_to_client(sender); if (!l_pC) break; @@ -352,7 +352,7 @@ void game_sv_mp::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sender) case GAME_EVENT_PLAYER_STARTED: { #ifdef DEBUG Msg("--- Player 0x%08x started.", sender); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (CheckPlayerMapName(sender, P)) { m_event_queue->SetIgnoreEventsFor(false, sender); } @@ -372,7 +372,7 @@ void game_sv_mp::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sender) .c_str()); #ifndef MASTER_GOLD Msg("! ERROR: unknown client [0x%08x] opens buy menu", sender.value()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } break; @@ -389,12 +389,12 @@ void game_sv_mp::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sender) .c_str()); #ifndef MASTER_GOLD Msg("! ERROR: unknown client [0x%08x] opens buy menu", sender.value()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } } break; default: inherited::OnEvent(P, type, time, sender); - }; // switch + }; // switch } bool game_sv_mp::CheckPlayerMapName(ClientID const& clientID, NET_Packet& P) @@ -417,7 +417,7 @@ void game_sv_mp::ReconnectPlayer(ClientID const& clientID) { #ifdef DEBUG Msg("--- Reconnecting player 0x%08x", clientID); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG NET_Packet P; P.w_begin(M_CHANGE_LEVEL_GAME); P.w_stringZ(Level().name().c_str()); @@ -533,11 +533,11 @@ void game_sv_mp::SpawnPlayer(ClientID id, LPCSTR N) ps_who->setFlag(GAME_PLAYER_FLAG_VERY_VERY_DEAD); // Spawn "actor" - CSE_Abstract* E = spawn_begin(N); // create SE + CSE_Abstract* E = spawn_begin(N); // create SE - E->set_name_replace(get_name_id(id)); // name + E->set_name_replace(get_name_id(id)); // name - E->s_flags.assign(M_SPAWN_OBJECT_LOCAL | M_SPAWN_OBJECT_ASPLAYER); // flags + E->s_flags.assign(M_SPAWN_OBJECT_LOCAL | M_SPAWN_OBJECT_ASPLAYER); // flags CSE_ALifeCreatureActor* pA = smart_cast(E); CSE_Spectator* pS = smart_cast(E); @@ -826,7 +826,7 @@ void game_sv_mp::SpawnWeapon4Actor(u16 actorId, LPCSTR N, u8 Addons, game_Player E->ID_Parent = actorId; ammo_diff_t ammo_diff; - E->s_flags.assign(M_SPAWN_OBJECT_LOCAL); // flags + E->s_flags.assign(M_SPAWN_OBJECT_LOCAL); // flags ///////////////////////////////////////////////////////////////////////////////// CSE_ALifeItemWeapon* pWeapon = smart_cast(E); if (pWeapon) { @@ -955,7 +955,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) string1024 resVoteCommand = ""; sscanf(VoteCommand, "%255s ", CommandName); - u32 tmp_command_len = xr_strlen(CommandName) + 1; // + ' ' + u32 tmp_command_len = xr_strlen(CommandName) + 1; // + ' ' if ((tmp_command_len < 256) && (tmp_command_len < xr_strlen(VoteCommand))) { strncpy_s(CommandParams, VoteCommand + xr_strlen(CommandName) + 1, 255); CommandParams[255] = 0; @@ -996,7 +996,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) sscanf_s(CommandParams, "%255s %255s", LevelName, sizeof(LevelName), LevelVersion, sizeof(LevelVersion)); #ifdef DEBUG Msg("--- Starting vote for changing level to: %s[%s]", LevelName, LevelVersion); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG LevelName[255] = 0; LevelVersion[255] = 0; @@ -1014,7 +1014,7 @@ void game_sv_mp::OnVoteStart(LPCSTR VoteCommand, ClientID sender) } else { - m_pVoteCommand.printf("%s %s", votecommands[i].command, CommandParams); // backward compatibility + m_pVoteCommand.printf("%s %s", votecommands[i].command, CommandParams); // backward compatibility } xr_strcpy(resVoteCommand, VoteCommand); } @@ -1336,7 +1336,7 @@ void game_sv_mp::OnPlayerKilled(NET_Packet P) Msg("! ERROR: killed entity is null ! (entitty [%d][%s]), killer id [%d][%s], Frame [%d]", KilledID, entity ? entity->cName().c_str() : "unknown", KillerID, ps_killer ? ps_killer->getName() : "unknown", Device.dwFrame); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } #ifdef MP_LOGGING @@ -1375,7 +1375,7 @@ void game_sv_mp::SendPlayerKilledMessage( { #ifndef MASTER_GOLD Msg("---Server: sending player [%d] killed message...", KillerID); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD NET_Packet P; GenerateGameMessage(P); P.w_u32(GAME_EVENT_PLAYER_KILLED); @@ -1680,18 +1680,18 @@ void game_sv_mp::RenewAllActorsHealth() if (l_pC->ps->testFlag(GAME_PLAYER_FLAG_VERY_VERY_DEAD)) { #ifdef DEBUG Msg("--- Actor has dead flag in player state"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return; } // this hack (client objects on server) must be deleted !!! CActor* pActor = smart_cast(Level().Objects.net_Find(l_pC->ps->GameID)); - if (!pActor) // if player is spectator + if (!pActor) // if player is spectator return; if (!pActor->g_Alive()) { #ifndef MASTER_GOLD Msg("! ERROR: dead actor !!!"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } @@ -1742,7 +1742,7 @@ void game_sv_mp::RejectGameItem(CSE_Abstract* entity) CSE_Abstract* e_parent = get_entity_from_eid(entity->ID_Parent); // R_ASSERT2( e_parent, make_string( "RejectGameItem: parent not found. entity_id = [%d], parent_id = [%d]", - //entity->ID, entity->ID_Parent ).c_str() ); + // entity->ID, entity->ID_Parent ).c_str() ); VERIFY2(e_parent, make_string("RejectGameItem: parent not found. entity_id = [%d], parent_id = [%d]", entity->ID, entity->ID_Parent) .c_str()); @@ -2012,7 +2012,7 @@ void game_sv_mp::DumpRoundStatistics() // Game().m_WeaponUsageStatistic->Clear(); } -void game_sv_mp::DestroyAllPlayerItems(ClientID id_who) // except rukzak +void game_sv_mp::DestroyAllPlayerItems(ClientID id_who) // except rukzak { xrClientData* xrCData = m_server->ID_to_client(id_who); @@ -2021,7 +2021,7 @@ void game_sv_mp::DestroyAllPlayerItems(ClientID id_who) // except rukzak game_PlayerState* ps = xrCData->ps; #ifndef MASTER_GOLD Msg("---Destroying player [%s] items before spawning new bought items.", ps->getName()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD CActor* pActor = smart_cast(Level().Objects.net_Find(ps->GameID)); if (!pActor) return; @@ -2037,7 +2037,7 @@ void game_sv_mp::DestroyAllPlayerItems(ClientID id_who) // except rukzak CSE_Abstract* tempEntity = m_server->ID_to_entity(object_id); // R_ASSERT2( tempEntity, make_string("entity not found [%d]. Destroy all items of actor[%d]", object_id, - //ps->GameID).c_str() ); + // ps->GameID).c_str() ); VERIFY2(tempEntity, make_string("entity not found [%d]. Destroy all items of actor[%d]", object_id, ps->GameID).c_str()); if (!tempEntity) { diff --git a/src/xrGame/game_sv_mp.h b/src/xrGame/game_sv_mp.h index 79f707e552e..422f1418389 100644 --- a/src/xrGame/game_sv_mp.h +++ b/src/xrGame/game_sv_mp.h @@ -51,7 +51,7 @@ class game_sv_mp : public game_sv_GameState bool m_bVotingReal; u32 m_uVoteStartTime; shared_str m_pVoteCommand; - shared_str m_voting_string; // for sending to clients... + shared_str m_voting_string; // for sending to clients... shared_str m_started_player; virtual void LoadRanks(); @@ -60,7 +60,7 @@ class game_sv_mp : public game_sv_GameState virtual bool Player_RankUp_Allowed() { return m_bRankUp_Allowed; }; virtual void Set_RankUp_Allowed(bool RUA) { m_bRankUp_Allowed = RUA; }; virtual void UpdatePlayersMoney(); - virtual void DestroyAllPlayerItems(ClientID id_who); // except rukzak and artefact :) + virtual void DestroyAllPlayerItems(ClientID id_who); // except rukzak and artefact :) u8 m_u8SpectatorModes; @@ -91,9 +91,9 @@ class game_sv_mp : public game_sv_GameState // ---------------- // virtual bool GetTeamItem_ByID (WeaponDataStruct** pRes, TEAM_WPN_LIST* pWpnList, u16 - //ItemID); + // ItemID); // virtual bool GetTeamItem_ByName (WeaponDataStruct** pRes,TEAM_WPN_LIST* pWpnList, LPCSTR - //ItemName); + // ItemName); virtual void Player_AddBonusMoney(game_PlayerState* ps, s32 MoneyAmount, SPECIAL_KILL_TYPE Reason, u8 Kill = 0); @@ -116,7 +116,7 @@ class game_sv_mp : public game_sv_GameState virtual BOOL OnTouch(u16 eid_who, u16 eid_target, BOOL bForced = FALSE) { return true; - }; // TRUE=allow ownership, FALSE=denied + }; // TRUE=allow ownership, FALSE=denied virtual void OnDetach(u16 eid_who, u16 eid_target){}; virtual void OnPlayerKillPlayer(game_PlayerState* ps_killer, game_PlayerState* ps_killed, KILL_TYPE KillType, SPECIAL_KILL_TYPE SpecialKillType, CSE_Abstract* pWeaponA){}; @@ -129,8 +129,8 @@ class game_sv_mp : public game_sv_GameState virtual void net_Export_State(NET_Packet& P, ClientID id_to); - virtual void OnRoundStart(); // старт раунда - virtual void OnRoundEnd(); // round_end_reason // конец раунда + virtual void OnRoundStart(); // старт раунда + virtual void OnRoundEnd(); // round_end_reason // конец раунда virtual bool OnNextMap(); virtual void OnPrevMap(); @@ -177,10 +177,10 @@ class game_sv_mp : public game_sv_GameState bool CheckStatisticsReady(); void DumpRoundStatistics(); - void StartToDumpStatistics(); // creates file name for statistics.. + void StartToDumpStatistics(); // creates file name for statistics.. string_path round_statistics_dump_fn; void FinishToDumpStatistics(); - void StopToDumpStatistics(); // removes file + void StopToDumpStatistics(); // removes file void AskAllToUpdateStatistics(); struct async_statistics_collector @@ -206,9 +206,9 @@ class game_sv_mp : public game_sv_GameState bool CheckPlayerMapName(ClientID const& clientID, NET_Packet& P); void ReconnectPlayer(ClientID const& clientID); - virtual void OnPlayerOpenBuyMenu(xrClientData const* pclient){}; // this method invokes only if player dead + virtual void OnPlayerOpenBuyMenu(xrClientData const* pclient){}; // this method invokes only if player dead virtual void OnPlayerCloseBuyMenu( - xrClientData const* pclient){}; // if client state buyMenuPlayerReadyToSpawn respawn player + xrClientData const* pclient){}; // if client state buyMenuPlayerReadyToSpawn respawn player s32 ExcludeBanTimeFromVoteStr(char const* vote_string, char* new_vote_str, u32 new_vote_str_size); diff --git a/src/xrGame/game_sv_mp_script.cpp b/src/xrGame/game_sv_mp_script.cpp index acf05942aa2..9f6cc5bd836 100644 --- a/src/xrGame/game_sv_mp_script.cpp +++ b/src/xrGame/game_sv_mp_script.cpp @@ -78,11 +78,11 @@ void game_sv_mp_script::SpawnPlayer(ClientID id, LPCSTR N, LPCSTR SkinName, RPoi } // Spawn - CSE_Abstract* E = spawn_begin(N); // create SE + CSE_Abstract* E = spawn_begin(N); // create SE - E->set_name_replace(get_name_id(id)); // name + E->set_name_replace(get_name_id(id)); // name - E->s_flags.assign(M_SPAWN_OBJECT_LOCAL | M_SPAWN_OBJECT_ASPLAYER); // flags + E->s_flags.assign(M_SPAWN_OBJECT_LOCAL | M_SPAWN_OBJECT_ASPLAYER); // flags CSE_ALifeCreatureActor* pA = smart_cast(E); CSE_Spectator* pS = smart_cast(E); diff --git a/src/xrGame/game_sv_mp_script.h b/src/xrGame/game_sv_mp_script.h index a3f556c2e3d..0b6d6ec1fdb 100644 --- a/src/xrGame/game_sv_mp_script.h +++ b/src/xrGame/game_sv_mp_script.h @@ -21,11 +21,11 @@ class game_sv_mp_script : public game_sv_mp virtual void OnEvent(NET_Packet& P, u16 type, u32 time, ClientID sender); virtual game_PlayerState* createPlayerState() { return inherited::createPlayerState(); }; virtual void OnPlayerKillPlayer(ClientID id_killer, ClientID id_killed){}; - virtual void OnPlayerHitPlayer(u16 id_hitter, u16 id_hitted, NET_Packet& P){}; //игрок получил Hit + virtual void OnPlayerHitPlayer(u16 id_hitter, u16 id_hitted, NET_Packet& P){}; //игрок получил Hit virtual BOOL OnTouch(u16 eid_who, u16 eid_target, BOOL bForced = FALSE) { return true; - }; // TRUE=allow ownership, FALSE=denied + }; // TRUE=allow ownership, FALSE=denied virtual void OnDetach(u16 eid_who, u16 eid_target){}; protected: diff --git a/src/xrGame/game_sv_mp_team.h b/src/xrGame/game_sv_mp_team.h index 9691e44f05b..29645d1460f 100644 --- a/src/xrGame/game_sv_mp_team.h +++ b/src/xrGame/game_sv_mp_team.h @@ -9,9 +9,9 @@ DEF_VECTOR(DEF_ITEMS_LIST, u16); //структура данных по команде struct TeamStruct { - shared_str caSection; // имя секции комманды - TEAM_SKINS_NAMES aSkins; // список скинов для команды - DEF_ITEMS_LIST aDefaultItems; // список предметов по умолчанию + shared_str caSection; // имя секции комманды + TEAM_SKINS_NAMES aSkins; // список скинов для команды + DEF_ITEMS_LIST aDefaultItems; // список предметов по умолчанию //---- Money ------------------- s32 m_iM_Start; diff --git a/src/xrGame/game_sv_mp_vote_flags.h b/src/xrGame/game_sv_mp_vote_flags.h index 2f35b804f5e..fbd7c75cf03 100644 --- a/src/xrGame/game_sv_mp_vote_flags.h +++ b/src/xrGame/game_sv_mp_vote_flags.h @@ -1,6 +1,6 @@ enum { - flFullVote = u16(1 << 0), // old vote sintax + flFullVote = u16(1 << 0), // old vote sintax flVoteRestart = (1 << 1), flVoteRestartFast = (1 << 2), flVoteKick = (1 << 3), diff --git a/src/xrGame/game_sv_teamdeathmatch.cpp b/src/xrGame/game_sv_teamdeathmatch.cpp index 9e15d5905cd..a7299d32f52 100644 --- a/src/xrGame/game_sv_teamdeathmatch.cpp +++ b/src/xrGame/game_sv_teamdeathmatch.cpp @@ -134,7 +134,7 @@ bool game_sv_TeamDeathmatch::TeamSizeEqual() return GetPlayersCountInTeams(1) == GetPlayersCountInTeams(2); } -struct lowest_player_functor // for autoteam balance +struct lowest_player_functor // for autoteam balance { s16 lowest_score; s16 MaxTeam; @@ -244,7 +244,7 @@ void game_sv_TeamDeathmatch::OnPlayerConnect(ClientID id_who) xrClientData* xrCData = m_server->ID_to_client(id_who); game_PlayerState* ps_who = get_id(id_who); // LPCSTR options = get_name_id (id_who); - ps_who->team = AutoTeam(); // u8(get_option_i(options,"team",AutoTeam())); + ps_who->team = AutoTeam(); // u8(get_option_i(options,"team",AutoTeam())); if (ps_who->IsSkip()) return; @@ -509,7 +509,7 @@ void game_sv_TeamDeathmatch::Update() case GAME_PHASE_TEAMS_IN_A_DRAW: { if (m_delayedRoundEnd && m_roundEndDelay < Device.TimerAsync()) { - OnRoundEnd(); // eRoundEnd_Finish + OnRoundEnd(); // eRoundEnd_Finish } } break; @@ -528,7 +528,7 @@ void game_sv_TeamDeathmatch::OnTimelimitExceed() m_phase = u16((winning_team) ? GAME_PHASE_TEAM2_SCORES : GAME_PHASE_TEAM1_SCORES); switch_Phase(m_phase); - OnDelayedRoundEnd(eRoundEnd_TimeLimit); //"TIME_limit" + OnDelayedRoundEnd(eRoundEnd_TimeLimit); //"TIME_limit" } void game_sv_TeamDeathmatch::OnFraglimitExceed() { @@ -537,7 +537,7 @@ void game_sv_TeamDeathmatch::OnFraglimitExceed() m_phase = u16((winning_team) ? GAME_PHASE_TEAM2_SCORES : GAME_PHASE_TEAM1_SCORES); switch_Phase(m_phase); - OnDelayedRoundEnd(eRoundEnd_FragLimit); //"FRAG_limit" + OnDelayedRoundEnd(eRoundEnd_FragLimit); //"FRAG_limit" } //----------------------------------------------- void game_sv_TeamDeathmatch::ReadOptions(shared_str& options) diff --git a/src/xrGame/game_sv_teamdeathmatch.h b/src/xrGame/game_sv_teamdeathmatch.h index bb87b86c019..273d67c89fa 100644 --- a/src/xrGame/game_sv_teamdeathmatch.h +++ b/src/xrGame/game_sv_teamdeathmatch.h @@ -24,7 +24,7 @@ class game_sv_TeamDeathmatch : public game_sv_Deathmatch virtual LPCSTR type_name() const { return "teamdeathmatch"; }; virtual void Update(); - virtual void net_Export_State(NET_Packet& P, ClientID id_to); // full state + virtual void net_Export_State(NET_Packet& P, ClientID id_to); // full state // Events virtual void OnPlayerConnect(ClientID id_who); virtual void OnPlayerConnectFinished(ClientID id_who); diff --git a/src/xrGame/game_sv_teamdeathmatch_process_event.cpp b/src/xrGame/game_sv_teamdeathmatch_process_event.cpp index 7010f87b0be..f6858ceae78 100644 --- a/src/xrGame/game_sv_teamdeathmatch_process_event.cpp +++ b/src/xrGame/game_sv_teamdeathmatch_process_event.cpp @@ -24,5 +24,5 @@ void game_sv_TeamDeathmatch::OnEvent(NET_Packet& P, u16 type, u32 time, ClientID break; default: { inherited::OnEvent(P, type, time, sender); } - }; // switch (type) + }; // switch (type) } \ No newline at end of file diff --git a/src/xrGame/gamespy/GameSpy_QR2_callbacks.cpp b/src/xrGame/gamespy/GameSpy_QR2_callbacks.cpp index c3baf044734..1d8d5793258 100644 --- a/src/xrGame/gamespy/GameSpy_QR2_callbacks.cpp +++ b/src/xrGame/gamespy/GameSpy_QR2_callbacks.cpp @@ -51,7 +51,7 @@ void __cdecl callback_serverkey(int keyid, qr2_buffer_t outbuf, void* userdata) case SERVER_UP_TIME_KEY: pQR2->BufferAdd(outbuf, time_str); break; case GAMETYPE_KEY: ADD_KEY_VAL(gameState, pQR2, BufferAdd, outbuf, type_name()); - break; // pQR2->BufferAdd(outbuf, gameState->type_name()); break; + break; // pQR2->BufferAdd(outbuf, gameState->type_name()); break; case GAMEMODE_KEY: pQR2->BufferAdd(outbuf, "openplaying"); break; case PASSWORD_KEY: if (0 == *(pServer->Password)) { @@ -77,97 +77,105 @@ void __cdecl callback_serverkey(int keyid, qr2_buffer_t outbuf, void* userdata) case DEDICATED_KEY: pQR2->BufferAdd_Int(outbuf, pServer->IsDedicated()); break; case GAMETYPE_NAME_KEY: ADD_KEY_VAL(gameState, pQR2, BufferAdd_Int, outbuf, Type()); - break; // pQR2->BufferAdd_Int(outbuf, gameState->Type()); break; + break; // pQR2->BufferAdd_Int(outbuf, gameState->Type()); break; case NUMTEAMS_KEY: ADD_KEY_VAL(gmMP, pQR2, BufferAdd_Int, outbuf, GetNumTeams()); - break; // pQR2->BufferAdd_Int(outbuf, gmMP->GetNumTeams()); break; + break; // pQR2->BufferAdd_Int(outbuf, gmMP->GetNumTeams()); break; case G_MAX_PING_KEY: pQR2->BufferAdd_Int(outbuf, g_sv_dwMaxClientPing); break; //------- game ---------// case G_MAP_ROTATION_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, HasMapRotation()); - break; // if (gmDM) pQR2->BufferAdd_Int(outbuf, gmDM->HasMapRotation()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM) pQR2->BufferAdd_Int(outbuf, gmDM->HasMapRotation()); else pQR2->BufferAdd(outbuf, + // ""); + // break; case G_VOTING_ENABLED_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, IsVotingEnabled()); - break; // if (gmDM) pQR2->BufferAdd_Int(outbuf, gmDM->IsVotingEnabled()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM) pQR2->BufferAdd_Int(outbuf, gmDM->IsVotingEnabled()); else pQR2->BufferAdd(outbuf, + // ""); + // break; case G_SPECTATOR_MODES_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, GetSpectatorModes()); - break; // if (gmDM) pQR2->BufferAdd_Int(outbuf, gmDM->GetSpectatorModes()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM) pQR2->BufferAdd_Int(outbuf, gmDM->GetSpectatorModes()); else pQR2->BufferAdd(outbuf, ""); + // break; //------- deathmatch -------// case G_FRAG_LIMIT_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, GetFragLimit()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetFragLimit()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetFragLimit()); else pQR2->BufferAdd(outbuf, + // ""); + // break; case G_TIME_LIMIT_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, GetTimeLimit()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetTimeLimit()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetTimeLimit()); else pQR2->BufferAdd(outbuf, + // ""); + // break; case G_DAMAGE_BLOCK_TIME_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, GetDMBLimit()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetDMBLimit()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetDMBLimit()); else pQR2->BufferAdd(outbuf, + // ""); + // break; case G_DAMAGE_BLOCK_INDICATOR_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, IsDamageBlockIndEnabled()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->IsDamageBlockIndEnabled()); else pQR2->BufferAdd(outbuf, - // ""); break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->IsDamageBlockIndEnabled()); else pQR2->BufferAdd(outbuf, + // ""); break; case G_ANOMALIES_ENABLED_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, IsAnomaliesEnabled()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->IsAnomaliesEnabled()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->IsAnomaliesEnabled()); else pQR2->BufferAdd(outbuf, ""); + // break; case G_ANOMALIES_TIME_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, GetAnomaliesTime()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetAnomaliesTime()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetAnomaliesTime()); else pQR2->BufferAdd(outbuf, + // ""); + // break; case G_WARM_UP_TIME_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, GetWarmUpTime()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetWarmUpTime()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetWarmUpTime()); else pQR2->BufferAdd(outbuf, + // ""); + // break; case G_FORCE_RESPAWN_KEY: ADD_KEY_VAL(gmDM, pQR2, BufferAdd_Int, outbuf, GetForceRespawn()); - break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetForceRespawn()); else pQR2->BufferAdd(outbuf, ""); - // break; + break; // if (gmDM)pQR2->BufferAdd_Int(outbuf, gmDM->GetForceRespawn()); else pQR2->BufferAdd(outbuf, + // ""); + // break; //---- game_sv_teamdeathmatch ---- case G_AUTO_TEAM_BALANCE_KEY: ADD_KEY_VAL(gmTDM, pQR2, BufferAdd_Int, outbuf, Get_AutoTeamBalance()); - break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_AutoTeamBalance ()); break; + break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_AutoTeamBalance ()); break; case G_AUTO_TEAM_SWAP_KEY: ADD_KEY_VAL(gmTDM, pQR2, BufferAdd_Int, outbuf, Get_AutoTeamSwap()); - break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_AutoTeamSwap ()); break; + break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_AutoTeamSwap ()); break; case G_FRIENDLY_INDICATORS_KEY: ADD_KEY_VAL(gmTDM, pQR2, BufferAdd_Int, outbuf, Get_FriendlyIndicators()); - break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_FriendlyIndicators ()); break; + break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_FriendlyIndicators ()); break; case G_FRIENDLY_NAMES_KEY: ADD_KEY_VAL(gmTDM, pQR2, BufferAdd_Int, outbuf, Get_FriendlyNames()); - break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_FriendlyNames ()); break; + break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, gmTDM->Get_FriendlyNames ()); break; case G_FRIENDLY_FIRE_KEY: ADD_KEY_VAL_INT(gmTDM, pQR2, BufferAdd_Int, outbuf, GetFriendlyFire() * 100.0f); - break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, int(gmTDM->GetFriendlyFire()*100.0f)); break; + break; // if (gmTDM)pQR2->BufferAdd_Int(outbuf, int(gmTDM->GetFriendlyFire()*100.0f)); break; //---- game_sv_artefacthunt ---- case G_ARTEFACTS_COUNT_KEY: ADD_KEY_VAL(gmAhunt, pQR2, BufferAdd_Int, outbuf, Get_ArtefactsCount()); - break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ArtefactsCount ()); break; + break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ArtefactsCount ()); break; case G_ARTEFACT_STAY_TIME_KEY: ADD_KEY_VAL(gmAhunt, pQR2, BufferAdd_Int, outbuf, Get_ArtefactsStayTime()); - break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ArtefactsStayTime ()); break; + break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ArtefactsStayTime ()); break; case G_ARTEFACT_RESPAWN_TIME_KEY: ADD_KEY_VAL(gmAhunt, pQR2, BufferAdd_Int, outbuf, Get_ArtefactsRespawnDelta()); - break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ArtefactsRespawnDelta ()); break; + break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ArtefactsRespawnDelta ()); break; case G_REINFORCEMENT_KEY: ADD_KEY_VAL(gmAhunt, pQR2, BufferAdd_Int, outbuf, Get_ReinforcementTime()); - break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ReinforcementTime ()); break; + break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ReinforcementTime ()); break; case G_SHIELDED_BASES_KEY: ADD_KEY_VAL(gmAhunt, pQR2, BufferAdd_Int, outbuf, Get_ShieldedBases()); - break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ShieldedBases ()); break; + break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ShieldedBases ()); break; case G_RETURN_PLAYERS_KEY: ADD_KEY_VAL(gmAhunt, pQR2, BufferAdd_Int, outbuf, Get_ReturnPlayers()); - break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ReturnPlayers ()); break; + break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_ReturnPlayers ()); break; case G_BEARER_CANT_SPRINT_KEY: ADD_KEY_VAL(gmAhunt, pQR2, BufferAdd_Int, outbuf, Get_BearerCantSprint()); - break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_BearerCantSprint ()); break; + break; // if (gmAhunt) pQR2->BufferAdd_Int(outbuf, gmAhunt->Get_BearerCantSprint ()); break; default: { // R_ASSERT2(0, "Unknown GameSpy Server key "); @@ -280,7 +288,7 @@ void __cdecl callback_keylist(qr2_key_type keytype, qr2_keybuffer_t keybuffer, v pQR2->KeyBufferAdd(keybuffer, GAMETYPE_KEY); pQR2->KeyBufferAdd(keybuffer, PASSWORD_KEY); - pQR2->KeyBufferAdd(keybuffer, G_USER_PASSWORD_KEY); // user + pQR2->KeyBufferAdd(keybuffer, G_USER_PASSWORD_KEY); // user pQR2->KeyBufferAdd(keybuffer, HOSTPORT_KEY); diff --git a/src/xrGame/group_hierarchy_holder.cpp b/src/xrGame/group_hierarchy_holder.cpp index 1c74b70d594..6ba08bb698b 100644 --- a/src/xrGame/group_hierarchy_holder.cpp +++ b/src/xrGame/group_hierarchy_holder.cpp @@ -40,7 +40,7 @@ void CGroupHierarchyHolder::update_leader() break; } } -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER void CGroupHierarchyHolder::register_in_group(CEntity* member) { @@ -68,7 +68,7 @@ void CGroupHierarchyHolder::register_in_squad(CEntity* member) m_leader = member; if (!squad().leader()) squad().leader(member); } -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER } void CGroupHierarchyHolder::register_in_agent_manager(CEntity* member) @@ -112,7 +112,7 @@ void CGroupHierarchyHolder::unregister_in_squad(CEntity* member) else squad().update_leader(); } -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER } void CGroupHierarchyHolder::unregister_in_agent_manager(CEntity* member) diff --git a/src/xrGame/group_hierarchy_holder.h b/src/xrGame/group_hierarchy_holder.h index 987105e3411..62d5af7bb91 100644 --- a/src/xrGame/group_hierarchy_holder.h +++ b/src/xrGame/group_hierarchy_holder.h @@ -40,7 +40,7 @@ class CGroupHierarchyHolder #ifdef SQUAD_HIERARCHY_HOLDER_USE_LEADER private: CEntity* m_leader; -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER private: CSquadHierarchyHolder* m_squad; @@ -94,7 +94,7 @@ class CGroupHierarchyHolder public: void update_leader(); IC CEntity* leader() const; -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER }; #include "group_hierarchy_holder_inline.h" \ No newline at end of file diff --git a/src/xrGame/group_hierarchy_holder_inline.h b/src/xrGame/group_hierarchy_holder_inline.h index 97399bec626..dc9153ebd31 100644 --- a/src/xrGame/group_hierarchy_holder_inline.h +++ b/src/xrGame/group_hierarchy_holder_inline.h @@ -14,7 +14,7 @@ IC CGroupHierarchyHolder::CGroupHierarchyHolder(CSquadHierarchyHolder* squad) m_squad = squad; #ifdef SQUAD_HIERARCHY_HOLDER_USE_LEADER m_leader = 0; -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER m_visible_objects = 0; m_sound_objects = 0; m_hit_objects = 0; @@ -53,7 +53,7 @@ IC CEntity* CGroupHierarchyHolder::leader() const { return (m_leader); } -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER IC GroupHierarchyHolder::VISIBLE_OBJECTS& CGroupHierarchyHolder::visible_objects() const { diff --git a/src/xrGame/gsc_dsigned_ltx.cpp b/src/xrGame/gsc_dsigned_ltx.cpp index 0a447a4e481..5bc613768ef 100644 --- a/src/xrGame/gsc_dsigned_ltx.cpp +++ b/src/xrGame/gsc_dsigned_ltx.cpp @@ -68,7 +68,7 @@ bool gsc_dsigned_ltx_reader::load_and_verify(u8* buffer, u32 const size) char* dsign_section = search_dsign_section(buffer, size); if (dsign_section == NULL) return false; - dsign_section -= 3; // \r\n[ + dsign_section -= 3; // \r\n[ u32 const dsign_sect_size = size - static_cast((u8*)dsign_section - buffer); IReader sign_reader(dsign_section, dsign_sect_size); @@ -79,7 +79,7 @@ bool gsc_dsigned_ltx_reader::load_and_verify(u8* buffer, u32 const size) *dsign_section = 0; xr_strcat(dsign_section, dsign_sect_size, ltx_date.c_str()); - u32 new_size = size - dsign_sect_size + ltx_date.size() + 1; // xr_strlen(buffer) + u32 new_size = size - dsign_sect_size + ltx_date.size() + 1; // xr_strlen(buffer) if (!verify(buffer, new_size, ltx_dsign)) { return false; } diff --git a/src/xrGame/gsc_dsigned_ltx.h b/src/xrGame/gsc_dsigned_ltx.h index fe7ac52a22e..639ce05568b 100644 --- a/src/xrGame/gsc_dsigned_ltx.h +++ b/src/xrGame/gsc_dsigned_ltx.h @@ -19,7 +19,7 @@ class gsc_dsigned_ltx_writer : private xr_dsa_signer private: CInifile m_ltx; CMemoryWriter m_mem_writer; -}; // class gsc_dsigned_ltx_writer +}; // class gsc_dsigned_ltx_writer class gsc_dsigned_ltx_reader : private xr_dsa_verifyer { @@ -32,6 +32,6 @@ class gsc_dsigned_ltx_reader : private xr_dsa_verifyer CInifile& get_ltx() { return *m_ltx; }; private: CInifile* m_ltx; -}; // class gsc_dsigned_ltx_reader +}; // class gsc_dsigned_ltx_reader -#endif //#ifndef GSC_DSINGNED_LTX_INCLUDED \ No newline at end of file +#endif //#ifndef GSC_DSINGNED_LTX_INCLUDED \ No newline at end of file diff --git a/src/xrGame/harvest_time.cpp b/src/xrGame/harvest_time.cpp index 906c097aaf0..dc1a25ee396 100644 --- a/src/xrGame/harvest_time.cpp +++ b/src/xrGame/harvest_time.cpp @@ -49,7 +49,7 @@ struct victim_raw_kill shared_str m_killer; shared_str m_victim; u32 m_after_time; -}; // struct victim_raw_kill +}; // struct victim_raw_kill void harvest_time::OnPlayerKilled( u16 killer_id, u16 target_id, u16 weapon_id, std::pair kill_type) @@ -78,4 +78,4 @@ void harvest_time::OnPlayerSpawned(game_PlayerState const* ps) } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/harvest_time.h b/src/xrGame/harvest_time.h index 4cc74f13364..49594412b50 100644 --- a/src/xrGame/harvest_time.h +++ b/src/xrGame/harvest_time.h @@ -26,12 +26,12 @@ class harvest_time : public player_state_param protected: u32 m_harvest_count; u32 m_spawn_time; -}; // class harvest_time +}; // class harvest_time ADD_ACCUMULATIVE_STATE(acpv_harvest_count, harvest_time); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_harvest_count, harvest_time) -} // namespace award_system +} // namespace award_system -#endif //#ifndef HARVEST_TIME_INCLUDED \ No newline at end of file +#endif //#ifndef HARVEST_TIME_INCLUDED \ No newline at end of file diff --git a/src/xrGame/hit_immunity.cpp b/src/xrGame/hit_immunity.cpp index 3cf86f48fd6..d34072dc7fb 100644 --- a/src/xrGame/hit_immunity.cpp +++ b/src/xrGame/hit_immunity.cpp @@ -29,7 +29,7 @@ void CHitImmunity::LoadImmunities(LPCSTR imm_sect, CInifile const* ini) m_HitImmunityKoefs[ALife::eHitTypeExplosion] = ini->r_float(imm_sect, "explosion_immunity"); m_HitImmunityKoefs[ALife::eHitTypeFireWound] = ini->r_float(imm_sect, "fire_wound_immunity"); // m_HitImmunityKoefs[ALife::eHitTypePhysicStrike] = READ_IF_EXISTS(ini, r_float, - //imm_sect,"physic_strike_wound_immunity", 1.0f); + // imm_sect,"physic_strike_wound_immunity", 1.0f); m_HitImmunityKoefs[ALife::eHitTypeLightBurn] = m_HitImmunityKoefs[ALife::eHitTypeBurn]; } @@ -48,6 +48,6 @@ void CHitImmunity::AddImmunities(LPCSTR imm_sect, CInifile const* ini) m_HitImmunityKoefs[ALife::eHitTypeExplosion] += READ_IF_EXISTS(ini, r_float, imm_sect, "explosion_immunity", 0.0f); m_HitImmunityKoefs[ALife::eHitTypeFireWound] += READ_IF_EXISTS(ini, r_float, imm_sect, "fire_wound_immunity", 0.0f); // m_HitImmunityKoefs[ALife::eHitTypePhysicStrike] += READ_IF_EXISTS(ini, r_float, - //imm_sect,"physic_strike_wound_immunity", 0.0f); + // imm_sect,"physic_strike_wound_immunity", 0.0f); m_HitImmunityKoefs[ALife::eHitTypeLightBurn] = m_HitImmunityKoefs[ALife::eHitTypeBurn]; } diff --git a/src/xrGame/hit_memory_manager.cpp b/src/xrGame/hit_memory_manager.cpp index 36f5b3b3f39..36dcfa7442b 100644 --- a/src/xrGame/hit_memory_manager.cpp +++ b/src/xrGame/hit_memory_manager.cpp @@ -26,7 +26,7 @@ #ifndef MASTER_GOLD #include "actor.h" #include "ai_debug.h" -#endif // MASTER_GOLD +#endif // MASTER_GOLD struct CHitObjectPredicate { @@ -89,7 +89,7 @@ void CHitMemoryManager::add(float amount, const Fvector& vLocalDir, const IGameO { #ifndef MASTER_GOLD if (who && smart_cast(who) && psAI_Flags.test(aiIgnoreActor)) return; -#endif // MASTER_GOLD +#endif // MASTER_GOLD VERIFY(m_hits); if (!object().g_Alive()) return; @@ -147,7 +147,7 @@ void CHitMemoryManager::add(const CHitObject& _hit_object) #ifndef MASTER_GOLD if (_hit_object.m_object && smart_cast(_hit_object.m_object) && psAI_Flags.test(aiIgnoreActor)) return; -#endif // MASTER_GOLD +#endif // MASTER_GOLD VERIFY(m_hits); if (!object().g_Alive()) return; @@ -257,7 +257,7 @@ void CHitMemoryManager::save(NET_Packet& packet) const packet.w_float((*I).m_object_params.m_orientation.yaw); packet.w_float((*I).m_object_params.m_orientation.pitch); packet.w_float((*I).m_object_params.m_orientation.roll); -#endif // USE_ORIENTATION +#endif // USE_ORIENTATION // self params packet.w_u32((*I).m_self_params.m_level_vertex_id); packet.w_vec3((*I).m_self_params.m_position); @@ -265,16 +265,16 @@ void CHitMemoryManager::save(NET_Packet& packet) const packet.w_float((*I).m_self_params.m_orientation.yaw); packet.w_float((*I).m_self_params.m_orientation.pitch); packet.w_float((*I).m_self_params.m_orientation.roll); -#endif // USE_ORIENTATION +#endif // USE_ORIENTATION #ifdef USE_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_level_time) : 0); -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_last_level_time) : 0); -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_FIRST_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_first_level_time) : 0); -#endif // USE_FIRST_LEVEL_TIME +#endif // USE_FIRST_LEVEL_TIME packet.w_vec3((*I).m_direction); packet.w_u16((*I).m_bone_index); packet.w_float((*I).m_amount); @@ -317,17 +317,17 @@ void CHitMemoryManager::load(IReader& packet) VERIFY(Device.dwTimeGlobal >= object.m_level_time); object.m_level_time = packet.r_u32(); object.m_level_time += Device.dwTimeGlobal; -#endif // USE_LEVEL_TIME +#endif // USE_LEVEL_TIME #ifdef USE_LAST_LEVEL_TIME VERIFY(Device.dwTimeGlobal >= object.m_last_level_time); object.m_last_level_time = packet.r_u32(); object.m_last_level_time += Device.dwTimeGlobal; -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_FIRST_LEVEL_TIME VERIFY(Device.dwTimeGlobal >= (*I).m_first_level_time); object.m_first_level_time = packet.r_u32(); object.m_first_level_time += Device.dwTimeGlobal; -#endif // USE_FIRST_LEVEL_TIME +#endif // USE_FIRST_LEVEL_TIME packet.r_fvector3(object.m_direction); object.m_bone_index = packet.r_u16(); object.m_amount = packet.r_float(); @@ -351,7 +351,7 @@ void CHitMemoryManager::load(IReader& packet) VERIFY(spawn_callback->m_object_callback == callback); } } -#endif // DEBUG +#endif // DEBUG } } diff --git a/src/xrGame/hits_store.cpp b/src/xrGame/hits_store.cpp index 02428e8c92f..bec9ac252eb 100644 --- a/src/xrGame/hits_store.cpp +++ b/src/xrGame/hits_store.cpp @@ -38,4 +38,4 @@ void hits_store::add_hit( tmp_iter->second->push_obsolete(tmp_hit); } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/hits_store.h b/src/xrGame/hits_store.h index b0b29a7872b..c78695d609b 100644 --- a/src/xrGame/hits_store.h +++ b/src/xrGame/hits_store.h @@ -20,7 +20,7 @@ class hits_store float m_dist; u16 m_weapon_id; u16 m_bone_id; - }; // struct bullet_hit + }; // struct bullet_hit static unsigned int const max_hits_count = 10; typedef obsolete_queue, max_hits_count> bullet_hits_t; @@ -34,10 +34,10 @@ class hits_store private: bullet_hits_map_t m_bullet_hits; -}; // class hits_store +}; // class hits_store -} // namespace award_system +} // namespace award_system #include "hits_store_inline.h" -#endif //#ifndef HITS_STORE_INCLUDED \ No newline at end of file +#endif //#ifndef HITS_STORE_INCLUDED \ No newline at end of file diff --git a/src/xrGame/hits_store_inline.h b/src/xrGame/hits_store_inline.h index f9e23f12c85..f141b27a602 100644 --- a/src/xrGame/hits_store_inline.h +++ b/src/xrGame/hits_store_inline.h @@ -19,4 +19,4 @@ u32 const hits_store::fetch_hits(Predicate& predicate, buffer_vector return ret_count; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/holder_custom.h b/src/xrGame/holder_custom.h index a1f03adea5f..5eaa889a260 100644 --- a/src/xrGame/holder_custom.h +++ b/src/xrGame/holder_custom.h @@ -21,7 +21,7 @@ class CHolderCustom m_ownerActor = NULL; } virtual ~CHolderCustom() { ; } - virtual void UpdateEx(float fov){}; // called by owner + virtual void UpdateEx(float fov){}; // called by owner virtual CHolderCustom* cast_holder_custom() { return this; } bool Engaged() { return m_owner != NULL; } virtual void OnMouseMove(int x, int y) = 0; diff --git a/src/xrGame/hud_item_object.h b/src/xrGame/hud_item_object.h index e782ece75bb..96b50a41736 100644 --- a/src/xrGame/hud_item_object.h +++ b/src/xrGame/hud_item_object.h @@ -5,7 +5,7 @@ class CHudItemObject : public CInventoryItemObject, public CHudItem { -protected: //чтоб нельзя было вызвать на прямую +protected: //чтоб нельзя было вызвать на прямую CHudItemObject(); virtual ~CHudItemObject(); diff --git a/src/xrGame/ik/Dof7control.cpp b/src/xrGame/ik/Dof7control.cpp index bc003dc4528..32952a6ee73 100644 --- a/src/xrGame/ik/Dof7control.cpp +++ b/src/xrGame/ik/Dof7control.cpp @@ -125,7 +125,7 @@ static int solve_R_angle(const float g[3], const float s[3], const float t[3], c else { n = 1; - r_angle = temp[1]; //? + r_angle = temp[1]; //? } } else if (n == 1) diff --git a/src/xrGame/ik/Dof7control.h b/src/xrGame/ik/Dof7control.h index 431214e9c14..cbec4aba70e 100644 --- a/src/xrGame/ik/Dof7control.h +++ b/src/xrGame/ik/Dof7control.h @@ -90,8 +90,8 @@ class SRS // // Stores angle of R joint // - float upper_len; // Len of T pos vector - float lower_len; // Len of S pos vector + float upper_len; // Len of T pos vector + float lower_len; // Len of S pos vector float reciprocal_upper_len; float r_angle; diff --git a/src/xrGame/ik/IKLimb.cpp b/src/xrGame/ik/IKLimb.cpp index 023ab745433..dd00e4a2db9 100644 --- a/src/xrGame/ik/IKLimb.cpp +++ b/src/xrGame/ik/IKLimb.cpp @@ -18,9 +18,9 @@ int ik_blend_free_foot = 1; int ik_local_blending = 0; int ik_collide_blend = 0; -const Matrix Midentity = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}; //. in XGlobal +const Matrix Midentity = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}; //. in XGlobal -const Matrix IKLocalJoint = {0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1}; //. in XGlobal +const Matrix IKLocalJoint = {0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1}; //. in XGlobal const Fmatrix XLocalJoint = {0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}; const Fmatrix xm2im = {0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1}; @@ -35,7 +35,7 @@ typedef float IVektor[3]; const IVektor lproj_vector = {0, 0, 1}; const IVektor lpos_vector = {-1, 0, 0}; -const IVektor gproj_vector = {0, 0, 1}; //. in XGlobal +const IVektor gproj_vector = {0, 0, 1}; //. in XGlobal const IVektor gpos_vector = {1, 0, 0}; // const float ik_timedelta_eps = EPS; @@ -194,7 +194,7 @@ Fmatrix& CIKLimb::transform(Fmatrix& m, u16 bone0, u16 bone1) const float CIKLimb::SwivelAngle(const Fmatrix& ihip, const SCalculateData& cd) { Fvector foot; - foot.set(Kinematics()->LL_GetTransform(m_bones[2]).c); // use "0" channal only? + foot.set(Kinematics()->LL_GetTransform(m_bones[2]).c); // use "0" channal only? ihip.transform_tiny(foot); xm2im.transform_tiny(foot); @@ -232,7 +232,7 @@ void CIKLimb::GetKnee(Fvector& knee, const SCalculateData& cd) const Fvector b2; b2.sub(knee, b1); Fvector bb1; - bb1.mul(p1, 1.f / mp0 * dot); // mp1 + bb1.mul(p1, 1.f / mp0 * dot); // mp1 knee.add(bb1, b2); knee.add(hip); } @@ -475,7 +475,7 @@ IC void get_blend_speed_limits(float& l, float& a, const SCalculateData& cd, con { Fmatrix m; get_diff_value(sv_state.anim_pos(m), cd.state.anim_pos, l, a); - l *= 1.5f; // a*=1.5; + l *= 1.5f; // a*=1.5; // l*=0.3f;a*=0.3f; // clamp(l,0.f,0.1f); // clamp(a,0.f,0.03f); @@ -512,8 +512,8 @@ IC void blend_speed_accel(SCalculateData& cd) return; } - cd.state.speed_blend_l += blend_accel_l * Device.fTimeDelta; // / Device.fTimeDelta; - cd.state.speed_blend_a += blend_accel_a * Device.fTimeDelta; // / Device.fTimeDelta; + cd.state.speed_blend_l += blend_accel_l * Device.fTimeDelta; // / Device.fTimeDelta; + cd.state.speed_blend_a += blend_accel_a * Device.fTimeDelta; // / Device.fTimeDelta; cd.l = cd.state.speed_blend_l * Device.fTimeDelta; cd.a = cd.state.speed_blend_a * Device.fTimeDelta; } @@ -530,7 +530,7 @@ void CIKLimb::SetNewGoal(const SIKCollideData& cld, SCalculateData& cd) cd.state.blend_to = cd.state.goal; sv_state.get_calculate_state(cd.state); - if (cd.state.foot_step) // the foot in animation on ground + if (cd.state.foot_step) // the foot in animation on ground SetNewStepGoal(cld, cd); else if (ik_blend_free_foot) { @@ -695,7 +695,7 @@ void CIKLimb::Blending(SCalculateData& cd) VERIFY(state_valide(sv_state)); if (sv_state.foot_step() != cd.state.foot_step) reset_blend_speed(cd); - if (ik_local_blending && sv_state.blending() && !sv_state.foot_step() && !cd.state.foot_step) //. + if (ik_local_blending && sv_state.blending() && !sv_state.foot_step() && !cd.state.foot_step) //. { blend_speed_accel(cd); ik_goal_matrix m; @@ -707,9 +707,9 @@ void CIKLimb::Blending(SCalculateData& cd) VERIFY(fsimilar(1.f, DET(diff), det_tolerance)); - Fmatrix blend = Fidentity; // cd.state.blend_to; + Fmatrix blend = Fidentity; // cd.state.blend_to; cd.state.blending = - !clamp_change(blend, diff, cd.l, cd.a, linear_tolerance, angualar_tolerance); // 0.01f //0.005f + !clamp_change(blend, diff, cd.l, cd.a, linear_tolerance, angualar_tolerance); // 0.01f //0.005f VERIFY(fsimilar(1.f, DET(blend), det_tolerance)); VERIFY(fsimilar(1.f, DET(cd.state.blend_to.get()), det_tolerance)); @@ -723,12 +723,12 @@ void CIKLimb::Blending(SCalculateData& cd) } else { - if (!ik_collide_blend) // cd.state.foot_step || + if (!ik_collide_blend) // cd.state.foot_step || { Fmatrix blend = cd.state.blend_to.get(); ik_goal_matrix m; cd.state.blending = !clamp_change( - blend, sv_state.goal(m).get(), cd.l, cd.a, linear_tolerance, angualar_tolerance); // 0.01f //0.005f + blend, sv_state.goal(m).get(), cd.l, cd.a, linear_tolerance, angualar_tolerance); // 0.01f //0.005f cd.state.goal.set(blend, cd.state.blend_to.collide_state()); } else @@ -760,7 +760,7 @@ void CIKLimb::SetNewStepGoal(const SIKCollideData& cld, SCalculateData& cd) } if (!sv_state.foot_step() || !anim_state.glue()) { ik_goal_matrix foot; - m_foot.GetFootStepMatrix(foot, cd /*cl*/, cld, false, true); // find where we can place the foot + m_foot.GetFootStepMatrix(foot, cd /*cl*/, cld, false, true); // find where we can place the foot new_foot_matrix(foot, cd); // reset_blend_speed( cd ); // cd.state.blending = true; ? @@ -1040,7 +1040,7 @@ u16 CIKLimb::foot_matrix_predict(Fmatrix& foot, Fmatrix& toe, float time, IKinem return ref_b; } void CIKLimb::step_predict(CGameObject* O, const CBlend* b, ik_limb_state_predict& state, - const extrapolation::points& object_pose_extrapolation) // const + const extrapolation::points& object_pose_extrapolation) // const { if (!b) return; state.time_to_footstep = get_time_to_step_begin(*b); @@ -1159,7 +1159,7 @@ void DBG_DrawRotationLimitsY(const Fmatrix& start, float ang, float l, float h) #ifdef DEBUG DBG_DrawRotationY(start, ang - EPS, ang + EPS, 0.15f, color_xrgb(0, 255, 0), false, 1); DBG_DrawRotationY(start, l, h, 0.15f, color_argb(50, 0, 250, 0), true); -#endif // DEBUG +#endif // DEBUG } void DBG_DrawRotationLimitsZ(const Fmatrix& start, float ang, float l, float h) @@ -1167,7 +1167,7 @@ void DBG_DrawRotationLimitsZ(const Fmatrix& start, float ang, float l, float h) #ifdef DEBUG DBG_DrawRotationZ(start, ang - EPS, ang + EPS, 0.15f, color_xrgb(0, 0, 255), false, 1); DBG_DrawRotationZ(start, l, h, 0.15f, color_argb(50, 0, 0, 250), true); -#endif // DEBUG +#endif // DEBUG } void DBG_DrawRotationLimitsX(const Fmatrix& start, float ang, float l, float h) @@ -1175,7 +1175,7 @@ void DBG_DrawRotationLimitsX(const Fmatrix& start, float ang, float l, float h) #ifdef DEBUG DBG_DrawRotationX(start, ang + EPS, ang - EPS, 0.15f, color_xrgb(255, 0, 0), false, 1); DBG_DrawRotationX(start, l, h, 0.15f, color_argb(50, 255, 0, 0), true); -#endif // DEBUG +#endif // DEBUG } void DBG_DrawRotation3(const Fmatrix& start, const float angs[7], const AngleInt limits[7], u16 y, u16 z, u16 x) diff --git a/src/xrGame/ik/IKLimb.h b/src/xrGame/ik/IKLimb.h index d23297eec30..3b5515925b0 100644 --- a/src/xrGame/ik/IKLimb.h +++ b/src/xrGame/ik/IKLimb.h @@ -50,7 +50,7 @@ class CIKLimb float time_to_footstep() const { return state_predict.time_to_footstep; } float footstep_shift() const { return state_predict.footstep_shift; } void step_predict(CGameObject* O, const CBlend* b, ik_limb_state_predict& state, - const extrapolation::points& object_pose_extrapolation); // const; + const extrapolation::points& object_pose_extrapolation); // const; bool foot_step() const { return sv_state.foot_step(); } u16 foot_matrix_predict(Fmatrix& foot, Fmatrix& toe, float time, IKinematicsAnimated* K) const; #ifdef DEBUG diff --git a/src/xrGame/ik/eulersolver.h b/src/xrGame/ik/eulersolver.h index 15f25949bfe..6358013e55e 100644 --- a/src/xrGame/ik/eulersolver.h +++ b/src/xrGame/ik/eulersolver.h @@ -50,10 +50,10 @@ enum { - ZXY = 0, // left shoulder, ankle, hip - YXZ = 1, // left wrist - Yxz = 2, // right wrist - zxY = 3 // right shoulder, ankle, hip + ZXY = 0, // left shoulder, ankle, hip + YXZ = 1, // left wrist + Yxz = 2, // right wrist + zxY = 3 // right shoulder, ankle, hip }; // Given a matrix find the corresponding euler angles @@ -65,8 +65,8 @@ void EulerEval(int euler_type, const float t[3], Matrix R); class EulerPsiSolver { private: - int euler_type; // ZXY, YXZ, etc - int jt_type; // simple jt is either sin(theta) or cos(theta) + int euler_type; // ZXY, YXZ, etc + int jt_type; // simple jt is either sin(theta) or cos(theta) // index[0] = index of simple jt, index[1],index[2] indices of complex joints short index[3]; diff --git a/src/xrGame/ik/jtlimits.h b/src/xrGame/ik/jtlimits.h index 4de15ad3a7b..005d7ae548f 100644 --- a/src/xrGame/ik/jtlimits.h +++ b/src/xrGame/ik/jtlimits.h @@ -143,8 +143,8 @@ class SimpleJtLimit AngleInt& Limit() { return limits; } // Given psi calcuate joint variable. Two solns - float theta1(float psi) const; // family 1 - float theta2(float psi) const; // family 2 + float theta1(float psi) const; // family 1 + float theta2(float psi) const; // family 2 float theta(int family, float psi) const; // Derivatives of theta @@ -208,11 +208,11 @@ class SimpleJtLimit class ComplexJtLimit { private: - PsiEquation cos_eq; // cos(theta) equation - PsiEquation sin_eq; // sin(theta) equation - PsiEquation eq; // gamma equation - int type; // Whether eq is a sin or cos of gamma - PsiEquation deriv; // Derivative of sin_eq/cos_eq without denom + PsiEquation cos_eq; // cos(theta) equation + PsiEquation sin_eq; // sin(theta) equation + PsiEquation eq; // gamma equation + int type; // Whether eq is a sin or cos of gamma + PsiEquation deriv; // Derivative of sin_eq/cos_eq without denom AngleInt limits; float tan_low, tan_high; @@ -255,8 +255,8 @@ class ComplexJtLimit // Given psi calcuate joint variable. Two solns - float theta1(float psi) const; // family 1 - float theta2(float psi) const; // family 2 + float theta1(float psi) const; // family 1 + float theta2(float psi) const; // family 2 float theta(int, float psi) const; // Derivatives of theta wrt to psi diff --git a/src/xrGame/ik/mathTrig.cpp b/src/xrGame/ik/mathTrig.cpp index 85e9f2ebe36..7009544e888 100644 --- a/src/xrGame/ik/mathTrig.cpp +++ b/src/xrGame/ik/mathTrig.cpp @@ -94,7 +94,7 @@ int solve_trig1(float a, float b, float c, float theta[2]) return 0; } - temp = (float)atan2((float)_sqrt(temp), (float)c); //.(float) c + temp = (float)atan2((float)_sqrt(temp), (float)c); //.(float) c int num = (!iszero(temp)) ? 2 : 1; // Calculate answer in radians diff --git a/src/xrGame/ik_foot_collider.cpp b/src/xrGame/ik_foot_collider.cpp index 21a26162d42..8489099b3f3 100644 --- a/src/xrGame/ik_foot_collider.cpp +++ b/src/xrGame/ik_foot_collider.cpp @@ -43,8 +43,8 @@ bool ignore_tri(CDB::TRI& tri) SGameMtl* material = GMLib.GetMaterialByIdx(tri.material); return (material->Flags.test(SGameMtl::flPassable) && !material->Flags.test(SGameMtl::flActorObstacle)) || - material->Flags.test(SGameMtl::flClimable); // || - // material->Flags.test( SGameMtl::flActorObstacle ); + material->Flags.test(SGameMtl::flClimable); // || + // material->Flags.test( SGameMtl::flActorObstacle ); } bool ignore_static_tri(int tri) @@ -112,7 +112,7 @@ IC bool get_plane_static(ik_pick_result& r, Fvector& next_pos, float& next_range #ifdef DEBUG float u, v, d; VERIFY(!(CDB::TestRayTri(next_pos, pick_v, r.triangle, u, v, d, true) && d > 0.f)); -#endif // DEBUG +#endif // DEBUG return false; } r.range = R.range; diff --git a/src/xrGame/ik_limb_state.h b/src/xrGame/ik_limb_state.h index eb74b7fd7d4..56b3cb44f13 100644 --- a/src/xrGame/ik_limb_state.h +++ b/src/xrGame/ik_limb_state.h @@ -51,7 +51,7 @@ class ik_limb_state s.calc_time = Device.dwTimeGlobal; s.blending = valide() && - (state.blending || state.foot_step != s.foot_step); // prev_state.state !=calculate_state::not_definite && + (state.blending || state.foot_step != s.foot_step); // prev_state.state !=calculate_state::not_definite && s.collide_pos = state.collide_pos; Fmatrix cl_pos = state.collide_pos.get(); diff --git a/src/xrGame/ik_object_shift.cpp b/src/xrGame/ik_object_shift.cpp index 0823efc170c..a2fbad5bdbb 100644 --- a/src/xrGame/ik_object_shift.cpp +++ b/src/xrGame/ik_object_shift.cpp @@ -68,7 +68,7 @@ float object_shift::delta_shift(float delta_time) const return speed * (delta_time) + accel * sq_time / 2.f + aaccel * sq_time * delta_time / 6.f; } -bool square_equation(float a, float b, float c, float& x0, float& x1) // returns true if has real roots +bool square_equation(float a, float b, float c, float& x0, float& x1) // returns true if has real roots { float d = b * b - 4.f * a * c; if (d < 0.f) return false; diff --git a/src/xrGame/imotion_position.cpp b/src/xrGame/imotion_position.cpp index 81a2729bc3e..2f31dd529a6 100644 --- a/src/xrGame/imotion_position.cpp +++ b/src/xrGame/imotion_position.cpp @@ -25,7 +25,7 @@ float dbg_imotion_draw_velocity_scale = 0.01; #endif -static const float max_collide_timedelta = 0.02f; // 0.005f; +static const float max_collide_timedelta = 0.02f; // 0.005f; static const float end_delta = 0.5f * max_collide_timedelta; static const float collide_adwance_delta = 2.f * max_collide_timedelta; static const float depth_resolve = 0.01f; @@ -96,7 +96,7 @@ static std::string collide_diag() void disable_bone_calculation(IKinematics& K, bool v) { u16 bn = K.LL_BoneCount(); - for (u16 i = 1; i < bn; ++i) // ommit real root + for (u16 i = 1; i < bn; ++i) // ommit real root { CBoneInstance& bi = K.LL_GetBoneInstance(i); if (bi.callback_param() != 0) continue; @@ -540,7 +540,7 @@ float imotion_position::motion_collide(float dt, IKinematicsAnimated& KA) #endif u32 sv_blends_num = blends_num(KA); buffer_vector saved_blends(_alloca(sv_blends_num * sizeof(sblend_save)), sv_blends_num); - save_blends(saved_blends, KA); // sv1 + save_blends(saved_blends, KA); // sv1 float depth0 = depth; advance_time += collide_animation(collide_adwance_delta, KA); @@ -577,7 +577,7 @@ float imotion_position::motion_collide(float dt, IKinematicsAnimated& KA) flags.set(fl_switch_dm_toragdoll, TRUE); } } - restore_blends(saved_blends); // rs1 + restore_blends(saved_blends); // rs1 // advance_time += advance_animation( dt-advance_time, KA ); time_to_end += (dt - advance_time); advance_time += (dt - advance_time); @@ -647,7 +647,7 @@ void imotion_position::set_root_callback() VERIFY(K); CBoneInstance& bi = K->LL_GetBoneInstance(0); VERIFY(!bi.callback()); - bi.set_callback(bctCustom, rootbone_callback, this, true); // root may be not "0" ! + bi.set_callback(bctCustom, rootbone_callback, this, true); // root may be not "0" ! } void imotion_position::remove_root_callback() diff --git a/src/xrGame/inventory_item.cpp b/src/xrGame/inventory_item.cpp index 63725747fa9..4c163287f6c 100644 --- a/src/xrGame/inventory_item.cpp +++ b/src/xrGame/inventory_item.cpp @@ -77,7 +77,7 @@ CInventoryItem::~CInventoryItem() Msg("! ERROR item_id[%d] H_Parent=[%s][%d] [%d]", object().ID(), p ? p->cName().c_str() : "none", p ? p->ID() : -1, Device.dwFrame); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } void CInventoryItem::Load(LPCSTR section) @@ -280,8 +280,8 @@ bool CInventoryItem::Detach(const char* item_section_name, bool b_spawn_item) if (GameID() == eGameIDSingle) { D->ID_Parent = u16(object().H_Parent()->ID()); } - else // i'm not sure this is right - { // but it is simpliest way to avoid exception in MP BuyWnd... [Satan] + else // i'm not sure this is right + { // but it is simpliest way to avoid exception in MP BuyWnd... [Satan] if (object().H_Parent()) D->ID_Parent = u16(object().H_Parent()->ID()); else @@ -385,7 +385,7 @@ void CInventoryItem::net_Import(NET_Packet& P) net_Import_PH_Params(P, N, num_items); //////////////////////////////////////////// - P.r_u8(); // active (not freezed ot not) + P.r_u8(); // active (not freezed ot not) if (this->cast_game_object()->Local()) { return; @@ -412,7 +412,7 @@ void CInventoryItem::net_Import(NET_Packet& P) if (!m_activated) { #ifdef DEBUG Msg("Activating object [%d] before interpolation starts", object().ID()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG object().processing_activate(); m_activated = true; } @@ -621,7 +621,7 @@ void CInventoryItem::net_Export(NET_Packet& P) if (!num_items.common) { #ifdef DEBUG Msg("--- Number of sync items of inv item object is 0"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return; } @@ -632,11 +632,11 @@ void CInventoryItem::net_Export(NET_Packet& P) net_Export_PH_Params(P, State, num_items); if (object().PPhysicsShell() && object().PPhysicsShell()->isEnabled()) { - P.w_u8(1); // not freezed + P.w_u8(1); // not freezed } else { - P.w_u8(0); // freezed + P.w_u8(0); // freezed } /*if (object().H_Parent() || IsGameTypeSingle()) @@ -776,7 +776,7 @@ void CInventoryItem::PH_B_CrPr(){ /////////////////////////////////////////////// }; -void CInventoryItem::PH_I_CrPr() // actions & operations between two phisic prediction steps +void CInventoryItem::PH_I_CrPr() // actions & operations between two phisic prediction steps { /*net_updateData* p = NetSync(); //store recalculated data, then we able to restore it after small future prediction @@ -1113,7 +1113,7 @@ void CInventoryItem::Interpolate() if (m_activated) { #ifdef DEBUG Msg("Deactivating object [%d] after interpolation finish", object().ID()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG object().processing_deactivate(); m_activated = false; } @@ -1447,7 +1447,7 @@ void CInventoryItem::SetDropManual(BOOL val) Msg("! WARNING: trying to set drop manual flag to item [%d][%s] to %d", object_id(), m_name.c_str(), val); } } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (!IsGameTypeSingle()) { if (val == TRUE) DenyTrade(); diff --git a/src/xrGame/inventory_item.h b/src/xrGame/inventory_item.h index 5cbbec00c89..c3a5ee708bd 100644 --- a/src/xrGame/inventory_item.h +++ b/src/xrGame/inventory_item.h @@ -92,7 +92,7 @@ class CInventoryItem : public CAttachableItem, public: virtual void Load(LPCSTR section); - LPCSTR NameItem(); // remove by sea + LPCSTR NameItem(); // remove by sea LPCSTR NameShort(); shared_str ItemDescription() { return m_Description; } virtual bool GetBriefInfo(II_BriefInfo& info) @@ -103,7 +103,7 @@ class CInventoryItem : public CAttachableItem, virtual void OnEvent(NET_Packet& P, u16 type); - virtual bool Useful() const; // !!! Переопределить. (см. в Inventory.cpp) + virtual bool Useful() const; // !!! Переопределить. (см. в Inventory.cpp) virtual bool Attach(PIItem pIItem, bool b_send_event) { return false; } virtual bool Detach(PIItem pIItem) { return false; } //при детаче спаунится новая вещь при заданно названии секции @@ -112,9 +112,9 @@ class CInventoryItem : public CAttachableItem, virtual bool CanDetach(LPCSTR item_section_name) { return false; } virtual EHandDependence HandDependence() const { return hd1Hand; }; virtual bool IsSingleHanded() const { return true; }; - virtual bool ActivateItem(); // !!! Переопределить. (см. в Inventory.cpp) - virtual void DeactivateItem(); // !!! Переопределить. (см. в Inventory.cpp) - virtual bool Action(u16 cmd, u32 flags) { return false; } // true если известная команда, иначе false + virtual bool ActivateItem(); // !!! Переопределить. (см. в Inventory.cpp) + virtual void DeactivateItem(); // !!! Переопределить. (см. в Inventory.cpp) + virtual bool Action(u16 cmd, u32 flags) { return false; } // true если известная команда, иначе false virtual void DiscardState(){}; virtual void OnH_B_Chield(); @@ -125,8 +125,8 @@ class CInventoryItem : public CAttachableItem, virtual void save(NET_Packet& output_packet); virtual void load(IReader& input_packet); virtual BOOL net_SaveRelevant() { return TRUE; } - virtual void render_item_ui(){}; // when in slot & query return TRUE - virtual bool render_item_ui_query() { return false; }; // when in slot + virtual void render_item_ui(){}; // when in slot & query return TRUE + virtual bool render_item_ui_query() { return false; }; // when in slot virtual void UpdateCL(); virtual void Hit(SHit* pHDS); @@ -191,15 +191,15 @@ class CInventoryItem : public CAttachableItem, public: virtual void make_Interpolation(){}; - virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps + virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps #ifdef DEBUG - virtual void PH_Ch_CrPr(); // + virtual void PH_Ch_CrPr(); // #endif - virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps + virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps - virtual void net_Import(NET_Packet& P); // import from server - virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Export(NET_Packet& P); // export to server public: virtual void activate_physic_shell(); @@ -288,7 +288,7 @@ class CInventoryItem : public CAttachableItem, #ifdef DEBUG void log_upgrades(); -#endif // DEBUG +#endif // DEBUG IC Upgrades_type const& upgardes() const; virtual void Interpolate(); @@ -315,6 +315,6 @@ class CInventoryItem : public CAttachableItem, public: IC bool is_helper_item() { return !!m_flags.test(FIsHelperItem); } IC void set_is_helper(bool is_helper) { m_flags.set(FIsHelperItem, is_helper); } -}; // class CInventoryItem +}; // class CInventoryItem #include "inventory_item_inline.h" diff --git a/src/xrGame/inventory_item_inline.h b/src/xrGame/inventory_item_inline.h index 741b56d4636..302062ad062 100644 --- a/src/xrGame/inventory_item_inline.h +++ b/src/xrGame/inventory_item_inline.h @@ -31,7 +31,7 @@ IC bool CInventoryItem::process_if_exists( } if (!test) { - value = value + (pSettings->*method)(section, name); // add + value = value + (pSettings->*method)(section, name); // add } return true; } @@ -49,7 +49,7 @@ IC bool CInventoryItem::process_if_exists_set( } if (!test) { - value = (pSettings->*method)(section, name); // set + value = (pSettings->*method)(section, name); // set } return true; } diff --git a/src/xrGame/inventory_item_object.h b/src/xrGame/inventory_item_object.h index aa13a686f06..274c2c5212b 100644 --- a/src/xrGame/inventory_item_object.h +++ b/src/xrGame/inventory_item_object.h @@ -42,8 +42,8 @@ class CInventoryItemObject : public CInventoryItem, public CPhysicItem virtual void OnEvent(NET_Packet& P, u16 type); virtual BOOL net_Spawn(CSE_Abstract* DC); virtual void net_Destroy(); - virtual void net_Import(NET_Packet& P); // import from server - virtual void net_Export(NET_Packet& P); // export to server + virtual void net_Import(NET_Packet& P); // import from server + virtual void net_Export(NET_Packet& P); // export to server virtual void save(NET_Packet& output_packet); virtual void load(IReader& input_packet); virtual BOOL net_SaveRelevant() { return TRUE; } @@ -57,12 +57,12 @@ class CInventoryItemObject : public CInventoryItem, public CPhysicItem public: ////////// network ////////////////////////////////////////////////// virtual void make_Interpolation(); - virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps - virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps + virtual void PH_B_CrPr(); // actions & operations before physic correction-prediction steps + virtual void PH_I_CrPr(); // actions & operations after correction before prediction steps #ifdef DEBUG - virtual void PH_Ch_CrPr(); // + virtual void PH_Ch_CrPr(); // #endif - virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps + virtual void PH_A_CrPr(); // actions & operations after phisic correction-prediction steps virtual bool NeedToDestroyObject() const; protected: diff --git a/src/xrGame/inventory_item_upgrade.cpp b/src/xrGame/inventory_item_upgrade.cpp index e282f750bb0..2f85a16f024 100644 --- a/src/xrGame/inventory_item_upgrade.cpp +++ b/src/xrGame/inventory_item_upgrade.cpp @@ -100,7 +100,7 @@ bool CInventoryItem::equal_upgrades(Upgrades_type const& other_upgrades) const { if (name1.equal((*ib2))) { upg_equal = true; - break; // from for2, in for1 + break; // from for2, in for1 } } if (!upg_equal) { @@ -122,9 +122,9 @@ void CInventoryItem::log_upgrades() } Msg("* finish - upgrades of item = %s", m_section_id.c_str()); } -#endif // DEBUG +#endif // DEBUG -void CInventoryItem::net_Spawn_install_upgrades(Upgrades_type saved_upgrades) // net_Spawn +void CInventoryItem::net_Spawn_install_upgrades(Upgrades_type saved_upgrades) // net_Spawn { m_upgrades.clear_not_free(); @@ -132,7 +132,7 @@ void CInventoryItem::net_Spawn_install_upgrades(Upgrades_type saved_upgrades) / return; } - ai().alife().inventory_upgrade_manager().init_install(*this); // from pSettings + ai().alife().inventory_upgrade_manager().init_install(*this); // from pSettings Upgrades_type::iterator ib = saved_upgrades.begin(); Upgrades_type::iterator ie = saved_upgrades.end(); @@ -198,7 +198,7 @@ void CInventoryItem::pre_install_upgrade() if (wg->IsGrenadeLauncherAttached()) { wg->PerformSwitchGL(); wg->UnloadMagazine(); - wg->PerformSwitchGL(); // restore state + wg->PerformSwitchGL(); // restore state } } } diff --git a/src/xrGame/inventory_owner_info.cpp b/src/xrGame/inventory_owner_info.cpp index 84207b18cf3..4396614d4ff 100644 --- a/src/xrGame/inventory_owner_info.cpp +++ b/src/xrGame/inventory_owner_info.cpp @@ -28,9 +28,9 @@ void CInventoryOwner::OnEvent(NET_Packet& P, u16 type) shared_str info_id; u8 add_info; - P.r_u16(id); //отправитель - P.r_stringZ(info_id); //номер полученной информации - P.r_u8(add_info); //добавление или убирание информации + P.r_u16(id); //отправитель + P.r_stringZ(info_id); //номер полученной информации + P.r_u8(add_info); //добавление или убирание информации if (add_info) OnReceiveInfo(info_id); @@ -99,9 +99,9 @@ void CInventoryOwner::TransferInfo(shared_str info_id, bool add_info) const //отправляем от нашему PDA пакет информации с номером NET_Packet P; CGameObject::u_EventGen(P, GE_INFO_TRANSFER, pThisObject->ID()); - P.w_u16(pThisObject->ID()); //отправитель - P.w_stringZ(info_id); //сообщение - P.w_u8(add_info ? 1 : 0); //добавить/удалить информацию + P.w_u16(pThisObject->ID()); //отправитель + P.w_stringZ(info_id); //сообщение + P.w_u8(add_info ? 1 : 0); //добавить/удалить информацию CGameObject::u_EventSend(P); CInfoPortion info_portion; diff --git a/src/xrGame/inventory_quickswitch.cpp b/src/xrGame/inventory_quickswitch.cpp index c92c77317c1..ddb2e694989 100644 --- a/src/xrGame/inventory_quickswitch.cpp +++ b/src/xrGame/inventory_quickswitch.cpp @@ -65,9 +65,9 @@ class next_weapon_searcher u32 m_best_fit_cost; u32 m_best_fit_ammo_elapsed; bool m_ignore_ammo; -}; // class next_weapon_searcher +}; // class next_weapon_searcher -static u32 const exception_items_clear_time = 2000; // 2 seconds +static u32 const exception_items_clear_time = 2000; // 2 seconds PIItem CInventory::GetNextItemInActiveSlot(u8 const priority_value, bool ignore_ammo) { if (m_next_item_iteration_time + exception_items_clear_time <= Device.dwTimeGlobal) { @@ -111,7 +111,7 @@ bool CInventory::ActivateNextItemInActiveSlot() PIItem new_item = GetNextItemInActiveSlot(0, false); if (new_item == NULL) { - return false; // only 1 item for this slot + return false; // only 1 item for this slot } m_activ_last_items.push_back(new_item); @@ -177,7 +177,7 @@ u32 g_slot2_assault_switch_priority = 2; u32 g_slot2_sniper_switch_priority = 4; u32 g_slot2_heavy_switch_priority = 3; -u32 g_slot3_pistol_switch_priority = 4; // not switch +u32 g_slot3_pistol_switch_priority = 4; // not switch u32 g_slot3_shotgun_switch_priority = 2; u32 g_slot3_assault_switch_priority = 0; u32 g_slot3_sniper_switch_priority = 1; @@ -199,7 +199,7 @@ void CInventory::InitPriorityGroupsForQSwitch() m_slot2_priorities[g_slot2_sniper_switch_priority] = &m_groups[epg_sniper_rifels]; m_slot2_priorities[g_slot2_heavy_switch_priority] = &m_groups[epg_heavy_weapons]; - m_slot3_priorities[g_slot3_pistol_switch_priority] = &m_groups[epg_assault]; //&m_groups[epg_pistols]; + m_slot3_priorities[g_slot3_pistol_switch_priority] = &m_groups[epg_assault]; //&m_groups[epg_pistols]; m_slot3_priorities[g_slot3_shotgun_switch_priority] = &m_groups[epg_shotgun]; m_slot3_priorities[g_slot3_assault_switch_priority] = &m_groups[epg_assault]; m_slot3_priorities[g_slot3_sniper_switch_priority] = &m_groups[epg_sniper_rifels]; diff --git a/src/xrGame/inventory_upgrade.cpp b/src/xrGame/inventory_upgrade.cpp index 3908eb1cd49..8366a9c91a0 100644 --- a/src/xrGame/inventory_upgrade.cpp +++ b/src/xrGame/inventory_upgrade.cpp @@ -67,9 +67,9 @@ void Upgrade::construct(const shared_str& upgrade_id, Group& parental_group, Man m_effects(); // prereq_functor (1,2) : m_prerequisites, m_tooltip - LPCSTR prereq_functor_str = pSettings->r_string(id(), "prereq_functor"); // prerequisites_functor + LPCSTR prereq_functor_str = pSettings->r_string(id(), "prereq_functor"); // prerequisites_functor // LPCSTR tooltip_functor_str = pSettings->r_string( id(), "prereq_tooltip_functor" ); - m_prerequisites.parameter = pSettings->r_string(id(), "prereq_params"); // prerequisites_params + m_prerequisites.parameter = pSettings->r_string(id(), "prereq_params"); // prerequisites_params m_prerequisites.parameter2 = m_section.c_str(); // m_tooltip.parameter = pSettings->r_string( id(), "prereq_params" ); R_ASSERT2(ai().script_engine().functor(prereq_functor_str, m_prerequisites.functr), @@ -111,7 +111,7 @@ void Upgrade::construct(const shared_str& upgrade_id, Group& parental_group, Man m_scheme_index = pSettings->r_ivector2(id(), "scheme_index"); m_highlight = false; -} // Upgrade() +} // Upgrade() #ifdef DEBUG @@ -126,7 +126,7 @@ void Upgrade::log_hierarchy(LPCSTR nest) inherited::log_hierarchy(nest2); } -#endif // DEBUG +#endif // DEBUG void Upgrade::fill_root_container(Root* root) { @@ -148,7 +148,7 @@ UpgradeStateResult Upgrade::can_install(CInventoryItem& item, bool loading) } if (loading) { - return result_ok; // later script check + return result_ok; // later script check } int res_prec = m_preconditions(); @@ -223,5 +223,5 @@ void Upgrade::highlight_down() m_parent_group->highlight_down(); } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory diff --git a/src/xrGame/inventory_upgrade.h b/src/xrGame/inventory_upgrade.h index 7ac9d66f840..b7d6a5990ec 100644 --- a/src/xrGame/inventory_upgrade.h +++ b/src/xrGame/inventory_upgrade.h @@ -70,7 +70,7 @@ struct functor3 : public functor2 IC void operator()() const { functr(parameter, parameter2, parameter3); } }; -} // namespace detail +} // namespace detail enum EMaxProps { @@ -102,7 +102,7 @@ class Upgrade : public UpgradeBase #ifdef DEBUG virtual void log_hierarchy(LPCSTR nest); -#endif // DEBUG +#endif // DEBUG virtual void fill_root_container(Root* root); @@ -143,9 +143,9 @@ class Upgrade : public UpgradeBase bool m_highlight; }; -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory #include "inventory_upgrade_inline.h" -#endif // INVENTORY_UPGRADE_H_INCLUDED +#endif // INVENTORY_UPGRADE_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_base.cpp b/src/xrGame/inventory_upgrade_base.cpp index 7485da6a14a..5adc761218e 100644 --- a/src/xrGame/inventory_upgrade_base.cpp +++ b/src/xrGame/inventory_upgrade_base.cpp @@ -72,7 +72,7 @@ void UpgradeBase::test_all_upgrades( CInventoryItem& item ) } } */ -#endif // DEBUG +#endif // DEBUG bool UpgradeBase::is_root() { @@ -93,7 +93,7 @@ bool UpgradeBase::contain_upgrade(const shared_str& upgrade_id) void UpgradeBase::fill_root_container(Root* root) { //!=R_ASSERT2( 0, make_string( "! Can`t fill <%s> in for root = %s", id_str(), - //!root->id_str() ) ); + //! root->id_str() ) ); Groups_type::iterator ib = m_depended_groups.begin(); Groups_type::iterator ie = m_depended_groups.end(); for (; ib != ie; ++ib) @@ -120,10 +120,10 @@ UpgradeStateResult UpgradeBase::can_install(CInventoryItem& item, bool loading) FATAL( make_string( "Loading item: Upgrade <%s> (id = %d) is installed already.", id_str(), item.object_id() ).c_str() ); }*/ - return result_e_installed; // true + return result_e_installed; // true } return result_ok; } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory diff --git a/src/xrGame/inventory_upgrade_base.h b/src/xrGame/inventory_upgrade_base.h index 74fb0aa73b9..d6e53b1bd9e 100644 --- a/src/xrGame/inventory_upgrade_base.h +++ b/src/xrGame/inventory_upgrade_base.h @@ -52,7 +52,7 @@ class UpgradeBase : private Noncopyable #ifdef DEBUG virtual void log_hierarchy(LPCSTR nest); // virtual void test_all_upgrades( CInventoryItem& item ); -#endif // DEBUG +#endif // DEBUG virtual bool is_root(); bool make_known(); @@ -77,11 +77,11 @@ class UpgradeBase : private Noncopyable protected: void add_dependent_groups(LPCSTR groups_str, Manager& manager_r); -}; // class UpgradeBase +}; // class UpgradeBase -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory #include "inventory_upgrade_base_inline.h" -#endif // INVENTORY_UPGRADE_BASE_H_INCLUDED \ No newline at end of file +#endif // INVENTORY_UPGRADE_BASE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/inventory_upgrade_base_inline.h b/src/xrGame/inventory_upgrade_base_inline.h index d18c078d292..e035447a6bb 100644 --- a/src/xrGame/inventory_upgrade_base_inline.h +++ b/src/xrGame/inventory_upgrade_base_inline.h @@ -28,7 +28,7 @@ IC bool UpgradeBase::is_known() const return (m_known); } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory -#endif // INVENTORY_UPGRADE_BASE_INLINE_H_INCLUDED \ No newline at end of file +#endif // INVENTORY_UPGRADE_BASE_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/inventory_upgrade_group.cpp b/src/xrGame/inventory_upgrade_group.cpp index 4626846a849..08e3da96c5a 100644 --- a/src/xrGame/inventory_upgrade_group.cpp +++ b/src/xrGame/inventory_upgrade_group.cpp @@ -68,7 +68,7 @@ void Group::log_hierarchy(LPCSTR nest) } } -#endif // DEBUG +#endif // DEBUG void Group::fill_root(Root* root) { @@ -143,5 +143,5 @@ void Group::highlight_down() } } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory diff --git a/src/xrGame/inventory_upgrade_group.h b/src/xrGame/inventory_upgrade_group.h index ddacc6326ec..8d07844c75f 100644 --- a/src/xrGame/inventory_upgrade_group.h +++ b/src/xrGame/inventory_upgrade_group.h @@ -28,7 +28,7 @@ class Group : private Noncopyable #ifdef DEBUG void log_hierarchy(LPCSTR nesting); -#endif // DEBUG +#endif // DEBUG void fill_root(Root* root); @@ -46,11 +46,11 @@ class Group : private Noncopyable Upgrades_type m_parent_upgrades; Upgrades_type m_included_upgrades; -}; // class group +}; // class group -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory #include "inventory_upgrade_group_inline.h" -#endif // INVENTORY_UPGRADE_GROUP_H_INCLUDED +#endif // INVENTORY_UPGRADE_GROUP_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_group_inline.h b/src/xrGame/inventory_upgrade_group_inline.h index 421f0a2bf2a..0caa086de71 100644 --- a/src/xrGame/inventory_upgrade_group_inline.h +++ b/src/xrGame/inventory_upgrade_group_inline.h @@ -23,7 +23,7 @@ IC LPCSTR Group::id_str() const return (m_id.c_str()); } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory -#endif // INVENTORY_UPGRADE_GROUP_INLINE_H_INCLUDED \ No newline at end of file +#endif // INVENTORY_UPGRADE_GROUP_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/inventory_upgrade_inline.h b/src/xrGame/inventory_upgrade_inline.h index b36fcdbed5a..c925360c441 100644 --- a/src/xrGame/inventory_upgrade_inline.h +++ b/src/xrGame/inventory_upgrade_inline.h @@ -61,7 +61,7 @@ IC Ivector2 const& Upgrade::get_scheme_index() const return m_scheme_index; } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory -#endif // INVENTORY_UPGRADE_INLINE_H_INCLUDED +#endif // INVENTORY_UPGRADE_INLINE_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_manager.cpp b/src/xrGame/inventory_upgrade_manager.cpp index 3dcea2f2dfc..2ac4bd3fdb7 100644 --- a/src/xrGame/inventory_upgrade_manager.cpp +++ b/src/xrGame/inventory_upgrade_manager.cpp @@ -28,7 +28,7 @@ namespace upgrade Manager::Manager() { - load_all_properties(); // first + load_all_properties(); // first load_all_inventory(); } @@ -38,7 +38,7 @@ Manager::~Manager() delete_data(m_groups); delete_data(m_upgrades); delete_data(m_properties); - m_roots.clear(); // !!!!!!!!!!!! + m_roots.clear(); // !!!!!!!!!!!! m_groups.clear(); m_upgrades.clear(); m_properties.clear(); @@ -207,7 +207,7 @@ void Manager::load_all_properties() void Manager::log_hierarchy() { - { // roots + { // roots Msg("# inventory upgrades roots: [%d] ", m_roots.size()); Roots_type::iterator ib = m_roots.begin(); Roots_type::iterator ie = m_roots.end(); @@ -217,7 +217,7 @@ void Manager::log_hierarchy() } } - { // groups + { // groups Msg("# inventory upgrades groups: [%d] ", m_groups.size()); Groups_type::iterator ib = m_groups.begin(); Groups_type::iterator ie = m_groups.end(); @@ -227,7 +227,7 @@ void Manager::log_hierarchy() } } - { // upgrades + { // upgrades Msg("# inventory upgrades: [%d] ", m_upgrades.size()); Upgrades_type::iterator ib = m_upgrades.begin(); Upgrades_type::iterator ie = m_upgrades.end(); @@ -237,7 +237,7 @@ void Manager::log_hierarchy() } } - { // properties + { // properties Msg("# inventory upgrade properties: [%d] ", m_properties.size()); Properties_type::iterator ib = m_properties.begin(); Properties_type::iterator ie = m_properties.end(); @@ -271,7 +271,7 @@ void Manager::test_all_upgrades(CInventoryItem& item) } } -#endif // DEBUG +#endif // DEBUG Upgrade* Manager::upgrade_verify(shared_str const& item_section, shared_str const& upgrade_id) { @@ -361,7 +361,7 @@ void Manager::init_install(CInventoryItem& item) #ifdef DEBUG test_all_upgrades(item); -#endif // DEBUG +#endif // DEBUG if (pSettings->line_exist(item.m_section_id, "installed_upgrades")) { // installed_upgrades by default @@ -375,7 +375,7 @@ void Manager::init_install(CInventoryItem& item) upgrade_install(item, _GetItem(installed_upgrades_str, i, temp, buffer_size), true); } } - } // if exist + } // if exist } LPCSTR Manager::get_item_scheme(CInventoryItem& item) @@ -460,5 +460,5 @@ void Manager::reset_highlight(CInventoryItem& item) } } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory diff --git a/src/xrGame/inventory_upgrade_manager.h b/src/xrGame/inventory_upgrade_manager.h index 3477c753da8..900a33a0fa5 100644 --- a/src/xrGame/inventory_upgrade_manager.h +++ b/src/xrGame/inventory_upgrade_manager.h @@ -41,7 +41,7 @@ class Manager : private Noncopyable public: Manager(); - virtual ~Manager(); // change this to debug_make_final(); + virtual ~Manager(); // change this to debug_make_final(); public: Root* get_root(shared_str const& root_id); @@ -70,7 +70,7 @@ class Manager : private Noncopyable #ifdef DEBUG void log_hierarchy(); void test_all_upgrades(CInventoryItem& item); -#endif // DEBUG +#endif // DEBUG void highlight_hierarchy(CInventoryItem& item, shared_str const& upgrade_id); void reset_highlight(CInventoryItem& item); @@ -92,11 +92,11 @@ class Manager : private Noncopyable public: Properties_type m_properties; -}; // class Manager +}; // class Manager -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory #include "inventory_upgrade_manager_inline.h" -#endif // INVENTORY_UPGRADE_MANAGER_H_INCLUDED +#endif // INVENTORY_UPGRADE_MANAGER_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_manager_inline.h b/src/xrGame/inventory_upgrade_manager_inline.h index 35ca3fac7df..3e385ec2a2b 100644 --- a/src/xrGame/inventory_upgrade_manager_inline.h +++ b/src/xrGame/inventory_upgrade_manager_inline.h @@ -13,7 +13,7 @@ namespace inventory { namespace upgrade { -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory -#endif // INVENTORY_UPGRADE_MANAGER_INLINE_H_INCLUDED +#endif // INVENTORY_UPGRADE_MANAGER_INLINE_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_property.cpp b/src/xrGame/inventory_upgrade_property.cpp index 8a667b56ef9..6c8165d277f 100644 --- a/src/xrGame/inventory_upgrade_property.cpp +++ b/src/xrGame/inventory_upgrade_property.cpp @@ -41,7 +41,7 @@ void Property::construct(shared_str const& property_id, Manager& manager_r) m_desc.parameter2 = id_str(); R_ASSERT2(ai().script_engine().functor(functor_str, m_desc.functr), make_string("Failed to get upgrade property functor in section[%s], functor[%s]", id_str(), functor_str)); - m_desc(); // test + m_desc(); // test LPCSTR funct_params_str = pSettings->r_string(id(), "params"); u32 const buffer_size = (xr_strlen(funct_params_str) + 1) * sizeof(char); @@ -58,7 +58,7 @@ bool Property::run_functor(LPCSTR parameter, string256& result) result[0] = 0; m_desc.parameter = parameter; - LPCSTR functor_res = m_desc(); // execute !!! + LPCSTR functor_res = m_desc(); // execute !!! if (!functor_res || !xr_strcmp(functor_res, "")) { return false; } @@ -66,5 +66,5 @@ bool Property::run_functor(LPCSTR parameter, string256& result) return true; } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory diff --git a/src/xrGame/inventory_upgrade_property.h b/src/xrGame/inventory_upgrade_property.h index 65d29d11531..1def305413a 100644 --- a/src/xrGame/inventory_upgrade_property.h +++ b/src/xrGame/inventory_upgrade_property.h @@ -47,11 +47,11 @@ class Property : private Noncopyable StrFunctor m_desc; FunctorParams_type m_functor_params; -}; // class Property +}; // class Property -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory #include "inventory_upgrade_property_inline.h" -#endif // INVENTORY_UPGRADE_PROPERTY_H_INCLUDED +#endif // INVENTORY_UPGRADE_PROPERTY_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_property_inline.h b/src/xrGame/inventory_upgrade_property_inline.h index c238769a9e6..0342b04bec3 100644 --- a/src/xrGame/inventory_upgrade_property_inline.h +++ b/src/xrGame/inventory_upgrade_property_inline.h @@ -38,7 +38,7 @@ IC Property::FunctorParams_type const& Property::functor_params() const return m_functor_params; } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory -#endif // INVENTORY_UPGRADE_PROPERTY_INLINE_H_INCLUDED +#endif // INVENTORY_UPGRADE_PROPERTY_INLINE_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_root.cpp b/src/xrGame/inventory_upgrade_root.cpp index 1120e02e936..67b255b9375 100644 --- a/src/xrGame/inventory_upgrade_root.cpp +++ b/src/xrGame/inventory_upgrade_root.cpp @@ -96,7 +96,7 @@ void Root::test_all_upgrades(CInventoryItem& item) } } -#endif // DEBUG +#endif // DEBUG bool Root::contain_upgrade(const shared_str& upgrade_id) { @@ -165,5 +165,5 @@ void Root::reset_highlight() } } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory diff --git a/src/xrGame/inventory_upgrade_root.h b/src/xrGame/inventory_upgrade_root.h index 7ec6f7c2388..d3b7b4511e1 100644 --- a/src/xrGame/inventory_upgrade_root.h +++ b/src/xrGame/inventory_upgrade_root.h @@ -33,7 +33,7 @@ class Root : public UpgradeBase #ifdef DEBUG virtual void log_hierarchy(LPCSTR nest); void test_all_upgrades(CInventoryItem& item); -#endif // DEBUG +#endif // DEBUG virtual bool contain_upgrade(const shared_str& upgrade_id); bool verify_scheme_index(const Ivector2& scheme_index); @@ -46,11 +46,11 @@ class Root : public UpgradeBase shared_str m_upgrade_scheme; Upgrades_vec m_contained_upgrades; -}; // class Root +}; // class Root -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory #include "inventory_upgrade_root_inline.h" -#endif // INVENTORY_UPGRADE_ROOT_H_INCLUDED +#endif // INVENTORY_UPGRADE_ROOT_H_INCLUDED diff --git a/src/xrGame/inventory_upgrade_root_inline.h b/src/xrGame/inventory_upgrade_root_inline.h index 7e2007db2cf..726ac42705b 100644 --- a/src/xrGame/inventory_upgrade_root_inline.h +++ b/src/xrGame/inventory_upgrade_root_inline.h @@ -18,7 +18,7 @@ IC LPCSTR Root::scheme() const return m_upgrade_scheme.c_str(); } -} // namespace upgrade -} // namespace inventory +} // namespace upgrade +} // namespace inventory -#endif // INVENTORY_UPGRADE_ROOT_INLINE_H_INCLUDED +#endif // INVENTORY_UPGRADE_ROOT_INLINE_H_INCLUDED diff --git a/src/xrGame/invincible_fury.cpp b/src/xrGame/invincible_fury.cpp index f50cce87b9f..2ee6064107a 100644 --- a/src/xrGame/invincible_fury.cpp +++ b/src/xrGame/invincible_fury.cpp @@ -39,7 +39,7 @@ struct fury_killer } shared_str m_killer_name; u32 m_after_time; -}; // struct fury_killer +}; // struct fury_killer void player_state_invincible_fury::OnPlayerKilled( u16 killer_id, u16 target_id, u16 weapon_id, std::pair kill_type) @@ -69,4 +69,4 @@ void player_state_invincible_fury::OnPlayerKilled( } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/invincible_fury.h b/src/xrGame/invincible_fury.h index fd45dd01d91..b1fc77e7539 100644 --- a/src/xrGame/invincible_fury.h +++ b/src/xrGame/invincible_fury.h @@ -26,12 +26,12 @@ class player_state_invincible_fury : public player_state_param private: static u32 const max_fury_time = 6000; u32 m_last_kills; -}; // class player_state_invincible_fury +}; // class player_state_invincible_fury ADD_ACCUMULATIVE_STATE(acpv_invincible_fury, player_state_invincible_fury); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_invincible_fury, player_state_invincible_fury) -} // namespace award_system +} // namespace award_system -#endif //#ifndef INVINCIBLE_FURY_INCLUDED +#endif //#ifndef INVINCIBLE_FURY_INCLUDED diff --git a/src/xrGame/item_manager.cpp b/src/xrGame/item_manager.cpp index 629b9afd7c4..5098dc9c1a0 100644 --- a/src/xrGame/item_manager.cpp +++ b/src/xrGame/item_manager.cpp @@ -90,7 +90,7 @@ void CItemManager::update() for (; I != E; ++I) VERIFY3(m_object->movement().restrictions().accessible((*I)->ai_location().level_vertex_id()), *m_object->cName(), *(*I)->cName()); -#endif // DEBUG +#endif // DEBUG inherited::update(); diff --git a/src/xrGame/killer_victim_velocity_angle.cpp b/src/xrGame/killer_victim_velocity_angle.cpp index dc2d3b538f6..7c42de0c57e 100644 --- a/src/xrGame/killer_victim_velocity_angle.cpp +++ b/src/xrGame/killer_victim_velocity_angle.cpp @@ -62,4 +62,4 @@ void killer_victim_angle::OnPlayerKilled( // Msg("* Killer victim angle: %d", get_u32_param()); } -} // namespace award_system +} // namespace award_system diff --git a/src/xrGame/killer_victim_velocity_angle.h b/src/xrGame/killer_victim_velocity_angle.h index 7411d543c5d..62b9f0a7bd0 100644 --- a/src/xrGame/killer_victim_velocity_angle.h +++ b/src/xrGame/killer_victim_velocity_angle.h @@ -23,12 +23,12 @@ class killer_victim_angle : public player_state_param protected: float m_killer_victim_angle_cos; -}; // class killer_victim_angle +}; // class killer_victim_angle ADD_ACCUMULATIVE_STATE(acpv_killer_victim_angle, killer_victim_angle); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_killer_victim_angle, killer_victim_angle) -} // namespace award_system +} // namespace award_system -#endif //#ifndef KILLER_VICTIM_VELOCITY_ANGLE_INCLUDED \ No newline at end of file +#endif //#ifndef KILLER_VICTIM_VELOCITY_ANGLE_INCLUDED \ No newline at end of file diff --git a/src/xrGame/kills_store.cpp b/src/xrGame/kills_store.cpp index d347267afe5..dfbc8c9c2f8 100644 --- a/src/xrGame/kills_store.cpp +++ b/src/xrGame/kills_store.cpp @@ -36,4 +36,4 @@ void kills_store::add_kill(shared_str const& killer, shared_str const& victim, u tmp_iter->second->push_obsolete(new_kill); } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/kills_store.h b/src/xrGame/kills_store.h index 70eebf63f49..c13fe23b062 100644 --- a/src/xrGame/kills_store.h +++ b/src/xrGame/kills_store.h @@ -21,7 +21,7 @@ class kills_store u16 m_weapon_id; KILL_TYPE m_kill_type; SPECIAL_KILL_TYPE m_spec_kill_type; - }; // struct kill + }; // struct kill static unsigned int const max_kills_count = 10; typedef obsolete_queue, max_kills_count> kills_t; @@ -36,10 +36,10 @@ class kills_store private: kills_map_t m_kills; -}; // class kills_store +}; // class kills_store -} // namespace award_system +} // namespace award_system #include "kills_store_inline.h" -#endif //#ifndef KILLS_STORE_INCLUDED \ No newline at end of file +#endif //#ifndef KILLS_STORE_INCLUDED \ No newline at end of file diff --git a/src/xrGame/kills_store_inline.h b/src/xrGame/kills_store_inline.h index 27fae127446..7692b0b9c10 100644 --- a/src/xrGame/kills_store_inline.h +++ b/src/xrGame/kills_store_inline.h @@ -19,4 +19,4 @@ u32 const kills_store::fetch_kills(Predicate& predicate, buffer_vector& de return ret_count; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/level_debug.cpp b/src/xrGame/level_debug.cpp index 8dfda763517..d6142745b4e 100644 --- a/src/xrGame/level_debug.cpp +++ b/src/xrGame/level_debug.cpp @@ -6,8 +6,8 @@ #ifdef DEBUG #include "debug_renderer.h" // Lain: added -#include "debug_text_tree.h" #include "ai/monsters/basemonster/base_monster.h" +#include "debug_text_tree.h" #include "ui_base.h" #endif diff --git a/src/xrGame/level_script.cpp b/src/xrGame/level_script.cpp index 9c721e2f0fa..061c56c79ed 100644 --- a/src/xrGame/level_script.cpp +++ b/src/xrGame/level_script.cpp @@ -112,7 +112,7 @@ void set_weather(LPCSTR weather_name, bool forced) { #ifdef INGAME_EDITOR if (!Device.editor()) -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR g_pGamePersistent->Environment().SetWeather(weather_name, forced); } @@ -120,24 +120,24 @@ bool set_weather_fx(LPCSTR weather_name) { #ifdef INGAME_EDITOR if (!Device.editor()) -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR return (g_pGamePersistent->Environment().SetWeatherFX(weather_name)); #ifdef INGAME_EDITOR return (false); -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR } bool start_weather_fx_from_time(LPCSTR weather_name, float time) { #ifdef INGAME_EDITOR if (!Device.editor()) -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR return (g_pGamePersistent->Environment().StartWeatherFXFromTime(weather_name, time)); #ifdef INGAME_EDITOR return (false); -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR } bool is_wfx_playing() @@ -161,7 +161,7 @@ void set_time_factor(float time_factor) #ifdef INGAME_EDITOR if (Device.editor()) return; -#endif // #ifdef INGAME_EDITOR +#endif // #ifdef INGAME_EDITOR Level().Server->GetGameState()->SetGameTimeFactor(time_factor); } @@ -213,7 +213,7 @@ void change_game_time(u32 days, u32 hours, u32 mins) if (tpGame && ai().get_alife()) { u32 value = days * 86400 + hours * 3600 + mins * 60; float fValue = static_cast(value); - value *= 1000; // msec + value *= 1000; // msec g_pGamePersistent->Environment().ChangeGameTime(fValue); tpGame->alife().time_manager().change_game_time(value); } @@ -447,14 +447,14 @@ void disable_input() g_bDisableAllInput = true; #ifdef DEBUG Msg("input disabled"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void enable_input() { g_bDisableAllInput = false; #ifdef DEBUG Msg("input enabled"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void spawn_phantom(const Fvector& position) diff --git a/src/xrGame/level_sounds.cpp b/src/xrGame/level_sounds.cpp index 384e5b9a288..c16d5499dde 100644 --- a/src/xrGame/level_sounds.cpp +++ b/src/xrGame/level_sounds.cpp @@ -88,8 +88,8 @@ void SMusicTrack::Load(LPCSTR fn, LPCSTR params) if (m_PauseTime.x == m_PauseTime.y) ++m_PauseTime.y; - m_ActiveTime.mul(60 * 60 * 1000); // convert hour to ms - m_PauseTime.mul(1000); // convert sec to ms + m_ActiveTime.mul(60 * 60 * 1000); // convert hour to ms + m_PauseTime.mul(1000); // convert sec to ms } BOOL SMusicTrack::in(u32 game_time) @@ -167,7 +167,7 @@ void CLevelSoundManager::Load() if (music_sect && music_sect[0]) { #ifdef DEBUG Msg("- Loading music tracks from '%s'...", music_sect); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG CInifile::Sect& S = gameLtx.r_section(music_sect); CInifile::SectCIt it = S.Data.begin(), end = S.Data.end(); m_MusicTracks.reserve(S.Data.size()); @@ -230,7 +230,7 @@ void CLevelSoundManager::Update() } else { - m_NextTrackTime = engine_time + 10000; // next check after 10 sec + m_NextTrackTime = engine_time + 10000; // next check after 10 sec } } diff --git a/src/xrGame/login_manager.cpp b/src/xrGame/login_manager.cpp index 7febae989cc..7d77a900b1a 100644 --- a/src/xrGame/login_manager.cpp +++ b/src/xrGame/login_manager.cpp @@ -60,9 +60,9 @@ void login_manager::login_raw(login_params_t const& login_args, login_operation_ return; } - m_last_email = login_args.m_t1; // email; - m_last_nick = login_args.m_t2; // nick; - m_last_password = login_args.m_t3; // password; + m_last_email = login_args.m_t1; // email; + m_last_nick = login_args.m_t2; // nick; + m_last_password = login_args.m_t3; // password; m_login_operation_cb = logincb; GPResult tmp_res = @@ -351,7 +351,7 @@ char const* login_manager::get_password_from_registry() { using namespace secure_messaging; xr_strcpy(m_reg_password, ""); - u8 tmp_password_dest[128]; // max password length is 30 symbols... + u8 tmp_password_dest[128]; // max password length is 30 symbols... u32 pass_size = ReadRegistry_BinaryValue(REGISTRY_VALUE_USERPASSWORD, tmp_password_dest, sizeof(tmp_password_dest)); @@ -398,4 +398,4 @@ void login_manager::forgot_password(char const* url) ShellExecute(0, "open", "cmd.exe", params, NULL, SW_SHOW); } -} // namespace gamespy_gp \ No newline at end of file +} // namespace gamespy_gp \ No newline at end of file diff --git a/src/xrGame/login_manager.h b/src/xrGame/login_manager.h index ead61f93af2..074cf177e1a 100644 --- a/src/xrGame/login_manager.h +++ b/src/xrGame/login_manager.h @@ -33,7 +33,7 @@ struct profile bool const online() const { return m_online; }; GPProfile const profile_id() const { return m_profile_id; }; // copy constructor is valid -}; // struct profile +}; // struct profile // typedef fastdelegate::FastDelegate login_operation_cb; typedef mixed_delegate login_operation_cb; @@ -68,7 +68,7 @@ class login_manager : private Noncopyable void stop_setting_unique_nick(); profile const* get_current_profile() const { return m_current_profile; }; - void delete_profile_obj(); // deletes m_current_profile and clears m_login_operation_cb + void delete_profile_obj(); // deletes m_current_profile and clears m_login_operation_cb void forgot_password(char const* url); private: @@ -109,11 +109,11 @@ class login_manager : private Noncopyable static void __cdecl wslogin_cb(GHTTPResult httpResult, WSLoginResponse* response, void* userData); static void __cdecl setunick_cb(GPConnection* connection, void* arg, void* param); -}; // class login_manager -} // namespace gamespy_gp +}; // class login_manager +} // namespace gamespy_gp typedef gamespy_gp::profile gamespy_gp_profile; typedef gamespy_gp::login_operation_cb gamespy_gp_login_operation_cb; typedef gamespy_gp::login_manager gamespy_gp_login_manager; -#endif //#ifndef LOGIN_MANAGER +#endif //#ifndef LOGIN_MANAGER diff --git a/src/xrGame/magic_box3.cpp b/src/xrGame/magic_box3.cpp index 0326fe610c7..01128adc764 100644 --- a/src/xrGame/magic_box3.cpp +++ b/src/xrGame/magic_box3.cpp @@ -13,11 +13,11 @@ bool MagicBox3::intersects(const MagicBox3& rkBox1) const // compute difference of box centers, D = C1-C0 Fvector kD = Fvector().sub(rkBox1.Center(), rkBox0.Center()); - float aafC[3][3]; // matrix C = A^T B, c_{ij} = dotproduct(A_i,B_j) - float aafAbsC[3][3]; // |c_{ij}| - float afAD[3]; // dotproduct(A_i,D) - float fR0, fR1, fR; // interval radii and distance between centers - float fR01; // = R0 + R1 + float aafC[3][3]; // matrix C = A^T B, c_{ij} = dotproduct(A_i,B_j) + float aafAbsC[3][3]; // |c_{ij}| + float afAD[3]; // dotproduct(A_i,D) + float fR0, fR1, fR; // interval radii and distance between centers + float fR01; // = R0 + R1 // axis C0+t*A0 aafC[0][0] = akA[0].dotproduct(akB[0]); diff --git a/src/xrGame/map_location.cpp b/src/xrGame/map_location.cpp index 43a2ed0376e..7d59a7747aa 100644 --- a/src/xrGame/map_location.cpp +++ b/src/xrGame/map_location.cpp @@ -286,7 +286,7 @@ void CMapLocation::CalcLevelName() } } -bool CMapLocation::Update() // returns actual +bool CMapLocation::Update() // returns actual { R_ASSERT(m_cached.m_updatedFrame != Device.dwFrame); @@ -350,7 +350,7 @@ void CMapLocation::UpdateSpot(CUICustomMap* map, CMapSpot* sp) Fvector2 position = GetPosition(); m_position_on_map = - map->ConvertRealToLocal(position, (map->Heading()) ? false : true); // for visibility calculating + map->ConvertRealToLocal(position, (map->Heading()) ? false : true); // for visibility calculating sp->SetWndPos(m_position_on_map); @@ -378,7 +378,7 @@ void CMapLocation::UpdateSpot(CUICustomMap* map, CMapSpot* sp) bool b_pointer = (GetSpotPointer(sp) && map->NeedShowPointer(wnd_rect)); if (map->Heading()) { - m_position_on_map = map->ConvertRealToLocal(position, true); // for drawing + m_position_on_map = map->ConvertRealToLocal(position, true); // for drawing sp->SetWndPos(m_position_on_map); } @@ -472,7 +472,7 @@ void CMapLocation::UpdateSpot(CUICustomMap* map, CMapSpot* sp) void CMapLocation::UpdateSpotPointer(CUICustomMap* map, CMapSpotPointer* sp) { - if (sp->GetParent()) return; // already is child + if (sp->GetParent()) return; // already is child float heading; Fvector2 pointer_pos; if (map->GetPointerTo(m_position_on_map, sp->GetWidth() / 2, pointer_pos, heading)) { @@ -615,7 +615,7 @@ CMapSpot* CMapLocation::GetSpotBorder(CMapSpot* sp) } } else - { // inactive state + { // inactive state if (sp == m_level_spot) { if (NULL == m_level_map_spot_border_na && m_spot_border_names[1].size()) { m_level_map_spot_border_na = new CMapSpot(this); @@ -677,7 +677,7 @@ bool CRelationMapLocation::Update() m_last_relation = RELATION_REGISTRY().GetRelationType(pEnt, pAct); CSE_ALifeCreatureAbstract* pCreature = smart_cast(m_owner_se_object); - if (pCreature) // maybe trader ? + if (pCreature) // maybe trader ? bAlive = pCreature->g_Alive(); } else diff --git a/src/xrGame/map_location.h b/src/xrGame/map_location.h index d609f30d62d..b017c2dafbc 100644 --- a/src/xrGame/map_location.h +++ b/src/xrGame/map_location.h @@ -49,8 +49,8 @@ class CMapLocation : public IPureDestroyableObject CSE_ALifeDynamicObject* m_owner_se_object; int m_ttl; u32 m_actual_time; - Fvector m_position_global; // last global position, actual time only current frame - Fvector2 m_position_on_map; // last position on parent map, actual time only current frame + Fvector m_position_global; // last global position, actual time only current frame + Fvector2 m_position_on_map; // last position on parent map, actual time only current frame struct SCachedValues { u32 m_updatedFrame; @@ -63,7 +63,7 @@ class CMapLocation : public IPureDestroyableObject SCachedValues m_cached; private: - CMapLocation(const CMapLocation&) { R_ASSERT(0); } // disable copy ctor + CMapLocation(const CMapLocation&) { R_ASSERT(0); } // disable copy ctor protected: void LoadSpot(LPCSTR type, bool bReload); void UpdateSpot(CUICustomMap* map, CMapSpot* sp); diff --git a/src/xrGame/map_location_defs.h b/src/xrGame/map_location_defs.h index f79f5a283e7..ced925073fe 100644 --- a/src/xrGame/map_location_defs.h +++ b/src/xrGame/map_location_defs.h @@ -17,7 +17,7 @@ struct SLocationKey : public ISerializable, public IPureDestroyableObject return location < key.location; else return actual > key.actual; - } // move non-actual to tail + } // move non-actual to tail virtual void save(IWriter& stream); virtual void load(IReader& stream); diff --git a/src/xrGame/map_manager.cpp b/src/xrGame/map_manager.cpp index ec9aec3ee2b..dc943a40826 100644 --- a/src/xrGame/map_manager.cpp +++ b/src/xrGame/map_manager.cpp @@ -91,7 +91,7 @@ CMapManager::CMapManager() CMapManager::~CMapManager() { - delete_data(m_deffered_destroy_queue); // from prev frame + delete_data(m_deffered_destroy_queue); // from prev frame delete_data(m_locations_wrapper); } @@ -141,7 +141,7 @@ void CMapManager::RemoveMapLocation(const shared_str& spot_type, u16 id) } } -void CMapManager::RemoveMapLocationByObjectID(u16 id) // call on destroy object +void CMapManager::RemoveMapLocationByObjectID(u16 id) // call on destroy object { FindLocationByID key(id); Locations_it it = std::find_if(Locations().begin(), Locations().end(), key); @@ -211,7 +211,7 @@ void CMapManager::GetMapLocations(const shared_str& spot_type, u16 id, xr_vector void CMapManager::Update() { - delete_data(m_deffered_destroy_queue); // from prev frame + delete_data(m_deffered_destroy_queue); // from prev frame Locations_it it = Locations().begin(); Locations_it it_e = Locations().end(); @@ -249,7 +249,7 @@ Locations& CMapManager::Locations() m_locations = &m_locations_wrapper->registry().objects(); #ifdef DEBUG Msg("m_locations size=%d", m_locations->size()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } return *m_locations; } diff --git a/src/xrGame/map_manager.h b/src/xrGame/map_manager.h index f2af37d04f9..da0a05efd1f 100644 --- a/src/xrGame/map_manager.h +++ b/src/xrGame/map_manager.h @@ -16,12 +16,12 @@ class CMapManager CMapManager(); ~CMapManager(); void __stdcall Update(); - /*ICF */ Locations& Locations(); //{return *m_locations;} + /*ICF */ Locations& Locations(); //{return *m_locations;} CMapLocation* AddMapLocation(const shared_str& spot_type, u16 id); CMapLocation* AddRelationLocation(CInventoryOwner* pInvOwner); void RemoveMapLocation(const shared_str& spot_type, u16 id); bool HasMapLocation(const shared_str& spot_type, u16 id); - void RemoveMapLocationByObjectID(u16 id); // call on destroy object + void RemoveMapLocationByObjectID(u16 id); // call on destroy object void RemoveMapLocation(CMapLocation* ml); CMapLocation* GetMapLocation(const shared_str& spot_type, u16 id); void GetMapLocations(const shared_str& spot_type, u16 id, xr_vector& res); diff --git a/src/xrGame/map_spot.cpp b/src/xrGame/map_spot.cpp index 9062f3204c2..3e0dbb2c440 100644 --- a/src/xrGame/map_spot.cpp +++ b/src/xrGame/map_spot.cpp @@ -272,7 +272,7 @@ CUIStaticOrig* CComplexMapSpot::CreateStaticOrig(CUIXml& xml, LPCSTR ui_path) return ui; } -void CComplexMapSpot::Load(CUIXml* xml, LPCSTR path) // complex_spot_template +void CComplexMapSpot::Load(CUIXml* xml, LPCSTR path) // complex_spot_template { inherited::Load(xml, path); @@ -288,7 +288,7 @@ void CComplexMapSpot::Load(CUIXml* xml, LPCSTR path) // complex_spot_template xml->SetLocalRoot(stored_root); } -void CComplexMapSpot::SetTimerFinish(ALife::_TIME_ID time) // ms +void CComplexMapSpot::SetTimerFinish(ALife::_TIME_ID time) // ms { if (time <= 0) { m_timer_finish = 0; diff --git a/src/xrGame/map_spot.h b/src/xrGame/map_spot.h index 8b023b810a6..7c37bf116b8 100644 --- a/src/xrGame/map_spot.h +++ b/src/xrGame/map_spot.h @@ -79,7 +79,7 @@ class CUIStaticOrig : public CUIStatic void InitWndOrigin(); void ScaleOrigin(float k); -}; // class CUIStaticOrig +}; // class CUIStaticOrig class CComplexMapSpot : public CMapSpot { @@ -116,9 +116,9 @@ class CComplexMapSpot : public CMapSpot VERIFY2(m_top_icon, texture_name); m_top_icon->InitTexture(texture_name); } - void SetTimerFinish(ALife::_TIME_ID time); // ms game_time + void SetTimerFinish(ALife::_TIME_ID time); // ms game_time ALife::_TIME_ID GetTimerFinish() const { return m_timer_finish; } protected: CUIStaticOrig* CreateStaticOrig(CUIXml& xml, LPCSTR ui_path); -}; // class CComplexMapSpot +}; // class CComplexMapSpot diff --git a/src/xrGame/memory_manager.cpp b/src/xrGame/memory_manager.cpp index 889637c1d67..b46a5aa47c2 100644 --- a/src/xrGame/memory_manager.cpp +++ b/src/xrGame/memory_manager.cpp @@ -84,13 +84,13 @@ void CMemoryManager::reload(LPCSTR section) #ifdef _DEBUG extern bool g_enemy_manager_second_update; -#endif // _DEBUG +#endif // _DEBUG void CMemoryManager::update_enemies(const bool& registered_in_combat) { #ifdef _DEBUG g_enemy_manager_second_update = false; -#endif // _DEBUG +#endif // _DEBUG enemy().update(); if (m_stalker && (!enemy().selected() || (smart_cast(enemy().selected()) && @@ -106,7 +106,7 @@ void CMemoryManager::update_enemies(const bool& registered_in_combat) #ifdef _DEBUG g_enemy_manager_second_update = true; -#endif // _DEBUG +#endif // _DEBUG enemy().update(); } } diff --git a/src/xrGame/memory_space_impl.h b/src/xrGame/memory_space_impl.h index 2b004808c14..da4e6ffa0a3 100644 --- a/src/xrGame/memory_space_impl.h +++ b/src/xrGame/memory_space_impl.h @@ -32,7 +32,7 @@ IC void CObjectParams::fill(const T* game_object) m_level_vertex_id = game_object ? game_object->ai_location().level_vertex_id() : u32(-1); // if (game_object && ai().get_level_graph() && ai().level_graph().valid_vertex_id(m_level_vertex_id) && - //!ai().level_graph().inside(m_level_vertex_id,game_object->Position())) { + //! ai().level_graph().inside(m_level_vertex_id,game_object->Position())) { // m_position = ai().level_graph().vertex_position(m_level_vertex_id); // m_position.y = game_object->Position().y; // return; diff --git a/src/xrGame/memory_space_script.cpp b/src/xrGame/memory_space_script.cpp index 25a04206d94..ec951279754 100644 --- a/src/xrGame/memory_space_script.cpp +++ b/src/xrGame/memory_space_script.cpp @@ -56,7 +56,7 @@ Fvector CDangerObject__position(const CDangerObject* self) IC static void CMemoryInfo_Export(lua_State* luaState) { module(luaState)[ -#if 1 // def USE_ORIENTATION +#if 1 // def USE_ORIENTATION class_("rotation").def_readwrite("yaw", &SRotation::yaw).def_readwrite("pitch", &SRotation::pitch), #endif diff --git a/src/xrGame/min_obb.cpp b/src/xrGame/min_obb.cpp index dd2383e73d1..e4763b4f824 100644 --- a/src/xrGame/min_obb.cpp +++ b/src/xrGame/min_obb.cpp @@ -48,7 +48,7 @@ static Fvector GetColumn(Fmatrix& self, const u32& index) } #ifdef DEBUG return (Fvector().set(flt_max, flt_max, flt_max)); -#endif // DEBUG +#endif // DEBUG } //---------------------------------------------------------------------------- diff --git a/src/xrGame/mixed_delegate.h b/src/xrGame/mixed_delegate.h index 894697050ab..c8f925ae0dc 100644 --- a/src/xrGame/mixed_delegate.h +++ b/src/xrGame/mixed_delegate.h @@ -73,6 +73,6 @@ class mixed_delegate private: fastdelegate_type m_cpp_delegate; lua_delegate_type m_lua_delegate; -}; // class mixed_delegate +}; // class mixed_delegate -#endif //#ifndef MIXED_DELEGATE_INCLUDED +#endif //#ifndef MIXED_DELEGATE_INCLUDED diff --git a/src/xrGame/mixed_delegate_unique_tags.h b/src/xrGame/mixed_delegate_unique_tags.h index 045178b4534..0d8a8049075 100644 --- a/src/xrGame/mixed_delegate_unique_tags.h +++ b/src/xrGame/mixed_delegate_unique_tags.h @@ -3,13 +3,13 @@ enum enum_mixed_delegate_unique_tags { - mdut_no_unique_tag = 0x00, // in this case you can have c2084 compile error + mdut_no_unique_tag = 0x00, // in this case you can have c2084 compile error mdut_login_operation_cb_tag, account_operation_cb_tag, suggest_nicks_cb_tag, account_profiles_cb_tag, found_emails_cb_tag, store_operation_cb_tag -}; // enum enum_mixed_delegate_unique_tags +}; // enum enum_mixed_delegate_unique_tags -#endif //#ifndef MIXED_DELEGATE_UNIQUE_TAGS \ No newline at end of file +#endif //#ifndef MIXED_DELEGATE_UNIQUE_TAGS \ No newline at end of file diff --git a/src/xrGame/movement_manager.cpp b/src/xrGame/movement_manager.cpp index 0006f93663c..1055c8a82dc 100644 --- a/src/xrGame/movement_manager.cpp +++ b/src/xrGame/movement_manager.cpp @@ -235,7 +235,7 @@ void CMovementManager::update_path() #ifdef USE_FREE_IN_RESTRICTIONS if (restrictions().accessible(object().Position())) verify_detail_path(); -#endif // USE_FREE_IN_RESTRICTIONS +#endif // USE_FREE_IN_RESTRICTIONS m_build_at_once = false; @@ -312,7 +312,7 @@ void CMovementManager::verify_detail_path() if (distance >= verify_distance) break; } } -#endif // USE_FREE_IN_RESTRICTIONS +#endif // USE_FREE_IN_RESTRICTIONS void CMovementManager::on_restrictions_change() { @@ -372,7 +372,7 @@ void CMovementManager::build_level_path() level_path_builder().process_impl(); // static int i=0; // Msg ("[%6d][%6d][%4d][%f] - //build_level_path",Device.dwTimeGlobal,Device.dwFrame,++i,timer.GetElapsed_sec()*1000.f); + // build_level_path",Device.dwTimeGlobal,Device.dwFrame,++i,timer.GetElapsed_sec()*1000.f); } Fvector CMovementManager::predict_position( diff --git a/src/xrGame/movement_manager.h b/src/xrGame/movement_manager.h index 8b6cc12f339..4ec6e404c08 100644 --- a/src/xrGame/movement_manager.h +++ b/src/xrGame/movement_manager.h @@ -147,7 +147,7 @@ class CMovementManager void process_patrol_path(); #ifdef USE_FREE_IN_RESTRICTIONS void verify_detail_path(); -#endif // USE_FREE_IN_RESTRICTIONS +#endif // USE_FREE_IN_RESTRICTIONS void apply_collision_hit(CPHMovementControl* movement_control); protected: diff --git a/src/xrGame/movement_manager_patrol.cpp b/src/xrGame/movement_manager_patrol.cpp index 87f234b1fd3..416a102bfe5 100644 --- a/src/xrGame/movement_manager_patrol.cpp +++ b/src/xrGame/movement_manager_patrol.cpp @@ -91,10 +91,10 @@ void CMovementManager::process_patrol_path() else if (detail().completed(object().Position(), !detail().state_patrol_path())) { // Msg ("[%6d][%s] detail path is - //completed",Device.dwFrame,*object().cName()); + // completed",Device.dwFrame,*object().cName()); // Msg ( // "[path_size=%d][curr_id=%d][last_pp=%d] start_position=[%f][%f][%f] - //stop_position=[%f][%f][%f] position=[%f][%f][%f]", + // stop_position=[%f][%f][%f] position=[%f][%f][%f]", // detail().path().size(), // detail().curr_travel_point_index(), // detail().last_patrol_point(), diff --git a/src/xrGame/movement_manager_physic.cpp b/src/xrGame/movement_manager_physic.cpp index abb467da394..efeb2e6e620 100644 --- a/src/xrGame/movement_manager_physic.cpp +++ b/src/xrGame/movement_manager_physic.cpp @@ -23,9 +23,9 @@ #include "PHDebug.h" #define DBG_PH_MOVE_CONDITIONS(c) c -#else // DEBUG +#else // DEBUG #define DBG_PH_MOVE_CONDITIONS(c) -#endif // DEBUG +#endif // DEBUG #define DISTANCE_PHISICS_ENABLE_CHARACTERS 2.f @@ -108,8 +108,8 @@ Fvector CMovementManager::path_position(const float& velocity, const Fvector& po // Вычислить пройденную дистанцию, определить целевую позицию на маршруте, // изменить detail().m_current_travel_point - float desirable_speed = velocity; // желаемая скорость объекта - dist = desirable_speed * time_delta; // пройденное расстояние в соостветствие с желаемой скоростью + float desirable_speed = velocity; // желаемая скорость объекта + dist = desirable_speed * time_delta; // пройденное расстояние в соостветствие с желаемой скоростью // определить целевую точку Fvector target; @@ -206,17 +206,17 @@ void CMovementManager::move_along_path(CPHMovementControl* movement_control, Fve // проверка на хит apply_collision_hit(movement_control); // Msg ("[%6d][%s] no move, - //curr_tp=%d",Device.dwFrame,*object().cName(),detail().m_current_travel_point); + // curr_tp=%d",Device.dwFrame,*object().cName(),detail().m_current_travel_point); return; } //. VERIFY2(movement_control->CharacterExist() || object().animation_movement_controlled() , "! Can not move - - //physics movement shell does not exist. Try to move in wonded state?" ); + // physics movement shell does not exist. Try to move in wonded state?" ); if (!movement_control->CharacterExist()) return; if (time_delta < EPS) return; - float desirable_speed = old_desirable_speed(); // желаемая скорость объекта + float desirable_speed = old_desirable_speed(); // желаемая скорость объекта float desirable_dist = desirable_speed * time_delta; float dist; @@ -273,14 +273,14 @@ void CMovementManager::move_along_path(CPHMovementControl* movement_control, Fve velocity.normalize_safe(); if (velocity.y > 0.9f) velocity.y = 0.8f; if (velocity.y < -0.9f) velocity.y = -0.8f; - velocity.normalize_safe(); //как не странно, mdir - не нормирован - velocity.mul(desirable_speed); //*1.25f + velocity.normalize_safe(); //как не странно, mdir - не нормирован + velocity.mul(desirable_speed); //*1.25f if (!movement_control->PhysicsOnlyMode()) movement_control->SetCharacterVelocity(velocity); if (DBG_PH_MOVE_CONDITIONS(ph_dbg_draw_mask.test(phDbgNeverUseAiPhMove) || !ph_dbg_draw_mask.test(phDbgAlwaysUseAiPhMove) &&) !(m_nearest_objects.empty())) - { // физ. объект + { // физ. объект if (DBG_PH_MOVE_CONDITIONS(!ph_dbg_draw_mask.test(phDbgNeverUseAiPhMove) &&) !movement_control->TryPosition( dest_position)) diff --git a/src/xrGame/moving_object.h b/src/xrGame/moving_object.h index 83693c5a443..c602d4d30b5 100644 --- a/src/xrGame/moving_object.h +++ b/src/xrGame/moving_object.h @@ -64,4 +64,4 @@ class moving_object #include "moving_object_inline.h" -#endif // MOVING_OBJECT_H \ No newline at end of file +#endif // MOVING_OBJECT_H \ No newline at end of file diff --git a/src/xrGame/moving_object_inline.h b/src/xrGame/moving_object_inline.h index 5aa62bfea72..90c82182e10 100644 --- a/src/xrGame/moving_object_inline.h +++ b/src/xrGame/moving_object_inline.h @@ -40,9 +40,9 @@ IC void moving_object::action(const action_type& action) m_action = action; m_action_position = Fvector().set(flt_max, flt_max, flt_max); m_action_time = Device.dwTimeGlobal; -#if 0 // def DEBUG +#if 0 // def DEBUG Msg ("%6d %s %s",Device.dwFrame,*object().cName(),action == moving_object::action_wait ? "wait" : "move"); -#endif // DEBUG +#endif // DEBUG } IC void moving_object::action(const action_type& action, const Fvector& action_position) @@ -54,9 +54,9 @@ IC void moving_object::action(const action_type& action, const Fvector& action_p m_action = action; m_action_position = action_position; m_action_time = Device.dwTimeGlobal; -#if 0 // def DEBUG +#if 0 // def DEBUG Msg ("%6d %s %s",Device.dwFrame,*object().cName(),action == moving_object::action_wait ? "wait" : "move"); -#endif // DEBUG +#endif // DEBUG } IC const moving_object::action_type& moving_object::action() const @@ -89,4 +89,4 @@ IC obstacles_query& moving_object::dynamic_query() return (m_dynamic_query); } -#endif // MOVING_OBJECT_INLINE_H \ No newline at end of file +#endif // MOVING_OBJECT_INLINE_H \ No newline at end of file diff --git a/src/xrGame/moving_objects.cpp b/src/xrGame/moving_objects.cpp index 684fa7b1476..cd192bf4dab 100644 --- a/src/xrGame/moving_objects.cpp +++ b/src/xrGame/moving_objects.cpp @@ -35,7 +35,7 @@ void moving_objects::register_object(moving_object* moving_object) #ifdef DEBUG m_objects.insert(moving_object); -#endif // DEBUG +#endif // DEBUG VERIFY(m_tree); m_tree->insert(moving_object); @@ -48,7 +48,7 @@ void moving_objects::unregister_object(moving_object* moving_object) #ifdef DEBUG m_objects.erase(m_objects.find(moving_object)); -#endif // DEBUG +#endif // DEBUG VERIFY(m_tree); m_tree->remove(moving_object); diff --git a/src/xrGame/moving_objects.h b/src/xrGame/moving_objects.h index 53a738021e6..6872c4c3369 100644 --- a/src/xrGame/moving_objects.h +++ b/src/xrGame/moving_objects.h @@ -63,7 +63,7 @@ class moving_objects private: OBJECTS m_objects; -#endif // DEBUG +#endif // DEBUG private: IC bool collided(const IGameObject* object, const Fvector& position, const float& radius) const; @@ -120,4 +120,4 @@ class moving_objects #include "moving_objects_inline.h" -#endif // MOVING_OBJECTS_H \ No newline at end of file +#endif // MOVING_OBJECTS_H \ No newline at end of file diff --git a/src/xrGame/moving_objects_dynamic.cpp b/src/xrGame/moving_objects_dynamic.cpp index 1a444014cca..469e9b3f1ec 100644 --- a/src/xrGame/moving_objects_dynamic.cpp +++ b/src/xrGame/moving_objects_dynamic.cpp @@ -17,7 +17,7 @@ #ifndef MASTER_GOLD #include "ai_debug.h" -#endif // MASTER_GOLD +#endif // MASTER_GOLD #pragma warning(push) #pragma warning(disable : 4995) @@ -119,7 +119,7 @@ void moving_objects::fill_nearest_moving(moving_object* object) Msg (" %s",(*I)->object().cName().c_str()); } } -#endif // 0 +#endif // 0 if (m_nearest_moving.empty()) return; @@ -165,7 +165,7 @@ void moving_objects::generate_emitters() VERIFY(*I < *J); } } -#endif // DEBUG +#endif // DEBUG u32 size = m_collision_emitters.size(); m_collision_emitters.resize(size + m_nearest_moving.size()); @@ -481,9 +481,9 @@ void moving_objects::query_action_dynamic(moving_object* object) (*I)->dynamic_query().clear(); } -#if 0 // def DEBUG +#if 0 // def DEBUG Msg ("%6d end of iteration", Device.dwFrame); -#endif // DEBUG +#endif // DEBUG if (!m_collisions.empty()) { resolve_collisions(); @@ -492,7 +492,7 @@ void moving_objects::query_action_dynamic(moving_object* object) m_previous_collisions = m_collisions; -#if 0 // def DEBUG +#if 0 // def DEBUG { Msg ("Frame[%d], collisions[%d]",Device.dwFrame, m_visited_emitters.size()); NEAREST_MOVING::iterator I = m_visited_emitters.begin(); @@ -500,12 +500,12 @@ void moving_objects::query_action_dynamic(moving_object* object) for ( ; I != E; ++I) Msg (" %s",*(*I)->object().cName()); } -#endif // DEBUG +#endif // DEBUG NEAREST_MOVING::iterator I = m_visited_emitters.begin(); NEAREST_MOVING::iterator E = m_visited_emitters.end(); for (; I != E; ++I) (*I)->action(moving_object::action_move); -#endif // MASTER_GOLD +#endif // MASTER_GOLD } \ No newline at end of file diff --git a/src/xrGame/moving_objects_dynamic_collision.cpp b/src/xrGame/moving_objects_dynamic_collision.cpp index 2607c9f62c1..5fbb8637174 100644 --- a/src/xrGame/moving_objects_dynamic_collision.cpp +++ b/src/xrGame/moving_objects_dynamic_collision.cpp @@ -193,7 +193,7 @@ void moving_objects::resolve_collision(boxes& current, moving_object* object0, c } Msg ("%6d Eng of \"Oooooooops\"",Device.dwFrame); } -#endif // 0 +#endif // 0 VERIFY2( object0->action_frame() != Device.dwFrame, make_string("%d %s", Device.dwFrame, *object0->object().cName())); VERIFY2(object0->action_frame() < Device.dwFrame, make_string("%d %s", Device.dwFrame, *object0->object().cName())); @@ -250,7 +250,7 @@ bool moving_objects::collided_dynamic(moving_object* object0, const Fvector& pos VERIFY(!already_wait(object0)); VERIFY(!already_wait(object1)); } -#endif // DEBUG +#endif // DEBUG boxes current; if (!collided_dynamic(object0, position0, object1, position1, current)) return (false); diff --git a/src/xrGame/moving_objects_impl.h b/src/xrGame/moving_objects_impl.h index 2dbd4302982..51145a302e9 100644 --- a/src/xrGame/moving_objects_impl.h +++ b/src/xrGame/moving_objects_impl.h @@ -21,4 +21,4 @@ IC bool moving_objects::collided(const IGameObject* object, const Fvector& posit return (object->Position().distance_to(position) <= (object->Radius() + radius)); } -#endif // MOVING_OBJECTS_IMPL_H \ No newline at end of file +#endif // MOVING_OBJECTS_IMPL_H \ No newline at end of file diff --git a/src/xrGame/moving_objects_inline.h b/src/xrGame/moving_objects_inline.h index 17d679ea9c4..2ee66a6e9f7 100644 --- a/src/xrGame/moving_objects_inline.h +++ b/src/xrGame/moving_objects_inline.h @@ -14,4 +14,4 @@ IC const moving_objects::COLLISIONS& moving_objects::collisions() const return (m_previous_collisions); } -#endif // MOVING_OBJECTS_INLINE_H \ No newline at end of file +#endif // MOVING_OBJECTS_INLINE_H \ No newline at end of file diff --git a/src/xrGame/mp_config_sections.cpp b/src/xrGame/mp_config_sections.cpp index c6ea5a5483d..310c6d862a2 100644 --- a/src/xrGame/mp_config_sections.cpp +++ b/src/xrGame/mp_config_sections.cpp @@ -98,4 +98,4 @@ void mp_active_params::load_to(LPCSTR sect_name, CInifile& dest_dumper) } } -} // namespace mp_anticheat +} // namespace mp_anticheat diff --git a/src/xrGame/mp_config_sections.h b/src/xrGame/mp_config_sections.h index 11d952c7bbd..16a0b842993 100644 --- a/src/xrGame/mp_config_sections.h +++ b/src/xrGame/mp_config_sections.h @@ -26,7 +26,7 @@ class mp_config_sections mp_sections_t m_mp_sections; mp_sections_t::const_iterator m_current_dump_sect; CInifile m_tmp_dumper; -}; // class mp_config_sections +}; // class mp_config_sections class mp_active_params { @@ -34,10 +34,10 @@ class mp_active_params mp_active_params(); ~mp_active_params(); - void dump(IAnticheatDumpable const* dumpable_obj, LPCSTR sect_name_key, CInifile& dest_dumper); // for cheater - void load_to(LPCSTR sect_name, CInifile& dest_dumper); // for verifyer -}; // class mp_active_params + void dump(IAnticheatDumpable const* dumpable_obj, LPCSTR sect_name_key, CInifile& dest_dumper); // for cheater + void load_to(LPCSTR sect_name, CInifile& dest_dumper); // for verifyer +}; // class mp_active_params -} // namespace mp_anticheat +} // namespace mp_anticheat -#endif //#ifndef MP_CONFIG_SECTIONS_INCLUDED \ No newline at end of file +#endif //#ifndef MP_CONFIG_SECTIONS_INCLUDED \ No newline at end of file diff --git a/src/xrGame/object_actions_inline.h b/src/xrGame/object_actions_inline.h index c2dcb696d57..e4e0f6e3a09 100644 --- a/src/xrGame/object_actions_inline.h +++ b/src/xrGame/object_actions_inline.h @@ -49,7 +49,8 @@ void CObjectActionBase<_item_type>::prevent_weapon_state_switch_ugly() { // smart_cast(object().inventory().ActiveItem()->object()).SetState ( CHUDState::eIdle ); // smart_cast(object().inventory().ActiveItem()->object()).SetNextState ( CHUDState::eIdle ); - // object().inventory().SetActiveSlot ( object().inventory().GetActiveSlot() + // object().inventory().SetActiveSlot ( + // object().inventory().GetActiveSlot() // ); } diff --git a/src/xrGame/object_handler.cpp b/src/xrGame/object_handler.cpp index 7a5fb89d49c..c941d9935ec 100644 --- a/src/xrGame/object_handler.cpp +++ b/src/xrGame/object_handler.cpp @@ -195,14 +195,14 @@ void CObjectHandler::actualize_strap_mode(CWeapon* weapon) const if (!planner().m_storage.property(ObjectHandlerSpace::eWorldPropertyStrapped)) { // Msg ( "[%6d][%s] actualizing: weapon_strapped = false", Device.dwTimeGlobal, - //planner().object().cName().c_str() ); + // planner().object().cName().c_str() ); weapon->strapped_mode(false); return; } THROW3(weapon->can_be_strapped(), "Cannot strap weapon", *weapon->cName()); // Msg ( "[%6d][%s] actualizing: weapon_strapped = true", Device.dwTimeGlobal, - //planner().object().cName().c_str() ); + // planner().object().cName().c_str() ); weapon->strapped_mode(true); } @@ -212,7 +212,7 @@ bool CObjectHandler::weapon_strapped(CWeapon* weapon) const if (!weapon->can_be_strapped()) { // Msg ( "[%6d][%s] weapon_strapped = false0", Device.dwTimeGlobal, - //planner().object().cName().c_str() ); + // planner().object().cName().c_str() ); return (false); } @@ -223,8 +223,8 @@ bool CObjectHandler::weapon_strapped(CWeapon* weapon) const (planner().current_action_state_id() == ObjectHandlerSpace::eWorldOperatorUnstrapping)) { // Msg ( "[%6d][%s] weapon_strapped = %s1", Device.dwTimeGlobal, - //planner().object().cName().c_str(), almost_strapped && - //!planner().m_storage.property(ObjectHandlerSpace::eWorldPropertyStrapped2Idle) ? "true" : "false" ); + // planner().object().cName().c_str(), almost_strapped && + //! planner().m_storage.property(ObjectHandlerSpace::eWorldPropertyStrapped2Idle) ? "true" : "false" ); if (!almost_strapped || planner().m_storage.property(ObjectHandlerSpace::eWorldPropertyStrapped2Idle)) return (false); @@ -240,8 +240,8 @@ bool CObjectHandler::weapon_unstrapped() const CWeapon* weapon = smart_cast(inventory().ActiveItem()); if (!weapon) { // Msg ( "[%6d][%s] no active item!!(%d)(%s)", Device.dwTimeGlobal, - //planner().object().cName().c_str(), inventory().GetActiveSlot(), inventory().ItemFromSlot(3) ? - //inventory().ItemFromSlot(3)->object().cName().c_str() : "" ); + // planner().object().cName().c_str(), inventory().GetActiveSlot(), inventory().ItemFromSlot(3) ? + // inventory().ItemFromSlot(3)->object().cName().c_str() : "" ); return (true); } @@ -254,7 +254,7 @@ bool CObjectHandler::weapon_unstrapped(CWeapon* weapon) const if (!weapon->can_be_strapped()) { // Msg ( "[%6d][%s] weapon_unstrapped = true0", Device.dwTimeGlobal, - //planner().object().cName().c_str() ); + // planner().object().cName().c_str() ); return (true); } @@ -266,8 +266,8 @@ bool CObjectHandler::weapon_unstrapped(CWeapon* weapon) const (planner().current_action_state_id() == ObjectHandlerSpace::eWorldOperatorUnstrapping)) { // Msg ( "[%6d][%s] weapon_unstrapped = %s1", Device.dwTimeGlobal, - //planner().object().cName().c_str(), almost_unstrapped && - //!planner().m_storage.property(ObjectHandlerSpace::eWorldPropertyStrapped2Idle) ? "true" : "false" ); + // planner().object().cName().c_str(), almost_unstrapped && + //! planner().m_storage.property(ObjectHandlerSpace::eWorldPropertyStrapped2Idle) ? "true" : "false" ); if (!almost_unstrapped || planner().m_storage.property(ObjectHandlerSpace::eWorldPropertyStrapped2Idle)) return (false); diff --git a/src/xrGame/object_handler_planner_missile.cpp b/src/xrGame/object_handler_planner_missile.cpp index 182e7c09aa4..b2176950f92 100644 --- a/src/xrGame/object_handler_planner_missile.cpp +++ b/src/xrGame/object_handler_planner_missile.cpp @@ -24,7 +24,7 @@ void CObjectHandlerPlanner::add_evaluators(CMissile* missile) add_evaluator(uid(id, eWorldPropertyHidden), new CObjectPropertyEvaluatorMissileHidden(missile, m_object)); add_evaluator(uid(id, eWorldPropertyThrowStarted), new CObjectPropertyEvaluatorMissileStarted(missile, m_object)); // add_evaluator (uid(id,eWorldPropertyThrowIdle) ,new - //CObjectPropertyEvaluatorMissile(missile,m_object,MS_THROW)); + // CObjectPropertyEvaluatorMissile(missile,m_object,MS_THROW)); add_evaluator( uid(id, eWorldPropertyThrow), new CObjectPropertyEvaluatorMissile(missile, m_object, CMissile::eThrowEnd)); diff --git a/src/xrGame/object_handler_planner_weapon.cpp b/src/xrGame/object_handler_planner_weapon.cpp index d774c674159..c6b7190721c 100644 --- a/src/xrGame/object_handler_planner_weapon.cpp +++ b/src/xrGame/object_handler_planner_weapon.cpp @@ -22,7 +22,7 @@ void CObjectHandlerPlanner::add_evaluators(CWeapon* weapon) u16 id = weapon->ID(); // dynamic state properties //. add_evaluator (uid(id,eWorldPropertyHidden) ,new - //CObjectPropertyEvaluatorState(weapon,m_object,CWeapon::eHidden)); + // CObjectPropertyEvaluatorState(weapon,m_object,CWeapon::eHidden)); add_evaluator(uid(id, eWorldPropertyHidden), new CObjectPropertyEvaluatorWeaponHidden(weapon, m_object)); // dynamic member properties diff --git a/src/xrGame/obsolete_queue.h b/src/xrGame/obsolete_queue.h index 77406af6185..3f2782da71c 100644 --- a/src/xrGame/obsolete_queue.h +++ b/src/xrGame/obsolete_queue.h @@ -28,4 +28,4 @@ class obsolete_queue #include "obsolete_queue_inline.h" -#endif //#ifndef OBSOLETE_QUEUE_INCLUDED \ No newline at end of file +#endif //#ifndef OBSOLETE_QUEUE_INCLUDED \ No newline at end of file diff --git a/src/xrGame/obsolete_queue_inline.h b/src/xrGame/obsolete_queue_inline.h index c77cd253231..000c27bdf3d 100644 --- a/src/xrGame/obsolete_queue_inline.h +++ b/src/xrGame/obsolete_queue_inline.h @@ -33,4 +33,4 @@ class obsolete_queue, MaxCount> private: container_type m_sequence; T m_sequence_store[MaxCount]; -}; // class obsolete_queue, MaxCount> +}; // class obsolete_queue, MaxCount> diff --git a/src/xrGame/obstacles_query.h b/src/xrGame/obstacles_query.h index 6d3640b34d8..1bbc77fbd0b 100644 --- a/src/xrGame/obstacles_query.h +++ b/src/xrGame/obstacles_query.h @@ -60,4 +60,4 @@ class obstacles_query #include "obstacles_query_inline.h" -#endif // OBSTACLES_QUERY_H \ No newline at end of file +#endif // OBSTACLES_QUERY_H \ No newline at end of file diff --git a/src/xrGame/obstacles_query_inline.h b/src/xrGame/obstacles_query_inline.h index ba2556834fc..facbd771695 100644 --- a/src/xrGame/obstacles_query_inline.h +++ b/src/xrGame/obstacles_query_inline.h @@ -108,4 +108,4 @@ IC const bool& obstacles_query::actual() const return (m_actual); } -#endif // OBSTACLES_QUERY_INLINE_H \ No newline at end of file +#endif // OBSTACLES_QUERY_INLINE_H \ No newline at end of file diff --git a/src/xrGame/ode_redefine.h b/src/xrGame/ode_redefine.h index 882e4eb5153..17f97ddf224 100644 --- a/src/xrGame/ode_redefine.h +++ b/src/xrGame/ode_redefine.h @@ -28,6 +28,6 @@ #define dFabs(x) ((float)_abs(x)) /* absolute value */ #endif -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS -#endif // ODE_REDEFINE \ No newline at end of file +#endif // ODE_REDEFINE \ No newline at end of file diff --git a/src/xrGame/patrol_path_manager.cpp b/src/xrGame/patrol_path_manager.cpp index 7ad3658eae8..84a4d5428a6 100644 --- a/src/xrGame/patrol_path_manager.cpp +++ b/src/xrGame/patrol_path_manager.cpp @@ -19,7 +19,7 @@ #include "xrAICore/Navigation/level_graph.h" #include "xrScriptEngine/script_engine.hpp" -#if 1 // def DEBUG +#if 1 // def DEBUG #include "space_restriction_manager.h" static void show_restrictions(LPCSTR restrictions) @@ -195,8 +195,8 @@ void CPatrolPathManager::select_point(const Fvector& position, u32& dest_vertex_ m_game_object->callback(GameObject::ePatrolPathInPoint)( m_game_object->lua_game_object(), u32(ScriptEntity::eActionTypeMovement), m_curr_point_index); - u32 count = 0; // количество разветвлений - float sum = 0.f; // сумма весов разветвления + u32 count = 0; // количество разветвлений + float sum = 0.f; // сумма весов разветвления vertex = m_path->vertex(m_curr_point_index); CPatrolPath::const_iterator I = vertex->edges().begin(), E = vertex->edges().end(); u32 target = u32(-1); @@ -276,8 +276,8 @@ void CPatrolPathManager::select_point(const Fvector& position, u32& dest_vertex_ u32 CPatrolPathManager::get_next_point(u32 prev_point_index) { - u32 count = 0; // количество разветвлений - float sum = 0.f; // сумма весов разветвления + u32 count = 0; // количество разветвлений + float sum = 0.f; // сумма весов разветвления const CPatrolPath::CVertex* vertex = m_path->vertex(prev_point_index); CPatrolPath::const_iterator I = vertex->edges().begin(), E = vertex->edges().end(); diff --git a/src/xrGame/pda_space.h b/src/xrGame/pda_space.h index c6d61a391c4..9c2d7735507 100644 --- a/src/xrGame/pda_space.h +++ b/src/xrGame/pda_space.h @@ -3,7 +3,7 @@ //типы сообщений PDA enum EPdaMsg { - ePdaMsgDialog, //диалог - ePdaMsgInfo, //сообщение передает некоторую информацию + ePdaMsgDialog, //диалог + ePdaMsgInfo, //сообщение передает некоторую информацию ePdaMsgMax }; diff --git a/src/xrGame/physics_game.cpp b/src/xrGame/physics_game.cpp index 907b3cf6d85..f016ea8471d 100644 --- a/src/xrGame/physics_game.cpp +++ b/src/xrGame/physics_game.cpp @@ -25,7 +25,7 @@ static const float PARTICLE_EFFECT_DIST = 70.f; static const float SOUND_EFFECT_DIST = 70.f; const float mass_limit = - 10000.f; // some conventional value used as evaluative param (there is no code restriction on mass) + 10000.f; // some conventional value used as evaluative param (there is no code restriction on mass) ////////////////////////////////////////////////////////////////////////////////// static const float SQUARE_PARTICLE_EFFECT_DIST = PARTICLE_EFFECT_DIST * PARTICLE_EFFECT_DIST; static const float SQUARE_SOUND_EFFECT_DIST = SOUND_EFFECT_DIST * SOUND_EFFECT_DIST; @@ -117,9 +117,9 @@ class CPHFindLiquidParticlesComparer : public CPHReqComparerV // public CPHReqComparerV //{ // virtual bool compare (const CPHReqComparerV* v) const {return -//v->compare(this);} +// v->compare(this);} // virtual bool compare (const CPHOnesConditionSelfCmpTrue* v) const {return -//true;} +// true;} // //}; diff --git a/src/xrGame/player_account.h b/src/xrGame/player_account.h index b4535144cd5..e921abb53e3 100644 --- a/src/xrGame/player_account.h +++ b/src/xrGame/player_account.h @@ -29,6 +29,6 @@ class player_account bool m_online_account; gamespy_profile::all_awards_t m_awards; -}; // class player_account +}; // class player_account -#endif //#ifndef PLAYER_ACCOUNT_H \ No newline at end of file +#endif //#ifndef PLAYER_ACCOUNT_H \ No newline at end of file diff --git a/src/xrGame/player_hud.cpp b/src/xrGame/player_hud.cpp index 325fb83a4d8..043c3cd6e20 100644 --- a/src/xrGame/player_hud.cpp +++ b/src/xrGame/player_hud.cpp @@ -82,7 +82,7 @@ void player_hud_motion_container::load(IKinematicsAnimated* model, const shared_ pm->m_animations.back().name = buff; #ifdef DEBUG // Msg(" alias=[%s] base=[%s] name=[%s]",pm->m_alias_name.c_str(), pm->m_base_name.c_str(), buff); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } } R_ASSERT2(pm->m_animations.size(), make_string("motion not found [%s]", pm->m_base_name.c_str()).c_str()); @@ -489,7 +489,7 @@ u32 player_hud::motion_length(const shared_str& anim_name, const shared_str& hud float speed = CalcMotionSpeed(anim_name); attachable_hud_item* pi = create_hud_item(hud_name); player_hud_motion* pm = pi->m_hand_motions.find_motion(anim_name); - if (!pm) return 100; // ms TEMPORARY + if (!pm) return 100; // ms TEMPORARY R_ASSERT2(pm, make_string("hudItem model [%s] has no motion with alias [%s]", hud_name.c_str(), anim_name.c_str()).c_str()); return motion_length(pm->m_animations[0].mid, md, speed); @@ -682,7 +682,7 @@ void player_hud::detach_item_idx(u16 idx) for (u16 pid = 0; pid < pc; ++pid) { if (pid != part_idR) { - CBlend* B = m_model->PlayCycle(pid, M, TRUE); // this can destroy BR calling UpdateTracks ! + CBlend* B = m_model->PlayCycle(pid, M, TRUE); // this can destroy BR calling UpdateTracks ! if (BR->blend_state() != CBlend::eFREE_SLOT) { u16 bop = B->bone_or_part; *B = *BR; diff --git a/src/xrGame/player_hud.h b/src/xrGame/player_hud.h index e40ccdf0fcf..91bdbcaef79 100644 --- a/src/xrGame/player_hud.h +++ b/src/xrGame/player_hud.h @@ -41,9 +41,9 @@ struct hud_item_measures }; Flags8 m_prop_flags; - Fvector m_item_attach[2]; // pos,rot + Fvector m_item_attach[2]; // pos,rot - Fvector m_hands_offset[2][3]; // pos,rot/ normal,aim,GL + Fvector m_hands_offset[2][3]; // pos,rot/ normal,aim,GL u16 m_fire_bone; Fvector m_fire_point_offset; @@ -52,7 +52,7 @@ struct hud_item_measures u16 m_shell_bone; Fvector m_shell_point_offset; - Fvector m_hands_attach[2]; // pos,rot + Fvector m_hands_attach[2]; // pos,rot void load(const shared_str& sect_name, IKinematics* K); }; diff --git a/src/xrGame/player_hud_tune.cpp b/src/xrGame/player_hud_tune.cpp index 06750bf9120..42ec087480c 100644 --- a/src/xrGame/player_hud_tune.cpp +++ b/src/xrGame/player_hud_tune.cpp @@ -30,19 +30,19 @@ void tune_remap(const Ivector& in_values, Ivector& out_values) out_values = in_values; } else if (pInput->iGetAsyncKeyState(DIK_Z)) - { // strict by X + { // strict by X out_values.x = in_values.y; out_values.y = 0; out_values.z = 0; } else if (pInput->iGetAsyncKeyState(DIK_X)) - { // strict by Y + { // strict by Y out_values.x = 0; out_values.y = in_values.y; out_values.z = 0; } else if (pInput->iGetAsyncKeyState(DIK_C)) - { // strict by Z + { // strict by Z out_values.x = 0; out_values.y = 0; out_values.z = in_values.y; @@ -170,7 +170,7 @@ void attachable_hud_item::tune(Ivector values) Log("-----------"); } } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } void attachable_hud_item::debug_draw_firedeps() @@ -190,7 +190,7 @@ void attachable_hud_item::debug_draw_firedeps() if (hud_adj_mode == 7) render.draw_aabb(fd.vLastSP, 0.005f, 0.005f, 0.005f, color_xrgb(0, 255, 0)); } -#endif // DEBUG +#endif // DEBUG } void player_hud::tune(Ivector _values) @@ -265,7 +265,7 @@ void player_hud::tune(Ivector _values) if (!hi) return; hi->tune(values); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } void hud_draw_adjust_mode() diff --git a/src/xrGame/player_name_modifyer.h b/src/xrGame/player_name_modifyer.h index 345c991268d..34decd73ad5 100644 --- a/src/xrGame/player_name_modifyer.h +++ b/src/xrGame/player_name_modifyer.h @@ -3,4 +3,4 @@ LPCSTR modify_player_name(LPCSTR src_name, string256& dest); -#endif //#ifndef PLAYER_NAME_MODIFYER_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_NAME_MODIFYER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_spot_params.cpp b/src/xrGame/player_spot_params.cpp index ce42f7bcb86..beb90260461 100644 --- a/src/xrGame/player_spot_params.cpp +++ b/src/xrGame/player_spot_params.cpp @@ -66,7 +66,7 @@ u32 const player_spots_with_top_enemy_divider::get_top_enemy_player_score() } break; default: return 0; - }; // switch (Game().Type()) + }; // switch (Game().Type()) s32 max_score = 0; @@ -94,4 +94,4 @@ float const player_spots_with_top_enemy_divider::get_float_param() return my_spots_count / top_enemy; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_spot_params.h b/src/xrGame/player_spot_params.h index a645ed60685..4ec11afae44 100644 --- a/src/xrGame/player_spot_params.h +++ b/src/xrGame/player_spot_params.h @@ -20,7 +20,7 @@ class player_spots_counter : public player_state_param virtual u32 const get_u32_param(); virtual float const get_float_param() { return 0.0f; }; virtual void reset_game(){}; -}; // class player_spots_counter +}; // class player_spots_counter ADD_ACCUMULATIVE_STATE(acpv_spots, player_spots_counter); #undef ACCUMULATIVE_STATE_LIST @@ -38,12 +38,12 @@ class player_spots_with_top_enemy_divider : public player_spots_counter private: u32 const get_top_enemy_player_score(); -}; // player_spots_with_top_enemy_divider +}; // player_spots_with_top_enemy_divider ADD_ACCUMULATIVE_STATE(acpv_enemy_top_player_div, player_spots_with_top_enemy_divider); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_enemy_top_player_div, player_spots_with_top_enemy_divider) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_SPOT_PARAMS_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_SPOT_PARAMS_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_achilles_heel.cpp b/src/xrGame/player_state_achilles_heel.cpp index c95e337ec9d..7d04ea49416 100644 --- a/src/xrGame/player_state_achilles_heel.cpp +++ b/src/xrGame/player_state_achilles_heel.cpp @@ -52,4 +52,4 @@ void achilles_heel_kill::OnPlayerKilled( } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_achilles_heel.h b/src/xrGame/player_state_achilles_heel.h index ef50e06bf90..0bf9b238fff 100644 --- a/src/xrGame/player_state_achilles_heel.h +++ b/src/xrGame/player_state_achilles_heel.h @@ -23,12 +23,12 @@ class achilles_heel_kill : public player_state_param protected: bool m_achilles_kill_was; -}; // class achilles_heel_kill +}; // class achilles_heel_kill ADD_ACCUMULATIVE_STATE(acpv_achilles_heel_ready, achilles_heel_kill); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_achilles_heel_ready, achilles_heel_kill) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_ACHILLES_HEEL_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_ACHILLES_HEEL_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_ambassador.cpp b/src/xrGame/player_state_ambassador.cpp index 51eda8cead1..2fefa5cea9d 100644 --- a/src/xrGame/player_state_ambassador.cpp +++ b/src/xrGame/player_state_ambassador.cpp @@ -78,4 +78,4 @@ void player_state_ambassador::OnPlayerBringArtefact(game_PlayerState const* ps) m_delivered = true; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_ambassador.h b/src/xrGame/player_state_ambassador.h index c0c7f4d6b98..9a2e2575196 100644 --- a/src/xrGame/player_state_ambassador.h +++ b/src/xrGame/player_state_ambassador.h @@ -28,12 +28,12 @@ class player_state_ambassador : public player_state_param u32 m_shots_count; u32 m_art_drop_count; bool m_delivered; -}; // class player_state_ambassador +}; // class player_state_ambassador ADD_ACCUMULATIVE_STATE(acpv_ambassador, player_state_ambassador); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_ambassador, player_state_ambassador) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_AMBASSADOR_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_AMBASSADOR_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_ammo_elapsed.cpp b/src/xrGame/player_state_ammo_elapsed.cpp index 45f9ffa84f9..ce57a32e291 100644 --- a/src/xrGame/player_state_ammo_elapsed.cpp +++ b/src/xrGame/player_state_ammo_elapsed.cpp @@ -18,4 +18,4 @@ u32 const player_state_ammo_elapsed::get_u32_param() return static_cast(tmp_active_weapon->GetAmmoElapsed()); } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_ammo_elapsed.h b/src/xrGame/player_state_ammo_elapsed.h index 010d2302827..b9d0a3768d1 100644 --- a/src/xrGame/player_state_ammo_elapsed.h +++ b/src/xrGame/player_state_ammo_elapsed.h @@ -18,12 +18,12 @@ class player_state_ammo_elapsed : public player_state_param virtual u32 const get_u32_param(); virtual float const get_float_param() { return 0.0f; }; virtual void reset_game(){}; -}; // class player_state_ammo_elapsed +}; // class player_state_ammo_elapsed ADD_ACCUMULATIVE_STATE(acpv_ammo_elapsed, player_state_ammo_elapsed); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_ammo_elapsed, player_state_ammo_elapsed) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_AMMO_ELAPSED_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_AMMO_ELAPSED_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_avenger.cpp b/src/xrGame/player_state_avenger.cpp index 27995eef5d4..3d662bf452b 100644 --- a/src/xrGame/player_state_avenger.cpp +++ b/src/xrGame/player_state_avenger.cpp @@ -37,7 +37,7 @@ void player_state_avenger::OnPlayerKilled( shared_str m_killer_name; u32 m_killer_spawn_time; buffer_vector m_my_team_players; - }; // struct need_revenge + }; // struct need_revenge game_PlayerState const* tmp_local_player = m_owner->get_local_player(); if (!tmp_local_player || tmp_local_player->GameID != killer_id) return; @@ -87,4 +87,4 @@ void player_state_avenger::OnPlayerSpawned(game_PlayerState const* ps) } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_avenger.h b/src/xrGame/player_state_avenger.h index 49f6cbc5c2f..4b0b596a415 100644 --- a/src/xrGame/player_state_avenger.h +++ b/src/xrGame/player_state_avenger.h @@ -28,12 +28,12 @@ class player_state_avenger : public player_state_param typedef AssociativeVector player_spawn_times_t; player_spawn_times_t m_player_spawns; u32 m_aveng_count; -}; // class player_state_avenger +}; // class player_state_avenger ADD_ACCUMULATIVE_STATE(acpv_avenger, player_state_avenger); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_avenger, player_state_avenger) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_AVENGER \ No newline at end of file +#endif //#ifndef PLAYER_STATE_AVENGER \ No newline at end of file diff --git a/src/xrGame/player_state_blitzkrieg.cpp b/src/xrGame/player_state_blitzkrieg.cpp index 493332e849a..5be7de0289a 100644 --- a/src/xrGame/player_state_blitzkrieg.cpp +++ b/src/xrGame/player_state_blitzkrieg.cpp @@ -60,4 +60,4 @@ u32 const player_blitzkrieg::get_u32_param() return m_deliver_time; }; -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_blitzkrieg.h b/src/xrGame/player_state_blitzkrieg.h index c3f852261e5..3f8765aed60 100644 --- a/src/xrGame/player_state_blitzkrieg.h +++ b/src/xrGame/player_state_blitzkrieg.h @@ -27,12 +27,12 @@ class player_blitzkrieg : public player_state_param u32 m_deliver_time; u32 m_take_time; u32 m_art_drop_count; -}; // class player_blitzkrieg +}; // class player_blitzkrieg ADD_ACCUMULATIVE_STATE(acpv_blitzkrieg_time, player_blitzkrieg); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_blitzkrieg_time, player_blitzkrieg) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_BLITZKRIEG_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_BLITZKRIEG_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_cherub.cpp b/src/xrGame/player_state_cherub.cpp index 1ef1967a697..704e8cf17e6 100644 --- a/src/xrGame/player_state_cherub.cpp +++ b/src/xrGame/player_state_cherub.cpp @@ -62,7 +62,7 @@ void player_state_cherub::OnPlayerKilled( shared_str m_hitter_name; shared_str m_victim_name; u32 m_art_take_time; - }; // struct hit_fetcher + }; // struct hit_fetcher game_PlayerState* tmp_player_state = m_owner->get_local_player(); if (!tmp_player_state) return; @@ -95,4 +95,4 @@ void player_state_cherub::OnPlayerSpawned(game_PlayerState const* ps) } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_cherub.h b/src/xrGame/player_state_cherub.h index 37fd88926cd..8d6939b5066 100644 --- a/src/xrGame/player_state_cherub.h +++ b/src/xrGame/player_state_cherub.h @@ -32,11 +32,11 @@ class player_state_cherub : public player_state_param u32 m_art_take_time; u16 m_bearer_id; shared_str m_bearer_name; -}; // class player_state_cherub +}; // class player_state_cherub ADD_ACCUMULATIVE_STATE(acpv_cherub_ready, player_state_cherub); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_cherub_ready, player_state_cherub) } -#endif //#ifndef PLAYER_STATE_CHERUB_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_CHERUB_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_climber.cpp b/src/xrGame/player_state_climber.cpp index 480f5a6eeee..f6d9d87131d 100644 --- a/src/xrGame/player_state_climber.cpp +++ b/src/xrGame/player_state_climber.cpp @@ -44,4 +44,4 @@ void player_state_climber::OnPlayerRankChanged() if (max_count && (max_player_rank == tmp_local_player)) m_player_is_climber = true; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_climber.h b/src/xrGame/player_state_climber.h index f5d22fa6551..a9c18cf8dcb 100644 --- a/src/xrGame/player_state_climber.h +++ b/src/xrGame/player_state_climber.h @@ -22,12 +22,12 @@ class player_state_climber : public player_state_param protected: bool m_player_is_climber; -}; // class player_state_climber +}; // class player_state_climber ADD_ACCUMULATIVE_STATE(acpv_climber, player_state_climber); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_climber, player_state_climber) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_CLIMBER_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_CLIMBER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_mad.cpp b/src/xrGame/player_state_mad.cpp index 0ec026e97fa..f71f5c2f088 100644 --- a/src/xrGame/player_state_mad.cpp +++ b/src/xrGame/player_state_mad.cpp @@ -43,4 +43,4 @@ u32 const player_state_mad::get_u32_param() return m_kill_times.size(); } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_mad.h b/src/xrGame/player_state_mad.h index 33ad983f160..192d9b22027 100644 --- a/src/xrGame/player_state_mad.h +++ b/src/xrGame/player_state_mad.h @@ -21,18 +21,18 @@ class player_state_mad : public player_state_param virtual void OnPlayerKilled( u16 killer_id, u16 target_id, u16 weapon_id, std::pair kill_type); - static u32 const mad_time_period = 20000; // 20 seconds + static u32 const mad_time_period = 20000; // 20 seconds protected: typedef xr_vector kill_times_t; kill_times_t m_kill_times; void clear_old_kills(); -}; // class player_state_mad +}; // class player_state_mad ADD_ACCUMULATIVE_STATE(acpv_mad, player_state_mad); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_mad, player_state_mad) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_MAD_INCLUDED +#endif //#ifndef PLAYER_STATE_MAD_INCLUDED diff --git a/src/xrGame/player_state_marksman.cpp b/src/xrGame/player_state_marksman.cpp index 37b19b383b2..b4c0ad07dd0 100644 --- a/src/xrGame/player_state_marksman.cpp +++ b/src/xrGame/player_state_marksman.cpp @@ -62,4 +62,4 @@ void player_state_marksman::OnPlayerSpawned(game_PlayerState const* ps) } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_marksman.h b/src/xrGame/player_state_marksman.h index 1aa66c4e27c..6c5be526fed 100644 --- a/src/xrGame/player_state_marksman.h +++ b/src/xrGame/player_state_marksman.h @@ -28,12 +28,12 @@ class player_state_marksman : public player_state_param // data of the vector is float - kill distance - used only for debug. AssociativeVector m_sniper_victims; u32 m_spawn_time; -}; // class player_state_marksman +}; // class player_state_marksman ADD_ACCUMULATIVE_STATE(acpv_marksman_count, player_state_marksman); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_marksman_count, player_state_marksman) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_MARKSMAN \ No newline at end of file +#endif //#ifndef PLAYER_STATE_MARKSMAN \ No newline at end of file diff --git a/src/xrGame/player_state_multichampion.cpp b/src/xrGame/player_state_multichampion.cpp index 65b241a01a0..8418679af13 100644 --- a/src/xrGame/player_state_multichampion.cpp +++ b/src/xrGame/player_state_multichampion.cpp @@ -76,4 +76,4 @@ u32 const player_multichampion::get_u32_param() return 0; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_multichampion.h b/src/xrGame/player_state_multichampion.h index 3f9f16ca316..ef8088cb571 100644 --- a/src/xrGame/player_state_multichampion.h +++ b/src/xrGame/player_state_multichampion.h @@ -23,12 +23,12 @@ class player_multichampion : public player_state_param protected: bool m_can_be_multichampion; -}; // class player_multichampion +}; // class player_multichampion ADD_ACCUMULATIVE_STATE(acpv_multi_champion, player_multichampion); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_multi_champion, player_multichampion) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_MULTICHAMPION_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_MULTICHAMPION_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_opener.cpp b/src/xrGame/player_state_opener.cpp index 61052bc5370..3e89ee8e2fc 100644 --- a/src/xrGame/player_state_opener.cpp +++ b/src/xrGame/player_state_opener.cpp @@ -41,4 +41,4 @@ void player_state_opener::OnPlayerKilled( } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_opener.h b/src/xrGame/player_state_opener.h index faf41dab035..426291f8de2 100644 --- a/src/xrGame/player_state_opener.h +++ b/src/xrGame/player_state_opener.h @@ -24,12 +24,12 @@ class player_state_opener : public player_state_param protected: bool m_opener_ready; -}; // class player_state_opener +}; // class player_state_opener ADD_ACCUMULATIVE_STATE(acpv_opener_ready, player_state_opener); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_opener_ready, player_state_opener) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_OPENER_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_OPENER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_param.h b/src/xrGame/player_state_param.h index 1f6aa0b6e2e..eba0b7b60e3 100644 --- a/src/xrGame/player_state_param.h +++ b/src/xrGame/player_state_param.h @@ -36,8 +36,8 @@ class player_state_param : public game_events_handler protected: game_state_accumulator* m_owner; -}; // class player_state_param +}; // class player_state_param -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_PARAM_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_PARAM_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_params.cpp b/src/xrGame/player_state_params.cpp index 79e47b525eb..bb9504143c9 100644 --- a/src/xrGame/player_state_params.cpp +++ b/src/xrGame/player_state_params.cpp @@ -123,4 +123,4 @@ float const player_state_ang_velocity::get_float_param() return state.fAVelocity; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_params.h b/src/xrGame/player_state_params.h index 45ab64a2717..5e37b345621 100644 --- a/src/xrGame/player_state_params.h +++ b/src/xrGame/player_state_params.h @@ -18,7 +18,7 @@ class player_death_counter : public player_state_param virtual u32 const get_u32_param(); virtual float const get_float_param() { return -1.0f; }; virtual void reset_game(){}; -}; // class player_death_counter +}; // class player_death_counter ADD_ACCUMULATIVE_STATE(acpv_death_count, player_death_counter); #undef ACCUMULATIVE_STATE_LIST @@ -36,7 +36,7 @@ class player_artdeliver_counter : public player_state_param virtual u32 const get_u32_param(); virtual float const get_float_param() { return 0.0f; }; virtual void reset_game(){}; -}; // class player_artdeliver_counter +}; // class player_artdeliver_counter ADD_ACCUMULATIVE_STATE(acpv_artdeliver_count, player_artdeliver_counter); #undef ACCUMULATIVE_STATE_LIST @@ -61,7 +61,7 @@ class player_rawkill_counter : public player_state_param protected: u32 m_raw_kills; -}; // class player_rawkill_counter +}; // class player_rawkill_counter ADD_ACCUMULATIVE_STATE(acpv_kill_in_raw, player_rawkill_counter); #undef ACCUMULATIVE_STATE_LIST @@ -79,7 +79,7 @@ class player_state_move : public player_state_param virtual u32 const get_u32_param(); virtual float const get_float_param() { return 0.0f; }; virtual void reset_game(){}; -}; // class player_state_move +}; // class player_state_move ADD_ACCUMULATIVE_STATE(acpv_move_state, player_state_move); #undef ACCUMULATIVE_STATE_LIST @@ -97,7 +97,7 @@ class player_state_velocity : public player_state_param virtual u32 const get_u32_param() { return 0; } virtual float const get_float_param(); virtual void reset_game(){}; -}; // class player_state_velocity +}; // class player_state_velocity ADD_ACCUMULATIVE_STATE(acpv_move_velocity, player_state_velocity); #undef ACCUMULATIVE_STATE_LIST @@ -115,12 +115,12 @@ class player_state_ang_velocity : public player_state_param virtual u32 const get_u32_param() { return 0; } virtual float const get_float_param(); virtual void reset_game(){}; -}; // class player_state_ang_velocity +}; // class player_state_ang_velocity ADD_ACCUMULATIVE_STATE(acpv_move_ang_velocity, player_state_ang_velocity); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_move_ang_velocity, player_state_ang_velocity) -} // namespace award_system +} // namespace award_system -#endif //#ifndef DEATH_COUNT_INCLUDED \ No newline at end of file +#endif //#ifndef DEATH_COUNT_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_state_remembrance.cpp b/src/xrGame/player_state_remembrance.cpp index b32b6e4a8cf..bb5985b38e5 100644 --- a/src/xrGame/player_state_remembrance.cpp +++ b/src/xrGame/player_state_remembrance.cpp @@ -52,4 +52,4 @@ void player_state_remembrance::OnPlayerKilled( } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_remembrance.h b/src/xrGame/player_state_remembrance.h index 743289d013d..56251eff8b4 100644 --- a/src/xrGame/player_state_remembrance.h +++ b/src/xrGame/player_state_remembrance.h @@ -25,12 +25,12 @@ class player_state_remembrance : public player_state_param protected: static int const max_kill_dist = 5; bool m_is_remembrance; -}; // class player_state_remembrance +}; // class player_state_remembrance ADD_ACCUMULATIVE_STATE(acpv_remembrance, player_state_remembrance); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_remembrance, player_state_remembrance) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_REMEMBRANCE \ No newline at end of file +#endif //#ifndef PLAYER_STATE_REMEMBRANCE \ No newline at end of file diff --git a/src/xrGame/player_state_skewer.cpp b/src/xrGame/player_state_skewer.cpp index 083fb60f038..2d643dd5db9 100644 --- a/src/xrGame/player_state_skewer.cpp +++ b/src/xrGame/player_state_skewer.cpp @@ -52,4 +52,4 @@ void player_state_skewer::OnPlayerKilled( } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_state_skewer.h b/src/xrGame/player_state_skewer.h index 1cd7d33ade7..ca00d6d9e8a 100644 --- a/src/xrGame/player_state_skewer.h +++ b/src/xrGame/player_state_skewer.h @@ -26,12 +26,12 @@ class player_state_skewer : public player_state_param protected: u32 m_shot; u32 m_kills_count; -}; // class player_state_skewer +}; // class player_state_skewer ADD_ACCUMULATIVE_STATE(acpv_skewer_count, player_state_skewer); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_skewer_count, player_state_skewer) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_SKEWER_INCLUDED +#endif //#ifndef PLAYER_STATE_SKEWER_INCLUDED diff --git a/src/xrGame/player_state_toughy.h b/src/xrGame/player_state_toughy.h index bad8724a1cb..107eb37559a 100644 --- a/src/xrGame/player_state_toughy.h +++ b/src/xrGame/player_state_toughy.h @@ -25,12 +25,12 @@ class player_state_toughy : public player_state_param protected: u32 m_kills_count; -}; // class player_state_toughy +}; // class player_state_toughy ADD_ACCUMULATIVE_STATE(acpv_toughy, player_state_toughy); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_toughy, player_state_toughy) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_TOUGHY_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_TOUGHY_INCLUDED \ No newline at end of file diff --git a/src/xrGame/player_team_win_score.cpp b/src/xrGame/player_team_win_score.cpp index d5498b75562..00b28d09ec0 100644 --- a/src/xrGame/player_team_win_score.cpp +++ b/src/xrGame/player_team_win_score.cpp @@ -65,7 +65,7 @@ void player_team_win_score::save_round_scores() } } break; - }; // switch (Game().Type()) + }; // switch (Game().Type()) if (static_cast(m_player_team) == etGreenTeam) { m_win_score = (m_green_team_score > m_blue_team_score) ? m_green_team_score : 0; } @@ -134,4 +134,4 @@ void player_runtime_enemy_team_score::OnPlayerBringArtefact(game_PlayerState con save_round_scores(); } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/player_team_win_score.h b/src/xrGame/player_team_win_score.h index 13bf11f6343..9b186c76d8e 100644 --- a/src/xrGame/player_team_win_score.h +++ b/src/xrGame/player_team_win_score.h @@ -29,7 +29,7 @@ class player_team_win_score : public player_state_param s32 m_green_team_score; s32 m_blue_team_score; u8 m_player_team; -}; // class player_team_win_score +}; // class player_team_win_score ADD_ACCUMULATIVE_STATE(acpv_my_team_win_score, player_team_win_score); #undef ACCUMULATIVE_STATE_LIST @@ -53,7 +53,7 @@ class player_enemy_team_score : public player_team_win_score void save_round_scores(); u32 m_enemy_team_score; -}; // class player_enemy_team_score +}; // class player_enemy_team_score ADD_ACCUMULATIVE_STATE(acpv_enemy_team_score, player_enemy_team_score); #undef ACCUMULATIVE_STATE_LIST @@ -69,7 +69,7 @@ class player_runtime_win_score : public player_team_win_score virtual u32 const get_u32_param(); virtual void OnPlayerBringArtefact(game_PlayerState const* ps); -}; // class player_runtime_win_score +}; // class player_runtime_win_score ADD_ACCUMULATIVE_STATE(acpv_my_team_win_score_now, player_runtime_win_score); #undef ACCUMULATIVE_STATE_LIST @@ -84,12 +84,12 @@ class player_runtime_enemy_team_score : public player_enemy_team_score virtual ~player_runtime_enemy_team_score(){}; virtual void OnPlayerBringArtefact(game_PlayerState const* ps); -}; // class player_runtime_enemy_team_score +}; // class player_runtime_enemy_team_score ADD_ACCUMULATIVE_STATE(acpv_enemy_team_score_now, player_runtime_enemy_team_score); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_enemy_team_score_now, player_runtime_enemy_team_score) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_TEAM_WIN_SCORE_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_TEAM_WIN_SCORE_INCLUDED \ No newline at end of file diff --git a/src/xrGame/pose_extrapolation.cpp b/src/xrGame/pose_extrapolation.cpp index 77d543e49ef..e262f6c94e0 100644 --- a/src/xrGame/pose_extrapolation.cpp +++ b/src/xrGame/pose_extrapolation.cpp @@ -22,12 +22,12 @@ static void spline_coefs_linar(const point& p0, const point& p1, pose& a0, pose& { a1 = p0.pose(); if (p1.time() - p0.time() > EPS_S) - a1.invert().add(p1.pose()).mul(1.f / (p1.time() - p0.time())); // ( y0^(-1) * y1 ) * ( t1 - t0 ) + a1.invert().add(p1.pose()).mul(1.f / (p1.time() - p0.time())); // ( y0^(-1) * y1 ) * ( t1 - t0 ) else a1.identity(); a0 = a1; - a0.mul(p1.time()).invert().add(p0.pose()); // (a1*t1)^1 * y0 + a0.mul(p1.time()).invert().add(p0.pose()); // (a1*t1)^1 * y0 } static void spline_linear(const point& p0, const point& p1, float t, pose& p) diff --git a/src/xrGame/pp_effector_custom.cpp b/src/xrGame/pp_effector_custom.cpp index d0e5d83ffdc..b2784c50560 100644 --- a/src/xrGame/pp_effector_custom.cpp +++ b/src/xrGame/pp_effector_custom.cpp @@ -6,7 +6,7 @@ #define TRANSLATE_TYPE(val) EEffectorPPType(val ? u32(u64(typeid(this).name())) : u32(u64(this) & u32(-1))) #pragma warning(push) -#pragma warning(disable : 4355) // 'this' : used in base member initializer list +#pragma warning(disable : 4355) // 'this' : used in base member initializer list CPPEffectorCustom::CPPEffectorCustom(const SPPInfo& ppi, bool one_instance, bool destroy_from_engine) : inherited(TRANSLATE_TYPE(one_instance), flt_max, destroy_from_engine) diff --git a/src/xrGame/pp_effector_distance.h b/src/xrGame/pp_effector_distance.h index e4b638d9aa6..3ac34f62d46 100644 --- a/src/xrGame/pp_effector_distance.h +++ b/src/xrGame/pp_effector_distance.h @@ -8,8 +8,8 @@ class CPPEffectorDistance : public CPPEffectorController { typedef CPPEffectorController inherited; - float m_r_min_perc; // min_radius (percents [0..1]) - float m_r_max_perc; // max_radius (percents [0..1]) + float m_r_min_perc; // min_radius (percents [0..1]) + float m_r_max_perc; // max_radius (percents [0..1]) float m_radius; float m_dist; diff --git a/src/xrGame/profile_data_types.cpp b/src/xrGame/profile_data_types.cpp index 371d9ddb64f..da6ff57c19c 100644 --- a/src/xrGame/profile_data_types.cpp +++ b/src/xrGame/profile_data_types.cpp @@ -24,71 +24,71 @@ static char const* awards_names[at_awards_count] = { }; static u16 award_atlas_keys_map[at_awards_count][ap_award_params_count] = { - {KEY_AwardMasscare, KEY_AwardMasscareLastRewardDate}, // mp_award_massacre - {KEY_AwardParanoia, KEY_AwardParanoiaLastRewardDate}, // mp_award_paranoia + {KEY_AwardMasscare, KEY_AwardMasscareLastRewardDate}, // mp_award_massacre + {KEY_AwardParanoia, KEY_AwardParanoiaLastRewardDate}, // mp_award_paranoia {KEY_AwardOverwhelmingSuperiority, - KEY_AwardOverwhelmingSuperiorityLastRewardDate}, // mp_award_overwhelming_superiority - {KEY_AwardBlitzkrieg, KEY_AwardBlitzkriegLastRewardDate}, // mp_award_blitzkrieg - {KEY_AwardDryVictory, KEY_AwardDryVictoryLastRewardDate}, // mp_award_dry_victory - {KEY_AwardMultichampion, KEY_AwardMultichampionLastRewardDate}, // mp_award_multichampion - {KEY_AwardMad, KEY_AwardMadLastRewardDate}, // mp_award_mad - {KEY_AwardAchillesHeel, KEY_AwardAchillesHeelLastRewardDate}, // mp_award_achilles_heel - {KEY_AwardFasterThanBullets, KEY_AwardFasterThanBulletsLastRewardDate}, // mp_award_fater_than_bullets - {KEY_AwardHarvestTime, KEY_AwardHarvestTimeLastRewardDate}, // mp_award_harvest_time - {KEY_AwardSkewer, KEY_AwardSkewerLastRewardDate}, // mp_award_skewer - {KEY_AwardDoubleShotDoubleKill, KEY_AwardDoubleShotDoubleKillLastRewardDate}, // mp_award_double_shot_double_kill - {KEY_AwardClimber, KEY_AwardClimberLastRewardDate}, // mp_award_climber - {KEY_AwardOpener, KEY_AwardOpenerLastRewardDate}, // mp_award_opener - {KEY_AwardToughy, KEY_AwardToughyLastRewardDate}, // mp_award_toughy - {KEY_AwardInvincibleFury, KEY_AwardInvincibleFuryLastRewardDate}, // mp_award_invincible_fury - {KEY_AwardOculist, KEY_AwardOculistLastRewardDate}, // mp_award_oculist - {KEY_AwardLightingReflexes, KEY_AwardLightingReflexesLastRewardDate}, // mp_award_lightning_reflexes - {KEY_AwardSprinterStopper, KEY_AwardSprinterStopperLastRewardDate}, // mp_award_sprinter_stopper - {KEY_AwardMarksMan, KEY_AwardMarksManLastRewardDate}, // mp_award_marksman - {KEY_AwardPeaceAmbassador, KEY_AwardPeaceAmbassadorLastRewardDate}, // mp_award_peace_ambassador - {KEY_AwardDeadlyAccuracy, KEY_AwardDeadlyAccuracyLastRewardDate}, // mp_award_deadly_accuracy - {KEY_AwardRemembrance, KEY_AwardRemembranceLastRewardDate}, // mp_award_remembrance - {KEY_AwardAvenger, KEY_AwardAvengerLastRewardDate}, // mp_award_avenger - {KEY_AwardCherub, KEY_AwardCherubLastRewardDate}, // mp_award_cherub - {KEY_AwardDignity, KEY_AwardDignityLastRewardDate}, // mp_award_dignity - {KEY_AwardStalkerFlair, KEY_AwardStalkerFlairLastRewardDate}, // mp_award_stalker_flair - {KEY_AwardLucky, KEY_AwardLuckyLastRewardDate}, // mp_award_lucky - {KEY_AwardBlackList, KEY_AwardBlackListLastRewardDate}, // mp_award_black_list - {KEY_AwardSilentDeath, KEY_AwardSilentDeathLastRewardDate}, // mp_award_silent_death + KEY_AwardOverwhelmingSuperiorityLastRewardDate}, // mp_award_overwhelming_superiority + {KEY_AwardBlitzkrieg, KEY_AwardBlitzkriegLastRewardDate}, // mp_award_blitzkrieg + {KEY_AwardDryVictory, KEY_AwardDryVictoryLastRewardDate}, // mp_award_dry_victory + {KEY_AwardMultichampion, KEY_AwardMultichampionLastRewardDate}, // mp_award_multichampion + {KEY_AwardMad, KEY_AwardMadLastRewardDate}, // mp_award_mad + {KEY_AwardAchillesHeel, KEY_AwardAchillesHeelLastRewardDate}, // mp_award_achilles_heel + {KEY_AwardFasterThanBullets, KEY_AwardFasterThanBulletsLastRewardDate}, // mp_award_fater_than_bullets + {KEY_AwardHarvestTime, KEY_AwardHarvestTimeLastRewardDate}, // mp_award_harvest_time + {KEY_AwardSkewer, KEY_AwardSkewerLastRewardDate}, // mp_award_skewer + {KEY_AwardDoubleShotDoubleKill, KEY_AwardDoubleShotDoubleKillLastRewardDate}, // mp_award_double_shot_double_kill + {KEY_AwardClimber, KEY_AwardClimberLastRewardDate}, // mp_award_climber + {KEY_AwardOpener, KEY_AwardOpenerLastRewardDate}, // mp_award_opener + {KEY_AwardToughy, KEY_AwardToughyLastRewardDate}, // mp_award_toughy + {KEY_AwardInvincibleFury, KEY_AwardInvincibleFuryLastRewardDate}, // mp_award_invincible_fury + {KEY_AwardOculist, KEY_AwardOculistLastRewardDate}, // mp_award_oculist + {KEY_AwardLightingReflexes, KEY_AwardLightingReflexesLastRewardDate}, // mp_award_lightning_reflexes + {KEY_AwardSprinterStopper, KEY_AwardSprinterStopperLastRewardDate}, // mp_award_sprinter_stopper + {KEY_AwardMarksMan, KEY_AwardMarksManLastRewardDate}, // mp_award_marksman + {KEY_AwardPeaceAmbassador, KEY_AwardPeaceAmbassadorLastRewardDate}, // mp_award_peace_ambassador + {KEY_AwardDeadlyAccuracy, KEY_AwardDeadlyAccuracyLastRewardDate}, // mp_award_deadly_accuracy + {KEY_AwardRemembrance, KEY_AwardRemembranceLastRewardDate}, // mp_award_remembrance + {KEY_AwardAvenger, KEY_AwardAvengerLastRewardDate}, // mp_award_avenger + {KEY_AwardCherub, KEY_AwardCherubLastRewardDate}, // mp_award_cherub + {KEY_AwardDignity, KEY_AwardDignityLastRewardDate}, // mp_award_dignity + {KEY_AwardStalkerFlair, KEY_AwardStalkerFlairLastRewardDate}, // mp_award_stalker_flair + {KEY_AwardLucky, KEY_AwardLuckyLastRewardDate}, // mp_award_lucky + {KEY_AwardBlackList, KEY_AwardBlackListLastRewardDate}, // mp_award_black_list + {KEY_AwardSilentDeath, KEY_AwardSilentDeathLastRewardDate}, // mp_award_silent_death }; static u16 award_atlas_stats_map[at_awards_count][ap_award_params_count] = { - {STAT_AwardMasscare, STAT_AwardMasscareLastRewardDate}, // mp_award_massacre - {STAT_AwardParanoia, STAT_AwardParanoiaLastRewardDate}, // mp_award_paranoia + {STAT_AwardMasscare, STAT_AwardMasscareLastRewardDate}, // mp_award_massacre + {STAT_AwardParanoia, STAT_AwardParanoiaLastRewardDate}, // mp_award_paranoia {STAT_AwardOwerwhelmingSuperiority, - STAT_AwardOwerwhelmingSuperiorityLastRewardDate}, // mp_award_overwhelming_superiority - {STAT_AwardBlitzkrieg, STAT_AwardBlitzkriegLastRewardDate}, // mp_award_blitzkrieg - {STAT_AwardDryVictory, STAT_AwardDryVictoryLastRewardDate}, // mp_award_dry_victory - {STAT_AwardMultichampion, STAT_AwardMultichampionLastRewardDate}, // mp_award_multichampion - {STAT_AwardMad, STAT_AwardMadLastRewardDate}, // mp_award_mad - {STAT_AwardAchillesHeel, STAT_AwardAchillesHeelLastRewardDate}, // mp_award_achilles_heel - {STAT_AwardFasterThanBullets, STAT_AwardFasterThanBulletsLastRewardDate}, // mp_award_fater_than_bullets - {STAT_AwardHarvestTime, STAT_AwardHarvestTimeLastRewardDate}, // mp_award_harvest_time - {STAT_AwardSkewer, STAT_AwardSkewerLastRewardDate}, // mp_award_skewer - {STAT_AwardDoubleShotDoubleKill, STAT_AwardDoubleShotDoubleKillLastRewardDate}, // mp_award_double_shot_double_kill - {STAT_AwardClimber, STAT_AwardClimberLastRewardDate}, // mp_award_climber - {STAT_AwardOpener, STAT_AwardOpenerLastRewardDate}, // mp_award_opener - {STAT_AwardToughy, STAT_AwardToughyLastRewardDate}, // mp_award_toughy - {STAT_AwardInvincibleFury, STAT_AwardInvincibleFuryLastRewardDate}, // mp_award_invincible_fury - {STAT_AwardOculist, STAT_AwardOculistLastRewardDate}, // mp_award_oculist - {STAT_AwardLightingReflexes, STAT_AwardLightingReflexesLastRewardDate}, // mp_award_lightning_reflexes - {STAT_AwardSprinterStopper, STAT_AwardSprinterStopperLastRewardDate}, // mp_award_sprinter_stopper - {STAT_AwardMarksman, STAT_AwardMarksmanLastRewardDate}, // mp_award_marksman - {STAT_AwardPeaceAmbassador, STAT_AwardPeaceAmbassadorLastRewardDate}, // mp_award_peace_ambassador - {STAT_AwardDeadlyAccuracy, STAT_AwardDeadlyAccuracyLastRewardDate}, // mp_award_deadly_accuracy - {STAT_AwardRemembrance, STAT_AwardRemembranceLastRewardDate}, // mp_award_remembrance - {STAT_AwardAvenger, STAT_AwardAvengerLastRewardDate}, // mp_award_avenger - {STAT_AwardCherub, STAT_AwardCherubLastRewardDate}, // mp_award_cherub - {STAT_AwardDignity, STAT_AwardDignityLastRewardDate}, // mp_award_dignity - {STAT_AwardStalkerFlair, STAT_AwardStalkerFlairLastRewardDate}, // mp_award_stalker_flair - {STAT_AwardLucky, STAT_AwardLuckyLastRewardDate}, // mp_award_lucky - {STAT_AwardBlackList, STAT_AwardBlackListLastRewardDate}, // mp_award_black_list - {STAT_AwardSilentDeath, STAT_AwardSilentDeathLastRewardDate}, // mp_award_silent_death + STAT_AwardOwerwhelmingSuperiorityLastRewardDate}, // mp_award_overwhelming_superiority + {STAT_AwardBlitzkrieg, STAT_AwardBlitzkriegLastRewardDate}, // mp_award_blitzkrieg + {STAT_AwardDryVictory, STAT_AwardDryVictoryLastRewardDate}, // mp_award_dry_victory + {STAT_AwardMultichampion, STAT_AwardMultichampionLastRewardDate}, // mp_award_multichampion + {STAT_AwardMad, STAT_AwardMadLastRewardDate}, // mp_award_mad + {STAT_AwardAchillesHeel, STAT_AwardAchillesHeelLastRewardDate}, // mp_award_achilles_heel + {STAT_AwardFasterThanBullets, STAT_AwardFasterThanBulletsLastRewardDate}, // mp_award_fater_than_bullets + {STAT_AwardHarvestTime, STAT_AwardHarvestTimeLastRewardDate}, // mp_award_harvest_time + {STAT_AwardSkewer, STAT_AwardSkewerLastRewardDate}, // mp_award_skewer + {STAT_AwardDoubleShotDoubleKill, STAT_AwardDoubleShotDoubleKillLastRewardDate}, // mp_award_double_shot_double_kill + {STAT_AwardClimber, STAT_AwardClimberLastRewardDate}, // mp_award_climber + {STAT_AwardOpener, STAT_AwardOpenerLastRewardDate}, // mp_award_opener + {STAT_AwardToughy, STAT_AwardToughyLastRewardDate}, // mp_award_toughy + {STAT_AwardInvincibleFury, STAT_AwardInvincibleFuryLastRewardDate}, // mp_award_invincible_fury + {STAT_AwardOculist, STAT_AwardOculistLastRewardDate}, // mp_award_oculist + {STAT_AwardLightingReflexes, STAT_AwardLightingReflexesLastRewardDate}, // mp_award_lightning_reflexes + {STAT_AwardSprinterStopper, STAT_AwardSprinterStopperLastRewardDate}, // mp_award_sprinter_stopper + {STAT_AwardMarksman, STAT_AwardMarksmanLastRewardDate}, // mp_award_marksman + {STAT_AwardPeaceAmbassador, STAT_AwardPeaceAmbassadorLastRewardDate}, // mp_award_peace_ambassador + {STAT_AwardDeadlyAccuracy, STAT_AwardDeadlyAccuracyLastRewardDate}, // mp_award_deadly_accuracy + {STAT_AwardRemembrance, STAT_AwardRemembranceLastRewardDate}, // mp_award_remembrance + {STAT_AwardAvenger, STAT_AwardAvengerLastRewardDate}, // mp_award_avenger + {STAT_AwardCherub, STAT_AwardCherubLastRewardDate}, // mp_award_cherub + {STAT_AwardDignity, STAT_AwardDignityLastRewardDate}, // mp_award_dignity + {STAT_AwardStalkerFlair, STAT_AwardStalkerFlairLastRewardDate}, // mp_award_stalker_flair + {STAT_AwardLucky, STAT_AwardLuckyLastRewardDate}, // mp_award_lucky + {STAT_AwardBlackList, STAT_AwardBlackListLastRewardDate}, // mp_award_black_list + {STAT_AwardSilentDeath, STAT_AwardSilentDeathLastRewardDate}, // mp_award_silent_death }; char const* get_award_name(enum_awards_t award) @@ -136,17 +136,17 @@ u16 get_award_reward_date_stat(enum_awards_t award) static char const* best_score_names[bst_score_types_count] = {"mp_bst_kills_in_row", "mp_bst_kinife_kills_in_row", "mp_bst_backstabs_in_row", "mp_bst_head_shots_in_row", "mp_bst_eye_kills_in_row", "mp_bst_bleed_kills_in_row", - "mp_bst_explosive_kills_in_row"}; // static char const * best_score_names[bst_score_types_count] + "mp_bst_explosive_kills_in_row"}; // static char const * best_score_names[bst_score_types_count] static u16 best_scores_atlas_keys_map[bst_score_types_count] = {KEY_BestScore_KillsInRow, KEY_BestScore_KnifeKillsInRow, KEY_BestScore_BackstabsKillsInRow, KEY_BestScore_HeadshotsKillsInRow, KEY_BestScore_EyeKillsInRow, KEY_BestScore_BleedKillsInRow, - KEY_BestScore_ExplosiveKillsInRow}; // static u16 best_scores_atlas_keys_map[bst_score_types_count] + KEY_BestScore_ExplosiveKillsInRow}; // static u16 best_scores_atlas_keys_map[bst_score_types_count] static u16 best_scores_atlas_stats_map[bst_score_types_count] = {STAT_BestScore_KillsInRow, STAT_BestScore_KnifeKillsInRow, STAT_BestScore_BackstabsKillsInRow, STAT_BestScore_HeadshotsKillsInRow, STAT_BestScore_EyeKillsInRow, STAT_BestScore_BleedKillsInRow, - STAT_BestScore_ExplosiveKillsInRow}; // static u16 best_scores_atlas_stats_map[bst_score_types_count] + STAT_BestScore_ExplosiveKillsInRow}; // static u16 best_scores_atlas_stats_map[bst_score_types_count] char const* get_best_score_name(enum_best_score_type bst) { @@ -177,4 +177,4 @@ enum_best_score_type get_best_score_type_by_sname(char const* stat_name) return static_cast(bst_score_types_count); } -} // namespace gamespy_profile +} // namespace gamespy_profile diff --git a/src/xrGame/profile_data_types.h b/src/xrGame/profile_data_types.h index 44e9f9b8d2a..86d2bd87606 100644 --- a/src/xrGame/profile_data_types.h +++ b/src/xrGame/profile_data_types.h @@ -41,14 +41,14 @@ enum enum_awards_t at_award_silent_death, // at_award_okulist = 0x00, at_awards_count -}; // enum enum_awards_t +}; // enum enum_awards_t enum enum_award_params { ap_award_id = 0x00, ap_award_rdate, ap_award_params_count -}; // enum enum_award_params +}; // enum enum_award_params struct award_data { @@ -78,7 +78,7 @@ enum enum_best_score_type bst_bleed_kills_in_row, bst_explosive_kills_in_row, bst_score_types_count -}; // enum enum_best_score_type +}; // enum enum_best_score_type char const* get_best_score_name(enum_best_score_type bst); u16 get_best_score_id_key(enum_best_score_type bst); @@ -99,8 +99,8 @@ extern char* profile_data_section; extern char* profile_id_line; extern char* profile_last_submit_time; -} // namespace gamespy_profile +} // namespace gamespy_profile typedef gamespy_profile::store_operation_cb gamespy_profile_store_operation_cb; -#endif //#ifndef PLAYER_AWARDS +#endif //#ifndef PLAYER_AWARDS diff --git a/src/xrGame/profile_store.cpp b/src/xrGame/profile_store.cpp index c6b0b04e173..21ab05d51c1 100644 --- a/src/xrGame/profile_store.cpp +++ b/src/xrGame/profile_store.cpp @@ -49,7 +49,7 @@ void profile_store::shedule_Update(u32 dt) #ifdef DEBUG Msg("--- GameSpy core (SAKE) thinking ..."); #endif - m_fullgs_obj->CoreThink(10); // 10 milliseconds on update + m_fullgs_obj->CoreThink(10); // 10 milliseconds on update } void profile_store::set_current_profile(int profileId, char const* loginTicket) @@ -243,7 +243,7 @@ void __stdcall profile_store::onlylog_completion(bool const result, char const* static u32 const actuality_update_time = 120; #else static u32 const actuality_update_time = 3600; -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG void profile_store::check_sake_actuality() { @@ -261,4 +261,4 @@ void profile_store::check_sake_actuality() } } -} // namespace gamespy_profile \ No newline at end of file +} // namespace gamespy_profile \ No newline at end of file diff --git a/src/xrGame/profile_store.h b/src/xrGame/profile_store.h index c24e5aab050..82427fb6ddb 100644 --- a/src/xrGame/profile_store.h +++ b/src/xrGame/profile_store.h @@ -78,9 +78,9 @@ class profile_store : public ScheduledBase, private Noncopyable static void __cdecl get_my_fields_cb( SAKE sake, SAKERequest request, SAKERequestResult result, void* inputData, void* outputData, void* userData); -}; // class profile_store -} // namespace gamespy_profile +}; // class profile_store +} // namespace gamespy_profile typedef gamespy_profile::profile_store gamespy_profile_profile_store; -#endif //#ifndef GAMESPY_PROFILE_STORE +#endif //#ifndef GAMESPY_PROFILE_STORE diff --git a/src/xrGame/queued_async_method.h b/src/xrGame/queued_async_method.h index 63f449bd554..8f9365ff793 100644 --- a/src/xrGame/queued_async_method.h +++ b/src/xrGame/queued_async_method.h @@ -72,7 +72,7 @@ class queued_async_method DelegateType current_delegate; DelegateType pending_proxy_exec; -}; // class queued_async_method +}; // class queued_async_method struct parameters_tuple0 { @@ -81,7 +81,7 @@ struct parameters_tuple0 parameters_tuple0& operator=(parameters_tuple0 const& copy) { return *this; } bool operator==(parameters_tuple0 const& right) const { return true; } -}; // class parameters_tuple0 +}; // class parameters_tuple0 template struct parameters_tuple1 @@ -97,7 +97,7 @@ struct parameters_tuple1 bool operator==(parameters_tuple1 const& right) const { return m_t1 == right.m_t1; } T1 m_t1; -}; // class parameters_tuple1 +}; // class parameters_tuple1 template struct parameters_tuple2 @@ -116,7 +116,7 @@ struct parameters_tuple2 bool operator==(parameters_tuple2 const& right) const { return (m_t1 == right.m_t1) && (m_t2 == right.m_t2); } T1 m_t1; T2 m_t2; -}; // class parameters_tuple2 +}; // class parameters_tuple2 template struct parameters_tuple3 @@ -141,7 +141,7 @@ struct parameters_tuple3 T1 m_t1; T2 m_t2; T3 m_t3; -}; // class parameters_tuple3 +}; // class parameters_tuple3 template struct parameters_tuple4 @@ -169,6 +169,6 @@ struct parameters_tuple4 T2 m_t2; T3 m_t3; T4 m_t4; -}; // class parameters_tuple4 +}; // class parameters_tuple4 -#endif //#ifndef QUEUED_ASYNC_METHOD_FACADE_H_INCLUDED \ No newline at end of file +#endif //#ifndef QUEUED_ASYNC_METHOD_FACADE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/rat_state_base.h b/src/xrGame/rat_state_base.h index 1f6cb7c9b05..8932a752ff6 100644 --- a/src/xrGame/rat_state_base.h +++ b/src/xrGame/rat_state_base.h @@ -29,4 +29,4 @@ class rat_state_base : private Noncopyable #include "rat_state_base_inline.h" -#endif // RAT_STATE_BASE_H_INCLUDED \ No newline at end of file +#endif // RAT_STATE_BASE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/rat_state_base_inline.h b/src/xrGame/rat_state_base_inline.h index 30d6f89f944..d1b7fa7dbe9 100644 --- a/src/xrGame/rat_state_base_inline.h +++ b/src/xrGame/rat_state_base_inline.h @@ -19,4 +19,4 @@ IC CAI_Rat& rat_state_base::object() const return (*m_object); } -#endif // RAT_STATE_BASE_INLINE_H_INCLUDED \ No newline at end of file +#endif // RAT_STATE_BASE_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/rat_state_manager.h b/src/xrGame/rat_state_manager.h index 5600f8bd556..b745c45d631 100644 --- a/src/xrGame/rat_state_manager.h +++ b/src/xrGame/rat_state_manager.h @@ -44,4 +44,4 @@ class rat_state_manager : private Noncopyable #include "rat_state_manager_inline.h" -#endif // RAT_STATE_MANAGER_H_INCLUDED \ No newline at end of file +#endif // RAT_STATE_MANAGER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/rat_state_manager_inline.h b/src/xrGame/rat_state_manager_inline.h index 4ede719442a..c005ea0ff07 100644 --- a/src/xrGame/rat_state_manager_inline.h +++ b/src/xrGame/rat_state_manager_inline.h @@ -15,4 +15,4 @@ IC void rat_state_manager::change_state(state_id_type const& state_id) push_state(state_id); } -#endif // RAT_STATE_MANAGER_INLINE_H_INCLUDED \ No newline at end of file +#endif // RAT_STATE_MANAGER_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/rat_states.h b/src/xrGame/rat_states.h index 4fe5eac45c6..393d9ef335a 100644 --- a/src/xrGame/rat_states.h +++ b/src/xrGame/rat_states.h @@ -96,4 +96,4 @@ struct rat_state_no_way : public rat_state_base virtual void finalize(); }; -#endif // RAT_STATES_H_INCLUDED \ No newline at end of file +#endif // RAT_STATES_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/relation_registry.h b/src/xrGame/relation_registry.h index e8e7b2dd9cb..aa416b5cd58 100644 --- a/src/xrGame/relation_registry.h +++ b/src/xrGame/relation_registry.h @@ -72,11 +72,11 @@ struct RELATION_REGISTRY //к группировке enum ERelationAction { - KILL = 0x00, //убийство персонажа - ATTACK = 0x01, //атака персонажа - FIGHT_HELP_HUMAN = 0x02, //помощь в драке персонажу с другим персонажем - FIGHT_HELP_MONSTER = 0x04, //помощь в драке персонажу c монстром - SOS_HELP = 0x08 //приход на помощь по сигналу SOS + KILL = 0x00, //убийство персонажа + ATTACK = 0x01, //атака персонажа + FIGHT_HELP_HUMAN = 0x02, //помощь в драке персонажу с другим персонажем + FIGHT_HELP_MONSTER = 0x04, //помощь в драке персонажу c монстром + SOS_HELP = 0x08 //приход на помощь по сигналу SOS }; void Action(CEntityAlive* from, CEntityAlive* to, ERelationAction action); @@ -90,8 +90,8 @@ struct RELATION_REGISTRY u32 time; u32 time_old; - u32 attack_time; //время фиксирования события "атака" - ALife::ERelationType defender_to_attacker; //как относился атакованый к нападавшему во время начальной атаки + u32 attack_time; //время фиксирования события "атака" + ALife::ERelationType defender_to_attacker; //как относился атакованый к нападавшему во время начальной атаки }; struct RELATION_MAP_SPOTS diff --git a/src/xrGame/relation_registry_actions.cpp b/src/xrGame/relation_registry_actions.cpp index 8f92789ab75..bc6ac6c6223 100644 --- a/src/xrGame/relation_registry_actions.cpp +++ b/src/xrGame/relation_registry_actions.cpp @@ -320,7 +320,7 @@ void RELATION_REGISTRY::Action(CEntityAlive* from, CEntityAlive* to, ERelationAc } //* ChangeCommunityGoodwill(stalker->Community(), from->ID(), (CHARACTER_GOODWILL)( - //stalker->Sympathy() * (float)delta_goodwill )); + // stalker->Sympathy() * (float)delta_goodwill )); CHARACTER_GOODWILL community_goodwill = (CHARACTER_GOODWILL)(stalker->Sympathy() * (float)(community_member_fight_help_goodwill)); if (community_goodwill) { diff --git a/src/xrGame/restricted_object_inline.h b/src/xrGame/restricted_object_inline.h index 2922b299300..343b97f79ec 100644 --- a/src/xrGame/restricted_object_inline.h +++ b/src/xrGame/restricted_object_inline.h @@ -35,4 +35,4 @@ IC void CRestrictedObject::initialize() { if (m_applied) remove_border(); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/reward_event_generator.cpp b/src/xrGame/reward_event_generator.cpp index cca6f90f387..cd0831c6af7 100644 --- a/src/xrGame/reward_event_generator.cpp +++ b/src/xrGame/reward_event_generator.cpp @@ -209,4 +209,4 @@ void reward_event_generator::CommitBestResults() m_submit_queue->submit_best_results(); } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/reward_event_generator.h b/src/xrGame/reward_event_generator.h index 6192fc8cd49..658a04d87df 100644 --- a/src/xrGame/reward_event_generator.h +++ b/src/xrGame/reward_event_generator.h @@ -21,7 +21,7 @@ class reward_event_generator : public Noncopyable virtual ~reward_event_generator(); void init_player( - game_PlayerState* local_player); // must be called when buy menu and local_player will be initialized + game_PlayerState* local_player); // must be called when buy menu and local_player will be initialized void init_bone_groups(CActor* first_spawned_actor); void update(); @@ -54,8 +54,8 @@ class reward_event_generator : public Noncopyable u32 const m_max_rewards; u32 m_rewarded; void __stdcall AddRewardTask(u32 award_id); -}; // class reward_event_generator +}; // class reward_event_generator -} // namespace award_system +} // namespace award_system -#endif //#ifndef REWARD_EVENT_GENERATOR_INCLUDED \ No newline at end of file +#endif //#ifndef REWARD_EVENT_GENERATOR_INCLUDED \ No newline at end of file diff --git a/src/xrGame/reward_event_handler.h b/src/xrGame/reward_event_handler.h index 72884d1c5fe..11769f0e32d 100644 --- a/src/xrGame/reward_event_handler.h +++ b/src/xrGame/reward_event_handler.h @@ -30,8 +30,8 @@ class reward_event_handler protected: game_state_accumulator* m_player_state_accum; -}; // class reward_event_handler +}; // class reward_event_handler -} // namespace award_system +} // namespace award_system -#endif //#ifndef REWARD_EVENT_HANDLER \ No newline at end of file +#endif //#ifndef REWARD_EVENT_HANDLER \ No newline at end of file diff --git a/src/xrGame/reward_manager.cpp b/src/xrGame/reward_manager.cpp index 58840f51c7f..ebe3c639fdb 100644 --- a/src/xrGame/reward_manager.cpp +++ b/src/xrGame/reward_manager.cpp @@ -70,7 +70,7 @@ void reward_manager::load_reward_item(CInifile& reward_config, u32 const index, { return item.second->m_award_name == m_award_name; } - }; // struct award_name_searcher + }; // struct award_name_searcher #endif VERIFY2(m_rewards_map.find(index) == m_rewards_map.end(), make_string("reward with id=%d already loaded", index).c_str()); @@ -116,4 +116,4 @@ void reward_manager::process_reward(u32 const award_id) m_last_reward_time = Device.dwTimeGlobal; } -} // namespace award_system +} // namespace award_system diff --git a/src/xrGame/reward_manager.h b/src/xrGame/reward_manager.h index f018dd6f45f..2bb929e3ac8 100644 --- a/src/xrGame/reward_manager.h +++ b/src/xrGame/reward_manager.h @@ -26,7 +26,7 @@ class reward_manager u32 m_height; ref_sound m_play_sound; u32 m_process_time; - }; // struct reward_descriptor + }; // struct reward_descriptor typedef AssociativeVector rewards_map_t; typedef xr_deque reward_tasks_queue_t; @@ -40,8 +40,8 @@ class reward_manager void load_rewards(); void load_reward_item(CInifile& reward_config, u32 const index, shared_str const& section); void process_reward(u32 const award_id); -}; // class reward_manager +}; // class reward_manager -} // namespace award_system +} // namespace award_system -#endif //#ifndef REWARD_MANAGER_INCLUDED \ No newline at end of file +#endif //#ifndef REWARD_MANAGER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/reward_snd_messages.h b/src/xrGame/reward_snd_messages.h index 56afa46d71f..1c0efb45c98 100644 --- a/src/xrGame/reward_snd_messages.h +++ b/src/xrGame/reward_snd_messages.h @@ -8,4 +8,4 @@ enum ID_forcedword = u32(-1) }; -#endif //#ifndef REWARD_SND_MESSAGES_INCLUDED \ No newline at end of file +#endif //#ifndef REWARD_SND_MESSAGES_INCLUDED \ No newline at end of file diff --git a/src/xrGame/rewarding_events_handlers.cpp b/src/xrGame/rewarding_events_handlers.cpp index b701a7e3b52..da534dbcd08 100644 --- a/src/xrGame/rewarding_events_handlers.cpp +++ b/src/xrGame/rewarding_events_handlers.cpp @@ -183,4 +183,4 @@ void rewarding_event_handlers::init() { } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/rewarding_events_handlers.h b/src/xrGame/rewarding_events_handlers.h index 58c7c412442..6bfcd68390c 100644 --- a/src/xrGame/rewarding_events_handlers.h +++ b/src/xrGame/rewarding_events_handlers.h @@ -1,7 +1,7 @@ #ifndef REWARDING_EVENTS_HANDLERS_INCLUDED #define REWARDING_EVENTS_HANDLERS_INCLUDED -#include "event_conditions_collection.h" //for event_action_delegate_t +#include "event_conditions_collection.h" //for event_action_delegate_t #include "game_cl_base_weapon_usage_statistic.h" #include "game_events_handler.h" #include "xrCore/Containers/AssociativeVector.hpp" @@ -42,8 +42,8 @@ class rewarding_event_handlers : public game_events_handler event_action_delegate_t m_reward_action; game_state_accumulator* m_player_state_accum; reward_event_handler* m_null_hanlder; -}; // class rewarding_event_handlers +}; // class rewarding_event_handlers -} // namespace award_system +} // namespace award_system -#endif //#ifndef REWARDING_EVENTS_HANDLERS_INCLUDED \ No newline at end of file +#endif //#ifndef REWARDING_EVENTS_HANDLERS_INCLUDED \ No newline at end of file diff --git a/src/xrGame/rewarding_state_events.cpp b/src/xrGame/rewarding_state_events.cpp index 9f27fbfb850..104f1ac7156 100644 --- a/src/xrGame/rewarding_state_events.cpp +++ b/src/xrGame/rewarding_state_events.cpp @@ -123,7 +123,7 @@ void rewarding_state_events::init() float_bfunc_cf::get_function(float_bfunc_cf::tt_greater_equal), 6.0f), add_accumm_value_condition(acpv_killer_victim_angle, float_bfunc_cf::get_function(float_bfunc_cf::tt_less_equal), - _cos(PI_DIV_2 - 0.345f)) //~ 90 +- 20 degrees + _cos(PI_DIV_2 - 0.345f)) //~ 90 +- 20 degrees ), 1, eGameIDDeathmatch | eGameIDTeamDeathmatch | eGameIDArtefactHunt | eGameIDCaptureTheArtefact, gamespy_profile::at_award_sprinter_stopper); @@ -186,4 +186,4 @@ void rewarding_state_events::init() gamespy_profile::at_award_silent_death); } -} // namespace award_system +} // namespace award_system diff --git a/src/xrGame/rewarding_state_events.h b/src/xrGame/rewarding_state_events.h index 2e558ec7bb2..1e6bd5c68b4 100644 --- a/src/xrGame/rewarding_state_events.h +++ b/src/xrGame/rewarding_state_events.h @@ -13,8 +13,8 @@ class rewarding_state_events : public event_conditions_collection rewarding_state_events(game_state_accumulator* pstate_accum, event_action_delegate_t ea_delegate); virtual ~rewarding_state_events(); virtual void init(); -}; // class rewarding_state_events +}; // class rewarding_state_events -} // namespace award_system +} // namespace award_system -#endif //#ifndef REWARDING_EVENTS_INCLUDED \ No newline at end of file +#endif //#ifndef REWARDING_EVENTS_INCLUDED \ No newline at end of file diff --git a/src/xrGame/screenshot_manager.cpp b/src/xrGame/screenshot_manager.cpp index c6243be42ce..db8e33d3386 100644 --- a/src/xrGame/screenshot_manager.cpp +++ b/src/xrGame/screenshot_manager.cpp @@ -65,7 +65,7 @@ screenshot_manager::~screenshot_manager() xr_free(m_buffer_for_compress); if (m_make_start_event) { SetEvent(m_make_start_event); - WaitForSingleObject(m_make_done_event, INFINITE); // thread stoped + WaitForSingleObject(m_make_done_event, INFINITE); // thread stoped CloseHandle(m_make_done_event); CloseHandle(m_make_start_event); } @@ -92,10 +92,10 @@ void screenshot_manager::prepare_image() #pragma pack(pop) typedef rgb24color rgb24map[RESULT_HEIGHT][RESULT_WIDTH]; u32* sizes = reinterpret_cast(m_result_writer.pointer()); - u32* width = sizes; // first dword is width - u32* height = ++sizes; // second dword is height - u32* rgba = reinterpret_cast(++sizes); // then RGBA data - rgb24map* dest = reinterpret_cast(rgba); // WARNING sorce and dest stored in one place ... + u32* width = sizes; // first dword is width + u32* height = ++sizes; // second dword is height + u32* rgba = reinterpret_cast(++sizes); // then RGBA data + rgb24map* dest = reinterpret_cast(rgba); // WARNING sorce and dest stored in one place ... float dx = float(*width) / RESULT_WIDTH; float dy = float(*height) / RESULT_HEIGHT; @@ -125,8 +125,8 @@ void screenshot_manager::make_jpeg_file() CxImage jpg_image; jpg_image.CreateFromArray(rgb24data, - width, // width - height, // height + width, // width + height, // height 24, width * 3, true); jpg_image.SetJpegQuality(30); diff --git a/src/xrGame/screenshot_manager.h b/src/xrGame/screenshot_manager.h index e32fd64ccd0..18878ce43f6 100644 --- a/src/xrGame/screenshot_manager.h +++ b/src/xrGame/screenshot_manager.h @@ -43,7 +43,7 @@ class screenshot_manager : public ScheduledBase u32 m_jpeg_buffer_capacity; u32 m_defered_ssframe_counter; - static u32 const defer_framescount = 30; // count of frames to defer, must be > 1 + static u32 const defer_framescount = 30; // count of frames to defer, must be > 1 inline bool is_making_screenshot() const { return !!(m_state & making_screenshot); }; inline bool is_drawing_downloads() const { return !!(m_state & drawing_download_states); }; @@ -65,6 +65,6 @@ class screenshot_manager : public ScheduledBase inline void timer_begin(LPCSTR comment) {} inline void timer_end() {} #endif -}; // class screenshot_manager +}; // class screenshot_manager -#endif //#ifndef SCREENSHOT_MANAGER_FOR_MP \ No newline at end of file +#endif //#ifndef SCREENSHOT_MANAGER_FOR_MP \ No newline at end of file diff --git a/src/xrGame/screenshot_server.cpp b/src/xrGame/screenshot_server.cpp index 854cf7103d3..3a3c05f2466 100644 --- a/src/xrGame/screenshot_server.cpp +++ b/src/xrGame/screenshot_server.cpp @@ -41,10 +41,10 @@ void clientdata_proxy::make_screenshot(ClientID const& admin_id, ClientID const& NET_Packet ssr_packet; ssr_packet.w_begin(M_GAMEMESSAGE); ssr_packet.w_u32(GAME_EVENT_MAKE_DATA); - ssr_packet.w_u8(e_screenshot_request); // make screenshot + ssr_packet.w_u8(e_screenshot_request); // make screenshot // alligning size to GAME_EVENT_PLAYER_KILLED message size - ssr_packet.w_u16(u16(Random.randI(2))); // food for thought for crackers :) + ssr_packet.w_u16(u16(Random.randI(2))); // food for thought for crackers :) ssr_packet.w_u16(u16(Random.randI(2))); ssr_packet.w_u16(u16(Random.randI(2))); ssr_packet.w_u8(u8(Random.randI(2))); @@ -76,10 +76,10 @@ void clientdata_proxy::make_config_dump(ClientID const& admin_id, ClientID const NET_Packet ssr_packet; ssr_packet.w_begin(M_GAMEMESSAGE); ssr_packet.w_u32(GAME_EVENT_MAKE_DATA); - ssr_packet.w_u8(e_configs_request); // make screenshot + ssr_packet.w_u8(e_configs_request); // make screenshot // alligning size to GAME_EVENT_PLAYER_KILLED message size - ssr_packet.w_u16(u16(Random.randI(2))); // food for thought for crackers :) + ssr_packet.w_u16(u16(Random.randI(2))); // food for thought for crackers :) ssr_packet.w_u16(u16(Random.randI(2))); ssr_packet.w_u16(u16(Random.randI(2))); ssr_packet.w_u8(u8(Random.randI(2))); @@ -104,7 +104,7 @@ void clientdata_proxy::notify_admin(clientdata_event_t event_for_admin, char con NET_Packet ssr_packet; ssr_packet.w_begin(M_GAMEMESSAGE); ssr_packet.w_u32(GAME_EVENT_MAKE_DATA); - ssr_packet.w_u8(static_cast(event_for_admin)); // receive data + ssr_packet.w_u8(static_cast(event_for_admin)); // receive data ssr_packet.w_u32(m_chearer_id.value()); if ((event_for_admin == e_screenshot_response) || (event_for_admin == e_configs_response)) { @@ -152,7 +152,7 @@ void clientdata_proxy::save_proxy_config() clgame->generate_file_name(dest_file_name, fn_suffix, date_time); IWriter* tmp_writer = FS.w_open("$screenshots$", dest_file_name); if (!tmp_writer) return; - tmp_writer->w_u32(m_receiver->get_user_param()); // unpacked size + tmp_writer->w_u32(m_receiver->get_user_param()); // unpacked size tmp_writer->w(my_proxy_mem_file.pointer(), my_proxy_mem_file.size()); FS.w_close(tmp_writer); } diff --git a/src/xrGame/screenshot_server.h b/src/xrGame/screenshot_server.h index e9bb2e825f7..a709f8bfb93 100644 --- a/src/xrGame/screenshot_server.h +++ b/src/xrGame/screenshot_server.h @@ -16,13 +16,13 @@ enum clientdata_event_t class clientdata_proxy : Noncopyable { private: - ClientID m_admin_id; // for file transfer - ClientID m_chearer_id; // for file receiving + ClientID m_admin_id; // for file transfer + ClientID m_chearer_id; // for file receiving shared_str m_cheater_name; shared_str m_cheater_digest; CMemoryWriter my_proxy_mem_file; void save_proxy_screenshot(); - void save_proxy_config(); // compressed + void save_proxy_config(); // compressed bool m_first_receive; file_transfer::filereceiver_node* m_receiver; @@ -43,6 +43,6 @@ class clientdata_proxy : Noncopyable void __stdcall download_screenshot_callback(file_transfer::receiving_status_t status, u32 downloaded, u32 total); void __stdcall download_config_callback(file_transfer::receiving_status_t status, u32 downloaded, u32 total); void __stdcall upload_file_callback(file_transfer::sending_status_t status, u32 uploaded, u32 total); -}; // class clientdata_proxy +}; // class clientdata_proxy -#endif //#ifndef SCREENSHOT_SERVER \ No newline at end of file +#endif //#ifndef SCREENSHOT_SERVER \ No newline at end of file diff --git a/src/xrGame/screenshots_common.cpp b/src/xrGame/screenshots_common.cpp index fe834b4fd61..d43d7f1faf5 100644 --- a/src/xrGame/screenshots_common.cpp +++ b/src/xrGame/screenshots_common.cpp @@ -12,11 +12,11 @@ u8 const p_number[crypto::xr_dsa::public_key_length] = { 0xcd, 0x02, 0x37, 0xa0, 0xda, 0x6a, 0xfe, 0x02, 0x82, 0x54, 0x9b, 0x5d, 0xcd, 0x71, 0xbf, 0x69, 0xc8, 0x77, 0x4c, 0x7e, 0x5e, 0x4e, 0x7a, 0xff, 0x0f, 0x12, 0x62, 0xd5, 0xf5, 0xca, 0x0a, 0x76, 0x26, 0x6d, 0x16, 0x0b, 0x4f, 0x09, 0x3b, 0x41, 0x09, 0x80, 0xff, 0x65, 0x15, 0xce, 0x29, 0x0f, 0x04, 0x45, 0xb0, 0xb1, -}; // p_number +}; // p_number u8 const q_number[crypto::xr_dsa::private_key_length] = { 0xfb, 0xe4, 0x9a, 0x95, 0x31, 0x49, 0xcb, 0xda, 0xf1, 0x91, 0x36, 0x82, 0xa8, 0x80, 0xfd, 0xcb, 0x4e, 0x38, 0x85, 0x45, -}; // q_number +}; // q_number u8 const g_number[crypto::xr_dsa::public_key_length] = { 0xdc, 0x38, 0x96, 0xb4, 0x81, 0xf2, 0x2d, 0x60, 0x20, 0x7e, 0x9a, 0xe5, 0x74, 0x45, 0x7f, 0xa4, 0x9d, 0x71, 0xb8, 0x94, 0x0a, 0xc5, 0xfb, 0x50, 0x71, 0xd9, 0xae, 0xb4, 0x74, 0xeb, 0x09, 0x93, 0x41, 0xd3, 0x70, 0x00, 0x60, 0x4b, @@ -25,7 +25,7 @@ u8 const g_number[crypto::xr_dsa::public_key_length] = { 0x8f, 0xbc, 0xcc, 0x8b, 0xdd, 0x12, 0x21, 0x86, 0xa6, 0x4d, 0x90, 0x9a, 0xbd, 0xfe, 0x8a, 0x05, 0x39, 0xad, 0xb4, 0x45, 0xf6, 0xf9, 0x0f, 0xe5, 0x91, 0x5c, 0x2c, 0x19, 0xa0, 0xf1, 0x2e, 0x06, 0x02, 0x92, 0x68, 0xaa, 0xbc, 0x7c, 0xf4, 0x4c, 0x85, 0x8b, 0x8c, 0x0b, 0x09, 0x83, 0xe6, 0x15, 0x24, 0xe3, 0x10, 0xa9, -}; // g_number +}; // g_number u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x0a, 0x0b, 0xe5, 0x02, 0x1c, 0xc6, 0x6c, 0xeb, 0xbd, 0xa2, 0xe6, 0xcd, 0x6d, 0x96, 0x64, 0xa9, 0x19, 0xe7, 0x81, 0x94, 0x0c, 0xb2, 0x98, 0x5c, 0x7c, 0x3c, 0x68, 0xb6, 0xb6, 0x20, 0xa9, 0xab, 0x0f, 0xc0, 0xb9, 0x5a, 0xe5, 0xe7, @@ -34,6 +34,6 @@ u8 const public_key[crypto::xr_dsa::public_key_length] = { 0x29, 0xd2, 0x60, 0x3d, 0x68, 0x23, 0xf1, 0x34, 0xea, 0xbf, 0x4e, 0x38, 0x66, 0x72, 0x0d, 0xf1, 0xc7, 0x33, 0x35, 0xf7, 0xc5, 0xe0, 0x59, 0x57, 0x42, 0x36, 0x83, 0x20, 0xff, 0x14, 0x03, 0xea, 0x2f, 0x0b, 0x0c, 0xa6, 0x98, 0x11, 0xd5, 0xb2, 0x96, 0x51, 0x6b, 0x08, 0x38, 0x98, 0x3a, 0xb6, 0x96, 0xa7, 0xad, 0xe3, -}; // public_key +}; // public_key -} // namespace screenshots \ No newline at end of file +} // namespace screenshots \ No newline at end of file diff --git a/src/xrGame/screenshots_common.h b/src/xrGame/screenshots_common.h index 1cc1f276064..360cec5d960 100644 --- a/src/xrGame/screenshots_common.h +++ b/src/xrGame/screenshots_common.h @@ -10,6 +10,6 @@ extern u8 const q_number[crypto::xr_dsa::private_key_length]; extern u8 const g_number[crypto::xr_dsa::public_key_length]; extern u8 const public_key[crypto::xr_dsa::public_key_length]; -} // namespace screenshots +} // namespace screenshots -#endif //#ifndef SCREENSHOTS_COMMON_INCLUDED \ No newline at end of file +#endif //#ifndef SCREENSHOTS_COMMON_INCLUDED \ No newline at end of file diff --git a/src/xrGame/screenshots_writer.h b/src/xrGame/screenshots_writer.h index f2ab9d22ad3..63d0d47fb08 100644 --- a/src/xrGame/screenshots_writer.h +++ b/src/xrGame/screenshots_writer.h @@ -44,8 +44,8 @@ class writer CInifile m_info_data; signer m_signer; -}; // class writer +}; // class writer -} // namespace screenshots +} // namespace screenshots -#endif //#ifndef SCREENSHOT_WRITER_INCLUDED \ No newline at end of file +#endif //#ifndef SCREENSHOT_WRITER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/script_action_wrapper.cpp b/src/xrGame/script_action_wrapper.cpp index 2541d64cd43..536d1369361 100644 --- a/src/xrGame/script_action_wrapper.cpp +++ b/src/xrGame/script_action_wrapper.cpp @@ -56,10 +56,11 @@ void CScriptActionWrapper::finalize_static(CScriptActionBase* action) // CSConditionState &condition1) const //{ // _edge_value_type _weight = -//luabind::call_member<_edge_value_type>(const_cast(this),"weight",condition0,condition1); +// luabind::call_member<_edge_value_type>(const_cast(this),"weight",condition0,condition1); // if (_weight < min_weight()) { -// ai().script_engine().script_log (LuaMessageType::Error,"Weight is less than effect count! It is corrected from %d -//to %d",_weight,min_weight()); +// ai().script_engine().script_log (LuaMessageType::Error,"Weight is less than effect count! It is corrected from +//%d +// to %d",_weight,min_weight()); // _weight = min_weight(); // } // return (_weight); @@ -69,5 +70,5 @@ void CScriptActionWrapper::finalize_static(CScriptActionBase* action) // CSConditionState &condition0, const CSConditionState &condition1) //{ // return (((const -//CScriptActionWrapper*)action)->CScriptActionBase::weight(condition0,condition1)); +// CScriptActionWrapper*)action)->CScriptActionBase::weight(condition0,condition1)); //} diff --git a/src/xrGame/script_action_wrapper.h b/src/xrGame/script_action_wrapper.h index a87664eee57..a265d8d59ec 100644 --- a/src/xrGame/script_action_wrapper.h +++ b/src/xrGame/script_action_wrapper.h @@ -22,10 +22,12 @@ class CScriptActionWrapper : public CScriptActionBase, public luabind::wrap_base static void execute_static(CScriptActionBase* action); virtual void finalize(); static void finalize_static(CScriptActionBase* action); - // virtual _edge_value_type weight (const CSConditionState &condition0, const CSConditionState &condition1) - //const; - // static _edge_value_type weight_static (CScriptActionBase *action, const CSConditionState &condition0, const - //CSConditionState &condition1); + // virtual _edge_value_type weight (const CSConditionState &condition0, const CSConditionState + //&condition1) + // const; + // static _edge_value_type weight_static (CScriptActionBase *action, const CSConditionState &condition0, + //const + // CSConditionState &condition1); }; #include "script_action_wrapper_inline.h" \ No newline at end of file diff --git a/src/xrGame/script_binder.cpp b/src/xrGame/script_binder.cpp index bb2bc24ce0c..a4c05dec3b1 100644 --- a/src/xrGame/script_binder.cpp +++ b/src/xrGame/script_binder.cpp @@ -53,7 +53,7 @@ void CScriptBinder::reinit() #ifdef DEBUG_MEMORY_MANAGER u32 start = 0; if (g_bMEMO) start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER if (m_object) { try { @@ -70,7 +70,7 @@ void CScriptBinder::reinit() // lua_gc (ai().script_engine().lua(),LUA_GCCOLLECT,0); Msg("CScriptBinder::reinit() : %d", Memory.mem_usage() - start); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER } void CScriptBinder::reload(LPCSTR section) @@ -78,7 +78,7 @@ void CScriptBinder::reload(LPCSTR section) #ifdef DEBUG_MEMORY_MANAGER u32 start = 0; if (g_bMEMO) start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER #ifndef DBG_DISABLE_SCRIPTS VERIFY(!m_object); if (!pSettings->line_exist(section, "script_binding")) return; @@ -117,7 +117,7 @@ void CScriptBinder::reload(LPCSTR section) // lua_gc (ai().script_engine().lua(),LUA_GCCOLLECT,0); Msg("CScriptBinder::reload() : %d", Memory.mem_usage() - start); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER } BOOL CScriptBinder::net_Spawn(CSE_Abstract* DC) @@ -125,7 +125,7 @@ BOOL CScriptBinder::net_Spawn(CSE_Abstract* DC) #ifdef DEBUG_MEMORY_MANAGER u32 start = 0; if (g_bMEMO) start = Memory.mem_usage(); -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER CSE_Abstract* abstract = (CSE_Abstract*)DC; CSE_ALifeObject* object = smart_cast(abstract); if (object && m_object) { @@ -145,7 +145,7 @@ BOOL CScriptBinder::net_Spawn(CSE_Abstract* DC) // lua_gc (ai().script_engine().lua(),LUA_GCCOLLECT,0); Msg("CScriptBinder::net_Spawn() : %d", Memory.mem_usage() - start); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER return (TRUE); } @@ -155,7 +155,7 @@ void CScriptBinder::net_Destroy() if (m_object) { #ifdef _DEBUG Msg("* Core object %s is UNbinded from the script object", owner->cName()); -#endif // _DEBUG +#endif // _DEBUG try { m_object->net_Destroy(); @@ -174,7 +174,7 @@ void CScriptBinder::set_object(CScriptBinderObject* object) VERIFY2(!m_object, "Cannot bind to the object twice!"); #ifdef _DEBUG Msg("* Core object %s is binded with the script object", owner->cName()); -#endif // _DEBUG +#endif // _DEBUG m_object = object; } else diff --git a/src/xrGame/script_game_object.h b/src/xrGame/script_game_object.h index 47e92d5f1ab..b63af19ed8d 100644 --- a/src/xrGame/script_game_object.h +++ b/src/xrGame/script_game_object.h @@ -124,7 +124,7 @@ class CActionPlanner; typedef CActionPlanner, CPropertyEvaluator, CActionBase*, CPropertyEvaluator*> script_planner; -#endif // DEBUG +#endif // DEBUG class CScriptGameObject; @@ -610,7 +610,7 @@ class CScriptGameObject // LAMP CHangingLamp* get_hanging_lamp(); CHolderCustom* get_custom_holder(); - CHolderCustom* get_current_holder(); // actor only + CHolderCustom* get_current_holder(); // actor only void start_particles(LPCSTR pname, LPCSTR bone); void stop_particles(LPCSTR pname, LPCSTR bone); diff --git a/src/xrGame/script_game_object2.cpp b/src/xrGame/script_game_object2.cpp index 0fd55ae26ba..b6132981980 100644 --- a/src/xrGame/script_game_object2.cpp +++ b/src/xrGame/script_game_object2.cpp @@ -151,23 +151,23 @@ void CScriptGameObject::Hit(CScriptHit* tpLuaHit) CScriptHit& tLuaHit = *tpLuaHit; NET_Packet P; SHit HS; - HS.GenHeader(GE_HIT, object().ID()); // object().u_EventGen(P,GE_HIT,object().ID()); + HS.GenHeader(GE_HIT, object().ID()); // object().u_EventGen(P,GE_HIT,object().ID()); THROW2(tLuaHit.m_tpDraftsman, - "Where is hit initiator??!"); // THROW2 (tLuaHit.m_tpDraftsman,"Where is hit initiator??!"); - HS.whoID = u16(tLuaHit.m_tpDraftsman->ID()); // P.w_u16 (u16(tLuaHit.m_tpDraftsman->ID())); - HS.weaponID = 0; // P.w_u16 (0); - HS.dir = tLuaHit.m_tDirection; // P.w_dir (tLuaHit.m_tDirection); - HS.power = tLuaHit.m_fPower; // P.w_float (tLuaHit.m_fPower); + "Where is hit initiator??!"); // THROW2 (tLuaHit.m_tpDraftsman,"Where is hit initiator??!"); + HS.whoID = u16(tLuaHit.m_tpDraftsman->ID()); // P.w_u16 (u16(tLuaHit.m_tpDraftsman->ID())); + HS.weaponID = 0; // P.w_u16 (0); + HS.dir = tLuaHit.m_tDirection; // P.w_dir (tLuaHit.m_tDirection); + HS.power = tLuaHit.m_fPower; // P.w_float (tLuaHit.m_fPower); IKinematics* V = smart_cast( - object().Visual()); // IKinematics *V = smart_cast(object().Visual()); - VERIFY(V); // VERIFY (V); - if (xr_strlen(tLuaHit.m_caBoneName)) // if (xr_strlen (tLuaHit.m_caBoneName)) - HS.boneID = (V->LL_BoneID(tLuaHit.m_caBoneName)); // P.w_s16 (V->LL_BoneID(tLuaHit.m_caBoneName)); - else // else - HS.boneID = (s16(0)); // P.w_s16 (s16(0)); - HS.p_in_bone_space = Fvector().set(0, 0, 0); // P.w_vec3 (Fvector().set(0,0,0)); - HS.impulse = tLuaHit.m_fImpulse; // P.w_float (tLuaHit.m_fImpulse); - HS.hit_type = (ALife::EHitType)(tLuaHit.m_tHitType); // P.w_u16 (u16(tLuaHit.m_tHitType)); + object().Visual()); // IKinematics *V = smart_cast(object().Visual()); + VERIFY(V); // VERIFY (V); + if (xr_strlen(tLuaHit.m_caBoneName)) // if (xr_strlen (tLuaHit.m_caBoneName)) + HS.boneID = (V->LL_BoneID(tLuaHit.m_caBoneName)); // P.w_s16 (V->LL_BoneID(tLuaHit.m_caBoneName)); + else // else + HS.boneID = (s16(0)); // P.w_s16 (s16(0)); + HS.p_in_bone_space = Fvector().set(0, 0, 0); // P.w_vec3 (Fvector().set(0,0,0)); + HS.impulse = tLuaHit.m_fImpulse; // P.w_float (tLuaHit.m_fImpulse); + HS.hit_type = (ALife::EHitType)(tLuaHit.m_tHitType); // P.w_u16 (u16(tLuaHit.m_tHitType)); HS.Write_Packet(P); object().u_EventSend(P); diff --git a/src/xrGame/script_game_object3.cpp b/src/xrGame/script_game_object3.cpp index 4a18275dc91..a0054b18246 100644 --- a/src/xrGame/script_game_object3.cpp +++ b/src/xrGame/script_game_object3.cpp @@ -568,7 +568,7 @@ void CScriptGameObject::set_mental_state(EMentalState mental_state) ai().script_engine().script_log(LuaMessageType::Error, "CAI_Stalker : cannot access class member movement!"); else { -#if 0 // def DEBUG +#if 0 // def DEBUG if (mental_state != eMentalStateDanger) { if (stalker->brain().initialized()) { if (stalker->brain().current_action_id() == StalkerDecisionSpace::eWorldOperatorCombatPlanner) { @@ -577,7 +577,7 @@ void CScriptGameObject::set_mental_state(EMentalState mental_state) } } } -#endif // DEBUG +#endif // DEBUG stalker->movement().set_mental_state(mental_state); } } @@ -898,7 +898,8 @@ bool CScriptGameObject::weapon_strapped() const } bool const result = stalker->weapon_strapped(); - // Msg ( "[%6d][%s] weapon_strapped = %s", Device.dwTimeGlobal, stalker->cName().c_str(), result ? "true" + // Msg ( "[%6d][%s] weapon_strapped = %s", Device.dwTimeGlobal, stalker->cName().c_str(), result ? + //"true" //: "false" ); return (result); } @@ -912,7 +913,8 @@ bool CScriptGameObject::weapon_unstrapped() const return (false); } bool const result = stalker->weapon_unstrapped(); - // Msg ( "[%6d][%s] weapon_unstrapped = %s", Device.dwTimeGlobal, stalker->cName().c_str(), result ? + // Msg ( "[%6d][%s] weapon_unstrapped = %s", Device.dwTimeGlobal, stalker->cName().c_str(), result + //? //"true" : "false" ); return (result); } diff --git a/src/xrGame/script_game_object_impl.h b/src/xrGame/script_game_object_impl.h index 883962d0e67..3922cf53ce2 100644 --- a/src/xrGame/script_game_object_impl.h +++ b/src/xrGame/script_game_object_impl.h @@ -27,6 +27,6 @@ IC CGameObject& CScriptGameObject::object() const LuaMessageType::Error, "you are trying to use a destroyed object [%x]", m_game_object); THROW2(m_game_object && m_game_object->lua_game_object() == this, "Probably, you are trying to use a destroyed object!"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (*m_game_object); } \ No newline at end of file diff --git a/src/xrGame/script_game_object_inventory_owner.cpp b/src/xrGame/script_game_object_inventory_owner.cpp index 1c79a0b9288..2b20bbbc012 100644 --- a/src/xrGame/script_game_object_inventory_owner.cpp +++ b/src/xrGame/script_game_object_inventory_owner.cpp @@ -101,7 +101,7 @@ void _give_news(LPCSTR caption, LPCSTR text, LPCSTR texture_name, int delay, int news_data.m_type = (GAME_NEWS_DATA::eNewsType)type; news_data.news_caption = caption; news_data.news_text = text; - if (show_time != 0) news_data.show_time = show_time; // override default + if (show_time != 0) news_data.show_time = show_time; // override default VERIFY(xr_strlen(texture_name) > 0); @@ -983,7 +983,7 @@ void CScriptGameObject::attachable_item_load_attach(LPCSTR section) } attachable_item->load_attach_position(section); - if (attachable_item->object().H_Parent()) { // reattach + if (attachable_item->object().H_Parent()) { // reattach CAttachmentOwner* AO = smart_cast(attachable_item->object().H_Parent()); if (AO) AO->reattach_items(); } @@ -994,7 +994,7 @@ void CScriptGameObject::RestoreWeapon() #ifdef DEBUG ai().script_engine().script_log(LuaMessageType::Message, "CScriptGameObject::RestoreWeapon called!!!"); ai().script_engine().print_stack(); -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG Actor()->SetWeaponHideState(INV_STATE_BLOCK_ALL, false); } @@ -1003,7 +1003,7 @@ void CScriptGameObject::HideWeapon() #ifdef DEBUG ai().script_engine().script_log(LuaMessageType::Message, "CScriptGameObject::HideWeapon called!!!"); ai().script_engine().print_stack(); -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG Actor()->SetWeaponHideState(INV_STATE_BLOCK_ALL, true); } diff --git a/src/xrGame/script_game_object_script2.cpp b/src/xrGame/script_game_object_script2.cpp index 12d3f85865a..61e69854c45 100644 --- a/src/xrGame/script_game_object_script2.cpp +++ b/src/xrGame/script_game_object_script2.cpp @@ -151,7 +151,7 @@ class_& script_register_game_object1(class_ //&))(&CScriptGameObject::SetSoundCallback)) //.def("clear_hear_callback", &CScriptGameObject::ClearSoundCallback) @@ -295,7 +295,7 @@ class_& script_register_game_object1(class_& script_register_game_object2(class_& script_register_game_object2(class_()) .def(constructor()) - .def("object", &CScriptWatchAction::SetWatchObject) // time - .def("direct", &CScriptWatchAction::SetWatchDirection) // time + .def("object", &CScriptWatchAction::SetWatchObject) // time + .def("direct", &CScriptWatchAction::SetWatchDirection) // time .def("type", &CScriptWatchAction::SetWatchType) .def("bone", &CScriptWatchAction::SetWatchBone) .def("completed", (bool (CScriptWatchAction::*)())(&CScriptWatchAction::completed))]; diff --git a/src/xrGame/searchlight.h b/src/xrGame/searchlight.h index 6d34080c309..cc002310133 100644 --- a/src/xrGame/searchlight.h +++ b/src/xrGame/searchlight.h @@ -37,8 +37,8 @@ class CProjector : public CScriptObject virtual void Load(LPCSTR section); virtual BOOL net_Spawn(CSE_Abstract* DC); - virtual void shedule_Update(u32 dt); // Called by sheduler - virtual void UpdateCL(); // Called each frame, so no need for dt + virtual void shedule_Update(u32 dt); // Called by sheduler + virtual void UpdateCL(); // Called each frame, so no need for dt virtual void renderable_Render(); virtual BOOL UsedAI_Locations(); diff --git a/src/xrGame/secure_messaging.cpp b/src/xrGame/secure_messaging.cpp index 09d80e7a5e8..1f9e11d2db7 100644 --- a/src/xrGame/secure_messaging.cpp +++ b/src/xrGame/secure_messaging.cpp @@ -38,7 +38,7 @@ u32 const generate_key(s32 const seed, key_t& result_key) return result_key.m_key_length; } -enum enum_xray_crypt_action // do not add any, identifier ! +enum enum_xray_crypt_action // do not add any, identifier ! { xr_encrypt = 0x00, xr_decrypt @@ -106,4 +106,4 @@ u32 const decrypt(void* buffer, u32 buffer_size, key_t const& sec_key) return xray_crypt(buffer, buffer_size, sec_key, xr_decrypt); } -} // namespace secure_messaging \ No newline at end of file +} // namespace secure_messaging \ No newline at end of file diff --git a/src/xrGame/secure_messaging.h b/src/xrGame/secure_messaging.h index c90ded3e8f2..8ece805e957 100644 --- a/src/xrGame/secure_messaging.h +++ b/src/xrGame/secure_messaging.h @@ -16,16 +16,16 @@ class seed_generator : private Noncopyable private: CRandom m_random; -}; // class seed_generator +}; // class seed_generator struct key_t { - static u32 const max_key_length = 32; // in bytes + static u32 const max_key_length = 32; // in bytes static u32 const min_key_length = 16; u32 m_key_length; s32 m_key[max_key_length]; -}; // struct key_t +}; // struct key_t u32 const generate_key(s32 const seed, key_t& result_key); @@ -33,6 +33,6 @@ u32 const generate_key(s32 const seed, key_t& result_key); u32 const encrypt(void* buffer, u32 buffer_size, key_t const& sec_key); u32 const decrypt(void* buffer, u32 buffer_size, key_t const& sec_key); -} // namespace secure_messaging +} // namespace secure_messaging -#endif //#ifndef SECRET_KEY_GENERATOR_INCLUDED \ No newline at end of file +#endif //#ifndef SECRET_KEY_GENERATOR_INCLUDED \ No newline at end of file diff --git a/src/xrGame/sight_action.cpp b/src/xrGame/sight_action.cpp index b27426a5faa..4d45c1db328 100644 --- a/src/xrGame/sight_action.cpp +++ b/src/xrGame/sight_action.cpp @@ -233,7 +233,7 @@ void CSightAction::execute_cover_look_over() case 2: { #ifndef DEBUG fall_back: -#endif // #ifndef DEBUG +#endif // #ifndef DEBUG if ((m_start_state_time + m_stop_state_time < Device.dwTimeGlobal) && target_reached()) { m_start_state_time = Device.dwTimeGlobal; m_stop_state_time = 3500; @@ -254,10 +254,10 @@ void CSightAction::execute_cover_look_over() default: { #ifdef DEBUG FATAL(make_string("m_internal_state = %d, object[0x%08x]", m_internal_state, this).c_str()); -#else // #ifdef DEBUG +#else // #ifdef DEBUG m_internal_state = 0; goto fall_back; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } } } @@ -353,7 +353,7 @@ void CSightAction::predict_object_position(bool use_exact_position) Fvector const velocity = Fvector(offset).div(float(current_position.dwTime - previous_position.dwTime) / 1000.f); extern float g_aim_predict_time; - float const predict_time = g_aim_predict_time; //*Device.fTimeDelta; + float const predict_time = g_aim_predict_time; //*Device.fTimeDelta; m_vector3d.mad(velocity, predict_time); } } @@ -395,16 +395,18 @@ void CSightAction::execute_fire_object() if (!m_holder_start_position.similar(m_object->Position(), .05f)) { m_vector3d = m_object->sight().object_position(); m_already_switched = false; - // Msg ("%6d switch to mode 0 (reson: holder position changed)", - //Device.dwTimeGlobal); + // Msg ("%6d switch to mode 0 (reson: holder position + //changed)", + // Device.dwTimeGlobal); m_state_fire_object = 0; break; } if (!m_object_start_position.similar(m_object_to_look->Position(), .05f)) { m_vector3d = m_object->sight().object_position(); - // Msg ("%6d switch to mode 0 (reson: object position changed)", - //Device.dwTimeGlobal); + // Msg ("%6d switch to mode 0 (reson: object position + //changed)", + // Device.dwTimeGlobal); m_already_switched = false; m_state_fire_object = 0; break; @@ -414,7 +416,7 @@ void CSightAction::execute_fire_object() if (!m_already_switched) { m_vector3d = m_object->sight().object_position(); // Msg ("%6d switch to mode 0 (reson: time interval)", - //Device.dwTimeGlobal); + // Device.dwTimeGlobal); m_already_switched = true; m_state_fire_object = 0; break; diff --git a/src/xrGame/sight_action.h b/src/xrGame/sight_action.h index eb9521db95e..63466f288d1 100644 --- a/src/xrGame/sight_action.h +++ b/src/xrGame/sight_action.h @@ -46,7 +46,7 @@ class CSightAction : public CControlAction protected: Fvector m_holder_start_position; Fvector m_object_start_position; - u32 m_state_fire_object; // 0 : standard object navigation, 1 : vis_point navigation + u32 m_state_fire_object; // 0 : standard object navigation, 1 : vis_point navigation u32 m_state_fire_switch_time; bool m_already_switched; bool m_initialized; diff --git a/src/xrGame/sight_manager.cpp b/src/xrGame/sight_manager.cpp index b6e15896526..857cc82e5b6 100644 --- a/src/xrGame/sight_manager.cpp +++ b/src/xrGame/sight_manager.cpp @@ -65,7 +65,7 @@ void CSightManager::vfValidateAngleDependency(float x1, float& x2, float x3) #ifdef DEBUG BOOL g_ai_dbg_sight = 0; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG float g_ai_aim_min_speed = PI_DIV_8 / 2.f; float g_ai_aim_min_angle = PI_DIV_8 / 2.f; @@ -79,7 +79,7 @@ static inline float select_speed( #ifdef DEBUG if (!g_ai_aim_use_smooth_aim) return speed; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (speed <= min_speed) return speed; @@ -125,7 +125,7 @@ void CSightManager::Exec_Look(float time_delta) Msg("[%6d][%s] BEFORE HEAD [%f] -> [%f]", Device.dwTimeGlobal, object().cName().c_str(), object().movement().m_head.current.yaw, object().movement().m_head.target.yaw); } -#endif // #ifdef SIGHT_DEBUG +#endif // #ifdef SIGHT_DEBUG // static CStatGraph* s_stats_graph = 0; // if ( !s_stats_graph ) { @@ -144,13 +144,13 @@ void CSightManager::Exec_Look(float time_delta) if (g_ai_dbg_sight) Msg("%6d [%s] before body[%f]->[%f], head[%f]->[%f]", Device.dwTimeGlobal, object().cName().c_str(), body.current.yaw, body.target.yaw, head.current.yaw, head.target.yaw); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG vfValidateAngleDependency(body.current.yaw, body.target.yaw, head.current.yaw); #ifdef DEBUG if (g_ai_dbg_sight) Msg("%6d [%s] after body[%f]->[%f], head[%f]->[%f]", Device.dwTimeGlobal, object().cName().c_str(), body.current.yaw, body.target.yaw, head.current.yaw, head.target.yaw); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_object->angle_lerp_bounds(body.current.yaw, body.target.yaw, select_speed(angle_difference(body.current.yaw, body.target.yaw), body_speed, g_ai_aim_min_speed, @@ -174,7 +174,7 @@ void CSightManager::Exec_Look(float time_delta) if (g_ai_dbg_sight) Msg("%6d [%s] after2 body[%f]->[%f], head[%f]->[%f]", Device.dwTimeGlobal, object().cName().c_str(), body.current.yaw, body.target.yaw, head.current.yaw, head.target.yaw); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG #ifdef SIGHT_DEBUG // normalizing torso angles @@ -192,7 +192,7 @@ void CSightManager::Exec_Look(float time_delta) object().movement().m_head.current.yaw, object().movement().m_head.current.pitch, object().movement().m_head.target.yaw, object().movement().m_head.target.pitch); } -#endif // #ifdef SIGHT_DEBUG +#endif // #ifdef SIGHT_DEBUG if (enabled()) { compute_aiming(time_delta, head_speed); @@ -203,7 +203,7 @@ void CSightManager::Exec_Look(float time_delta) if (g_ai_dbg_sight) Msg("%6d [%s] after3 body[%f]->[%f], head[%f]->[%f]", Device.dwTimeGlobal, object().cName().c_str(), body.current.yaw, body.target.yaw, head.current.yaw, head.target.yaw); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (object().animation_movement_controlled()) return; @@ -314,11 +314,11 @@ Fvector CSightManager::aiming_position() const actor_kinematics->Bone_GetAnimPos (player_head, actor_kinematics->LL_BoneID("bip01_head"), 1, false); player_head.mulA_43 (Actor()->XFORM()); return ( player_head.c ); -#endif // #if 0 +#endif // #if 0 #ifdef DEBUG result.set(flt_max, flt_max, flt_max); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG float const fake_distance = 10000.f; @@ -386,7 +386,7 @@ Fvector CSightManager::aiming_position() const { case 0: { - result = current_action().vector3d(); // object_position(); + result = current_action().vector3d(); // object_position(); VERIFY2(result.magnitude() < 100000.f, make_string("[%f][%f][%f]", VPUSH(result))); VERIFY(_valid(result)); break; @@ -502,14 +502,16 @@ void CSightManager::process_action(float const time_delta) VERIFY(_valid(factors)); // if ( object().cName() == "level_prefix_stalker" ) { // Msg ("[%6d][%6d] [%f] + [%f] = [%f] ([%f])", Device.dwFrame, Device.dwTimeGlobal, - //m_current.m_head.m_factor, s_factor_lerp_speed*time_delta, lerp ( m_current.m_head.m_factor, factors.x, - //s_factor_lerp_speed*time_delta ), factors.x ); + // m_current.m_head.m_factor, s_factor_lerp_speed*time_delta, lerp ( m_current.m_head.m_factor, + // factors.x, + // s_factor_lerp_speed*time_delta ), factors.x ); // Msg ("[%6d][%6d] [%f] + [%f] = [%f] ([%f])", Device.dwFrame, Device.dwTimeGlobal, - //m_current.m_shoulder.m_factor, s_factor_lerp_speed*time_delta, lerp ( m_current.m_shoulder.m_factor, - //factors.y, s_factor_lerp_speed*time_delta ), factors.y ); + // m_current.m_shoulder.m_factor, s_factor_lerp_speed*time_delta, lerp ( m_current.m_shoulder.m_factor, + // factors.y, s_factor_lerp_speed*time_delta ), factors.y ); // Msg ("[%6d][%6d] [%f] + [%f] = [%f] ([%f])", Device.dwFrame, Device.dwTimeGlobal, - //m_current.m_spine.m_factor, s_factor_lerp_speed*time_delta, lerp ( m_current.m_spine.m_factor, factors.z, - //s_factor_lerp_speed*time_delta ), factors.z ); + // m_current.m_spine.m_factor, s_factor_lerp_speed*time_delta, lerp ( m_current.m_spine.m_factor, + // factors.z, + // s_factor_lerp_speed*time_delta ), factors.z ); // } VERIFY(_valid(m_current.m_head.m_factor)); @@ -644,7 +646,7 @@ void CSightManager::compute_aiming(float const time_delta, float const angular_s if (!fis_zero(time_delta)) { #ifdef DEBUG Msg("!animation movement controller wasn't created"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (m_object->animation_movement()) slerp_rotations(time_delta, m_object->animation_movement()->IsBlending() ? .1f : angular_speed); } diff --git a/src/xrGame/sight_manager.h b/src/xrGame/sight_manager.h index 38f8aa0f19b..5db0d3a590c 100644 --- a/src/xrGame/sight_manager.h +++ b/src/xrGame/sight_manager.h @@ -30,39 +30,39 @@ class CSightManager : public CSetupManagertable_id().c_str())); } } -#endif // DEBUG +#endif // DEBUG static bool in_fov( Fvector const& position, Fvector const& fov_position, Fvector const& fov_direction, float const fov_angle) diff --git a/src/xrGame/smart_cover.h b/src/xrGame/smart_cover.h index 8e6699ee163..597314baaee 100644 --- a/src/xrGame/smart_cover.h +++ b/src/xrGame/smart_cover.h @@ -82,11 +82,11 @@ class cover final : public CCoverPoint, private Noncopyable private: bool loophole_path(shared_str const& source_raw, shared_str const& target_raw) const; void check_loopholes_connectivity() const; -#endif // DEBUG +#endif // DEBUG }; -} // namespace smart_cover +} // namespace smart_cover #include "smart_cover_inline.h" -#endif // SMART_COVER_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_action.h b/src/xrGame/smart_cover_action.h index 4785d366ef2..5c0f7f3aff8 100644 --- a/src/xrGame/smart_cover_action.h +++ b/src/xrGame/smart_cover_action.h @@ -46,8 +46,8 @@ class action final : private Noncopyable void add_animation(LPCSTR animation_type, luabind::adl::object const& table); }; -} // namespace smart_cover +} // namespace smart_cover #include "smart_cover_action_inline.h" -#endif // SMART_COVER_ACTION_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_ACTION_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_action_inline.h b/src/xrGame/smart_cover_action_inline.h index 7da9a76ed56..69383b75c5c 100644 --- a/src/xrGame/smart_cover_action_inline.h +++ b/src/xrGame/smart_cover_action_inline.h @@ -28,6 +28,6 @@ IC action::Animations const& action::animations(shared_str const& cover_id, shar return (*found->second); } -} // namespace smart_cover +} // namespace smart_cover -#endif // SMART_COVER_ACTION_INLINE_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_ACTION_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_animation_planner.cpp b/src/xrGame/smart_cover_animation_planner.cpp index 24270bb4f7e..6d0f69a887d 100644 --- a/src/xrGame/smart_cover_animation_planner.cpp +++ b/src/xrGame/smart_cover_animation_planner.cpp @@ -47,7 +47,7 @@ void animation_planner::setup(CAI_Stalker* object, CPropertyStorage* storage) inherited::setup(object); #ifdef DEBUG // inherited::m_use_log = true; -#endif // DEBUG +#endif // DEBUG add_evaluators(); add_actions(); @@ -289,7 +289,7 @@ bool animation_planner::hit_callback(SHit const* hit) #ifndef MASTER_GOLD if (hit->who && smart_cast(hit->who) && psAI_Flags.test(aiIgnoreActor)) return (false); -#endif // MASTER_GOLD +#endif // MASTER_GOLD if (!object().g_Alive()) return (false); diff --git a/src/xrGame/smart_cover_animation_planner.h b/src/xrGame/smart_cover_animation_planner.h index e0de982108e..0a6c8057a86 100644 --- a/src/xrGame/smart_cover_animation_planner.h +++ b/src/xrGame/smart_cover_animation_planner.h @@ -83,8 +83,8 @@ class animation_planner final : public CActionPlannerScript, privat virtual LPCSTR object_name() const; }; -} // namespace smart_cover +} // namespace smart_cover #include "smart_cover_animation_planner_inline.h" -#endif // SMART_COVER_ANIMATION_PLANNER_H_INCLUDED +#endif // SMART_COVER_ANIMATION_PLANNER_H_INCLUDED diff --git a/src/xrGame/smart_cover_animation_planner_inline.h b/src/xrGame/smart_cover_animation_planner_inline.h index 0a0214bd199..51f1c1865d3 100644 --- a/src/xrGame/smart_cover_animation_planner_inline.h +++ b/src/xrGame/smart_cover_animation_planner_inline.h @@ -125,6 +125,6 @@ IC void animation_planner::last_lookout_time(u32 const& value) m_last_lookout_time = value; } -} // namespace smart_cover +} // namespace smart_cover -#endif // SMART_COVER_ANIMATION_PLANNER_INLINE_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_ANIMATION_PLANNER_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_animation_selector.cpp b/src/xrGame/smart_cover_animation_selector.cpp index 5f5d61fb87a..8d0a52d765b 100644 --- a/src/xrGame/smart_cover_animation_selector.cpp +++ b/src/xrGame/smart_cover_animation_selector.cpp @@ -82,7 +82,7 @@ MotionID animation_selector::select_animation(bool& animation_movement_controlle m_previous_time = 0.f; if (!m_planner->initialized()) { // Msg ("%6d no planner update, planner is not initialized, exiting", - //Device.dwTimeGlobal); + // Device.dwTimeGlobal); return (m_object->animation().assign_global_animation(animation_movement_controller)); } } @@ -105,7 +105,7 @@ MotionID animation_selector::select_animation(bool& animation_movement_controlle if (!m_object->movement().current_params().cover()->can_fire()) return (m_skeleton_animated->ID_Cycle(m_animation.c_str())); -#if 0 // ndef MASTER_GOLD +#if 0 // ndef MASTER_GOLD if (!psAI_Flags.test((u32)aiUseSmartCoversAnimationSlot)) return (m_skeleton_animated->ID_Cycle( m_animation.c_str())); @@ -127,9 +127,9 @@ MotionID animation_selector::select_animation(bool& animation_movement_controlle animation_id = m_skeleton_animated->ID_Cycle_Safe( result ); VERIFY (animation_id); return (animation_id); -#else // #ifndef MASTER_GOLD +#else // #ifndef MASTER_GOLD return (m_skeleton_animated->ID_Cycle(m_animation.c_str())); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } VERIFY(m_animation._get()); diff --git a/src/xrGame/smart_cover_animation_selector.h b/src/xrGame/smart_cover_animation_selector.h index 2bd5d5053d1..72573c09bf8 100644 --- a/src/xrGame/smart_cover_animation_selector.h +++ b/src/xrGame/smart_cover_animation_selector.h @@ -55,8 +55,8 @@ class animation_selector final : private Noncopyable IC animation_planner& planner(); }; -} // namespace smart_cover +} // namespace smart_cover #include "smart_cover_animation_selector_inline.h" -#endif // SMART_COVER_ANIMATION_SELECTOR_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_ANIMATION_SELECTOR_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_animation_selector_inline.h b/src/xrGame/smart_cover_animation_selector_inline.h index e23f264932c..73c1c03512b 100644 --- a/src/xrGame/smart_cover_animation_selector_inline.h +++ b/src/xrGame/smart_cover_animation_selector_inline.h @@ -20,6 +20,6 @@ IC animation_planner& animation_selector::planner() return (*m_planner); } -} // namespace smart_cover +} // namespace smart_cover -#endif // SMART_COVER_ANIMATION_SELECTOR_INLINE_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_ANIMATION_SELECTOR_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_default_behaviour_planner.hpp b/src/xrGame/smart_cover_default_behaviour_planner.hpp index 009e6f1206c..c3dd0434c14 100644 --- a/src/xrGame/smart_cover_default_behaviour_planner.hpp +++ b/src/xrGame/smart_cover_default_behaviour_planner.hpp @@ -42,8 +42,8 @@ class default_behaviour_planner final : public CActionPlannerAction [%s]", current_cover ? current_cover->id().c_str() : "", target_cover ? target_cover->id().c_str() : ""); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (movement.current_transition().animation().has_animation()); } @@ -213,7 +213,7 @@ _value_type can_exit_loophole_with_animation::evaluate() #ifdef DEBUG Msg("transition guard(loophole): [%s] -> [%s]", current_loophole ? current_loophole->id().c_str() : "", target_loophole ? target_loophole->id().c_str() : ""); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (movement.current_transition().animation().has_animation()); } diff --git a/src/xrGame/smart_cover_evaluators.h b/src/xrGame/smart_cover_evaluators.h index 6d6333e33e1..2e9dcfe5abc 100644 --- a/src/xrGame/smart_cover_evaluators.h +++ b/src/xrGame/smart_cover_evaluators.h @@ -224,8 +224,8 @@ class lookout_time_interval_passed_evaluator : public CPropertyEvaluatorfov() * 180.f / PI, loophole->range(), 1.f, position, direction, up); } } -#endif // DEBUG +#endif // DEBUG bool object::inside(Fvector const& position) const { diff --git a/src/xrGame/smart_cover_object.h b/src/xrGame/smart_cover_object.h index 7d4db1fe2ba..8154d01f4f5 100644 --- a/src/xrGame/smart_cover_object.h +++ b/src/xrGame/smart_cover_object.h @@ -43,7 +43,7 @@ class object : public CGameObject, private Noncopyable virtual float Radius() const; #ifdef DEBUG virtual void OnRender(); -#endif // DEBUG +#endif // DEBUG bool inside(Fvector const& position) const; IC float const& enter_min_enemy_distance() const; @@ -51,10 +51,10 @@ class object : public CGameObject, private Noncopyable IC cover const& cover() const; }; -} // namespace smart_cover +} // namespace smart_cover typedef smart_cover::object smart_cover__object; #include "smart_cover_object_inline.h" -#endif // SMART_COVER_OBJECT_H_INCLUDED +#endif // SMART_COVER_OBJECT_H_INCLUDED diff --git a/src/xrGame/smart_cover_object_inline.h b/src/xrGame/smart_cover_object_inline.h index 068bdeed485..13312a93733 100644 --- a/src/xrGame/smart_cover_object_inline.h +++ b/src/xrGame/smart_cover_object_inline.h @@ -25,4 +25,4 @@ IC smart_cover::cover const& smart_cover::object::cover() const return (*m_cover); } -#endif // SMART_COVER_OBJECT_INLINE_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_OBJECT_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_planner_actions.cpp b/src/xrGame/smart_cover_planner_actions.cpp index accf81efbeb..6c538a4a4f2 100644 --- a/src/xrGame/smart_cover_planner_actions.cpp +++ b/src/xrGame/smart_cover_planner_actions.cpp @@ -43,7 +43,7 @@ using namespace StalkerDecisionSpace; namespace smart_cover { shared_str transform_vertex(shared_str const& vertex_id, bool const& in); -} // namespace smart_cover +} // namespace smart_cover ////////////////////////////////////////////////////////////////////////// // action_base @@ -140,7 +140,7 @@ void non_animated_change_loophole::initialize() { inherited::initialize(); - object().sight().enable(false); // to force adjust_orientation + object().sight().enable(false); // to force adjust_orientation setup_orientation(); object().movement().set_movement_type(eMovementTypeRun); diff --git a/src/xrGame/smart_cover_planner_actions.h b/src/xrGame/smart_cover_planner_actions.h index 2f290c1ba38..970760c75fd 100644 --- a/src/xrGame/smart_cover_planner_actions.h +++ b/src/xrGame/smart_cover_planner_actions.h @@ -93,8 +93,8 @@ class exit final : public action_base virtual void on_animation_end(); }; -} // namespace smart_cover +} // namespace smart_cover #include "smart_cover_planner_actions_inline.h" -#endif // SMART_COVER_PLANNER_ACTIONS_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_PLANNER_ACTIONS_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_planner_actions_inline.h b/src/xrGame/smart_cover_planner_actions_inline.h index e63ad8e923f..0d0fd8d953a 100644 --- a/src/xrGame/smart_cover_planner_actions_inline.h +++ b/src/xrGame/smart_cover_planner_actions_inline.h @@ -10,6 +10,6 @@ namespace smart_cover { -} // namespace smart_cover +} // namespace smart_cover -#endif // SMART_COVER_PLANNER_ACTIONS_INLINE_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_PLANNER_ACTIONS_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_planner_target_provider.h b/src/xrGame/smart_cover_planner_target_provider.h index 656da0eaa4f..eb65c21343e 100644 --- a/src/xrGame/smart_cover_planner_target_provider.h +++ b/src/xrGame/smart_cover_planner_target_provider.h @@ -83,6 +83,6 @@ class target_fire_no_lookout final : public target_provider u32 m_loophole_value; }; -} // namespace smart_cover +} // namespace smart_cover -#endif // SMART_COVER_PLANNER_TARGET_PROVIDER_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_PLANNER_TARGET_PROVIDER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_planner_target_selector.h b/src/xrGame/smart_cover_planner_target_selector.h index 3ff1f778634..1896ee90d20 100644 --- a/src/xrGame/smart_cover_planner_target_selector.h +++ b/src/xrGame/smart_cover_planner_target_selector.h @@ -41,8 +41,8 @@ class target_selector final : public CActionPlannerAction, pr IC callback_type const& callback() const; }; -} // namespace smart_cover +} // namespace smart_cover #include "smart_cover_planner_target_selector_inline.h" -#endif // SMART_COVER_PLANNER_TARGET_SELECTOR_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_PLANNER_TARGET_SELECTOR_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_planner_target_selector_inline.h b/src/xrGame/smart_cover_planner_target_selector_inline.h index 254e92696f1..fbb69e9f524 100644 --- a/src/xrGame/smart_cover_planner_target_selector_inline.h +++ b/src/xrGame/smart_cover_planner_target_selector_inline.h @@ -15,6 +15,6 @@ IC target_selector::callback_type const& target_selector::callback() const return (m_script_callback); } -} // namespace smart_cover +} // namespace smart_cover -#endif // SMART_COVER_PLANNER_TARGET_SELECTOR_INLINE_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_PLANNER_TARGET_SELECTOR_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_storage.cpp b/src/xrGame/smart_cover_storage.cpp index 63df1f5889c..1d36b159cea 100644 --- a/src/xrGame/smart_cover_storage.cpp +++ b/src/xrGame/smart_cover_storage.cpp @@ -47,7 +47,7 @@ storage::~storage() Descriptions::const_iterator E = m_descriptions.end(); for (; I != E; ++I) VERIFY(!(*I)->m_ref_count); -#endif // DEBUG +#endif // DEBUG delete_data(m_descriptions); } diff --git a/src/xrGame/smart_cover_storage.h b/src/xrGame/smart_cover_storage.h index 7252c3f6ea4..2a1c6d870da 100644 --- a/src/xrGame/smart_cover_storage.h +++ b/src/xrGame/smart_cover_storage.h @@ -28,6 +28,6 @@ class storage final : private Noncopyable void collect_garbage(); }; -} // namespace smart_cover +} // namespace smart_cover -#endif // SMART_COVER_STORAGE_H_INCLUDED \ No newline at end of file +#endif // SMART_COVER_STORAGE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_transition.cpp b/src/xrGame/smart_cover_transition.cpp index 0835c00b4d7..d96c68fc7e9 100644 --- a/src/xrGame/smart_cover_transition.cpp +++ b/src/xrGame/smart_cover_transition.cpp @@ -87,11 +87,11 @@ animation_action const& action::animation(MonsterSpace::EBodyState const& target #ifndef MASTER_GOLD Msg("! There is no animation which can transfer bot to body_state [%i], selecting random transition", target_body_state); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return (animation()); } -#if 0 // for testing +#if 0 // for testing VERIFY2 ( found != m_animations.end(), make_string("There is no animation which can transfer bot to body_state [%i]", target_body_state) diff --git a/src/xrGame/smart_cover_transition.hpp b/src/xrGame/smart_cover_transition.hpp index 7680a79d0ad..c7a24024b03 100644 --- a/src/xrGame/smart_cover_transition.hpp +++ b/src/xrGame/smart_cover_transition.hpp @@ -12,7 +12,7 @@ namespace MonsterSpace { enum EBodyState; -}; // namespace MonsterSpace +}; // namespace MonsterSpace namespace smart_cover { @@ -41,7 +41,7 @@ class action final : private Noncopyable void load_animations(luabind::object const& table); }; -} // namespace transitions -} // namespace smart_cover +} // namespace transitions +} // namespace smart_cover -#endif // SMART_COVER_TRANSITION_HPP_INCLUDED +#endif // SMART_COVER_TRANSITION_HPP_INCLUDED diff --git a/src/xrGame/smart_cover_transition_animation.hpp b/src/xrGame/smart_cover_transition_animation.hpp index d46930dc0b5..bb1291a88f3 100644 --- a/src/xrGame/smart_cover_transition_animation.hpp +++ b/src/xrGame/smart_cover_transition_animation.hpp @@ -33,10 +33,10 @@ class animation_action final : private Noncopyable IC MonsterSpace::EMovementType const& movement_type() const; }; -} // namespace transitions +} // namespace transitions -} // namespace smart_cover +} // namespace smart_cover #include "smart_cover_transition_animation_inline.hpp" -#endif // SMART_COVER_TRANSITION_ANIMATION_HPP_INCLUDED \ No newline at end of file +#endif // SMART_COVER_TRANSITION_ANIMATION_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrGame/smart_cover_transition_animation_inline.hpp b/src/xrGame/smart_cover_transition_animation_inline.hpp index 502c4035e6e..3e7b49c98ca 100644 --- a/src/xrGame/smart_cover_transition_animation_inline.hpp +++ b/src/xrGame/smart_cover_transition_animation_inline.hpp @@ -37,7 +37,7 @@ IC MonsterSpace::EMovementType const& animation_action::movement_type() const return (m_movement_type); } -} // namespace transitions -} // nmaespace smart_cover +} // namespace transitions +} // nmaespace smart_cover -#endif // SMART_COVER_TRANSITION_ANIMATION_INLINE_HPP_INCLUDED \ No newline at end of file +#endif // SMART_COVER_TRANSITION_ANIMATION_INLINE_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrGame/sound_memory_manager.cpp b/src/xrGame/sound_memory_manager.cpp index ba884a33df7..1cda3a1f8d3 100644 --- a/src/xrGame/sound_memory_manager.cpp +++ b/src/xrGame/sound_memory_manager.cpp @@ -28,7 +28,7 @@ #ifndef MASTER_GOLD #include "actor.h" #include "ai_debug.h" -#endif // MASTER_GOLD +#endif // MASTER_GOLD #define SILENCE //#define SAVE_OWN_SOUNDS @@ -122,7 +122,7 @@ void CSoundMemoryManager::feel_sound_new( { #ifndef MASTER_GOLD if (object && smart_cast(object) && psAI_Flags.test(aiIgnoreActor)) return; -#endif // MASTER_GOLD +#endif // MASTER_GOLD VERIFY(_valid(sound_power)); if (!m_sounds) return; @@ -178,7 +178,7 @@ void CSoundMemoryManager::feel_sound_new( // bool is_shooting = is_sound_type(sound_type,SOUND_TYPE_WEAPON_SHOOTING); // bool is_colliding = is_sound_type(sound_type,SOUND_TYPE_WORLD_OBJECT_COLLIDING); // bool very_close = m_stalker->Position().distance_to_sqr(object->Position()) <= - //COMBAT_SOUND_PERCEIVE_RADIUS_SQR; + // COMBAT_SOUND_PERCEIVE_RADIUS_SQR; // if (is_shooting || is_colliding || very_close) add(object, sound_type, position, sound_power); } @@ -363,7 +363,7 @@ void CSoundMemoryManager::save(NET_Packet& packet) const packet.w_float((*I).m_object_params.m_orientation.yaw); packet.w_float((*I).m_object_params.m_orientation.pitch); packet.w_float((*I).m_object_params.m_orientation.roll); -#endif // USE_ORIENTATION +#endif // USE_ORIENTATION // self params packet.w_u32((*I).m_self_params.m_level_vertex_id); packet.w_vec3((*I).m_self_params.m_position); @@ -371,16 +371,16 @@ void CSoundMemoryManager::save(NET_Packet& packet) const packet.w_float((*I).m_self_params.m_orientation.yaw); packet.w_float((*I).m_self_params.m_orientation.pitch); packet.w_float((*I).m_self_params.m_orientation.roll); -#endif // USE_ORIENTATION +#endif // USE_ORIENTATION #ifdef USE_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_level_time) : 0); -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_last_level_time) : 0); -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_FIRST_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_first_level_time) : 0); -#endif // USE_FIRST_LEVEL_TIME +#endif // USE_FIRST_LEVEL_TIME packet.w_u32((*I).m_sound_type); packet.w_float((*I).m_power); } @@ -426,17 +426,17 @@ void CSoundMemoryManager::load(IReader& packet) VERIFY(Device.dwTimeGlobal >= object.m_level_time); object.m_level_time = packet.r_u32(); object.m_level_time += Device.dwTimeGlobal; -#endif // USE_LEVEL_TIME +#endif // USE_LEVEL_TIME #ifdef USE_LAST_LEVEL_TIME VERIFY(Device.dwTimeGlobal >= object.m_last_level_time); object.m_last_level_time = packet.r_u32(); object.m_last_level_time += Device.dwTimeGlobal; -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_FIRST_LEVEL_TIME VERIFY(Device.dwTimeGlobal >= (*I).m_first_level_time); object.m_first_level_time = packet.r_u32(); object.m_first_level_time += Device.dwTimeGlobal; -#endif // USE_FIRST_LEVEL_TIME +#endif // USE_FIRST_LEVEL_TIME object.m_sound_type = (ESoundTypes)packet.r_u32(); object.m_power = packet.r_float(); @@ -459,7 +459,7 @@ void CSoundMemoryManager::load(IReader& packet) VERIFY(spawn_callback->m_object_callback == callback); } } -#endif // DEBUG +#endif // DEBUG } } diff --git a/src/xrGame/space_restriction_composition.cpp b/src/xrGame/space_restriction_composition.cpp index 49005c7497d..c715f109f5f 100644 --- a/src/xrGame/space_restriction_composition.cpp +++ b/src/xrGame/space_restriction_composition.cpp @@ -23,7 +23,7 @@ #ifdef DEBUG #include "Level.h" #include "space_restrictor.h" -#endif // DEBUG +#endif // DEBUG int g_restriction_checker = 0; @@ -202,4 +202,4 @@ void CSpaceRestrictionComposition::check_restrictor_type() VERIFY2(restrictor->restrictor_type() != RestrictionSpace::eRestrictorTypeNone, "impossible situation: wrong net_Spawn branch used"); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/space_restriction_composition.h b/src/xrGame/space_restriction_composition.h index 8d1213cdbd9..c4512584eb1 100644 --- a/src/xrGame/space_restriction_composition.h +++ b/src/xrGame/space_restriction_composition.h @@ -32,7 +32,7 @@ class CSpaceRestrictionComposition : public CSpaceRestrictionBase #ifdef DEBUG private: void check_restrictor_type(); -#endif // DEBUG +#endif // DEBUG protected: IC void merge(CBaseRestrictionPtr restriction); diff --git a/src/xrGame/space_restriction_composition_inline.h b/src/xrGame/space_restriction_composition_inline.h index f92ef426c1d..1074526d93d 100644 --- a/src/xrGame/space_restriction_composition_inline.h +++ b/src/xrGame/space_restriction_composition_inline.h @@ -16,7 +16,7 @@ IC CSpaceRestrictionComposition::CSpaceRestrictionComposition( m_space_restrictors = space_restrictors; #ifdef DEBUG check_restrictor_type(); -#endif // DEBUG +#endif // DEBUG ++g_restriction_checker; } diff --git a/src/xrGame/space_restriction_shape.cpp b/src/xrGame/space_restriction_shape.cpp index b67969b9df1..8e0988ab13c 100644 --- a/src/xrGame/space_restriction_shape.cpp +++ b/src/xrGame/space_restriction_shape.cpp @@ -173,7 +173,7 @@ void CSpaceRestrictionShape::test_correctness() // if (!b_found) { // Msg("Node%u :: index[%u]:: position[%f,%f,%f]", index, (*I), - //VPUSH(ai().level_graph().vertex_position((*I)))); + // VPUSH(ai().level_graph().vertex_position((*I)))); // index ++; // } diff --git a/src/xrGame/space_restrictor.cpp b/src/xrGame/space_restrictor.cpp index 9f06dc859bf..8fe1d50167e 100644 --- a/src/xrGame/space_restrictor.cpp +++ b/src/xrGame/space_restrictor.cpp @@ -135,7 +135,7 @@ void CSpaceRestrictor::prepare() const switch ((*I).type) { case 0: - { // sphere + { // sphere Fsphere temp; const Fsphere& sphere = (*I).data.sphere; XFORM().transform_tiny(temp.P, sphere.P); @@ -144,7 +144,7 @@ void CSpaceRestrictor::prepare() const break; } case 1: - { // box + { // box Fmatrix sphere; const Fmatrix& box = (*I).data.box; sphere.mul_43(XFORM(), box); diff --git a/src/xrGame/spectator_camera_first_eye.h b/src/xrGame/spectator_camera_first_eye.h index 46954939aa3..31695be29cf 100644 --- a/src/xrGame/spectator_camera_first_eye.h +++ b/src/xrGame/spectator_camera_first_eye.h @@ -16,6 +16,6 @@ class CSpectrCameraFirstEye : public CCameraFirstEye CSpectrCameraFirstEye& operator=(CSpectrCameraFirstEye& copy){}; virtual void Move(int cmd, float val = 0, float factor = 1.0f); -}; // class SpectrCameraFirstEye +}; // class SpectrCameraFirstEye -#endif //#ifndef SPECTATOR_CAMERA_FIRST_EYE \ No newline at end of file +#endif //#ifndef SPECTATOR_CAMERA_FIRST_EYE \ No newline at end of file diff --git a/src/xrGame/sprinter_stopper.cpp b/src/xrGame/sprinter_stopper.cpp index 2c63281840d..b1e6a7fbff5 100644 --- a/src/xrGame/sprinter_stopper.cpp +++ b/src/xrGame/sprinter_stopper.cpp @@ -43,4 +43,4 @@ void spritnter_stopper::OnPlayerKilled( m_sprinter_victim_velocity = state.fVelocity; } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/sprinter_stopper.h b/src/xrGame/sprinter_stopper.h index 3a43b0ce28b..a4774e08508 100644 --- a/src/xrGame/sprinter_stopper.h +++ b/src/xrGame/sprinter_stopper.h @@ -23,12 +23,12 @@ class spritnter_stopper : public player_state_param protected: float m_sprinter_victim_velocity; -}; // class spritnter_stopper +}; // class spritnter_stopper ADD_ACCUMULATIVE_STATE(acpv_sprinter_victim_velocity, spritnter_stopper); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_sprinter_victim_velocity, spritnter_stopper) -} // namespace award_system +} // namespace award_system -#endif //#ifndef SPRINTER_STOPPER_INCLUDED \ No newline at end of file +#endif //#ifndef SPRINTER_STOPPER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/squad_hierarchy_holder.cpp b/src/xrGame/squad_hierarchy_holder.cpp index b48c71062d2..2c53c36809e 100644 --- a/src/xrGame/squad_hierarchy_holder.cpp +++ b/src/xrGame/squad_hierarchy_holder.cpp @@ -37,4 +37,4 @@ void CSquadHierarchyHolder::update_leader() break; } } -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER \ No newline at end of file +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER \ No newline at end of file diff --git a/src/xrGame/squad_hierarchy_holder.h b/src/xrGame/squad_hierarchy_holder.h index e4e2c87ad05..b4bc3362daf 100644 --- a/src/xrGame/squad_hierarchy_holder.h +++ b/src/xrGame/squad_hierarchy_holder.h @@ -37,7 +37,7 @@ class CSquadHierarchyHolder #ifdef SQUAD_HIERARCHY_HOLDER_USE_LEADER private: CEntity* m_leader; -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER public: IC CSquadHierarchyHolder(CTeamHierarchyHolder* team); @@ -51,7 +51,7 @@ class CSquadHierarchyHolder IC void leader(CEntity* leader); IC CEntity* leader() const; void update_leader(); -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER }; #include "squad_hierarchy_holder_inline.h" \ No newline at end of file diff --git a/src/xrGame/squad_hierarchy_holder_inline.h b/src/xrGame/squad_hierarchy_holder_inline.h index 2c1de522f36..d01352336b5 100644 --- a/src/xrGame/squad_hierarchy_holder_inline.h +++ b/src/xrGame/squad_hierarchy_holder_inline.h @@ -14,7 +14,7 @@ IC CSquadHierarchyHolder::CSquadHierarchyHolder(CTeamHierarchyHolder* team) m_team = team; #ifdef SQUAD_HIERARCHY_HOLDER_USE_LEADER m_leader = 0; -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER SeniorityHierarchy::assign_svector(m_groups, max_group_count, 0); } @@ -23,7 +23,7 @@ IC CEntity* CSquadHierarchyHolder::leader() const { return (m_leader); } -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER IC CTeamHierarchyHolder& CSquadHierarchyHolder::team() const { @@ -36,7 +36,7 @@ IC void CSquadHierarchyHolder::leader(CEntity* leader) { m_leader = leader; } -#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER +#endif // SQUAD_HIERARCHY_HOLDER_USE_LEADER IC const SquadHierarchyHolder::GROUP_REGISTRY& CSquadHierarchyHolder::groups() const { diff --git a/src/xrGame/stalker_alife_task_actions.cpp b/src/xrGame/stalker_alife_task_actions.cpp index 6f26f112042..165e2863092 100644 --- a/src/xrGame/stalker_alife_task_actions.cpp +++ b/src/xrGame/stalker_alife_task_actions.cpp @@ -41,11 +41,11 @@ using namespace StalkerDecisionSpace; #ifdef DEBUG //#define GRENADE_TEST -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG #ifdef GRENADE_TEST #include "actor.h" -#endif // #ifdef GRENADE_TEST +#endif // #ifdef GRENADE_TEST ////////////////////////////////////////////////////////////////////////// // CStalkerActionSolveZonePuzzle @@ -149,7 +149,8 @@ void CStalkerActionSolveZonePuzzle::execute() #else const CWeapon* weapon = smart_cast(object().best_weapon()); VERIFY(weapon); - // Msg ("weapon %s is strapped : %c",*weapon->cName(),weapon->strapped_mode() ? '+' : + // Msg ("weapon %s is strapped : %c",*weapon->cName(),weapon->strapped_mode() ? '+' + //: //'-'); static u32 m_time_to_strap = 0; diff --git a/src/xrGame/stalker_animation_callbacks.cpp b/src/xrGame/stalker_animation_callbacks.cpp index fad87dff579..fe70a9250b7 100644 --- a/src/xrGame/stalker_animation_callbacks.cpp +++ b/src/xrGame/stalker_animation_callbacks.cpp @@ -66,7 +66,7 @@ static void callback_rotation_blend(CBoneInstance* const bone) VERIFY(parameter->m_object); VERIFY(parameter->m_blend); // VERIFY2 ( *parameter->m_blend, make_string( "%d %s[%s]", Device.dwTimeGlobal, - //parameter->m_object->cName().c_str(), parameter->m_object->g_Alive() ? "+" : "-") ); + // parameter->m_object->cName().c_str(), parameter->m_object->g_Alive() ? "+" : "-") ); float multiplier = 1.f; if (*parameter->m_blend) { @@ -84,7 +84,7 @@ static void callback_rotation_blend(CBoneInstance* const bone) rotation.getXYZ (angles); angles.mul (multiplier); rotation.setXYZ (angles); -#else // #if 0 +#else // #if 0 Fquaternion left; left.set(Fidentity); @@ -96,7 +96,7 @@ static void callback_rotation_blend(CBoneInstance* const bone) Fmatrix rotation; rotation.rotation(result); -#endif // #if 0 +#endif // #if 0 Fvector position = bone->mTransform.c; R_ASSERT(_valid(rotation)); @@ -114,7 +114,7 @@ void CStalkerAnimationManager::assign_bone_callbacks() m_head_params.invalidate(); m_shoulder_params.invalidate(); m_spine_params.invalidate(); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG LPCSTR section = *object().cNameSect(); @@ -154,7 +154,7 @@ void CStalkerAnimationManager::assign_bone_blend_callbacks(bool const& forward_d m_head_params.invalidate(); m_shoulder_params.invalidate(); m_spine_params.invalidate(); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG LPCSTR section = *object().cNameSect(); @@ -195,7 +195,7 @@ void CStalkerAnimationManager::remove_bone_callbacks() m_head_params.invalidate(); m_shoulder_params.invalidate(); m_spine_params.invalidate(); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG LPCSTR section = *object().cNameSect(); diff --git a/src/xrGame/stalker_animation_global.cpp b/src/xrGame/stalker_animation_global.cpp index 6788270fb0d..74584a6f6b0 100644 --- a/src/xrGame/stalker_animation_global.cpp +++ b/src/xrGame/stalker_animation_global.cpp @@ -31,9 +31,9 @@ void CStalkerAnimationManager::global_play_callback(CBlend* blend) pair.on_animation_end(); // std::pair pair_id = - //smart_cast(object->Visual())->LL_MotionDefName_dbg(blend->motionID); + // smart_cast(object->Visual())->LL_MotionDefName_dbg(blend->motionID); // Msg ("[%6d] global callback [%s][%s]", Device.dwTimeGlobal, pair_id.first, - //pair_id.second); + // pair_id.second); if (!manager.m_global_callback) return; diff --git a/src/xrGame/stalker_animation_legs.cpp b/src/xrGame/stalker_animation_legs.cpp index 38e5d93a8ca..8256f3d8e7f 100644 --- a/src/xrGame/stalker_animation_legs.cpp +++ b/src/xrGame/stalker_animation_legs.cpp @@ -28,10 +28,10 @@ const u32 direction_switch_interval = 500; const u32 need_look_back_time_delay = 0; const float direction_angles[] = { - 0.f, // eMovementDirectionForward - PI, // eMovementDirectionBackward - PI_DIV_2, // eMovementDirectionLeft - -PI_DIV_2 // eMovementDirectionRight + 0.f, // eMovementDirectionForward + PI, // eMovementDirectionBackward + PI_DIV_2, // eMovementDirectionLeft + -PI_DIV_2 // eMovementDirectionRight }; void CStalkerAnimationManager::legs_play_callback(CBlend* blend) diff --git a/src/xrGame/stalker_animation_manager.h b/src/xrGame/stalker_animation_manager.h index feef1c534f3..2de33f1a310 100644 --- a/src/xrGame/stalker_animation_manager.h +++ b/src/xrGame/stalker_animation_manager.h @@ -75,7 +75,7 @@ class CStalkerAnimationManager #ifdef USE_HEAD_BONE_PART_FAKE private: u32 m_script_bone_part_mask; -#endif // USE_HEAD_BONE_PART_FAKE +#endif // USE_HEAD_BONE_PART_FAKE private: float m_previous_speed; @@ -109,7 +109,7 @@ class CStalkerAnimationManager m_blend = 0; m_forward = false; } - }; // struct callback_params + }; // struct callback_params private: callback_params m_spine_params; @@ -217,7 +217,7 @@ class CStalkerAnimationManager public: void add_animation_stats(); -#endif // DEBUG +#endif // DEBUG public: IC AnimationSelector const& global_selector() const; diff --git a/src/xrGame/stalker_animation_manager_debug.cpp b/src/xrGame/stalker_animation_manager_debug.cpp index 09b152f6263..93fadcd3d6a 100644 --- a/src/xrGame/stalker_animation_manager_debug.cpp +++ b/src/xrGame/stalker_animation_manager_debug.cpp @@ -9,8 +9,8 @@ #include "stdafx.h" #ifdef DEBUG -#include "stalker_animation_manager.h" #include "ai/stalker/ai_stalker.h" +#include "stalker_animation_manager.h" #pragma warning(push) #pragma warning(disable : 4995) @@ -45,7 +45,7 @@ struct animation_stats u32 m_start_count; IC animation_stats(const shared_str& visual_id, const u32& frame_count, const u32& start_count) - : // m_visual_id (visual_id), + : // m_visual_id (visual_id), m_frame_count(frame_count), m_start_count(start_count) { @@ -214,4 +214,4 @@ void CStalkerAnimationManager::add_animation_stats() add_animation_stats(m_skeleton_animated->LL_MotionDefName_dbg(legs().animation()), legs().blend_id(m_skeleton_animated, blend), legs().m_just_started); } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrGame/stalker_animation_manager_update.cpp b/src/xrGame/stalker_animation_manager_update.cpp index c0db363fc44..91d2980cda7 100644 --- a/src/xrGame/stalker_animation_manager_update.cpp +++ b/src/xrGame/stalker_animation_manager_update.cpp @@ -74,7 +74,7 @@ IC void CStalkerAnimationManager::play_script_impl() head().animation(assign_head_animation()); head().play(m_skeleton_animated, head_play_callback, false, false); } -#else // USE_HEAD_BONE_PART_FAKE +#else // USE_HEAD_BONE_PART_FAKE IC void CStalkerAnimationManager::play_script_impl() { clear_unsafe_callbacks(); @@ -88,7 +88,7 @@ IC void CStalkerAnimationManager::play_script_impl() script().play(m_skeleton_animated, script_play_callback, selected.use_movement_controller(), selected.local_animation(), false, m_script_bone_part_mask); } -#endif // USE_HEAD_BONE_PART_FAKE +#endif // USE_HEAD_BONE_PART_FAKE bool CStalkerAnimationManager::play_script() { @@ -118,7 +118,7 @@ IC void CStalkerAnimationManager::play_global_impl(const MotionID& animation, bo head().animation(assign_head_animation()); head().play(m_skeleton_animated, head_play_callback, false, false); } -#else // USE_HEAD_BONE_PART_FAKE +#else // USE_HEAD_BONE_PART_FAKE IC void CStalkerAnimationManager::play_global_impl(const MotionID& animation, bool const& animation_movement_controller) { head().reset(); @@ -128,7 +128,7 @@ IC void CStalkerAnimationManager::play_global_impl(const MotionID& animation, bo global().animation(animation); global().play(m_skeleton_animated, global_play_callback, false, false, false); } -#endif // USE_HEAD_BONE_PART_FAKE +#endif // USE_HEAD_BONE_PART_FAKE bool CStalkerAnimationManager::play_global() { diff --git a/src/xrGame/stalker_animation_names.cpp b/src/xrGame/stalker_animation_names.cpp index 2893c5d00db..ebb24926958 100644 --- a/src/xrGame/stalker_animation_names.cpp +++ b/src/xrGame/stalker_animation_names.cpp @@ -13,21 +13,21 @@ LPCSTR state_names[] = {"cr_", "norm_", "dmg_norm_", 0}; LPCSTR weapon_names[] = {"0_", "1_", "2_", "3_", "4_", "5_", "6_", "7_", "8_", "9_", "10_", 0}; -LPCSTR weapon_action_names[] = {"draw_", // 0 - "attack_", // 1 - "drop_", // 2 - "holster_", // 3 - "reload_", // 4 - "pick_", // 5 - "aim_", // 6 - "walk_", // 7 - "run_", // 8 - "idle_", // 9 - "prepare_", // 10 - "strap_", // 11 - "unstrap_", // 12 - "look_beack_ls_", // 13 - "look_beack_rs_", // 14 +LPCSTR weapon_action_names[] = {"draw_", // 0 + "attack_", // 1 + "drop_", // 2 + "holster_", // 3 + "reload_", // 4 + "pick_", // 5 + "aim_", // 6 + "walk_", // 7 + "run_", // 8 + "idle_", // 9 + "prepare_", // 10 + "strap_", // 11 + "unstrap_", // 12 + "look_beack_ls_", // 13 + "look_beack_rs_", // 14 0}; LPCSTR movement_names[] = {"walk_", "run_", 0}; @@ -37,31 +37,31 @@ LPCSTR movement_action_names[] = {"fwd_", "back_", "ls_", "rs_", 0}; LPCSTR in_place_names[] = {"idle_0", "idle_1", "turn_right_0", "turn_left_0", "turn_right_1", "turn_left_1", "jump_begin", "jump_idle", "jump_end", "jump_end_1", 0}; -LPCSTR global_names[] = {"damage_", // 0 - "escape_", // 1 - "dead_stop_", // 2 - "hello_", // 3 +LPCSTR global_names[] = {"damage_", // 0 + "escape_", // 1 + "dead_stop_", // 2 + "hello_", // 3 - "1_critical_hit_head_", // 4 - "1_critical_hit_torso_", // 5 - "1_critical_hit_hend_left_", // 6 - "1_critical_hit_hend_right_", // 7 - "1_critical_hit_legs_left_", // 8 - "1_critical_hit_legs_right_", // 9 + "1_critical_hit_head_", // 4 + "1_critical_hit_torso_", // 5 + "1_critical_hit_hend_left_", // 6 + "1_critical_hit_hend_right_", // 7 + "1_critical_hit_legs_left_", // 8 + "1_critical_hit_legs_right_", // 9 - "2_critical_hit_head_", // 10 - "2_critical_hit_torso_", // 11 - "2_critical_hit_hend_left_", // 12 - "2_critical_hit_hend_right_", // 13 - "2_critical_hit_legs_left_", // 14 - "2_critical_hit_legs_right_", // 15 + "2_critical_hit_head_", // 10 + "2_critical_hit_torso_", // 11 + "2_critical_hit_hend_left_", // 12 + "2_critical_hit_hend_right_", // 13 + "2_critical_hit_legs_left_", // 14 + "2_critical_hit_legs_right_", // 15 - "3_critical_hit_head_", // 16 - "3_critical_hit_torso_", // 17 - "3_critical_hit_hend_left_", // 18 - "3_critical_hit_hend_right_", // 19 - "3_critical_hit_legs_left_", // 20 - "3_critical_hit_legs_right_", // 21 + "3_critical_hit_head_", // 16 + "3_critical_hit_torso_", // 17 + "3_critical_hit_hend_left_", // 18 + "3_critical_hit_hend_right_", // 19 + "3_critical_hit_legs_left_", // 20 + "3_critical_hit_legs_right_", // 21 "panic_stand_", 0}; diff --git a/src/xrGame/stalker_animation_offsets.hpp b/src/xrGame/stalker_animation_offsets.hpp index 734430ca19c..bdf13b33344 100644 --- a/src/xrGame/stalker_animation_offsets.hpp +++ b/src/xrGame/stalker_animation_offsets.hpp @@ -34,4 +34,4 @@ class animation_offsets : private debug::make_final void load(LPCSTR section); }; -#endif // STALKER_ANIMATION_OFFSETS_HPP_INCLUDED \ No newline at end of file +#endif // STALKER_ANIMATION_OFFSETS_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_animation_pair.cpp b/src/xrGame/stalker_animation_pair.cpp index a0cb0bad602..0877ed4dd45 100644 --- a/src/xrGame/stalker_animation_pair.cpp +++ b/src/xrGame/stalker_animation_pair.cpp @@ -104,7 +104,7 @@ void CStalkerAnimationPair::play(IKinematicsAnimated* skeleton_animated, PlayCal #ifdef DEBUG m_just_started = false; -#endif // DEBUG +#endif // DEBUG return; } @@ -115,7 +115,7 @@ void CStalkerAnimationPair::play(IKinematicsAnimated* skeleton_animated, PlayCal #ifdef DEBUG m_just_started = true; -#endif // DEBUG +#endif // DEBUG if (!global_animation()) { // here we should know if it is a head @@ -193,7 +193,7 @@ std::pair* CStalkerAnimationPair::blend_id( result = skeleton_animated->LL_MotionDefName_dbg(b->motionID); return (&result); } -#endif // DEBUG +#endif // DEBUG void CStalkerAnimationPair::select_animation(const ANIM_VECTOR& array, const ANIMATION_WEIGHTS* weights) { @@ -277,10 +277,10 @@ bool CStalkerAnimationPair::use_animation_movement_control( void CStalkerAnimationPair::reset() { -#if 0 // def DEBUG +#if 0 // def DEBUG if (m_animation) Msg ("animation [%s][%s] is reset",m_object_name,m_animation_type_name); -#endif // DEBUG +#endif // DEBUG m_animation.invalidate(); m_blend = 0; diff --git a/src/xrGame/stalker_animation_pair.h b/src/xrGame/stalker_animation_pair.h index 59afb215c87..1361a05d0f4 100644 --- a/src/xrGame/stalker_animation_pair.h +++ b/src/xrGame/stalker_animation_pair.h @@ -24,7 +24,7 @@ class CStalkerAnimationPair { all_bone_parts = u16(0xf), }; -#endif // USE_HEAD_BONE_PART_FAKE +#endif // USE_HEAD_BONE_PART_FAKE public: typedef xr_vector ANIMATION_WEIGHTS; @@ -55,17 +55,17 @@ class CStalkerAnimationPair private: LPCSTR m_object_name; LPCSTR m_animation_type_name; -#endif // DEBUG +#endif // DEBUG private: void select_animation(const ANIM_VECTOR& array, const ANIMATION_WEIGHTS* weights); #ifndef USE_HEAD_BONE_PART_FAKE void play_global_animation(IKinematicsAnimated* skeleton_animated, PlayCallback callback, const bool& use_animation_movement_control, const bool& local_animation, bool mix_animations); -#else // USE_HEAD_BONE_PART_FAKE +#else // USE_HEAD_BONE_PART_FAKE void play_global_animation(IKinematicsAnimated* skeleton_animated, PlayCallback callback, const u32& bone_part, const bool& use_animation_movement_control, const bool& local_animation, bool mix_animations); -#endif // USE_HEAD_BONE_PART_FAKE +#endif // USE_HEAD_BONE_PART_FAKE public: IC CStalkerAnimationPair(CAI_Stalker* object); @@ -86,17 +86,17 @@ class CStalkerAnimationPair #ifndef USE_HEAD_BONE_PART_FAKE void play(IKinematicsAnimated* skeleton_animated, PlayCallback callback, const bool& use_animation_movement_control, const bool& local_animation, bool continue_interrupted_animation = true, bool mix_animations = true); -#else // USE_HEAD_BONE_PART_FAKE +#else // USE_HEAD_BONE_PART_FAKE void play(IKinematicsAnimated* skeleton_animated, PlayCallback callback, const bool& use_animation_movement_control, const bool& local_animation, bool continue_interrupted_animation = true, const u32& bone_part = all_bone_parts, bool mix_animations = true); -#endif // USE_HEAD_BONE_PART_FAKE +#endif // USE_HEAD_BONE_PART_FAKE #ifdef DEBUG public: IC void set_dbg_info(LPCSTR object_name, LPCSTR animation_type_name); BLEND_ID* blend_id(IKinematicsAnimated* skeleton_animated, BLEND_ID& result) const; -#endif // DEBUG +#endif // DEBUG public: IC const CALLBACK_ID* callback(const CALLBACK_ID& callback) const; diff --git a/src/xrGame/stalker_animation_torso.cpp b/src/xrGame/stalker_animation_torso.cpp index 7a8f7ebb041..9875641fed5 100644 --- a/src/xrGame/stalker_animation_torso.cpp +++ b/src/xrGame/stalker_animation_torso.cpp @@ -28,12 +28,12 @@ MotionID CStalkerAnimationManager::aim_animation( if (slot != 2) return (animation[6].A[index]); -#if 1 // def DEBUG +#if 1 // def DEBUG if (animation[6].A.size() < 7) { Msg("! cannot find special danger animations for object with visual %s", object().cNameVisual().c_str()); return (animation[6].A[index]); } -#endif // DEBUG +#endif // DEBUG switch (index) { @@ -45,7 +45,7 @@ MotionID CStalkerAnimationManager::aim_animation( #ifdef DEBUG return (MotionID()); -#endif // DEBUG +#endif // DEBUG } void CStalkerAnimationManager::torso_play_callback(CBlend* blend) @@ -209,7 +209,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& const xr_vector& animation = m_data_storage->m_part_animations.A[body_state].m_torso.A[slot].A; // const xr_vector &animation = - //m_data_storage->m_part_animations.A[eBodyStateStand].m_torso.A[slot].A; + // m_data_storage->m_part_animations.A[eBodyStateStand].m_torso.A[slot].A; switch (m_missile->GetState()) { @@ -218,7 +218,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[0].A.empty()) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (torso().select(animation[0].A)); } case CMissile::eHiding: { @@ -226,7 +226,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[3].A.empty()) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (torso().select(animation[3].A)); } case CMissile::eThrowStart: @@ -236,7 +236,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[1].A.empty()) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[1].A[0]); } case CMissile::eReady: @@ -246,7 +246,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[1].A.size() < 2) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[1].A[1]); } case CMissile::eThrow: @@ -256,7 +256,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[1].A.size() < 3) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[1].A[2]); } case CMissile::eThrowEnd: { @@ -264,7 +264,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[6].A.empty()) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // Msg ("CMissile::eThrowEnd"); return (animation[6].A[0]); } @@ -273,7 +273,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[1].A.size() < 2) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[1].A[1]); } case CMissile::eHidden: { @@ -281,7 +281,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[6].A.empty()) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[6].A[0]); } case CMissile::eIdle: @@ -294,7 +294,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[6].A.empty()) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[6].A[0]); } @@ -303,7 +303,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[6].A.size() < 3) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[6].A[2]); } @@ -311,7 +311,7 @@ MotionID CStalkerAnimationManager::missile_animation(u32 slot, const EBodyState& if (animation[6].A.size() < 4) { Msg("! visual %s", object().cNameVisual().c_str()); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return (animation[6].A[3]); } } diff --git a/src/xrGame/stalker_combat_action_base.cpp b/src/xrGame/stalker_combat_action_base.cpp index af73b4bc042..bcc46d7e547 100644 --- a/src/xrGame/stalker_combat_action_base.cpp +++ b/src/xrGame/stalker_combat_action_base.cpp @@ -254,7 +254,7 @@ void CStalkerActionCombatBase::play_attack_sound( Msg("! I am in combat, but there is no combat members at all (including me), " "npc[%s],team[%d],squad[%d],group[%d]", *object().cName(), object().g_Team(), object().g_Squad(), object().g_Group()); -#endif // DEBUG +#endif // DEBUG if (object().agent_manager().member().combat_members().size() > 1) { if (object().agent_manager().enemy().enemies().size() > 1) @@ -278,7 +278,7 @@ void CStalkerActionCombatBase::play_start_search_sound( Msg("! I am in combat, but there is no combat members at all (including me), " "npc[%s],team[%d],squad[%d],group[%d]", *object().cName(), object().g_Team(), object().g_Squad(), object().g_Group()); -#endif // DEBUG +#endif // DEBUG bool search_with_allies = object().agent_manager().member().combat_members().size() > 1; @@ -296,7 +296,7 @@ void CStalkerActionCombatBase::play_enemy_lost_sound( Msg("! I am in combat, but there is no combat members at all (including me), " "npc[%s],team[%d],squad[%d],group[%d]", *object().cName(), object().g_Team(), object().g_Squad(), object().g_Group()); -#endif // DEBUG +#endif // DEBUG bool search_with_allies = object().agent_manager().member().combat_members().size() > 1; diff --git a/src/xrGame/stalker_combat_actions.cpp b/src/xrGame/stalker_combat_actions.cpp index 2b0b2af024b..393c7e94962 100644 --- a/src/xrGame/stalker_combat_actions.cpp +++ b/src/xrGame/stalker_combat_actions.cpp @@ -42,9 +42,9 @@ #define DISABLE_COVER_BEFORE_DETOUR -#if 0 // def DEBUG +#if 0 // def DEBUG #define TEST_MENTAL_STATE -#endif // DEBUG +#endif // DEBUG const float TEMP_DANGER_DISTANCE = 5.f; const u32 TEMP_DANGER_INTERVAL = 120000; @@ -101,7 +101,7 @@ void CStalkerActionGetItemToKill::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -160,7 +160,7 @@ void CStalkerActionMakeItemKilling::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -237,14 +237,17 @@ void CStalkerActionRetreatFromEnemy::execute() { if (object().memory().visual().visible_now(object().memory().enemy().selected())) { object().movement().set_mental_state(eMentalStateDanger); - // u32 min_queue_size, max_queue_size, min_queue_interval, - //max_queue_interval; + // u32 min_queue_size, max_queue_size, + //min_queue_interval, + // max_queue_interval; // float distance = - //object().memory().enemy().selected()->Position().distance_to(object().Position()); - // select_queue_params (distance,min_queue_size, max_queue_size, min_queue_interval, - //max_queue_interval); - // object().CObjectHandler::set_goal (eObjectActionFire1,object().best_weapon(),min_queue_size, - //max_queue_size, min_queue_interval, max_queue_interval); + // object().memory().enemy().selected()->Position().distance_to(object().Position()); + // select_queue_params (distance,min_queue_size, max_queue_size, + //min_queue_interval, + // max_queue_interval); + // object().CObjectHandler::set_goal + //(eObjectActionFire1,object().best_weapon(),min_queue_size, + // max_queue_size, min_queue_interval, max_queue_interval); fire(); object().sight().setup(CSightAction(object().memory().enemy().selected(), true, true)); } @@ -315,7 +318,7 @@ void CStalkerActionGetReadyToKill::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -399,7 +402,7 @@ void CStalkerActionKillEnemy::initialize() object().movement().set_nearest_accessible_position(); object().movement().set_mental_state(eMentalStateDanger); // object().movement().set_body_state (m_storage->property(eWorldPropertyUseCrouchToLookOut) ? - //eBodyStateCrouch : eBodyStateStand); + // eBodyStateCrouch : eBodyStateStand); object().movement().set_movement_type(eMovementTypeStand); m_storage->set_property(eWorldPropertyLookedOut, false); m_storage->set_property(eWorldPropertyPositionHolded, false); @@ -419,7 +422,7 @@ void CStalkerActionKillEnemy::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -427,11 +430,11 @@ void CStalkerActionKillEnemy::execute() // u32 min_queue_size, max_queue_size, min_queue_interval, max_queue_interval; // float distance = - //object().memory().enemy().selected()->Position().distance_to(object().Position()); + // object().memory().enemy().selected()->Position().distance_to(object().Position()); // select_queue_params (distance,min_queue_size, max_queue_size, min_queue_interval, - //max_queue_interval); + // max_queue_interval); // object().CObjectHandler::set_goal (eObjectActionFire1,object().best_weapon(),min_queue_size, max_queue_size, - //min_queue_interval, max_queue_interval); + // min_queue_interval, max_queue_interval); fire(); if (object().memory().enemy().selected()) { @@ -490,7 +493,7 @@ void CStalkerActionTakeCover::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -531,7 +534,7 @@ void CStalkerActionTakeCover::execute() } if (object().movement().path_completed()) - { // && (object().memory().enemy().selected()->Position().distance_to_sqr(object().Position()) >= 10.f)) + { // && (object().memory().enemy().selected()->Position().distance_to_sqr(object().Position()) >= 10.f)) object().best_cover_can_try_advance(); m_storage->set_property(eWorldPropertyInCover, true); } @@ -606,7 +609,7 @@ void CStalkerActionLookOut::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -625,11 +628,11 @@ void CStalkerActionLookOut::execute() Fvector position = mem_object.m_object_params.m_position; object().m_ce_close->setup(position, 0.f, 170.f, 10.f); const CCoverPoint* point = ai().cover_manager().best_cover( - object().Position(), 10.f, *object().m_ce_close); //,CStalkerMovementRestrictor(m_object,true,false)); + object().Position(), 10.f, *object().m_ce_close); //,CStalkerMovementRestrictor(m_object,true,false)); if (!point || (point->position().similar(object().Position()) && object().movement().path_completed())) { object().m_ce_close->setup(position, 0.f, 170.f, 10.f); point = ai().cover_manager().best_cover( - object().Position(), 30.f, *object().m_ce_close); //,CStalkerMovementRestrictor(m_object,true,false)); + object().Position(), 30.f, *object().m_ce_close); //,CStalkerMovementRestrictor(m_object,true,false)); } if (point) { @@ -689,7 +692,7 @@ void CStalkerActionHoldPosition::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -778,7 +781,7 @@ void CStalkerActionDetourEnemy::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -895,7 +898,7 @@ void CStalkerActionHideFromGrenade::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -982,7 +985,7 @@ void CStalkerActionSuddenAttack::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -1097,7 +1100,7 @@ void CStalkerActionKillEnemyIfPlayerOnThePath::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); diff --git a/src/xrGame/stalker_combat_planner.cpp b/src/xrGame/stalker_combat_planner.cpp index 1f94ff4fc31..cb00ab1922f 100644 --- a/src/xrGame/stalker_combat_planner.cpp +++ b/src/xrGame/stalker_combat_planner.cpp @@ -116,7 +116,7 @@ void CStalkerCombatPlanner::initialize() #ifdef DEBUG // inherited_planner::m_use_log = true; -#endif // DEBUG +#endif // DEBUG if (!m_loaded) { CScriptActionPlanner::m_storage.set_property(eWorldPropertyInCover, false); diff --git a/src/xrGame/stalker_danger_in_direction_actions.cpp b/src/xrGame/stalker_danger_in_direction_actions.cpp index 29ee43c5859..9f24c3fb8fc 100644 --- a/src/xrGame/stalker_danger_in_direction_actions.cpp +++ b/src/xrGame/stalker_danger_in_direction_actions.cpp @@ -93,11 +93,9 @@ void CStalkerActionDangerInDirectionTakeCover::execute() // object().brain().affect_cover (true); } - if (object() - .movement() - .path_completed()) // && - // (object().memory().enemy().selected()->Position().distance_to_sqr(object().Position()) - // >= 10.f)) + if (object().movement().path_completed()) // && + // (object().memory().enemy().selected()->Position().distance_to_sqr(object().Position()) + // >= 10.f)) m_storage->set_property(eWorldPropertyInCover, true); } @@ -147,7 +145,7 @@ void CStalkerActionDangerInDirectionLookOut::execute() inherited::execute(); // CMemoryInfo mem_object = - //object().memory().memory(object().memory().danger().selected()->object()); + // object().memory().memory(object().memory().danger().selected()->object()); // // if (!mem_object.m_object) // return; @@ -227,7 +225,7 @@ void CStalkerActionDangerInDirectionHoldPosition::execute() inherited::execute(); // CMemoryInfo mem_object = - //object().memory().memory(object().memory().danger().selected()->object()); + // object().memory().memory(object().memory().danger().selected()->object()); // // if (!mem_object.m_object) // return; diff --git a/src/xrGame/stalker_flair.cpp b/src/xrGame/stalker_flair.cpp index 17f0f101b3b..eee7db8c5a9 100644 --- a/src/xrGame/stalker_flair.cpp +++ b/src/xrGame/stalker_flair.cpp @@ -37,4 +37,4 @@ void stalker_flair::OnPlayerTakeArtefact(game_PlayerState const* ps) } } -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/stalker_flair.h b/src/xrGame/stalker_flair.h index dd5768e588b..6f89c2425bf 100644 --- a/src/xrGame/stalker_flair.h +++ b/src/xrGame/stalker_flair.h @@ -26,12 +26,12 @@ class stalker_flair : public player_state_param protected: u32 m_art_spawn_time; u32 m_art_take_time; -}; // class stalker_flair +}; // class stalker_flair ADD_ACCUMULATIVE_STATE(acpv_stalker_flair, stalker_flair); #undef ACCUMULATIVE_STATE_LIST #define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_stalker_flair, stalker_flair) -} // namespace award_system +} // namespace award_system -#endif //#ifndef PLAYER_STATE_BLITZKRIEG_INCLUDED \ No newline at end of file +#endif //#ifndef PLAYER_STATE_BLITZKRIEG_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_get_distance_planner.cpp b/src/xrGame/stalker_get_distance_planner.cpp index 749042739bd..e3fde80874a 100644 --- a/src/xrGame/stalker_get_distance_planner.cpp +++ b/src/xrGame/stalker_get_distance_planner.cpp @@ -44,7 +44,7 @@ void CStalkerGetDistancePlanner::setup(CAI_Stalker* object, CPropertyStorage* st void CStalkerGetDistancePlanner::add_evaluators() { add_evaluator(eWorldPropertyInCover, - new CStalkerPropertyEvaluatorMember((CPropertyStorage*)0, //&CScriptActionPlanner::m_storage, + new CStalkerPropertyEvaluatorMember((CPropertyStorage*)0, //&CScriptActionPlanner::m_storage, eWorldPropertyInCover, true, true, "in cover")); add_evaluator( diff --git a/src/xrGame/stalker_low_cover_actions.h b/src/xrGame/stalker_low_cover_actions.h index a1b3f3671ac..a4e27c5a430 100644 --- a/src/xrGame/stalker_low_cover_actions.h +++ b/src/xrGame/stalker_low_cover_actions.h @@ -75,4 +75,4 @@ class CStalkerActionHoldPositionLowCover : public CStalkerActionCombatBase virtual void finalize(); }; -#endif // STALKER_LOW_COVER_ACTIONS_H_INCLUDED \ No newline at end of file +#endif // STALKER_LOW_COVER_ACTIONS_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_low_cover_planner.h b/src/xrGame/stalker_low_cover_planner.h index 5f27eebc70d..5e14efbe9a8 100644 --- a/src/xrGame/stalker_low_cover_planner.h +++ b/src/xrGame/stalker_low_cover_planner.h @@ -31,4 +31,4 @@ class stalker_low_cover_planner : public CActionPlannerActionScript virtual void finalize(); }; -#endif // STALKER_LOW_COVER_PLANNER_H_INCLUDED \ No newline at end of file +#endif // STALKER_LOW_COVER_PLANNER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_manager_base.cpp b/src/xrGame/stalker_movement_manager_base.cpp index 56e50659b7e..4c18211eab2 100644 --- a/src/xrGame/stalker_movement_manager_base.cpp +++ b/src/xrGame/stalker_movement_manager_base.cpp @@ -25,11 +25,11 @@ #include "xrAICore/Navigation/ai_object_location.h" #ifdef DEBUG -#include "stalker_decision_space.h" -#include "stalker_planner.h" #include "script_game_object.h" #include "stalker_combat_planner.h" -#endif // DEBUG +#include "stalker_decision_space.h" +#include "stalker_planner.h" +#endif // DEBUG using namespace StalkerMovement; @@ -53,7 +53,7 @@ class sight_manager_enable_guard : private Noncopyable m_manager.enable(m_value); } -}; // struct sight_manager_enable_guard +}; // struct sight_manager_enable_guard stalker_movement_manager_base::stalker_movement_manager_base(CAI_Stalker* object) : inherited(object), m_last_query_object(0), m_last_query_position(Fvector().set(flt_max, flt_max, flt_max)), @@ -464,7 +464,7 @@ void stalker_movement_manager_base::parse_velocity_mask(stalker_movement_params& Msg("~ stalker %s is doing bad thing (action %s)", *m_object->cName(), planner.current_action().m_action_name); } -#endif // DEBUG +#endif // DEBUG movement_params.m_mental_state = eMentalStateFree; break; } @@ -731,7 +731,7 @@ void stalker_movement_manager_base::check_for_bad_path(stalker_movement_params& if (angle > BAD_PATH_ANGLE) { #ifdef DEBUG Msg("bad path check changed movement type from RUN to WALK"); -#endif // DEBUG +#endif // DEBUG movement_params.m_movement_type = eMovementTypeWalk; return; } diff --git a/src/xrGame/stalker_movement_manager_base.h b/src/xrGame/stalker_movement_manager_base.h index e3ba2381a28..59e2473935c 100644 --- a/src/xrGame/stalker_movement_manager_base.h +++ b/src/xrGame/stalker_movement_manager_base.h @@ -14,11 +14,11 @@ #include "stalker_movement_params.h" #ifdef DEBUG -#include "detail_path_manager.h" #include "ai/stalker/ai_stalker.h" -#else // #ifdef DEBUG +#include "detail_path_manager.h" +#else // #ifdef DEBUG #include "detail_path_manager_space.h" -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG using namespace MonsterSpace; @@ -132,8 +132,8 @@ class stalker_movement_manager_base : public CMovementManager float m_last_query_distance; bool m_last_query_result; bool m_force_update; -}; // class stalker_movement_manager_base +}; // class stalker_movement_manager_base #include "stalker_movement_manager_base_inline.h" -#endif // #ifndef STALKER_MOVEMENT_MANAGER_BASE_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_MANAGER_BASE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_manager_base_inline.h b/src/xrGame/stalker_movement_manager_base_inline.h index f5f5b32360c..7264d576d8d 100644 --- a/src/xrGame/stalker_movement_manager_base_inline.h +++ b/src/xrGame/stalker_movement_manager_base_inline.h @@ -52,7 +52,7 @@ IC void stalker_movement_manager_base::set_mental_state(EMentalState mental_stat THROW((m_target.m_body_state != eBodyStateCrouch) || (mental_state != eMentalStateFree)); m_target.m_mental_state = mental_state; //#pragma todo("Dima to Dima: this is correct, commented just because of the October presentation, no time right now - //to fix it correctly, should be fixed sometimes later") + // to fix it correctly, should be fixed sometimes later") //. m_path_actuality = m_path_actuality && (m_target.m_mental_state == m_current.m_mental_state); } @@ -137,4 +137,4 @@ IC stalker_movement_params& stalker_movement_manager_base::target_params() return (m_target); } -#endif // #ifndef STALKER_MOVEMENT_MANAGER_BASE_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_MANAGER_BASE_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_manager_obstacles.cpp b/src/xrGame/stalker_movement_manager_obstacles.cpp index 1c9361497a5..c767c95eeb8 100644 --- a/src/xrGame/stalker_movement_manager_obstacles.cpp +++ b/src/xrGame/stalker_movement_manager_obstacles.cpp @@ -22,7 +22,7 @@ #ifndef MASTER_GOLD #include "ai_debug.h" -#endif // MASTER_GOLD +#endif // MASTER_GOLD static const u32 fail_check_time = 1000; @@ -123,7 +123,7 @@ void stalker_movement_manager_obstacles::move_along_path_impl( { #ifndef MASTER_GOLD if (psAI_Flags.test(aiObstaclesAvoidingStatic)) -#endif // MASTER_GOLD +#endif // MASTER_GOLD { m_dynamic_obstacles.update(); if (!m_dynamic_obstacles.movement_enabled()) { @@ -142,7 +142,7 @@ void stalker_movement_manager_obstacles::move_along_path_impl( if ( #ifndef MASTER_GOLD (!psAI_Flags.test(aiObstaclesAvoidingStatic) && m_dynamic_obstacles.need_path_to_rebuild()) || -#endif // MASTER_GOLD +#endif // MASTER_GOLD m_static_obstacles.need_path_to_rebuild()) rebuild_path(); @@ -155,8 +155,9 @@ void stalker_movement_manager_obstacles::move_along_path( VERIFY(m_doors_actor); if (!ai().doors().actualize_doors_state(*m_doors_actor, old_desirable_speed())) { - // Msg ( "%6d stalker %s waits for the some door to be open/closed", Device.dwTimeGlobal, - //object().cName().c_str() ); + // Msg ( "%6d stalker %s waits for the some door to be open/closed", + //Device.dwTimeGlobal, + // object().cName().c_str() ); float desirable_speed = old_desirable_speed(); set_desirable_speed(0.f); @@ -173,7 +174,7 @@ void stalker_movement_manager_obstacles::move_along_path( inherited::move_along_path(movement_control, dest_position, time_delta); return; } -#endif // MASTER_GOLD +#endif // MASTER_GOLD if (Device.dwTimeGlobal < (m_last_fail_time + fail_check_time)) { inherited::move_along_path(movement_control, dest_position, time_delta); @@ -232,7 +233,7 @@ static float get_distance(Fvector const& a_first, Fvector const& a_second, Fvect #ifdef DEBUG return -1.f; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } float stalker_movement_manager_obstacles::is_going_through( diff --git a/src/xrGame/stalker_movement_manager_obstacles.h b/src/xrGame/stalker_movement_manager_obstacles.h index 1870c2b00f2..a7e980d4fc2 100644 --- a/src/xrGame/stalker_movement_manager_obstacles.h +++ b/src/xrGame/stalker_movement_manager_obstacles.h @@ -16,7 +16,7 @@ namespace doors { class actor; -} // namespace doors +} // namespace doors class CRestrictedObjectObstacle; @@ -72,7 +72,7 @@ class stalker_movement_manager_obstacles : public stalker_movement_manager_base virtual const float& prediction_speed() const; #ifdef DEBUG inline doors::actor const& get_doors_actor() const { return *m_doors_actor; } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG #ifdef DEBUG private: @@ -81,7 +81,7 @@ class stalker_movement_manager_obstacles : public stalker_movement_manager_base private: KEY_POINTS m_detail_key_points; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG private: bool m_saved_state; @@ -101,8 +101,8 @@ class stalker_movement_manager_obstacles : public stalker_movement_manager_base u32 m_last_fail_time; xr_vector m_temp_path; bool m_failed_to_build_path; -}; // class stalker_movement_manager_obstacles +}; // class stalker_movement_manager_obstacles #include "stalker_movement_manager_obstacles_inline.h" -#endif // #ifndef STALKER_MOVEMENT_MANAGER_OBSTACLES_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_MANAGER_OBSTACLES_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_manager_obstacles_inline.h b/src/xrGame/stalker_movement_manager_obstacles_inline.h index 2e0d3931c3a..bc454450cc2 100644 --- a/src/xrGame/stalker_movement_manager_obstacles_inline.h +++ b/src/xrGame/stalker_movement_manager_obstacles_inline.h @@ -15,4 +15,4 @@ IC CRestrictedObjectObstacle& stalker_movement_manager_obstacles::restricted_obj return (*m_restricted_object); } -#endif // #ifndef STALKER_MOVEMENT_MANAGER_OBSTACLES_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_MANAGER_OBSTACLES_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_manager_obstacles_path.cpp b/src/xrGame/stalker_movement_manager_obstacles_path.cpp index c71d64efd40..c40740ca050 100644 --- a/src/xrGame/stalker_movement_manager_obstacles_path.cpp +++ b/src/xrGame/stalker_movement_manager_obstacles_path.cpp @@ -21,7 +21,7 @@ #ifndef MASTER_GOLD #include "ai_debug.h" -#endif // MASTER_GOLD +#endif // MASTER_GOLD static const float check_time_delta = 1.f; @@ -48,7 +48,7 @@ bool stalker_movement_manager_obstacles::simulate_path_navigation() // Fvector dir_to_target; // float distance; // current_position = - //path_position(1.f,current_position,check_time_delta,current_travel_point,distance,dist_to_target,dir_to_target); + // path_position(1.f,current_position,check_time_delta,current_travel_point,distance,dist_to_target,dir_to_target); previous_position = current_position; current_position = predict_position(check_time_delta, current_position, current_travel_point, 1.f); } @@ -74,7 +74,7 @@ void stalker_movement_manager_obstacles::save_current_state() m_detail_path.swap(detail().path()); #ifdef DEBUG m_detail_key_points.swap(detail().key_points()); -#endif // DEBUG +#endif // DEBUG m_detail_last_patrol_point = detail().last_patrol_point(); m_saved_current_iteration.copy(m_static_obstacles.current_iteration()); } @@ -88,7 +88,7 @@ void stalker_movement_manager_obstacles::restore_current_state() detail().m_current_travel_point = m_detail_current_index; #ifdef DEBUG m_detail_key_points.swap(detail().key_points()); -#endif // DEBUG +#endif // DEBUG detail().last_patrol_point(m_detail_last_patrol_point); m_saved_current_iteration.swap(m_static_obstacles.current_iteration()); } @@ -106,12 +106,12 @@ void stalker_movement_manager_obstacles::build_level_path() inherited::build_level_path(); return; } -#endif // MASTER_GOLD +#endif // MASTER_GOLD #ifdef DEBUG CTimer timer; timer.Start(); -#endif // DEBUG +#endif // DEBUG if (m_last_dest_vertex_id != level_path().dest_vertex_id()) remove_query_objects(object().Position(), 5.f); @@ -129,7 +129,7 @@ void stalker_movement_manager_obstacles::build_level_path() #ifndef MASTER_GOLD if (!psAI_Flags.test(aiObstaclesAvoidingStatic)) m_dynamic_obstacles.inactive_query().copy(m_dynamic_obstacles.active_query()); -#endif // MASTER_GOLD +#endif // MASTER_GOLD bool pure_search_tried = false; bool pure_search_result = false; @@ -157,7 +157,7 @@ void stalker_movement_manager_obstacles::build_level_path() if (!pure_search_result) { #ifndef MASTER_GOLD Msg("! level_path().failed() during navigation"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD break; } } @@ -165,5 +165,5 @@ void stalker_movement_manager_obstacles::build_level_path() m_last_dest_vertex_id = level_path().dest_vertex_id(); // Msg ("[%6d][%6d][%s][%f] - //build_level_path",Device.dwFrame,Device.dwTimeGlobal,*object().cName(),timer.GetElapsed_sec()*1000.f); + // build_level_path",Device.dwFrame,Device.dwTimeGlobal,*object().cName(),timer.GetElapsed_sec()*1000.f); } diff --git a/src/xrGame/stalker_movement_manager_smart_cover.cpp b/src/xrGame/stalker_movement_manager_smart_cover.cpp index 5d6ceb01a36..a11b470894c 100644 --- a/src/xrGame/stalker_movement_manager_smart_cover.cpp +++ b/src/xrGame/stalker_movement_manager_smart_cover.cpp @@ -29,7 +29,7 @@ namespace smart_cover { shared_str transform_vertex(shared_str const& vertex_id, bool const& in); -} // namespace smart_cover +} // namespace smart_cover stalker_movement_manager_smart_cover::stalker_movement_manager_smart_cover(CAI_Stalker* object) : inherited(object), m_property_storage(0), m_current_transition(0), m_current_transition_animation(0), @@ -103,7 +103,7 @@ void stalker_movement_manager_smart_cover::enter_smart_cover() { #ifdef DEBUG Msg("setting up cover: %s (%s)", m_enter_cover_id.c_str(), m_enter_cover_id.c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_current.cover_id(m_enter_cover_id); m_current.cover_loophole_id(m_enter_loophole_id); } @@ -275,7 +275,7 @@ void stalker_movement_manager_smart_cover::reach_enter_location(u32 const& time_ #ifdef DEBUG animation.global_modifier( CStalkerAnimationManager::AnimationModifier(this, &stalker_movement_manager_smart_cover::modify_animation)); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } void stalker_movement_manager_smart_cover::enter_smart_cover(u32 const& time_delta) @@ -307,7 +307,7 @@ void stalker_movement_manager_smart_cover::on_smart_cover_exit() unbind_global_selector(); #ifdef DEBUG Msg("exiting from cover: %s", m_current.cover_id().c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_current.cover_id(""); inherited::update(m_current); } @@ -329,7 +329,7 @@ IC u32 to_u32(shared_str const& string) return (*(u32 const*)&get); } -} // namespace hash_fixed_vertex_manager +} // namespace hash_fixed_vertex_manager void stalker_movement_manager_smart_cover::loophole_path(smart_cover::cover const& cover, shared_str const& source_raw, shared_str const& target_raw, LoopholePath& path) const @@ -368,7 +368,7 @@ void stalker_movement_manager_smart_cover::bind_global_selector() #ifdef DEBUG animation.global_modifier(CStalkerAnimationManager::AnimationModifier( &animation_selector(), &smart_cover::animation_selector::modify_animation)); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG if (!m_current.cover()) return; @@ -385,7 +385,7 @@ void stalker_movement_manager_smart_cover::unbind_global_selector() animation.global_callback(CStalkerAnimationManager::AnimationCallback()); #ifdef DEBUG animation.global_modifier(CStalkerAnimationManager::AnimationModifier()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG object().animation().global().target_matrix(); } @@ -399,7 +399,7 @@ stalker_movement_manager_smart_cover::current_transition() m_current.cover() ? m_current.cover_loophole()->id().c_str() : "", m_target.cover() ? m_target.cover()->id().c_str() : "", m_target.cover() ? m_target.cover_loophole()->id().c_str() : "", m_path.size()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG VERIFY((m_current.cover() != m_target.cover()) || !m_current.cover() || (m_current.cover_loophole() != m_target.cover_loophole())); diff --git a/src/xrGame/stalker_movement_manager_smart_cover.h b/src/xrGame/stalker_movement_manager_smart_cover.h index 1ad6fb61cb2..d4275445256 100644 --- a/src/xrGame/stalker_movement_manager_smart_cover.h +++ b/src/xrGame/stalker_movement_manager_smart_cover.h @@ -27,8 +27,8 @@ namespace transitions { class action; class animation_action; -} // namespace transitions -} // namespace smart_cover +} // namespace transitions +} // namespace smart_cover template class CScriptCallbackEx; @@ -184,8 +184,8 @@ class stalker_movement_manager_smart_cover : public stalker_movement_manager_obs bool m_default_behaviour; bool m_check_can_kill_enemy; bool m_combat_behaviour; -}; // class stalker_movement_manager_smart_cover +}; // class stalker_movement_manager_smart_cover #include "stalker_movement_manager_smart_cover_inline.h" -#endif // #ifndef STALKER_MOVEMENT_MANAGER_SMART_COVER_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_MANAGER_SMART_COVER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_manager_smart_cover_inline.h b/src/xrGame/stalker_movement_manager_smart_cover_inline.h index 3c5307e4b7b..6cd38ae68f1 100644 --- a/src/xrGame/stalker_movement_manager_smart_cover_inline.h +++ b/src/xrGame/stalker_movement_manager_smart_cover_inline.h @@ -74,4 +74,4 @@ IC bool stalker_movement_manager_smart_cover::combat_behaviour() const return (m_combat_behaviour); } -#endif // #ifndef STALKER_MOVEMENT_MANAGER_SMART_COVER_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_MANAGER_SMART_COVER_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_manager_smart_cover_loopholes.cpp b/src/xrGame/stalker_movement_manager_smart_cover_loopholes.cpp index de3da790c50..8ded87703d6 100644 --- a/src/xrGame/stalker_movement_manager_smart_cover_loopholes.cpp +++ b/src/xrGame/stalker_movement_manager_smart_cover_loopholes.cpp @@ -26,7 +26,7 @@ namespace smart_cover { shared_str transform_vertex(shared_str const& vertex_id, bool const& in); -} // namespace smart_cover +} // namespace smart_cover using smart_cover::loophole; using MemorySpace::CMemoryInfo; @@ -114,7 +114,7 @@ bool stalker_movement_manager_smart_cover::test_pick(Fvector source, Fvector des CAI_Stalker* m_object; inline parameters(float& range, CAI_Stalker& object) : m_range(&range), m_object(&object) {} - }; // struct parameters + }; // struct parameters struct test_pick { @@ -480,7 +480,7 @@ void stalker_movement_manager_smart_cover::go_next_loophole() VERIFY(!m_current.cover()); #ifdef DEBUG Msg("setting up cover (direct from target): %s (%s)", m_target.cover_id().c_str(), m_enter_cover_id.c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_current.cover_id(m_target.cover_id()); m_current.cover_loophole_id(m_path[1]); return; @@ -492,7 +492,7 @@ void stalker_movement_manager_smart_cover::go_next_loophole() VERIFY(m_path.size() == 2); #ifdef DEBUG Msg("exiting from cover: %s", m_current.cover_id().c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG m_current.cover_id(""); on_smart_cover_exit(); return; diff --git a/src/xrGame/stalker_movement_params.cpp b/src/xrGame/stalker_movement_params.cpp index c01fae30895..6bd646b644b 100644 --- a/src/xrGame/stalker_movement_params.cpp +++ b/src/xrGame/stalker_movement_params.cpp @@ -123,7 +123,7 @@ struct loophole_id_predicate IC loophole_id_predicate(shared_str const& id) : m_id(id) {} IC bool operator()(smart_cover::loophole* loophole) const { return (loophole->id()._get() == m_id._get()); } -}; // struct loophole_id_predicate +}; // struct loophole_id_predicate void stalker_movement_params::cover_loophole_id(shared_str const& loophole_id) { diff --git a/src/xrGame/stalker_movement_params.h b/src/xrGame/stalker_movement_params.h index 8843b64ace7..88be35b273e 100644 --- a/src/xrGame/stalker_movement_params.h +++ b/src/xrGame/stalker_movement_params.h @@ -119,8 +119,8 @@ class stalker_movement_params mutable loophole_type const* m_cover_selected_loophole; mutable u32 m_last_selection_time; mutable bool m_selected_loophole_actual; -}; // class stalker_movement_params +}; // class stalker_movement_params #include "stalker_movement_params_inline.h" -#endif // #ifndef STALKER_MOVEMENT_PARAMS_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_PARAMS_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_movement_params_inline.h b/src/xrGame/stalker_movement_params_inline.h index f8b5d07d18d..3cc5d17f0f7 100644 --- a/src/xrGame/stalker_movement_params_inline.h +++ b/src/xrGame/stalker_movement_params_inline.h @@ -97,4 +97,4 @@ IC Fvector const* stalker_movement_params::cover_fire_position() const return (m_cover_fire_position); } -#endif // #ifndef STALKER_MOVEMENT_PARAMS_INLINE_H_INCLUDED \ No newline at end of file +#endif // #ifndef STALKER_MOVEMENT_PARAMS_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_property_evaluators.cpp b/src/xrGame/stalker_property_evaluators.cpp index 6f6a2ff130e..35f89e72d36 100644 --- a/src/xrGame/stalker_property_evaluators.cpp +++ b/src/xrGame/stalker_property_evaluators.cpp @@ -423,7 +423,7 @@ _value_type CStalkerPropertyEvaluatorShouldThrowGrenade::evaluate() { #if 0 return (false); -#else // #if 1 +#else // #if 1 if (m_storage->property(eWorldPropertyStartedToThrowGrenade)) return (true); @@ -467,7 +467,7 @@ _value_type CStalkerPropertyEvaluatorShouldThrowGrenade::evaluate() // do throw grenade return (true); -#endif // #if 1 +#endif // #if 1 } ////////////////////////////////////////////////////////////////////////// diff --git a/src/xrGame/stalker_search_actions.cpp b/src/xrGame/stalker_search_actions.cpp index f5cc513774b..d20e0d68a35 100644 --- a/src/xrGame/stalker_search_actions.cpp +++ b/src/xrGame/stalker_search_actions.cpp @@ -72,7 +72,7 @@ void CStalkerActionReachEnemyLocation::execute() { #ifdef TEST_MENTAL_STATE VERIFY((start_level_time() == Device.dwTimeGlobal) || (object().movement().mental_state() == eMentalStateDanger)); -#endif // TEST_MENTAL_STATE +#endif // TEST_MENTAL_STATE inherited::execute(); @@ -125,7 +125,7 @@ void CStalkerActionReachEnemyLocation::execute() #ifndef SILENT_COMBAT play_start_search_sound(0, 0, 10000, 10000); -#endif // SILENT_COMBAT +#endif // SILENT_COMBAT } } else @@ -198,7 +198,7 @@ void CStalkerActionReachAmbushLocation::execute() if (!object().movement().path_completed()) { #ifndef SILENT_COMBAT play_enemy_lost_sound(0, 0, 10000, 10000); -#endif // SILENT_COMBAT +#endif // SILENT_COMBAT return; } diff --git a/src/xrGame/stalker_search_actions.h b/src/xrGame/stalker_search_actions.h index b862f45c4fd..c93741a90d4 100644 --- a/src/xrGame/stalker_search_actions.h +++ b/src/xrGame/stalker_search_actions.h @@ -73,4 +73,4 @@ class CStalkerActionHoldAmbushLocation : public CStalkerActionCombatBase virtual void finalize(); }; -#endif // STALKER_SEARCH_ACTIONS_H_INCLUDED \ No newline at end of file +#endif // STALKER_SEARCH_ACTIONS_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_search_planner.h b/src/xrGame/stalker_search_planner.h index d98db4d5a6b..f4b536a09f4 100644 --- a/src/xrGame/stalker_search_planner.h +++ b/src/xrGame/stalker_search_planner.h @@ -30,4 +30,4 @@ class CStalkerSearchPlanner : public CActionPlannerActionScript virtual void finalize(); }; -#endif // STALKER_SEARCH_PLANNER_H_INCLUDED \ No newline at end of file +#endif // STALKER_SEARCH_PLANNER_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stalker_sound_data_visitor.cpp b/src/xrGame/stalker_sound_data_visitor.cpp index be66a9218f0..cb82ef754ad 100644 --- a/src/xrGame/stalker_sound_data_visitor.cpp +++ b/src/xrGame/stalker_sound_data_visitor.cpp @@ -43,11 +43,11 @@ void CStalkerSoundDataVisitor::visit(CStalkerSoundData* data) if (!object().g_Alive()) return; #ifdef DEBUG Msg("%s : Adding fiction hit by sound info from stalker %s", *object().cName(), *data->object().cName()); -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG object().memory().make_object_visible_somewhen(data->object().memory().enemy().selected()); // const MemorySpace::CHitObject *m = - //data->object().memory().hit().hit(data->object().memory().enemy().selected()); + // data->object().memory().hit().hit(data->object().memory().enemy().selected()); // if (!m) // return; // object().memory().hit().add (*m); diff --git a/src/xrGame/state_arguments_functions.cpp b/src/xrGame/state_arguments_functions.cpp index 5ce105b730b..5a1a078ede9 100644 --- a/src/xrGame/state_arguments_functions.cpp +++ b/src/xrGame/state_arguments_functions.cpp @@ -11,4 +11,4 @@ le_function functions_cf::le_function; ge_function functions_cf::ge_function; le_function functions_cf::le_function; -} // namespace award_system \ No newline at end of file +} // namespace award_system \ No newline at end of file diff --git a/src/xrGame/state_arguments_functions.h b/src/xrGame/state_arguments_functions.h index 10a10aebc51..3eb95437381 100644 --- a/src/xrGame/state_arguments_functions.h +++ b/src/xrGame/state_arguments_functions.h @@ -9,21 +9,21 @@ class binary_function { public: virtual bool exec(T const left, T const right) = 0; -}; // float_binary_function +}; // float_binary_function template class ge_function : public binary_function { public: virtual bool exec(T const left, T const right) { return left >= right; } -}; // class float_ge_function +}; // class float_ge_function template class le_function : public binary_function { public: virtual bool exec(T const left, T const right) { return left <= right; } -}; // float_le_function +}; // float_le_function template class functions_cf @@ -35,7 +35,7 @@ class functions_cf tt_greater_equal = 0x00, tt_less_equal, tt_count - }; // enum type_tags + }; // enum type_tags static function_type* get_function(enum_type_tags ftype) { @@ -47,7 +47,7 @@ class functions_cf case tt_less_equal: { return &le_function; } break; - }; // switch (ftype) + }; // switch (ftype) return NULL; } @@ -62,6 +62,6 @@ typedef functions_cf float_bfunc_cf; typedef binary_function u32_binary_function; typedef functions_cf u32_bfunc_cf; -} // namespace award_system +} // namespace award_system -#endif //#ifndef STATE_PREDICATES_INCLUDED \ No newline at end of file +#endif //#ifndef STATE_PREDICATES_INCLUDED \ No newline at end of file diff --git a/src/xrGame/static_cast_checked.hpp b/src/xrGame/static_cast_checked.hpp index e6f0b733127..bd917a88849 100644 --- a/src/xrGame/static_cast_checked.hpp +++ b/src/xrGame/static_cast_checked.hpp @@ -48,9 +48,9 @@ struct helper } }; -} // namespace static_cast_checked -} // namespace detail -} // namespace debug +} // namespace static_cast_checked +} // namespace detail +} // namespace debug template inline destination_type static_cast_checked(source_type const& source) @@ -76,8 +76,8 @@ inline destination_type static_cast_checked(source_type& source) return (static_cast(source)); } -#else // #ifdef DEBUG +#else // #ifdef DEBUG #define static_cast_checked static_cast -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG -#endif // STATIC_CAST_CHECKED_HPP_INCLUDED \ No newline at end of file +#endif // STATIC_CAST_CHECKED_HPP_INCLUDED \ No newline at end of file diff --git a/src/xrGame/static_obstacles_avoider_inline.h b/src/xrGame/static_obstacles_avoider_inline.h index 2254d20921f..919eb40003b 100644 --- a/src/xrGame/static_obstacles_avoider_inline.h +++ b/src/xrGame/static_obstacles_avoider_inline.h @@ -13,7 +13,7 @@ IC static_obstacles_avoider::static_obstacles_avoider() : m_need_path_to_rebuild #ifdef DEBUG m_movement_manager = 0; m_failed_to_build_path = 0; -#endif // DEBUG +#endif // DEBUG } IC void static_obstacles_avoider::construct( diff --git a/src/xrGame/stats_submitter.cpp b/src/xrGame/stats_submitter.cpp index 6ba63d05418..ff65a14bf28 100644 --- a/src/xrGame/stats_submitter.cpp +++ b/src/xrGame/stats_submitter.cpp @@ -93,7 +93,7 @@ void stats_submitter::shedule_Update(u32 dt) #ifdef DEBUG Msg("--- GameSpy core and atlas thinking ..."); #endif - m_fullgs_obj->CoreThink(10); // 10 milliseconds on update + m_fullgs_obj->CoreThink(10); // 10 milliseconds on update m_atlas_obj->Think(); } @@ -106,7 +106,7 @@ void __stdcall stats_submitter::onlylog_operation(bool const result, char const* Msg("* Store operation successfullly complete."); } -u32 const stats_submitter::operation_timeout_value = 60000; // 60 seconds +u32 const stats_submitter::operation_timeout_value = 60000; // 60 seconds void stats_submitter::begin_session() { VERIFY(m_last_operation_profile && m_last_operation_cb); @@ -254,7 +254,7 @@ bool stats_submitter::prepare_report() } break; default: NODEFAULT; - }; // switch (m_report_type) + }; // switch (m_report_type) if (report_creation_result) { tmp_res = m_atlas_obj->ReportEnd(m_atlas_report, gsi_true, SCGameStatus_COMPLETE); VERIFY(tmp_res == SCResult_NO_ERROR); @@ -433,4 +433,4 @@ void stats_submitter::fill_private_key(crypto::xr_dsa::private_key_t& priv_key_d priv_key_dest.m_value[19] = 0xf2; } -} // namespace gamespy_profile \ No newline at end of file +} // namespace gamespy_profile \ No newline at end of file diff --git a/src/xrGame/stats_submitter.h b/src/xrGame/stats_submitter.h index edfa837ec1c..4c942ba0de8 100644 --- a/src/xrGame/stats_submitter.h +++ b/src/xrGame/stats_submitter.h @@ -55,7 +55,7 @@ class stats_submitter : public ScheduledBase, private Noncopyable ert_set_award = 0x00, ert_set_best_scores, ert_synchronize_profile - }; // enum enum_report_type + }; // enum enum_report_type enum_report_type m_report_type; enum_awards_t m_last_award_id; @@ -91,6 +91,6 @@ class stats_submitter : public ScheduledBase, private Noncopyable const SCInterfacePtr theInterface, GHTTPResult theHttpResult, SCResult theResult, void* theUserData); }; -} // namespace gamespy_profile +} // namespace gamespy_profile -#endif //#ifndef STATS_SUBMITTER_INCLUDED \ No newline at end of file +#endif //#ifndef STATS_SUBMITTER_INCLUDED \ No newline at end of file diff --git a/src/xrGame/stats_submitter_dsa_params.cpp b/src/xrGame/stats_submitter_dsa_params.cpp index 43937e8e2b5..7a276ec5669 100644 --- a/src/xrGame/stats_submitter_dsa_params.cpp +++ b/src/xrGame/stats_submitter_dsa_params.cpp @@ -12,12 +12,12 @@ u8 const stats_submitter::p_number[crypto::xr_dsa::public_key_length] = { 0x51, 0x4c, 0xef, 0x9b, 0x18, 0xdd, 0xb7, 0x6e, 0xe9, 0x06, 0x8c, 0x15, 0x8e, 0xa9, 0x32, 0x05, 0xaa, 0x3a, 0x64, 0x58, 0xc6, 0x5f, 0x10, 0xba, 0xfb, 0x26, 0x49, 0x58, 0xd2, 0x4a, 0xd7, 0x6c, 0xab, 0x6b, 0x5c, 0x90, 0xad, 0xdc, 0x92, 0x42, 0x22, 0x95, 0xb0, 0xbe, 0xb0, 0xab, 0xe7, 0xd3, 0xd4, 0x4b, 0xd7, 0xe9, -}; // p_number +}; // p_number u8 const stats_submitter::q_number[crypto::xr_dsa::private_key_length] = { 0xaa, 0x22, 0x5b, 0x49, 0xbd, 0x81, 0xc0, 0x05, 0x85, 0x94, 0xae, 0x4f, 0xfc, 0x06, 0xd7, 0x01, 0x4e, 0xdb, 0x4d, 0x67, -}; // q_number +}; // q_number u8 const stats_submitter::g_number[crypto::xr_dsa::public_key_length] = { 0x21, 0x0f, 0x1d, 0xbf, 0x5e, 0x04, 0xae, 0x82, 0x7a, 0x57, 0xef, 0x73, 0xf3, 0x71, 0x1f, 0xc8, 0x52, 0x62, 0x09, 0x62, 0x19, 0x8a, 0xe1, 0xab, 0xbd, 0xc7, 0xbd, 0x99, 0xc0, 0x88, 0xff, 0x29, 0x2f, 0xa6, 0x60, 0x51, 0xde, 0xfe, @@ -26,7 +26,7 @@ u8 const stats_submitter::g_number[crypto::xr_dsa::public_key_length] = { 0x8a, 0x8e, 0x22, 0xde, 0xd1, 0x13, 0x83, 0x38, 0xb8, 0x87, 0xe7, 0x3a, 0x60, 0x34, 0x47, 0x55, 0xde, 0xac, 0x34, 0x2e, 0xe1, 0x6e, 0x39, 0x56, 0xfc, 0xab, 0xce, 0x2c, 0xf2, 0xc6, 0x5b, 0x23, 0x31, 0xf5, 0x28, 0x18, 0x4e, 0x83, 0xeb, 0x09, 0x7a, 0xc2, 0x83, 0xd0, 0x8a, 0xf0, 0x3a, 0xc1, 0xbd, 0x69, 0x67, 0xfb, -}; // g_number +}; // g_number u8 const stats_submitter::public_key[crypto::xr_dsa::public_key_length] = { 0x66, 0xe4, 0x18, 0x25, 0x1f, 0x19, 0x13, 0xae, 0x77, 0xb2, 0x09, 0x7e, 0x1c, 0xe8, 0xf8, 0xe9, 0xea, 0x1d, 0x5e, @@ -36,6 +36,6 @@ u8 const stats_submitter::public_key[crypto::xr_dsa::public_key_length] = { 0xd3, 0x3d, 0x0b, 0xcc, 0x99, 0x7e, 0x82, 0x9d, 0x63, 0x81, 0xd5, 0x20, 0x3f, 0xe5, 0xd1, 0x02, 0x0d, 0x26, 0xb0, 0xd5, 0x44, 0x59, 0x9f, 0x2c, 0xd7, 0xce, 0x1c, 0x92, 0xd2, 0xe6, 0xbb, 0x52, 0x54, 0x15, 0xfd, 0xc6, 0x22, 0x02, 0xd2, 0xf1, 0x28, 0x89, 0xa9, 0x47, 0x4d, 0xc2, 0x79, 0x07, 0x5c, 0xb3, 0xd6, 0x2b, -}; // public_key +}; // public_key -} // namespace gamespy_profile \ No newline at end of file +} // namespace gamespy_profile \ No newline at end of file diff --git a/src/xrGame/steering_behaviour.cpp b/src/xrGame/steering_behaviour.cpp index 77b18acdfd6..19ed3c7b8ee 100644 --- a/src/xrGame/steering_behaviour.cpp +++ b/src/xrGame/steering_behaviour.cpp @@ -41,7 +41,7 @@ ICF float max(float a, float b) return a < b ? a : b; } -} // namespace detail +} // namespace detail //---------------------------------------------------------- // base @@ -329,4 +329,4 @@ void manager::deleter(base* p) delete (p); } -} // namespace steering_behaviour +} // namespace steering_behaviour diff --git a/src/xrGame/steering_behaviour.h b/src/xrGame/steering_behaviour.h index 2a00226168c..b748f0ed68c 100644 --- a/src/xrGame/steering_behaviour.h +++ b/src/xrGame/steering_behaviour.h @@ -28,7 +28,7 @@ namespace detail { vec random_vec(); -} // namespace detail +} // namespace detail //---------------------------------------------------------- // base @@ -82,7 +82,7 @@ class evade : public base vec pos; vec dest; float max_evade_range; - vec (*pf_random_dir)(); // randomizer func in case we're in 0 dist from dest + vec (*pf_random_dir)(); // randomizer func in case we're in 0 dist from dest params(float max_evade_range, vec_arg factor, float min_factor_dist = base::s_min_factor_dist, vec (*pf_random_dir)() = &detail::random_vec) @@ -184,8 +184,8 @@ class wander : public base yz_plane } plane; - float conservativeness; // how much we're taking current dir into account? - float angle_change; // how big angle changes can be? (radians) + float conservativeness; // how much we're taking current dir into account? + float angle_change; // how big angle changes can be? (radians) vec dir; params(plane_t plane, float conservativeness, float angle_change, float factor) @@ -228,7 +228,7 @@ class containment : public base vec thrust_factor; typedef std::vector Probes; - Probes probes; // obstacle-scanners (vectors in local (dir,up) space) + Probes probes; // obstacle-scanners (vectors in local (dir,up) space) params(float turn_factor, vec_arg thrust_factor, float min_factor_dist = base::s_min_factor_dist) : base::params(thrust_factor, min_factor_dist), turn_factor(turn_factor), thrust_factor(thrust_factor) @@ -273,9 +273,9 @@ class grouping : public base } // this function should supply nearest object to group with - virtual void first_nearest(vec& v) = 0; // start supplying nearest + virtual void first_nearest(vec& v) = 0; // start supplying nearest virtual bool nomore_nearest() = 0; - virtual void next_nearest(vec& v) = 0; // next nearest, false if finished + virtual void next_nearest(vec& v) = 0; // next nearest, false if finished virtual bool update() = 0; virtual ~params() {} @@ -312,6 +312,6 @@ class manager Behaviours m_schedule_remove; }; -} // namespace steering_behaviour +} // namespace steering_behaviour #endif \ No newline at end of file diff --git a/src/xrGame/steering_behaviour_alignment.h b/src/xrGame/steering_behaviour_alignment.h index c0bfde54c71..e1a5802bb63 100644 --- a/src/xrGame/steering_behaviour_alignment.h +++ b/src/xrGame/steering_behaviour_alignment.h @@ -26,6 +26,6 @@ class alignment final : public base, private Noncopyable typedef base inherited; }; -} // namespace steering_behaviour +} // namespace steering_behaviour -#endif // STEERING_BEHAVIOUR_ALIGNMENT_H_INCLUDED \ No newline at end of file +#endif // STEERING_BEHAVIOUR_ALIGNMENT_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/steering_behaviour_base.h b/src/xrGame/steering_behaviour_base.h index c044014ea31..8c37f6d531a 100644 --- a/src/xrGame/steering_behaviour_base.h +++ b/src/xrGame/steering_behaviour_base.h @@ -31,8 +31,8 @@ class base : private Noncopyable bool m_enabled; }; -} // namespace steering_behaviour +} // namespace steering_behaviour #include "steering_behaviour_base_inline.h" -#endif // STEERING_BEHAVIOUR_BASE_H_INCLUDED \ No newline at end of file +#endif // STEERING_BEHAVIOUR_BASE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/steering_behaviour_base_inline.h b/src/xrGame/steering_behaviour_base_inline.h index ff02a38981c..4b37a5a6338 100644 --- a/src/xrGame/steering_behaviour_base_inline.h +++ b/src/xrGame/steering_behaviour_base_inline.h @@ -23,4 +23,4 @@ bool const& Base::enabled() const #undef Base -#endif // STEERING_BEHAVIOUR_BASE_INLINE_H_INCLUDED \ No newline at end of file +#endif // STEERING_BEHAVIOUR_BASE_INLINE_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/steering_behaviour_cohesion.h b/src/xrGame/steering_behaviour_cohesion.h index 5bdbfce248b..e3e7740740e 100644 --- a/src/xrGame/steering_behaviour_cohesion.h +++ b/src/xrGame/steering_behaviour_cohesion.h @@ -26,6 +26,6 @@ class cohesion final : public base, private Noncopyable typedef base inherited; }; -} // namespace steering_behaviour +} // namespace steering_behaviour -#endif // STEERING_BEHAVIOUR_COHESION_H_INCLUDED \ No newline at end of file +#endif // STEERING_BEHAVIOUR_COHESION_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/steering_behaviour_separation.h b/src/xrGame/steering_behaviour_separation.h index 7bcbe513720..07b1f6e7ab1 100644 --- a/src/xrGame/steering_behaviour_separation.h +++ b/src/xrGame/steering_behaviour_separation.h @@ -26,6 +26,6 @@ class separation final : public base, private Noncopyable typedef base inherited; }; -} // namespace steering_behaviour +} // namespace steering_behaviour -#endif // STEERING_BEHAVIOUR_SEPARATION_H_INCLUDED \ No newline at end of file +#endif // STEERING_BEHAVIOUR_SEPARATION_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/step_manager.cpp b/src/xrGame/step_manager.cpp index 28f7c5b714d..bba928e0e5c 100644 --- a/src/xrGame/step_manager.cpp +++ b/src/xrGame/step_manager.cpp @@ -44,7 +44,7 @@ void CStepManager::reload(LPCSTR section) VERIFY((m_legs_count >= MIN_LEGS_COUNT) && (m_legs_count <= MAX_LEGS_COUNT)); SStepParam param; - param.step[0].time = 0.1f; // avoid warning + param.step[0].time = 0.1f; // avoid warning LPCSTR anim_name, val; string16 cur_elem; @@ -140,7 +140,7 @@ void CStepManager::on_animation_start(MotionID motion_id, CBlend* blend) m_step_info.disable = false; m_step_info.params = it->second; - m_step_info.cur_cycle = 1; // all cycles are 1-based + m_step_info.cur_cycle = 1; // all cycles are 1-based for (u32 i = 0; i < m_legs_count; i++) { @@ -159,7 +159,7 @@ void CStepManager::update(bool b_hud_view) if (!m_blend) return; float dist_sqr = m_object->Position().distance_to_sqr(Device.vCameraPosition); - bool b_play = dist_sqr < 400.0f; // 20m + bool b_play = dist_sqr < 400.0f; // 20m // получить параметры шага SStepParam& step = m_step_info.params; @@ -229,7 +229,7 @@ void CStepManager::update(bool b_hud_view) m_step_info.cur_cycle = 1 + u8(float(cur_time - m_time_anim_started) / (1000.f * cycle_anim_time)); // если анимация циклическая... - u32 time_anim_end = m_time_anim_started + u32(get_blend_time() * 1000); // время завершения работы анимации + u32 time_anim_end = m_time_anim_started + u32(get_blend_time() * 1000); // время завершения работы анимации if (!m_blend->stop_at_end && (time_anim_end < cur_time)) { m_time_anim_started = time_anim_end; m_step_info.cur_cycle = 1; diff --git a/src/xrGame/step_manager_defs.h b/src/xrGame/step_manager_defs.h index c35e4cf6899..437c80b5533 100644 --- a/src/xrGame/step_manager_defs.h +++ b/src/xrGame/step_manager_defs.h @@ -26,8 +26,8 @@ struct SStepInfo { struct { - bool handled; // обработан - u8 cycle; // цикл в котором отработан + bool handled; // обработан + u8 cycle; // цикл в котором отработан } activity[MAX_LEGS_COUNT]; SStepParam params; diff --git a/src/xrGame/string_table.cpp b/src/xrGame/string_table.cpp index 1a06e02bd09..146cabe706e 100644 --- a/src/xrGame/string_table.cpp +++ b/src/xrGame/string_table.cpp @@ -50,8 +50,8 @@ void CStringTable::Init() } #ifdef DEBUG Msg("StringTable: loaded %d files", fset.size()); -#endif // #ifdef DEBUG - //--- +#endif // #ifdef DEBUG + //--- ReparseKeyBindings(); } diff --git a/src/xrGame/trade.h b/src/xrGame/trade.h index bd20b69bc19..e7aa485d5f6 100644 --- a/src/xrGame/trade.h +++ b/src/xrGame/trade.h @@ -9,7 +9,7 @@ class CTrade { xr_vector m_nearest; - bool TradeState; // режим торговли. true - включен + bool TradeState; // режим торговли. true - включен u32 m_dwLastTradeTime; typedef enum tagTraderType { diff --git a/src/xrGame/traffic_optimization.cpp b/src/xrGame/traffic_optimization.cpp index 92edce8e271..a6e2666329b 100644 --- a/src/xrGame/traffic_optimization.cpp +++ b/src/xrGame/traffic_optimization.cpp @@ -54,4 +54,4 @@ void deinit_lzo(u8*& src_wm_buffer, lzo_dictionary_buffer& src_dict) xr_free(src_dict.data); } -} // namespace compression \ No newline at end of file +} // namespace compression \ No newline at end of file diff --git a/src/xrGame/traffic_optimization.h b/src/xrGame/traffic_optimization.h index f4e090a5490..9d95831c364 100644 --- a/src/xrGame/traffic_optimization.h +++ b/src/xrGame/traffic_optimization.h @@ -9,7 +9,7 @@ namespace compression namespace ppmd { class stream; -}; // namespace ppmd +}; // namespace ppmd typedef compression::ppmd::stream ppmd_trained_stream; void init_ppmd_trained_stream(ppmd_trained_stream*& dest); @@ -24,7 +24,7 @@ struct lzo_dictionary_buffer void init_lzo(u8*& dest_wm, u8*& wm_buffer, lzo_dictionary_buffer& dest_dict); void deinit_lzo(u8*& src_wm_buffer, lzo_dictionary_buffer& src_dict); -} // namespace compression +} // namespace compression enum enum_traffic_optimization { @@ -32,8 +32,8 @@ enum enum_traffic_optimization eto_ppmd_compression = 1 << 0, eto_lzo_compression = 1 << 1, eto_last_change = 1 << 2, -}; // enum enum_traffic_optimization +}; // enum enum_traffic_optimization extern u32 g_sv_traffic_optimization_level; -#endif //#ifndef TRAFFIC_OPTIMIZATION_INCLUDED \ No newline at end of file +#endif //#ifndef TRAFFIC_OPTIMIZATION_INCLUDED \ No newline at end of file diff --git a/src/xrGame/trajectories.cpp b/src/xrGame/trajectories.cpp index ce7d26a7038..ecaf258a1ec 100644 --- a/src/xrGame/trajectories.cpp +++ b/src/xrGame/trajectories.cpp @@ -162,7 +162,7 @@ bool trajectory_intersects_geometry(float trajectory_time, Fvector const& trajec #ifdef DEBUG if (out_trajectory_picks) out_trajectory_picks->resize(0); if (out_collide_tris) out_collide_tris->resize(0); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG const Fvector gravity = Fvector().set(0.f, -physics_world()->Gravity(), 0.f); const float epsilon = .1f; diff --git a/src/xrGame/trajectories.h b/src/xrGame/trajectories.h index 3c584b396fa..bee32f5de13 100644 --- a/src/xrGame/trajectories.h +++ b/src/xrGame/trajectories.h @@ -17,6 +17,6 @@ bool trajectory_intersects_geometry(float trajectory_time, Fvector const& trajec Fvector const& trajectory_end, Fvector const& trajectory_velocity, Fvector& collide_position, IGameObject* const self_object, IGameObject* const ignored_object, collide::rq_results& temp_rq_results, xr_vector* const out_trajectory_picks, xr_vector* const out_collide_tris, - Fvector const& box_size); // can be zero - ray is traced then + Fvector const& box_size); // can be zero - ray is traced then -#endif // #ifndef TRAJECTORIES_H \ No newline at end of file +#endif // #ifndef TRAJECTORIES_H \ No newline at end of file diff --git a/src/xrGame/ui/ChangeWeatherDialog.cpp b/src/xrGame/ui/ChangeWeatherDialog.cpp index a1af0005b28..b2f073edb04 100644 --- a/src/xrGame/ui/ChangeWeatherDialog.cpp +++ b/src/xrGame/ui/ChangeWeatherDialog.cpp @@ -58,7 +58,7 @@ bool ButtonListDialog::OnKeyboardAction(int dik, EUIMessages keyboardAction) return true; } int btnCount = buttons.size(); - if (dik >= DIK_1 && dik <= DIK_1 - 1 + btnCount && btnCount <= 9) // handle 1..9 keys only + if (dik >= DIK_1 && dik <= DIK_1 - 1 + btnCount && btnCount <= 9) // handle 1..9 keys only { OnButtonClick(dik - DIK_1); return true; diff --git a/src/xrGame/ui/Restrictions.cpp b/src/xrGame/ui/Restrictions.cpp index eb59dabb2ca..b46943b3fa3 100644 --- a/src/xrGame/ui/Restrictions.cpp +++ b/src/xrGame/ui/Restrictions.cpp @@ -2,9 +2,9 @@ #include "Restrictions.h" #ifdef DEBUG -#include "xrEngine/xr_ioconsole.h" #include "xrEngine/xr_ioc_cmd.h" -#endif //#ifdef DEBUG +#include "xrEngine/xr_ioconsole.h" +#endif //#ifdef DEBUG #include "string_table.h" CRestrictions g_mp_restrictions; @@ -13,7 +13,7 @@ shared_str g_ranks[_RANK_COUNT]; u32 get_rank(const shared_str& section) { int res = -1; - if (g_ranks[0].size() == 0) { // load + if (g_ranks[0].size() == 0) { // load string32 buff; for (int i = 0; i < _RANK_COUNT; i++) { @@ -73,7 +73,7 @@ void CRestrictions::InitGroups() #ifndef MASTER_GOLD Dump(); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD #ifdef DEBUG CMD4(CCC_Integer, "rank_for_buymenu", (int*)&m_rank, 0, 4); @@ -81,7 +81,7 @@ void CRestrictions::InitGroups() } void CRestrictions::AddRestriction4rank(u32 rank, const shared_str& lst) -{ // private +{ // private VERIFY(m_bInited); rank_rest_vec& rest = m_restrictions[rank]; @@ -113,7 +113,7 @@ bool CRestrictions::IsAvailable(const shared_str& itm) } void CRestrictions::AddGroup(LPCSTR group, LPCSTR lst) -{ // private +{ // private VERIFY(m_bInited); VERIFY(m_goups.find(group) == m_goups.end()); @@ -138,7 +138,7 @@ bool CRestrictions::IsGroupExist(const shared_str& group) const } RESTR CRestrictions::GetRestr(const shared_str& item) -{ // private function +{ // private function VERIFY(m_bInited); RESTR ret; string512 _name; @@ -156,7 +156,7 @@ RESTR CRestrictions::GetRestr(const shared_str& item) } shared_str CRestrictions::GetItemGroup(const shared_str& item) const -{ // private function +{ // private function VERIFY(m_bInited); Groups::const_iterator it; group_items::const_iterator IT; @@ -249,5 +249,5 @@ void CRestrictions::Dump() const } Msg("-----------------------------------------"); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } diff --git a/src/xrGame/ui/ServerList.cpp b/src/xrGame/ui/ServerList.cpp index 6d5c906a641..e8d1f052d92 100644 --- a/src/xrGame/ui/ServerList.cpp +++ b/src/xrGame/ui/ServerList.cpp @@ -291,7 +291,7 @@ void CServerList::FillUpDetailedServerInfo() PlayerInfo pf = *it; if (1 != pf.Team) continue; if (pf.Spectator) continue; - if (!t1) // add header + if (!t1) // add header { STRCONCAT(_buff, CStringTable().translate("ui_st_team").c_str(), "\"", CTeamInfo::GetTeam1_name().c_str(), "\""); @@ -782,7 +782,7 @@ void CServerList::SrvInfo2LstSrvInfo(const ServerInfo* pServerInfo) m_itemInfo.info.version = pServerInfo->m_ServerVersion; m_itemInfo.info.icons.pass = pServerInfo->m_bPassword; m_itemInfo.info.icons.dedicated = pServerInfo->m_bDedicated; - m_itemInfo.info.icons.punkbuster = false; // = pServerInfo->m_bPunkBuster; + m_itemInfo.info.icons.punkbuster = false; // = pServerInfo->m_bPunkBuster; m_itemInfo.info.icons.user_pass = pServerInfo->m_bUserPass; m_itemInfo.info.Index = pServerInfo->Index; diff --git a/src/xrGame/ui/ServerList.h b/src/xrGame/ui/ServerList.h index e3f4d8ed303..dff04c7ff1b 100644 --- a/src/xrGame/ui/ServerList.h +++ b/src/xrGame/ui/ServerList.h @@ -27,7 +27,7 @@ enum enum_connect_error { ece_unique_nick_not_registred = 0x01, ece_unique_nick_expired -}; // enum enum_connect_errors +}; // enum enum_connect_errors typedef mixed_delegate connect_error_cb; diff --git a/src/xrGame/ui/UI3tButton.h b/src/xrGame/ui/UI3tButton.h index 4e8c1249a6b..9a5e9814457 100644 --- a/src/xrGame/ui/UI3tButton.h +++ b/src/xrGame/ui/UI3tButton.h @@ -39,7 +39,7 @@ class CUI3tButton : public CUIButton m_bUseTextColor[state] = true; } u32 m_dwTextColor[4]; - bool m_bUseTextColor[4]; // note: 0 index will be ignored + bool m_bUseTextColor[4]; // note: 0 index will be ignored bool m_frameline_mode; bool vertical; @@ -53,4 +53,4 @@ class CUI3tButton : public CUIButton ref_sound m_sound_h; ref_sound m_sound_t; -}; // class CUI3tButton +}; // class CUI3tButton diff --git a/src/xrGame/ui/UIActorMenu.cpp b/src/xrGame/ui/UIActorMenu.cpp index 3be2df7a75b..b35e085962e 100644 --- a/src/xrGame/ui/UIActorMenu.cpp +++ b/src/xrGame/ui/UIActorMenu.cpp @@ -104,34 +104,34 @@ void CUIActorMenu::SetMenuMode(EMenuMode mode) case mmUndefined: #ifdef DEBUG Msg("* now is Undefined mode"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG ResetMode(); break; case mmInventory: InitInventoryMode(); #ifdef DEBUG Msg("* now is Inventory mode"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG break; case mmTrade: InitTradeMode(); #ifdef DEBUG Msg("* now is Trade mode"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG break; case mmUpgrade: InitUpgradeMode(); #ifdef DEBUG Msg("* now is Upgrade mode"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG break; case mmDeadBodySearch: InitDeadBodySearchMode(); #ifdef DEBUG Msg("* now is DeadBodySearch mode"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG break; default: R_ASSERT(0); break; } UpdateConditionProgressBars(); CurModeToScript(); - } // if + } // if if (m_pActorInvOwner) { UpdateOutfit(); @@ -178,7 +178,7 @@ void CUIActorMenu::Draw() void CUIActorMenu::Update() { - { // all mode + { // all mode m_last_time = Device.dwTimeGlobal; m_ActorStateInfo->UpdateActorInfo(m_pActorInvOwner); } @@ -189,7 +189,7 @@ void CUIActorMenu::Update() case mmInventory: { // m_clock_value->TextItemControl()->SetText( InventoryUtilities::GetGameTimeAsString( - //InventoryUtilities::etpTimeToMinutes ).c_str() ); + // InventoryUtilities::etpTimeToMinutes ).c_str() ); CurrentGameUI()->UIMainIngameWnd->UpdateZoneMap(); break; } @@ -219,7 +219,7 @@ void CUIActorMenu::Update() m_hint_wnd->Update(); } -bool CUIActorMenu::StopAnyMove() // true = актёр не идёт при открытом меню +bool CUIActorMenu::StopAnyMove() // true = актёр не идёт при открытом меню { switch (m_currMenuMode) { @@ -247,7 +247,7 @@ void CUIActorMenu::CheckDistance() HideDialog(); } } - else // pBoxGO + else // pBoxGO { VERIFY(pBoxGO); if (pActorGO->Position().distance_to(pBoxGO->Position()) > 3.0f) { @@ -567,7 +567,7 @@ void CUIActorMenu::highlight_ammo_for_weapon(PIItem weapon_item, CUIDragDropList CWeaponAmmo* ammo = smart_cast(item); if (!ammo) { highlight_addons_for_weapon(weapon_item, ci); - continue; // for i + continue; // for i } shared_str const& ammo_name = item->object().cNameSect(); @@ -576,10 +576,10 @@ void CUIActorMenu::highlight_ammo_for_weapon(PIItem weapon_item, CUIDragDropList { if (ammo_name._get() == (*itb)._get()) { ci->m_select_armament = true; - break; // itb + break; // itb } } - } // for i + } // for i } void CUIActorMenu::highlight_weapons_for_ammo(PIItem ammo_item, CUIDragDropListEx* ddlist) @@ -612,13 +612,13 @@ void CUIActorMenu::highlight_weapons_for_ammo(PIItem ammo_item, CUIDragDropListE { if (ammo_name._get() == (*itb)._get()) { ci->m_select_armament = true; - break; // for itb + break; // for itb } } CWeaponMagazinedWGrenade* wg = smart_cast(item); if (!wg || !wg->IsGrenadeLauncherAttached() || !wg->m_ammoTypes2.size()) { - continue; // for i + continue; // for i } itb = wg->m_ammoTypes2.begin(); ite = wg->m_ammoTypes2.end(); @@ -626,10 +626,10 @@ void CUIActorMenu::highlight_weapons_for_ammo(PIItem ammo_item, CUIDragDropListE { if (ammo_name._get() == (*itb)._get()) { ci->m_select_armament = true; - break; // for itb + break; // for itb } } - } // for i + } // for i } bool CUIActorMenu::highlight_addons_for_weapon(PIItem weapon_item, CUICellItem* ci) @@ -698,7 +698,7 @@ void CUIActorMenu::highlight_weapons_for_addon(PIItem addon_item, CUIDragDropLis continue; } - } // for i + } // for i } // ------------------------------------------------------------------- diff --git a/src/xrGame/ui/UIActorMenu.h b/src/xrGame/ui/UIActorMenu.h index 4aa192e69b1..1685cbec0d0 100644 --- a/src/xrGame/ui/UIActorMenu.h +++ b/src/xrGame/ui/UIActorMenu.h @@ -31,7 +31,7 @@ namespace upgrade { class Upgrade; } -} // namespace upgrade, inventory +} // namespace upgrade, inventory enum EDDListType { @@ -259,7 +259,7 @@ class CUIActorMenu : public CUIDialogWnd, public CUIWndCallback CUICellItem* CurrentItem(); PIItem CurrentIItem(); - void InfoCurItem(CUICellItem* cell_item); // on update item + void InfoCurItem(CUICellItem* cell_item); // on update item void ActivatePropertiesBox(); void TryHidePropertiesBox(); @@ -336,7 +336,7 @@ class CUIActorMenu : public CUIDialogWnd, public CUIWndCallback bool SetInfoCurUpgrade(Upgrade_type* upgrade_type, CInventoryItem* inv_item); void SeparateUpgradeItem(); PIItem get_upgrade_item(); - bool DropAllItemsFromRuck(bool quest_force = false); // debug func + bool DropAllItemsFromRuck(bool quest_force = false); // debug func void UpdateActor(); void UpdatePartnerBag(); @@ -350,4 +350,4 @@ class CUIActorMenu : public CUIDialogWnd, public CUIWndCallback void UpdateConditionProgressBars(); IC UIHint* get_hint_wnd() { return m_hint_wnd; } -}; // class CUIActorMenu +}; // class CUIActorMenu diff --git a/src/xrGame/ui/UIActorMenuDeadBodySearch.cpp b/src/xrGame/ui/UIActorMenuDeadBodySearch.cpp index 0bad1f51a85..0f40e9b0f45 100644 --- a/src/xrGame/ui/UIActorMenuDeadBodySearch.cpp +++ b/src/xrGame/ui/UIActorMenuDeadBodySearch.cpp @@ -66,7 +66,7 @@ void CUIActorMenu::InitDeadBodySearchMode() TIItemContainer items_list; if (m_pPartnerInvOwner) { - m_pPartnerInvOwner->inventory().AddAvailableItems(items_list, false); // true + m_pPartnerInvOwner->inventory().AddAvailableItems(items_list, false); // true UpdatePartnerBag(); } else @@ -130,7 +130,7 @@ bool CUIActorMenu::ToDeadBodyBag(CUICellItem* itm, bool b_use_cursor_pos) return false; } } - else // box + else // box { if (!m_pInvBox->can_take()) { return false; @@ -161,7 +161,7 @@ bool CUIActorMenu::ToDeadBodyBag(CUICellItem* itm, bool b_use_cursor_pos) if (m_pPartnerInvOwner) { move_item_from_to(m_pActorInvOwner->object_id(), m_pPartnerInvOwner->object_id(), iitem->object_id()); } - else // box + else // box { move_item_from_to(m_pActorInvOwner->object_id(), m_pInvBox->ID(), iitem->object_id()); } @@ -208,8 +208,8 @@ void CUIActorMenu::TakeAllFromPartner(CUIWindow* w, void* d) } PIItem item = (PIItem)(ci->m_pData); move_item_check(item, m_pPartnerInvOwner, m_pActorInvOwner, false); - } // for i - m_pDeadBodyBagList->ClearAll(true); // false + } // for i + m_pDeadBodyBagList->ClearAll(true); // false } void CUIActorMenu::TakeAllFromInventoryBox() @@ -228,6 +228,6 @@ void CUIActorMenu::TakeAllFromInventoryBox() PIItem item = (PIItem)(ci->m_pData); move_item_from_to(m_pInvBox->ID(), actor_id, item->object_id()); - } // for i - m_pDeadBodyBagList->ClearAll(true); // false + } // for i + m_pDeadBodyBagList->ClearAll(true); // false } diff --git a/src/xrGame/ui/UIActorMenuInventory.cpp b/src/xrGame/ui/UIActorMenuInventory.cpp index bad0e9ddf2a..110c0c1d888 100644 --- a/src/xrGame/ui/UIActorMenuInventory.cpp +++ b/src/xrGame/ui/UIActorMenuInventory.cpp @@ -204,7 +204,7 @@ bool FindItemInList(CUIDragDropListEx* lst, PIItem pItem, CUICellItem*& ci_res) } bool RemoveItemFromList(CUIDragDropListEx* lst, PIItem pItem) -{ // fixme +{ // fixme CUICellItem* ci = NULL; if (FindItemInList(lst, pItem, ci)) { R_ASSERT(ci); @@ -240,7 +240,7 @@ void CUIActorMenu::OnInventoryAction(PIItem pItem, u16 action_type) } #ifndef MASTER_GOLD Msg("item place [%d]", pl); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD if (pl.type == eItemPlaceSlot) lst_to_add = GetSlotList(pl.slot_id); @@ -302,7 +302,7 @@ void CUIActorMenu::OnInventoryAction(PIItem pItem, u16 action_type) if (RemoveItemFromList(curr, pItem)) { #ifndef MASTER_GOLD Msg("all ok. item [%d] removed from list", pItem->object_id()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD break; } ++i; @@ -460,7 +460,7 @@ bool CUIActorMenu::ToSlot(CUICellItem* itm, bool force_place, u16 slot_id) CUIDragDropListEx* new_owner = GetSlotList(slot_id); if (slot_id == GRENADE_SLOT || !new_owner) { - return true; // fake, sorry ((( + return true; // fake, sorry ((( } if (slot_id == OUTFIT_SLOT) { @@ -492,7 +492,7 @@ bool CUIActorMenu::ToSlot(CUICellItem* itm, bool force_place, u16 slot_id) return true; } else - { // in case slot is busy + { // in case slot is busy if (!force_place || slot_id == NO_ACTIVE_SLOT) return false; if (m_pActorInvOwner->inventory().SlotIsPersistent(slot_id) && slot_id != DETECTOR_SLOT) return false; @@ -591,7 +591,7 @@ bool CUIActorMenu::ToBelt(CUICellItem* itm, bool b_use_cursor_pos) return true; } else - { // in case belt slot is busy + { // in case belt slot is busy if (!iitem->Belt() || m_pActorInvOwner->inventory().BeltWidth() == 0) return false; CUIDragDropListEx* belt_list = NULL; @@ -632,7 +632,7 @@ CUIDragDropListEx* CUIActorMenu::GetSlotList(u16 slot_idx) case DETECTOR_SLOT: return m_pInventoryDetectorList; break; - case GRENADE_SLOT: // fake + case GRENADE_SLOT: // fake if (m_currMenuMode == mmTrade) { return m_pTradeActorBagList; } @@ -843,7 +843,7 @@ void CUIActorMenu::PropertiesBoxForWeapon(CUICellItem* cell_item, PIItem item, b CWeaponMagazined* weap_mag = smart_cast((CWeapon*)cell_item->Child(i)->m_pData); if (weap_mag && weap_mag->GetAmmoElapsed()) { b = true; - break; // for + break; // for } } } @@ -874,7 +874,7 @@ void CUIActorMenu::PropertiesBoxForAddon(PIItem item, bool& b_show) str.printf("%s %s", str.c_str(), item_in_slot_2->m_name.c_str()); m_UIPropertiesBox->AddItem(str.c_str(), (void*)item_in_slot_2, INVENTORY_ATTACH_ADDON); // m_UIPropertiesBox->AddItem( "st_attach_scope_to_pistol", (void*)item_in_slot_2, - //INVENTORY_ATTACH_ADDON ); + // INVENTORY_ATTACH_ADDON ); b_show = true; } if (item_in_slot_3 && item_in_slot_3->CanAttach(pScope)) { @@ -882,7 +882,7 @@ void CUIActorMenu::PropertiesBoxForAddon(PIItem item, bool& b_show) str.printf("%s %s", str.c_str(), item_in_slot_3->m_name.c_str()); m_UIPropertiesBox->AddItem(str.c_str(), (void*)item_in_slot_3, INVENTORY_ATTACH_ADDON); // m_UIPropertiesBox->AddItem( "st_attach_scope_to_rifle", (void*)item_in_slot_3, - //INVENTORY_ATTACH_ADDON ); + // INVENTORY_ATTACH_ADDON ); b_show = true; } return; @@ -894,7 +894,7 @@ void CUIActorMenu::PropertiesBoxForAddon(PIItem item, bool& b_show) str.printf("%s %s", str.c_str(), item_in_slot_2->m_name.c_str()); m_UIPropertiesBox->AddItem(str.c_str(), (void*)item_in_slot_2, INVENTORY_ATTACH_ADDON); // m_UIPropertiesBox->AddItem( "st_attach_silencer_to_pistol", (void*)item_in_slot_2, - //INVENTORY_ATTACH_ADDON ); + // INVENTORY_ATTACH_ADDON ); b_show = true; } if (item_in_slot_3 && item_in_slot_3->CanAttach(pSilencer)) { @@ -902,7 +902,7 @@ void CUIActorMenu::PropertiesBoxForAddon(PIItem item, bool& b_show) str.printf("%s %s", str.c_str(), item_in_slot_3->m_name.c_str()); m_UIPropertiesBox->AddItem(str.c_str(), (void*)item_in_slot_3, INVENTORY_ATTACH_ADDON); // m_UIPropertiesBox->AddItem( "st_attach_silencer_to_rifle", (void*)item_in_slot_3, - //INVENTORY_ATTACH_ADDON ); + // INVENTORY_ATTACH_ADDON ); b_show = true; } return; @@ -913,7 +913,8 @@ void CUIActorMenu::PropertiesBoxForAddon(PIItem item, bool& b_show) shared_str str = CStringTable().translate("st_attach_gl_to_rifle"); str.printf("%s %s", str.c_str(), item_in_slot_2->m_name.c_str()); m_UIPropertiesBox->AddItem(str.c_str(), (void*)item_in_slot_2, INVENTORY_ATTACH_ADDON); - // m_UIPropertiesBox->AddItem( "st_attach_gl_to_pistol", (void*)item_in_slot_2, INVENTORY_ATTACH_ADDON + // m_UIPropertiesBox->AddItem( "st_attach_gl_to_pistol", (void*)item_in_slot_2, + //INVENTORY_ATTACH_ADDON //); b_show = true; } @@ -921,7 +922,8 @@ void CUIActorMenu::PropertiesBoxForAddon(PIItem item, bool& b_show) shared_str str = CStringTable().translate("st_attach_gl_to_rifle"); str.printf("%s %s", str.c_str(), item_in_slot_3->m_name.c_str()); m_UIPropertiesBox->AddItem(str.c_str(), (void*)item_in_slot_3, INVENTORY_ATTACH_ADDON); - // m_UIPropertiesBox->AddItem( "st_attach_gl_to_rifle", (void*)item_in_slot_3, INVENTORY_ATTACH_ADDON + // m_UIPropertiesBox->AddItem( "st_attach_gl_to_rifle", (void*)item_in_slot_3, + //INVENTORY_ATTACH_ADDON //); b_show = true; } @@ -1029,7 +1031,7 @@ void CUIActorMenu::ProcessPropertiesBoxClicked(CUIWindow* w, void* d) } case INVENTORY_ATTACH_ADDON: { - PIItem item = CurrentIItem(); // temporary storing because of AttachAddon is setting curiitem to NULL + PIItem item = CurrentIItem(); // temporary storing because of AttachAddon is setting curiitem to NULL AttachAddon((PIItem)(m_UIPropertiesBox->GetClickedItem()->GetData())); if (m_currMenuMode == mmDeadBodySearch) RemoveItemFromList(m_pDeadBodyBagList, item); @@ -1112,12 +1114,12 @@ void CUIActorMenu::ProcessPropertiesBoxClicked(CUIWindow* w, void* d) pPda->PlayScriptFunction(); break; } - } // switch + } // switch SetCurrentItem(NULL); UpdateItemsPlace(); UpdateConditionProgressBars(); -} // ProcessPropertiesBoxClicked +} // ProcessPropertiesBoxClicked void CUIActorMenu::UpdateOutfit() { @@ -1142,8 +1144,8 @@ void CUIActorMenu::UpdateOutfit() } Ivector2 afc; - afc.x = af_count; // 1; - afc.y = 1; // af_count; + afc.x = af_count; // 1; + afc.y = 1; // af_count; m_pInventoryBeltList->SetCellsCapacity(afc); @@ -1160,6 +1162,6 @@ void CUIActorMenu::MoveArtefactsToBag() CUICellItem* ci = m_pInventoryBeltList->GetItemIdx(0); VERIFY(ci && ci->m_pData); ToBag(ci, false); - } // for i + } // for i m_pInventoryBeltList->ClearAll(true); } diff --git a/src/xrGame/ui/UIActorMenuTrade.cpp b/src/xrGame/ui/UIActorMenuTrade.cpp index 06431bd9527..41e358a4262 100644 --- a/src/xrGame/ui/UIActorMenuTrade.cpp +++ b/src/xrGame/ui/UIActorMenuTrade.cpp @@ -282,8 +282,8 @@ bool CUIActorMenu::CanMoveToPartner(PIItem pItem) if (pItem->GetCondition() < m_pPartnerInvOwner->trade_parameters().buy_item_condition_factor) return false; - float r1 = CalcItemsWeight(m_pTradeActorList); // actor - float r2 = CalcItemsWeight(m_pTradePartnerList); // partner + float r1 = CalcItemsWeight(m_pTradeActorList); // actor + float r2 = CalcItemsWeight(m_pTradePartnerList); // partner float itmWeight = pItem->Weight(); float partner_inv_weight = m_pPartnerInvOwner->inventory().CalcTotalWeight(); float partner_max_weight = m_pPartnerInvOwner->MaxCarryWeight(); @@ -312,7 +312,7 @@ void CUIActorMenu::UpdateActor() if (wp) { wp->ForceUpdateAmmo(); } - } // actor + } // actor InventoryUtilities::UpdateWeightStr(*m_ActorWeight, *m_ActorWeightMax, m_pActorInvOwner); @@ -404,7 +404,7 @@ void CUIActorMenu::OnBtnPerformTradeBuy(CUIWindow* w, void* d) int actor_money = (int)m_pActorInvOwner->get_money(); int partner_money = (int)m_pPartnerInvOwner->get_money(); - int actor_price = 0; //(int)CalcItemsPrice( m_pTradeActorList, m_partner_trade, true ); + int actor_price = 0; //(int)CalcItemsPrice( m_pTradeActorList, m_partner_trade, true ); int partner_price = (int)CalcItemsPrice(m_pTradePartnerList, m_partner_trade, false); int delta_price = actor_price - partner_price; @@ -444,7 +444,7 @@ void CUIActorMenu::OnBtnPerformTradeSell(CUIWindow* w, void* d) int actor_money = (int)m_pActorInvOwner->get_money(); int partner_money = (int)m_pPartnerInvOwner->get_money(); int actor_price = (int)CalcItemsPrice(m_pTradeActorList, m_partner_trade, true); - int partner_price = 0; //(int)CalcItemsPrice( m_pTradePartnerList, m_partner_trade, false ); + int partner_price = 0; //(int)CalcItemsPrice( m_pTradePartnerList, m_partner_trade, false ); int delta_price = actor_price - partner_price; actor_money += delta_price; diff --git a/src/xrGame/ui/UIActorMenu_action.cpp b/src/xrGame/ui/UIActorMenu_action.cpp index 669157c4117..cd6d872c60e 100644 --- a/src/xrGame/ui/UIActorMenu_action.cpp +++ b/src/xrGame/ui/UIActorMenu_action.cpp @@ -145,7 +145,7 @@ bool CUIActorMenu::OnItemDrop(CUICellItem* itm) bool CUIActorMenu::OnItemStartDrag(CUICellItem* itm) { InfoCurItem(NULL); - return false; // default behaviour + return false; // default behaviour } bool CUIActorMenu::OnItemDbClick(CUICellItem* itm) @@ -218,7 +218,7 @@ bool CUIActorMenu::OnItemDbClick(CUICellItem* itm) } break; - }; // switch + }; // switch UpdateItemsPlace(); UpdateConditionProgressBars(); @@ -274,7 +274,7 @@ bool CUIActorMenu::OnItemFocusedUpdate(CUICellItem* itm) } VERIFY(m_ItemInfo); if (Device.dwTimeGlobal < itm->FocusReceiveTime() + m_ItemInfo->delay) { - return true; // false + return true; // false } if (CUIDragDropListEx::m_drag_item || m_UIPropertiesBox->IsShown() || !m_item_info_view) { return true; @@ -287,7 +287,7 @@ bool CUIActorMenu::OnItemFocusedUpdate(CUICellItem* itm) bool CUIActorMenu::OnMouseAction(float x, float y, EUIMessages mouse_action) { inherited::OnMouseAction(x, y, mouse_action); - return true; // no click`s + return true; // no click`s } bool CUIActorMenu::OnKeyboardAction(int dik, EUIMessages keyboard_action) diff --git a/src/xrGame/ui/UIActorStateInfo.cpp b/src/xrGame/ui/UIActorStateInfo.cpp index a30b7140e3f..1e3117ebb01 100644 --- a/src/xrGame/ui/UIActorStateInfo.cpp +++ b/src/xrGame/ui/UIActorStateInfo.cpp @@ -86,8 +86,8 @@ void ui_actor_state_wnd::UpdateActorInfo(CInventoryOwner* owner) float value = 0.0f; value = actor->conditions().GetHealth(); - value = floor(value * 55) / 55; // number of sticks in progress bar - // show bleeding icon + value = floor(value * 55) / 55; // number of sticks in progress bar + // show bleeding icon m_state[stt_health]->set_progress(value); value = actor->conditions().BleedingSpeed(); m_state[stt_bleeding]->show_static(false, 1); @@ -182,55 +182,55 @@ void ui_actor_state_wnd::UpdateActorInfo(CInventoryOwner* owner) { burn_value += actor->GetProtection_ArtefactsOnBelt(ALife::eHitTypeBurn); float max_power = actor->conditions().GetZoneMaxPower(ALife::eHitTypeBurn); - burn_value = floor(burn_value / max_power * 31) / 31; // number of sticks in progress bar - m_state[stt_fire]->set_progress(burn_value); // 0..1 + burn_value = floor(burn_value / max_power * 31) / 31; // number of sticks in progress bar + m_state[stt_fire]->set_progress(burn_value); // 0..1 } // radiation protection progress bar { radi_value += actor->GetProtection_ArtefactsOnBelt(ALife::eHitTypeRadiation); float max_power = actor->conditions().GetZoneMaxPower(ALife::eHitTypeRadiation); - radi_value = floor(radi_value / max_power * 31) / 31; // number of sticks in progress bar - m_state[stt_radia]->set_progress(radi_value); // 0..1 + radi_value = floor(radi_value / max_power * 31) / 31; // number of sticks in progress bar + m_state[stt_radia]->set_progress(radi_value); // 0..1 } // chemical burn protection progress bar { cmbn_value += actor->GetProtection_ArtefactsOnBelt(ALife::eHitTypeChemicalBurn); float max_power = actor->conditions().GetZoneMaxPower(ALife::eHitTypeChemicalBurn); - cmbn_value = floor(cmbn_value / max_power * 31) / 31; // number of sticks in progress bar - m_state[stt_acid]->set_progress(cmbn_value); // 0..1 + cmbn_value = floor(cmbn_value / max_power * 31) / 31; // number of sticks in progress bar + m_state[stt_acid]->set_progress(cmbn_value); // 0..1 } // telepatic protection progress bar { tele_value += actor->GetProtection_ArtefactsOnBelt(ALife::eHitTypeTelepatic); float max_power = actor->conditions().GetZoneMaxPower(ALife::eHitTypeTelepatic); - tele_value = floor(tele_value / max_power * 31) / 31; // number of sticks in progress bar - m_state[stt_psi]->set_progress(tele_value); // 0..1 + tele_value = floor(tele_value / max_power * 31) / 31; // number of sticks in progress bar + m_state[stt_psi]->set_progress(tele_value); // 0..1 } // wound protection progress bar { float max_power = actor->conditions().GetMaxWoundProtection(); - woun_value = floor(woun_value / max_power * 31) / 31; // number of sticks in progress bar - m_state[stt_wound]->set_progress(woun_value); // 0..1 + woun_value = floor(woun_value / max_power * 31) / 31; // number of sticks in progress bar + m_state[stt_wound]->set_progress(woun_value); // 0..1 } // shock protection progress bar { shoc_value += actor->GetProtection_ArtefactsOnBelt(ALife::eHitTypeShock); float max_power = actor->conditions().GetZoneMaxPower(ALife::eHitTypeShock); - shoc_value = floor(shoc_value / max_power * 31) / 31; // number of sticks in progress bar - m_state[stt_shock]->set_progress(shoc_value); // 0..1 + shoc_value = floor(shoc_value / max_power * 31) / 31; // number of sticks in progress bar + m_state[stt_shock]->set_progress(shoc_value); // 0..1 } // fire wound protection progress bar { float max_power = actor->conditions().GetMaxFireWoundProtection(); - fwou_value = floor(fwou_value / max_power * 31) / 31; // number of sticks in progress bar + fwou_value = floor(fwou_value / max_power * 31) / 31; // number of sticks in progress bar m_state[stt_fire_wound]->set_progress(fwou_value); } // power restore speed progress bar { value = actor->GetRestoreSpeed(ALife::ePowerRestoreSpeed) / actor->conditions().GetMaxPowerRestoreSpeed(); ; - value = floor(value * 31) / 31; // number of sticks in progress bar - m_state[stt_power]->set_progress(value); // 0..1 + value = floor(value * 31) / 31; // number of sticks in progress bar + m_state[stt_power]->set_progress(value); // 0..1 } // ----------------------------------------------------------------------------------- @@ -247,15 +247,15 @@ void ui_actor_state_wnd::update_round_states(CActor* actor, ALife::EHitType hit_ value += helmet ? helmet->GetDefHitTypeProtection(ALife::eHitTypeShock) : 0.0f; float max_power = actor->conditions().GetZoneMaxPower(hit_type); - value = value / max_power; // = 0..1 + value = value / max_power; // = 0..1 // m_state[stt_type]->set_progress_shape( value ); - m_state[stt_type]->set_arrow(value); // 0..1 - m_state[stt_type]->set_text(value); // 0..1 + m_state[stt_type]->set_arrow(value); // 0..1 + m_state[stt_type]->set_text(value); // 0..1 } void ui_actor_state_wnd::UpdateHitZone() { - CUIHudStatesWnd* wnd = CurrentGameUI()->UIMainIngameWnd->get_hud_states(); //некрасиво слишком + CUIHudStatesWnd* wnd = CurrentGameUI()->UIMainIngameWnd->get_hud_states(); //некрасиво слишком VERIFY(wnd); if (!wnd) { return; @@ -344,7 +344,7 @@ void ui_actor_state_item::set_text(float value) if (!m_static) { return; } - int v = (int)(value * m_magnitude + 0.49f); // m_magnitude=100 + int v = (int)(value * m_magnitude + 0.49f); // m_magnitude=100 clamp(v, 0, 99); string32 text_res; xr_sprintf(text_res, sizeof(text_res), "%d", v); diff --git a/src/xrGame/ui/UIActorStateInfo.h b/src/xrGame/ui/UIActorStateInfo.h index b4b57b7c7bc..a3a6a328055 100644 --- a/src/xrGame/ui/UIActorStateInfo.h +++ b/src/xrGame/ui/UIActorStateInfo.h @@ -81,12 +81,12 @@ class ui_actor_state_item : public UIHintWindow virtual ~ui_actor_state_item(); void init_from_xml(CUIXml& xml, LPCSTR path); - void set_text(float value); // 0..1 - void set_progress(float value); // 0..1 - void set_progress_shape(float value); // 0..1 - void set_arrow(float value); // 0..1 + void set_text(float value); // 0..1 + void set_progress(float value); // 0..1 + void set_progress_shape(float value); // 0..1 + void set_arrow(float value); // 0..1 void show_static(bool status, u8 number = 1); -}; // class ui_actor_state_item +}; // class ui_actor_state_item -#endif // UI_ACTOR_STATE_INFO_H_INCLUDED +#endif // UI_ACTOR_STATE_INFO_H_INCLUDED diff --git a/src/xrGame/ui/UIAnimatedStatic.h b/src/xrGame/ui/UIAnimatedStatic.h index 60f71c22019..06e96472dd5 100644 --- a/src/xrGame/ui/UIAnimatedStatic.h +++ b/src/xrGame/ui/UIAnimatedStatic.h @@ -93,4 +93,4 @@ class CUISleepStatic : public CUIStatic virtual void Update(); virtual void InitTextureEx(LPCSTR tex_name, LPCSTR sh_name = "hud\\default"); }; -#endif // UI_ANIMATED_STATIC_H_ \ No newline at end of file +#endif // UI_ANIMATED_STATIC_H_ \ No newline at end of file diff --git a/src/xrGame/ui/UIBoosterInfo.h b/src/xrGame/ui/UIBoosterInfo.h index e4bfae5eead..c97e4f5fec2 100644 --- a/src/xrGame/ui/UIBoosterInfo.h +++ b/src/xrGame/ui/UIBoosterInfo.h @@ -23,7 +23,7 @@ class CUIBoosterInfo : public CUIWindow CUIStatic* m_Prop_line; -}; // class CUIBoosterInfo +}; // class CUIBoosterInfo // ----------------------------------- @@ -46,4 +46,4 @@ class UIBoosterInfoItem : public CUIWindow shared_str m_texture_minus; shared_str m_texture_plus; -}; // class UIBoosterInfoItem +}; // class UIBoosterInfoItem diff --git a/src/xrGame/ui/UIButton.cpp b/src/xrGame/ui/UIButton.cpp index d4275d99244..445ee6ffe23 100644 --- a/src/xrGame/ui/UIButton.cpp +++ b/src/xrGame/ui/UIButton.cpp @@ -20,7 +20,7 @@ CUIButton::CUIButton() m_uAccelerator[3] = -1; TextItemControl()->SetTextComplexMode(false); - TextItemControl()->SetTextAlignment(CGameFont::alCenter); // this will create class instance for m_pLines + TextItemControl()->SetTextAlignment(CGameFont::alCenter); // this will create class instance for m_pLines TextItemControl()->SetVTextAlignment(valCenter); } @@ -167,7 +167,7 @@ void CUIButton::OnFocusLost() inherited::OnFocusLost(); if (m_eButtonState == BUTTON_PUSHED && pInput->iGetAsyncBtnState(0) && !m_bIsSwitch) - SetButtonState(BUTTON_NORMAL); //??? + SetButtonState(BUTTON_NORMAL); //??? if (g_btnHint->Owner() == this) g_btnHint->Discard(); } diff --git a/src/xrGame/ui/UIButton.h b/src/xrGame/ui/UIButton.h index f1bfcc0eeb9..5b715a66f10 100644 --- a/src/xrGame/ui/UIButton.h +++ b/src/xrGame/ui/UIButton.h @@ -25,9 +25,9 @@ class CUIButton : public CUIStatic //состояния в которых находится кнопка typedef enum { - BUTTON_NORMAL, //кнопка никак не затрагивается - BUTTON_PUSHED, //в нажатом сотоянии - BUTTON_UP //при удерживаемой кнопки мыши + BUTTON_NORMAL, //кнопка никак не затрагивается + BUTTON_PUSHED, //в нажатом сотоянии + BUTTON_UP //при удерживаемой кнопки мыши } E_BUTTON_STATE; //заново подготовить состояние diff --git a/src/xrGame/ui/UIBuyWndShared.cpp b/src/xrGame/ui/UIBuyWndShared.cpp index 145c7f47d70..174781b93ae 100644 --- a/src/xrGame/ui/UIBuyWndShared.cpp +++ b/src/xrGame/ui/UIBuyWndShared.cpp @@ -65,7 +65,7 @@ const u32 CItemMgr::GetItemIdx(const shared_str& sect_name) const if (it == m_items.end()) { #ifdef DEBUG Msg("item not found in registry [%s]", sect_name.c_str()); -#endif // DEBUG +#endif // DEBUG return u32(-1); } @@ -87,7 +87,7 @@ void CItemMgr::Dump() const Msg("[%s] slot=[%d] cost= %d,%d,%d,%d,%d", it->first.c_str(), val.slot_idx, val.cost[0], val.cost[1], val.cost[2], val.cost[3], val.cost[4]); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } const u32 CItemMgr::GetItemsCount() const diff --git a/src/xrGame/ui/UICDkey.cpp b/src/xrGame/ui/UICDkey.cpp index ca2c902fadb..f168ed6a419 100644 --- a/src/xrGame/ui/UICDkey.cpp +++ b/src/xrGame/ui/UICDkey.cpp @@ -41,7 +41,7 @@ struct inappropriate_characters return true; } -}; // struct inappropriate_characters +}; // struct inappropriate_characters void CUICDkey::paste_from_clipboard() { @@ -167,12 +167,12 @@ void CUICDkey::SaveOptValue() if (MainMenu()->IsCDKeyIsValid()) m_view_access = false; } -void CUICDkey::SaveBackUpOptValue() // current->backup +void CUICDkey::SaveBackUpOptValue() // current->backup { xr_strcpy(m_opt_backup_value, inherited::GetText()); } -void CUICDkey::UndoOptValue() // backup->current +void CUICDkey::UndoOptValue() // backup->current { inherited::SetText(m_opt_backup_value); } diff --git a/src/xrGame/ui/UICDkey.h b/src/xrGame/ui/UICDkey.h index 00dcde6aa82..956590696a5 100644 --- a/src/xrGame/ui/UICDkey.h +++ b/src/xrGame/ui/UICDkey.h @@ -13,11 +13,11 @@ class CUICDkey : public CUIEditBox virtual LPCSTR GetText(); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current void CreateCDKeyEntry(); void assign_callbacks(); @@ -32,7 +32,7 @@ class CUICDkey : public CUIEditBox private: string512 m_opt_backup_value; bool m_view_access; -}; // class CUICDkey +}; // class CUICDkey class CUIMPPlayerName : public CUIEditBox { @@ -51,7 +51,7 @@ class CUIMPPlayerName : public CUIEditBox virtual void OnFocusLost(); -}; // class CUIMPPlayerName +}; // class CUIMPPlayerName extern void GetCDKey_FromRegistry(char* cdkey); extern void WriteCDKey_ToRegistry(LPSTR cdkey); diff --git a/src/xrGame/ui/UICellCustomItems.cpp b/src/xrGame/ui/UICellCustomItems.cpp index 5411342bf7b..ed80546e217 100644 --- a/src/xrGame/ui/UICellCustomItems.cpp +++ b/src/xrGame/ui/UICellCustomItems.cpp @@ -13,9 +13,9 @@ namespace detail struct is_helper_pred { bool operator()(CUICellItem* child) { return child->IsHelper(); } -}; // struct is_helper_pred +}; // struct is_helper_pred -} // namespace detail +} // namespace detail CUIInventoryCellItem::CUIInventoryCellItem(CInventoryItem* itm) { diff --git a/src/xrGame/ui/UICellItem.h b/src/xrGame/ui/UICellItem.h index b851403fb1e..6849990e63d 100644 --- a/src/xrGame/ui/UICellItem.h +++ b/src/xrGame/ui/UICellItem.h @@ -58,7 +58,7 @@ class CUICellItem : public CUIStatic CUICellItem* Child(u32 idx) { return m_childs[idx]; }; bool HasChild(CUICellItem* item); virtual bool EqualTo(CUICellItem* itm); - IC const Ivector2& GetGridSize() { return m_grid_size; }; // size in grid + IC const Ivector2& GetGridSize() { return m_grid_size; }; // size in grid IC void SetAccelerator(int dik) { m_accelerator = dik; }; IC int GetAccelerator() const { return m_accelerator; }; virtual CUIDragItem* CreateDragItem(); diff --git a/src/xrGame/ui/UIChangeMap.cpp b/src/xrGame/ui/UIChangeMap.cpp index e367d57de52..6129f440b81 100644 --- a/src/xrGame/ui/UIChangeMap.cpp +++ b/src/xrGame/ui/UIChangeMap.cpp @@ -152,7 +152,7 @@ void CUIChangeMap::FillUpList() for (u32 i = 0; i < cnt; ++i) { CUIListBoxItem* itm = lst->AddTextItem(CStringTable().translate(M.m_map_names[i].map_name).c_str()); - itm->Enable(true); // m_pExtraContentFilter->IsDataEnabled(M.m_map_names[i].map_name.c_str())); + itm->Enable(true); // m_pExtraContentFilter->IsDataEnabled(M.m_map_names[i].map_name.c_str())); } } diff --git a/src/xrGame/ui/UICharacterInfo.cpp b/src/xrGame/ui/UICharacterInfo.cpp index e574e1c9fb5..24e6bf778dc 100644 --- a/src/xrGame/ui/UICharacterInfo.cpp +++ b/src/xrGame/ui/UICharacterInfo.cpp @@ -288,9 +288,9 @@ void CUICharacterInfo::UpdateRelation() } namespace detail -{ // helper function implemented in file alife_simulator.cpp +{ // helper function implemented in file alife_simulator.cpp bool object_exists_in_alife_registry(u32 id); -} // namespace detail +} // namespace detail void CUICharacterInfo::Update() { diff --git a/src/xrGame/ui/UICheckButton.cpp b/src/xrGame/ui/UICheckButton.cpp index d1c9547734a..cace79fdd1f 100644 --- a/src/xrGame/ui/UICheckButton.cpp +++ b/src/xrGame/ui/UICheckButton.cpp @@ -69,7 +69,7 @@ void CUICheckButton::InitCheckButton(Fvector2 pos, Fvector2 size, LPCSTR texture void CUICheckButton::InitTexture2(LPCSTR texture_name) { - CUI3tButton::InitTexture(texture_name); // "ui_checker" + CUI3tButton::InitTexture(texture_name); // "ui_checker" Frect r = m_background->Get(S_Enabled)->GetStaticItem()->GetTextureRect(); TextItemControl()->m_TextOffset.x = TextItemControl()->m_TextOffset.x + r.width(); } diff --git a/src/xrGame/ui/UICheckButton.h b/src/xrGame/ui/UICheckButton.h index c394e0c1fa2..347a4b47f96 100644 --- a/src/xrGame/ui/UICheckButton.h +++ b/src/xrGame/ui/UICheckButton.h @@ -16,11 +16,11 @@ class CUICheckButton : public CUI3tButton, public CUIOptionsItem virtual void Update(); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current virtual void OnFocusReceive(); virtual void OnFocusLost(); diff --git a/src/xrGame/ui/UIComboBox.cpp b/src/xrGame/ui/UIComboBox.cpp index e72cab8860b..68186fbefe7 100644 --- a/src/xrGame/ui/UIComboBox.cpp +++ b/src/xrGame/ui/UIComboBox.cpp @@ -43,7 +43,7 @@ void CUIComboBox::InitComboBox(Fvector2 pos, float width) m_frameLine.InitIB(Fvector2().set(0, 0), Fvector2().set(width, CB_HEIGHT)); - m_frameLine.InitState(S_Enabled, "ui_inGame2_combobox_linetext"); // horizontal by default + m_frameLine.InitState(S_Enabled, "ui_inGame2_combobox_linetext"); // horizontal by default m_frameLine.InitState(S_Highlighted, "ui_inGame2_combobox_linetext"); // Edit Box on left side of frame line @@ -136,7 +136,7 @@ void CUIComboBox::SetCurrentOptValue() if (itm) m_itoken_id = (int)(__int64)itm->GetData(); else - m_itoken_id = 1; // first + m_itoken_id = 1; // first } void CUIComboBox::SaveBackUpOptValue() diff --git a/src/xrGame/ui/UIComboBox.h b/src/xrGame/ui/UIComboBox.h index 7f8f8276197..8a5f66d7dea 100644 --- a/src/xrGame/ui/UIComboBox.h +++ b/src/xrGame/ui/UIComboBox.h @@ -18,13 +18,13 @@ class CUIComboBox : public CUIWindow, public CUIOptionsItem, public pureRender CUIComboBox(); virtual ~CUIComboBox(); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current - virtual void OnRender(); // only for list-box + virtual void OnRender(); // only for list-box LPCSTR GetText(); LPCSTR GetTextOf(int index); diff --git a/src/xrGame/ui/UICustomEdit.cpp b/src/xrGame/ui/UICustomEdit.cpp index 1201ec5004d..d4dc3958982 100644 --- a/src/xrGame/ui/UICustomEdit.cpp +++ b/src/xrGame/ui/UICustomEdit.cpp @@ -214,23 +214,23 @@ void CUICustomEdit::Draw() for (int i = 0; i < sz; i++) passText[i] = '*'; passText[sz] = 0; - m_dx_cur = font->SizeOf_(passText); // cursor_str + m_dx_cur = font->SizeOf_(passText); // cursor_str } else - m_dx_cur = font->SizeOf_(istr); // cursor_str + m_dx_cur = font->SizeOf_(istr); // cursor_str m_force_update = false; } inherited::Draw(); - if (m_bInputFocus) // draw cursor here + if (m_bInputFocus) // draw cursor here { out.x = pos.x + 0.0f + TextItemControl()->m_TextOffset.x + TextItemControl()->GetIndentByAlign(); out.y = pos.y + 2.0f + TextItemControl()->m_TextOffset.y + TextItemControl()->GetVIndentByAlign(); UI().ClientToScreenScaled(out); - out.x += m_dx_cur; // cursor_str + out.x += m_dx_cur; // cursor_str font->Out(out.x, out.y, "_"); } diff --git a/src/xrGame/ui/UICustomSpin.cpp b/src/xrGame/ui/UICustomSpin.cpp index bd3b3c5016d..3f50b4e8e30 100644 --- a/src/xrGame/ui/UICustomSpin.cpp +++ b/src/xrGame/ui/UICustomSpin.cpp @@ -88,9 +88,9 @@ void CUICustomSpin::Enable(bool status) m_pBtnUp->Enable(status); if (!status) - m_pLines->SetTextColor(m_textColor[0]); // enabled color + m_pLines->SetTextColor(m_textColor[0]); // enabled color else - m_pLines->SetTextColor(m_textColor[1]); // disabled color + m_pLines->SetTextColor(m_textColor[1]); // disabled color } void CUICustomSpin::OnBtnUpClick() diff --git a/src/xrGame/ui/UIDemoPlayControl.cpp b/src/xrGame/ui/UIDemoPlayControl.cpp index 99f55baa24c..458024ba25b 100644 --- a/src/xrGame/ui/UIDemoPlayControl.cpp +++ b/src/xrGame/ui/UIDemoPlayControl.cpp @@ -157,7 +157,7 @@ void CUIDemoPlayControl::InitAllPlayers() CStringTable st; m_all_players->InitPropertiesBox(Fvector2().set(0, 0), Fvector2().set(100, 200)); - m_all_players->AddItem(st.translate("mpd_any_player").c_str(), NULL, 0); // warning ! zero tag means Any player ! + m_all_players->AddItem(st.translate("mpd_any_player").c_str(), NULL, 0); // warning ! zero tag means Any player ! m_players->clear(); for (u32 i = 0; i != players_count; ++i) @@ -167,7 +167,7 @@ void CUIDemoPlayControl::InitAllPlayers() LPCSTR tmp_player_name = tmp_player->get_name(); R_ASSERT(tmp_player_name); m_players->push_back(shared_str(tmp_player_name)); - m_all_players->AddItem(tmp_player_name, NULL, i + 1); // warning ! player_index = tag - 1 !!! + m_all_players->AddItem(tmp_player_name, NULL, i + 1); // warning ! player_index = tag - 1 !!! } m_all_players->AutoUpdateSize(); m_all_players->Hide(); @@ -305,7 +305,7 @@ void CUIDemoPlayControl::OnRepeatRewind(CUIWindow* w, void* d) }; break; default: NODEFAULT; - }; // switch (m_last_rewind_query) + }; // switch (m_last_rewind_query) if (rewind_result) UIStartRewind(); } diff --git a/src/xrGame/ui/UIDemoPlayControl.h b/src/xrGame/ui/UIDemoPlayControl.h index 6b9fb7229af..5c9432fecc3 100644 --- a/src/xrGame/ui/UIDemoPlayControl.h +++ b/src/xrGame/ui/UIDemoPlayControl.h @@ -50,11 +50,11 @@ class CUIDemoPlayControl : public CUIDialogWnd, public CUIWndCallback eRewindUntilArtTake, eRewindUntilArtDrop, eRewindUntilArtDeliver - }; // enum eRewindTypeTags + }; // enum eRewindTypeTags typedef buffer_vector players_collection_t; ERewindTypeTags m_last_rewind_type; - shared_str m_last_rewind_target; // player name + shared_str m_last_rewind_target; // player name Frect m_pbox_rect; Fvector2 m_rewind_type_pos; @@ -80,6 +80,6 @@ class CUIDemoPlayControl : public CUIDialogWnd, public CUIWndCallback Fvector2 m_last_curr_pos; demoplay_control* m_demo_play_control; -}; // class UIDemoPlayControl +}; // class UIDemoPlayControl -#endif //#ifndef UIDEMOPLAY_CONTROL \ No newline at end of file +#endif //#ifndef UIDEMOPLAY_CONTROL \ No newline at end of file diff --git a/src/xrGame/ui/UIDoubleProgressBar.cpp b/src/xrGame/ui/UIDoubleProgressBar.cpp index 227d80568f0..1252c9a305b 100644 --- a/src/xrGame/ui/UIDoubleProgressBar.cpp +++ b/src/xrGame/ui/UIDoubleProgressBar.cpp @@ -34,13 +34,13 @@ void CUIDoubleProgressBar::InitFromXml(CUIXml& xml_doc, LPCSTR path) void CUIDoubleProgressBar::SetTwoPos(float cur_value, float compare_value) { - if (cur_value < compare_value) // red + if (cur_value < compare_value) // red { m_progress_one.m_UIProgressItem.SetTextureColor(m_less_color); m_progress_one.SetProgressPos(compare_value); m_progress_two.SetProgressPos(cur_value); } - else if (cur_value > compare_value) // green + else if (cur_value > compare_value) // green { m_progress_one.m_UIProgressItem.SetTextureColor(m_more_color); m_progress_one.SetProgressPos(cur_value); diff --git a/src/xrGame/ui/UIDoubleProgressBar.h b/src/xrGame/ui/UIDoubleProgressBar.h index 217797e0961..37a9acdd535 100644 --- a/src/xrGame/ui/UIDoubleProgressBar.h +++ b/src/xrGame/ui/UIDoubleProgressBar.h @@ -6,7 +6,7 @@ class CUIDoubleProgressBar : public CUIWindow { -public: // func +public: // func CUIDoubleProgressBar(); virtual ~CUIDoubleProgressBar(); @@ -17,7 +17,7 @@ class CUIDoubleProgressBar : public CUIWindow CUIProgressBar m_progress_one; CUIProgressBar m_progress_two; - u32 m_less_color; // red - u32 m_more_color; // green + u32 m_less_color; // red + u32 m_more_color; // green -}; // class CUIDoubleProgressBar +}; // class CUIDoubleProgressBar diff --git a/src/xrGame/ui/UIDragDropListEx.cpp b/src/xrGame/ui/UIDragDropListEx.cpp index a5b902b8deb..12ef06d153d 100644 --- a/src/xrGame/ui/UIDragDropListEx.cpp +++ b/src/xrGame/ui/UIDragDropListEx.cpp @@ -414,7 +414,7 @@ int CUIDragDropListEx::ScrollPos() return m_vScrollBar->GetScrollPos(); } -void CUIDragDropListEx::SetItem(CUICellItem* itm) // auto +void CUIDragDropListEx::SetItem(CUICellItem* itm) // auto { if (m_container->AddSimilar(itm)) { return; @@ -425,7 +425,7 @@ void CUIDragDropListEx::SetItem(CUICellItem* itm) // auto SetItem(itm, dest_cell_pos); } -void CUIDragDropListEx::SetItem(CUICellItem* itm, Fvector2 abs_pos) // start at cursor pos +void CUIDragDropListEx::SetItem(CUICellItem* itm, Fvector2 abs_pos) // start at cursor pos { if (m_container->AddSimilar(itm)) return; @@ -437,7 +437,7 @@ void CUIDragDropListEx::SetItem(CUICellItem* itm, Fvector2 abs_pos) // start at SetItem(itm); } -void CUIDragDropListEx::SetItem(CUICellItem* itm, Ivector2 cell_pos) // start at cell +void CUIDragDropListEx::SetItem(CUICellItem* itm, Ivector2 cell_pos) // start at cell { if (m_container->AddSimilar(itm)) return; R_ASSERT(m_container->IsRoomFree(cell_pos, itm->GetGridSize())); @@ -916,9 +916,9 @@ void CUICellContainer::Draw() GlobalEnv.UIRender->PushPoint(iFloor(rect_offset.x + p.x * (f_len.x)) - 0.5f, iFloor(rect_offset.y + p.y * (f_len.y)) - 0.5f, 0, m_pParentDragDropList->back_color, tp.x + uv.x, tp.y + uv.y); - } // for k - } // for y - } // for x + } // for k + } // for y + } // for x UI().PushScissor(clientArea); GlobalEnv.UIRender->SetShader(*hShader); @@ -927,7 +927,7 @@ void CUICellContainer::Draw() // draw shown items in range if (m_cells_to_draw.size()) { UI_CELLS_VEC_IT it = m_cells_to_draw.begin(); - for (; it != m_cells_to_draw.end(); ++it) // all cells + for (; it != m_cells_to_draw.end(); ++it) // all cells { CUICell& cell = (*it); if (!cell.Empty() && (cell.m_item->m_drawn_frame != Device.dwFrame)) { diff --git a/src/xrGame/ui/UIDragDropListEx.h b/src/xrGame/ui/UIDragDropListEx.h index 57d2d25e93a..4e41b87dbab 100644 --- a/src/xrGame/ui/UIDragDropListEx.h +++ b/src/xrGame/ui/UIDragDropListEx.h @@ -133,9 +133,9 @@ class CUIDragDropListEx : public CUIWindow, public CUIWndCallback void SetConditionProgBarVisibility(bool b) { m_bConditionProgBarVisible = b; }; public: // items management - virtual void SetItem(CUICellItem* itm); // auto - virtual void SetItem(CUICellItem* itm, Fvector2 abs_pos); // start at cursor pos - virtual void SetItem(CUICellItem* itm, Ivector2 cell_pos); // start at cell + virtual void SetItem(CUICellItem* itm); // auto + virtual void SetItem(CUICellItem* itm, Fvector2 abs_pos); // start at cursor pos + virtual void SetItem(CUICellItem* itm, Ivector2 cell_pos); // start at cell bool CanSetItem(CUICellItem* itm); u32 ItemsCount(); @@ -174,9 +174,9 @@ class CUICellContainer : public CUIWindow protected: CUIDragDropListEx* m_pParentDragDropList; - Ivector2 m_cellsCapacity; // count (col, row) - Ivector2 m_cellSize; // pixels (width, height) - Ivector2 m_cellSpacing; // pixels (width, height) + Ivector2 m_cellsCapacity; // count (col, row) + Ivector2 m_cellSize; // pixels (width, height) + Ivector2 m_cellSpacing; // pixels (width, height) UI_CELLS_VEC m_cells; diff --git a/src/xrGame/ui/UIEditBox.h b/src/xrGame/ui/UIEditBox.h index ae8aeff831e..cf8eadb06a4 100644 --- a/src/xrGame/ui/UIEditBox.h +++ b/src/xrGame/ui/UIEditBox.h @@ -12,11 +12,11 @@ class CUIEditBox : public CUIOptionsItem, public CUICustomEdit virtual void InitCustomEdit(Fvector2 pos, Fvector2 size); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current // CUIMultiTextureOwner virtual void InitTexture(LPCSTR texture); diff --git a/src/xrGame/ui/UIEditKeyBind.cpp b/src/xrGame/ui/UIEditKeyBind.cpp index 845d47f58bd..2eb0876394f 100644 --- a/src/xrGame/ui/UIEditKeyBind.cpp +++ b/src/xrGame/ui/UIEditKeyBind.cpp @@ -221,7 +221,7 @@ void CUIEditKeyBind::OnMessage(LPCSTR message) xr_strcpy(command, message); command[eq] = 0; - if (0 == xr_strcmp(m_action->action_name, command)) return; // fuck + if (0 == xr_strcmp(m_action->action_name, command)) return; // fuck _action* other_action = action_name_to_ptr(command); if (is_group_not_conflicted(m_action->key_group, other_action->key_group)) return; diff --git a/src/xrGame/ui/UIEditKeyBind.h b/src/xrGame/ui/UIEditKeyBind.h index 02f874acbbf..985fe9552e9 100644 --- a/src/xrGame/ui/UIEditKeyBind.h +++ b/src/xrGame/ui/UIEditKeyBind.h @@ -20,11 +20,11 @@ class CUIEditKeyBind : public CUIStatic, public CUIOptionsItem // options item virtual void AssignProps(const shared_str& entry, const shared_str& group); - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current void SetValue(); virtual void OnMessage(LPCSTR message); diff --git a/src/xrGame/ui/UIFrags2.cpp b/src/xrGame/ui/UIFrags2.cpp index 3cc878c2801..fc259fcde1a 100644 --- a/src/xrGame/ui/UIFrags2.cpp +++ b/src/xrGame/ui/UIFrags2.cpp @@ -33,7 +33,7 @@ void CUIFrags2::Init(CUIXml& xml_doc, LPCSTR path, LPCSTR backgrnd_path) float x = xml_doc.ReadAttribFlt(path, 0, "x2"); R_ASSERT(x); pos = m_pStats2->GetWndPos(); - pos.x = x; // + pos.x = x; // pos.y += 3; m_pStats2->SetWndPos(pos); // team2 statas diff --git a/src/xrGame/ui/UIFrameLine.h b/src/xrGame/ui/UIFrameLine.h index 241d8bac79d..efb46b3bfd9 100644 --- a/src/xrGame/ui/UIFrameLine.h +++ b/src/xrGame/ui/UIFrameLine.h @@ -7,9 +7,9 @@ class CUIFrameLine : public CUICustomItem friend class CUIFrameLineWnd; enum { - flFirst = 0, // Left or top - flSecond, // Right or bottom - flBack, // Center texture + flFirst = 0, // Left or top + flSecond, // Right or bottom + flBack, // Center texture flMax }; diff --git a/src/xrGame/ui/UIFrameLineWnd.cpp b/src/xrGame/ui/UIFrameLineWnd.cpp index 56e8faa05d2..1f3b2384524 100644 --- a/src/xrGame/ui/UIFrameLineWnd.cpp +++ b/src/xrGame/ui/UIFrameLineWnd.cpp @@ -82,7 +82,7 @@ void CUIFrameLineWnd::DrawElements() UI().ClientToScreenScaled(rect.rb); float back_len = 0.0f; - u32 prim_count = 6 * 2; // first&second + u32 prim_count = 6 * 2; // first&second if (bHorizontal) { back_len = rect.width() - m_tex_rect[flFirst].width() - m_tex_rect[flSecond].width(); if (back_len < 0.0f) rect.x2 -= back_len; @@ -129,7 +129,7 @@ bool CUIFrameLineWnd::inc_pos( RBp.x += m_tex_rect[i].width(); RBp.y += m_tex_rect[i].height(); } - else // i==flBack + else // i==flBack { if ((bHorizontal && rect.lt.x + m_tex_rect[flSecond].width() + EPS_L >= rect.rb.x) || (!bHorizontal && rect.lt.y + m_tex_rect[flSecond].height() + EPS_L >= rect.rb.y)) @@ -141,7 +141,7 @@ bool CUIFrameLineWnd::inc_pos( bool b_draw_reminder = (bHorizontal) ? (rect.lt.x + m_tex_rect[flBack].width() > rect.rb.x - m_tex_rect[flSecond].width()) : (rect.lt.y + m_tex_rect[flBack].height() > rect.rb.y - m_tex_rect[flSecond].height()); - if (b_draw_reminder) { // draw reminder + if (b_draw_reminder) { // draw reminder float rem_len = (bHorizontal) ? rect.rb.x - m_tex_rect[flSecond].width() - rect.lt.x : rect.rb.y - m_tex_rect[flSecond].height() - rect.lt.y; @@ -164,7 +164,7 @@ bool CUIFrameLineWnd::inc_pos( } } else - { // draw full element + { // draw full element RBt = m_tex_rect[i].rb; RBp = rect.lt; diff --git a/src/xrGame/ui/UIFrameLineWnd.h b/src/xrGame/ui/UIFrameLineWnd.h index a952f31263d..dab4543daea 100644 --- a/src/xrGame/ui/UIFrameLineWnd.h +++ b/src/xrGame/ui/UIFrameLineWnd.h @@ -23,9 +23,9 @@ class CUIFrameLineWnd : public CUIWindow bool inc_pos(Frect& rect, int counter, int i, Fvector2& LTp, Fvector2& RBp, Fvector2& LTt, Fvector2& RBt); enum { - flFirst = 0, // Left or top - flBack, // Center texture - flSecond, // Right or bottom + flFirst = 0, // Left or top + flBack, // Center texture + flSecond, // Right or bottom flMax }; u32 m_texture_color; diff --git a/src/xrGame/ui/UIFrameWindow.cpp b/src/xrGame/ui/UIFrameWindow.cpp index 48bf640bf69..122c4923826 100644 --- a/src/xrGame/ui/UIFrameWindow.cpp +++ b/src/xrGame/ui/UIFrameWindow.cpp @@ -17,7 +17,7 @@ void CUIFrameWindow::SetWndSize(const Fvector2& sz) Fvector2 size_test = sz; UI().ClientToScreenScaled(size_test); - if (m_bTextureVisible) { // fit to min size + if (m_bTextureVisible) { // fit to min size Fvector2 min_size; min_size.x = m_tex_rect[fmLT].width() + m_tex_rect[fmRT].width(); min_size.y = m_tex_rect[fmLT].height() + m_tex_rect[fmLB].height(); @@ -92,21 +92,21 @@ void CUIFrameWindow::DrawElements() UI().ClientToScreenScaled(rect.rb); Fvector2 back_len = {0.0f, 0.0f}; - u32 rect_count = 4; // lt+rt+lb+rb + u32 rect_count = 4; // lt+rt+lb+rb back_len.x = rect.width() - m_tex_rect[fmLT].width() - m_tex_rect[fmRT].width(); back_len.y = rect.height() - m_tex_rect[fmLT].height() - m_tex_rect[fmRB].height(); R_ASSERT(back_len.x + EPS_L >= 0.0f && back_len.y + EPS_L >= 0.0f); u32 cnt = 0; - if (back_len.x > 0.0f) // top+bottom + if (back_len.x > 0.0f) // top+bottom cnt = 2 * iCeil(back_len.x / m_tex_rect[fmT].width()); rect_count += cnt; - if (back_len.y > 0.0f) // left+right + if (back_len.y > 0.0f) // left+right cnt = 2 * iCeil(back_len.y / m_tex_rect[fmL].height()); rect_count += cnt; - if (back_len.x > 0.0f && back_len.y > 0.0f) // back + if (back_len.x > 0.0f && back_len.y > 0.0f) // back cnt = iCeil(back_len.x / m_tex_rect[fmBK].width()) * iCeil(back_len.y / m_tex_rect[fmBK].height()); rect_count += cnt; diff --git a/src/xrGame/ui/UIGameTutorial.h b/src/xrGame/ui/UIGameTutorial.h index bebfc476daa..64541de0e62 100644 --- a/src/xrGame/ui/UIGameTutorial.h +++ b/src/xrGame/ui/UIGameTutorial.h @@ -27,7 +27,7 @@ class CUISequencer : public pureFrame, public pureRender, public IInputReceiver void Stop(); void Next(); - void Destroy(); // be careful + void Destroy(); // be careful virtual void OnFrame(); virtual void OnRender(); diff --git a/src/xrGame/ui/UIGameTutorialSimpleItem.cpp b/src/xrGame/ui/UIGameTutorialSimpleItem.cpp index 9350e4c435d..941cfbb05a2 100644 --- a/src/xrGame/ui/UIGameTutorialSimpleItem.cpp +++ b/src/xrGame/ui/UIGameTutorialSimpleItem.cpp @@ -268,7 +268,7 @@ bool CUISequenceSimpleItem::Stop(bool bForce) { if (!m_flags.test(etiCanBeStopped) && !bForce) return false; - if (m_UIWindow->GetParent() == m_owner->MainWnd()) // started?? + if (m_UIWindow->GetParent() == m_owner->MainWnd()) // started?? m_owner->MainWnd()->DetachChild(m_UIWindow); m_sound.stop(); @@ -295,10 +295,10 @@ void CUISequenceSimpleItem::OnKeyboardPress(int dik) { if (!m_flags.test(etiCanBeStopped)) { VERIFY(m_continue_dik_guard != -1); - if (m_continue_dik_guard == -1) m_flags.set(etiCanBeStopped, TRUE); // not binded action :( + if (m_continue_dik_guard == -1) m_flags.set(etiCanBeStopped, TRUE); // not binded action :( if (m_continue_dik_guard == 9999 || dik == m_continue_dik_guard) - m_flags.set(etiCanBeStopped, TRUE); // match key + m_flags.set(etiCanBeStopped, TRUE); // match key } for (u32 idx = 0; idx < m_actions.size(); ++idx) diff --git a/src/xrGame/ui/UIHelper.h b/src/xrGame/ui/UIHelper.h index ea4e14d7af1..c62b4a114cc 100644 --- a/src/xrGame/ui/UIHelper.h +++ b/src/xrGame/ui/UIHelper.h @@ -41,6 +41,6 @@ class UIHelper static CUIDragDropListEx* CreateDragDropListEx(CUIXml& xml, LPCSTR ui_path, CUIWindow* parent); static CUIDragDropReferenceList* CreateDragDropReferenceList(CUIXml& xml, LPCSTR ui_path, CUIWindow* parent); -}; // class UIHelper +}; // class UIHelper -#endif // UI_HELPER_H_INCLUDED +#endif // UI_HELPER_H_INCLUDED diff --git a/src/xrGame/ui/UIHint.h b/src/xrGame/ui/UIHint.h index adb6a7f5639..bd1a9ff98e4 100644 --- a/src/xrGame/ui/UIHint.h +++ b/src/xrGame/ui/UIHint.h @@ -43,7 +43,7 @@ class UIHint : public CUIWindow bool m_visible; float m_border; Frect m_rect; -}; // class UIHint +}; // class UIHint // ================================================================================================= // UIHintWindow = Owner of UIHint @@ -74,6 +74,6 @@ class UIHintWindow : public CUIWindow u32 m_hint_delay; shared_str m_hint_text; bool m_enable; -}; // class UIHintWindow +}; // class UIHintWindow -#endif // UI_HINT_H_INCLUDED +#endif // UI_HINT_H_INCLUDED diff --git a/src/xrGame/ui/UIHudStatesWnd.cpp b/src/xrGame/ui/UIHudStatesWnd.cpp index a131a8ee218..9940f20c6a2 100644 --- a/src/xrGame/ui/UIHudStatesWnd.cpp +++ b/src/xrGame/ui/UIHudStatesWnd.cpp @@ -66,7 +66,7 @@ ALife::EInfluenceType CUIHudStatesWnd::get_indik_type(ALife::EHitType hit_type) case ALife::eHitTypeTelepatic: iz_type = ALife::infl_psi; break; case ALife::eHitTypeShock: iz_type = ALife::infl_electra; - break; // it hasnt CStatic + break; // it hasnt CStatic case ALife::eHitTypeStrike: case ALife::eHitTypeWound: @@ -182,7 +182,7 @@ void CUIHudStatesWnd::Load_section() Load_section_type(ALife::infl_fire, "fire_zone_detector"); Load_section_type(ALife::infl_acid, "acid_zone_detector"); Load_section_type(ALife::infl_psi, "psi_zone_detector"); - Load_section_type(ALife::infl_electra, "electra_zone_detector"); // no uistatic + Load_section_type(ALife::infl_electra, "electra_zone_detector"); // no uistatic } void CUIHudStatesWnd::Load_section_type(ALife::EInfluenceType type, LPCSTR section) @@ -465,7 +465,7 @@ void CUIHudStatesWnd::UpdateZones() // power = power / zone_max_power; clamp(power, 0.0f, 1.1f); - if ((z_type != ALife::infl_max_count) && (m_zone_cur_power[z_type] < power)) // max + if ((z_type != ALife::infl_max_count) && (m_zone_cur_power[z_type] < power)) // max { m_zone_cur_power[z_type] = power; } @@ -474,7 +474,7 @@ void CUIHudStatesWnd::UpdateZones() fRelPow *= 0.6f; if (dist_to_zone < rad_zone) { fRelPow *= 0.3f; - fRelPow *= (2.5f - 2.0f * power); // звук зависит от силы зоны + fRelPow *= (2.5f - 2.0f * power); // звук зависит от силы зоны } } clamp(fRelPow, 0.0f, 1.0f); @@ -493,14 +493,14 @@ void CUIHudStatesWnd::UpdateZones() { zone_info.snd_time += Device.fTimeDelta; } - } // for itb + } // for itb } void CUIHudStatesWnd::UpdateIndicators(CActor* actor) { if (m_fake_indicators_update) return; - for (int i = 0; i < it_max; ++i) // it_max = ALife::infl_max_count-1 + for (int i = 0; i < it_max; ++i) // it_max = ALife::infl_max_count-1 { UpdateIndicatorType(actor, (ALife::EInfluenceType)i); } @@ -686,7 +686,7 @@ void CUIHudStatesWnd::FakeUpdateIndicatorType(u8 t, float power) } float max_power = actor->conditions().GetZoneMaxPower(hit_type); - protect = protect / max_power; // = 0..1 + protect = protect / max_power; // = 0..1 if (hit_power < EPS) { m_indik[type]->Show(false); diff --git a/src/xrGame/ui/UIHudStatesWnd.h b/src/xrGame/ui/UIHudStatesWnd.h index 127d335237b..11cc84aa399 100644 --- a/src/xrGame/ui/UIHudStatesWnd.h +++ b/src/xrGame/ui/UIHudStatesWnd.h @@ -107,4 +107,4 @@ class CUIHudStatesWnd : public CUIWindow void UpdateIndicatorType(CActor* actor, ALife::EInfluenceType type); // void SwitchLA ( bool state, ALife::EInfluenceType type ); -}; // class CUIHudStatesWnd +}; // class CUIHudStatesWnd diff --git a/src/xrGame/ui/UIInvUpgrade.cpp b/src/xrGame/ui/UIInvUpgrade.cpp index 65cc717503e..905b0312ed1 100644 --- a/src/xrGame/ui/UIInvUpgrade.cpp +++ b/src/xrGame/ui/UIInvUpgrade.cpp @@ -48,7 +48,7 @@ void UIUpgrade::init_upgrade(LPCSTR upgrade_id, CInventoryItem& item) VERIFY(upgrade_id && xr_strcmp(upgrade_id, "")); m_upgrade_id = upgrade_id; - m_prev_state = STATE_COUNT; // no defined + m_prev_state = STATE_COUNT; // no defined update_item(&item); } @@ -76,7 +76,7 @@ void UIUpgrade::Reset() void UIUpgrade::load_from_xml(CUIXml& ui_xml, int i_column, int i_cell, Frect const& t_cell_item) { m_scheme_index.x = i_column; - m_scheme_index.y = i_cell; // row + m_scheme_index.y = i_cell; // row CUIXmlInit::InitWindow(ui_xml, "cell", i_cell, this); @@ -208,7 +208,7 @@ bool UIUpgrade::OnMouseAction(float x, float y, EUIMessages mouse_action) OnRClick(); return true; } - } // m_bCursorOverWindow + } // m_bCursorOverWindow if (mouse_action == WINDOW_LBUTTON_UP || mouse_action == WINDOW_RBUTTON_UP) { m_button_state = BUTTON_FREE; @@ -302,7 +302,7 @@ void UIUpgrade::update_item(CInventoryItem* inv_item) m_state = STATE_UNKNOWN; m_state_lock = true; break; - case inventory::upgrade::result_e_installed: // has_upgrade + case inventory::upgrade::result_e_installed: // has_upgrade m_item->SetTextureColor(color_rgba(255, 255, 255, 255)); m_state = STATE_SELECTED; m_state_lock = true; diff --git a/src/xrGame/ui/UIInvUpgrade.h b/src/xrGame/ui/UIInvUpgrade.h index 66e61500f15..a1d845d822c 100644 --- a/src/xrGame/ui/UIInvUpgrade.h +++ b/src/xrGame/ui/UIInvUpgrade.h @@ -21,7 +21,7 @@ namespace upgrade class Upgrade; class Property; } -} // namespace upgrade, inventory +} // namespace upgrade, inventory class CUIStatic; class CUIInventoryUpgradeWnd; @@ -144,4 +144,4 @@ class CUIUpgradePoint : public CUIStatic virtual void OnFocusLost(); }; -#endif // UI_INVENTORY_UPGRADE_H_INCLUDED +#endif // UI_INVENTORY_UPGRADE_H_INCLUDED diff --git a/src/xrGame/ui/UIInvUpgradeInfo.h b/src/xrGame/ui/UIInvUpgradeInfo.h index ab8237ad765..93557e7f00a 100644 --- a/src/xrGame/ui/UIInvUpgradeInfo.h +++ b/src/xrGame/ui/UIInvUpgradeInfo.h @@ -18,7 +18,7 @@ namespace upgrade { class Upgrade; } -} // namespace upgrade, inventory +} // namespace upgrade, inventory class CUITextWnd; class CUIFrameWindow; @@ -52,6 +52,6 @@ class UIInvUpgradeInfo : public CUIWindow CUITextWnd* m_desc; CUITextWnd* m_prereq; -}; // class UIInvUpgradeInfo +}; // class UIInvUpgradeInfo -#endif // UI_INVENTORY_UPGRADE_INFO_H_INCLUDED +#endif // UI_INVENTORY_UPGRADE_INFO_H_INCLUDED diff --git a/src/xrGame/ui/UIInvUpgradeProperty.cpp b/src/xrGame/ui/UIInvUpgradeProperty.cpp index f68a5f31f0f..579019b5d4a 100644 --- a/src/xrGame/ui/UIInvUpgradeProperty.cpp +++ b/src/xrGame/ui/UIInvUpgradeProperty.cpp @@ -167,7 +167,7 @@ void UIInvUpgPropertiesWnd::init_from_xml(LPCSTR xml_name) CInifile::SectIt_ ie = inv_section.Data.end(); for (; ib != ie; ++ib) { - UIProperty* ui_property = new UIProperty(); // load one time !! + UIProperty* ui_property = new UIProperty(); // load one time !! ui_property->init_from_xml(ui_xml); property_id._set((*ib).first); @@ -178,7 +178,7 @@ void UIInvUpgPropertiesWnd::init_from_xml(LPCSTR xml_name) m_properties_ui.push_back(ui_property); AttachChild(ui_property); - } // for ib + } // for ib ui_xml.SetLocalRoot(stored_root); } diff --git a/src/xrGame/ui/UIInvUpgradeProperty.h b/src/xrGame/ui/UIInvUpgradeProperty.h index d586da2d923..4992fb93633 100644 --- a/src/xrGame/ui/UIInvUpgradeProperty.h +++ b/src/xrGame/ui/UIInvUpgradeProperty.h @@ -20,7 +20,7 @@ namespace upgrade class Upgrade; class Property; } -} // namespace upgrade, inventory +} // namespace upgrade, inventory class UIProperty : public CUIWindow { @@ -49,7 +49,7 @@ class UIProperty : public CUIWindow bool compute_value(ItemUpgrades_type const& item_upgrades); bool show_result(LPCSTR values); -}; // class UIProperty +}; // class UIProperty // ========================================================================================= @@ -77,6 +77,6 @@ class UIInvUpgPropertiesWnd : public CUIWindow protected: void set_info(ItemUpgrades_type const& item_upgrades); -}; // class UIInvUpgPropertiesWnd +}; // class UIInvUpgPropertiesWnd -#endif // UI_INVENTORY_UPGRADE_PROPERTY_H_INCLUDED +#endif // UI_INVENTORY_UPGRADE_PROPERTY_H_INCLUDED diff --git a/src/xrGame/ui/UIInventoryUpgradeWnd.cpp b/src/xrGame/ui/UIInventoryUpgradeWnd.cpp index a353633f2f9..1da7818f60b 100644 --- a/src/xrGame/ui/UIInventoryUpgradeWnd.cpp +++ b/src/xrGame/ui/UIInventoryUpgradeWnd.cpp @@ -213,7 +213,7 @@ bool CUIInventoryUpgradeWnd::install_item(CInventoryItem& inv_item, bool can_upg if (!can_upgrade) { #ifdef DEBUG Msg("Inventory item <%s> cannot upgrade - Mechanic say.", inv_item.m_section_id.c_str()); -#endif // DEBUG +#endif // DEBUG m_current_scheme = NULL; return false; } @@ -222,7 +222,7 @@ bool CUIInventoryUpgradeWnd::install_item(CInventoryItem& inv_item, bool can_upg if (!scheme_name) { #ifdef DEBUG Msg("Inventory item <%s> does not contain upgrade scheme.", inv_item.m_section_id.c_str()); -#endif // DEBUG +#endif // DEBUG m_current_scheme = NULL; return false; } @@ -253,8 +253,8 @@ bool CUIInventoryUpgradeWnd::install_item(CInventoryItem& inv_item, bool can_upg } ui_item->set_texture(UIUpgrade::LAYER_ITEM, upgrade_p->icon_name()); - ui_item->set_texture(UIUpgrade::LAYER_POINT, m_point_textures[UIUpgrade::STATE_ENABLED].c_str()); // default - ui_item->set_texture(UIUpgrade::LAYER_COLOR, m_cell_textures[UIUpgrade::STATE_ENABLED].c_str()); // default + ui_item->set_texture(UIUpgrade::LAYER_POINT, m_point_textures[UIUpgrade::STATE_ENABLED].c_str()); // default + ui_item->set_texture(UIUpgrade::LAYER_COLOR, m_cell_textures[UIUpgrade::STATE_ENABLED].c_str()); // default } m_scheme_wnd->Show(true); @@ -339,7 +339,7 @@ void CUIInventoryUpgradeWnd::set_info_cur_upgrade(Upgrade_type* upgrade) UIUpgrade* uiu = FindUIUpgrade(upgrade); if (uiu) { if (Device.dwTimeGlobal < uiu->FocusReceiveTime()) { - upgrade = NULL; // visible = false + upgrade = NULL; // visible = false } } else diff --git a/src/xrGame/ui/UIInventoryUpgradeWnd.h b/src/xrGame/ui/UIInventoryUpgradeWnd.h index 1e8f6ea7024..4c46150968c 100644 --- a/src/xrGame/ui/UIInventoryUpgradeWnd.h +++ b/src/xrGame/ui/UIInventoryUpgradeWnd.h @@ -23,7 +23,7 @@ class Manager; class Upgrade; class Property; } -} // namespace upgrade, inventory +} // namespace upgrade, inventory class UIUpgrade; class CInventoryItem; @@ -41,7 +41,7 @@ class CUIInventoryUpgradeWnd : public CUIWindow typedef inventory::upgrade::Property Property_type; typedef xr_vector UI_Upgrades_type; -private: // sub-classes +private: // sub-classes struct Scheme { shared_str name; @@ -111,6 +111,6 @@ class CUIInventoryUpgradeWnd : public CUIWindow ui_shader* m_WeaponIconsShader; ui_shader* m_OutfitIconsShader; -}; // class CUIInventoryUpgradeWnd +}; // class CUIInventoryUpgradeWnd -#endif // UI_INVENTORY_UPGRADE_WND_H_INCLUDED +#endif // UI_INVENTORY_UPGRADE_WND_H_INCLUDED diff --git a/src/xrGame/ui/UIInventoryUpgradeWnd_add.cpp b/src/xrGame/ui/UIInventoryUpgradeWnd_add.cpp index 1f9b2e9a6ad..29109a82c9b 100644 --- a/src/xrGame/ui/UIInventoryUpgradeWnd_add.cpp +++ b/src/xrGame/ui/UIInventoryUpgradeWnd_add.cpp @@ -148,14 +148,14 @@ void CUIInventoryUpgradeWnd::LoadSchemes(CUIXml& uiXml) item->attach_point(item_point); scheme->cells.push_back(item); - } // for i_cell + } // for i_cell uiXml.SetLocalRoot(tmpl_node); - } // for i_clm + } // for i_clm m_schemes.push_back(scheme); uiXml.SetLocalRoot(tmpl_root); - } // for i_tmpl + } // for i_tmpl uiXml.SetLocalRoot(stored_root); } diff --git a/src/xrGame/ui/UIInventoryUtilities.cpp b/src/xrGame/ui/UIInventoryUtilities.cpp index 46083c9f410..e4221ff1192 100644 --- a/src/xrGame/ui/UIInventoryUtilities.cpp +++ b/src/xrGame/ui/UIInventoryUtilities.cpp @@ -26,7 +26,7 @@ const LPCSTR ratingField = "rating_names"; const LPCSTR reputationgField = "reputation_names"; const LPCSTR goodwillField = "goodwill_names"; -const LPCSTR st_months[12] = // StringTable for GetDateAsString() +const LPCSTR st_months[12] = // StringTable for GetDateAsString() {"month_january", "month_february", "month_march", "month_april", "month_may", "month_june", "month_july", "month_august", "month_september", "month_october", "month_november", "month_december"}; @@ -487,13 +487,13 @@ void InventoryUtilities::SendInfoToLuaScripts(shared_str info) { if (GameID() != eGameIDSingle) return; if (info == shared_str("ui_talk_show")) { - int mode = 10; // now Menu is Talk Dialog (show) + int mode = 10; // now Menu is Talk Dialog (show) luabind::functor funct; R_ASSERT(ai().script_engine().functor("pda.actor_menu_mode", funct)); funct(mode); } if (info == shared_str("ui_talk_hide")) { - int mode = 11; // Talk Dialog hide + int mode = 11; // Talk Dialog hide luabind::functor funct; R_ASSERT(ai().script_engine().functor("pda.actor_menu_mode", funct)); funct(mode); diff --git a/src/xrGame/ui/UIItemInfo.cpp b/src/xrGame/ui/UIItemInfo.cpp index f893d1c2910..aab680e34f9 100644 --- a/src/xrGame/ui/UIItemInfo.cpp +++ b/src/xrGame/ui/UIItemInfo.cpp @@ -130,7 +130,7 @@ void CUIItemInfo::InitItemInfo(LPCSTR xml_name) // UIDesc_line->SetAutoDelete (true); // xml_init.InitStatic (uiXml, "description_line", 0, UIDesc_line); - if (ai().get_alife()) // (-designer) + if (ai().get_alife()) // (-designer) { UIProperties = new UIInvUpgPropertiesWnd(); UIProperties->init_from_xml("actor_menu_item.xml"); @@ -218,7 +218,7 @@ void CUIItemInfo::InitItem(CUICellItem* pCellItem, CInventoryItem* pCompareItem, } } if (UICost && IsGameTypeSingle() && item_price != u32(-1)) { - xr_sprintf(str, "%d RU", item_price); // will be owerwritten in multiplayer + xr_sprintf(str, "%d RU", item_price); // will be owerwritten in multiplayer UICost->SetText(str); pos.x = UICost->GetWndPos().x; if (m_complex_desc) { diff --git a/src/xrGame/ui/UIKickPlayer.cpp b/src/xrGame/ui/UIKickPlayer.cpp index 6b2a2d9ef85..48f1e1ffc32 100644 --- a/src/xrGame/ui/UIKickPlayer.cpp +++ b/src/xrGame/ui/UIKickPlayer.cpp @@ -151,7 +151,7 @@ void CUIKickPlayer::Update() bool bNeedRefresh = false; bool bHasSelected = false; - xr_vector::iterator fit; //, fite; + xr_vector::iterator fit; //, fite; for (; I != E; ++I) { game_PlayerState* pI = I->second; diff --git a/src/xrGame/ui/UILanimController.h b/src/xrGame/ui/UILanimController.h index 97da8270fe5..c7d212e0d64 100644 --- a/src/xrGame/ui/UILanimController.h +++ b/src/xrGame/ui/UILanimController.h @@ -79,7 +79,7 @@ class CUILightAnimColorConrollerImpl : public CUILightAnimColorConroller float t = Device.dwTimeContinual / 1000.0f; - if (t < m_lanim_clr.m_lanim_start_time) // consider animation delay + if (t < m_lanim_clr.m_lanim_start_time) // consider animation delay return; if (m_lanim_clr.m_lanimFlags.test(LA_CYCLIC) || diff --git a/src/xrGame/ui/UILine.cpp b/src/xrGame/ui/UILine.cpp index 03cdc4ffcae..3e349a5f32b 100644 --- a/src/xrGame/ui/UILine.cpp +++ b/src/xrGame/ui/UILine.cpp @@ -137,7 +137,7 @@ void CUILine::Draw(CGameFont* pFont, float x, float y) const for (int i = 0; i < size; i++) { m_subLines[i].Draw(pFont, x + length, y); - float ll = pFont->SizeOf_(m_subLines[i].m_text.c_str()); //. all ok + float ll = pFont->SizeOf_(m_subLines[i].m_text.c_str()); //. all ok UI().ClientToScreenScaledWidth(ll); length += ll; } @@ -177,7 +177,7 @@ const CUILine* CUILine::Cut2Pos(Position& pos, bool to_first) { m_tmpLine->AddSubLine(&m_subLines[i]); - if (m_subLines[i].m_last_in_line) // check if this subline must be last in line + if (m_subLines[i].m_last_in_line) // check if this subline must be last in line { for (int j = 0; j <= i; j++) m_subLines.erase(m_subLines.begin()); diff --git a/src/xrGame/ui/UILines.cpp b/src/xrGame/ui/UILines.cpp index febbeeec4b8..32bf8c1ef23 100644 --- a/src/xrGame/ui/UILines.cpp +++ b/src/xrGame/ui/UILines.cpp @@ -168,7 +168,7 @@ void CUILines::ParseText(bool force) fTargetWidth = m_wndSize.x / fTargetWidth; int vsz = line->m_subLines.size(); VERIFY(vsz); - if ((vsz > 1) && (!bNewLines)) { // only colored line, pizdets + if ((vsz > 1) && (!bNewLines)) { // only colored line, pizdets for (int i = 0; i < vsz; i++) { const char* pszText = line->m_subLines[i].m_text.c_str(); @@ -217,7 +217,7 @@ void CUILines::ParseText(bool force) string4096 buff; float curr_width = 0.0f; bool bnew_line = false; - float __eps = get_str_width(m_pFont, 'o'); // hack -( + float __eps = get_str_width(m_pFont, 'o'); // hack -( for (u32 sbl_idx = 0; sbl_idx < sbl_cnt; ++sbl_idx) { bool b_last_subl = (sbl_idx == sbl_cnt - 1); diff --git a/src/xrGame/ui/UILines.h b/src/xrGame/ui/UILines.h index acc74186728..43612ed7ac0 100644 --- a/src/xrGame/ui/UILines.h +++ b/src/xrGame/ui/UILines.h @@ -56,7 +56,7 @@ class CUILines : public CDeviceResetNotifier typedef xr_vector LinesVector; typedef LinesVector::iterator LinesVector_it; - LinesVector m_lines; // parsed text + LinesVector m_lines; // parsed text shared_str m_text; diff --git a/src/xrGame/ui/UIListBox.cpp b/src/xrGame/ui/UIListBox.cpp index 2e0fb87caee..c3c91785ac6 100644 --- a/src/xrGame/ui/UIListBox.cpp +++ b/src/xrGame/ui/UIListBox.cpp @@ -305,7 +305,7 @@ float CUIListBox::GetLongestLength() { CUIListBoxItem* item = smart_cast(*it); if (item) { - float tmp_len = item->GetFont()->SizeOf_(item->GetText()); // all ok + float tmp_len = item->GetFont()->SizeOf_(item->GetText()); // all ok UI().ClientToScreenScaledWidth(tmp_len); if (tmp_len > len) len = tmp_len; diff --git a/src/xrGame/ui/UIListBoxItemMsgChain.h b/src/xrGame/ui/UIListBoxItemMsgChain.h index 20f350c4871..3bddb4d539e 100644 --- a/src/xrGame/ui/UIListBoxItemMsgChain.h +++ b/src/xrGame/ui/UIListBoxItemMsgChain.h @@ -14,4 +14,4 @@ class CUIListBoxItemMsgChain : public CUIListBoxItem virtual bool OnMouseDown(int mouse_btn); }; -#endif //#ifndef UILISTBOXITEMMSGCHAIN_H_INCLUDED \ No newline at end of file +#endif //#ifndef UILISTBOXITEMMSGCHAIN_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ui/UIListWnd_script.cpp b/src/xrGame/ui/UIListWnd_script.cpp index f47e74d8ffc..b6b970f702b 100644 --- a/src/xrGame/ui/UIListWnd_script.cpp +++ b/src/xrGame/ui/UIListWnd_script.cpp @@ -72,7 +72,7 @@ void CUIListWnd::script_register(lua_State* L) .def_readwrite("without_ff", &SServerFilters::without_ff) #ifdef BATTLEYE .def_readwrite("with_battleye", &SServerFilters::with_battleye) -#endif // BATTLEYE +#endif // BATTLEYE .def_readwrite("listen_servers", &SServerFilters::listen_servers), class_("CServerList") diff --git a/src/xrGame/ui/UILogsWnd.cpp b/src/xrGame/ui/UILogsWnd.cpp index ffc290170b2..53182ad836e 100644 --- a/src/xrGame/ui/UILogsWnd.cpp +++ b/src/xrGame/ui/UILogsWnd.cpp @@ -278,7 +278,7 @@ void CUILogsWnd::PrevPeriod(CUIWindow* w, void* d) void CUILogsWnd::NextPeriod(CUIWindow* w, void* d) { ALife::_TIME_ID current_period = m_selected_period; - m_selected_period = GetShiftPeriod(m_selected_period, 1); // +1 + m_selected_period = GetShiftPeriod(m_selected_period, 1); // +1 ALife::_TIME_ID game_time = GetShiftPeriod(Level().GetGameTime(), 0); if (m_selected_period > game_time) { m_selected_period = game_time; @@ -377,5 +377,5 @@ void CUILogsWnd::on_scroll_keys(int dik) m_list->ScrollBar()->TryScrollInc(); break; } - } // switch + } // switch } \ No newline at end of file diff --git a/src/xrGame/ui/UILogsWnd.h b/src/xrGame/ui/UILogsWnd.h index 39d65897dd4..c3b58f166f2 100644 --- a/src/xrGame/ui/UILogsWnd.h +++ b/src/xrGame/ui/UILogsWnd.h @@ -100,6 +100,6 @@ class CUILogsWnd : public CUIWindow, public CUIWndCallback void clear_all_factions (); bool __stdcall SortingLessFunction ( CUIWindow* left, CUIWindow* right ); */ -}; // class CUILogsWnd +}; // class CUILogsWnd -#endif // UI_PDA_LOGS_WND_H_INCLUDED +#endif // UI_PDA_LOGS_WND_H_INCLUDED diff --git a/src/xrGame/ui/UIMMShniaga.cpp b/src/xrGame/ui/UIMMShniaga.cpp index 314d440d4c6..24f36ad3d12 100644 --- a/src/xrGame/ui/UIMMShniaga.cpp +++ b/src/xrGame/ui/UIMMShniaga.cpp @@ -162,7 +162,7 @@ void CUIMMShniaga::SetPage(enum_page_id page_id, LPCSTR xml_file, LPCSTR xml_pat case epi_new_network_game: { lst = &m_buttons_new_network; } break; - }; // switch (page_id) + }; // switch (page_id) delete_data(*lst); CUIXml tmp_xml; @@ -183,7 +183,7 @@ void CUIMMShniaga::ShowPage(enum_page_id page_id) case epi_new_network_game: { ShowNetworkGame(); } break; - }; // switch (page_id) + }; // switch (page_id) } void CUIMMShniaga::ShowMain() diff --git a/src/xrGame/ui/UIMMShniaga.h b/src/xrGame/ui/UIMMShniaga.h index 265f4349e53..f7e56bb6fdd 100644 --- a/src/xrGame/ui/UIMMShniaga.h +++ b/src/xrGame/ui/UIMMShniaga.h @@ -29,7 +29,7 @@ class CUIMMShniaga : public CUIWindow, public CDeviceResetNotifier epi_new_game, epi_new_network_game, epi_none - }; // enum enum_page_id + }; // enum enum_page_id void SetPage(enum_page_id page_id, LPCSTR xml_file, LPCSTR xml_path); void ShowPage(enum_page_id page_id); diff --git a/src/xrGame/ui/UIMainIngameWnd.cpp b/src/xrGame/ui/UIMainIngameWnd.cpp index b86c70a1b18..96f4d8c97d1 100644 --- a/src/xrGame/ui/UIMainIngameWnd.cpp +++ b/src/xrGame/ui/UIMainIngameWnd.cpp @@ -111,7 +111,7 @@ void CUIMainIngameWnd::Init() xml_init.InitStatic (uiXml, "static_wpn_icon", 0, &UIWeaponIcon); UIWeaponIcon.SetShader (GetEquipmentIconsShader()); UIWeaponIcon_rect = UIWeaponIcon.GetWndRect(); -*/ //--------------------------------------------------------- +*/ //--------------------------------------------------------- UIPickUpItemIcon = UIHelper::CreateStatic(uiXml, "pick_up_item", this); UIPickUpItemIcon->SetShader(GetEquipmentIconsShader()); @@ -360,7 +360,7 @@ void CUIMainIngameWnd::Update() { SetWarningIconColor(ewiArtefact, 0xffff0000); } - else if (pActor->inventory().ItemFromSlot(ARTEFACT_SLOT)) // own artefact + else if (pActor->inventory().ItemFromSlot(ARTEFACT_SLOT)) // own artefact { SetWarningIconColor(ewiArtefact, 0xff00ff00); } @@ -369,7 +369,7 @@ void CUIMainIngameWnd::Update() SetWarningIconColor(ewiArtefact, 0x00ffffff); } } -} // update +} // update void CUIMainIngameWnd::RenderQuickInfos() { diff --git a/src/xrGame/ui/UIMainIngameWnd.h b/src/xrGame/ui/UIMainIngameWnd.h index cf405d7b1a5..04e134843a4 100644 --- a/src/xrGame/ui/UIMainIngameWnd.h +++ b/src/xrGame/ui/UIMainIngameWnd.h @@ -57,7 +57,7 @@ class CUIMainIngameWnd : public CUIWindow void DrawMainIndicatorsForInventory(); - CUIHudStatesWnd* get_hud_states() { return m_ui_hud_states; } // temp + CUIHudStatesWnd* get_hud_states() { return m_ui_hud_states; } // temp void OnSectorChanged(int sector); xr_vector m_quick_slots_icons; diff --git a/src/xrGame/ui/UIMap.cpp b/src/xrGame/ui/UIMap.cpp index b0daf6cbedb..03680a8173d 100644 --- a/src/xrGame/ui/UIMap.cpp +++ b/src/xrGame/ui/UIMap.cpp @@ -5,10 +5,10 @@ #include "map_manager.h" #include "map_spot.h" #include "stdafx.h" -#include "xrEngine/xr_input.h" //remove me !!! +#include "xrEngine/xr_input.h" //remove me !!! -const u32 activeLocalMapColor = 0xffffffff; // 0xffc80000; -const u32 inactiveLocalMapColor = 0xffffffff; // 0xff438cd1; +const u32 activeLocalMapColor = 0xffffffff; // 0xffc80000; +const u32 inactiveLocalMapColor = 0xffffffff; // 0xff438cd1; const u32 ourLevelMapColor = 0xffffffff; CUICustomMap::CUICustomMap() @@ -108,7 +108,7 @@ Fvector2 CUICustomMap::ConvertLocalToReal(const Fvector2& src, Frect const& boun } Fvector2 CUICustomMap::ConvertRealToLocal( - const Fvector2& src, bool for_drawing) // meters->pixels (relatively own left-top pos) + const Fvector2& src, bool for_drawing) // meters->pixels (relatively own left-top pos) { Fvector2 res; if (!Heading()) { @@ -132,7 +132,7 @@ Fvector2 CUICustomMap::ConvertRealToLocal( } Fvector2 CUICustomMap::ConvertRealToLocalNoTransform( - const Fvector2& src, Frect const& bound_rect) // meters->pixels (relatively own left-top pos) + const Fvector2& src, Frect const& bound_rect) // meters->pixels (relatively own left-top pos) { Fvector2 res; res.x = (src.x - bound_rect.lt.x) * GetCurrentZoom().x; @@ -144,7 +144,7 @@ Fvector2 CUICustomMap::ConvertRealToLocalNoTransform( // position and heading for drawing pointer to src pos bool CUICustomMap::GetPointerTo(const Fvector2& src, float item_radius, Fvector2& pos, float& heading) { - Frect clip_rect_abs = WorkingArea(); // absolute rect coords + Frect clip_rect_abs = WorkingArea(); // absolute rect coords Frect map_rect_abs; GetAbsoluteRect(map_rect_abs); @@ -309,7 +309,7 @@ void CUIGlobalMap::ClipByVisRect() } Fvector2 CUIGlobalMap::ConvertRealToLocal( - const Fvector2& src, bool for_drawing) // pixels->pixels (relatively own left-top pos) + const Fvector2& src, bool for_drawing) // pixels->pixels (relatively own left-top pos) { Fvector2 res; res.x = (src.x - BoundRect().lt.x) * GetCurrentZoom().x; @@ -611,7 +611,7 @@ void CUIMiniMap::Draw() GlobalEnv.UIRender->FlushPrimitive(); //------------ - CUIWindow::Draw(); // draw childs + CUIWindow::Draw(); // draw childs } bool CUIMiniMap::GetPointerTo(const Fvector2& src, float item_radius, Fvector2& pos, float& heading) @@ -651,5 +651,5 @@ bool CUIMiniMap::IsRectVisible(Frect r) r.getcenter(rect_center); float spot_radius = r.width() / 2.0f; return clip_center.distance_to(rect_center) + spot_radius < - vis_radius; // assume that all minimap spots are circular + vis_radius; // assume that all minimap spots are circular } diff --git a/src/xrGame/ui/UIMap.h b/src/xrGame/ui/UIMap.h index e343dfd394d..e4726454b4f 100644 --- a/src/xrGame/ui/UIMap.h +++ b/src/xrGame/ui/UIMap.h @@ -10,7 +10,7 @@ class CUICustomMap : public CUIStatic, public CUIWndCallback protected: shared_str m_name; - Frect m_BoundRect_; // real map size (meters) + Frect m_BoundRect_; // real map size (meters) Flags16 m_flags; enum EFlags { @@ -32,13 +32,13 @@ class CUICustomMap : public CUIStatic, public CUIWndCallback void Initialize(shared_str name, LPCSTR sh_name); virtual Fvector2 ConvertRealToLocal( - const Fvector2& src, bool for_drawing); // meters->pixels (relatively own left-top pos) + const Fvector2& src, bool for_drawing); // meters->pixels (relatively own left-top pos) Fvector2 ConvertLocalToReal(const Fvector2& src, Frect const& bound_rect); Fvector2 ConvertRealToLocalNoTransform( - const Fvector2& src, Frect const& bound_rect); // meters->pixels (relatively own left-top pos) + const Fvector2& src, Frect const& bound_rect); // meters->pixels (relatively own left-top pos) virtual bool GetPointerTo(const Fvector2& src, float item_radius, Fvector2& pos, - float& heading); // position and heading for drawing pointer to src pos + float& heading); // position and heading for drawing pointer to src pos void FitToWidth(float width); void FitToHeight(float height); @@ -76,7 +76,7 @@ class CUIGlobalMap : public CUICustomMap public: virtual Fvector2 ConvertRealToLocal( - const Fvector2& src, bool for_drawing); // pixels->pixels (relatively own left-top pos) + const Fvector2& src, bool for_drawing); // pixels->pixels (relatively own left-top pos) CUIGlobalMap(CUIMapWnd* pMapWnd); virtual ~CUIGlobalMap(); @@ -105,7 +105,7 @@ class CUILevelMap : public CUICustomMap typedef CUICustomMap inherited; CUIMapWnd* m_mapWnd; - Frect m_GlobalRect; // virtual map size (meters) + Frect m_GlobalRect; // virtual map size (meters) CUILevelMap(const CUILevelMap& obj) {} CUILevelMap& operator=(const CUILevelMap& obj) {} public: @@ -136,7 +136,7 @@ class CUIMiniMap : public CUICustomMap virtual ~CUIMiniMap(); virtual void Draw(); virtual bool GetPointerTo(const Fvector2& src, float item_radius, Fvector2& pos, - float& heading); // position and heading for drawing pointer to src pos + float& heading); // position and heading for drawing pointer to src pos virtual bool NeedShowPointer(Frect r); virtual bool IsRectVisible(Frect r); diff --git a/src/xrGame/ui/UIMapLegend.h b/src/xrGame/ui/UIMapLegend.h index 4f218707e63..4d9f08fbcc2 100644 --- a/src/xrGame/ui/UIMapLegend.h +++ b/src/xrGame/ui/UIMapLegend.h @@ -33,14 +33,14 @@ class UIMapLegend : public CUIWindow virtual void Show(bool status); virtual void SendMessage(CUIWindow* pWnd, s16 msg, void* pData); -private: // m_ +private: // m_ CUIFrameWindow* m_background; CUIScrollView* m_list; CUIStatic* m_caption; CUI3tButton* m_btn_close; -}; // class UIMapLegend +}; // class UIMapLegend // ------------------------------------------------------------------------------------------------- @@ -56,10 +56,10 @@ class UIMapLegendItem : public CUIWindow void init_from_xml(CUIXml& xml, int index); // virtual void Update (); -private: // m_ +private: // m_ CUIStatic* m_image[4]; CUIStatic* m_text; -}; // class UIMapLegendItem +}; // class UIMapLegendItem -#endif // UI_MAP_LEGEND_WND_H_INCLUDED +#endif // UI_MAP_LEGEND_WND_H_INCLUDED diff --git a/src/xrGame/ui/UIMapWnd.cpp b/src/xrGame/ui/UIMapWnd.cpp index 90cc7287ac5..80f4416ffe2 100644 --- a/src/xrGame/ui/UIMapWnd.cpp +++ b/src/xrGame/ui/UIMapWnd.cpp @@ -17,9 +17,9 @@ #include "map_spot.h" #include "stdafx.h" #include "uicursor.h" -#include "xrEngine/xr_input.h" //remove me !!! +#include "xrEngine/xr_input.h" //remove me !!! -CUIMapWnd* g_map_wnd = NULL; // quick temporary solution -( +CUIMapWnd* g_map_wnd = NULL; // quick temporary solution -( CUIMapWnd* GetMapWnd() { return g_map_wnd; @@ -94,14 +94,14 @@ void CUIMapWnd::Init(LPCSTR xml_name, LPCSTR start_from) sx = uiXml.ReadAttribFlt(pth, 0, "sx", 5.0f); sy = uiXml.ReadAttribFlt(pth, 0, "sy", 5.0f); - CUIWindow* rect_parent = m_UIMainFrame; // m_UILevelFrame; + CUIWindow* rect_parent = m_UIMainFrame; // m_UILevelFrame; Frect r = rect_parent->GetWndRect(); m_UIMainScrollH = new CUIFixedScrollBar(); m_UIMainScrollH->SetAutoDelete(true); m_UIMainScrollH->InitScrollBar(Fvector2().set(r.left + dx, r.bottom - sy), true); m_UIMainScrollH->SetStepSize(_max(1, (int)(m_UILevelFrame->GetWidth() * 0.1f))); - m_UIMainScrollH->SetPageSize((int)m_UILevelFrame->GetWidth()); // iFloor + m_UIMainScrollH->SetPageSize((int)m_UILevelFrame->GetWidth()); // iFloor AttachChild(m_UIMainScrollH); Register(m_UIMainScrollH); AddCallback(m_UIMainScrollH, SCROLLBAR_HSCROLL, CUIWndCallback::void_function(this, &CUIMapWnd::OnScrollH)); @@ -216,7 +216,7 @@ void CUIMapWnd::Show(bool status) } if (m_view_actor) { - inherited::Update(); // only maps, not action planner + inherited::Update(); // only maps, not action planner ViewActor(); m_view_actor = false; } @@ -325,7 +325,7 @@ void CUIMapWnd::MapLocationRelcase(CMapLocation* ml) CUIWindow* owner = m_map_location_hint->GetOwner(); if (owner) { CMapSpot* ms = smart_cast(owner); - if (ms && ms->MapLocation() == ml) // CUITaskItem also can be a HintOwner + if (ms && ms->MapLocation() == ml) // CUITaskItem also can be a HintOwner m_map_location_hint->SetOwner(NULL); } } @@ -425,7 +425,7 @@ bool CUIMapWnd::OnMouseAction(float x, float y, EUIMessages mouse_action) return true; break; - } // switch + } // switch }; return false; @@ -584,7 +584,7 @@ void CUIMapWnd::ViewActor() SetTargetMap(lm, m_prev_actor_pos, true); } -void CUIMapWnd::ShowHintStr(CUIWindow* parent, LPCSTR text) // map name +void CUIMapWnd::ShowHintStr(CUIWindow* parent, LPCSTR text) // map name { if (m_map_location_hint->GetOwner()) return; diff --git a/src/xrGame/ui/UIMapWnd.h b/src/xrGame/ui/UIMapWnd.h index a22fb5f57db..484f8f3c80a 100644 --- a/src/xrGame/ui/UIMapWnd.h +++ b/src/xrGame/ui/UIMapWnd.h @@ -49,7 +49,7 @@ class CUIMapWnd : public CUIWindow, public CUIWndCallback #ifdef DEBUG // CUIStatic* m_dbg_text_hint; // CUIStatic* m_dbg_info; -#endif // DEBUG +#endif // DEBUG enum EBtnPos { diff --git a/src/xrGame/ui/UIMapWndActions.cpp b/src/xrGame/ui/UIMapWndActions.cpp index 425f0a3eb58..061a670a8ed 100644 --- a/src/xrGame/ui/UIMapWndActions.cpp +++ b/src/xrGame/ui/UIMapWndActions.cpp @@ -5,9 +5,9 @@ #include "stdafx.h" typedef CActionBase WORLD_OPERATOR; -static const float map_resize_speed = 350.f; // y.e./sec -static const float map_zoom_time = 0.5f; // sec -static const float min_move_time = 0.25f; // sec +static const float map_resize_speed = 350.f; // y.e./sec +static const float map_zoom_time = 0.5f; // sec +static const float min_move_time = 0.25f; // sec // actions class CSomeMapAction : public WORLD_OPERATOR { @@ -201,7 +201,7 @@ void CMapActionZoomControl::init_internal() void CMapActionZoomControl::update_target_state() { float cur_map_zoom = m_object->GetZoom(); - if (!fsimilar(cur_map_zoom, m_targetZoom)) { // re-init + if (!fsimilar(cur_map_zoom, m_targetZoom)) { // re-init m_targetZoom = cur_map_zoom; init_internal(); } diff --git a/src/xrGame/ui/UIMpItemsStoreWnd.cpp b/src/xrGame/ui/UIMpItemsStoreWnd.cpp index 343b54740c3..5d5b6361423 100644 --- a/src/xrGame/ui/UIMpItemsStoreWnd.cpp +++ b/src/xrGame/ui/UIMpItemsStoreWnd.cpp @@ -50,7 +50,7 @@ void CStoreHierarchy::LoadLevel(CUIXml& xml, int index, item* _item, int depth_l xr_strcat(buff, "-"); #ifndef MASTER_GOLD Msg("%s%s", buff, _item->m_name.c_str()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD int cnt = xml.GetNodesNum("level", index, "level"); for (int i = 0; i < cnt; ++i) @@ -102,7 +102,7 @@ void CStoreHierarchy::InitItemsInGroup(const shared_str& sect, item* _itm) Msg("group[%s]", _itm->m_name.c_str()); Msg("items[%s]", v.c_str()); Msg(""); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } else for (u32 i = 0; i < cnt; ++i) @@ -148,7 +148,7 @@ CStoreHierarchy::item* CStoreHierarchy::FindItem(const shared_str& name_sect, CS { if (!recurse_from) recurse_from = m_root; - if (recurse_from->HasSubLevels()) { // recurse + if (recurse_from->HasSubLevels()) { // recurse VERIFY(recurse_from->m_items_in_group.size() == 0); xr_vector::const_iterator it = recurse_from->m_childs.begin(); xr_vector::const_iterator it_e = recurse_from->m_childs.end(); diff --git a/src/xrGame/ui/UIMpItemsStoreWnd.h b/src/xrGame/ui/UIMpItemsStoreWnd.h index 840856b1ad5..a9dc2b0f825 100644 --- a/src/xrGame/ui/UIMpItemsStoreWnd.h +++ b/src/xrGame/ui/UIMpItemsStoreWnd.h @@ -15,7 +15,7 @@ class CStoreHierarchy virtual void destroy(); shared_str m_name; - shared_str m_btn_xml_name; // debug + shared_str m_btn_xml_name; // debug item* m_parent; xr_vector m_childs; xr_vector m_items_in_group; diff --git a/src/xrGame/ui/UIMpTradeWnd.cpp b/src/xrGame/ui/UIMpTradeWnd.cpp index 9892575a348..23f4443410c 100644 --- a/src/xrGame/ui/UIMpTradeWnd.cpp +++ b/src/xrGame/ui/UIMpTradeWnd.cpp @@ -122,7 +122,7 @@ void CUIMpTradeWnd::OnBtnSave3PresetClicked(CUIWindow* w, void* d) void CUIMpTradeWnd::OnBtnResetClicked(CUIWindow* w, void* d) { CheckDragItemToDestroy(); - ApplyPreset(_preset_idx_origin); // origin + ApplyPreset(_preset_idx_origin); // origin } void CUIMpTradeWnd::OnRootTabChanged(CUIWindow* w, void* d) @@ -156,15 +156,15 @@ void CUIMpTradeWnd::UpdateShop() #ifdef DEBUG Msg("current level=[%s]", m_store_hierarchy->CurrentLevel().m_name.c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG SetCurrentItem(NULL); if (m_store_hierarchy->CurrentIsRoot()) return; - if (m_store_hierarchy->CurrentLevel().HasSubLevels()) { // show sub-levels + if (m_store_hierarchy->CurrentLevel().HasSubLevels()) { // show sub-levels FillUpSubLevelButtons(); } else - { // show items + { // show items FillUpSubLevelItems(); } } diff --git a/src/xrGame/ui/UIMpTradeWnd_init.cpp b/src/xrGame/ui/UIMpTradeWnd_init.cpp index 60876d17b5f..81398f5e8c5 100644 --- a/src/xrGame/ui/UIMpTradeWnd_init.cpp +++ b/src/xrGame/ui/UIMpTradeWnd_init.cpp @@ -98,13 +98,13 @@ void CUIMpTradeWnd::Init(const shared_str& sectionName, const shared_str& sectio m_btn_reset = UIHelper::Create3tButton(xml_doc, "btn_reset", this); m_btn_sell = UIHelper::Create3tButton(xml_doc, "btn_sell", this); - m_btn_pistol_ammo = NULL; // UIHelper::Create3tButton( xml_doc, "btn_pistol_ammo", this ); + m_btn_pistol_ammo = NULL; // UIHelper::Create3tButton( xml_doc, "btn_pistol_ammo", this ); m_btn_pistol_silencer = UIHelper::Create3tButton(xml_doc, "btn_pistol_silencer", this); - m_btn_rifle_ammo = NULL; // UIHelper::Create3tButton( xml_doc, "btn_rifle_ammo", this ); + m_btn_rifle_ammo = NULL; // UIHelper::Create3tButton( xml_doc, "btn_rifle_ammo", this ); m_btn_rifle_silencer = UIHelper::Create3tButton(xml_doc, "btn_rifle_silencer", this); m_btn_rifle_scope = UIHelper::Create3tButton(xml_doc, "btn_rifle_scope", this); m_btn_rifle_glauncher = UIHelper::Create3tButton(xml_doc, "btn_rifle_glauncher", this); - m_btn_rifle_ammo2 = NULL; // UIHelper::Create3tButton( xml_doc, "btn_rifle_ammo2", this ); + m_btn_rifle_ammo2 = NULL; // UIHelper::Create3tButton( xml_doc, "btn_rifle_ammo2", this ); Register(m_btn_ok); Register(m_btn_cancel); @@ -158,11 +158,13 @@ void CUIMpTradeWnd::Init(const shared_str& sectionName, const shared_str& sectio AddCallback(m_btn_reset, BUTTON_CLICKED, CUIWndCallback::void_function(this, &CUIMpTradeWnd::OnBtnResetClicked)); AddCallback(m_btn_sell, BUTTON_CLICKED, CUIWndCallback::void_function(this, &CUIMpTradeWnd::OnBtnSellClicked)); - // AddCallback ("btn_pistol_ammo", BUTTON_CLICKED, CUIWndCallback::void_function (this, + // AddCallback ("btn_pistol_ammo", BUTTON_CLICKED, CUIWndCallback::void_function + //(this, //&CUIMpTradeWnd::OnBtnPistolAmmoClicked )); AddCallback(m_btn_pistol_silencer, BUTTON_CLICKED, CUIWndCallback::void_function(this, &CUIMpTradeWnd::OnBtnPistolSilencerClicked)); - // AddCallback ("btn_rifle_ammo", BUTTON_CLICKED, CUIWndCallback::void_function (this, + // AddCallback ("btn_rifle_ammo", BUTTON_CLICKED, CUIWndCallback::void_function + //(this, //&CUIMpTradeWnd::OnBtnRifleAmmoClicked )); AddCallback(m_btn_rifle_silencer, BUTTON_CLICKED, CUIWndCallback::void_function(this, &CUIMpTradeWnd::OnBtnRifleSilencerClicked)); @@ -170,7 +172,8 @@ void CUIMpTradeWnd::Init(const shared_str& sectionName, const shared_str& sectio m_btn_rifle_scope, BUTTON_CLICKED, CUIWndCallback::void_function(this, &CUIMpTradeWnd::OnBtnRifleScopeClicked)); AddCallback(m_btn_rifle_glauncher, BUTTON_CLICKED, CUIWndCallback::void_function(this, &CUIMpTradeWnd::OnBtnRifleGLClicked)); - // AddCallback ("btn_rifle_ammo2", BUTTON_CLICKED, CUIWndCallback::void_function (this, + // AddCallback ("btn_rifle_ammo2", BUTTON_CLICKED, CUIWndCallback::void_function + //(this, //&CUIMpTradeWnd::OnBtnRifleAmmo2Clicked )); m_static_player_money = UIHelper::CreateTextWnd(xml_doc, "static_player_money", this); @@ -207,7 +210,7 @@ void CUIMpTradeWnd::Init(const shared_str& sectionName, const shared_str& sectio m_item_mngr->Load(sectionPrice); #ifndef MASTER_GOLD m_item_mngr->Dump(); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD SetRank(0); UpdateShop(); SetCurrentItem(NULL); diff --git a/src/xrGame/ui/UIMpTradeWnd_items.cpp b/src/xrGame/ui/UIMpTradeWnd_items.cpp index 53a878ef391..9eacf21e3d5 100644 --- a/src/xrGame/ui/UIMpTradeWnd_items.cpp +++ b/src/xrGame/ui/UIMpTradeWnd_items.cpp @@ -470,16 +470,16 @@ const preset_items& CUIMpTradeWnd::GetPreset(ETradePreset idx) }; u32 _list_prio[] = { - 6, // e_pistol - 4, // e_pistol_ammo - 7, // e_rifle - 5, // e_rifle_ammo - 10, // e_outfit - 9, // e_medkit - 8, // e_granade - 3, // e_others - 2, // e_player_bag - 0, // e_shop + 6, // e_pistol + 4, // e_pistol_ammo + 7, // e_rifle + 5, // e_rifle_ammo + 10, // e_outfit + 9, // e_medkit + 8, // e_granade + 3, // e_others + 2, // e_player_bag + 0, // e_shop 0, 0, 0, 0, }; @@ -790,7 +790,7 @@ void CUIMpTradeWnd::DumpAllItems(LPCSTR s) Msg("[%s] state[%s]", iinfo->m_name_sect.c_str(), iinfo->GetStateAsText()); } Msg("------"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } void CUIMpTradeWnd::DumpPreset(ETradePreset idx) @@ -811,7 +811,7 @@ void CUIMpTradeWnd::DumpPreset(ETradePreset idx) if (_one.addon_names[1].c_str()) Msg(" [%s]", _one.addon_names[1].c_str()); if (_one.addon_names[2].c_str()) Msg(" [%s]", _one.addon_names[2].c_str()); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } #include diff --git a/src/xrGame/ui/UIMpTradeWnd_misc.cpp b/src/xrGame/ui/UIMpTradeWnd_misc.cpp index 9a0fb098c4d..d83a998db36 100644 --- a/src/xrGame/ui/UIMpTradeWnd_misc.cpp +++ b/src/xrGame/ui/UIMpTradeWnd_misc.cpp @@ -113,7 +113,7 @@ void CUIMpTradeWnd::SetInfoString(LPCSTR str) m_static_information->ResetColorAnimation(); #ifndef MASTER_GOLD Msg("Buy menu message:%s", str); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } void CUIMpTradeWnd::SendMessage(CUIWindow* pWnd, s16 msg, void* pData) @@ -147,7 +147,7 @@ void CUIMpTradeWnd::SetCurrentItem(CUICellItem* itm) string64 tex_name; string64 team; - if (m_store_hierarchy->FindItem(current_sect_name)) { // our team + if (m_store_hierarchy->FindItem(current_sect_name)) { // our team xr_strcpy(team, _team_names[m_store_hierarchy->TeamIdx()]); } else @@ -458,7 +458,7 @@ void CUIMpTradeWnd::ResetItems() { #ifdef DEBUG Msg("--ResetItems"); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG ResetToOrigin(); CleanUserItems(); m_store_hierarchy->Reset(); diff --git a/src/xrGame/ui/UIMpTradeWnd_trade.cpp b/src/xrGame/ui/UIMpTradeWnd_trade.cpp index c0cd613ac66..6f1b8b7d769 100644 --- a/src/xrGame/ui/UIMpTradeWnd_trade.cpp +++ b/src/xrGame/ui/UIMpTradeWnd_trade.cpp @@ -30,7 +30,7 @@ bool CUIMpTradeWnd::TryToSellItem(SBuyItemInfo* sell_itm, bool do_destroy, SBuyI else _itm = sell_itm->m_cell_item; - SBuyItemInfo* iinfo = FindItem(_itm); // just detached + SBuyItemInfo* iinfo = FindItem(_itm); // just detached itm_res = iinfo; u32 cnt_in_shop = GetItemCount(sell_itm->m_name_sect, SBuyItemInfo::e_shop); @@ -43,7 +43,7 @@ bool CUIMpTradeWnd::TryToSellItem(SBuyItemInfo* sell_itm, bool do_destroy, SBuyI if (do_destroy) DestroyItem(iinfo); } else - { // return to shop + { // return to shop if (m_store_hierarchy->CurrentLevel().HasItem(iinfo->m_name_sect)) { CUIDragDropListEx* _new_owner = m_list[e_shop]; @@ -87,14 +87,14 @@ bool CUIMpTradeWnd::BuyItemAction(SBuyItemInfo* itm) bool b_res = TryToBuyItem(itm, bf_normal, NULL); if (!b_res) { - to_sell->SetState(SBuyItemInfo::e_undefined); // hack + to_sell->SetState(SBuyItemInfo::e_undefined); // hack bool b_res2 = TryToBuyItem(to_sell, bf_check_money | bf_ignore_team | bf_own_itm, NULL); R_ASSERT(b_res2); - to_sell->SetState(SBuyItemInfo::e_undefined); // hack - to_sell->SetState(_stored_state); // hack + to_sell->SetState(SBuyItemInfo::e_undefined); // hack + to_sell->SetState(_stored_state); // hack } else if (to_sell->GetState() == SBuyItemInfo::e_sold || - to_sell->GetState() == SBuyItemInfo::e_undefined) // maybe in shop now + to_sell->GetState() == SBuyItemInfo::e_undefined) // maybe in shop now DestroyItem(to_sell); return b_res; @@ -142,12 +142,12 @@ bool CUIMpTradeWnd::TryToBuyItem(SBuyItemInfo* buy_itm, u32 buy_flags, SBuyItemI CUICellItem* cell_itm = NULL; bool b_alone = true; - if (iinfo->m_cell_item->OwnerList()) // just from shop + if (iinfo->m_cell_item->OwnerList()) // just from shop { cell_itm = iinfo->m_cell_item->OwnerList()->RemoveItem(iinfo->m_cell_item, false); b_alone = false; } - else // new created + else // new created { cell_itm = iinfo->m_cell_item; b_alone = true; diff --git a/src/xrGame/ui/UIMpTradeWnd_wpn.cpp b/src/xrGame/ui/UIMpTradeWnd_wpn.cpp index a731c6c5031..667725b4b57 100644 --- a/src/xrGame/ui/UIMpTradeWnd_wpn.cpp +++ b/src/xrGame/ui/UIMpTradeWnd_wpn.cpp @@ -37,11 +37,11 @@ void CUIMpTradeWnd::OnBtnPistolSilencerClicked(CUIWindow* w, void* d) if (!ci) return; SBuyItemInfo* pitem = FindItem(ci); - if (IsAddonAttached(pitem, at_silencer)) { // detach + if (IsAddonAttached(pitem, at_silencer)) { // detach SellItemAddons(pitem, at_silencer); } else if (CanAttachAddon(pitem, at_silencer)) - { // attach + { // attach shared_str addon_name = GetAddonNameSect(pitem, at_silencer); if (NULL == m_store_hierarchy->FindItem(addon_name)) return; @@ -84,11 +84,11 @@ void CUIMpTradeWnd::OnBtnRifleSilencerClicked(CUIWindow* w, void* d) if (!ci) return; SBuyItemInfo* pitem = FindItem(ci); - if (IsAddonAttached(pitem, at_silencer)) { // detach + if (IsAddonAttached(pitem, at_silencer)) { // detach SellItemAddons(pitem, at_silencer); } else if (CanAttachAddon(pitem, at_silencer)) - { // attach + { // attach shared_str addon_name = GetAddonNameSect(pitem, at_silencer); if (NULL == m_store_hierarchy->FindItem(addon_name)) return; @@ -107,11 +107,11 @@ void CUIMpTradeWnd::OnBtnRifleScopeClicked(CUIWindow* w, void* d) if (!ci) return; SBuyItemInfo* pitem = FindItem(ci); - if (IsAddonAttached(pitem, at_scope)) { // detach + if (IsAddonAttached(pitem, at_scope)) { // detach SellItemAddons(pitem, at_scope); } else if (CanAttachAddon(pitem, at_scope)) - { // attach + { // attach shared_str addon_name = GetAddonNameSect(pitem, at_scope); if (NULL == m_store_hierarchy->FindItem(addon_name)) return; @@ -130,11 +130,11 @@ void CUIMpTradeWnd::OnBtnRifleGLClicked(CUIWindow* w, void* d) if (!ci) return; SBuyItemInfo* pitem = FindItem(ci); - if (IsAddonAttached(pitem, at_glauncher)) { // detach + if (IsAddonAttached(pitem, at_glauncher)) { // detach SellItemAddons(pitem, at_glauncher); } else if (CanAttachAddon(pitem, at_glauncher)) - { // attach + { // attach shared_str addon_name = GetAddonNameSect(pitem, at_glauncher); if (NULL == m_store_hierarchy->FindItem(addon_name)) return; @@ -182,7 +182,7 @@ bool CUIMpTradeWnd::TryToAttachItemAsAddon(SBuyItemInfo* itm, SBuyItemInfo* itm_ return AttachAddon(itm_parent, _addon_type); } } - else // auto-attach + else // auto-attach for (u32 i = 0; i < 2; ++i) { u32 list_idx = (i == 0) ? e_rifle : e_pistol; @@ -209,7 +209,7 @@ void CUIMpTradeWnd::SellItemAddons(SBuyItemInfo* sell_itm, item_addon_type addon { CInventoryItem* item_ = (CInventoryItem*)sell_itm->m_cell_item->m_pData; CWeapon* w = smart_cast(item_); - if (!w) return; // ammo,medkit etc. + if (!w) return; // ammo,medkit etc. if (IsAddonAttached(sell_itm, addon_type)) { SBuyItemInfo* detached_addon = DetachAddon(sell_itm, addon_type); diff --git a/src/xrGame/ui/UIOptionsItem.h b/src/xrGame/ui/UIOptionsItem.h index b406c6688bb..ff01018abfb 100644 --- a/src/xrGame/ui/UIOptionsItem.h +++ b/src/xrGame/ui/UIOptionsItem.h @@ -21,11 +21,11 @@ class CUIOptionsItem static CUIOptionsManager* GetOptionsManager() { return &m_optionsManager; } virtual void OnMessage(LPCSTR message); - virtual void SetCurrentOptValue() = 0 {}; // opt->current - virtual void SaveBackUpOptValue() = 0 {}; // current->backup - virtual void SaveOptValue() = 0; // current->opt - virtual void UndoOptValue() = 0; // backup->current - virtual bool IsChangedOptValue() const = 0 {}; // backup!=current + virtual void SetCurrentOptValue() = 0 {}; // opt->current + virtual void SaveBackUpOptValue() = 0 {}; // current->backup + virtual void SaveOptValue() = 0; // current->opt + virtual void UndoOptValue() = 0; // backup->current + virtual bool IsChangedOptValue() const = 0 {}; // backup!=current void OnChangedOptValue(); protected: diff --git a/src/xrGame/ui/UIOutfitInfo.cpp b/src/xrGame/ui/UIOutfitInfo.cpp index 2ae7a8bb9f3..6e9de254a30 100644 --- a/src/xrGame/ui/UIOutfitInfo.cpp +++ b/src/xrGame/ui/UIOutfitInfo.cpp @@ -138,12 +138,12 @@ void CUIOutfitInfo::UpdateInfo(CCustomOutfit* cur_outfit, CCustomOutfit* slot_ou float max_power = actor->conditions().GetZoneMaxPower(hit_type); float cur = cur_outfit->GetDefHitTypeProtection(hit_type); - cur /= max_power; // = 0..1 + cur /= max_power; // = 0..1 float slot = cur; if (slot_outfit) { slot = slot_outfit->GetDefHitTypeProtection(hit_type); - slot /= max_power; // = 0..1 + slot /= max_power; // = 0..1 } m_items[i]->SetProgressValue(cur, slot); } @@ -193,12 +193,12 @@ void CUIOutfitInfo::UpdateInfo(CHelmet* cur_helmet, CHelmet* slot_helmet) float max_power = actor->conditions().GetZoneMaxPower(hit_type); float cur = cur_helmet->GetDefHitTypeProtection(hit_type); - cur /= max_power; // = 0..1 + cur /= max_power; // = 0..1 float slot = cur; if (slot_helmet) { slot = slot_helmet->GetDefHitTypeProtection(hit_type); - slot /= max_power; // = 0..1 + slot /= max_power; // = 0..1 } m_items[i]->SetProgressValue(cur, slot); } diff --git a/src/xrGame/ui/UIOutfitInfo.h b/src/xrGame/ui/UIOutfitInfo.h index 619affa7d93..d7b41319db2 100644 --- a/src/xrGame/ui/UIOutfitInfo.h +++ b/src/xrGame/ui/UIOutfitInfo.h @@ -19,12 +19,12 @@ class CUIOutfitImmunity : public CUIWindow void SetProgressValue(float cur, float comp); protected: - CUIStatic m_name; // texture + name + CUIStatic m_name; // texture + name CUIDoubleProgressBar m_progress; - CUITextWnd m_value; // 100% + CUITextWnd m_value; // 100% float m_magnitude; -}; // class CUIOutfitImmunity +}; // class CUIOutfitImmunity // ------------------------------------------------------------------------------------- @@ -48,4 +48,4 @@ class CUIOutfitInfo : public CUIWindow CUIStatic* m_Prop_line; CUIOutfitImmunity* m_items[max_count]; -}; // class CUIOutfitInfo +}; // class CUIOutfitInfo diff --git a/src/xrGame/ui/UIPdaKillMessage.cpp b/src/xrGame/ui/UIPdaKillMessage.cpp index bcc8d3fd33f..3242e6b8da3 100644 --- a/src/xrGame/ui/UIPdaKillMessage.cpp +++ b/src/xrGame/ui/UIPdaKillMessage.cpp @@ -42,7 +42,7 @@ float CUIPdaKillMessage::InitText(CUITextWnd& refStatic, float x, ColoredName& i CGameFont* pFont = refStatic.GetFont(); float _eps = pFont->SizeOf_(' '); - UI().ClientToScreenScaledWidth(_eps); // add one letter + UI().ClientToScreenScaledWidth(_eps); // add one letter float height = pFont->CurrentHeight_(); float y = (GetHeight() - height) / 2; diff --git a/src/xrGame/ui/UIPdaWnd.cpp b/src/xrGame/ui/UIPdaWnd.cpp index b4b7246249e..74765c22f6e 100644 --- a/src/xrGame/ui/UIPdaWnd.cpp +++ b/src/xrGame/ui/UIPdaWnd.cpp @@ -236,7 +236,7 @@ void CUIPdaWnd::Draw() inherited::Draw(); //. DrawUpdatedSections(); DrawHint(); - UINoice->Draw(); // over all + UINoice->Draw(); // over all } void CUIPdaWnd::DrawHint() diff --git a/src/xrGame/ui/UIPdaWnd.h b/src/xrGame/ui/UIPdaWnd.h index 7ae14ae5f65..74f39a683a6 100644 --- a/src/xrGame/ui/UIPdaWnd.h +++ b/src/xrGame/ui/UIPdaWnd.h @@ -64,7 +64,7 @@ class CUIPdaWnd : public CUIDialogWnd { CUIDialogWnd::OnMouseAction(x, y, mouse_action); return true; - } // always true because StopAnyMove() == false + } // always true because StopAnyMove() == false virtual bool OnKeyboardAction(int dik, EUIMessages keyboard_action); UIHint* get_hint_wnd() const { return m_hint_wnd; } diff --git a/src/xrGame/ui/UIProgressBar.cpp b/src/xrGame/ui/UIProgressBar.cpp index 09e709434d4..f5741638c36 100644 --- a/src/xrGame/ui/UIProgressBar.cpp +++ b/src/xrGame/ui/UIProgressBar.cpp @@ -74,7 +74,7 @@ void CUIProgressBar::Update() { inherited::Update(); if (!fsimilar(m_ProgressPos.x, m_ProgressPos.y)) { - if (fsimilar(m_MaxPos, m_MinPos)) m_MaxPos += EPS; // hack ^( + if (fsimilar(m_MaxPos, m_MinPos)) m_MaxPos += EPS; // hack ^( float _diff = m_ProgressPos.y - m_ProgressPos.x; float _length = (m_MaxPos - m_MinPos); diff --git a/src/xrGame/ui/UIProgressBar.h b/src/xrGame/ui/UIProgressBar.h index 2a60b807691..39408c35137 100644 --- a/src/xrGame/ui/UIProgressBar.h +++ b/src/xrGame/ui/UIProgressBar.h @@ -19,7 +19,7 @@ class CUIProgressBar : public CUIWindow om_count } m_orient_mode; - Fvector2 m_ProgressPos; // x-current y-dest + Fvector2 m_ProgressPos; // x-current y-dest float m_MinPos; float m_MaxPos; @@ -35,7 +35,7 @@ class CUIProgressBar : public CUIWindow Fcolor m_minColor; Fcolor m_middleColor; Fcolor m_maxColor; - float m_inertion; // + float m_inertion; // public: CUIStatic m_UIProgressItem; CUIStatic m_UIBackgroundItem; diff --git a/src/xrGame/ui/UIPropertiesBox.cpp b/src/xrGame/ui/UIPropertiesBox.cpp index 4e9df86aac8..d5007e651bc 100644 --- a/src/xrGame/ui/UIPropertiesBox.cpp +++ b/src/xrGame/ui/UIPropertiesBox.cpp @@ -50,10 +50,10 @@ void CUIPropertiesBox::SendMessage(CUIWindow* pWnd, s16 msg, void* pData) if (pWnd == &m_UIListWnd) { if (msg == LIST_ITEM_CLICKED) { GetMessageTarget()->SendMessage(this, PROPERTY_CLICKED); - if (!m_sub_property_box) // i'm the last sub menu + if (!m_sub_property_box) // i'm the last sub menu { Hide(); - if (m_parent_sub_menu) // if i have a parent sub menu, close it + if (m_parent_sub_menu) // if i have a parent sub menu, close it m_parent_sub_menu->Hide(); } } diff --git a/src/xrGame/ui/UIPropertiesBox.h b/src/xrGame/ui/UIPropertiesBox.h index c0faf0ce0cd..9ac0045cbf8 100644 --- a/src/xrGame/ui/UIPropertiesBox.h +++ b/src/xrGame/ui/UIPropertiesBox.h @@ -45,6 +45,6 @@ class CUIPropertiesBox : public CUIFrameWindow, public CUIWndCallback CUIPropertiesBox* m_sub_property_box; void SetParentSubMenu(CUIPropertiesBox* parent_menu) { m_parent_sub_menu = parent_menu; }; Frect m_last_show_rect; - CUIPropertiesBox* m_parent_sub_menu; // warning !!! dubling pointers to the same object !!! - CUIWindow* m_item_sub_menu_initiator; // fills in ShowSubMenu + CUIPropertiesBox* m_parent_sub_menu; // warning !!! dubling pointers to the same object !!! + CUIWindow* m_item_sub_menu_initiator; // fills in ShowSubMenu }; diff --git a/src/xrGame/ui/UIRankingWnd.h b/src/xrGame/ui/UIRankingWnd.h index ae03f13e699..7654fb9bba6 100644 --- a/src/xrGame/ui/UIRankingWnd.h +++ b/src/xrGame/ui/UIRankingWnd.h @@ -81,4 +81,4 @@ class CUIRankingWnd : public CUIWindow, public CUIWndCallback void get_best_monster(); void get_favorite_weapon(); -}; // class CUIRankingWnd +}; // class CUIRankingWnd diff --git a/src/xrGame/ui/UIScrollBar.cpp b/src/xrGame/ui/UIScrollBar.cpp index 5546910ad73..7b875180004 100644 --- a/src/xrGame/ui/UIScrollBar.cpp +++ b/src/xrGame/ui/UIScrollBar.cpp @@ -191,7 +191,7 @@ u32 last_hold_time = 0; bool CUIScrollBar::OnKeyboardHold(int dik) { - if (dik == MOUSE_1 && (last_hold_time + m_hold_delay) < Device.dwTimeContinual) // 100 + if (dik == MOUSE_1 && (last_hold_time + m_hold_delay) < Device.dwTimeContinual) // 100 { if (OnMouseDownEx()) { last_hold_time = Device.dwTimeContinual; diff --git a/src/xrGame/ui/UIScrollBox.cpp b/src/xrGame/ui/UIScrollBox.cpp index 14ef913575f..c7864f27b12 100644 --- a/src/xrGame/ui/UIScrollBox.cpp +++ b/src/xrGame/ui/UIScrollBox.cpp @@ -9,7 +9,7 @@ CUIScrollBox::CUIScrollBox() bool CUIScrollBox::OnMouseAction(float x, float y, EUIMessages mouse_action) { Fvector2 border; - border.x = 512.0f; // :) + border.x = 512.0f; // :) border.y = 512.0f; bool over_x = (x >= -border.x && x < (GetWidth() + border.x)); diff --git a/src/xrGame/ui/UIScrollView.cpp b/src/xrGame/ui/UIScrollView.cpp index 51f82e457b3..da40993e563 100644 --- a/src/xrGame/ui/UIScrollView.cpp +++ b/src/xrGame/ui/UIScrollView.cpp @@ -228,7 +228,7 @@ void CUIScrollView::Draw() Frect item_rect; (*it)->GetAbsoluteRect(item_rect); if (visible_rect.intersected(item_rect)) { - if (m_visible_rgn.x == -1) // first visible + if (m_visible_rgn.x == -1) // first visible m_visible_rgn.x = idx; m_visible_rgn.y = idx; diff --git a/src/xrGame/ui/UIScrollView.h b/src/xrGame/ui/UIScrollView.h index bd190f1c62d..b44ee079d10 100644 --- a/src/xrGame/ui/UIScrollView.h +++ b/src/xrGame/ui/UIScrollView.h @@ -9,7 +9,7 @@ class CUIFixedScrollBar; class CUIScrollView : public CUIWindow, public CUIWndCallback { typedef CUIWindow inherited; - friend class CUIXmlInit; // for init + friend class CUIXmlInit; // for init protected: enum { @@ -45,7 +45,7 @@ class CUIScrollView : public CUIWindow, public CUIWndCallback CUIScrollView(); CUIScrollView(CUIFixedScrollBar* scroll_bar); virtual ~CUIScrollView(); - void InitScrollView(); // need parent to be initialized + void InitScrollView(); // need parent to be initialized virtual void SendMessage(CUIWindow* pWnd, s16 msg, void* pData = NULL); virtual bool OnMouseAction(float x, float y, EUIMessages mouse_action); virtual void Draw(); @@ -71,11 +71,11 @@ class CUIScrollView : public CUIWindow, public CUIWndCallback int GetCurrentScrollPos(); void SetScrollPos(int value); void SetScrollBarProfile(LPCSTR profile); - IC bool NeedShowScrollBar(); // no comment - float GetHorizIndent(); // left + right indent - float GetVertIndent(); // top + bottom indent - void UpdateChildrenLenght(); // set default width for all children - float Scroll2ViewV(); // calculate scale for scroll position + IC bool NeedShowScrollBar(); // no comment + float GetHorizIndent(); // left + right indent + float GetVertIndent(); // top + bottom indent + void UpdateChildrenLenght(); // set default width for all children + float Scroll2ViewV(); // calculate scale for scroll position CUIScrollBar* ScrollBar() { return m_VScrollBar; } typedef fastdelegate::FastDelegate2 cmp_function; cmp_function m_sort_function; diff --git a/src/xrGame/ui/UISecondTaskWnd.cpp b/src/xrGame/ui/UISecondTaskWnd.cpp index b198fb18dfb..eb2988ad4dc 100644 --- a/src/xrGame/ui/UISecondTaskWnd.cpp +++ b/src/xrGame/ui/UISecondTaskWnd.cpp @@ -141,7 +141,7 @@ void UITaskListWnd::UpdateList() ++count_for_check; } } - } // for + } // for m_list->SetScrollPos(prev_scroll_pos); } @@ -321,7 +321,7 @@ bool UITaskListWndItem::OnMouseAction(float x, float y, EUIMessages mouse_action hide_hint(); break; } - } // switch + } // switch return true; } diff --git a/src/xrGame/ui/UISecondTaskWnd.h b/src/xrGame/ui/UISecondTaskWnd.h index ed169db24fd..71e6cf3b215 100644 --- a/src/xrGame/ui/UISecondTaskWnd.h +++ b/src/xrGame/ui/UISecondTaskWnd.h @@ -52,7 +52,7 @@ class UITaskListWnd : public CUIWindow, public CUIWndCallback public: UIHint* hint_wnd; -private: // m_ +private: // m_ CUIFrameWindow* m_background; CUIScrollView* m_list; @@ -63,7 +63,7 @@ class UITaskListWnd : public CUIWindow, public CUIWndCallback // u32 m_activ_task_count; float m_orig_h; -}; // class UITaskListWnd +}; // class UITaskListWnd // ------------------------------------------------------------------------------------------------- @@ -94,7 +94,7 @@ class UITaskListWndItem : public CUIWindow bool show_hint_can; bool show_hint; -private: // m_ +private: // m_ CGameTask* m_task; CUI3tButton* m_name; // CUICheckButton* m_bt_view; @@ -110,6 +110,6 @@ class UITaskListWndItem : public CUIWindow }; u32 m_color_states[stt_count]; -}; // class UITaskListWndItem +}; // class UITaskListWndItem -#endif // UI_SECOND_TASK_WND_H_INCLUDED +#endif // UI_SECOND_TASK_WND_H_INCLUDED diff --git a/src/xrGame/ui/UIServerInfo.cpp b/src/xrGame/ui/UIServerInfo.cpp index 0e7d8109c37..6e717c0093e 100644 --- a/src/xrGame/ui/UIServerInfo.cpp +++ b/src/xrGame/ui/UIServerInfo.cpp @@ -110,7 +110,7 @@ void CUIServerInfo::SetServerLogo(u8 const* data_ptr, u32 const data_size) Msg("! ERROR: failed to create temporary dds file"); return; } - tmp_writer->w((void*)data_ptr, data_size); // sorry :( + tmp_writer->w((void*)data_ptr, data_size); // sorry :( FS.w_close(tmp_writer); m_dds_file_created = true; m_image->InitTexture(tmp_logo_file_name); @@ -137,7 +137,7 @@ void CUIServerInfo::SetServerRules(u8 const* data_ptr, u32 const data_size) tmp_iter = strstr(tmp_iter, "\r\n"); } - m_text_body->SetText(tmp_string); // will create shared_str + m_text_body->SetText(tmp_string); // will create shared_str m_text_body->AdjustHeightToText(); } @@ -170,6 +170,6 @@ bool CUIServerInfo::OnKeyboardAction(int dik, EUIMessages keyboard_action) return true; } break; - }; // switch (dik) + }; // switch (dik) return false; } \ No newline at end of file diff --git a/src/xrGame/ui/UIServerInfo.h b/src/xrGame/ui/UIServerInfo.h index 979187306ad..d9ecd5aa9ec 100644 --- a/src/xrGame/ui/UIServerInfo.h +++ b/src/xrGame/ui/UIServerInfo.h @@ -39,6 +39,6 @@ class CUIServerInfo : public CUIDialogWnd, public CUIWndCallback CUIStatic* m_image; CUI3tButton* m_btn_spectator; CUI3tButton* m_btn_next; -}; // class CUIServerInfo +}; // class CUIServerInfo -#endif //#ifndef UISERVER_INFO_INCLUDED \ No newline at end of file +#endif //#ifndef UISERVER_INFO_INCLUDED \ No newline at end of file diff --git a/src/xrGame/ui/UISkinSelector.cpp b/src/xrGame/ui/UISkinSelector.cpp index 80079fa839c..20a786ff6ac 100644 --- a/src/xrGame/ui/UISkinSelector.cpp +++ b/src/xrGame/ui/UISkinSelector.cpp @@ -32,9 +32,9 @@ CUISkinSelectorWnd::CUISkinSelectorWnd(const char* strSectionName, s16 team) // m_pAnims[0] = new CUIAnimatedStatic(); m_pFrames->AttachChild(m_pAnims[0]); // m_pAnims[1] = new CUIAnimatedStatic(); m_pFrames->AttachChild(m_pAnims[1]); // m_pButtons[0] = new CUI3tButton(); m_pFrames->AttachChild(m_pButtons[0]); - //m_pButtons[0]->SetMessageTarget(this); + // m_pButtons[0]->SetMessageTarget(this); // m_pButtons[1] = new CUI3tButton(); m_pFrames->AttachChild(m_pButtons[1]); - //m_pButtons[1]->SetMessageTarget(this); + // m_pButtons[1]->SetMessageTarget(this); m_pBtnAutoSelect = new CUI3tButton(); AttachChild(m_pBtnAutoSelect); @@ -269,7 +269,7 @@ bool CUISkinSelectorWnd::OnKeyboardAction(int dik, EUIMessages keyboard_action) switch (dik) { case DIK_ESCAPE: OnBtnCancel(); return true; - case DIK_SPACE: // do autoselect + case DIK_SPACE: // do autoselect m_iActiveIndex = -1; case DIK_RETURN: OnBtnOK(); return true; case DIK_LEFT: OnKeyLeft(); return true; diff --git a/src/xrGame/ui/UISpinNum.cpp b/src/xrGame/ui/UISpinNum.cpp index 7813ebc5f1d..387a80a4657 100644 --- a/src/xrGame/ui/UISpinNum.cpp +++ b/src/xrGame/ui/UISpinNum.cpp @@ -12,33 +12,33 @@ CUISpinNum::CUISpinNum() : m_iVal(0), m_iMin(0), m_iMax(100), m_iStep(1) { } -void CUISpinNum::SetCurrentOptValue() // opt->current +void CUISpinNum::SetCurrentOptValue() // opt->current { CUIOptionsItem::SetCurrentOptValue(); GetOptIntegerValue(m_iVal, m_iMin, m_iMax); SetValue(m_iVal); } -void CUISpinNum::SaveBackUpOptValue() // current->backup +void CUISpinNum::SaveBackUpOptValue() // current->backup { CUIOptionsItem::SaveBackUpOptValue(); m_opt_backup_value = m_iVal; } -void CUISpinNum::SaveOptValue() // current->opt +void CUISpinNum::SaveOptValue() // current->opt { CUIOptionsItem::SaveOptValue(); SaveOptIntegerValue(m_iVal); } -void CUISpinNum::UndoOptValue() // backup->current +void CUISpinNum::UndoOptValue() // backup->current { m_iVal = m_opt_backup_value; SetValue(m_iVal); CUIOptionsItem::UndoOptValue(); } -bool CUISpinNum::IsChangedOptValue() const // backup!=current +bool CUISpinNum::IsChangedOptValue() const // backup!=current { return m_iVal != m_opt_backup_value; } diff --git a/src/xrGame/ui/UISpinNum.h b/src/xrGame/ui/UISpinNum.h index ca6132338b4..9670d632b34 100644 --- a/src/xrGame/ui/UISpinNum.h +++ b/src/xrGame/ui/UISpinNum.h @@ -8,11 +8,11 @@ class CUISpinNum : public CUICustomSpin virtual void InitSpin(Fvector2 pos, Fvector2 size); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current virtual void OnBtnUpClick(); virtual void OnBtnDownClick(); @@ -42,11 +42,11 @@ class CUISpinFlt : public CUICustomSpin virtual void InitSpin(Fvector2 pos, Fvector2 size); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current virtual void OnBtnUpClick(); virtual void OnBtnDownClick(); diff --git a/src/xrGame/ui/UISpinText.h b/src/xrGame/ui/UISpinText.h index a3eb4352854..fd04930c4ca 100644 --- a/src/xrGame/ui/UISpinText.h +++ b/src/xrGame/ui/UISpinText.h @@ -5,11 +5,11 @@ class CUISpinText : public CUICustomSpin public: CUISpinText(); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current // own virtual void OnBtnUpClick(); diff --git a/src/xrGame/ui/UIStatsPlayerList.cpp b/src/xrGame/ui/UIStatsPlayerList.cpp index 4f3c263f757..50ec081f6ba 100644 --- a/src/xrGame/ui/UIStatsPlayerList.cpp +++ b/src/xrGame/ui/UIStatsPlayerList.cpp @@ -109,7 +109,7 @@ LPCSTR CUIStatsPlayerList::GetST_entry(LPCSTR itm) #ifdef DEBUG return NULL; -#endif // DEBUG +#endif // DEBUG } void CUIStatsPlayerList::InitHeader(CUIXml& xml_doc, LPCSTR path) diff --git a/src/xrGame/ui/UIStatsPlayerList.h b/src/xrGame/ui/UIStatsPlayerList.h index 121ac039860..147a460e2b3 100644 --- a/src/xrGame/ui/UIStatsPlayerList.h +++ b/src/xrGame/ui/UIStatsPlayerList.h @@ -45,12 +45,12 @@ class CUIStatsPlayerList : public CUIScrollView typedef struct { - u32 c; // color - CGameFont* f; // font - float h; // height + u32 c; // color + CGameFont* f; // font + float h; // height } S_ELEMENT; - S_ELEMENT m_h; // header - S_ELEMENT m_i; // item - S_ELEMENT m_t; // team header + S_ELEMENT m_h; // header + S_ELEMENT m_i; // item + S_ELEMENT m_t; // team header }; \ No newline at end of file diff --git a/src/xrGame/ui/UITabControl.cpp b/src/xrGame/ui/UITabControl.cpp index 778fbf117b8..c8dcbf85b7e 100644 --- a/src/xrGame/ui/UITabControl.cpp +++ b/src/xrGame/ui/UITabControl.cpp @@ -21,7 +21,7 @@ void CUITabControl::SetCurrentOptValue() if (NULL == b) { #ifndef MASTER_GOLD Msg("! tab named [%s] doesnt exist", v.c_str()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD v = m_TabsArr[0]->m_btn_id; } SetActiveTab(v); diff --git a/src/xrGame/ui/UITabControl.h b/src/xrGame/ui/UITabControl.h index 0633eb7ebed..3c0d56cde6f 100644 --- a/src/xrGame/ui/UITabControl.h +++ b/src/xrGame/ui/UITabControl.h @@ -17,11 +17,11 @@ class CUITabControl : public CUIWindow, public CUIOptionsItem virtual ~CUITabControl(); // options item - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current virtual bool OnKeyboardAction(int dik, EUIMessages keyboard_action); virtual void OnTabChange(const shared_str& sCur, const shared_str& sPrev); diff --git a/src/xrGame/ui/UITalkDialogWnd.cpp b/src/xrGame/ui/UITalkDialogWnd.cpp index c86ba4d981d..e1f28321cb7 100644 --- a/src/xrGame/ui/UITalkDialogWnd.cpp +++ b/src/xrGame/ui/UITalkDialogWnd.cpp @@ -173,7 +173,7 @@ void CUITalkDialogWnd::AddQuestion(LPCSTR str, LPCSTR value, int number, bool b_ { CUIQuestionItem* itm = new CUIQuestionItem(m_uiXml, "question_item"); itm->Init(value, str); - ++number; // zero-based index + ++number; // zero-based index if (number <= 10) { string16 buff; xr_sprintf(buff, "%d.", (number == 10) ? 0 : number); diff --git a/src/xrGame/ui/UITalkDialogWnd.h b/src/xrGame/ui/UITalkDialogWnd.h index 1622acae51c..abfd3cb75fb 100644 --- a/src/xrGame/ui/UITalkDialogWnd.h +++ b/src/xrGame/ui/UITalkDialogWnd.h @@ -31,7 +31,7 @@ class CUITalkDialogWnd : public CUIWindow, public CUIWndCallback u32 GetHeaderColor() { return m_iNameTextColor; } CGameFont* GetHeaderFont() { return m_pNameTextFont; } u32 GetOurReplicsColor() { return m_uOurReplicsColor; } - bool mechanic_mode; // for inventory upgrades + bool mechanic_mode; // for inventory upgrades //номер выбранного вопроса shared_str m_ClickedQuestionID; diff --git a/src/xrGame/ui/UITalkWnd.cpp b/src/xrGame/ui/UITalkWnd.cpp index 8e6cf6777bc..7ca0abe1385 100644 --- a/src/xrGame/ui/UITalkWnd.cpp +++ b/src/xrGame/ui/UITalkWnd.cpp @@ -253,7 +253,7 @@ void CUITalkWnd::ToTopicMode() void CUITalkWnd::AskQuestion() { - if (m_bNeedToUpdateQuestions) return; // quick dblclick:( + if (m_bNeedToUpdateQuestions) return; // quick dblclick:( shared_str phrase_id; //игрок выбрал тему разговора @@ -318,7 +318,7 @@ void CUITalkWnd::SwitchToTrade() pGameSP->MainInputReceiver()->HideDialog(); }*/ pGameSP->StartTrade(m_pOurInvOwner, m_pOthersInvOwner); - } // pGameSP + } // pGameSP } } diff --git a/src/xrGame/ui/UITalkWnd.h b/src/xrGame/ui/UITalkWnd.h index 8312755dacb..722fb75fda3 100644 --- a/src/xrGame/ui/UITalkWnd.h +++ b/src/xrGame/ui/UITalkWnd.h @@ -39,7 +39,7 @@ class CUITalkWnd : public CUIDialogWnd virtual void Show(bool status); - void Stop(); // deffered + void Stop(); // deffered void StopTalk(); void UpdateQuestions(); diff --git a/src/xrGame/ui/UITaskWnd.cpp b/src/xrGame/ui/UITaskWnd.cpp index d73fc2781b4..e518a781ef4 100644 --- a/src/xrGame/ui/UITaskWnd.cpp +++ b/src/xrGame/ui/UITaskWnd.cpp @@ -420,7 +420,7 @@ bool CUITaskItem::OnMouseAction(float x, float y, EUIMessages mouse_action) show_hint_can = false; show_hint = false; break; - } // switch + } // switch return true; } diff --git a/src/xrGame/ui/UITrackBar.cpp b/src/xrGame/ui/UITrackBar.cpp index 13350186cfe..56408f985ca 100644 --- a/src/xrGame/ui/UITrackBar.cpp +++ b/src/xrGame/ui/UITrackBar.cpp @@ -92,7 +92,7 @@ void CUITrackBar::InitTrackBar(Fvector2 pos, Fvector2 size) item_width *= UI().get_current_kx(); m_pSlider->InitButton( - Fvector2().set(0.0f, 0.0f) /*(size.y - item_height)/2.0f)*/, Fvector2().set(item_width, item_height)); // size + Fvector2().set(0.0f, 0.0f) /*(size.y - item_height)/2.0f)*/, Fvector2().set(item_width, item_height)); // size m_pSlider->InitTexture("ui_inGame2_opt_slider_box"); SetCurrentState(S_Enabled); diff --git a/src/xrGame/ui/UITrackBar.h b/src/xrGame/ui/UITrackBar.h index ddd93b43e5c..56eb8101019 100644 --- a/src/xrGame/ui/UITrackBar.h +++ b/src/xrGame/ui/UITrackBar.h @@ -10,11 +10,11 @@ class CUITrackBar : public CUI_IB_FrameLineWnd, public CUIOptionsItem public: CUITrackBar(); // CUIOptionsItem - virtual void SetCurrentOptValue(); // opt->current - virtual void SaveBackUpOptValue(); // current->backup - virtual void SaveOptValue(); // current->opt - virtual void UndoOptValue(); // backup->current - virtual bool IsChangedOptValue() const; // backup!=current + virtual void SetCurrentOptValue(); // opt->current + virtual void SaveBackUpOptValue(); // current->backup + virtual void SaveOptValue(); // current->opt + virtual void UndoOptValue(); // backup->current + virtual bool IsChangedOptValue() const; // backup!=current virtual void Draw(); virtual void Update(); diff --git a/src/xrGame/ui/UIWindow.cpp b/src/xrGame/ui/UIWindow.cpp index 0354adbbca1..e1d67ed673e 100644 --- a/src/xrGame/ui/UIWindow.cpp +++ b/src/xrGame/ui/UIWindow.cpp @@ -36,7 +36,7 @@ void clean_wnd_rects() { #ifdef DEBUG GlobalEnv.DRender->DestroyDebugShader(IDebugRender::dbgShaderWindow); -#endif // DEBUG +#endif // DEBUG } void add_rect_to_draw(Frect r) @@ -61,7 +61,7 @@ void draw_rect(Frect& r, u32 color) //. GlobalEnv.UIRender->FlushLineStrip(); GlobalEnv.UIRender->FlushPrimitive(); -#endif // DEBUG +#endif // DEBUG } void draw_wnds_rects() { @@ -545,12 +545,12 @@ void CUIWindow::ShowChildren(bool show) (*it)->Show(show); } -static bool is_in(Frect const& a, Frect const& b) // b in a +static bool is_in(Frect const& a, Frect const& b) // b in a { return (a.x1 < b.x1) && (a.x2 > b.x2) && (a.y1 < b.y1) && (a.y2 > b.y2); } -bool fit_in_rect(CUIWindow* w, Frect const& vis_rect, float border, float dx16pos) // this = hint wnd +bool fit_in_rect(CUIWindow* w, Frect const& vis_rect, float border, float dx16pos) // this = hint wnd { float const cursor_height = 43.0f; Fvector2 cursor_pos = GetUICursor().GetCursorPosition(); diff --git a/src/xrGame/ui/UIWpnParams.h b/src/xrGame/ui/UIWpnParams.h index 8beaa808367..b81d924d56c 100644 --- a/src/xrGame/ui/UIWpnParams.h +++ b/src/xrGame/ui/UIWpnParams.h @@ -19,7 +19,7 @@ class CUIWpnParams : public CUIWindow bool Check(const shared_str& wpn_section); protected: - CUIDoubleProgressBar m_progressAccuracy; // red or green + CUIDoubleProgressBar m_progressAccuracy; // red or green CUIDoubleProgressBar m_progressHandling; CUIDoubleProgressBar m_progressDamage; CUIDoubleProgressBar m_progressRPM; @@ -55,6 +55,6 @@ class CUIConditionParams : public CUIWindow void SetInfo(CInventoryItem const* slot_wpn, CInventoryItem const& cur_wpn); protected: - CUIDoubleProgressBar m_progress; // red or green + CUIDoubleProgressBar m_progress; // red or green CUIStatic m_text; }; diff --git a/src/xrGame/ui/UIXmlInit.cpp b/src/xrGame/ui/UIXmlInit.cpp index 5095404ff02..223362a1fc2 100644 --- a/src/xrGame/ui/UIXmlInit.cpp +++ b/src/xrGame/ui/UIXmlInit.cpp @@ -513,7 +513,7 @@ bool CUIXmlInit::InitProgressBar(CUIXml& xml_doc, LPCSTR path, int index, CUIPro CUIProgressBar::EOrientMode mode = CUIProgressBar::om_vert; int mode_horz = xml_doc.ReadAttribInt(path, index, "horz", 0); LPCSTR mode_str = xml_doc.ReadAttrib(path, index, "mode"); - if (mode_horz == 1) // om_horz + if (mode_horz == 1) // om_horz { mode = CUIProgressBar::om_horz; } diff --git a/src/xrGame/ui/ui_af_params.cpp b/src/xrGame/ui/ui_af_params.cpp index bb1f448bacc..50c4baef76b 100644 --- a/src/xrGame/ui/ui_af_params.cpp +++ b/src/xrGame/ui/ui_af_params.cpp @@ -32,13 +32,13 @@ CUIArtefactParams::~CUIArtefactParams() xr_delete(m_Prop_line); } -LPCSTR af_immunity_section_names[] = // ALife::EInfluenceType +LPCSTR af_immunity_section_names[] = // ALife::EInfluenceType { - "radiation_immunity", // infl_rad=0 - "burn_immunity", // infl_fire=1 - "chemical_burn_immunity", // infl_acid=2 - "telepatic_immunity", // infl_psi=3 - "shock_immunity", // infl_electra=4 + "radiation_immunity", // infl_rad=0 + "burn_immunity", // infl_fire=1 + "chemical_burn_immunity", // infl_acid=2 + "telepatic_immunity", // infl_psi=3 + "shock_immunity", // infl_electra=4 // "strike_immunity", // "wound_immunity", @@ -46,22 +46,22 @@ LPCSTR af_immunity_section_names[] = // ALife::EInfluenceType // "fire_wound_immunity", }; -LPCSTR af_restore_section_names[] = // ALife::EConditionRestoreType +LPCSTR af_restore_section_names[] = // ALife::EConditionRestoreType { - "health_restore_speed", // eHealthRestoreSpeed=0 - "satiety_restore_speed", // eSatietyRestoreSpeed=1 - "power_restore_speed", // ePowerRestoreSpeed=2 - "bleeding_restore_speed", // eBleedingRestoreSpeed=3 - "radiation_restore_speed", // eRadiationRestoreSpeed=4 + "health_restore_speed", // eHealthRestoreSpeed=0 + "satiety_restore_speed", // eSatietyRestoreSpeed=1 + "power_restore_speed", // ePowerRestoreSpeed=2 + "bleeding_restore_speed", // eBleedingRestoreSpeed=3 + "radiation_restore_speed", // eRadiationRestoreSpeed=4 }; -LPCSTR af_immunity_caption[] = // ALife::EInfluenceType +LPCSTR af_immunity_caption[] = // ALife::EInfluenceType { - "ui_inv_outfit_radiation_protection", // "(radiation_imm)", - "ui_inv_outfit_burn_protection", // "(burn_imm)", - "ui_inv_outfit_chemical_burn_protection", // "(chemical_burn_imm)", - "ui_inv_outfit_telepatic_protection", // "(telepatic_imm)", - "ui_inv_outfit_shock_protection", // "(shock_imm)", + "ui_inv_outfit_radiation_protection", // "(radiation_imm)", + "ui_inv_outfit_burn_protection", // "(burn_imm)", + "ui_inv_outfit_chemical_burn_protection", // "(chemical_burn_imm)", + "ui_inv_outfit_telepatic_protection", // "(telepatic_imm)", + "ui_inv_outfit_shock_protection", // "(shock_imm)", // "ui_inv_outfit_strike_protection", // "(strike_imm)", // "ui_inv_outfit_wound_protection", // "(wound_imm)", @@ -69,7 +69,7 @@ LPCSTR af_immunity_caption[] = // ALife::EInfluenceType // "ui_inv_outfit_fire_wound_protection", // "(fire_wound_imm)", }; -LPCSTR af_restore_caption[] = // ALife::EConditionRestoreType +LPCSTR af_restore_caption[] = // ALife::EConditionRestoreType { "ui_inv_health", "ui_inv_satiety", "ui_inv_power", "ui_inv_bleeding", "ui_inv_radiation", }; @@ -267,7 +267,7 @@ void UIArtefactParamItem::SetValue(float value) if (m_unit_str.size()) { STRCONCAT(str, buf, " ", m_unit_str.c_str()); } - else // = "" + else // = "" { STRCONCAT(str, buf); } diff --git a/src/xrGame/ui/ui_af_params.h b/src/xrGame/ui/ui_af_params.h index c81d5facbe4..15aa3a6c2d7 100644 --- a/src/xrGame/ui/ui_af_params.h +++ b/src/xrGame/ui/ui_af_params.h @@ -23,7 +23,7 @@ class CUIArtefactParams : public CUIWindow CUIStatic* m_Prop_line; -}; // class CUIArtefactParams +}; // class CUIArtefactParams // ----------------------------------- @@ -46,4 +46,4 @@ class UIArtefactParamItem : public CUIWindow shared_str m_texture_minus; shared_str m_texture_plus; -}; // class UIArtefactParamItem +}; // class UIArtefactParamItem diff --git a/src/xrGame/ui/ui_arrow.cpp b/src/xrGame/ui/ui_arrow.cpp index 5061dcf8648..f7df1b26606 100644 --- a/src/xrGame/ui/ui_arrow.cpp +++ b/src/xrGame/ui/ui_arrow.cpp @@ -54,7 +54,7 @@ void UI_Arrow::SetNewValue(float new_value) val *= (dif > 0.0f) ? +1.0f : -1.0f; m_pos += val; } - clamp(m_pos, 0.0f, 1.0f); // min = 0, max = 1 + clamp(m_pos, 0.0f, 1.0f); // min = 0, max = 1 SetPos(m_pos); } diff --git a/src/xrGame/ui/ui_arrow.h b/src/xrGame/ui/ui_arrow.h index 335b30e38bf..7420ebbb2e4 100644 --- a/src/xrGame/ui/ui_arrow.h +++ b/src/xrGame/ui/ui_arrow.h @@ -25,6 +25,6 @@ class UI_Arrow : public CUIStatic float m_temp_pos; float m_pos; -}; // class UI_Arrow +}; // class UI_Arrow -#endif // UI_ARROW_H_INCLUDED +#endif // UI_ARROW_H_INCLUDED diff --git a/src/xrGame/ui_base.cpp b/src/xrGame/ui_base.cpp index 885dd7524a6..5bdda7952e7 100644 --- a/src/xrGame/ui_base.cpp +++ b/src/xrGame/ui_base.cpp @@ -76,7 +76,7 @@ sPoly2D* C2DFrustum::ClipPoly(sPoly2D& S, sPoly2D& D) const dir_uv.sub((*src)[j + 1].uv, (*src)[j].uv); denum = P.n.dotproduct(dir_pt); if (denum != 0) { - t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); + t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); dest->last().pt.mad((*src)[j].pt, dir_pt, t); dest->last().uv.mad((*src)[j].uv, dir_uv, t); dest->inc(); @@ -93,7 +93,7 @@ sPoly2D* C2DFrustum::ClipPoly(sPoly2D& S, sPoly2D& D) const dir_uv.sub((*src)[j + 1].uv, (*src)[j].uv); denum = P.n.dotproduct(dir_pt); if (denum != 0) { - t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); + t = -cls[j] / denum; // VERIFY(t<=1.f && t>=0); dest->last().pt.mad((*src)[j].pt, dir_pt, t); dest->last().uv.mad((*src)[j].uv, dir_uv, t); dest->inc(); diff --git a/src/xrGame/vision_client.h b/src/xrGame/vision_client.h index af9d0fbd3f0..78a48977fb4 100644 --- a/src/xrGame/vision_client.h +++ b/src/xrGame/vision_client.h @@ -65,4 +65,4 @@ class vision_client : public ScheduledBase, public Feel::Vision #include "vision_client_inline.h" -#endif // VISION_CLIENT_H \ No newline at end of file +#endif // VISION_CLIENT_H \ No newline at end of file diff --git a/src/xrGame/vision_client_inline.h b/src/xrGame/vision_client_inline.h index 164c97c1c14..10dd8912d84 100644 --- a/src/xrGame/vision_client_inline.h +++ b/src/xrGame/vision_client_inline.h @@ -15,4 +15,4 @@ IC CVisualMemoryManager& vision_client::visual() const return (*m_visual); } -#endif // VISION_CLIENT_INLINE_H \ No newline at end of file +#endif // VISION_CLIENT_INLINE_H \ No newline at end of file diff --git a/src/xrGame/visual_memory_manager.cpp b/src/xrGame/visual_memory_manager.cpp index 3995cf29adb..df397e85ca0 100644 --- a/src/xrGame/visual_memory_manager.cpp +++ b/src/xrGame/visual_memory_manager.cpp @@ -31,7 +31,7 @@ #ifndef MASTER_GOLD #include "actor.h" #include "ai_debug.h" -#endif // MASTER_GOLD +#endif // MASTER_GOLD void SetActorVisibility(u16 who, float value); @@ -238,7 +238,7 @@ float CVisualMemoryManager::object_visible_distance(const CGameObject* game_obje eye_direction.setHP(-m_stalker->movement().m_head.current.yaw, -m_stalker->movement().m_head.current.pitch); } else - { // if its a monster + { // if its a monster const MonsterSpace::SBoneRotation& head_orient = m_object->head_orientation(); eye_direction.setHP(-head_orient.current.yaw, -head_orient.current.pitch); } @@ -391,7 +391,7 @@ bool CVisualMemoryManager::should_ignore_object(IGameObject const* object) const return true; } else -#endif // MASTER_GOLD +#endif // MASTER_GOLD if (CBaseMonster const* const monster = smart_cast(object)) { @@ -648,7 +648,7 @@ void CVisualMemoryManager::update(float time_delta) } STOP_PROFILE -#if 0 // def DEBUG +#if 0 // def DEBUG if (m_stalker) { CAgentMemberManager::MEMBER_STORAGE::const_iterator I = m_stalker->agent_manager().member().members().begin(); CAgentMemberManager::MEMBER_STORAGE::const_iterator E = m_stalker->agent_manager().member().members().end(); @@ -713,7 +713,7 @@ void CVisualMemoryManager::save(NET_Packet& packet) const packet.w_float((*I).m_object_params.m_orientation.yaw); packet.w_float((*I).m_object_params.m_orientation.pitch); packet.w_float((*I).m_object_params.m_orientation.roll); -#endif // USE_ORIENTATION +#endif // USE_ORIENTATION // self params packet.w_u32((*I).m_self_params.m_level_vertex_id); packet.w_vec3((*I).m_self_params.m_position); @@ -721,16 +721,16 @@ void CVisualMemoryManager::save(NET_Packet& packet) const packet.w_float((*I).m_self_params.m_orientation.yaw); packet.w_float((*I).m_self_params.m_orientation.pitch); packet.w_float((*I).m_self_params.m_orientation.roll); -#endif // USE_ORIENTATION +#endif // USE_ORIENTATION #ifdef USE_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_level_time) : 0); -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_last_level_time) : 0); -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_FIRST_LEVEL_TIME packet.w_u32((Device.dwTimeGlobal >= (*I).m_level_time) ? (Device.dwTimeGlobal - (*I).m_first_level_time) : 0); -#endif // USE_FIRST_LEVEL_TIME +#endif // USE_FIRST_LEVEL_TIME packet.w_u64((*I).m_visible.flags); } @@ -775,17 +775,17 @@ void CVisualMemoryManager::load(IReader& packet) VERIFY(Device.dwTimeGlobal >= object.m_level_time); object.m_level_time = packet.r_u32(); object.m_level_time += Device.dwTimeGlobal; -#endif // USE_LEVEL_TIME +#endif // USE_LEVEL_TIME #ifdef USE_LAST_LEVEL_TIME VERIFY(Device.dwTimeGlobal >= object.m_last_level_time); object.m_last_level_time = packet.r_u32(); object.m_last_level_time += Device.dwTimeGlobal; -#endif // USE_LAST_LEVEL_TIME +#endif // USE_LAST_LEVEL_TIME #ifdef USE_FIRST_LEVEL_TIME VERIFY(Device.dwTimeGlobal >= (*I).m_first_level_time); object.m_first_level_time = packet.r_u32(); object.m_first_level_time += Device.dwTimeGlobal; -#endif // USE_FIRST_LEVEL_TIME +#endif // USE_FIRST_LEVEL_TIME object.m_visible.assign(packet.r_u64()); if (object.m_object) { @@ -807,7 +807,7 @@ void CVisualMemoryManager::load(IReader& packet) VERIFY(spawn_callback->m_object_callback == callback); } } -#endif // DEBUG +#endif // DEBUG } } diff --git a/src/xrGame/wallmark_manager.cpp b/src/xrGame/wallmark_manager.cpp index 8b4dadc8037..96a7353e871 100644 --- a/src/xrGame/wallmark_manager.cpp +++ b/src/xrGame/wallmark_manager.cpp @@ -23,7 +23,7 @@ void CWalmarkManager::Clear() void CWalmarkManager::AddWallmark(const Fvector& dir, const Fvector& start_pos, float range, float wallmark_size, IWallMarkArray& wallmarks_vector, int t) { - CDB::TRI* pTri = Level().ObjectSpace.GetStaticTris() + t; // result.element; + CDB::TRI* pTri = Level().ObjectSpace.GetStaticTris() + t; // result.element; SGameMtl* pMaterial = GMLib.GetMaterialByIdx(pTri->material); if (pMaterial->Flags.is(SGameMtl::flBloodmark)) { @@ -201,12 +201,12 @@ float Distance( { //. Fvector kDiff = rkTri.Origin() - rkPoint; Fvector kDiff; - kDiff.sub(rkTri[0], rkPoint); // + kDiff.sub(rkTri[0], rkPoint); // Fvector Edge0; - Edge0.sub(rkTri[1], rkTri[0]); // + Edge0.sub(rkTri[1], rkTri[0]); // Fvector Edge1; - Edge1.sub(rkTri[2], rkTri[0]); // + Edge1.sub(rkTri[2], rkTri[0]); // //. float fA00 = rkTri.Edge0().SquaredLength(); float fA00 = Edge0.square_magnitude(); @@ -234,7 +234,7 @@ float Distance( if (fS + fT <= fDet) { if (fS < 0.0f) { - if (fT < 0.0f) // region 4 + if (fT < 0.0f) // region 4 { if (fB0 < 0.0f) { fT = 0.0f; @@ -267,7 +267,7 @@ float Distance( } } } - else // region 3 + else // region 3 { fS = 0.0f; if (fB1 >= 0.0f) { @@ -286,7 +286,7 @@ float Distance( } } } - else if (fT < 0.0f) // region 5 + else if (fT < 0.0f) // region 5 { fT = 0.0f; if (fB0 >= 0.0f) { @@ -304,7 +304,7 @@ float Distance( fSqrDist = fB0 * fS + fC; } } - else // region 0 + else // region 0 { // minimum at interior point float fInvDet = 1.0f / fDet; @@ -317,7 +317,7 @@ float Distance( { float fTmp0, fTmp1, fNumer, fDenom; - if (fS < 0.0f) // region 2 + if (fS < 0.0f) // region 2 { fTmp0 = fA01 + fB0; fTmp1 = fA11 + fB1; @@ -356,7 +356,7 @@ float Distance( } } } - else if (fT < 0.0f) // region 6 + else if (fT < 0.0f) // region 6 { fTmp0 = fA01 + fB1; fTmp1 = fA00 + fB0; @@ -395,7 +395,7 @@ float Distance( } } } - else // region 1 + else // region 1 { fNumer = fA11 + fB1 - fA01 - fB0; if (fNumer <= 0.0f) { diff --git a/src/xrGame/xrClientsPool.cpp b/src/xrGame/xrClientsPool.cpp index 45aa31bee28..c05281621d9 100644 --- a/src/xrGame/xrClientsPool.cpp +++ b/src/xrGame/xrClientsPool.cpp @@ -36,7 +36,7 @@ void xrClientsPool::ClearExpiredClients() { expired_client_deleter tmp_deleter; tmp_deleter.m_current_time = Device.dwTimeGlobal; - tmp_deleter.m_expire_time = g_sv_Client_Reconnect_Time * 60 * 1000; // in minutes + tmp_deleter.m_expire_time = g_sv_Client_Reconnect_Time * 60 * 1000; // in minutes m_dclients.erase(std::remove_if(m_dclients.begin(), m_dclients.end(), tmp_deleter), m_dclients.end()); } diff --git a/src/xrGame/xrClientsPool.h b/src/xrGame/xrClientsPool.h index 542beabcb1a..7e103836fc2 100644 --- a/src/xrGame/xrClientsPool.h +++ b/src/xrGame/xrClientsPool.h @@ -21,23 +21,23 @@ class xrClientsPool { xrClientData* m_client; u32 m_dtime; - }; // struct dclient + }; // struct dclient struct expired_client_deleter { // copy constructor is valid u32 m_expire_time; u32 m_current_time; bool const operator()(dclient& right) const; - }; // struct expired_client_deleter + }; // struct expired_client_deleter struct pooled_client_finder { // copy constructor is valid xrClientData* m_new_client; bool const operator()(dclient const& right) const; - }; // struct pooled_client_finder + }; // struct pooled_client_finder typedef xr_vector dclients_t; dclients_t m_dclients; -}; // class xrClientsPool +}; // class xrClientsPool -#endif //#ifndef XRCLIENTS_POOL_H_INCLUDED \ No newline at end of file +#endif //#ifndef XRCLIENTS_POOL_H_INCLUDED \ No newline at end of file diff --git a/src/xrGame/xrGameSpyServer.cpp b/src/xrGame/xrGameSpyServer.cpp index 3889888cc6d..77d732a6ba8 100644 --- a/src/xrGame/xrGameSpyServer.cpp +++ b/src/xrGame/xrGameSpyServer.cpp @@ -78,7 +78,7 @@ xrGameSpyServer::EConnect xrGameSpyServer::Connect(shared_str& session_name, Gam string4096 tMapName = ""; const char* SName = *session_name; strncpy_s(tMapName, *session_name, strchr(SName, '/') - SName); - MapName = tMapName; // = (session_name); + MapName = tMapName; // = (session_name); m_iReportToMasterServer = game->get_option_i(*session_name, "public", 0); m_iMaxPlayers = game->get_option_i(*session_name, "maxplayers", 32); @@ -106,7 +106,7 @@ xrGameSpyServer::EConnect xrGameSpyServer::Connect(shared_str& session_name, Gam #endif CDKey_Init(); -#endif // DEBUG +#endif // DEBUG }; return res; @@ -153,7 +153,7 @@ void xrGameSpyServer::OnCL_Disconnected(IClient* _CL) }; } -u32 xrGameSpyServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned +u32 xrGameSpyServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned { u16 type; P.r_begin(type); @@ -178,7 +178,7 @@ u32 xrGameSpyServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero mean if (!CL->m_bCDKeyAuth) { #ifndef MASTER_GOLD Msg("Server : Respond accepted, Authenticate client."); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD CGameSpy_GCD_Server::ClientAuthCallback authCb; authCb.bind(this, &xrGameSpyServer::OnCDKey_Validation); CGameSpy_GCD_Server::ClientReauthCallback reauthCb; @@ -237,7 +237,7 @@ void xrGameSpyServer::Assign_ServerType(string512& res) else { xr_strcpy(res, "File not found in folder <$app_data_root$>."); - } // if FS.exist(fn) + } // if FS.exist(fn) Msg(res); ServerFlags.set(server_flag_protected, 0); diff --git a/src/xrGame/xrGameSpyServer.h b/src/xrGame/xrGameSpyServer.h index 62b0c20e4fd..5dee300ec3a 100644 --- a/src/xrGame/xrGameSpyServer.h +++ b/src/xrGame/xrGameSpyServer.h @@ -89,6 +89,6 @@ class xrGameSpyServer : public xrServer virtual IClient* client_Create(); virtual u32 OnMessage( - NET_Packet& P, ClientID /*DPNID*/ sender); // Non-Zero means broadcasting with "flags" as returned + NET_Packet& P, ClientID /*DPNID*/ sender); // Non-Zero means broadcasting with "flags" as returned virtual void OnError_Add(qr2_error_t error){}; }; diff --git a/src/xrGame/xrGameSpy_GameSpyFuncs.cpp b/src/xrGame/xrGameSpy_GameSpyFuncs.cpp index e7224a53f54..01249f9b995 100644 --- a/src/xrGame/xrGameSpy_GameSpyFuncs.cpp +++ b/src/xrGame/xrGameSpy_GameSpyFuncs.cpp @@ -68,7 +68,7 @@ void xrGameSpyServer::OnCDKey_Validation(int LocalID, int res, char* errormsg) CL->m_bCDKeyAuth = true; #ifndef MASTER_GOLD Msg("xrGS::CDKey: Validation successful - <%s>", errormsg); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD Check_GameSpy_CDKey_Success(CL); } else diff --git a/src/xrGame/xrServer.cpp b/src/xrGame/xrServer.cpp index 3858f6178d1..6c30de480e5 100644 --- a/src/xrGame/xrServer.cpp +++ b/src/xrGame/xrServer.cpp @@ -126,7 +126,7 @@ IClient* xrServer::client_Find_Get(ClientID ID) #ifndef MASTER_GOLD Msg("# New player created."); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return newCL; }; @@ -145,7 +145,7 @@ void xrServer::client_Destroy(IClient* C) if (pS) { NET_Packet P; P.w_begin(M_EVENT); - P.w_u32(Level().timeServer()); // Device.TimerAsync()); + P.w_u32(Level().timeServer()); // Device.TimerAsync()); P.w_u16(GE_DESTROY); P.w_u16(pS->ID); SendBroadcast(C->ID, P, net_flags(TRUE, TRUE)); @@ -171,7 +171,7 @@ void xrServer::client_Destroy(IClient* C) //. if (!alife_client->flags.bVerified) xrClientData* xr_client = static_cast(alife_client); - m_disconnected_clients.Add(xr_client); // xr_delete(alife_client); + m_disconnected_clients.Add(xr_client); // xr_delete(alife_client); } } @@ -199,7 +199,7 @@ INT g_sv_SendUpdate = 0; void xrServer::Update() { - if (Level().IsDemoPlayStarted() || Level().IsDemoPlayFinished()) return; // diabling server when demo is playing + if (Level().IsDemoPlayStarted() || Level().IsDemoPlayFinished()) return; // diabling server when demo is playing stats.Update.Begin(); NET_Packet Packet; @@ -239,7 +239,7 @@ void xrServer::Update() PerformCheckClientsForMaxPing(); Flush_Clients_Buffers(); - if (0 == (Device.dwFrame % 100)) // once per 100 frames + if (0 == (Device.dwFrame % 100)) // once per 100 frames { UpdateBannedList(); } @@ -280,12 +280,12 @@ void xrServer::MakeUpdatePackets() xrS_entities::iterator I = entities.begin(); xrS_entities::iterator E = entities.end(); for (; I != E; ++I) - { // all entities + { // all entities CSE_Abstract& Test = *(I->second); if (0 == Test.owner) continue; if (!Test.net_Ready) continue; - if (Test.s_flags.is(M_SPAWN_OBJECT_PHANTOM)) continue; // Surely: phantom + if (Test.s_flags.is(M_SPAWN_OBJECT_PHANTOM)) continue; // Surely: phantom if (!Test.Net_Relevant()) continue; tmpPacket.B.count = 0; @@ -303,7 +303,7 @@ void xrServer::MakeUpdatePackets() #endif m_updator.write_update_for(Test.ID, tmpPacket); } - } // all entities + } // all entities m_updator.end_updates(m_update_begin, m_update_end); } @@ -358,7 +358,7 @@ void console_log_cb(void* context, const char* text) _tmp_log.push_back(text); } -u32 xrServer::OnDelayedMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned +u32 xrServer::OnDelayedMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned { u16 type; P.r_begin(type); @@ -430,7 +430,7 @@ u32 xrServer::OnMessageSync(NET_Packet& P, ClientID sender) } extern float g_fCatchObjectTime; -u32 xrServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned +u32 xrServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned { u16 type; P.r_begin(type); @@ -442,7 +442,7 @@ u32 xrServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broad { case M_UPDATE: { - Process_update(P, sender); // No broadcast + Process_update(P, sender); // No broadcast VERIFY(verify_entities()); } break; @@ -910,7 +910,7 @@ void xrServer::verify_entity(const CSE_Abstract* entity) const } } -#endif // DEBUG +#endif // DEBUG void xrServer::DumpStatistics(IGameFont& font, IPerformanceAlert* alert) { @@ -968,7 +968,7 @@ void xrServer::AddDelayedPacket(NET_Packet& Packet, ClientID Sender) } u32 g_sv_dwMaxClientPing = 2000; -u32 g_sv_time_for_ping_check = 15000; // 15 sec +u32 g_sv_time_for_ping_check = 15000; // 15 sec u8 g_sv_maxPingWarningsCount = 5; void xrServer::PerformCheckClientsForMaxPing() @@ -991,16 +991,16 @@ void xrServer::PerformCheckClientsForMaxPing() ++Client->m_ping_warn.m_maxPingWarnings; Client->m_ping_warn.m_dwLastMaxPingWarningTime = Device.dwTimeGlobal; - if (Client->m_ping_warn.m_maxPingWarnings >= g_sv_maxPingWarningsCount) { // kick + if (Client->m_ping_warn.m_maxPingWarnings >= g_sv_maxPingWarningsCount) { // kick LPSTR reason; STRCONCAT(reason, CStringTable().translate("st_kicked_by_server").c_str()); Level().Server->DisconnectClient(Client, reason); } else - { // send warning + { // send warning NET_Packet P; P.w_begin(M_CLIENT_WARN); - P.w_u8(1); // 1 means max-ping-warning + P.w_u8(1); // 1 means max-ping-warning P.w_u16(ps->ping); P.w_u8(Client->m_ping_warn.m_maxPingWarnings); P.w_u8(g_sv_maxPingWarningsCount); @@ -1164,7 +1164,7 @@ struct PlayerInfoWriter dest->w_stringZ(tmp_client->m_cAddress.to_string().c_str()); dest->w_stringZ(tmp_client->m_cdkey_digest); } -}; // struct PlayerInfoWriter +}; // struct PlayerInfoWriter void xrServer::SendPlayersInfo(ClientID const& to_client) { diff --git a/src/xrGame/xrServer.h b/src/xrGame/xrServer.h index 73a51da19ef..754ef3a89d7 100644 --- a/src/xrGame/xrServer.h +++ b/src/xrGame/xrServer.h @@ -21,7 +21,7 @@ class CSE_Abstract; -const u32 NET_Latency = 50; // time in (ms) +const u32 NET_Latency = 50; // time in (ms) // t-defs typedef xr_hash_map xrS_entities; @@ -78,7 +78,7 @@ typedef xr_vector cheaters_t; namespace file_transfer { class server_site; -}; // namespace file_transfer +}; // namespace file_transfer class clientdata_proxy; class server_info_uploader; @@ -128,21 +128,21 @@ class xrServer : public IPureServer xr_deque m_aDelayedPackets; void ProceedDelayedPackets(); void AddDelayedPacket(NET_Packet& Packet, ClientID Sender); - u32 OnDelayedMessage(NET_Packet& P, ClientID sender); // Non-Zero means broadcasting with "flags" as returned + u32 OnDelayedMessage(NET_Packet& P, ClientID sender); // Non-Zero means broadcasting with "flags" as returned void SendUpdatesToAll(); void _stdcall SendGameUpdateTo(IClient* client); private: - typedef CID_Generator id_generator_type; @@ -231,7 +231,7 @@ class xrServer : public IPureServer virtual ~xrServer(); // extended functionality - virtual u32 OnMessage(NET_Packet& P, ClientID sender); // Non-Zero means broadcasting with "flags" as returned + virtual u32 OnMessage(NET_Packet& P, ClientID sender); // Non-Zero means broadcasting with "flags" as returned u32 OnMessageSync(NET_Packet& P, ClientID sender); virtual void OnCL_Connected(IClient* CL); virtual void OnCL_Disconnected(IClient* CL); @@ -241,10 +241,10 @@ class xrServer : public IPureServer virtual void SendBroadcast(ClientID exclude, NET_Packet& P, u32 dwFlags = DPNSEND_GUARANTEED); void GetPooledState(xrClientData* xrCL); void ClearDisconnectedPool() { m_disconnected_clients.Clear(); }; - virtual IClient* client_Create(); // create client info - virtual void client_Replicate(); // replicate current state to client - virtual IClient* client_Find_Get(ClientID ID); // Find earlier disconnected client - virtual void client_Destroy(IClient* C); // destroy client info + virtual IClient* client_Create(); // create client info + virtual void client_Replicate(); // replicate current state to client + virtual IClient* client_Find_Get(ClientID ID); // Find earlier disconnected client + virtual void client_Destroy(IClient* C); // destroy client info // utilities virtual CSE_Abstract* entity_Create(LPCSTR name) override; @@ -311,4 +311,4 @@ enum e_dbg_net_Draw_Flags extern Flags32 dbg_net_Draw_Flags; #endif -#endif // !defined(AFX_XRSERVER_H__65728A25_16FC_4A7B_8CCE_D798CA5EC64E__INCLUDED_) +#endif // !defined(AFX_XRSERVER_H__65728A25_16FC_4A7B_8CCE_D798CA5EC64E__INCLUDED_) diff --git a/src/xrGame/xrServerMapSync.cpp b/src/xrGame/xrServerMapSync.cpp index 20eeee0ade1..44dfb61c6d9 100644 --- a/src/xrGame/xrServerMapSync.cpp +++ b/src/xrGame/xrServerMapSync.cpp @@ -7,7 +7,7 @@ void xrServer::OnProcessClientMapData(NET_Packet& P, ClientID const& clientID) { #ifdef DEBUG Msg("--- Sending map data to client 0x%08x", clientID); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG NET_Packet responseP; string128 client_map_name; string128 client_map_version; @@ -26,7 +26,7 @@ void xrServer::OnProcessClientMapData(NET_Packet& P, ClientID const& clientID) responseP.w_u8(static_cast(YouHaveOtherMap)); #ifdef DEBUG Msg("--- Client [0x%08x] has incorrect map [%s] or version [%s]", client_map_name, client_map_version); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // here we can make hard disconnect of this client... } else if (!Level().IsChecksumsEqual(client_geom_crc32)) diff --git a/src/xrGame/xrServerMapSync.h b/src/xrGame/xrServerMapSync.h index a3da84cf30b..f95528d70d2 100644 --- a/src/xrGame/xrServerMapSync.h +++ b/src/xrGame/xrServerMapSync.h @@ -4,9 +4,9 @@ // this is a response tag that server puts in the first byte of response packet. enum MapSyncResponse { - SuccessSync = 0, // in this case, all is OK :) - InvalidChecksum = 1, // in this case, client has corrupted map geometry (checksum error) - YouHaveOtherMap = 2 // in this case, client has other map -}; // enum MapSyncResponse + SuccessSync = 0, // in this case, all is OK :) + InvalidChecksum = 1, // in this case, client has corrupted map geometry (checksum error) + YouHaveOtherMap = 2 // in this case, client has other map +}; // enum MapSyncResponse -#endif // XRSERVER_MAP_SYNC_H \ No newline at end of file +#endif // XRSERVER_MAP_SYNC_H \ No newline at end of file diff --git a/src/xrGame/xrServer_CL_connect.cpp b/src/xrGame/xrServer_CL_connect.cpp index 9e734cb6b36..1f0fc7d457c 100644 --- a/src/xrGame/xrServer_CL_connect.cpp +++ b/src/xrGame/xrServer_CL_connect.cpp @@ -134,7 +134,7 @@ void xrServer::SendConnectResult(IClient* CL, u8 res, u8 res1, char* ResultStr) SendTo(CL->ID, P); - if (!res) // need disconnect + if (!res) // need disconnect { #ifdef MP_LOGGING Msg("* Server disconnecting client, resaon: %s", ResultStr); @@ -210,7 +210,7 @@ void xrServer::OnBuildVersionRespond(IClient* CL, NET_Packet& P) Msg("_our = %d", _our); Msg("_him = %d", _him); _our = MP_DEBUG_AUTH; -#endif // USE_DEBUG_AUTH +#endif // USE_DEBUG_AUTH if (_our != _him) { SendConnectResult(CL, 0, ecr_data_verification_failed, "Data verification failed. Cheater?"); diff --git a/src/xrGame/xrServer_Connect.cpp b/src/xrGame/xrServer_Connect.cpp index 31d19539fdd..fc8e65e7775 100644 --- a/src/xrGame/xrServer_Connect.cpp +++ b/src/xrGame/xrServer_Connect.cpp @@ -87,7 +87,7 @@ IClient* xrServer::new_client(SClientConnectData* cl_data) // copy entity CL->ID = cl_data->clientID; CL->process_id = cl_data->process_id; - CL->name = cl_data->name; // only for offline mode + CL->name = cl_data->name; // only for offline mode CL->pass._set(cl_data->pass); NET_Packet P; @@ -105,7 +105,7 @@ void xrServer::AttachNewClient(IClient* CL) msgConfig.sign1 = 0x12071980; msgConfig.sign2 = 0x26111975; - if (psNET_direct_connect) // single_game + if (psNET_direct_connect) // single_game { SV_Client = CL; CL->flags.bLocal = 1; diff --git a/src/xrGame/xrServer_info.cpp b/src/xrGame/xrServer_info.cpp index 69c9d1ed1e2..65194f6b713 100644 --- a/src/xrGame/xrServer_info.cpp +++ b/src/xrGame/xrServer_info.cpp @@ -13,7 +13,7 @@ server_info_uploader& xrServer::GetServerInfoUploader() struct free_info_searcher { bool operator()(server_info_uploader const* uplinfo) { return !uplinfo->is_active(); }; - }; // struct free_info_searcher + }; // struct free_info_searcher info_uploaders_t::iterator tmp_iter = std::find_if(m_info_uploaders.begin(), m_info_uploaders.end(), free_info_searcher()); @@ -30,7 +30,7 @@ server_info_uploader& xrServer::GetServerInfoUploader() return *result; } -void xrServer::SendServerInfoToClient(ClientID const& new_client) // WARNING ! this function is thread unsafe !!! +void xrServer::SendServerInfoToClient(ClientID const& new_client) // WARNING ! this function is thread unsafe !!! { if (IsGameTypeSingle()) { SendConfigFinished(new_client); diff --git a/src/xrGame/xrServer_info.h b/src/xrGame/xrServer_info.h index 3fe07f01705..03957458665 100644 --- a/src/xrGame/xrServer_info.h +++ b/src/xrGame/xrServer_info.h @@ -13,7 +13,7 @@ class server_info_uploader : Noncopyable { eUploadNotActive = 0x00, eUploadingInfo - }; // enum ESvInfoUploadState + }; // enum ESvInfoUploadState ESvInfoUploadState m_state; u8* m_logo_data; u32 m_logo_size; @@ -36,6 +36,6 @@ class server_info_uploader : Noncopyable void start_upload_info(IReader const* svlogo, IReader const* svrules, ClientID const& toclient, svinfo_upload_complete_cb const& complete_cb); void __stdcall upload_server_info_callback(file_transfer::sending_status_t status, u32 uploaded, u32 total); -}; // class server_info_uploader +}; // class server_info_uploader -#endif //#ifndef SERVER_INFO_UPLOADER \ No newline at end of file +#endif //#ifndef SERVER_INFO_UPLOADER \ No newline at end of file diff --git a/src/xrGame/xrServer_perform_sls_default.cpp b/src/xrGame/xrServer_perform_sls_default.cpp index a1d2351f030..42a9b56bb26 100644 --- a/src/xrGame/xrServer_perform_sls_default.cpp +++ b/src/xrGame/xrServer_perform_sls_default.cpp @@ -2,7 +2,7 @@ #include "xrmessages.h" #include "xrserver.h" -#if 1 // def DEBUG +#if 1 // def DEBUG #define USE_DESIGNER_KEY #endif diff --git a/src/xrGame/xrServer_process_event.cpp b/src/xrGame/xrServer_process_event.cpp index e6c807007af..a6f0a8a8a88 100644 --- a/src/xrGame/xrServer_process_event.cpp +++ b/src/xrGame/xrServer_process_event.cpp @@ -112,13 +112,13 @@ void xrServer::Process_event(NET_Packet& P, ClientID sender) { u16 id_entity; P.r_u16(id_entity); - CSE_Abstract* e_parent = receiver; // кто забирает (для своих нужд) - CSE_Abstract* e_entity = game->get_entity_from_eid(id_entity); // кто отдает + CSE_Abstract* e_parent = receiver; // кто забирает (для своих нужд) + CSE_Abstract* e_entity = game->get_entity_from_eid(id_entity); // кто отдает if (!e_entity) break; - if (0xffff != e_entity->ID_Parent) break; // this item already taken + if (0xffff != e_entity->ID_Parent) break; // this item already taken xrClientData* c_parent = e_parent->owner; xrClientData* c_from = ID_to_client(sender); - R_ASSERT(c_from == c_parent); // assure client ownership of event + R_ASSERT(c_from == c_parent); // assure client ownership of event // Signal to everyone (including sender) SendBroadcast(BroadcastCID, P, MODE); @@ -144,7 +144,7 @@ void xrServer::Process_event(NET_Packet& P, ClientID sender) u16 id_src; P.r_u16(id_src); - CSE_Abstract* e_dest = receiver; // кто умер + CSE_Abstract* e_dest = receiver; // кто умер // this is possible when hit event is sent before destroy event if (!e_dest) break; @@ -152,7 +152,7 @@ void xrServer::Process_event(NET_Packet& P, ClientID sender) if (creature) creature->set_killer_id(id_src); // Msg ("[%d][%s] killed [%d][%s]",id_src,id_src==u16(-1) ? "UNKNOWN" : - //game->get_entity_from_eid(id_src)->name_replace(),id_dest,e_dest->name_replace()); + // game->get_entity_from_eid(id_src)->name_replace(),id_dest,e_dest->name_replace()); break; } @@ -177,17 +177,17 @@ void xrServer::Process_event(NET_Packet& P, ClientID sender) if ((game->Type() != eGameIDSingle) && l_pC && l_pC->owner) { Msg("* [%2d] killed by [%2d] - sended by [0x%08x]", id_dest, id_src, l_pC->ID.value()); } -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD - CSE_Abstract* e_dest = receiver; // кто умер + CSE_Abstract* e_dest = receiver; // кто умер // this is possible when hit event is sent before destroy event if (!e_dest) break; #ifndef MASTER_GOLD if (game->Type() != eGameIDSingle) Msg("* [%2d] is [%s:%s]", id_dest, *e_dest->s_name, e_dest->name_replace()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD - CSE_Abstract* e_src = game->get_entity_from_eid(id_src); // кто убил + CSE_Abstract* e_src = game->get_entity_from_eid(id_src); // кто убил if (!e_src) { xrClientData* C = (xrClientData*)game->get_client(id_src); if (C) e_src = C->owner; @@ -200,11 +200,11 @@ void xrServer::Process_event(NET_Packet& P, ClientID sender) // R_ASSERT2 (e_dest && e_src, "Killer or/and being killed are offline or not exist at all :("); #ifndef MASTER_GOLD if (game->Type() != eGameIDSingle) Msg("* [%2d] is [%s:%s]", id_src, *e_src->s_name, e_src->name_replace()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD game->on_death(e_dest, e_src); - xrClientData* c_src = e_src->owner; // клиент, чей юнит убил + xrClientData* c_src = e_src->owner; // клиент, чей юнит убил if (c_src->owner->ID == id_src) { // Main unit diff --git a/src/xrGame/xrServer_process_event_activate.cpp b/src/xrGame/xrServer_process_event_activate.cpp index e9319ade7eb..a94619954a3 100644 --- a/src/xrGame/xrServer_process_event_activate.cpp +++ b/src/xrGame/xrServer_process_event_activate.cpp @@ -11,7 +11,7 @@ void xrServer::Process_event_activate( #ifndef MASTER_GOLD Msg("---Artefact activate (parent = %d) (item = %d)", id_parent, id_entity); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD R_ASSERT2(e_parent, make_string("parent not found. id_parent=%d id_entity=%d frame=%d", id_parent, id_entity, Device.dwFrame) @@ -26,7 +26,7 @@ void xrServer::Process_event_activate( #ifndef MASTER_GOLD Msg("~ ERROR: can't activate independant object. entity[%s:%d], parent[%s:%d], section[%s]", e_entity->name_replace(), id_entity, e_parent->name_replace(), id_parent, *e_entity->s_name); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; } diff --git a/src/xrGame/xrServer_process_event_destroy.cpp b/src/xrGame/xrServer_process_event_destroy.cpp index 2f6a9a4563f..2bc7f8aa855 100644 --- a/src/xrGame/xrServer_process_event_destroy.cpp +++ b/src/xrGame/xrServer_process_event_destroy.cpp @@ -30,24 +30,24 @@ void xrServer::Process_event_destroy(NET_Packet& P, ClientID sender, u32 time, u Msg("sv destroy object %s [%d]", ent_name_safe(id_dest).c_str(), Device.dwFrame); #endif - CSE_Abstract* e_dest = game->get_entity_from_eid(id_dest); // кто должен быть уничтожен + CSE_Abstract* e_dest = game->get_entity_from_eid(id_dest); // кто должен быть уничтожен if (!e_dest) { #ifndef MASTER_GOLD Msg("!SV:ge_destroy: [%d] not found on server", id_dest); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return; }; R_ASSERT(e_dest); - xrClientData* c_dest = e_dest->owner; // клиент, чей юнит + xrClientData* c_dest = e_dest->owner; // клиент, чей юнит R_ASSERT(c_dest); - xrClientData* c_from = ID_to_client(sender); // клиент, кто прислал - R_ASSERT(c_dest == c_from); // assure client ownership of event + xrClientData* c_from = ID_to_client(sender); // клиент, кто прислал + R_ASSERT(c_dest == c_from); // assure client ownership of event u16 parent_id = e_dest->ID_Parent; #ifdef MP_LOGGING Msg("--- SV: Process destroy: parent [%d] item [%d][%s]", parent_id, id_dest, e_dest->name()); -#endif //#ifdef MP_LOGGING +#endif //#ifdef MP_LOGGING //--------------------------------------------- NET_Packet P2, *pEventPack = pEPack; diff --git a/src/xrGame/xrServer_process_event_ownership.cpp b/src/xrGame/xrServer_process_event_ownership.cpp index 3d92b75b727..7368e2df50a 100644 --- a/src/xrGame/xrServer_process_event_ownership.cpp +++ b/src/xrGame/xrServer_process_event_ownership.cpp @@ -23,7 +23,7 @@ void xrServer::Process_event_ownership(NET_Packet& P, ClientID sender, u32 time, #ifdef MP_LOGGING Msg("--- SV: Process ownership take: parent [%d][%s], item [%d][%s]", id_parent, e_parent ? e_parent->name_replace() : "null_parent", id_entity, e_entity ? e_entity->name() : "null_entity"); -#endif // MP_LOGGING +#endif // MP_LOGGING if (!e_parent) { Msg("! ERROR on ownership: parent not found. parent_id = [%d], entity_id = [%d], frame = [%d].", id_parent, @@ -32,7 +32,7 @@ void xrServer::Process_event_ownership(NET_Packet& P, ClientID sender, u32 time, } if (!e_entity) { // Msg( "! ERROR on ownership: entity not found. parent_id = [%d], entity_id = [%d], frame = [%d].", - //id_parent, id_entity, Device.dwFrame ); + // id_parent, id_entity, Device.dwFrame ); return; } @@ -65,7 +65,7 @@ void xrServer::Process_event_ownership(NET_Packet& P, ClientID sender, u32 time, if (alife_entity && !alife_entity->g_Alive() && game->Type() != eGameIDSingle) { #ifdef MP_LOGGING Msg("--- SV: WARNING: dead player [%d] tries to take item [%d]", id_parent, id_entity); -#endif //#ifdef MP_LOGGING +#endif //#ifdef MP_LOGGING return; }; diff --git a/src/xrGame/xrServer_process_event_reject.cpp b/src/xrGame/xrServer_process_event_reject.cpp index d1d6536fa0a..1a3cac5113c 100644 --- a/src/xrGame/xrServer_process_event_reject.cpp +++ b/src/xrGame/xrServer_process_event_reject.cpp @@ -10,7 +10,7 @@ bool xrServer::Process_event_reject( CSE_Abstract* e_entity = game->get_entity_from_eid(id_entity); // R_ASSERT2( e_entity, make_string( "entity not found. parent_id = [%d], entity_id = [%d], frame = [%d]", - //id_parent, id_entity, Device.dwFrame ).c_str() ); + // id_parent, id_entity, Device.dwFrame ).c_str() ); VERIFY2(e_entity, make_string("entity not found. parent_id = [%d], entity_id = [%d], frame = [%d]", id_parent, id_entity, Device.dwFrame) .c_str()); @@ -21,7 +21,7 @@ bool xrServer::Process_event_reject( } // R_ASSERT2( e_parent, make_string( "parent not found. parent_id = [%d], entity_id = [%d], frame = [%d]", - //id_parent, id_entity, Device.dwFrame ).c_str() ); + // id_parent, id_entity, Device.dwFrame ).c_str() ); VERIFY2(e_parent, make_string("parent not found. parent_id = [%d], entity_id = [%d], frame = [%d]", id_parent, id_entity, Device.dwFrame) .c_str()); @@ -34,7 +34,7 @@ bool xrServer::Process_event_reject( #ifdef MP_LOGGING Msg("--- SV: Process reject: parent[%d][%s], item[%d][%s]", id_parent, e_parent->name_replace(), id_entity, e_entity->name()); -#endif // MP_LOGGING +#endif // MP_LOGGING xr_vector& C = e_parent->children; xr_vector::iterator c = std::find(C.begin(), C.end(), id_entity); @@ -47,7 +47,7 @@ bool xrServer::Process_event_reject( #ifndef MASTER_GOLD Msg("! ERROR: can't detach independant object. entity[%s][%d], parent[%s][%d], section[%s]", e_entity->name_replace(), id_entity, e_parent->name_replace(), id_parent, e_entity->s_name.c_str()); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return (false); } diff --git a/src/xrGame/xrServer_process_spawn.cpp b/src/xrGame/xrServer_process_spawn.cpp index 769bae1ad8f..1293eeb5c86 100644 --- a/src/xrGame/xrServer_process_spawn.cpp +++ b/src/xrGame/xrServer_process_spawn.cpp @@ -27,7 +27,7 @@ CSE_Abstract* xrServer::Process_spawn( { #ifndef MASTER_GOLD Msg("- SERVER: Entity [%s] incompatible with current game type.", *E->s_name); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD F_entity_Destroy(E); return NULL; } @@ -52,7 +52,7 @@ CSE_Abstract* xrServer::Process_spawn( if (!e_parent) { R_ASSERT(!tpExistedEntity); // VERIFY3 (smart_cast(E) || - //smart_cast(E),*E->s_name,E->name_replace()); + // smart_cast(E),*E->s_name,E->name_replace()); F_entity_Destroy(E); return NULL; } @@ -70,7 +70,7 @@ CSE_Abstract* xrServer::Process_spawn( R_ASSERT(Phantom); Phantom->Spawn_Read(P); Phantom->ID = PerformIDgen(0xffff); - Phantom->ID_Phantom = Phantom->ID; // Self-linked to avoid phantom-breeding + Phantom->ID_Phantom = Phantom->ID; // Self-linked to avoid phantom-breeding Phantom->owner = NULL; entities.insert(mk_pair(Phantom->ID, Phantom)); @@ -87,7 +87,7 @@ CSE_Abstract* xrServer::Process_spawn( if (E->s_flags.is(M_SPAWN_OBJECT_PHANTOM)) { // Clone from Phantom E->ID = PerformIDgen(0xffff); - E->owner = CL; // = SelectBestClientToMigrateTo (E); + E->owner = CL; // = SelectBestClientToMigrateTo (E); E->s_flags.set(M_SPAWN_OBJECT_PHANTOM, FALSE); entities.insert(mk_pair(E->ID, E)); } @@ -114,7 +114,7 @@ CSE_Abstract* xrServer::Process_spawn( // PROCESS RP; 3D position/orientation PerformRP(E); - E->s_RP = 0xFE; // Use supplied + E->s_RP = 0xFE; // Use supplied // Parent-Connect if (!tpExistedEntity) { diff --git a/src/xrGame/xrServer_process_update.cpp b/src/xrGame/xrServer_process_update.cpp index b1a671f3594..ce123e44dd4 100644 --- a/src/xrGame/xrServer_process_update.cpp +++ b/src/xrGame/xrServer_process_update.cpp @@ -11,7 +11,7 @@ void xrServer::Process_update(NET_Packet& P, ClientID sender) #ifndef MASTER_GOLD if (g_Dump_Update_Read) Msg("---- UPDATE_Read --- "); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD R_ASSERT(CL->flags.bLocal); // while has information @@ -46,7 +46,7 @@ void xrServer::Process_update(NET_Packet& P, ClientID sender) } #ifndef MASTER_GOLD if (g_Dump_Update_Read) Msg("-------------------- "); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD } void xrServer::Process_save(NET_Packet& P, ClientID sender) diff --git a/src/xrGame/xrServer_secure_messaging.cpp b/src/xrGame/xrServer_secure_messaging.cpp index b95ef03a543..05a106bc202 100644 --- a/src/xrGame/xrServer_secure_messaging.cpp +++ b/src/xrGame/xrServer_secure_messaging.cpp @@ -18,7 +18,7 @@ void xrServer::PerformSecretKeysSyncAck(xrClientData* xrCL, NET_Packet& P) { VERIFY(xrCL); s32 new_seed; - P.r_s32(new_seed); // only for DEBUG + P.r_s32(new_seed); // only for DEBUG VERIFY2(new_seed == xrCL->m_last_key_sync_request_seed, "cracker detected !"); secure_messaging::generate_key(xrCL->m_last_key_sync_request_seed, xrCL->m_secret_key); } @@ -48,13 +48,13 @@ void xrServer::OnSecureMessage(NET_Packet& P, xrClientData* xrClSender) VERIFY(dbg_encrypt_checksum == dbg_decrypt_checksum); #endif NET_Packet dec_packet; - dec_packet.B.count = P.B.count - sizeof(u16) - sizeof(u32); // - r_begin - crypt_check_sum + dec_packet.B.count = P.B.count - sizeof(u16) - sizeof(u32); // - r_begin - crypt_check_sum P.r(dec_packet.B.data, dec_packet.B.count); u32 checksum = secure_messaging::decrypt(dec_packet.B.data, dec_packet.B.count, xrClSender->m_secret_key); u32 real_checksum = 0; P.r_u32(real_checksum); VERIFY2(checksum == real_checksum, "caught cheater"); - if (checksum != real_checksum) return; // WARNING!: do not add any log messages - security treat! + if (checksum != real_checksum) return; // WARNING!: do not add any log messages - security treat! OnMessage(dec_packet, xrClSender->ID); } \ No newline at end of file diff --git a/src/xrGame/xrServer_sls_clear.cpp b/src/xrGame/xrServer_sls_clear.cpp index 430676a182c..83ce4325ea6 100644 --- a/src/xrGame/xrServer_sls_clear.cpp +++ b/src/xrGame/xrServer_sls_clear.cpp @@ -73,7 +73,7 @@ void xrServer::SLS_Clear() Perform_destroy((*I).second, mode); break; } - if (!found) // R_ASSERT(found); + if (!found) // R_ASSERT(found); { I = entities.begin(); E = entities.end(); diff --git a/src/xrGame/xrServer_updates_compressor.h b/src/xrGame/xrServer_updates_compressor.h index f964f271e74..cf226701d98 100644 --- a/src/xrGame/xrServer_updates_compressor.h +++ b/src/xrGame/xrServer_updates_compressor.h @@ -28,7 +28,7 @@ class last_updates_cache : private Noncopyable last_updates_cache_t m_cache; -}; // class last_updates_cache +}; // class last_updates_cache class server_updates_compressor { @@ -75,6 +75,6 @@ class server_updates_compressor IWriter* dbg_update_bins_writer; void create_update_bin_writer(); -}; // class server_updates_compressor +}; // class server_updates_compressor -#endif //#ifndef XRSERVER_UPDATES_COMPRESSOR_INCLUDED \ No newline at end of file +#endif //#ifndef XRSERVER_UPDATES_COMPRESSOR_INCLUDED \ No newline at end of file diff --git a/src/xrGame/xr_Client_BattlEye.cpp b/src/xrGame/xr_Client_BattlEye.cpp index 54f1a0f8529..fa01a9c3049 100644 --- a/src/xrGame/xr_Client_BattlEye.cpp +++ b/src/xrGame/xr_Client_BattlEye.cpp @@ -69,7 +69,7 @@ void BattlEyeClient::PrintMessage(char* message) sprintf_s(text, sizeof(text), "BattlEye Client: %s", message); Msg("%s", text); - if (g_be_message_out) //==2 + if (g_be_message_out) //==2 { if (Level().game) { Level().game->CommonMessageOut(text); @@ -137,4 +137,4 @@ void BattlEyeClient::ReleaseDLL() m_succefull = false; } -#endif // BATTLEYE +#endif // BATTLEYE diff --git a/src/xrGame/xr_Client_BattlEye.h b/src/xrGame/xr_Client_BattlEye.h index e88a2c9fe12..7b0d0c8386c 100644 --- a/src/xrGame/xr_Client_BattlEye.h +++ b/src/xrGame/xr_Client_BattlEye.h @@ -42,8 +42,8 @@ class BattlEyeClient ~BattlEyeClient(); bool IsLoaded(); -}; // class BattlEyeClient +}; // class BattlEyeClient -#endif // BATTLEYE +#endif // BATTLEYE -#endif // __XR_CLIENT_BATTLEYE_H__ +#endif // __XR_CLIENT_BATTLEYE_H__ diff --git a/src/xrGame/xr_Server_BattlEye.cpp b/src/xrGame/xr_Server_BattlEye.cpp index 659464bd34d..9f64ea8204f 100644 --- a/src/xrGame/xr_Server_BattlEye.cpp +++ b/src/xrGame/xr_Server_BattlEye.cpp @@ -33,7 +33,7 @@ BattlEyeServer::BattlEyeServer(xrServer* Server) } m_pServer = Server; - m_module = LoadLibrary(Level().battleye_system.GetServerPath()); //= + m_module = LoadLibrary(Level().battleye_system.GetServerPath()); //= if (!m_module) { Msg("! Error LoadLibrary %s", BATTLEYE_SERVER_DLL); return; @@ -42,7 +42,7 @@ BattlEyeServer::BattlEyeServer(xrServer* Server) // GetModuleFileName( m_module, path_dll, sizeof(path_dll) ); // Level().battleye_system.SetServerPath( path_dll ); - Init = (InitSrv_t)(GetProcAddress(m_module, "Init")); //= + Init = (InitSrv_t)(GetProcAddress(m_module, "Init")); //= if (!Init) { Msg("! Error GetProcAddress from %s", BATTLEYE_SERVER_DLL); if (!FreeLibrary(m_module)) { @@ -75,7 +75,7 @@ BattlEyeServer::BattlEyeServer(xrServer* Server) } } -void BattlEyeServer::AddConnectedPlayers() // if net_Ready +void BattlEyeServer::AddConnectedPlayers() // if net_Ready { struct ready_adder { @@ -116,7 +116,7 @@ void BattlEyeServer::PrintMessage(char* message) sprintf_s(text, sizeof(text), "BattlEye Server: %s", message); Msg("%s", text); - if (g_be_message_out) //==2 + if (g_be_message_out) //==2 { if (Level().game) { Level().game->CommonMessageOut(text); @@ -147,7 +147,7 @@ void BattlEyeServer::KickPlayer(int player, char* reason) CStringTable().translate("ui_st_kicked_by_battleye").c_str(), " ", reason); Msg(reason2); - if (g_be_message_out) // self + if (g_be_message_out) // self { if (Level().game) { Level().game->CommonMessageOut(reason2 + 1); @@ -160,9 +160,9 @@ void BattlEyeServer::KickPlayer(int player, char* reason) P.w_begin(M_GAMEMESSAGE); P.w_u32(GAME_EVENT_SERVER_DIALOG_MESSAGE); P.w_stringZ(reason2); - Level().Server->SendBroadcast(tmp_client->ID, P); // to all, except self + Level().Server->SendBroadcast(tmp_client->ID, P); // to all, except self - Level().OnSessionTerminate(reason2); // to self + Level().OnSessionTerminate(reason2); // to self Engine.Event.Defer("KERNEL:disconnect"); return; } @@ -235,4 +235,4 @@ void BattlEyeServer::ReleaseDLL() pfnNewPacket = NULL; } -#endif // BATTLEYE +#endif // BATTLEYE diff --git a/src/xrGame/xr_Server_BattlEye.h b/src/xrGame/xr_Server_BattlEye.h index ce7fa7abc41..f8c8df9de47 100644 --- a/src/xrGame/xr_Server_BattlEye.h +++ b/src/xrGame/xr_Server_BattlEye.h @@ -55,8 +55,8 @@ class BattlEyeServer void AddConnectedPlayers(); void AddConnected_OnePlayer(xrClientData* CL); -}; // class BattlEyeServer +}; // class BattlEyeServer -#endif // BATTLEYE +#endif // BATTLEYE -#endif // __XR_SERVER_BATTLEYE_H__ +#endif // __XR_SERVER_BATTLEYE_H__ diff --git a/src/xrGame/xr_level_controller.cpp b/src/xrGame/xr_level_controller.cpp index 7dee044b232..9305cc6d851 100644 --- a/src/xrGame/xr_level_controller.cpp +++ b/src/xrGame/xr_level_controller.cpp @@ -24,7 +24,7 @@ _action actions[] = {{"left", kLEFT, _both}, {"right", kRIGHT, _both}, {"up", kU {"wpn_1", kWPN_1, _both}, {"wpn_2", kWPN_2, _both}, {"wpn_3", kWPN_3, _both}, {"wpn_4", kWPN_4, _both}, {"wpn_5", kWPN_5, _both}, {"wpn_6", kWPN_6, _both}, {"artefact", kARTEFACT, _both /*_mp*/}, - {"wpn_next", kWPN_NEXT, _both}, // means next ammo type + {"wpn_next", kWPN_NEXT, _both}, // means next ammo type {"wpn_fire", kWPN_FIRE, _both}, {"wpn_zoom", kWPN_ZOOM, _both}, {"wpn_zoom_inc", kWPN_ZOOM_INC, _both}, {"wpn_zoom_dec", kWPN_ZOOM_DEC, _both}, {"wpn_reload", kWPN_RELOAD, _both}, {"wpn_func", kWPN_FUNC, _both}, {"wpn_firemode_prev", kWPN_FIREMODE_PREV, _both}, {"wpn_firemode_next", kWPN_FIREMODE_NEXT, _both}, diff --git a/src/xrGameSpy/GameSpy_ATLAS.h b/src/xrGameSpy/GameSpy_ATLAS.h index 3eb16a0e25c..de3e98fae22 100644 --- a/src/xrGameSpy/GameSpy_ATLAS.h +++ b/src/xrGameSpy/GameSpy_ATLAS.h @@ -45,6 +45,6 @@ class XRGAMESPY_API CGameSpy_ATLAS SCInterfacePtr m_interface; void Init(); -}; // class CGameSpy_ATLAS +}; // class CGameSpy_ATLAS -#endif //#ifndef GAMESPY_ATLAS_INCLUDED +#endif //#ifndef GAMESPY_ATLAS_INCLUDED diff --git a/src/xrGameSpy/GameSpy_Browser.cpp b/src/xrGameSpy/GameSpy_Browser.cpp index 85312dceb13..10da058a155 100644 --- a/src/xrGameSpy/GameSpy_Browser.cpp +++ b/src/xrGameSpy/GameSpy_Browser.cpp @@ -16,7 +16,7 @@ void __cdecl SBCallback(ServerBrowser sb, SBCallbackReason reason, SBServer serv if (!pGSBrowser) return; switch (reason) { - case sbc_serveradded: // a server was added to the list, may just have an IP & port at this point + case sbc_serveradded: // a server was added to the list, may just have an IP & port at this point { #ifdef _DEBUG //. Msg("sbc_serveradded"); @@ -25,28 +25,28 @@ void __cdecl SBCallback(ServerBrowser sb, SBCallbackReason reason, SBServer serv // pGSBrowser->UpdateServerList(); } break; - case sbc_serverupdated: // server information has been updated - either basic or full information is now available - // about this server - { + case sbc_serverupdated: // server information has been updated - either basic or full information is now available + // about this server + { #ifdef _DEBUG //. Msg("sbc_serverupdated"); #endif - // pGSBrowser->SortBrowserByPing(); - pGSBrowser->UpdateServerList(); - } - break; - case sbc_serverupdatefailed: // an attempt to retrieve information about this server, either directly or from the - // master, failed - { + // pGSBrowser->SortBrowserByPing(); + pGSBrowser->UpdateServerList(); + } + break; + case sbc_serverupdatefailed: // an attempt to retrieve information about this server, either directly or from the + // master, failed + { #ifdef _DEBUG //. Msg("sbc_serverupdatefailed"); #endif - // pGSBrowser->OnUpdateFailed(server); - // pGSBrowser->SortBrowserByPing(); - pGSBrowser->UpdateServerList(); - } - break; - case sbc_serverdeleted: // a server was removed from the list + // pGSBrowser->OnUpdateFailed(server); + // pGSBrowser->SortBrowserByPing(); + pGSBrowser->UpdateServerList(); + } + break; + case sbc_serverdeleted: // a server was removed from the list { #ifdef _DEBUG Msg("sbc_serverdeleted"); @@ -55,7 +55,7 @@ void __cdecl SBCallback(ServerBrowser sb, SBCallbackReason reason, SBServer serv pGSBrowser->UpdateServerList(); } break; - case sbc_updatecomplete: // the server query engine is now idle + case sbc_updatecomplete: // the server query engine is now idle { #ifdef _DEBUG //. Msg("sbc_updatecomplete"); @@ -64,7 +64,7 @@ void __cdecl SBCallback(ServerBrowser sb, SBCallbackReason reason, SBServer serv pGSBrowser->UpdateServerList(); } break; - case sbc_queryerror: // the master returned an error string for the provided query + case sbc_queryerror: // the master returned an error string for the provided query { #ifdef _DEBUG Msg("sbc_queryerror"); @@ -87,7 +87,7 @@ void __cdecl SBCallback(ServerBrowser sb, SBCallbackReason reason, SBServer serv CGameSpy_Browser::CGameSpy_Browser() #ifdef CONFIG_PROFILE_LOCKS : m_refresh_lock(MUTEX_PROFILE_ID(CGameSpy_Browser::m_refresh_lock)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { m_pQR2 = NULL; m_pGSBrowser = NULL; diff --git a/src/xrGameSpy/GameSpy_GCD_Server.cpp b/src/xrGameSpy/GameSpy_GCD_Server.cpp index 41aef323586..64116b5747c 100644 --- a/src/xrGameSpy/GameSpy_GCD_Server.cpp +++ b/src/xrGameSpy/GameSpy_GCD_Server.cpp @@ -10,7 +10,7 @@ bool CGameSpy_GCD_Server::Init() }; #ifndef MASTER_GOLD Msg("- xrGS::CDKey : Initialized"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return true; }; diff --git a/src/xrGameSpy/GameSpy_GP.cpp b/src/xrGameSpy/GameSpy_GP.cpp index 29db945d3de..30d78ccefbb 100644 --- a/src/xrGameSpy/GameSpy_GP.cpp +++ b/src/xrGameSpy/GameSpy_GP.cpp @@ -30,7 +30,7 @@ shared_str CGameSpy_GP::TryToTranslate(GPResult const& res) CGameSpy_GP::CGameSpy_GP() { - m_GPConnection = NULL; // GPConnection type is: void* + m_GPConnection = NULL; // GPConnection type is: void* Init(); } diff --git a/src/xrGameSpy/GameSpy_GP.h b/src/xrGameSpy/GameSpy_GP.h index dac934e1e1f..069e7c51e98 100644 --- a/src/xrGameSpy/GameSpy_GP.h +++ b/src/xrGameSpy/GameSpy_GP.h @@ -35,6 +35,6 @@ class XRGAMESPY_API CGameSpy_GP GPConnection m_GPConnection; // main callbacks static void __cdecl OnGameSpyErrorCb(GPConnection* connection, void* arg, void* param); -}; // CGameSpy_GP +}; // CGameSpy_GP -#endif //#ifndef GAMESPY_GP_H +#endif //#ifndef GAMESPY_GP_H diff --git a/src/xrGameSpy/GameSpy_HTTP.cpp b/src/xrGameSpy/GameSpy_HTTP.cpp index 7c7ec1cbd48..a38d882a7c4 100644 --- a/src/xrGameSpy/GameSpy_HTTP.cpp +++ b/src/xrGameSpy/GameSpy_HTTP.cpp @@ -28,25 +28,25 @@ void CGameSpy_HTTP::Think() } string128 GHTTPResultStr[] = { - "GHTTPSuccess", // 0: Successfully retrieved file. - "GHTTPOutOfMemory", // 1: A memory allocation failed. - "GHTTPBufferOverflow", // 2: The user-supplied buffer was too small to hold the file. - "GHTTPParseURLFailed", // 3: There was an error parsing the URL. - "GHTTPHostLookupFailed", // 4: Failed looking up the hostname. - "GHTTPSocketFailed", // 5: Failed to create/initialize/read/write a socket. - "GHTTPConnectFailed", // 6: Failed connecting to the http server. - "GHTTPBadResponse", // 7: Error understanding a response from the server. - "GHTTPRequestRejected", // 8: The request has been rejected by the server. - "GHTTPUnauthorized", // 9: Not authorized to get the file. - "GHTTPForbidden", // 10: The server has refused to send the file. - "GHTTPFileNotFound", // 11: Failed to find the file on the server. - "GHTTPServerError", // 12: The server has encountered an internal error. - "GHTTPFileWriteFailed", // 13: An error occured writing to the local file (for ghttpSaveFile[Ex]). - "GHTTPFileReadFailed", // 14: There was an error reading from a local file (for posting files from disk). - "GHTTPFileIncomplete", // 15: Download started but was interrupted. Only reported if file size is known. - "GHTTPFileToBig", // 16: The file is to big to be downloaded (size exceeds range of interal data types) - "GHTTPEncryptionError", // 17: Error with encryption engine. - "GHTTPRequestCancelled" // 18: User requested cancel and/or graceful close. + "GHTTPSuccess", // 0: Successfully retrieved file. + "GHTTPOutOfMemory", // 1: A memory allocation failed. + "GHTTPBufferOverflow", // 2: The user-supplied buffer was too small to hold the file. + "GHTTPParseURLFailed", // 3: There was an error parsing the URL. + "GHTTPHostLookupFailed", // 4: Failed looking up the hostname. + "GHTTPSocketFailed", // 5: Failed to create/initialize/read/write a socket. + "GHTTPConnectFailed", // 6: Failed connecting to the http server. + "GHTTPBadResponse", // 7: Error understanding a response from the server. + "GHTTPRequestRejected", // 8: The request has been rejected by the server. + "GHTTPUnauthorized", // 9: Not authorized to get the file. + "GHTTPForbidden", // 10: The server has refused to send the file. + "GHTTPFileNotFound", // 11: Failed to find the file on the server. + "GHTTPServerError", // 12: The server has encountered an internal error. + "GHTTPFileWriteFailed", // 13: An error occured writing to the local file (for ghttpSaveFile[Ex]). + "GHTTPFileReadFailed", // 14: There was an error reading from a local file (for posting files from disk). + "GHTTPFileIncomplete", // 15: Download started but was interrupted. Only reported if file size is known. + "GHTTPFileToBig", // 16: The file is to big to be downloaded (size exceeds range of interal data types) + "GHTTPEncryptionError", // 17: Error with encryption engine. + "GHTTPRequestCancelled" // 18: User requested cancel and/or graceful close. }; class DownloadContext diff --git a/src/xrGameSpy/GameSpy_QR2.cpp b/src/xrGameSpy/GameSpy_QR2.cpp index 10e97022de2..1b7b964c2c2 100644 --- a/src/xrGameSpy/GameSpy_QR2.cpp +++ b/src/xrGameSpy/GameSpy_QR2.cpp @@ -100,7 +100,7 @@ bool CGameSpy_QR2::Init(int PortID, int Public, Context& ctx) ctx.OnKeyList, ctx.OnCount, ctx.OnError, &ctx); #ifndef MASTER_GOLD Msg("xrGS::xrGS_qr2_initA returned code is [%d]", err); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD if (err != e_qrnoerror) { // _tprintf(_T("Error starting query sockets\n")); @@ -122,7 +122,7 @@ bool CGameSpy_QR2::Init(int PortID, int Public, Context& ctx) #ifndef MASTER_GOLD Msg("xrGS::QR2 : Initialized"); -#endif // #ifndef MASTER_GOLD +#endif // #ifndef MASTER_GOLD return true; }; diff --git a/src/xrGameSpy/GameSpy_SAKE.h b/src/xrGameSpy/GameSpy_SAKE.h index 70d0f43ab72..a3654bda401 100644 --- a/src/xrGameSpy/GameSpy_SAKE.h +++ b/src/xrGameSpy/GameSpy_SAKE.h @@ -6,7 +6,7 @@ namespace gamespy_sake { -} // namespace gamespy_sake +} // namespace gamespy_sake class XRGAMESPY_API CGameSpy_SAKE { @@ -27,6 +27,6 @@ class XRGAMESPY_API CGameSpy_SAKE SAKE m_sake_inst; void Init(); -}; // class GameSpy_SAKE +}; // class GameSpy_SAKE -#endif //#ifndef GAMESPY_SAKE +#endif //#ifndef GAMESPY_SAKE diff --git a/src/xrGameSpy/xrGameSpy.cpp b/src/xrGameSpy/xrGameSpy.cpp index c19187435cc..23c4e233847 100644 --- a/src/xrGameSpy/xrGameSpy.cpp +++ b/src/xrGameSpy/xrGameSpy.cpp @@ -18,24 +18,24 @@ const char* GetGameVersion() } // WORD: Bit masks for languages -#define SKU_HAS_E 0x0001 // English -#define SKU_HAS_F 0x0002 // French -#define SKU_HAS_I 0x0004 // Italian -#define SKU_HAS_G 0x0008 // German -#define SKU_HAS_S 0x0010 // Spanish -#define SKU_HAS_R 0x0020 // Russian -#define SKU_HAS_P 0x0040 // Polish -#define SKU_HAS_C 0x0080 // Czech -#define SKU_HAS_H 0x0100 // China +#define SKU_HAS_E 0x0001 // English +#define SKU_HAS_F 0x0002 // French +#define SKU_HAS_I 0x0004 // Italian +#define SKU_HAS_G 0x0008 // German +#define SKU_HAS_S 0x0010 // Spanish +#define SKU_HAS_R 0x0020 // Russian +#define SKU_HAS_P 0x0040 // Polish +#define SKU_HAS_C 0x0080 // Czech +#define SKU_HAS_H 0x0100 // China // BYTE: Bit masks for protection -#define SKU_PRT_NONE 0x10 // Without protection -#define SKU_PRT_SECU 0x20 // SecuROM -#define SKU_PRT_STAR 0x40 // StarForce -#define SKU_PRT_PACK 0x80 // Different DB packing algorithm +#define SKU_PRT_NONE 0x10 // Without protection +#define SKU_PRT_SECU 0x20 // SecuROM +#define SKU_PRT_STAR 0x40 // StarForce +#define SKU_PRT_PACK 0x80 // Different DB packing algorithm // and subprotection -#define SKU_SUB_KEYDISK 0x01 // Binding to key-disk -#define SKU_SUB_ONLINE 0x02 // Binding to hardware with online activation +#define SKU_SUB_KEYDISK 0x01 // Binding to key-disk +#define SKU_SUB_ONLINE 0x02 // Binding to hardware with online activation int GetGameDistribution() { diff --git a/src/xrGameSpy/xrGameSpy_MainDefs.h b/src/xrGameSpy/xrGameSpy_MainDefs.h index 7a82d0ea407..94720fff594 100644 --- a/src/xrGameSpy/xrGameSpy_MainDefs.h +++ b/src/xrGameSpy/xrGameSpy_MainDefs.h @@ -33,7 +33,7 @@ #define START_PORT_LAN GAMESPY_QR2_BASEPORT #define START_PORT_LAN_SV START_PORT_LAN + 1 #define START_PORT_LAN_CL START_PORT_LAN + 2 -#define END_PORT_LAN START_PORT_LAN + 250 // GameSpy only process 500 ports +#define END_PORT_LAN START_PORT_LAN + 250 // GameSpy only process 500 ports #define REGISTRY_BASE HKEY_LOCAL_MACHINE #define REGISTRY_VALUE_GSCDKEY "InstallCDKEY" diff --git a/src/xrNetServer/NET_AuthCheck.h b/src/xrNetServer/NET_AuthCheck.h index 65f7cb9b797..fb08a3cfc59 100644 --- a/src/xrNetServer/NET_AuthCheck.h +++ b/src/xrNetServer/NET_AuthCheck.h @@ -7,4 +7,4 @@ typedef xr_vector xr_auth_strings_t; void XRNETSERVER_API fill_auth_check_params(xr_auth_strings_t& ignore, xr_auth_strings_t& check); bool XRNETSERVER_API allow_to_include_path(xr_auth_strings_t const& ignore, LPCSTR path); -#endif //#ifndef NET_AUTH_CHECK_INCLUDED \ No newline at end of file +#endif //#ifndef NET_AUTH_CHECK_INCLUDED \ No newline at end of file diff --git a/src/xrNetServer/NET_Client.cpp b/src/xrNetServer/NET_Client.cpp index 988395e9229..8c3e9625e7a 100644 --- a/src/xrNetServer/NET_Client.cpp +++ b/src/xrNetServer/NET_Client.cpp @@ -98,7 +98,7 @@ void dump_URL(LPCSTR p, IDirectPlay8Address* A) INetQueue::INetQueue() #ifdef CONFIG_PROFILE_LOCKS : cs(MUTEX_PROFILE_ID(INetQueue)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { unused.reserve(128); for (int i = 0; i < 16; i++) @@ -237,7 +237,7 @@ class XRNETSERVER_API syncQueue //------- XRNETSERVER_API Flags32 psNET_Flags = {0}; -XRNETSERVER_API int psNET_ClientUpdate = 30; // FPS +XRNETSERVER_API int psNET_ClientUpdate = 30; // FPS XRNETSERVER_API int psNET_ClientPending = 2; XRNETSERVER_API char psNET_Name[32] = "Player"; XRNETSERVER_API BOOL psNET_direct_connect = FALSE; @@ -309,7 +309,7 @@ IPureClient::IPureClient(CTimer* timer) #ifdef CONFIG_PROFILE_LOCKS , net_csEnumeration(MUTEX_PROFILE_ID(IPureClient::net_csEnumeration)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { NET = NULL; net_Address_server = NULL; @@ -320,7 +320,7 @@ IPureClient::IPureClient(CTimer* timer) net_TimeDelta = 0; net_TimeDelta_Calculated = 0; - pClNetLog = NULL; // new INetLog("logs\\net_cl_log.log", timeServer()); + pClNetLog = NULL; // new INetLog("logs\\net_cl_log.log", timeServer()); } IPureClient::~IPureClient() @@ -490,15 +490,15 @@ BOOL IPureClient::Connect(LPCSTR options) while (res != S_OK) { R_CHK(net_Address_device->AddComponent(DPNA_KEY_PORT, &c_port, sizeof(c_port), DPNA_DATATYPE_DWORD)); - res = NET->Connect(&dpAppDesc, // pdnAppDesc - net_Address_server, // pHostAddr - net_Address_device, // pDeviceInfo - NULL, // pdnSecurity - NULL, // pdnCredentials - NULL, 0, // pvUserConnectData/Size - NULL, // pvAsyncContext - NULL, // pvAsyncHandle - DPNCONNECT_SYNC); // dwFlags + res = NET->Connect(&dpAppDesc, // pdnAppDesc + net_Address_server, // pHostAddr + net_Address_device, // pDeviceInfo + NULL, // pdnSecurity + NULL, // pdnCredentials + NULL, 0, // pvUserConnectData/Size + NULL, // pvAsyncContext + NULL, // pvAsyncHandle + DPNCONNECT_SYNC); // dwFlags if (res != S_OK) { // xr_string res = xrDebug::ErrorToString(HostSuccess); @@ -566,16 +566,16 @@ BOOL IPureClient::Connect(LPCSTR options) { R_CHK(net_Address_device->AddComponent(DPNA_KEY_PORT, &c_port, sizeof(c_port), DPNA_DATATYPE_DWORD)); - res = NET->EnumHosts(&dpAppDesc, // pApplicationDesc - for unknown reason - net_Address_server, // pdpaddrHost - net_Address_device, // pdpaddrDeviceInfo - EnumData, EnumSize, // pvUserEnumData, size - 10, // dwEnumCount - 1000, // dwRetryInterval - 1000, // dwTimeOut - NULL, // pvUserContext - NULL, // pAsyncHandle - DPNENUMHOSTS_SYNC // dwFlags + res = NET->EnumHosts(&dpAppDesc, // pApplicationDesc - for unknown reason + net_Address_server, // pdpaddrHost + net_Address_device, // pdpaddrDeviceInfo + EnumData, EnumSize, // pvUserEnumData, size + 10, // dwEnumCount + 1000, // dwRetryInterval + 1000, // dwTimeOut + NULL, // pvUserContext + NULL, // pAsyncHandle + DPNENUMHOSTS_SYNC // dwFlags ); if (res != S_OK) { // xr_string res = xrDebug::ErrorToString(HostSuccess); @@ -636,16 +636,16 @@ BOOL IPureClient::Connect(LPCSTR options) R_CHK(net_Hosts.front().pHostAddress->Duplicate(&pHostAddress)); // dump_URL ("! c2s ", pHostAddress); - res = NET->Connect(&dpAppDesc, // pdnAppDesc - pHostAddress, // pHostAddr - net_Address_device, // pDeviceInfo - NULL, // pdnSecurity - NULL, // pdnCredentials - NULL, 0, // pvUserConnectData/Size - NULL, // pvAsyncContext - NULL, // pvAsyncHandle - DPNCONNECT_SYNC); // dwFlags - // R_CHK(res); + res = NET->Connect(&dpAppDesc, // pdnAppDesc + pHostAddress, // pHostAddr + net_Address_device, // pDeviceInfo + NULL, // pdnSecurity + NULL, // pdnCredentials + NULL, 0, // pvUserConnectData/Size + NULL, // pvAsyncContext + NULL, // pvAsyncHandle + DPNCONNECT_SYNC); // dwFlags + // R_CHK(res); net_csEnumeration.Leave(); _RELEASE(pHostAddress); #ifdef DEBUG @@ -681,7 +681,7 @@ BOOL IPureClient::Connect(LPCSTR options) R_CHK (NET->SetSPCaps(&sp_guid,&sp_caps,0)); R_CHK (NET->GetSPCaps(&sp_guid,&sp_caps,0)); */ - } // psNET_direct_connect + } // psNET_direct_connect // Sync net_TimeDelta = 0; return TRUE; @@ -866,7 +866,7 @@ void IPureClient::OnMessage(void* data, u32 size) NET_Packet* P = net_Queue.Create(); P->construct(data, size); - P->timeReceive = timeServer_Async(); // TimerAsync (device_timer); + P->timeReceive = timeServer_Async(); // TimerAsync (device_timer); u16 m_type; P->r_begin(m_type); @@ -932,7 +932,7 @@ BOOL IPureClient::net_HasBandwidth() if (net_Disconnected) return FALSE; if (psNET_ClientUpdate != 0) dwInterval = 1000 / psNET_ClientUpdate; - if (psNET_Flags.test(NETFLAG_MINIMIZEUPDATES)) dwInterval = 1000; // approx 3 times per second + if (psNET_Flags.test(NETFLAG_MINIMIZEUPDATES)) dwInterval = 1000; // approx 3 times per second if (psNET_direct_connect) { if (0 != psNET_ClientUpdate && (dwTime - net_Time_LastUpdate) > dwInterval) { @@ -988,7 +988,7 @@ void IPureClient::Sync_Thread() { // Waiting for queue empty state if (net_Syncronised) - break; // Sleep(2000); + break; // Sleep(2000); else { DWORD dwPending = 0; diff --git a/src/xrNetServer/NET_Client.h b/src/xrNetServer/NET_Client.h index fe07b2ac694..8297919c85f 100644 --- a/src/xrNetServer/NET_Client.h +++ b/src/xrNetServer/NET_Client.h @@ -36,7 +36,7 @@ class XRNETSERVER_API IPureClient : private MultipacketReciever, private Multipa friend void sync_thread(void*); protected: - struct HOST_NODE // deprecated... + struct HOST_NODE // deprecated... { DPN_APPLICATION_DESC dpAppDesc; IDirectPlay8Address* pHostAddress; @@ -89,10 +89,10 @@ class XRNETSERVER_API IPureClient : private MultipacketReciever, private Multipa IC GameDescriptionData const& get_net_DescriptionData() const { return m_game_description; } LPCSTR net_SessionName() { return *(net_Hosts.front().dpSessionName); } // receive - IC void StartProcessQueue() { net_Queue.Lock(); }; // WARNING ! after Start mast be End !!! <- - IC virtual NET_Packet* net_msg_Retreive() { return net_Queue.Retreive(); }; // | - IC void net_msg_Release() { net_Queue.Release(); }; // | - IC void EndProcessQueue() { net_Queue.Unlock(); }; // <- + IC void StartProcessQueue() { net_Queue.Lock(); }; // WARNING ! after Start mast be End !!! <- + IC virtual NET_Packet* net_msg_Retreive() { return net_Queue.Retreive(); }; // | + IC void net_msg_Release() { net_Queue.Release(); }; // | + IC void EndProcessQueue() { net_Queue.Unlock(); }; // <- // send virtual void Send(NET_Packet& P, u32 dwFlags = DPNSEND_GUARANTEED, u32 dwTimeout = 0); virtual void Flush_Send_Buffer(); diff --git a/src/xrNetServer/NET_Common.cpp b/src/xrNetServer/NET_Common.cpp index ed1eb262f19..40d5821428d 100644 --- a/src/xrNetServer/NET_Common.cpp +++ b/src/xrNetServer/NET_Common.cpp @@ -136,7 +136,7 @@ void MultipacketSender::_FlushSendBuffer(u32 timeout, Buffer* buf) #if NET_LOG_PACKETS Msg("#send %smulti-packet %u flags= %08X", (buf->last_flags & DPNSEND_IMMEDIATELLY) ? "IMMEDIATE " : "", buf->buffer.B.count, buf->last_flags); -#endif // NET_LOG_PACKETS +#endif // NET_LOG_PACKETS if (strstr(Core.Params, "-dump_traffic")) { static bool first_time = true; @@ -158,7 +158,7 @@ void MultipacketSender::_FlushSendBuffer(u32 timeout, Buffer* buf) _SendTo_LL(packet_data, comp_sz + sizeof(MultipacketHeader), buf->last_flags, timeout); buf->buffer.B.count = 0; - } // if buffer not empty + } // if buffer not empty } //------------------------------------------------------------------------------ diff --git a/src/xrNetServer/NET_Common.h b/src/xrNetServer/NET_Common.h index e756f6793c2..13f3dce4a7d 100644 --- a/src/xrNetServer/NET_Common.h +++ b/src/xrNetServer/NET_Common.h @@ -75,4 +75,4 @@ class XRNETSERVER_API MultipacketReciever }; //============================================================================== -#endif // _INCDEF_NETCOMMON_H_ +#endif // _INCDEF_NETCOMMON_H_ diff --git a/src/xrNetServer/NET_Compressor.cpp b/src/xrNetServer/NET_Compressor.cpp index 44cea86ff95..a8cb2809e0c 100644 --- a/src/xrNetServer/NET_Compressor.cpp +++ b/src/xrNetServer/NET_Compressor.cpp @@ -13,25 +13,25 @@ #pragma warning(disable : 4995) #include #pragma warning(pop) -#endif // DEBUG +#endif // DEBUG #if NET_USE_LZO_COMPRESSION #define ENCODE rtc9_compress #define DECODE rtc9_decompress -#else // NET_USE_LZO_COMPRESSION +#else // NET_USE_LZO_COMPRESSION #include "xrCore/ppmd_compressor.h" #define ENCODE ppmd_compress #define DECODE ppmd_decompress -#endif // NET_USE_LZO_COMPRESSION +#endif // NET_USE_LZO_COMPRESSION -#endif // NET_USE_COMPRESSION +#endif // NET_USE_COMPRESSION -#if 1 // def DEBUG +#if 1 // def DEBUG // static FILE* OriginalTrafficDump = NULL; // static FILE* CompressedTrafficDump = NULL; static FILE* RawTrafficDump = NULL; static FILE* CompressionDump = NULL; -#endif // DEBUG +#endif // DEBUG #define NOWARN @@ -253,13 +253,13 @@ void NET_Compressor::done_decoding ( ) NET_Compressor::NET_Compressor() #ifdef CONFIG_PROFILE_LOCKS : CS(MUTEX_PROFILE_ID(NET_Compressor)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { } NET_Compressor::~NET_Compressor() { -#if 1 // def DEBUG +#if 1 // def DEBUG // if( strstr(Core.Params,"-dump_traffic") ) // { // fclose( OriginalTrafficDump ); @@ -273,7 +273,7 @@ NET_Compressor::~NET_Compressor() fclose(RawTrafficDump); RawTrafficDump = NULL; } -#endif // DEBUG +#endif // DEBUG } /* @@ -298,9 +298,9 @@ u16 NET_Compressor::compressed_size(const u32& count) #if NET_USE_LZO_COMPRESSION u32 result = rtc_csize(count) + 1; -#else // NET_USE_LZO_COMPRESSION +#else // NET_USE_LZO_COMPRESSION u32 result = 64 + (count / 8 + 1) * 10; -#endif // NET_USE_LZO_COMPRESSION +#endif // NET_USE_LZO_COMPRESSION R_ASSERT(result <= u32(u16(-1))); @@ -310,7 +310,7 @@ u16 NET_Compressor::compressed_size(const u32& count) return ((u16)count); -#endif // #if NET_USE_COMPRESSION +#endif // #if NET_USE_COMPRESSION } XRNETSERVER_API BOOL g_net_compressor_enabled = FALSE; @@ -330,19 +330,19 @@ u16 NET_Compressor::Compress(BYTE* dest, const u32& dest_size, BYTE* src, const VERIFY(src); VERIFY(count); -#if 1 // def DEBUG +#if 1 // def DEBUG if (strstr(Core.Params, "-dump_traffic")) { // fwrite( src,count,1,OriginalTrafficDump ); // fflush( OriginalTrafficDump ); } -#endif // DEBUG +#endif // DEBUG #if !NET_USE_COMPRESSION CopyMemory(dest, src, count); return (u16(count)); -#else // !NET_USE_COMPRESSION +#else // !NET_USE_COMPRESSION R_ASSERT(dest_size >= compressed_size(count)); @@ -351,7 +351,7 @@ u16 NET_Compressor::Compress(BYTE* dest, const u32& dest_size, BYTE* src, const #if NET_USE_COMPRESSION_CRC offset += sizeof(u32); -#endif // NET_USE_COMPRESSION_CRC +#endif // NET_USE_COMPRESSION_CRC if (!psNET_direct_connect && g_net_compressor_enabled && b_compress_packet) { CS.Enter(); @@ -368,7 +368,7 @@ u16 NET_Compressor::Compress(BYTE* dest, const u32& dest_size, BYTE* src, const #if NET_USE_COMPRESSION_CRC u32 crc = crc32(dest + offset, compressed_size); *((u32*)(dest + 1)) = crc; -#endif // NET_USE_COMPRESSION_CRC +#endif // NET_USE_COMPRESSION_CRC #if NET_LOG_COMPRESSION Msg("#compress %u->%u %02X (%08X)", count, compressed_size, *dest, *((u32*)(src + 1))); @@ -384,7 +384,7 @@ u16 NET_Compressor::Compress(BYTE* dest, const u32& dest_size, BYTE* src, const fprintf(CompressionDump, "%s compress %2.0f%% %u->%u\r\n", compressor_name, 100.0f * float(compressed_size) / float(count), count, compressed_size); -#endif // NET_DUMP_COMPRESSION +#endif // NET_DUMP_COMPRESSION } else { @@ -401,13 +401,13 @@ u16 NET_Compressor::Compress(BYTE* dest, const u32& dest_size, BYTE* src, const } if (g_net_compressor_gather_stats && b_compress_packet) _p->compressed_size += compressed_size; -#if 1 // def DEBUG +#if 1 // def DEBUG // if( strstr(Core.Params,"-dump_traffic")) // { // fwrite(dest,compressed_size,1,CompressedTrafficDump); // fflush(CompressedTrafficDump); // } -#endif // DEBUG +#endif // DEBUG #ifdef DEBUG /* @@ -421,11 +421,11 @@ u16 NET_Compressor::Compress(BYTE* dest, const u32& dest_size, BYTE* src, const */ // CS.Leave (); -#endif // DEBUG +#endif // DEBUG return (u16(compressed_size)); -#endif // if !NET_USE_COMPRESSION +#endif // if !NET_USE_COMPRESSION } u16 NET_Compressor::Decompress(BYTE* dest, const u32& dest_size, BYTE* src, const u32& count) @@ -466,7 +466,7 @@ u16 NET_Compressor::Decompress(BYTE* dest, const u32& dest_size, BYTE* src, cons #if NET_USE_COMPRESSION_CRC offset += sizeof(u32); -#endif // NET_USE_COMPRESSION_CRC +#endif // NET_USE_COMPRESSION_CRC #if NET_USE_COMPRESSION_CRC u32 crc = crc32(src + offset, count); @@ -474,7 +474,7 @@ u16 NET_Compressor::Decompress(BYTE* dest, const u32& dest_size, BYTE* src, cons if (crc != *((u32*)(src + 1))) Msg("!CRC mismatch"); R_ASSERT2(crc == *((u32*)(src + 1)), make_string("crc is different! (0x%08x != 0x%08x)", crc, *((u32*)(src + 1)))); -#endif // NET_USE_COMPRESSION_CRC +#endif // NET_USE_COMPRESSION_CRC CS.Enter(); u32 uncompressed_size = DECODE(dest, dest_size, src + offset, count - offset); @@ -482,7 +482,7 @@ u16 NET_Compressor::Decompress(BYTE* dest, const u32& dest_size, BYTE* src, cons return (u16(uncompressed_size)); -#endif // !NET_USE_COMPRESSION +#endif // !NET_USE_COMPRESSION } void NET_Compressor::DumpStats(bool brief) diff --git a/src/xrNetServer/NET_Compressor.h b/src/xrNetServer/NET_Compressor.h index 0c29698615d..0873a680f3d 100644 --- a/src/xrNetServer/NET_Compressor.h +++ b/src/xrNetServer/NET_Compressor.h @@ -31,9 +31,9 @@ class XRNETSERVER_API NET_Compressor ~NET_Compressor(); u16 compressed_size(const u32& count); - u16 Compress(BYTE* dest, const u32& dest_size, BYTE* src, const u32& count); // return size of compressed - u16 Decompress(BYTE* dest, const u32& dest_size, BYTE* src, const u32& count); // return size of compressed + u16 Compress(BYTE* dest, const u32& dest_size, BYTE* src, const u32& count); // return size of compressed + u16 Decompress(BYTE* dest, const u32& dest_size, BYTE* src, const u32& count); // return size of compressed void DumpStats(bool brief); }; -#endif // !defined(AFX_NET_COMPRESSOR_H__21E1ED1C_BF92_4BF0_94A8_18A27486EBFD__INCLUDED_) +#endif // !defined(AFX_NET_COMPRESSOR_H__21E1ED1C_BF92_4BF0_94A8_18A27486EBFD__INCLUDED_) diff --git a/src/xrNetServer/NET_Log.cpp b/src/xrNetServer/NET_Log.cpp index dfd19280d1a..f1575359f49 100644 --- a/src/xrNetServer/NET_Log.cpp +++ b/src/xrNetServer/NET_Log.cpp @@ -1,29 +1,29 @@ #include "net_log.h" #include "stdafx.h" //--------------------------------------------------------- -string64 PacketName[] = {"M_UPDATE", // DUAL: Update state - "M_SPAWN", // DUAL: Spawning, full state +string64 PacketName[] = {"M_UPDATE", // DUAL: Update state + "M_SPAWN", // DUAL: Spawning, full state "M_SV_CONFIG_NEW_CLIENT", "M_SV_CONFIG_GAME", "M_SV_CONFIG_FINISHED", - "M_MIGRATE_DEACTIVATE", // TO: Changing server, just deactivate - "M_MIGRATE_ACTIVATE", // TO: Changing server", full state + "M_MIGRATE_DEACTIVATE", // TO: Changing server, just deactivate + "M_MIGRATE_ACTIVATE", // TO: Changing server", full state - "M_CHAT", // DUAL: + "M_CHAT", // DUAL: - "M_EVENT", // Game Event - "M_CL_INPUT", // Client Input Data + "M_EVENT", // Game Event + "M_CL_INPUT", // Client Input Data //----------- for E3 ----------------------------- "M_CL_UPDATE", "M_UPDATE_OBJECTS", //------------------------------------------------- - "M_CLIENTREADY", // Client has finished to load level and are ready to play + "M_CLIENTREADY", // Client has finished to load level and are ready to play - "M_CHANGE_LEVEL", // changing level + "M_CHANGE_LEVEL", // changing level "M_LOAD_GAME", "M_RELOAD_GAME", "M_SAVE_GAME", "M_SAVE_PACKET", "M_SWITCH_DISTANCE", - "M_GAMEMESSAGE", // Game Message - "M_EVENT_PACK", // Pack of M_EVENT + "M_GAMEMESSAGE", // Game Message + "M_EVENT_PACK", // Pack of M_EVENT //----------------------------------------------------- "M_GAMESPY_CDKEY_VALIDATION_CHALLENGE", "M_GAMESPY_CDKEY_VALIDATION_CHALLENGE_RESPOND", "M_CLIENT_CONNECT_RESULT", @@ -48,13 +48,13 @@ string64 PacketName[] = {"M_UPDATE", // DUAL: Update state INetLog::INetLog(LPCSTR sFileName, u32 dwStartTime) #ifdef CONFIG_PROFILE_LOCKS : m_cs(MUTEX_PROFILE_ID(NET_Log)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { xr_strcpy(m_cFileName, sFileName); m_pLogFile = NULL; m_pLogFile = fopen(sFileName, "wb"); - m_dwStartTime = 0; // dwStartTime; + m_dwStartTime = 0; // dwStartTime; } INetLog::~INetLog() diff --git a/src/xrNetServer/NET_Messages.h b/src/xrNetServer/NET_Messages.h index 2296f796c1d..2cfc4bdc222 100644 --- a/src/xrNetServer/NET_Messages.h +++ b/src/xrNetServer/NET_Messages.h @@ -11,14 +11,14 @@ IC u32 net_flags( } struct MSYS_CONFIG { - u32 sign1; // 0x12071980; - u32 sign2; // 0x26111975; + u32 sign1; // 0x12071980; + u32 sign2; // 0x26111975; }; struct MSYS_PING { - u32 sign1; // 0x12071980; - u32 sign2; // 0x26111975; + u32 sign1; // 0x12071980; + u32 sign2; // 0x26111975; u32 dwTime_ClientSend; u32 dwTime_Server; u32 dwTime_ClientReceive; diff --git a/src/xrNetServer/NET_PlayersMonitor.h b/src/xrNetServer/NET_PlayersMonitor.h index 0609bb09f47..b5b5d2363ef 100644 --- a/src/xrNetServer/NET_PlayersMonitor.h +++ b/src/xrNetServer/NET_PlayersMonitor.h @@ -254,6 +254,6 @@ class PlayersMonitor csPlayers.Leave(); return ret_client; }*/ -}; // class PlayersMonitor +}; // class PlayersMonitor -#endif //#ifndef NET_PLAYERS_MONITOR \ No newline at end of file +#endif //#ifndef NET_PLAYERS_MONITOR \ No newline at end of file diff --git a/src/xrNetServer/NET_Server.cpp b/src/xrNetServer/NET_Server.cpp index b256a5eec9f..f2626cf436c 100644 --- a/src/xrNetServer/NET_Server.cpp +++ b/src/xrNetServer/NET_Server.cpp @@ -22,7 +22,7 @@ void dump_URL(LPCSTR p, IDirectPlay8Address* A); LPCSTR nameTraffic = "traffic.net"; -XRNETSERVER_API int psNET_ServerUpdate = 30; // FPS +XRNETSERVER_API int psNET_ServerUpdate = 30; // FPS XRNETSERVER_API int psNET_ServerPending = 3; XRNETSERVER_API ClientID BroadcastCID(0xffffffff); @@ -188,7 +188,7 @@ IPureServer::IPureServer(CTimer* timer, BOOL Dedicated) #ifdef CONFIG_PROFILE_LOCKS , csPlayers(MUTEX_PROFILE_ID(IPureServer::csPlayers)), csMessage(MUTEX_PROFILE_ID(IPureServer::csMessage)) -#endif // CONFIG_PROFILE_LOCKS +#endif // CONFIG_PROFILE_LOCKS { device_timer = timer; stats.clear(); @@ -196,7 +196,7 @@ IPureServer::IPureServer(CTimer* timer, BOOL Dedicated) SV_Client = NULL; NET = NULL; net_Address_device = NULL; - pSvNetLog = NULL; // new INetLog("logs\\net_sv_log.log", TimeGlobal(device_timer)); + pSvNetLog = NULL; // new INetLog("logs\\net_sv_log.log", TimeGlobal(device_timer)); #ifdef DEBUG sender_functor_invoked = false; #endif @@ -253,7 +253,7 @@ IPureServer::EConnect IPureServer::Connect(LPCSTR options, GameDescriptionData& if (dwMaxPlayers > 32 || dwMaxPlayers < 1) dwMaxPlayers = 32; #ifdef DEBUG Msg("MaxPlayers = %d", dwMaxPlayers); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG //------------------------------------------------------------------- BOOL bPortWasSet = FALSE; @@ -267,7 +267,7 @@ IPureServer::EConnect IPureServer::Connect(LPCSTR options, GameDescriptionData& strncpy_s(tmpStr, ServerPort, 63); dwServerPort = atol(tmpStr); clamp(dwServerPort, u32(START_PORT), u32(END_PORT)); - bPortWasSet = TRUE; // this is not casual game + bPortWasSet = TRUE; // this is not casual game } //------------------------------------------------------------------- @@ -275,7 +275,7 @@ IPureServer::EConnect IPureServer::Connect(LPCSTR options, GameDescriptionData& //--------------------------- #ifdef DEBUG string1024 tmp; -#endif // DEBUG +#endif // DEBUG // HRESULT CoInitializeExRes = CoInitializeEx(NULL, 0); // if (CoInitializeExRes != S_OK && CoInitializeExRes != S_FALSE) // { @@ -360,11 +360,11 @@ IPureServer::EConnect IPureServer::Connect(LPCSTR options, GameDescriptionData& CHK_DX( net_Address_device->AddComponent(DPNA_KEY_PORT, &psNET_Port, sizeof(psNET_Port), DPNA_DATATYPE_DWORD)); - HostSuccess = NET->Host(&dpAppDesc, // AppDesc - &net_Address_device, 1, // Device Address - NULL, NULL, // Reserved - NULL, // Player Context - 0); // dwFlags + HostSuccess = NET->Host(&dpAppDesc, // AppDesc + &net_Address_device, 1, // Device Address + NULL, NULL, // Reserved + NULL, // Player Context + 0); // dwFlags if (HostSuccess != S_OK) { // xr_string res = xrDebug::ErrorToString(HostSuccess); if (bPortWasSet) { @@ -389,7 +389,7 @@ IPureServer::EConnect IPureServer::Connect(LPCSTR options, GameDescriptionData& CHK_DX(HostSuccess); - } // psNET_direct_connect + } // psNET_direct_connect //. config_Load (); @@ -447,8 +447,8 @@ HRESULT IPureServer::net_Handler(u32 dwMessageType, PVOID pMessage) Pinfo->dwSize = sizeof(DPN_PLAYER_INFO); HRESULT _hr = NET->GetClientInfo(msg->dpnidPlayer, Pinfo, &bufferSize, 0); if (_hr == DPNERR_INVALIDPLAYER) { - Assign_ServerType(res); // once - break; // server player + Assign_ServerType(res); // once + break; // server player } CHK_DX(_hr); @@ -630,7 +630,7 @@ void IPureServer::SendBroadcast(ClientID exclude, NET_Packet& P, u32 dwFlags) SendBroadcast_LL(exclude, P.B.data, P.B.count, dwFlags); } -u32 IPureServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned +u32 IPureServer::OnMessage(NET_Packet& P, ClientID sender) // Non-Zero means broadcasting with "flags" as returned { /* u16 m_type; @@ -672,7 +672,7 @@ BOOL IPureServer::HasBandwidth(IClient* C) } if (psNET_ServerUpdate != 0) dwInterval = 1000 / psNET_ServerUpdate; - if (psNET_Flags.test(NETFLAG_MINIMIZEUPDATES)) dwInterval = 1000; // approx 2 times per second + if (psNET_Flags.test(NETFLAG_MINIMIZEUPDATES)) dwInterval = 1000; // approx 2 times per second HRESULT hr; if (psNET_ServerUpdate != 0 && (dwTime - C->dwTime_LastUpdate) > dwInterval) { diff --git a/src/xrNetServer/NET_Server.h b/src/xrNetServer/NET_Server.h index abc838f8960..d9d0d91b928 100644 --- a/src/xrNetServer/NET_Server.h +++ b/src/xrNetServer/NET_Server.h @@ -68,7 +68,7 @@ class XRNETSERVER_API IClient : public MultipacketSender shared_str name; shared_str pass; - Flags flags; // local/host/normal + Flags flags; // local/host/normal u32 dwTime_LastUpdate; ip_address m_cAddress; @@ -217,13 +217,13 @@ class XRNETSERVER_API IPureServer : private MultipacketReciever void UpdateClientStatistic(IClient* C); // extended functionality - virtual u32 OnMessage(NET_Packet& P, ClientID sender); // Non-Zero means broadcasting with "flags" as returned + virtual u32 OnMessage(NET_Packet& P, ClientID sender); // Non-Zero means broadcasting with "flags" as returned virtual void OnCL_Connected(IClient* C); virtual void OnCL_Disconnected(IClient* C); virtual bool OnCL_QueryHost() { return true; }; - virtual IClient* client_Create() = 0; // create client info - virtual void client_Replicate() = 0; // replicate current state to client - virtual void client_Destroy(IClient* C) = 0; // destroy client info + virtual IClient* client_Create() = 0; // create client info + virtual void client_Replicate() = 0; // replicate current state to client + virtual void client_Destroy(IClient* C) = 0; // destroy client info // IC u32 client_Count () { return net_Players.size(); } // IC IClient* client_Get (u32 num) { return net_Players[num]; } @@ -265,15 +265,16 @@ class XRNETSERVER_API IPureServer : private MultipacketReciever csMessage.Enter(); #ifdef DEBUG sender_functor_invoked = true; -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG net_players.ForEachClientDo(action); #ifdef DEBUG sender_functor_invoked = false; -#endif //#ifdef DEBUG +#endif //#ifdef DEBUG csMessage.Leave(); } // template -// void ForEachDisconnectedClientDo(ActionFunctor & action) { net_players.ForEachDisconnectedClientDo(action); +// void ForEachDisconnectedClientDo(ActionFunctor & action) { +// net_players.ForEachDisconnectedClientDo(action); // }; #ifdef DEBUG bool IsPlayersMonitorLockedByMe() const diff --git a/src/xrNetServer/ip_filter.cpp b/src/xrNetServer/ip_filter.cpp index 1aa90f177d4..09fba0d93b4 100644 --- a/src/xrNetServer/ip_filter.cpp +++ b/src/xrNetServer/ip_filter.cpp @@ -90,7 +90,7 @@ bool ip_filter::is_ip_present(u32 ip_address) void ip_filter::unload() { - for (subnets_coll_t::iterator i = m_all_subnets.begin(), // delete_data(m_all_subnets); + for (subnets_coll_t::iterator i = m_all_subnets.begin(), // delete_data(m_all_subnets); ie = m_all_subnets.end(); i != ie; ++i) { diff --git a/src/xrNetServer/ip_filter.h b/src/xrNetServer/ip_filter.h index cc968f89431..94ede0beb26 100644 --- a/src/xrNetServer/ip_filter.h +++ b/src/xrNetServer/ip_filter.h @@ -13,7 +13,7 @@ struct subnet_item u8 a4; }; u32 data; - } subnet_ip; // IN NBO !!! + } subnet_ip; // IN NBO !!! u32 subnet_mask; subnet_item() { @@ -36,4 +36,4 @@ class ip_filter bool is_ip_present(u32 ip_address); }; -#endif //#ifndef NET_SERVER_IP_FILTER \ No newline at end of file +#endif //#ifndef NET_SERVER_IP_FILTER \ No newline at end of file diff --git a/src/xrNetServer/stdafx.h b/src/xrNetServer/stdafx.h index 3920429ce4f..a58040d615a 100644 --- a/src/xrNetServer/stdafx.h +++ b/src/xrNetServer/stdafx.h @@ -18,4 +18,4 @@ #include "NET_Shared.h" -#endif // stdafxH +#endif // stdafxH diff --git a/src/xrParticles/particle_actions.h b/src/xrParticles/particle_actions.h index f0f7ea38e1a..a631e3e8354 100644 --- a/src/xrParticles/particle_actions.h +++ b/src/xrParticles/particle_actions.h @@ -13,7 +13,7 @@ struct PARTICLES_API ParticleAction ALLOW_ROTATE = (1 << 1) }; Flags32 m_Flags; - PActionEnum type; // Type field + PActionEnum type; // Type field ParticleAction() { m_Flags.zero(); } virtual void Execute(ParticleEffect* pe, const float dt, float& m_max) = 0; virtual void Transform(const Fmatrix& m) = 0; diff --git a/src/xrParticles/particle_actions_collection.cpp b/src/xrParticles/particle_actions_collection.cpp index d120d9cf62c..6bfc40e2860 100644 --- a/src/xrParticles/particle_actions_collection.cpp +++ b/src/xrParticles/particle_actions_collection.cpp @@ -322,7 +322,7 @@ void PAPI::PAAvoid::Execute(ParticleEffect* effect, const float dt, float& tm_ma float v = L * Vn; float disc = rSqr - (L * L) + v * v; - if (disc < 0) continue; // I'm not heading toward it. + if (disc < 0) continue; // I'm not heading toward it. // Compute length for second rejection test. float t = v - _sqrt(disc); @@ -419,8 +419,8 @@ void PABounce::Execute(ParticleEffect* effect, const float dt, float& tm_max) // A hit! A most palpable hit! // Compute tangential and normal components of velocity - pVector vn(position.p2 * nv); // Normal Vn = (V.N)N - pVector vt(m.vel - vn); // Tangent Vt = V - Vn + pVector vn(position.p2 * nv); // Normal Vn = (V.N)N + pVector vt(m.vel - vn); // Tangent Vt = V - Vn // Compute new velocity heading out: // Don't apply friction if tangential velocity < cutoff @@ -481,8 +481,8 @@ void PABounce::Execute(ParticleEffect* effect, const float dt, float& tm_max) // A hit! A most palpable hit! // Compute tangential and normal components of velocity - pVector vn(position.p2 * nv); // Normal Vn = (V.N)N - pVector vt(m.vel - vn); // Tangent Vt = V - Vn + pVector vn(position.p2 * nv); // Normal Vn = (V.N)N + pVector vt(m.vel - vn); // Tangent Vt = V - Vn // Compute new velocity heading out: // Don't apply friction if tangential velocity < cutoff @@ -515,8 +515,8 @@ void PABounce::Execute(ParticleEffect* effect, const float dt, float& tm_max) // Compute tangential and normal components of velocity float nmag = m.vel * position.p2; - pVector vn(position.p2 * nmag); // Normal Vn = (V.N)N - pVector vt(m.vel - vn); // Tangent Vt = V - Vn + pVector vn(position.p2 * nmag); // Normal Vn = (V.N)N + pVector vt(m.vel - vn); // Tangent Vt = V - Vn // Compute new velocity heading out: // Don't apply friction if tangential velocity < cutoff @@ -590,8 +590,8 @@ void PABounce::Execute(ParticleEffect* effect, const float dt, float& tm_max) // Compute tangential and normal components of velocity float nmag = m.vel * position.p2; - pVector vn(position.p2 * nmag); // Normal Vn = (V.N)N - pVector vt(m.vel - vn); // Tangent Vt = V - Vn + pVector vn(position.p2 * nmag); // Normal Vn = (V.N)N + pVector vt(m.vel - vn); // Tangent Vt = V - Vn // Compute new velocity heading out: // Don't apply friction if tangential velocity < cutoff @@ -627,8 +627,8 @@ void PABounce::Execute(ParticleEffect* effect, const float dt, float& tm_max) // Compute tangential and normal components of velocity float nmag = m.vel * n; - pVector vn(n * nmag); // Normal Vn = (V.N)N - pVector vt = m.vel - vn; // Tangent Vt = V - Vn + pVector vn(n * nmag); // Normal Vn = (V.N)N + pVector vt = m.vel - vn; // Tangent Vt = V - Vn if (pinside) { // Previous position was inside. If normal component of @@ -759,7 +759,7 @@ void PAFollow::Execute(ParticleEffect* effect, const float dt, float& tm_max) Particle& m = effect->particles[i]; // Accelerate toward the particle after me in the list. - pVector tohim(effect->particles[i + 1].pos - m.pos); // tohim = p1 - p0 + pVector tohim(effect->particles[i + 1].pos - m.pos); // tohim = p1 - p0 float tohimlenSqr = tohim.length2(); if (tohimlenSqr < max_radiusSqr) { @@ -775,7 +775,7 @@ void PAFollow::Execute(ParticleEffect* effect, const float dt, float& tm_max) Particle& m = effect->particles[i]; // Accelerate toward the particle after me in the list. - pVector tohim(effect->particles[i + 1].pos - m.pos); // tohim = p1 - p0 + pVector tohim(effect->particles[i + 1].pos - m.pos); // tohim = p1 - p0 float tohimlenSqr = tohim.length2(); // Compute force exerted between the two bodies @@ -805,7 +805,7 @@ void PAGravitate::Execute(ParticleEffect* effect, const float dt, float& tm_max) { Particle& mj = effect->particles[j]; - pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 + pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 float tohimlenSqr = tohim.length2() + EPS_S; if (tohimlenSqr < max_radiusSqr) { @@ -829,7 +829,7 @@ void PAGravitate::Execute(ParticleEffect* effect, const float dt, float& tm_max) { Particle& mj = effect->particles[j]; - pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 + pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 float tohimlenSqr = tohim.length2() + EPS_S; // Compute force exerted between the two bodies @@ -1009,7 +1009,7 @@ void PAMatchVelocity::Execute(ParticleEffect* effect, const float dt, float& tm_ { Particle& mj = effect->particles[j]; - pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 + pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 float tohimlenSqr = tohim.length2(); if (tohimlenSqr < max_radiusSqr) { @@ -1033,7 +1033,7 @@ void PAMatchVelocity::Execute(ParticleEffect* effect, const float dt, float& tm_ { Particle& mj = effect->particles[j]; - pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 + pVector tohim(mj.pos - m.pos); // tohim = p1 - p0 float tohimlenSqr = tohim.length2(); // Compute force exerted between the two bodies @@ -1309,7 +1309,7 @@ void PARestore::Execute(ParticleEffect* effect, const float dt, float& tm_max) // XXX Optimize this. // Solve for a desired-behavior velocity function in each axis - float a, b, c; // Coefficients of velocity function needed + float a, b, c; // Coefficients of velocity function needed _pconstrain(m.pos.x, m.vel.x, m.posB.x, 0., timeLeft, &a, &b, &c); @@ -1567,11 +1567,11 @@ void PAVortex::Execute(ParticleEffect* effect, const float dt, float& tm_max) // Construct orthogonal vector3 frame in which to rotate // transformed point around origin - float axisProj = offnorm * axis; // offnorm . axis + float axisProj = offnorm * axis; // offnorm . axis // Components of offset perpendicular and parallel to axis - pVector w(axis * axisProj); // parallel component - pVector u(offnorm - w); // perpendicular component + pVector w(axis * axisProj); // parallel component + pVector u(offnorm - w); // perpendicular component // Perpendicular component completing frame: pVector v(axis ^ u); @@ -1607,11 +1607,11 @@ void PAVortex::Execute(ParticleEffect* effect, const float dt, float& tm_max) // Construct orthogonal vector3 frame in which to rotate // transformed point around origin - float axisProj = offnorm * axis; // offnorm . axis + float axisProj = offnorm * axis; // offnorm . axis // Components of offset perpendicular and parallel to axis - pVector w(axis * axisProj); // parallel component - pVector u(offnorm - w); // perpendicular component + pVector w(axis * axisProj); // parallel component + pVector u(offnorm - w); // perpendicular component // Perpendicular component completing frame: pVector v(axis ^ u); @@ -1651,11 +1651,11 @@ __forceinline __m128 _mm_load_fvector(const Fvector& v) { __m128 R1, R2; - R1 = _mm_load_ss((float*)&v.x); // R1 = 0 | 0 | 0 | v.x - R2 = _mm_load_ss((float*)&v.y); // R2 = 0 | 0 | 0 | v.y - R1 = _mm_unpacklo_ps(R1, R2); // R1 = 0 | 0 | v.y | v.x - R2 = _mm_load_ss((float*)&v.z); // R2 = 0 | 0 | 0 | v.z - R1 = _mm_movelh_ps(R1, R2); // R1 = 0 | v.z | v.y | v.x + R1 = _mm_load_ss((float*)&v.x); // R1 = 0 | 0 | 0 | v.x + R2 = _mm_load_ss((float*)&v.y); // R2 = 0 | 0 | 0 | v.y + R1 = _mm_unpacklo_ps(R1, R2); // R1 = 0 | 0 | v.y | v.x + R2 = _mm_load_ss((float*)&v.z); // R2 = 0 | 0 | 0 | v.z + R1 = _mm_movelh_ps(R1, R2); // R1 = 0 | v.z | v.y | v.x return R1; } @@ -1665,10 +1665,10 @@ __forceinline void _mm_store_fvector(Fvector& v, const __m128 R1) __m128 R2; _mm_store_ss((float*)&v.x, R1); - R2 = _mm_unpacklo_ps(R1, R1); // R2 = v.y | v.y | v.x | v.x - R2 = _mm_movehl_ps(R2, R2); // R2 = v.y | v.y | v.y | v.y + R2 = _mm_unpacklo_ps(R1, R1); // R2 = v.y | v.y | v.x | v.x + R2 = _mm_movehl_ps(R2, R2); // R2 = v.y | v.y | v.y | v.y _mm_store_ss((float*)&v.y, R2); - R2 = _mm_movehl_ps(R1, R1); // R2 = 0 | v.z | 0 | v.z + R2 = _mm_movehl_ps(R1, R1); // R2 = 0 | v.z | 0 | v.z _mm_store_ss((float*)&v.z, R2); } @@ -1692,7 +1692,7 @@ void PATurbulenceExecuteStream(LPVOID lpvParams) TAL_ID rtID = TAL_MakeID(1, Core.dwFrame, 0); TAL_AddRelationThis(TAL_RELATION_IS_CHILD_OF, rtID); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED pVector pV; pVector vX; @@ -1735,27 +1735,27 @@ void PATurbulenceExecuteStream(LPVOID lpvParams) _D = _mm_sub_ps(_D, _d); _D = _mm_mul_ps(_D, _magnitude); - __m128 _vmo = _mm_mul_ps(_mvel, _mvel); // _vmo = 00 | zz | yy | xx - __m128 _tmp = _mm_movehl_ps(_vmo, _vmo); // _tmp = 00 | zz | 00 | zz - _vmo = _mm_add_ss(_vmo, _tmp); // _vmo = 00 | zz | yy | xx + zz - _tmp = _mm_unpacklo_ps(_vmo, _vmo); // _tmp = yy | yy | xx + zz | xx + zz - _tmp = _mm_movehl_ps(_tmp, _tmp); // _tmp = yy | yy | yy | yy - _vmo = _mm_add_ss(_vmo, _tmp); // _vmo = 00 | zz | yy | xx + yy + zz - _vmo = _mm_sqrt_ss(_vmo); // _vmo = 00 | zz | yy | vmo + __m128 _vmo = _mm_mul_ps(_mvel, _mvel); // _vmo = 00 | zz | yy | xx + __m128 _tmp = _mm_movehl_ps(_vmo, _vmo); // _tmp = 00 | zz | 00 | zz + _vmo = _mm_add_ss(_vmo, _tmp); // _vmo = 00 | zz | yy | xx + zz + _tmp = _mm_unpacklo_ps(_vmo, _vmo); // _tmp = yy | yy | xx + zz | xx + zz + _tmp = _mm_movehl_ps(_tmp, _tmp); // _tmp = yy | yy | yy | yy + _vmo = _mm_add_ss(_vmo, _tmp); // _vmo = 00 | zz | yy | xx + yy + zz + _vmo = _mm_sqrt_ss(_vmo); // _vmo = 00 | zz | yy | vmo _mvel = _mm_add_ps(_mvel, _D); - __m128 _vmn = _mm_mul_ps(_mvel, _mvel); // _vmn = 00 | zz | yy | xx - _tmp = _mm_movehl_ps(_vmn, _vmn); // _tmp = 00 | zz | 00 | zz - _vmn = _mm_add_ss(_vmn, _tmp); // _vmn = 00 | zz | yy | xx + zz - _tmp = _mm_unpacklo_ps(_vmn, _vmn); // _tmp = yy | yy | xx + zz | xx + zz - _tmp = _mm_movehl_ps(_tmp, _tmp); // _tmp = yy | yy | yy | yy - _vmn = _mm_add_ss(_vmn, _tmp); // _vmn = 00 | zz | yy | xx + yy + zz - _vmn = _mm_sqrt_ss(_vmn); // _vmn = 00 | zz | yy | vmn + __m128 _vmn = _mm_mul_ps(_mvel, _mvel); // _vmn = 00 | zz | yy | xx + _tmp = _mm_movehl_ps(_vmn, _vmn); // _tmp = 00 | zz | 00 | zz + _vmn = _mm_add_ss(_vmn, _tmp); // _vmn = 00 | zz | yy | xx + zz + _tmp = _mm_unpacklo_ps(_vmn, _vmn); // _tmp = yy | yy | xx + zz | xx + zz + _tmp = _mm_movehl_ps(_tmp, _tmp); // _tmp = yy | yy | yy | yy + _vmn = _mm_add_ss(_vmn, _tmp); // _vmn = 00 | zz | yy | xx + yy + zz + _vmn = _mm_sqrt_ss(_vmn); // _vmn = 00 | zz | yy | vmn - _vmo = _mm_div_ss(_vmo, _vmn); // _vmo = 00 | zz | yy | scale + _vmo = _mm_div_ss(_vmo, _vmn); // _vmo = 00 | zz | yy | scale - _vmo = _mm_shuffle_ps(_vmo, _vmo, _MM_SHUFFLE(0, 0, 0, 0)); // _vmo = scale | scale | scale | scale + _vmo = _mm_shuffle_ps(_vmo, _vmo, _MM_SHUFFLE(0, 0, 0, 0)); // _vmo = scale | scale | scale | scale _mvel = _mm_mul_ps(_mvel, _vmo); _mm_store_fvector(m.vel, _mvel); @@ -1766,7 +1766,7 @@ void PATurbulence::Execute(ParticleEffect* effect, const float dt, float& tm_max { #ifdef _GPA_ENABLED TAL_SCOPED_TASK_NAMED("PATurbulence::Execute()"); -#endif // _GPA_ENABLED +#endif // _GPA_ENABLED if (noise_start) { noise_start = 0; diff --git a/src/xrParticles/particle_actions_collection.h b/src/xrParticles/particle_actions_collection.h index 77e6e853c9b..cbe6718524d 100644 --- a/src/xrParticles/particle_actions_collection.h +++ b/src/xrParticles/particle_actions_collection.h @@ -14,37 +14,37 @@ namespace PAPI struct PARTICLES_API PAAvoid : public ParticleAction { - pDomain positionL; // Avoid region (in local space) - pDomain position; // Avoid region - float look_ahead; // how many time units ahead to look - float magnitude; // what percent of the way to go each time - float epsilon; // add to r^2 for softening + pDomain positionL; // Avoid region (in local space) + pDomain position; // Avoid region + float look_ahead; // how many time units ahead to look + float magnitude; // what percent of the way to go each time + float epsilon; // add to r^2 for softening _METHODS; }; struct PARTICLES_API PABounce : public ParticleAction { - pDomain positionL; // Bounce region (in local space) - pDomain position; // Bounce region - float oneMinusFriction; // Friction tangent to surface - float resilience; // Resilence perpendicular to surface - float cutoffSqr; // cutoff velocity; friction applies iff v > cutoff + pDomain positionL; // Bounce region (in local space) + pDomain position; // Bounce region + float oneMinusFriction; // Friction tangent to surface + float resilience; // Resilence perpendicular to surface + float cutoffSqr; // cutoff velocity; friction applies iff v > cutoff _METHODS; }; struct PARTICLES_API PACopyVertexB : public ParticleAction { - BOOL copy_pos; // True to copy pos to posB. + BOOL copy_pos; // True to copy pos to posB. _METHODS; }; struct PARTICLES_API PADamping : public ParticleAction { - pVector damping; // Damping constant applied to velocity - float vlowSqr; // Low and high cutoff velocities + pVector damping; // Damping constant applied to velocity + float vlowSqr; // Low and high cutoff velocities float vhighSqr; _METHODS; @@ -52,69 +52,69 @@ struct PARTICLES_API PADamping : public ParticleAction struct PARTICLES_API PAExplosion : public ParticleAction { - pVector centerL; // The center of the explosion (in local space) - pVector center; // The center of the explosion - float velocity; // Of shock wave - float magnitude; // At unit radius - float stdev; // Sharpness or width of shock wave - float age; // How long it's been going on - float epsilon; // Softening parameter + pVector centerL; // The center of the explosion (in local space) + pVector center; // The center of the explosion + float velocity; // Of shock wave + float magnitude; // At unit radius + float stdev; // Sharpness or width of shock wave + float age; // How long it's been going on + float epsilon; // Softening parameter _METHODS; }; struct PARTICLES_API PAFollow : public ParticleAction { - float magnitude; // The grav of each particle - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + float magnitude; // The grav of each particle + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; struct PARTICLES_API PAGravitate : public ParticleAction { - float magnitude; // The grav of each particle - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + float magnitude; // The grav of each particle + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; struct PARTICLES_API PAGravity : public ParticleAction { - pVector directionL; // Amount to increment velocity (in local space) - pVector direction; // Amount to increment velocity + pVector directionL; // Amount to increment velocity (in local space) + pVector direction; // Amount to increment velocity _METHODS; }; struct PARTICLES_API PAJet : public ParticleAction { - pVector centerL; // Center of the fan (in local space) - pDomain accL; // Acceleration vector domain (in local space) - pVector center; // Center of the fan - pDomain acc; // Acceleration vector domain - float magnitude; // Scales acceleration - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + pVector centerL; // Center of the fan (in local space) + pDomain accL; // Acceleration vector domain (in local space) + pVector center; // Center of the fan + pDomain acc; // Acceleration vector domain + float magnitude; // Scales acceleration + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; struct PARTICLES_API PAKillOld : public ParticleAction { - float age_limit; // Exact age at which to kill particles. - BOOL kill_less_than; // True to kill particles less than limit. + float age_limit; // Exact age at which to kill particles. + BOOL kill_less_than; // True to kill particles less than limit. _METHODS; }; struct PARTICLES_API PAMatchVelocity : public ParticleAction { - float magnitude; // The grav of each particle - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + float magnitude; // The grav of each particle + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; @@ -126,90 +126,90 @@ struct PARTICLES_API PAMove : public ParticleAction struct PARTICLES_API PAOrbitLine : public ParticleAction { - pVector pL, axisL; // Endpoints of line to which particles are attracted (in local space) - pVector p, axis; // Endpoints of line to which particles are attracted - float magnitude; // Scales acceleration - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + pVector pL, axisL; // Endpoints of line to which particles are attracted (in local space) + pVector p, axis; // Endpoints of line to which particles are attracted + float magnitude; // Scales acceleration + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; struct PARTICLES_API PAOrbitPoint : public ParticleAction { - pVector centerL; // Point to which particles are attracted (in local space) - pVector center; // Point to which particles are attracted - float magnitude; // Scales acceleration - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + pVector centerL; // Point to which particles are attracted (in local space) + pVector center; // Point to which particles are attracted + float magnitude; // Scales acceleration + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; struct PARTICLES_API PARandomAccel : public ParticleAction { - pDomain gen_accL; // The domain of random accelerations.(in local space) - pDomain gen_acc; // The domain of random accelerations. + pDomain gen_accL; // The domain of random accelerations.(in local space) + pDomain gen_acc; // The domain of random accelerations. _METHODS; }; struct PARTICLES_API PARandomDisplace : public ParticleAction { - pDomain gen_dispL; // The domain of random displacements.(in local space) - pDomain gen_disp; // The domain of random displacements. + pDomain gen_dispL; // The domain of random displacements.(in local space) + pDomain gen_disp; // The domain of random displacements. _METHODS; }; struct PARTICLES_API PARandomVelocity : public ParticleAction { - pDomain gen_velL; // The domain of random velocities.(in local space) - pDomain gen_vel; // The domain of random velocities. + pDomain gen_velL; // The domain of random velocities.(in local space) + pDomain gen_vel; // The domain of random velocities. _METHODS; }; struct PARTICLES_API PARestore : public ParticleAction { - float time_left; // Time remaining until they should be in position. + float time_left; // Time remaining until they should be in position. _METHODS; }; struct PARTICLES_API PAScatter : public ParticleAction { - pVector centerL; // Center of the fan (in local space) - pVector center; // Center of the fan - float magnitude; // Scales acceleration - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + pVector centerL; // Center of the fan (in local space) + pVector center; // Center of the fan + float magnitude; // Scales acceleration + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; struct PARTICLES_API PASink : public ParticleAction { - BOOL kill_inside; // True to dispose of particles *inside* domain - pDomain positionL; // Disposal region (in local space) - pDomain position; // Disposal region + BOOL kill_inside; // True to dispose of particles *inside* domain + pDomain positionL; // Disposal region (in local space) + pDomain position; // Disposal region _METHODS; }; struct PARTICLES_API PASinkVelocity : public ParticleAction { - BOOL kill_inside; // True to dispose of particles with vel *inside* domain - pDomain velocityL; // Disposal region (in local space) - pDomain velocity; // Disposal region + BOOL kill_inside; // True to dispose of particles with vel *inside* domain + pDomain velocityL; // Disposal region (in local space) + pDomain velocity; // Disposal region _METHODS; }; struct PARTICLES_API PASpeedLimit : public ParticleAction { - float min_speed; // Clamp speed to this minimum. - float max_speed; // Clamp speed to this maximum. + float min_speed; // Clamp speed to this minimum. + float max_speed; // Clamp speed to this maximum. _METHODS; }; @@ -218,22 +218,22 @@ struct PARTICLES_API PASource : public ParticleAction { enum { - flSingleSize = (1ul << 29ul), // True to get positionB from position. + flSingleSize = (1ul << 29ul), // True to get positionB from position. flSilent = (1ul << 30ul), - flVertexB_tracks = (1ul << 31ul), // True to get positionB from position. + flVertexB_tracks = (1ul << 31ul), // True to get positionB from position. fl_FORCEDWORD = u32(-1) }; - pDomain positionL; // Choose a position in this domain. (local_space) - pDomain velocityL; // Choose a velocity in this domain. (local_space) - pDomain position; // Choose a position in this domain. - pDomain velocity; // Choose a velocity in this domain. - pDomain rot; // Choose a rotation in this domain. - pDomain size; // Choose a size in this domain. - pDomain color; // Choose a color in this domain. - float alpha; // Alpha of all generated particles - float particle_rate; // Particles to generate per unit time - float age; // Initial age of the particles - float age_sigma; // St. dev. of initial age of the particles + pDomain positionL; // Choose a position in this domain. (local_space) + pDomain velocityL; // Choose a velocity in this domain. (local_space) + pDomain position; // Choose a position in this domain. + pDomain velocity; // Choose a velocity in this domain. + pDomain rot; // Choose a rotation in this domain. + pDomain size; // Choose a size in this domain. + pDomain color; // Choose a color in this domain. + float alpha; // Alpha of all generated particles + float particle_rate; // Particles to generate per unit time + float age; // Initial age of the particles + float age_sigma; // St. dev. of initial age of the particles pVector parent_vel; float parent_motion; @@ -243,9 +243,9 @@ struct PARTICLES_API PASource : public ParticleAction struct PARTICLES_API PATargetColor : public ParticleAction { PATargetColor() : timeFrom(0.0f), timeTo(1.0f) {} - pVector color; // Color to shift towards - float alpha; // Alpha value to shift towards - float scale; // Amount to shift by (1 == all the way) + pVector color; // Color to shift towards + float alpha; // Alpha value to shift towards + float scale; // Amount to shift by (1 == all the way) float timeFrom; float timeTo; @@ -254,49 +254,49 @@ struct PARTICLES_API PATargetColor : public ParticleAction struct PARTICLES_API PATargetSize : public ParticleAction { - pVector size; // Size to shift towards - pVector scale; // Amount to shift by per frame (1 == all the way) + pVector size; // Size to shift towards + pVector scale; // Amount to shift by per frame (1 == all the way) _METHODS; }; struct PARTICLES_API PATargetRotate : public ParticleAction { - pVector rot; // Rotation to shift towards - float scale; // Amount to shift by per frame (1 == all the way) + pVector rot; // Rotation to shift towards + float scale; // Amount to shift by per frame (1 == all the way) _METHODS; }; struct PARTICLES_API PATargetVelocity : public ParticleAction { - pVector velocityL; // Velocity to shift towards (in local space) - pVector velocity; // Velocity to shift towards - float scale; // Amount to shift by (1 == all the way) + pVector velocityL; // Velocity to shift towards (in local space) + pVector velocity; // Velocity to shift towards + float scale; // Amount to shift by (1 == all the way) _METHODS; }; struct PARTICLES_API PAVortex : public ParticleAction { - pVector centerL; // Center of vortex (in local space) - pVector axisL; // Axis around which vortex is applied (in local space) - pVector center; // Center of vortex - pVector axis; // Axis around which vortex is applied - float magnitude; // Scale for rotation around axis - float epsilon; // Softening parameter - float max_radius; // Only influence particles within max_radius + pVector centerL; // Center of vortex (in local space) + pVector axisL; // Axis around which vortex is applied (in local space) + pVector center; // Center of vortex + pVector axis; // Axis around which vortex is applied + float magnitude; // Scale for rotation around axis + float epsilon; // Softening parameter + float max_radius; // Only influence particles within max_radius _METHODS; }; struct PARTICLES_API PATurbulence : public ParticleAction { - float frequency; // Frequency - int octaves; // Octaves - float magnitude; // Scale for rotation around axis - float epsilon; // Softening parameter - pVector offset; // Offset + float frequency; // Frequency + int octaves; // Octaves + float magnitude; // Scale for rotation around axis + float epsilon; // Softening parameter + pVector offset; // Offset float age; _METHODS; diff --git a/src/xrParticles/particle_core.cpp b/src/xrParticles/particle_core.cpp index 3d395a75cf7..1968fb4dbc5 100644 --- a/src/xrParticles/particle_core.cpp +++ b/src/xrParticles/particle_core.cpp @@ -94,8 +94,8 @@ pDomain::pDomain( radius2Sqr = v.length(); pVector tv = v / radius2Sqr; - p2 = tu ^ tv; // This is the non-unit normal. - p2.normalize_safe(); // Must normalize it. + p2 = tu ^ tv; // This is the non-unit normal. + p2.normalize_safe(); // Must normalize it. // radius1 stores the d of the plane eqn. radius1 = -(p1 * p2); @@ -113,8 +113,8 @@ pDomain::pDomain( radius2Sqr = v.length(); pVector tv = v / radius2Sqr; - p2 = tu ^ tv; // This is the non-unit normal. - p2.normalize_safe(); // Must normalize it. + p2 = tu ^ tv; // This is the non-unit normal. + p2.normalize_safe(); // Must normalize it. // radius1 stores the d of the plane eqn. radius1 = -(p1 * p2); @@ -124,7 +124,7 @@ pDomain::pDomain( { p1 = pVector(a0, a1, a2); p2 = pVector(a3, a4, a5); - p2.normalize_safe(); // Must normalize it. + p2.normalize_safe(); // Must normalize it. // radius1 stores the d of the plane eqn. radius1 = -(p1 * p2); @@ -168,7 +168,7 @@ pDomain::pDomain( // Given an arbitrary nonzero vector3 n, make two orthonormal // vectors u and v forming a frame [u,v,n.normalize()]. pVector n = p2; - float p2l2 = n.length2(); // Optimize this. + float p2l2 = n.length2(); // Optimize this. n.normalize_safe(); // radius2Sqr stores 1 / (p2.p2) @@ -197,8 +197,8 @@ pDomain::pDomain( break; case PDDisc: { - p1 = pVector(a0, a1, a2); // Center point - p2 = pVector(a3, a4, a5); // Normal (not used in Within and Generate) + p1 = pVector(a0, a1, a2); // Center point + p2 = pVector(a3, a4, a5); // Normal (not used in Within and Generate) p2.normalize_safe(); if (a6 > a7) { @@ -220,7 +220,7 @@ pDomain::pDomain( u = basis - p2 * (basis * p2); u.normalize_safe(); v = p2 ^ u; - radius1Sqr = -(p1 * p2); // D of the plane eqn. + radius1Sqr = -(p1 * p2); // D of the plane eqn. } break; } @@ -266,7 +266,7 @@ BOOL pDomain::Within(const pVector& pos) const if (dist < 0.0f || dist > 1.0f) return FALSE; // Check radial distance; scale radius along axis for cones - pVector xrad = x - p2 * dist; // Radial component of x + pVector xrad = x - p2 * dist; // Radial component of x float rSqr = xrad.length2(); if (type == PDCone) @@ -287,7 +287,7 @@ BOOL pDomain::Within(const pVector& pos) const case PDTriangle: case PDDisc: default: - return FALSE; // XXX Is there something better? + return FALSE; // XXX Is there something better? } } @@ -315,7 +315,7 @@ void pDomain::Generate(pVector& pos) const } break; case PDRectangle: pos = p1 + u * drand48() + v * drand48(); break; - case PDPlane: // How do I sensibly make a point on an infinite plane? + case PDPlane: // How do I sensibly make a point on an infinite plane? pos = p1; break; case PDSphere: @@ -334,12 +334,12 @@ void pDomain::Generate(pVector& pos) const case PDCone: { // For a cone, p2 is the apex of the cone. - float dist = drand48(); // Distance between base and tip - float theta = drand48() * 2.0f * float(M_PI); // Angle around axis + float dist = drand48(); // Distance between base and tip + float theta = drand48() * 2.0f * float(M_PI); // Angle around axis // Distance from axis float r = radius2 + drand48() * (radius1 - radius2); - float x = r * _cos(theta); // Weighting of each frame vector3 + float x = r * _cos(theta); // Weighting of each frame vector3 float y = r * _sin(theta); // Scale radius along axis for cones @@ -359,11 +359,11 @@ void pDomain::Generate(pVector& pos) const break; case PDDisc: { - float theta = drand48() * 2.0f * float(M_PI); // Angle around normal + float theta = drand48() * 2.0f * float(M_PI); // Angle around normal // Distance from center float r = radius2 + drand48() * (radius1 - radius2); - float x = r * _cos(theta); // Weighting of each frame vector3 + float x = r * _cos(theta); // Weighting of each frame vector3 float y = r * _sin(theta); pos = p1 + u * x + v * y; diff --git a/src/xrParticles/particle_core.h b/src/xrParticles/particle_core.h index 75c08935420..abef4a8ab6a 100644 --- a/src/xrParticles/particle_core.h +++ b/src/xrParticles/particle_core.h @@ -10,13 +10,13 @@ namespace PAPI #pragma pack(push, 4) struct PARTICLES_API pDomain { - PDomainEnum type; // PABoxDomain, PASphereDomain, PAConeDomain... - pVector p1, p2; // Box vertices, Sphere center, Cylinder/Cone ends - pVector u, v; // Orthonormal basis vectors for Cylinder/Cone - float radius1; // Outer radius - float radius2; // Inner radius - float radius1Sqr; // Used for fast Within test of spheres, - float radius2Sqr; // and for mag. of u and v vectors for plane. + PDomainEnum type; // PABoxDomain, PASphereDomain, PAConeDomain... + pVector p1, p2; // Box vertices, Sphere center, Cylinder/Cone ends + pVector u, v; // Orthonormal basis vectors for Cylinder/Cone + float radius1; // Outer radius + float radius2; // Inner radius + float radius1Sqr; // Used for fast Within test of spheres, + float radius2Sqr; // and for mag. of u and v vectors for plane. BOOL Within(const pVector&) const; void Generate(pVector&) const; diff --git a/src/xrParticles/particle_effect.h b/src/xrParticles/particle_effect.h index 9dd43abaded..39f03105a84 100644 --- a/src/xrParticles/particle_effect.h +++ b/src/xrParticles/particle_effect.h @@ -7,11 +7,11 @@ namespace PAPI // A effect of particles - Info and an array of Particles struct ParticleEffect { - u32 p_count; // Number of particles currently existing. - u32 max_particles; // Max particles allowed in effect. - u32 particles_allocated; // Actual allocated size. - Particle* particles; // Actually, num_particles in size - void* real_ptr; // Base, possible not aligned pointer + u32 p_count; // Number of particles currently existing. + u32 max_particles; // Max particles allowed in effect. + u32 particles_allocated; // Actual allocated size. + Particle* particles; // Actually, num_particles in size + void* real_ptr; // Base, possible not aligned pointer OnBirthParticleCB b_cb; OnDeadParticleCB d_cb; void* owner; @@ -74,8 +74,8 @@ struct ParticleEffect if (0 == p_count) return; Particle& m = particles[i]; if (d_cb) d_cb(owner, param, m, i); - m = particles[--p_count]; // не менять правило удаления !!! (dependence ParticleGroup) - // Msg( "pDel() : %u" , p_count ); + m = particles[--p_count]; // не менять правило удаления !!! (dependence ParticleGroup) + // Msg( "pDel() : %u" , p_count ); } IC BOOL Add(const pVector& pos, const pVector& posB, const pVector& size, const pVector& rot, const pVector& vel, diff --git a/src/xrParticles/particle_manager.cpp b/src/xrParticles/particle_manager.cpp index 01a3b8d379b..326d1468c0e 100644 --- a/src/xrParticles/particle_manager.cpp +++ b/src/xrParticles/particle_manager.cpp @@ -94,7 +94,7 @@ void CParticleManager::PlayEffect(int effect_id, int alist_id) // Execute the specified action list. ParticleActions* pa = GetActionListPtr(alist_id); VERIFY(pa); - if (pa == NULL) return; // ERROR + if (pa == NULL) return; // ERROR pa->lock(); // Step through all the actions in the action list. for (PAVecIt it = pa->begin(); it != pa->end(); ++it) @@ -115,7 +115,7 @@ void CParticleManager::StopEffect(int effect_id, int alist_id, BOOL deffered) // Execute the specified action list. ParticleActions* pa = GetActionListPtr(alist_id); VERIFY(pa); - if (pa == NULL) return; // ERROR + if (pa == NULL) return; // ERROR pa->lock(); // Step through all the actions in the action list. @@ -164,7 +164,7 @@ void CParticleManager::Transform(int alist_id, const Fmatrix& full, const Fvecto ParticleActions* pa = GetActionListPtr(alist_id); VERIFY(pa); - if (pa == NULL) return; // ERROR + if (pa == NULL) return; // ERROR pa->lock(); Fmatrix mT; diff --git a/src/xrParticles/psystem.h b/src/xrParticles/psystem.h index 9882cb5ee8f..fefd65a4180 100644 --- a/src/xrParticles/psystem.h +++ b/src/xrParticles/psystem.h @@ -104,16 +104,16 @@ struct Particle { ANIMATE_CCW = (1 << 0), }; - Rotation rot; // 4 - pVector pos; // 12 - pVector posB; // 12 - pVector vel; // 12 - pVector size; // 12 - u32 color; // 4 - float age; // 4 - u16 frame; // 2 - Flags16 flags; // 2 -}; // = 64 + Rotation rot; // 4 + pVector pos; // 12 + pVector posB; // 12 + pVector vel; // 12 + pVector size; // 12 + u32 color; // 4 + float age; // 4 + u16 frame; // 2 + Flags16 flags; // 2 +}; // = 64 typedef void (*OnBirthParticleCB)(void* owner, u32 param, PAPI::Particle& P, u32 idx); typedef void (*OnDeadParticleCB)(void* owner, u32 param, PAPI::Particle& P, u32 idx); @@ -121,55 +121,55 @@ typedef void (*OnDeadParticleCB)(void* owner, u32 param, PAPI::Particle& P, u32 // Type codes for domains enum PDomainEnum { - PDPoint = 0, // Single point - PDLine = 1, // Line segment - PDTriangle = 2, // Triangle - PDPlane = 3, // Arbitrarily-oriented plane - PDBox = 4, // Axis-aligned box - PDSphere = 5, // Sphere - PDCylinder = 6, // Cylinder - PDCone = 7, // Cone - PDBlob = 8, // Gaussian blob - PDDisc = 9, // Arbitrarily-oriented disc - PDRectangle = 10, // Rhombus-shaped planar region + PDPoint = 0, // Single point + PDLine = 1, // Line segment + PDTriangle = 2, // Triangle + PDPlane = 3, // Arbitrarily-oriented plane + PDBox = 4, // Axis-aligned box + PDSphere = 5, // Sphere + PDCylinder = 6, // Cylinder + PDCone = 7, // Cone + PDBlob = 8, // Gaussian blob + PDDisc = 9, // Arbitrarily-oriented disc + PDRectangle = 10, // Rhombus-shaped planar region domain_enum_force_dword = u32(-1) }; ////////////////////////////////////////////////////////////////////// // Type codes for all actions enum PActionEnum { - PAAvoidID, // Avoid entering the domain of space. - PABounceID, // Bounce particles off a domain of space. - PACallActionListID_obsolette, // - PACopyVertexBID, // Set the secondary position from current position. - PADampingID, // Dampen particle velocities. - PAExplosionID, // An Explosion. - PAFollowID, // Accelerate toward the previous particle in the effect. - PAGravitateID, // Accelerate each particle toward each other particle. - PAGravityID, // Acceleration in the given direction. - PAJetID, // - PAKillOldID, // - PAMatchVelocityID, // - PAMoveID, // - PAOrbitLineID, // - PAOrbitPointID, // - PARandomAccelID, // - PARandomDisplaceID, // - PARandomVelocityID, // - PARestoreID, // - PASinkID, // - PASinkVelocityID, // - PASourceID, // - PASpeedLimitID, // - PATargetColorID, // - PATargetSizeID, // - PATargetRotateID, // - PATargetRotateDID, // - PATargetVelocityID, // - PATargetVelocityDID, // - PAVortexID, // - PATurbulenceID, // - PAScatterID, // + PAAvoidID, // Avoid entering the domain of space. + PABounceID, // Bounce particles off a domain of space. + PACallActionListID_obsolette, // + PACopyVertexBID, // Set the secondary position from current position. + PADampingID, // Dampen particle velocities. + PAExplosionID, // An Explosion. + PAFollowID, // Accelerate toward the previous particle in the effect. + PAGravitateID, // Accelerate each particle toward each other particle. + PAGravityID, // Acceleration in the given direction. + PAJetID, // + PAKillOldID, // + PAMatchVelocityID, // + PAMoveID, // + PAOrbitLineID, // + PAOrbitPointID, // + PARandomAccelID, // + PARandomDisplaceID, // + PARandomVelocityID, // + PARestoreID, // + PASinkID, // + PASinkVelocityID, // + PASourceID, // + PASpeedLimitID, // + PATargetColorID, // + PATargetSizeID, // + PATargetRotateID, // + PATargetRotateDID, // + PATargetVelocityID, // + PATargetVelocityDID, // + PAVortexID, // + PATurbulenceID, // + PAScatterID, // action_enum_force_dword = u32(-1) }; struct ParticleAction; @@ -209,4 +209,4 @@ class IParticleManager PARTICLES_API IParticleManager* ParticleManager(); }; -#endif // PSystemH +#endif // PSystemH diff --git a/src/xrParticles/stdafx.h b/src/xrParticles/stdafx.h index b27ad6ca005..ff4a67c0969 100644 --- a/src/xrParticles/stdafx.h +++ b/src/xrParticles/stdafx.h @@ -19,4 +19,4 @@ #pragma comment(lib, "xrCore.lib") #endif -#endif // stdafxH +#endif // stdafxH diff --git a/src/xrPhysics/ActorCameraCollision.cpp b/src/xrPhysics/ActorCameraCollision.cpp index b039a1561f0..bbc10244ae9 100644 --- a/src/xrPhysics/ActorCameraCollision.cpp +++ b/src/xrPhysics/ActorCameraCollision.cpp @@ -46,7 +46,7 @@ static void cammera_shell_collide_callback_common( c.surface.mu = 0; dJointID contact_joint = - dJointCreateContactSpecial(0, ContactGroup, &c); // dJointCreateContact(0, ContactGroup, &c);// + dJointCreateContactSpecial(0, ContactGroup, &c); // dJointCreateContact(0, ContactGroup, &c);// CPHObject* obj = (CPHObject*)my_data->callback_data; VERIFY(obj); #ifdef DEBUG @@ -129,7 +129,7 @@ CPhysicsShell* create_camera_shell(IPhysicsShellHolder* actor) cyl.m_radius = 0.5f; // roote->add_Box(obb); CODEGeom* character_test_geom = smart_cast(new CCylinderGeom(cyl)); - character_test_geom->build(Fvector().set(0, 0, 0)); // roote->mass_Center() + character_test_geom->build(Fvector().set(0, 0, 0)); // roote->mass_Center() VERIFY(smart_cast(roote)); CPHElement* eeroot = static_cast(roote); diff --git a/src/xrPhysics/CalculateTriangle.h b/src/xrPhysics/CalculateTriangle.h index 1e731cf1aea..970f0dc3c26 100644 --- a/src/xrPhysics/CalculateTriangle.h +++ b/src/xrPhysics/CalculateTriangle.h @@ -104,7 +104,7 @@ IC float DistToFragmenton(const dReal* point, const dReal* pt1, const dReal* pt2 dVector3 L = {pt1[0] - point[0], pt1[1] - point[1], pt1[2] - point[2]}; dReal sq_mag_V = dDOT(V, V); dReal dot_L_V = dDOT(L, V); - dReal t = -dot_L_V / sq_mag_V; // t + dReal t = -dot_L_V / sq_mag_V; // t if (t < 0.f) { c = 1; dVectorSet(p, pt1); diff --git a/src/xrPhysics/DamageSource.h b/src/xrPhysics/DamageSource.h index afa0319cdf6..482c45b625f 100644 --- a/src/xrPhysics/DamageSource.h +++ b/src/xrPhysics/DamageSource.h @@ -6,5 +6,5 @@ class IDamageSource virtual ~IDamageSource(){}; virtual void SetInitiator(u16 id) = 0; virtual u16 Initiator() = 0; - virtual IDamageSource* cast_IDamageSource() = 0; //{return this ;} + virtual IDamageSource* cast_IDamageSource() = 0; //{return this ;} }; \ No newline at end of file diff --git a/src/xrPhysics/DisablingParams.cpp b/src/xrPhysics/DisablingParams.cpp index dd6ad626477..a926d212918 100644 --- a/src/xrPhysics/DisablingParams.cpp +++ b/src/xrPhysics/DisablingParams.cpp @@ -4,11 +4,11 @@ SAllDDWParams worldDisablingParams = { // object { - {0.001f, 0.1f}, // translational vel , accel - {0.005f, 0.05f}, // rotational vel , accel - 64 // level2 frames 2^ + {0.001f, 0.1f}, // translational vel , accel + {0.005f, 0.05f}, // rotational vel , accel + 64 // level2 frames 2^ }, - 1.5f // reanable factor + 1.5f // reanable factor }; void SOneDDOParams::Mul(float v) diff --git a/src/xrPhysics/ElevatorState.cpp b/src/xrPhysics/ElevatorState.cpp index 681f551fbb0..1b25fa34a10 100644 --- a/src/xrPhysics/ElevatorState.cpp +++ b/src/xrPhysics/ElevatorState.cpp @@ -15,8 +15,8 @@ static const float start_climbing_dist = 0.f; static const float stop_climbing_dist = 0.1f; static const float out_dist = 1.5f; -static const float look_angle_cosine = 0.9238795f; // 22.5 -static const float lookup_angle_sine = 0.34202014f; // 20 +static const float look_angle_cosine = 0.9238795f; // 22.5 +static const float lookup_angle_sine = 0.34202014f; // 20 extern class CPHWorld* ph_world; CElevatorState::CElevatorState() { @@ -219,7 +219,7 @@ void CElevatorState::UpdateClimbingCommon(const Fvector& d_to_ax, float to_ax, c //. Msg("force applied"); } #endif - m_character->ApplyForce(d_to_ax, m_character->Mass() * ph_world->Gravity()); // + m_character->ApplyForce(d_to_ax, m_character->Mass() * ph_world->Gravity()); // } } bool CElevatorState::GetControlDir(Fvector& dir) @@ -343,14 +343,14 @@ void CElevatorState::Deactivate() CElevatorState::SEnertionState CElevatorState::m_etable[clbNoState][clbNoState] = { // clbNone clbNearUp clbNearDown clbClimbingUp clbClimbingDown clbDepart - //clbNoLadder - /*clbNone */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNone - /*clbNearUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearUp - /*clbNearDown */ {{0, 0}, {0.0f, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearDown - /*clbClimbingUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingUp - /*clbClimbingDown */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingDown - /*clbDepart */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {depart_dist, depart_time}}, // clbDepart - /*clbNoLadder */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}} // clbNoLadder + // clbNoLadder + /*clbNone */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNone + /*clbNearUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearUp + /*clbNearDown */ {{0, 0}, {0.0f, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbNearDown + /*clbClimbingUp */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingUp + /*clbClimbingDown */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, // clbClimbingDown + /*clbDepart */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {depart_dist, depart_time}}, // clbDepart + /*clbNoLadder */ {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}} // clbNoLadder }; bool CElevatorState::StateSwitchInertion(Estate new_state) diff --git a/src/xrPhysics/ElevatorState.h b/src/xrPhysics/ElevatorState.h index 414d2d73e41..66c787f5ebb 100644 --- a/src/xrPhysics/ElevatorState.h +++ b/src/xrPhysics/ElevatorState.h @@ -23,7 +23,7 @@ class CElevatorState : public IElevatorState IClimableObject* m_ladder; CPHCharacter* m_character; - Fvector m_start_position; // for depart state + Fvector m_start_position; // for depart state u32 m_start_time; public: diff --git a/src/xrPhysics/Geometry.cpp b/src/xrPhysics/Geometry.cpp index 7f17b09b59e..35b3c201a36 100644 --- a/src/xrPhysics/Geometry.cpp +++ b/src/xrPhysics/Geometry.cpp @@ -9,7 +9,7 @@ // global #ifdef DEBUG #include "debug_output.h" -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG static void computeFinalTx(dGeomID geom_transform, dReal* final_pos, dReal* final_R) { @@ -123,7 +123,7 @@ void CODEGeom::add_self_mass(dMass& m, const Fvector& ref_point) void CODEGeom::get_local_center_bt(Fvector& center) { if (!m_geom_transform) return; - if (!geom()) // geom is not transformed + if (!geom()) // geom is not transformed { center.set(0.f, 0.f, 0.f); } @@ -456,13 +456,13 @@ void CBoxGeom::get_max_area_dir_bt(Fvector& dir) if (S1 > S3) { ddir[0] = R[2]; ddir[1] = R[6]; - ddir[2] = R[10]; // S1 + ddir[2] = R[10]; // S1 } else { ddir[0] = R[0]; ddir[1] = R[4]; - ddir[2] = R[8]; // S3 + ddir[2] = R[8]; // S3 } } else @@ -470,13 +470,13 @@ void CBoxGeom::get_max_area_dir_bt(Fvector& dir) if (S2 > S3) { ddir[0] = R[1]; ddir[1] = R[5]; - ddir[2] = R[9]; // S2 + ddir[2] = R[9]; // S2 } else { ddir[0] = R[0]; ddir[1] = R[4]; - ddir[2] = R[8]; // S3 + ddir[2] = R[8]; // S3 } } diff --git a/src/xrPhysics/Geometry.h b/src/xrPhysics/Geometry.h index d6399f40d14..b036386b7b3 100644 --- a/src/xrPhysics/Geometry.h +++ b/src/xrPhysics/Geometry.h @@ -35,21 +35,21 @@ class XRPHYSICS_API CODEGeom : public IPhysicsGeometry public: // get virtual float volume() = 0; - virtual void get_mass(dMass& m) = 0; // unit dencity mass; + virtual void get_mass(dMass& m) = 0; // unit dencity mass; void get_mass(dMass& m, const Fvector& ref_point, float density); void get_mass(dMass& m, const Fvector& ref_point); void add_self_mass(dMass& m, const Fvector& ref_point); void add_self_mass(dMass& m, const Fvector& ref_point, float density); - void get_local_center_bt(Fvector& center); // for built - void get_global_center_bt(Fvector& center); // for built - void get_local_form_bt(Fmatrix& form); // for built + void get_local_center_bt(Fvector& center); // for built + void get_global_center_bt(Fvector& center); // for built + void get_local_form_bt(Fmatrix& form); // for built virtual void get_xform(Fmatrix& form) const; #ifdef DEBUG virtual void dbg_draw(float scale, u32 color, Flags32 flags) const; #endif virtual void get_Box(Fmatrix& form, Fvector& sz) const; virtual bool collide_fluids() const; - void set_static_ref_form(const Fmatrix& form); // for built + void set_static_ref_form(const Fmatrix& form); // for built virtual void get_max_area_dir_bt(Fvector& dir) = 0; virtual float radius() = 0; virtual void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const = 0; @@ -113,7 +113,7 @@ class XRPHYSICS_API CODEGeom : public IPhysicsGeometry public: static void get_final_tx(dGeomID g, const dReal*& p, const dReal*& R, dReal* bufV, dReal* bufM); void build(const Fvector& ref_point); - virtual void set_build_position(const Fvector& ref_point); // for build geom + virtual void set_build_position(const Fvector& ref_point); // for build geom void clear_motion_history(bool set_unspecified); void move_local_basis(const Fmatrix& inv_new_mul_old); void destroy(); @@ -133,7 +133,7 @@ class CBoxGeom : public CODEGeom virtual float radius(); virtual void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const; virtual void get_max_area_dir_bt(Fvector& dir); - virtual void get_mass(dMass& m); // unit dencity mass; + virtual void get_mass(dMass& m); // unit dencity mass; virtual const Fvector& local_center(); virtual void get_local_form(Fmatrix& form); virtual void set_local_form(const Fmatrix& form); @@ -159,7 +159,7 @@ class CSphereGeom : public CODEGeom virtual float radius(); virtual void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const; virtual void get_max_area_dir_bt(Fvector& dir){}; - virtual void get_mass(dMass& m); // unit dencity mass; + virtual void get_mass(dMass& m); // unit dencity mass; virtual const Fvector& local_center(); virtual void get_local_form(Fmatrix& form); virtual void set_local_form(const Fmatrix& form); @@ -183,7 +183,7 @@ class CCylinderGeom : public CODEGeom virtual void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const; virtual void get_max_area_dir_bt(Fvector& dir){}; virtual const Fvector& local_center(); - virtual void get_mass(dMass& m); // unit dencity mass; + virtual void get_mass(dMass& m); // unit dencity mass; virtual void get_local_form(Fmatrix& form); virtual void set_local_form(const Fmatrix& form); virtual dGeomID create(); @@ -195,4 +195,4 @@ class CCylinderGeom : public CODEGeom virtual void dbg_draw(float scale, u32 color, Flags32 flags) const; #endif }; -#endif // GEOMETRY_H \ No newline at end of file +#endif // GEOMETRY_H \ No newline at end of file diff --git a/src/xrPhysics/IActivationShape.cpp b/src/xrPhysics/IActivationShape.cpp index 253104ca1a4..0ad8303a7ac 100644 --- a/src/xrPhysics/IActivationShape.cpp +++ b/src/xrPhysics/IActivationShape.cpp @@ -7,7 +7,7 @@ void ActivateShapeExplosive(IPhysicsShellHolder* self_obj, const Fvector& size, Fvector& out_size, Fvector& in_out_pos) { ////////////// - CPHActivationShape activation_shape; // Fvector start_box;m_PhysicMovementControl.Box().getsize(start_box); + CPHActivationShape activation_shape; // Fvector start_box;m_PhysicMovementControl.Box().getsize(start_box); activation_shape.Create(in_out_pos, size, self_obj); CPHCollideValidator::SetCharacterClassNotCollide(activation_shape); @@ -44,7 +44,7 @@ void ActivateShapePhysShellHolder( Msg("Visual: %s", obj->ObjectNameVisual()); // Msg("Object pos %f,%f,%f",Position().x,Position().y,Position().z); } -#endif // DEBUG +#endif // DEBUG } bool ActivateShapeCharacterPhysicsSupport(Fvector& out_pos, const Fvector& vbox, const Fvector& activation_pos, diff --git a/src/xrPhysics/IPHWorld.h b/src/xrPhysics/IPHWorld.h index a41bf9d9d4e..a605cbc5065 100644 --- a/src/xrPhysics/IPHWorld.h +++ b/src/xrPhysics/IPHWorld.h @@ -17,9 +17,9 @@ class IPHWorld : public iphysics_scripted_class public: struct PHWorldStatistics { - CStatTimer Collision; // collision - CStatTimer Core; // integrate - CStatTimer MovCollision; // movement+collision + CStatTimer Collision; // collision + CStatTimer Core; // integrate + CStatTimer MovCollision; // movement+collision PHWorldStatistics() { FrameStart(); } void FrameStart() diff --git a/src/xrPhysics/IPhysicsShellHolder.h b/src/xrPhysics/IPhysicsShellHolder.h index bac2a8830d4..7f92584a456 100644 --- a/src/xrPhysics/IPhysicsShellHolder.h +++ b/src/xrPhysics/IPhysicsShellHolder.h @@ -57,7 +57,7 @@ class IPhysicsShellHolder virtual bool IsActor() = 0; virtual bool IsStalker() = 0; // virtual void SetWeaponHideState ( u16 State, bool bSet )=0; - virtual void HideAllWeapons(bool v) = 0; //(SetWeaponHideState(INV_STATE_BLOCK_ALL,true)) + virtual void HideAllWeapons(bool v) = 0; //(SetWeaponHideState(INV_STATE_BLOCK_ALL,true)) virtual void MovementCollisionEnable(bool enable) = 0; virtual CPHSoundPlayer* ObjectPhSoundPlayer() = 0; virtual ICollisionDamageReceiver* ObjectPhCollisionDamageReceiver() = 0; diff --git a/src/xrPhysics/MathUtils.cpp b/src/xrPhysics/MathUtils.cpp index f247c0732c6..9dffc2c6d00 100644 --- a/src/xrPhysics/MathUtils.cpp +++ b/src/xrPhysics/MathUtils.cpp @@ -76,22 +76,22 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float v_smag = v.square_magnitude(); const float sq_r = r * r; - if (sq_sin < EPS) // paralel + if (sq_sin < EPS) // paralel { float tr1, tr2; - float sq_dist = v_smag - Lr * Lr; // + float sq_dist = v_smag - Lr * Lr; // if (sq_dist > sq_r) return false; float r_dist = _sqrt(sq_r - sq_dist) + h; tr1 = Lr - r_dist; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = Lr + r_dist; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -116,14 +116,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect if (sq_sphere_dist > sq_r) return false; float diff = _sqrt(sq_r - sq_sphere_dist); tr1 = Lr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = Lr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -135,14 +135,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float diff = _sqrt(sq_r - sq_dist); tr1 = Lr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = Lr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -171,27 +171,27 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // float horde=_sqrt(sq_horde) ; float sq_c_diff = sq_horde * sq_cos * r_sq_sin; - float c_diff = _sqrt(sq_c_diff); // ccc + float c_diff = _sqrt(sq_c_diff); // ccc float cp1 = tc - c_diff; float cp2 = tc + c_diff; // cp1 h) { // sphere - float tc_h = tc - h; //!! hi (=)/; + float tc_h = tc - h; //!! hi (=)/; float sq_sphere_dist = sq_sin * tc_h * tc_h; if (sq_sphere_dist > sq_horde) return false; - float tr_c = tr - tc_h * cs; // + float tr_c = tr - tc_h * cs; // float diff = _sqrt(sq_horde - sq_sphere_dist); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -204,20 +204,20 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect if (cp2 < -h) { // sphere lo /(=) - float tc_h = tc + h; //!! + float tc_h = tc + h; //!! float sq_sphere_dist = sq_sin * tc_h * tc_h; if (sq_sphere_dist > sq_horde) return false; - float tr_c = tr - tc_h * cs; //!! + float tr_c = tr - tc_h * cs; //!! float diff = _sqrt(sq_horde - sq_sphere_dist); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -234,14 +234,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // cylinder (=/=) float diff = c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -256,7 +256,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // mixed//cyl hi sphere (=/) float diff = c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -268,7 +268,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sphere_dist); tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -279,18 +279,18 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect return true; } } - else // cp1<=-h + else // cp1<=-h { if (cp2 < h) { // mixed//lo sphere cyl (/=) - float tc_h = tc + h; //(tc-(-h)) + float tc_h = tc + h; //(tc-(-h)) float sq_sphere_dist = sq_sin * tc_h * tc_h; // if(sq_sphere_dist>sq_horde)return false; float diff = _sqrt(sq_horde - sq_sphere_dist); float tr_c = tr - tc_h * cs; tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -298,7 +298,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect { float diff = c_diff / cs; tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -317,7 +317,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -345,14 +345,14 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect // cylinder float diff = -c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; else { tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -363,13 +363,13 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect return true; } else - { // cp1>-h&&cp2>h + { // cp1>-h&&cp2>h - float tc_h = tc - h; // hi sphere/cyl + float tc_h = tc - h; // hi sphere/cyl float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -377,7 +377,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect { diff = -c_diff / cs; tr2 = tr + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -388,13 +388,13 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect return true; } } - else // cp1<-h + else // cp1<-h { if (cp2 < h) { // cyl/lo sphere float diff = -c_diff / cs; tr1 = tr - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // if (tr1 < 0.f) { if (bCull) return false; @@ -405,7 +405,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -415,7 +415,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect R = tr1; return true; } - else // cp2>=h + else // cp2>=h { //-(--)- //sphere hi&&lo @@ -423,7 +423,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect float tr_c = tr - tc_h * cs; float diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr1 = tr_c - diff; - if (tr1 > R) return false; // + if (tr1 > R) return false; // ///////////////////////////////////////////// if (tr1 < 0.f) { if (bCull) @@ -434,7 +434,7 @@ IC bool RAYvsCYLINDER(const Fcylinder& c_cylinder, const Fvector& S, const Fvect tr_c = tr - tc_h * cs; diff = _sqrt(sq_horde - sq_sin * tc_h * tc_h); tr2 = tr_c + diff; - if (tr2 < 0.f) return false; // + if (tr2 < 0.f) return false; // if (tr2 < R) { R = tr2; return true; @@ -463,40 +463,40 @@ void capped_cylinder_ray_collision_test() R = 3; // inside - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // false , + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // false , dir.set(0, 0, 1); - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // false + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // false // outside pos.set(-3, 0, 0); dir.set(1, 0, 0); R = 4; - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // true , 2 + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 2 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // true , 2 R = 1; - RAYvsCYLINDER(c, pos, dir, R, FALSE); // false + RAYvsCYLINDER(c, pos, dir, R, FALSE); // false pos.set(0, 0, -3); dir.set(0, 0, 1); R = 4; - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 - RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, 1 + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true , 1 + RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, 1 pos.set(-3, -3, -3); dir.set(1, 1, 1); dir.normalize(); R = 10; - RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, ? + RAYvsCYLINDER(c, pos, dir, R, TRUE); // true, ? float ir[2]; Fcylinder::ecode code[2]; c.intersect(pos, dir, ir, code); // pos.set(0, 0, 0); - RAYvsCYLINDER(c, pos, dir, R, FALSE); // true, ? + RAYvsCYLINDER(c, pos, dir, R, FALSE); // true, ? // Fcylinder::ecode code[2]; c.intersect(pos, dir, ir, code); - RAYvsCYLINDER(c, pos, dir, R, TRUE); // false + RAYvsCYLINDER(c, pos, dir, R, TRUE); // false CTimer t; t.Start(); for (int i = 0; i < 1000000; i++) @@ -523,7 +523,7 @@ void capped_cylinder_ray_collision_test() c.m_height = Random.randF(0.2f, 2.f); c.m_radius = Random.randF(0.1f, 2.f); // ray - Fvector dir, pos; // float R=Random.randF(0.1f,2.f); + Fvector dir, pos; // float R=Random.randF(0.1f,2.f); dir.random_dir(); pos.random_point(Fvector().set(2, 2, 2)); c.intersect(pos, dir, ir, code); diff --git a/src/xrPhysics/MathUtils.h b/src/xrPhysics/MathUtils.h index ee14aa1f412..ce8fd0dded9 100644 --- a/src/xrPhysics/MathUtils.h +++ b/src/xrPhysics/MathUtils.h @@ -138,7 +138,7 @@ IC void dVectorMul(float* res, const float* av, float mt) res[1] = av[1] * mt; res[2] = av[2] * mt; } -IC void dVectorInterpolate(float* v, float* to, float k) // changes to +IC void dVectorInterpolate(float* v, float* to, float k) // changes to { dVectorMul(v, 1.f - k); dVectorMul(to, k); @@ -181,7 +181,7 @@ IC void twoq_2w(const Fquaternion& q1, const Fquaternion& q2, float dt, Fvector& Fvector v1, v2; v1.set(q1.x, q1.y, q1.z); v2.set(q2.x, q2.y, q2.z); - float cosinus = q1.w * q2.w + v1.dotproduct(v2); // q1.w*q2.w+ q1.v.dotproduct(q2.v) + float cosinus = q1.w * q2.w + v1.dotproduct(v2); // q1.w*q2.w+ q1.v.dotproduct(q2.v) w.crossproduct(v1, v2); // //the signum must be inverted ? v1.mul(q2.w); @@ -485,8 +485,8 @@ IC bool valid_pos(const Fvector& P, const Fbox& B) } #ifdef DEBUG -const float DET_CHECK_EPS = 0.15f; // scale -35% !? ;) -const float DET_CHECK_FATAL_EPS = 0.8f; // scale -35% !? ;) +const float DET_CHECK_EPS = 0.15f; // scale -35% !? ;) +const float DET_CHECK_FATAL_EPS = 0.8f; // scale -35% !? ;) #define VERIFY_RMATRIX(M) \ { \ float d = DET(M); \ diff --git a/src/xrPhysics/MathUtilsOde.h b/src/xrPhysics/MathUtilsOde.h index 9d790c529fa..7c5d09ea738 100644 --- a/src/xrPhysics/MathUtilsOde.h +++ b/src/xrPhysics/MathUtilsOde.h @@ -40,7 +40,7 @@ ICF void accurate_normalize(float* a) goto aa2_largest; } else - { // aa1 is largest + { // aa1 is largest a0 /= aa1; a2 /= aa1; l = dRecipSqrt(a0 * a0 + a2 * a2 + 1); @@ -52,7 +52,7 @@ ICF void accurate_normalize(float* a) else { if (aa2 > aa0) { - aa2_largest: // aa2 is largest + aa2_largest: // aa2 is largest a0 /= aa2; a1 /= aa2; l = dRecipSqrt(a0 * a0 + a1 * a1 + 1); @@ -61,11 +61,11 @@ ICF void accurate_normalize(float* a) a[2] = (float)_copysign(l, a2); } else - { // aa0 is largest + { // aa0 is largest if (aa0 <= 0) { // dDEBUGMSG ("vector has zero size"); ... this messace is annoying - a[0] = 1; // if all a's are zero, this is where we'll end up. - a[1] = 0; // return a default unit length vector. + a[0] = 1; // if all a's are zero, this is where we'll end up. + a[1] = 0; // return a default unit length vector. a[2] = 0; return; } @@ -96,7 +96,7 @@ IC bool dVectorLimit(const float* v, float l, float* lv) } } -IC void dVectorInterpolate(float* res, const float* from, const float* to, float k) // changes to +IC void dVectorInterpolate(float* res, const float* from, const float* to, float k) // changes to { dVector3 tov; dVectorSet(res, from); @@ -106,7 +106,7 @@ IC void dVectorInterpolate(float* res, const float* from, const float* to, float float E_NL(dBodyID b1, dBodyID b2, const dReal* norm); -float E_NlS(dBodyID body, const dReal* norm, float norm_sign); // if body c.geom.g1 norm_sign + else - +float E_NlS(dBodyID body, const dReal* norm, float norm_sign); // if body c.geom.g1 norm_sign + else - #pragma warning(default : 4995) #pragma warning(default : 4267) \ No newline at end of file diff --git a/src/xrPhysics/MovementBoxDynamicActivate.cpp b/src/xrPhysics/MovementBoxDynamicActivate.cpp index 87948b62d33..6e676533fac 100644 --- a/src/xrPhysics/MovementBoxDynamicActivate.cpp +++ b/src/xrPhysics/MovementBoxDynamicActivate.cpp @@ -134,7 +134,7 @@ class CVelocityLimiter : public CPHUpdateObject dReal mag; Fvector vlinear_velocity; vlinear_velocity.set(cast_fv(linear_velocity)); - mag = _sqrt(linear_velocity[0] * linear_velocity[0] + linear_velocity[2] * linear_velocity[2]); // + mag = _sqrt(linear_velocity[0] * linear_velocity[0] + linear_velocity[2] * linear_velocity[2]); // if (mag > l_limit) { dReal f = mag / l_limit; // dBodySetLinearVel(m_body,linear_velocity[0]/f,linear_velocity[1],linear_velocity[2]/f);///f diff --git a/src/xrPhysics/PHAICharacter.cpp b/src/xrPhysics/PHAICharacter.cpp index 526cc6468d8..5a762385373 100644 --- a/src/xrPhysics/PHAICharacter.cpp +++ b/src/xrPhysics/PHAICharacter.cpp @@ -23,12 +23,12 @@ void CPHAICharacter::Create(dVector3 sizes) { inherited::Create(sizes); - m_forced_physics_control = false; //. + m_forced_physics_control = false; //. } bool CPHAICharacter::TryPosition(Fvector pos, bool exact_state) { if (!b_exist) return false; - if (m_forced_physics_control || JumpState()) return false; // b_was_on_object||b_on_object|| + if (m_forced_physics_control || JumpState()) return false; // b_was_on_object||b_on_object|| if (DoCollideObj()) return false; Fvector current_pos; GetPosition(current_pos); diff --git a/src/xrPhysics/PHAICharacter.h b/src/xrPhysics/PHAICharacter.h index ea5a0df863e..26c0212816d 100644 --- a/src/xrPhysics/PHAICharacter.h +++ b/src/xrPhysics/PHAICharacter.h @@ -10,9 +10,11 @@ class CPHAICharacter : public CPHSimpleCharacter CPHAICharacter(); virtual CPHAICharacter* CastAICharacter() { return this; } // virtual void SetPosition (const Fvector &pos); - // virtual void SetDesiredPosition (const Fvector& pos) {m_vDesiredPosition.set(pos) + // virtual void SetDesiredPosition (const Fvector& pos) + // {m_vDesiredPosition.set(pos) // ;} - // virtual void GetDesiredPosition (Fvector& dpos) {dpos.set(m_vDesiredPosition) + // virtual void GetDesiredPosition (Fvector& dpos) + // {dpos.set(m_vDesiredPosition) // ;} virtual void ValidateWalkOn(); // virtual void BringToDesired (float time,float velocity,float force=1.f) diff --git a/src/xrPhysics/PHActivationShape.cpp b/src/xrPhysics/PHActivationShape.cpp index a93f9698aea..62b3c62a88b 100644 --- a/src/xrPhysics/PHActivationShape.cpp +++ b/src/xrPhysics/PHActivationShape.cpp @@ -15,7 +15,7 @@ #ifdef DEBUG #include "debug_output.h" -#endif // DEBUG +#endif // DEBUG #include "PHDynamicData.h" #include "xrServerEntities/PHSynchronize.h" diff --git a/src/xrPhysics/PHActorCharacter.cpp b/src/xrPhysics/PHActorCharacter.cpp index 1969276281a..b5cb31f4190 100644 --- a/src/xrPhysics/PHActorCharacter.cpp +++ b/src/xrPhysics/PHActorCharacter.cpp @@ -8,7 +8,7 @@ #include "xrEngine/GameMtlLib.h" // const float JUMP_HIGHT=0.5; -const float JUMP_UP_VELOCITY = 6.0f; // 5.6f; +const float JUMP_UP_VELOCITY = 6.0f; // 5.6f; const float JUMP_INCREASE_VELOCITY_RATE = 1.2f; //#ifdef DEBUG // XRPHYSICS_API BOOL use_controllers_separation = TRUE; @@ -340,7 +340,7 @@ void CPHActorCharacter::ChooseRestrictionType(ERestrictionType my_type, float my { if (my_type != rtStalker || (ch->RestrictionType() != rtStalker && ch->RestrictionType() != rtStalkerSmall)) return; float checkR = m_restrictors[rtStalkerSmall] - ->m_restrictor_radius; // 1.5f;//+m_restrictors[rtStalker]->m_restrictor_radius)/2.f; + ->m_restrictor_radius; // 1.5f;//+m_restrictors[rtStalker]->m_restrictor_radius)/2.f; switch (ch->RestrictionType()) { @@ -379,7 +379,7 @@ float free_fly_up_force_limit = 4000.f; void CPHActorCharacter::PhTune(dReal step) { inherited::PhTune(step); - if (b_lose_control && !b_external_impulse) // + if (b_lose_control && !b_external_impulse) // { const float* force = dBodyGetForce(m_body); float fy = force[1]; diff --git a/src/xrPhysics/PHCaptureInit.cpp b/src/xrPhysics/PHCaptureInit.cpp index fd1a8ddae51..8d1bdf8e1ba 100644 --- a/src/xrPhysics/PHCaptureInit.cpp +++ b/src/xrPhysics/PHCaptureInit.cpp @@ -173,14 +173,14 @@ void CPHCapture::Init() if (dir.magnitude() > m_pull_distance) return; float pool_force_factor = 4.f; - m_capture_distance = ini->r_float("capture", "distance"); // distance - m_capture_force = ini->r_float("capture", "capture_force"); // capture force - m_capture_time = ini->r_u32("capture", "time_limit") * 1000; // time; + m_capture_distance = ini->r_float("capture", "distance"); // distance + m_capture_force = ini->r_float("capture", "capture_force"); // capture force + m_capture_time = ini->r_u32("capture", "time_limit") * 1000; // time; m_time_start = inl_ph_world().Device().dwTimeGlobal; - float max_pull_force = ini->r_float("capture", "pull_force"); // pull force + float max_pull_force = ini->r_float("capture", "pull_force"); // pull force m_pull_force = pool_force_factor * ph_world->Gravity() * m_taget_element->PhysicsShell()->getMass(); if (m_pull_force > max_pull_force) m_pull_force = max_pull_force; - float pulling_vel_scale = ini->r_float("capture", "velocity_scale"); // + float pulling_vel_scale = ini->r_float("capture", "velocity_scale"); // m_taget_element->set_DynamicLimits(default_l_limit * pulling_vel_scale, default_w_limit * pulling_vel_scale); // m_taget_element->PhysicsShell()->set_ObjectContactCallback(object_contactCallbackFun); diff --git a/src/xrPhysics/PHCharacter.cpp b/src/xrPhysics/PHCharacter.cpp index 1ae926acf28..00e4173b837 100644 --- a/src/xrPhysics/PHCharacter.cpp +++ b/src/xrPhysics/PHCharacter.cpp @@ -77,7 +77,7 @@ void CPHCharacter::get_State(SPHNetState& state) state.enabled = false; return; } - state.enabled = CPHObject::is_active(); //!!dBodyIsEnabled(m_body); + state.enabled = CPHObject::is_active(); //!!dBodyIsEnabled(m_body); } void CPHCharacter::set_State(const SPHNetState& state) { @@ -140,7 +140,7 @@ void CPHCharacter::CutVelocity(float l_limit, float /*a_limit*/) const Fmatrix& CPHCharacter::XFORM() const { - return m_phys_ref_object->ObjectXFORM(); //>renderable.xform; + return m_phys_ref_object->ObjectXFORM(); //>renderable.xform; } void CPHCharacter::get_LinearVel(Fvector& velocity) const { @@ -183,7 +183,7 @@ void virtual_move_collide_callback(bool& do_collide, bool bo1, dContact& c, SGam c.surface.mu = 0; c.surface.soft_cfm = 0.01f; dJointID contact_joint = - dJointCreateContact(0, ContactGroup, &c); // dJointCreateContactSpecial(0, ContactGroup, &c); + dJointCreateContact(0, ContactGroup, &c); // dJointCreateContactSpecial(0, ContactGroup, &c); CPHObject* obj = (CPHObject*)my_data->callback_data; VERIFY(obj); @@ -197,7 +197,7 @@ void virtual_move_collide_callback(bool& do_collide, bool bo1, dContact& c, SGam void CPHCharacter::fix_body_rotation() { - dBodyID b = get_body(); // GetBody(); + dBodyID b = get_body(); // GetBody(); if (b) { dMatrix3 R; dRSetIdentity(R); diff --git a/src/xrPhysics/PHCharacter.h b/src/xrPhysics/PHCharacter.h index d3fe39e86af..73ae03ba460 100644 --- a/src/xrPhysics/PHCharacter.h +++ b/src/xrPhysics/PHCharacter.h @@ -87,7 +87,7 @@ class CPHCharacter : public CPHObject, public CPHSynchronize, public CPHDisablin virtual void get_body_position(Fvector& p); virtual void Disable(); virtual void ReEnable() { ; } - virtual void Enable(); //!! + virtual void Enable(); //!! virtual void SwitchOFFInitContact() = 0; virtual void SwitchInInitContact() = 0; virtual bool IsEnabled() = 0; @@ -103,9 +103,9 @@ class CPHCharacter : public CPHObject, public CPHSynchronize, public CPHDisablin virtual bool TouchRestrictor(ERestrictionType rttype) = 0; virtual void SetElevator(IClimableObject* climable){}; virtual void SetMaterial(u16 material) = 0; - virtual void SetMaximumVelocity(dReal /**vel/**/) {} //!! + virtual void SetMaximumVelocity(dReal /**vel/**/) {} //!! virtual dReal GetMaximumVelocity() { return 0; } - virtual void SetJupmUpVelocity(dReal /**velocity/**/) {} //!! + virtual void SetJupmUpVelocity(dReal /**velocity/**/) {} //!! virtual void IPosition(Fvector& /**pos/**/) {} virtual u16 ContactBone() { return 0; } virtual void DeathPosition(Fvector& /**deathPos/**/) {} @@ -176,11 +176,11 @@ class CPHCharacter : public CPHObject, public CPHSynchronize, public CPHDisablin virtual CElevatorState* ElevatorState() = 0; public: - virtual void Freeze() = 0; //{ Freeze(); } - virtual void UnFreeze() = 0; //{ UnFreeze(); } - virtual void step(float dt) = 0; //{ step( dt ); } - virtual void collision_disable() = 0; //{ collision_disable(); } - virtual void collision_enable() = 0; //{ collision_enable(); } + virtual void Freeze() = 0; //{ Freeze(); } + virtual void UnFreeze() = 0; //{ UnFreeze(); } + virtual void step(float dt) = 0; //{ step( dt ); } + virtual void collision_disable() = 0; //{ collision_disable(); } + virtual void collision_enable() = 0; //{ collision_enable(); } protected: virtual const Fmatrix& XFORM() const; virtual void get_LinearVel(Fvector& velocity) const; diff --git a/src/xrPhysics/PHCollideValidator.h b/src/xrPhysics/PHCollideValidator.h index dad8c01e04e..6e60d31f5a5 100644 --- a/src/xrPhysics/PHCollideValidator.h +++ b/src/xrPhysics/PHCollideValidator.h @@ -19,8 +19,8 @@ class CPHCollideValidator cbNCClassSmall = 1 << 7, cbClassRagDoll = 1 << 8, cbNCClassRagDoll = 1 << 9, - cbClassAnimated = 1 << 10, //класс анимированного физического объекта - cbNCClassAnimated = 1 << 11, //свойство игнорирования класса анимированного физического объекта + cbClassAnimated = 1 << 10, //класс анимированного физического объекта + cbNCClassAnimated = 1 << 11, //свойство игнорирования класса анимированного физического объекта cbNone = 1 << 12 }; diff --git a/src/xrPhysics/PHContactBodyEffector.cpp b/src/xrPhysics/PHContactBodyEffector.cpp index 7f8378a5b1b..903619a95a2 100644 --- a/src/xrPhysics/PHContactBodyEffector.cpp +++ b/src/xrPhysics/PHContactBodyEffector.cpp @@ -28,8 +28,8 @@ void CPHContactBodyEffector::Apply() dReal effect = 10000.f * m_recip_flotation * m_recip_flotation; dMass mass; dBodyGetMass(m_body, &mass); - dReal l_air = linear_velocity_mag * effect; // force/velocity !!! - if (l_air > mass.mass / fixed_step) l_air = mass.mass / fixed_step; // validate + dReal l_air = linear_velocity_mag * effect; // force/velocity !!! + if (l_air > mass.mass / fixed_step) l_air = mass.mass / fixed_step; // validate if (!fis_zero(l_air)) { dVector3 force = {-linear_velocity[0] * l_air, -linear_velocity[1] * l_air, -linear_velocity[2] * l_air, 0.f}; @@ -39,7 +39,7 @@ void CPHContactBodyEffector::Apply() accurate_normalize(norm); dMass m; dBodyGetMass(m_body, &m); - dReal prg = 1.f * dDOT(force, norm); //+dDOT(linear_velocity,norm)*m.mass/fixed_step + dReal prg = 1.f * dDOT(force, norm); //+dDOT(linear_velocity,norm)*m.mass/fixed_step force[0] -= prg * norm[0]; force[1] -= prg * norm[1]; force[2] -= prg * norm[2]; diff --git a/src/xrPhysics/PHContactBodyEffector.h b/src/xrPhysics/PHContactBodyEffector.h index 96c76627353..caf0f82ffaa 100644 --- a/src/xrPhysics/PHContactBodyEffector.h +++ b/src/xrPhysics/PHContactBodyEffector.h @@ -15,4 +15,4 @@ class CPHContactBodyEffector : public CPHBaseBodyEffector void Merge(const dContact& contact, SGameMtl* material); void Apply(); }; -#endif // PH_CONTACT_BODY_EFFECTOR_H \ No newline at end of file +#endif // PH_CONTACT_BODY_EFFECTOR_H \ No newline at end of file diff --git a/src/xrPhysics/PHDisabling.cpp b/src/xrPhysics/PHDisabling.cpp index f2bf3d87cba..c07d266389a 100644 --- a/src/xrPhysics/PHDisabling.cpp +++ b/src/xrPhysics/PHDisabling.cpp @@ -90,7 +90,7 @@ void CBaseDisableData::Disabling() CheckState(m_stateL1); - if (m_count == 0) // ph_world->disable_count==dis_frames//m_count==m_frames + if (m_count == 0) // ph_world->disable_count==dis_frames//m_count==m_frames { UpdateL2(); CheckState(m_stateL2); @@ -105,7 +105,7 @@ void CBaseDisableData::Disabling() m_count = m_frames + ph_world->disable_count; } } - if (m_disabled) Disable(); // dBodyDisable(body); + if (m_disabled) Disable(); // dBodyDisable(body); } void CPHDisablingBase::Reinit() diff --git a/src/xrPhysics/PHDynamicData.cpp b/src/xrPhysics/PHDynamicData.cpp index 9bf0b7d9e5b..1ba72cbc52d 100644 --- a/src/xrPhysics/PHDynamicData.cpp +++ b/src/xrPhysics/PHDynamicData.cpp @@ -204,4 +204,4 @@ void PHDynamicData::SetZeroTransform(Fmatrix& aTransform){ ZeroTransform.set(aTransform); } -#endif // #if 0 \ No newline at end of file +#endif // #if 0 \ No newline at end of file diff --git a/src/xrPhysics/PHDynamicData.h b/src/xrPhysics/PHDynamicData.h index 03db5a76262..1c4f7d7f558 100644 --- a/src/xrPhysics/PHDynamicData.h +++ b/src/xrPhysics/PHDynamicData.h @@ -9,7 +9,7 @@ #if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +#endif // _MSC_VER > 1000 class PHDynamicData { @@ -151,4 +151,4 @@ class PHDynamicData bool SetTransform(dGeomID ageom); }; -#endif // !defined(AFX_PHDynamicData_H__ACC01646_B581_4639_B78C_30311432021B__INCLUDED_) +#endif // !defined(AFX_PHDynamicData_H__ACC01646_B581_4639_B78C_30311432021B__INCLUDED_) diff --git a/src/xrPhysics/PHElement.cpp b/src/xrPhysics/PHElement.cpp index 515531b89ef..c2ca90a0df4 100644 --- a/src/xrPhysics/PHElement.cpp +++ b/src/xrPhysics/PHElement.cpp @@ -16,7 +16,7 @@ #ifdef DEBUG #include "debug_output.h" -#endif // DEBUG +#endif // DEBUG /////////////////////////////////////////////////////////////// #pragma warning(disable : 4995) @@ -35,7 +35,7 @@ extern CPHWorld* ph_world; ///////////////////////////////////////////////////////////////////////////////////////////////////////// //////Implementation for CPhysicsElement -CPHElement::CPHElement() // aux +CPHElement::CPHElement() // aux { m_w_limit = default_w_limit; m_l_limit = default_l_limit; @@ -55,7 +55,7 @@ CPHElement::CPHElement() // aux m_shell = NULL; k_w = default_k_w; - k_l = default_k_l; // 1.8f; + k_l = default_k_l; // 1.8f; m_fratures_holder = NULL; // b_enabled_onstep=false; // m_flags.set(flEnabledOnStep,FALSE); @@ -83,7 +83,7 @@ void CPHElement::add_Cylinder(const Fcylinder& V) void CPHElement::build() { - m_body = dBodyCreate(0); // phWorld + m_body = dBodyCreate(0); // phWorld // m_saved_contacts=dJointGroupCreate (0); // b_contacts_saved=false; dBodyDisable(m_body); @@ -129,7 +129,7 @@ void CPHElement::destroy() { // dJointGroupDestroy(m_saved_contacts); CPHGeometryOwner::destroy(); - if (m_body) //&&m_body->world + if (m_body) //&&m_body->world { if (m_body->world) m_shell->Island().RemoveBody(m_body); dBodyDestroy(m_body); @@ -444,7 +444,7 @@ void CPHElement::PhDataUpdate(dReal step) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////limit linear - ///vel//////////////////////////////////////////////////////////////////////////////////////// + /// vel//////////////////////////////////////////////////////////////////////////////////////// VERIFY(dV_valid(linear_velocity)); if (linear_velocity_mag > m_l_limit) { @@ -460,7 +460,7 @@ void CPHElement::PhDataUpdate(dReal step) const dReal* position = dBodyGetPosition(m_body); VERIFY(dV_valid(position)); /////////////////limit & secure angular - ///vel/////////////////////////////////////////////////////////////////////////////// + /// vel/////////////////////////////////////////////////////////////////////////////// VERIFY(dV_valid(angular_velocity)); if (angular_velocity_mag > m_w_limit) { @@ -472,7 +472,7 @@ void CPHElement::PhDataUpdate(dReal step) } ////////////////secure - ///rotation//////////////////////////////////////////////////////////////////////////////////////// + /// rotation//////////////////////////////////////////////////////////////////////////////////////// { VERIFY(dQ_valid(dBodyGetQuaternion(m_body))); } @@ -484,7 +484,7 @@ void CPHElement::PhDataUpdate(dReal step) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////position - ///update/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// update/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// VERIFY(dBodyStateValide(m_body)); VERIFY2(dV_valid(dBodyGetPosition(m_body)), "invalid body position"); @@ -505,7 +505,7 @@ void CPHElement::PhDataUpdate(dReal step) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////air - ///resistance///////////////////////////////////////////////////////////////////////////////////////////////////// + /// resistance///////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (!fis_zero(k_w)) @@ -513,8 +513,8 @@ void CPHElement::PhDataUpdate(dReal step) dMass mass; dBodyGetMass(m_body, &mass); - dReal l_air = linear_velocity_mag * k_l; // force/velocity !!! - if (l_air > mass.mass / fixed_step) l_air = mass.mass / fixed_step; // validate + dReal l_air = linear_velocity_mag * k_l; // force/velocity !!! + if (l_air > mass.mass / fixed_step) l_air = mass.mass / fixed_step; // validate if (!fis_zero(l_air)) dBodyAddForce(m_body, -linear_velocity[0] * l_air, -linear_velocity[1] * l_air, -linear_velocity[2] * l_air); @@ -803,7 +803,7 @@ void CPHElement::GetAnimBonePos(Fmatrix& bp) // IKinematicsAnimated *ak = pK->dcast_PKinematicsAnimated(); // VERIFY(ak); CBoneInstance* BI = &pK->LL_GetBoneInstance(m_SelfID); - if (!BI->callback()) //. + if (!BI->callback()) //. { bp.set(BI->mTransform); return; @@ -969,7 +969,7 @@ void CPHElement::SetMaterial(u16 m) CPHGeometryOwner::SetMaterial(m); } -dMass* CPHElement::getMassTensor() // aux +dMass* CPHElement::getMassTensor() // aux { return &m_mass; } @@ -1063,14 +1063,14 @@ void CPHElement::setTorque(const Fvector& torque) VERIFY(dBodyStateValide(m_body)); } -void CPHElement::applyForce(const Fvector& dir, float val) // aux +void CPHElement::applyForce(const Fvector& dir, float val) // aux { applyForce(dir.x * val, dir.y * val, dir.z * val); } -void CPHElement::applyForce(float x, float y, float z) // called anywhere ph state influent +void CPHElement::applyForce(float x, float y, float z) // called anywhere ph state influent { VERIFY(_valid(x) && _valid(y) && _valid(z)); - if (!isActive()) return; // hack?? + if (!isActive()) return; // hack?? if (m_flags.test(flFixed)) return; if (!dBodyIsEnabled(m_body)) dBodyEnable(m_body); m_shell->EnableObject(0); @@ -1079,7 +1079,7 @@ void CPHElement::applyForce(float x, float y, float z) // called anywhere ph st VERIFY(dBodyStateValide(m_body)); } -void CPHElement::applyImpulse(const Fvector& dir, float val) // aux +void CPHElement::applyImpulse(const Fvector& dir, float val) // aux { applyForce(dir.x * val / fixed_step, dir.y * val / fixed_step, dir.z * val / fixed_step); } diff --git a/src/xrPhysics/PHElement.h b/src/xrPhysics/PHElement.h index cb81b378ecc..f59f829a1a2 100644 --- a/src/xrPhysics/PHElement.h +++ b/src/xrPhysics/PHElement.h @@ -28,26 +28,26 @@ class CPHElement : public CPhysicsElement, friend class CPHFracturesHolder; // float m_start_time; //uu ->to shell ?? //aux - dMass m_mass; // e ?? //bl - dBodyID m_body; // e //st - dReal m_l_scale; // ->to shell ?? //bl - dReal m_w_scale; // ->to shell ?? //bl - CPHElement* m_parent_element; // bool ! //bl - CPHShell* m_shell; // e //bl - CPHInterpolation m_body_interpolation; // e //bl - CPHFracturesHolder* m_fratures_holder; // e //bl + dMass m_mass; // e ?? //bl + dBodyID m_body; // e //st + dReal m_l_scale; // ->to shell ?? //bl + dReal m_w_scale; // ->to shell ?? //bl + CPHElement* m_parent_element; // bool ! //bl + CPHShell* m_shell; // e //bl + CPHInterpolation m_body_interpolation; // e //bl + CPHFracturesHolder* m_fratures_holder; // e //bl - dReal m_w_limit; //->to shell ?? //bl - dReal m_l_limit; //->to shell ?? //bl - // dVector3 m_safe_position; //e //st - // dQuaternion m_safe_quaternion; - // dVector3 m_safe_velocity; //e //st - // Fmatrix m_inverse_local_transform; //e //bt - dReal k_w; //->to shell ?? //st - dReal k_l; //->to shell ?? //st + dReal m_w_limit; //->to shell ?? //bl + dReal m_l_limit; //->to shell ?? //bl + // dVector3 m_safe_position; //e //st + // dQuaternion m_safe_quaternion; + // dVector3 m_safe_velocity; //e //st + // Fmatrix m_inverse_local_transform; //e //bt + dReal k_w; //->to shell ?? //st + dReal k_l; //->to shell ?? //st // ObjectContactCallbackFun* temp_for_push_out; //->to shell ?? //aux // u32 push_untill; //->to shell ?? //st - Flags8 m_flags; // + Flags8 m_flags; // enum { flActive = 1 << 0, @@ -64,14 +64,14 @@ class CPHElement : public CPhysicsElement, private: ////////////////////////////////////////////Interpolation///////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void FillInterpolation() // interpolation called anywhere visual influent + void FillInterpolation() // interpolation called anywhere visual influent { m_body_interpolation.ResetPositions(); m_body_interpolation.ResetRotations(); // bUpdate=true; m_flags.set(flUpdate, TRUE); } - IC void UpdateInterpolation() // interpolation called from ph update visual influent + IC void UpdateInterpolation() // interpolation called from ph update visual influent { /// VERIFY(dBodyStateValide(m_body)); m_body_interpolation.UpdatePositions(); @@ -83,79 +83,79 @@ class CPHElement : public CPhysicsElement, public: ////////////////////////////////////////////////Geometry///////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual void add_Sphere(const Fsphere& V); // aux - virtual void add_Box(const Fobb& V); // aux - virtual void add_Cylinder(const Fcylinder& V); // aux - virtual void add_Shape(const SBoneShape& shape); // aux - virtual void add_Shape(const SBoneShape& shape, const Fmatrix& offset); // aux + virtual void add_Sphere(const Fsphere& V); // aux + virtual void add_Box(const Fobb& V); // aux + virtual void add_Cylinder(const Fcylinder& V); // aux + virtual void add_Shape(const SBoneShape& shape); // aux + virtual void add_Shape(const SBoneShape& shape, const Fmatrix& offset); // aux virtual CODEGeom* last_geom() { return CPHGeometryOwner::last_geom(); } virtual CODEGeom* geometry(u16 i) { return CPHGeometryOwner::Geom(i); } virtual const IPhysicsGeometry* geometry(u16 i) const { return CPHGeometryOwner::Geom(i); }; virtual void add_geom(CODEGeom* g); virtual void remove_geom(CODEGeom* g); virtual bool has_geoms() { return CPHGeometryOwner::has_geoms(); } - virtual void set_ContactCallback(ContactCallbackFun* callback); // aux (may not be) - virtual void set_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent - virtual void add_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent + virtual void set_ContactCallback(ContactCallbackFun* callback); // aux (may not be) + virtual void set_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent + virtual void add_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent virtual void remove_ObjectContactCallback(ObjectContactCallbackFun* callback); virtual void set_CallbackData(void* cd); virtual void* get_CallbackData(); virtual ObjectContactCallbackFun* get_ObjectContactCallback(); - virtual void set_PhysicsRefObject(IPhysicsShellHolder* ref_object); // aux - virtual IPhysicsShellHolder* PhysicsRefObject() { return m_phys_ref_object; } // aux - virtual void SetMaterial(u16 m); // aux - virtual void SetMaterial(LPCSTR m) { CPHGeometryOwner::SetMaterial(m); } // aux - virtual u16 numberOfGeoms() const; // aux - virtual const Fvector& local_mass_Center() { return CPHGeometryOwner::local_mass_Center(); } // aux - virtual float getVolume() { return CPHGeometryOwner::get_volume(); } // aux - virtual void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const; // aux + virtual void set_PhysicsRefObject(IPhysicsShellHolder* ref_object); // aux + virtual IPhysicsShellHolder* PhysicsRefObject() { return m_phys_ref_object; } // aux + virtual void SetMaterial(u16 m); // aux + virtual void SetMaterial(LPCSTR m) { CPHGeometryOwner::SetMaterial(m); } // aux + virtual u16 numberOfGeoms() const; // aux + virtual const Fvector& local_mass_Center() { return CPHGeometryOwner::local_mass_Center(); } // aux + virtual float getVolume() { return CPHGeometryOwner::get_volume(); } // aux + virtual void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const; // aux virtual void get_MaxAreaDir(Fvector& dir) { CPHGeometryOwner::get_MaxAreaDir(dir); } virtual float getRadius(); virtual void GetPointVel(Fvector& res_vel, const Fvector& point) const; ////////////////////////////////////////////////////Mass///////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private: - void calculate_it_data(const Fvector& mc, float mass); // aux - void calculate_it_data_use_density(const Fvector& mc, float density); // aux + void calculate_it_data(const Fvector& mc, float mass); // aux + void calculate_it_data_use_density(const Fvector& mc, float density); // aux void calc_it_fract_data_use_density( - const Fvector& mc, float density); // sets element mass and fractures parts mass //aux - dMass recursive_mass_summ(u16 start_geom, FRACTURE_I cur_fracture); // aux -public: // - virtual const Fvector& mass_Center() const; // aux - virtual void setDensity(float M); // aux - virtual float getDensity() { return m_mass.mass / m_volume; } // aux - virtual void setMassMC(float M, const Fvector& mass_center); // aux - virtual void setDensityMC(float M, const Fvector& mass_center); // aux + const Fvector& mc, float density); // sets element mass and fractures parts mass //aux + dMass recursive_mass_summ(u16 start_geom, FRACTURE_I cur_fracture); // aux +public: // + virtual const Fvector& mass_Center() const; // aux + virtual void setDensity(float M); // aux + virtual float getDensity() { return m_mass.mass / m_volume; } // aux + virtual void setMassMC(float M, const Fvector& mass_center); // aux + virtual void setDensityMC(float M, const Fvector& mass_center); // aux virtual void set_local_mass_center(const Fvector& mc); - virtual void setInertia(const dMass& M); // aux + virtual void setInertia(const dMass& M); // aux virtual void addInertia(const dMass& M); virtual void add_Mass(const SBoneShape& shape, const Fmatrix& offset, const Fvector& mass_center, float mass, - CPHFracture* fracture = NULL); // aux - virtual void set_BoxMass(const Fobb& box, float mass); // aux - virtual void setMass(float M); // aux - virtual float getMass() { return m_mass.mass; } // aux - virtual dMass* getMassTensor(); // aux - void ReAdjustMassPositions(const Fmatrix& shift_pivot, float density); // aux - void ResetMass(float density); // aux + CPHFracture* fracture = NULL); // aux + virtual void set_BoxMass(const Fobb& box, float mass); // aux + virtual void setMass(float M); // aux + virtual float getMass() { return m_mass.mass; } // aux + virtual dMass* getMassTensor(); // aux + void ReAdjustMassPositions(const Fmatrix& shift_pivot, float density); // aux + void ResetMass(float density); // aux void CutVelocity(float l_limit, float a_limit); ///////////////////////////////////////////////////PushOut/////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -private: // -public: // - //////////////////////////////////////////////Disable///////////////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual void Disable(); // - virtual void ReEnable(); // - void Enable(); // aux +private: // +public: // + //////////////////////////////////////////////Disable///////////////////////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + virtual void Disable(); // + virtual void ReEnable(); // + void Enable(); // aux virtual bool isEnabled() const { return isActive() && dBodyIsEnabled(m_body); } virtual bool isFullActive() const { return isActive() && !m_flags.test(flActivating); } virtual bool isActive() const { return !!m_flags.test(flActive); } - virtual void Freeze(); // - virtual void UnFreeze(); // - virtual bool EnabledStateOnStep() { return dBodyIsEnabled(m_body) || m_flags.test(flEnabledOnStep); } // - ////////////////////////////////////////////////Updates/////////////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + virtual void Freeze(); // + virtual void UnFreeze(); // + virtual bool EnabledStateOnStep() { return dBodyIsEnabled(m_body) || m_flags.test(flEnabledOnStep); } // + ////////////////////////////////////////////////Updates/////////////////////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool AnimToVel(float dt, float l_limit, float a_limit); // void BoneGlPos (Fmatrix &m, const CBoneInstance* B)const; void BoneGlPos(Fmatrix& m, const Fmatrix& BoneTransform) const; @@ -170,120 +170,120 @@ class CPHElement : public CPhysicsElement, virtual void dbg_draw_geometry(float scale, u32 color, Flags32 flags = Flags32().assign(0)) const; #endif void SetBoneCallbackOverwrite(bool v); - void BonesCallBack(CBoneInstance* B); // called from updateCL visual influent + void BonesCallBack(CBoneInstance* B); // called from updateCL visual influent void StataticRootBonesCallBack(CBoneInstance* B); - void PhDataUpdate(dReal step); // ph update - void PhTune(dReal step); // ph update - virtual void Update(); // called update CL visual influence + void PhDataUpdate(dReal step); // ph update + void PhTune(dReal step); // ph update + virtual void Update(); // called update CL visual influence //////////////////////////////////////////////////Dynamics//////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual void SetAirResistance(dReal linear = default_k_l, dReal angular = default_k_w) // aux (may not be) - { // - k_w = angular; // - k_l = linear; // - } // - virtual void GetAirResistance(float& linear, float& angular) // - { // - linear = k_l; // - angular = k_w; // + virtual void SetAirResistance(dReal linear = default_k_l, dReal angular = default_k_w) // aux (may not be) + { // + k_w = angular; // + k_l = linear; // + } // + virtual void GetAirResistance(float& linear, float& angular) // + { // + linear = k_l; // + angular = k_w; // } - virtual void applyImpact(const SPHImpact& impact); // + virtual void applyImpact(const SPHImpact& impact); // virtual void applyImpulseTrace( - const Fvector& pos, const Fvector& dir, float val, const u16 id); // called anywhere ph state influent - virtual void set_DisableParams(const SAllDDOParams& params); // + const Fvector& pos, const Fvector& dir, float val, const u16 id); // called anywhere ph state influent + virtual void set_DisableParams(const SAllDDOParams& params); // virtual void set_DynamicLimits( - float l_limit = default_l_limit, float w_limit = default_w_limit); // aux (may not be) + float l_limit = default_l_limit, float w_limit = default_w_limit); // aux (may not be) virtual void set_DynamicScales( - float l_scale = default_l_scale, float w_scale = default_w_scale); // aux (may not be) + float l_scale = default_l_scale, float w_scale = default_w_scale); // aux (may not be) virtual void Fix(); virtual void SetAnimated(bool v); virtual void ReleaseFixed(); virtual bool isFixed() { return !!(m_flags.test(flFixed)); } - virtual void applyForce(const Fvector& dir, float val); // aux - virtual void applyForce(float x, float y, float z); // called anywhere ph state influent - virtual void applyImpulse(const Fvector& dir, float val); // aux - virtual void applyImpulseVsMC(const Fvector& pos, const Fvector& dir, float val); // - virtual void applyImpulseVsGF(const Fvector& pos, const Fvector& dir, float val); // + virtual void applyForce(const Fvector& dir, float val); // aux + virtual void applyForce(float x, float y, float z); // called anywhere ph state influent + virtual void applyImpulse(const Fvector& dir, float val); // aux + virtual void applyImpulseVsMC(const Fvector& pos, const Fvector& dir, float val); // + virtual void applyImpulseVsGF(const Fvector& pos, const Fvector& dir, float val); // virtual void applyGravityAccel(const Fvector& accel); virtual void getForce(Fvector& force); virtual void getTorque(Fvector& torque); - virtual void get_LinearVel(Fvector& velocity) const; // aux - virtual void get_AngularVel(Fvector& velocity) const; // aux - virtual void set_LinearVel(const Fvector& velocity); // called anywhere ph state influent - virtual void set_AngularVel(const Fvector& velocity); // called anywhere ph state influent - virtual void setForce(const Fvector& force); // - virtual void setTorque(const Fvector& torque); // - virtual void set_ApplyByGravity(bool flag); // - virtual bool get_ApplyByGravity(); // - ///////////////////////////////////////////////////Net//////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual void get_State(SPHNetState& state); // - virtual void set_State(const SPHNetState& state); // + virtual void get_LinearVel(Fvector& velocity) const; // aux + virtual void get_AngularVel(Fvector& velocity) const; // aux + virtual void set_LinearVel(const Fvector& velocity); // called anywhere ph state influent + virtual void set_AngularVel(const Fvector& velocity); // called anywhere ph state influent + virtual void setForce(const Fvector& force); // + virtual void setTorque(const Fvector& torque); // + virtual void set_ApplyByGravity(bool flag); // + virtual bool get_ApplyByGravity(); // + ///////////////////////////////////////////////////Net//////////////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + virtual void get_State(SPHNetState& state); // + virtual void set_State(const SPHNetState& state); // virtual void net_Import(NET_Packet& P); virtual void net_Export(NET_Packet& P); ///////////////////////////////////////////////////Position/////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual void SetTransform(const Fmatrix& m0, motion_history_state history_state); // + virtual void SetTransform(const Fmatrix& m0, motion_history_state history_state); // virtual void TransformPosition(const Fmatrix& form, motion_history_state history_state); - virtual void getQuaternion(Fquaternion& quaternion); // - virtual void setQuaternion(const Fquaternion& quaternion); // - virtual void SetGlobalPositionDynamic(const Fvector& position); // - virtual void GetGlobalPositionDynamic(Fvector* v); // - virtual void cv2obj_Xfrom(const Fquaternion& q, const Fvector& pos, Fmatrix& xform); // - virtual void cv2bone_Xfrom(const Fquaternion& q, const Fvector& pos, Fmatrix& xform); // - virtual void InterpolateGlobalTransform(Fmatrix* m); // called UpdateCL vis influent - virtual void InterpolateGlobalPosition(Fvector* v); // aux - virtual void GetGlobalTransformDynamic(Fmatrix* m) const; // aux + virtual void getQuaternion(Fquaternion& quaternion); // + virtual void setQuaternion(const Fquaternion& quaternion); // + virtual void SetGlobalPositionDynamic(const Fvector& position); // + virtual void GetGlobalPositionDynamic(Fvector* v); // + virtual void cv2obj_Xfrom(const Fquaternion& q, const Fvector& pos, Fmatrix& xform); // + virtual void cv2bone_Xfrom(const Fquaternion& q, const Fvector& pos, Fmatrix& xform); // + virtual void InterpolateGlobalTransform(Fmatrix* m); // called UpdateCL vis influent + virtual void InterpolateGlobalPosition(Fvector* v); // aux + virtual void GetGlobalTransformDynamic(Fmatrix* m) const; // aux IC void InverceLocalForm(Fmatrix&); IC void MulB43InverceLocalForm(Fmatrix&) const; ////////////////////////////////////////////////////Structure///////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual CPhysicsShell* PhysicsShell(); // aux + virtual CPhysicsShell* PhysicsShell(); // aux CPHShell* PHShell(); - virtual void set_ParentElement(CPhysicsElement* p) { m_parent_element = (CPHElement*)p; } // aux + virtual void set_ParentElement(CPhysicsElement* p) { m_parent_element = (CPHElement*)p; } // aux #ifdef DEBUG CPhysicsElement* parent_element() { return m_parent_element; } #endif - void SetShell(CPHShell* p); // aux - virtual dBodyID get_body() { return m_body; } // aux - virtual const dBodyID get_bodyConst() const { return m_body; } // aux + void SetShell(CPHShell* p); // aux + virtual dBodyID get_body() { return m_body; } // aux + virtual const dBodyID get_bodyConst() const { return m_body; } // aux //////////////////////////////////////////////////////Breakable////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - IC CPHFracturesHolder* FracturesHolder() { return m_fratures_holder; } // aux - IC const CPHFracturesHolder* constFracturesHolder() const { return m_fratures_holder; } // aux - void DeleteFracturesHolder(); // - virtual bool isBreakable(); // aux - virtual u16 setGeomFracturable(CPHFracture& fracture); // aux - virtual CPHFracture& Fracture(u16 num); // aux - void SplitProcess(ELEMENT_PAIR_VECTOR& new_elements); // aux - void PassEndGeoms(u16 from, u16 to, CPHElement* dest); // aux + IC CPHFracturesHolder* FracturesHolder() { return m_fratures_holder; } // aux + IC const CPHFracturesHolder* constFracturesHolder() const { return m_fratures_holder; } // aux + void DeleteFracturesHolder(); // + virtual bool isBreakable(); // aux + virtual u16 setGeomFracturable(CPHFracture& fracture); // aux + virtual CPHFracture& Fracture(u16 num); // aux + void SplitProcess(ELEMENT_PAIR_VECTOR& new_elements); // aux + void PassEndGeoms(u16 from, u16 to, CPHElement* dest); // aux ////////////////////////////////////////////////////Build/Activate//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual void Activate( - const Fmatrix& m0, float dt01, const Fmatrix& m2, bool disable = false); // some isues not to be aux + const Fmatrix& m0, float dt01, const Fmatrix& m2, bool disable = false); // some isues not to be aux virtual void Activate(const Fmatrix& transform, const Fvector& lin_vel, const Fvector& ang_vel, - bool disable = false); // some isues not to be aux - virtual void Activate(bool disable = false, bool not_set_bone_callbacks = false); // some isues not to be aux - virtual void Activate(const Fmatrix& start_from, bool disable = false); // some isues not to be aux - virtual void Deactivate(); // aux - // //aux + bool disable = false); // some isues not to be aux + virtual void Activate(bool disable = false, bool not_set_bone_callbacks = false); // some isues not to be aux + virtual void Activate(const Fmatrix& start_from, bool disable = false); // some isues not to be aux + virtual void Deactivate(); // aux + // //aux void SetBoneCallback(); void ClearBoneCallback(); - void CreateSimulBase(); // create body & cpace //aux - void ReInitDynamics(const Fmatrix& shift_pivot, float density); // set body & geom positions - void PresetActive(); // - void build(); // aux - void build(bool disable); // aux - void destroy(); // called anywhere ph state influent - void Start(); // aux - void RunSimulation(); // called anywhere ph state influent - void RunSimulation(const Fmatrix& start_from); // + void CreateSimulBase(); // create body & cpace //aux + void ReInitDynamics(const Fmatrix& shift_pivot, float density); // set body & geom positions + void PresetActive(); // + void build(); // aux + void build(bool disable); // aux + void destroy(); // called anywhere ph state influent + void Start(); // aux + void RunSimulation(); // called anywhere ph state influent + void RunSimulation(const Fmatrix& start_from); // void ClearDestroyInfo(); void GetAnimBonePos(Fmatrix& bp); // bool CheckBreakConsistent () - CPHElement(); // aux - virtual ~CPHElement(); // aux + CPHElement(); // aux + virtual ~CPHElement(); // aux private: virtual iphysics_scripted& get_scripted() { return *this; } public: diff --git a/src/xrPhysics/PHFracture.cpp b/src/xrPhysics/PHFracture.cpp index 223eb7f3ee0..49f26615b05 100644 --- a/src/xrPhysics/PHFracture.cpp +++ b/src/xrPhysics/PHFracture.cpp @@ -85,7 +85,7 @@ element_fracture CPHFracturesHolder::SplitFromEnd(CPHElement* element, u16 fract element_fracture ret = mk_pair(new_element, (CShellSplitInfo)(*fract_i)); if (m_fractures.size() - fracture > 0) { - if (new_element->m_fratures_holder == NULL) // create fractures holder if it was not created before + if (new_element->m_fratures_holder == NULL) // create fractures holder if it was not created before { new_element->m_fratures_holder = new CPHFracturesHolder(); } @@ -104,15 +104,15 @@ void CPHFracturesHolder::PassEndFractures(u16 from, CPHElement* dest) u16 passed_geoms = end_geom - begin_geom_num; if (i_from == e) return; - for (; i != i_from; ++i) // correct end geoms for fractures leaved in source + for (; i != i_from; ++i) // correct end geoms for fractures leaved in source { u16& cur_end_geom = i->m_end_geom_num; if (cur_end_geom > begin_geom_num) cur_end_geom = cur_end_geom - passed_geoms; } - i++; // omit used fracture; + i++; // omit used fracture; // these to be passed - for (; i != e; i++) // itterate antil a fracture where geom num > end geom num + for (; i != e; i++) // itterate antil a fracture where geom num > end geom num { u16& cur_end_geom = i->m_end_geom_num; u16& cur_geom = i->m_start_geom_num; @@ -121,7 +121,7 @@ void CPHFracturesHolder::PassEndFractures(u16 from, CPHElement* dest) cur_geom = cur_geom - leaved_geoms; } FRACTURE_I i_to = i; - for (; i != e; ++i) // correct data in the rest leaved fractures + for (; i != e; ++i) // correct data in the rest leaved fractures { u16& cur_end_geom = i->m_end_geom_num; u16& cur_geom = i->m_start_geom_num; @@ -129,7 +129,7 @@ void CPHFracturesHolder::PassEndFractures(u16 from, CPHElement* dest) cur_geom = cur_geom - passed_geoms; } - if (i_from + 1 != i_to) // insure it!! + if (i_from + 1 != i_to) // insure it!! { CPHFracturesHolder*& dest_fract_holder = dest->m_fratures_holder; if (!dest_fract_holder) dest_fract_holder = new CPHFracturesHolder(); @@ -139,7 +139,7 @@ void CPHFracturesHolder::PassEndFractures(u16 from, CPHElement* dest) // u16 deb=u16(i_to-i_from-1); // deb++;deb--; } - m_fractures.erase(i_from, i_to); // erase along whith used fracture + m_fractures.erase(i_from, i_to); // erase along whith used fracture } void CPHFracturesHolder::SplitProcess(CPHElement* element, ELEMENT_PAIR_VECTOR& new_elements) { @@ -251,21 +251,21 @@ void CPHFracturesHolder::SubFractureMass(u16 fracture_num) if (start_geom > f_i->m_start_geom_num) { if (end_geom <= f_i->m_end_geom_num) - f_i->MassSubFromSecond(second_mass); // tag fracture is in current + f_i->MassSubFromSecond(second_mass); // tag fracture is in current else { R_ASSERT2(start_geom >= f_i->m_end_geom_num, "Odd fracture!!!"); - f_i->MassSubFromFirst(second_mass); // tag fracture is ouside current + f_i->MassSubFromFirst(second_mass); // tag fracture is ouside current } } else { if (end_geom >= f_i->m_end_geom_num) - f_i->MassSubFromFirst(first_mass); // current fracture is in tag + f_i->MassSubFromFirst(first_mass); // current fracture is in tag else { R_ASSERT2(end_geom <= f_i->m_start_geom_num, "Odd fracture!!!"); - f_i->MassSubFromFirst(second_mass); // tag fracture is ouside current + f_i->MassSubFromFirst(second_mass); // tag fracture is ouside current } } } @@ -301,8 +301,8 @@ bool CPHFracture::Update(CPHElement* element) // const Fvector& body_local_pos=element->local_mass_Center(); const Fvector& body_global_pos = *(const Fvector*)dBodyGetPosition(body); Fvector body_to_first, body_to_second; - body_to_first.set(*((const Fvector*)m_firstM.c)); //,body_local_pos - body_to_second.set(*((const Fvector*)m_secondM.c)); //,body_local_pos + body_to_first.set(*((const Fvector*)m_firstM.c)); //,body_local_pos + body_to_second.set(*((const Fvector*)m_secondM.c)); //,body_local_pos // float body_to_first_smag=body_to_first.square_magnitude(); // float body_to_second_smag=body_to_second.square_magnitude(); int num = dBodyGetNumJoints(body); @@ -346,7 +346,7 @@ bool CPHFracture::Update(CPHElement* element) else { CPHJoint* J = (CPHJoint*)dJointGetData(joint); - if (!J) continue; // hack.. + if (!J) continue; // hack.. J->PSecondElement()->InterpolateGlobalPosition(&joint_position); CODEGeom* root_geom = J->RootGeom(); if (root_geom) { @@ -486,13 +486,13 @@ bool CPHFracture::Update(CPHElement* element) #endif } - Fvector break_force; //=1/(m1+m2)*(F1*m2-F2*m1)+r2xT2/(r2^2)-r1xT1/(r1^2) + Fvector break_force; //=1/(m1+m2)*(F1*m2-F2*m1)+r2xT2/(r2^2)-r1xT1/(r1^2) break_force.set(first_part_force); break_force.mul(m_secondM.mass); vtemp.set(second_part_force); vtemp.mul(m_firstM.mass); break_force.sub(vtemp); - break_force.mul(1.f / element->getMass()); // element->getMass()//body->mass.mass + break_force.mul(1.f / element->getMass()); // element->getMass()//body->mass.mass // vtemp.crossproduct(second_in_bone,second_part_torque); // break_force.add(vtemp); diff --git a/src/xrPhysics/PHFracture.h b/src/xrPhysics/PHFracture.h index ad549c027da..b649bb8da81 100644 --- a/src/xrPhysics/PHFracture.h +++ b/src/xrPhysics/PHFracture.h @@ -77,27 +77,27 @@ typedef xr_vector::reverse_iterator ELEMENT_PAIR_RI; typedef xr_vector::reverse_iterator FRACTURE_RI; DEFINE_VECTOR(element_fracture, ELEMENT_PAIR_VECTOR, ELEMENT_PAIR_I) -class CPHFracturesHolder // stored in CPHElement +class CPHFracturesHolder // stored in CPHElement { friend class CPHElement; friend class CPHShellSplitterHolder; bool m_has_breaks; FRACTURE_STORAGE m_fractures; - PH_IMPACT_STORAGE m_impacts; // filled in anytime from CPHElement applyImpulseTrace cleared in PhDataUpdate - CFEEDBACK_STORAGE m_feedbacks; // this store feedbacks for non contact joints + PH_IMPACT_STORAGE m_impacts; // filled in anytime from CPHElement applyImpulseTrace cleared in PhDataUpdate + CFEEDBACK_STORAGE m_feedbacks; // this store feedbacks for non contact joints public: CPHFracturesHolder(); ~CPHFracturesHolder(); - void DistributeAdditionalMass(u16 geom_num, const dMass& m); // + void DistributeAdditionalMass(u16 geom_num, const dMass& m); // void SubFractureMass(u16 fracture_num); void AddImpact(const Fvector& force, const Fvector& point, u16 id); PH_IMPACT_STORAGE& Impacts() { return m_impacts; } CPHFracture& LastFracture() { return m_fractures.back(); } protected: private: - u16 CheckFractured(); // returns first breaked fracture + u16 CheckFractured(); // returns first breaked fracture element_fracture SplitFromEnd(CPHElement* element, u16 geom_num); void InitNewElement(CPHElement* element, const Fmatrix& shift_pivot, float density); @@ -107,10 +107,10 @@ class CPHFracturesHolder // stored in CPHElement void SplitProcess(CPHElement* element, ELEMENT_PAIR_VECTOR& new_elements); u16 AddFracture(const CPHFracture& fracture); CPHFracture& Fracture(u16 num); - void PhTune(dBodyID body); // set feedback for joints called from PhTune of ShellSplitterHolder - bool PhDataUpdate(CPHElement* element); // collect joints and external impacts in fractures Update which set - // m_fractured; called from PhDataUpdate of ShellSplitterHolder returns - // true if has breaks + void PhTune(dBodyID body); // set feedback for joints called from PhTune of ShellSplitterHolder + bool PhDataUpdate(CPHElement* element); // collect joints and external impacts in fractures Update which set + // m_fractured; called from PhDataUpdate of ShellSplitterHolder returns + // true if has breaks void ApplyImpactsToElement(CPHElement* element); }; diff --git a/src/xrPhysics/PHGeometryOwner.cpp b/src/xrPhysics/PHGeometryOwner.cpp index b554ead4f4a..5d60dd5160c 100644 --- a/src/xrPhysics/PHGeometryOwner.cpp +++ b/src/xrPhysics/PHGeometryOwner.cpp @@ -173,8 +173,8 @@ dGeomID CPHGeometryOwner::dSpacedGeometry() if (!b_builded) return 0; VERIFY(m_group); // if(m_group) - return (dGeomID)group_space(); //(dGeomID)m_group; - // else return (*m_geoms.begin())->geometry_transform(); + return (dGeomID)group_space(); //(dGeomID)m_group; + // else return (*m_geoms.begin())->geometry_transform(); } void CPHGeometryOwner::add_Box(const Fobb& V) diff --git a/src/xrPhysics/PHGeometryOwner.h b/src/xrPhysics/PHGeometryOwner.h index 7ef819d7867..08749bf1639 100644 --- a/src/xrPhysics/PHGeometryOwner.h +++ b/src/xrPhysics/PHGeometryOwner.h @@ -11,31 +11,31 @@ class IKinematics; class CPHGeometryOwner { protected: - GEOM_STORAGE m_geoms; // e + GEOM_STORAGE m_geoms; // e // bl bool b_builded; private: - dSpaceID m_group; // e //bl + dSpaceID m_group; // e //bl protected: - Fvector m_mass_center; // e ?? //bl - IPhysicsShellHolder* m_phys_ref_object; //->to shell ?? //bl - float m_volume; // e ?? //bl - u16 ul_material; // e ?? //bl - ContactCallbackFun* contact_callback; //->to shell ?? //bt - ObjectContactCallbackFun* object_contact_callback; //->to shell ?? //st + Fvector m_mass_center; // e ?? //bl + IPhysicsShellHolder* m_phys_ref_object; //->to shell ?? //bl + float m_volume; // e ?? //bl + u16 ul_material; // e ?? //bl + ContactCallbackFun* contact_callback; //->to shell ?? //bt + ObjectContactCallbackFun* object_contact_callback; //->to shell ?? //st public: /// - void add_Sphere(const Fsphere& V); // aux - void add_Box(const Fobb& V); // aux - void add_Cylinder(const Fcylinder& V); // aux - void add_Shape(const SBoneShape& shape); // aux - void add_Shape(const SBoneShape& shape, const Fmatrix& offset); // aux + void add_Sphere(const Fsphere& V); // aux + void add_Box(const Fobb& V); // aux + void add_Cylinder(const Fcylinder& V); // aux + void add_Shape(const SBoneShape& shape); // aux + void add_Shape(const SBoneShape& shape, const Fmatrix& offset); // aux CODEGeom* last_geom() { if (m_geoms.empty()) return NULL; return m_geoms.back(); - } // aux + } // aux bool has_geoms() { return !m_geoms.empty(); } void add_geom(CODEGeom* g); void remove_geom(CODEGeom* g); @@ -45,21 +45,21 @@ class CPHGeometryOwner void group_remove(CODEGeom& g); public: - void set_ContactCallback(ContactCallbackFun* callback); // aux (may not be) - void set_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent - void add_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent - void remove_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent + void set_ContactCallback(ContactCallbackFun* callback); // aux (may not be) + void set_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent + void add_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent + void remove_ObjectContactCallback(ObjectContactCallbackFun* callback); // called anywhere ph state influent void set_CallbackData(void* cd); void* get_CallbackData(); ObjectContactCallbackFun* get_ObjectContactCallback(); - void set_PhysicsRefObject(IPhysicsShellHolder* ref_object); // aux - IPhysicsShellHolder* PhysicsRefObject() { return m_phys_ref_object; } // aux + void set_PhysicsRefObject(IPhysicsShellHolder* ref_object); // aux + IPhysicsShellHolder* PhysicsRefObject() { return m_phys_ref_object; } // aux void SetPhObjectInGeomData(CPHObject* O); #ifdef DEBUG void dbg_draw(float scale, u32 color, Flags32 flags) const; #endif void SetMaterial(u16 m); - void SetMaterial(LPCSTR m) { SetMaterial(GMLibrary().GetMaterialIdx(m)); } // aux + void SetMaterial(LPCSTR m) { SetMaterial(GMLibrary().GetMaterialIdx(m)); } // aux IC CODEGeom* Geom(u16 num) { R_ASSERT2(num < m_geoms.size(), "out of range"); @@ -71,23 +71,23 @@ class CPHGeometryOwner return m_geoms[num]; } CODEGeom* GeomByBoneID(u16 bone_id); - u16 numberOfGeoms() const; // aux + u16 numberOfGeoms() const; // aux dGeomID dSpacedGeometry(); protected: IC dSpaceID group_space() { return m_group; } public: - Fvector get_mc_data(); // aux - Fvector get_mc_geoms(); // aux + Fvector get_mc_data(); // aux + Fvector get_mc_geoms(); // aux void get_mc_kinematics(IKinematics* K, Fvector& mc, float& mass); - void calc_volume_data(); // aux - const Fvector& local_mass_Center() { return m_mass_center; } // aux + void calc_volume_data(); // aux + const Fvector& local_mass_Center() { return m_mass_center; } // aux float get_volume() { calc_volume_data(); return m_volume; - }; // aux - void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const; // aux + }; // aux + void get_Extensions(const Fvector& axis, float center_prg, float& lo_ext, float& hi_ext) const; // aux void get_MaxAreaDir(Fvector& dir); float getRadius(); void setStaticForm(const Fmatrix& form); @@ -101,7 +101,7 @@ class CPHGeometryOwner void CreateGroupSpace(); void DestroyGroupSpace(); void destroy(); - void build_Geom(CODEGeom& V); // aux + void build_Geom(CODEGeom& V); // aux void build_Geom(u16 i); void set_body(dBodyID body); diff --git a/src/xrPhysics/PHIsland.cpp b/src/xrPhysics/PHIsland.cpp index e950bf6420d..a9bdbdb26bc 100644 --- a/src/xrPhysics/PHIsland.cpp +++ b/src/xrPhysics/PHIsland.cpp @@ -30,7 +30,7 @@ void CPHIsland::Repair() if (!dV_valid(dBodyGetLinearVel(body))) dBodySetLinearVel(body, 0.f, 0.f, 0.f); if (!dV_valid(dBodyGetPosition(body))) dBodySetPosition(body, 0.f, 0.f, 0.f); if (!dQ_valid(dBodyGetQuaternion(body))) { - dQuaternion q = {1.f, 0.f, 0.f, 0.f}; // dQSetIdentity(q); + dQuaternion q = {1.f, 0.f, 0.f, 0.f}; // dQSetIdentity(q); dBodySetQuaternion(body, q); } } diff --git a/src/xrPhysics/PHJoint.cpp b/src/xrPhysics/PHJoint.cpp index 8eafa84bcff..354925859e0 100644 --- a/src/xrPhysics/PHJoint.cpp +++ b/src/xrPhysics/PHJoint.cpp @@ -23,7 +23,7 @@ IC dBodyID body_for_joint(CPhysicsElement* ee) { VERIFY(smart_cast(ee)); CPHElement* e = static_cast(ee); - return e->isFixed() ? 0 : e->get_body(); // return e->get_body();// + return e->isFixed() ? 0 : e->get_body(); // return e->get_body();// } IC void SwapLimits(float& lo, float& hi) { @@ -101,7 +101,7 @@ void CPHJoint::CreateHinge() float hi, lo; CalcAxis(0, axis, lo, hi, first_matrix, second_matrix, rotate); dBodyID b1 = body_for_joint(first); - if (!b1) axis.invert(); // SwapLimits(lo,hi); + if (!b1) axis.invert(); // SwapLimits(lo,hi); dJointAttach(m_joint, b1, body_for_joint(second)); dJointSetHingeAnchor(m_joint, pos.x, pos.y, pos.z); @@ -161,7 +161,7 @@ void CPHJoint::CreateHinge2() ///////////////////////////////////////////////////////// axis.set(0, 0, 0); CalcAxis(0, axis, lo, hi, first_matrix, second_matrix, rotate); - if (!b1) axis.invert(); // SwapLimits(lo,hi); + if (!b1) axis.invert(); // SwapLimits(lo,hi); dJointSetHinge2Axis1(m_joint, axis.x, axis.y, axis.z); dJointSetHinge2Param(m_joint, dParamLoStop, lo); @@ -267,7 +267,7 @@ void CPHJoint::CreateSlider() // axis 1 CalcAxis(1, axis, lo, hi, first_matrix, second_matrix, rotate); - if (!body1) axis.invert(); // SwapLimits(lo,hi); + if (!body1) axis.invert(); // SwapLimits(lo,hi); int rel = body1 ? 1 : 2; dJointSetAMotorAxis(m_joint1, 0, rel, axis.x, axis.y, axis.z); dJointSetAMotorParam(m_joint1, dParamLoStop, lo); @@ -342,7 +342,7 @@ void CPHJoint::CreateFullControl() axis.set(0, 0, 0); // axis 0 CalcAxis(0, axis, lo, hi, first_matrix, second_matrix, rotate); - if (!body1) axis.invert(); // SwapLimits(lo,hi); + if (!body1) axis.invert(); // SwapLimits(lo,hi); dJointSetAMotorAxis(m_joint1, 0, 1, axis.x, axis.y, axis.z); dJointSetAMotorParam(m_joint1, dParamLoStop, lo); dJointSetAMotorParam(m_joint1, dParamHiStop, hi); @@ -354,7 +354,7 @@ void CPHJoint::CreateFullControl() // axis 1 CalcAxis(1, axis, lo, hi, first_matrix, second_matrix, rotate); - if (!body1) axis.invert(); // SwapLimits(lo,hi); + if (!body1) axis.invert(); // SwapLimits(lo,hi); dJointSetAMotorParam(m_joint1, dParamLoStop2, lo); dJointSetAMotorParam(m_joint1, dParamHiStop2, hi); if (!(axes[1].force < 0.f)) { @@ -364,7 +364,7 @@ void CPHJoint::CreateFullControl() // axis 2 CalcAxis(2, axis, lo, hi, first_matrix, second_matrix, rotate); - if (!body1) axis.invert(); // SwapLimits(lo,hi); + if (!body1) axis.invert(); // SwapLimits(lo,hi); dJointSetAMotorAxis(m_joint1, 2, 2, axis.x, axis.y, axis.z); dJointSetAMotorParam(m_joint1, dParamLoStop3, lo); dJointSetAMotorParam(m_joint1, dParamHiStop3, hi); @@ -798,11 +798,11 @@ void CPHJoint::SetLoLimitDynamic(int axis_num, float limit) VERIFY(axis_num <= 1); switch (axis_num) { - case 0: // axes[0].low = limit; + case 0: // axes[0].low = limit; VERIFY(m_joint); dJointSetSliderParam(m_joint, dParamLoStop, limit); break; - case 1: // axes[1].low = limit; + case 1: // axes[1].low = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamLoStop, limit); break; @@ -818,15 +818,15 @@ void CPHJoint::SetLoLimitDynamic(int axis_num, float limit) case full_control: switch (axis_num) { - case 0: // axes[0].low = limit; + case 0: // axes[0].low = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamLoStop, limit); break; - case 1: // axes[1].low = limit; + case 1: // axes[1].low = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamLoStop2, limit); break; - case 2: // axes[2].low = limit; + case 2: // axes[2].low = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamLoStop3, limit); break; @@ -854,11 +854,11 @@ void CPHJoint::SetHiLimitDynamic(int axis_num, float limit) VERIFY(axis_num <= 1); switch (axis_num) { - case 0: // axes[0].high = limit; + case 0: // axes[0].high = limit; VERIFY(m_joint); dJointSetSliderParam(m_joint, dParamHiStop, limit); break; - case 1: // axes[1].high = limit; + case 1: // axes[1].high = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamHiStop, limit); break; @@ -874,15 +874,15 @@ void CPHJoint::SetHiLimitDynamic(int axis_num, float limit) case full_control: switch (axis_num) { - case 0: // axes[0].high = limit; + case 0: // axes[0].high = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamHiStop, limit); break; - case 1: // axes[1].high = limit; + case 1: // axes[1].high = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamHiStop2, limit); break; - case 2: // axes[2].high = limit; + case 2: // axes[2].high = limit; VERIFY(m_joint1); dJointSetAMotorParam(m_joint1, dParamHiStop3, limit); break; @@ -1020,7 +1020,7 @@ float CPHJoint::GetAxisAngleRate(int axis_num) break; default: R_ASSERT2(false, "type not supported"); break; } - return ret; // body_for_joint(pFirst_element) ? ret : - + return ret; // body_for_joint(pFirst_element) ? ret : - } float CPHJoint::GetAxisAngle(int axis_num) @@ -1041,7 +1041,7 @@ float CPHJoint::GetAxisAngle(int axis_num) break; default: R_ASSERT2(false, "type not supported"); break; } - return ret; // body_for_joint(pFirst_element) ? ret : - + return ret; // body_for_joint(pFirst_element) ? ret : - } void CPHJoint::LimitAxisNum(int& axis_num) @@ -1340,8 +1340,8 @@ void CPHJoint::CalcAxis( if (shift_angle > M_PI) shift_angle -= 2.f * M_PI; if (shift_angle < -M_PI) shift_angle += 2.f * M_PI; - lo = axes[ax_num].low; //+shift_angle; - hi = axes[ax_num].high; //+shift_angle; + lo = axes[ax_num].low; //+shift_angle; + hi = axes[ax_num].high; //+shift_angle; if (lo < -M_PI) { hi -= (lo + M_PI); lo = -M_PI; diff --git a/src/xrPhysics/PHJoint.h b/src/xrPhysics/PHJoint.h index 0b1e6f6eb74..7f21d2a5b3d 100644 --- a/src/xrPhysics/PHJoint.h +++ b/src/xrPhysics/PHJoint.h @@ -19,20 +19,20 @@ class CPHJoint : public CPhysicsJoint, public cphysics_scripted dJointID m_joint1; CPhysicsJoint** m_back_ref; CPHJointDestroyInfo* m_destroy_info; - float m_erp; // joint erp - float m_cfm; // joint cfm + float m_erp; // joint erp + float m_cfm; // joint cfm /////////////////////////////////////////////////////////////////////////////////////////////////////////////// struct SPHAxis { - float high; // high limit - float low; // law limit - float zero; // zero angle position - float erp; // limit erp - float cfm; // limit cfm - eVs vs; // coordinate system - float force; // max force - float velocity; // velocity to achieve - Fvector direction; // axis direction + float high; // high limit + float low; // law limit + float zero; // zero angle position + float erp; // limit erp + float cfm; // limit cfm + eVs vs; // coordinate system + float force; // max force + float velocity; // velocity to achieve + Fvector direction; // axis direction IC void set_limits(float h, float l) { high = h; diff --git a/src/xrPhysics/PHMoveStorage.cpp b/src/xrPhysics/PHMoveStorage.cpp index 424664980c0..b12d32c08b1 100644 --- a/src/xrPhysics/PHMoveStorage.cpp +++ b/src/xrPhysics/PHMoveStorage.cpp @@ -8,9 +8,9 @@ struct dxGeomTransform : public dxGeom { - dxGeom* obj; // object that is being transformed - int cleanup; // 1 to destroy obj when destroyed - int infomode; // 1 to put Tx geom in dContactGeom g1 + dxGeom* obj; // object that is being transformed + int cleanup; // 1 to destroy obj when destroyed + int infomode; // 1 to put Tx geom in dContactGeom g1 // cached final object transform (body tx + relative tx). this is set by // computeAABB(), and it is valid while the AABB is valid. diff --git a/src/xrPhysics/PHObject.cpp b/src/xrPhysics/PHObject.cpp index a168a68b5f3..51b5ac03dfe 100644 --- a/src/xrPhysics/PHObject.cpp +++ b/src/xrPhysics/PHObject.cpp @@ -95,7 +95,7 @@ void CPHObject::Collide() if (magnitude < EPS) continue; dir.mul(1.f / magnitude); g_SpatialSpacePhysic->q_ray( - ph_world->r_spatial, 0, STYPE_PHYSIC, *from, dir, magnitude); //|ISpatial_DB::O_ONLYFIRST + ph_world->r_spatial, 0, STYPE_PHYSIC, *from, dir, magnitude); //|ISpatial_DB::O_ONLYFIRST #ifdef DEBUG if (debug_output().ph_dbg_draw_mask().test(phDbgDrawRayMotions)) { debug_output().DBG_OpenCashedDraw(); @@ -177,8 +177,8 @@ bool CPHObject::step_single(dReal step) return ret; } -void CPHObject::step(float time) // it is still not a true step for object because it collide the object only not - // subsequent collision is doing +void CPHObject::step(float time) // it is still not a true step for object because it collide the object only not + // subsequent collision is doing { ph_world->r_spatial.clear_not_free(); reinit_single(); diff --git a/src/xrPhysics/PHObject.h b/src/xrPhysics/PHObject.h index be1cc132490..03290af0fad 100644 --- a/src/xrPhysics/PHObject.h +++ b/src/xrPhysics/PHObject.h @@ -124,4 +124,4 @@ class CPHObject : public SpatialBase DEFINE_PHITEM_LIST(CPHObject, PH_OBJECT_STORAGE, PH_OBJECT_I) -#endif // CPHOBJECT \ No newline at end of file +#endif // CPHOBJECT \ No newline at end of file diff --git a/src/xrPhysics/PHShell.cpp b/src/xrPhysics/PHShell.cpp index e3cb65e82d5..4be2cef7de5 100644 --- a/src/xrPhysics/PHShell.cpp +++ b/src/xrPhysics/PHShell.cpp @@ -172,7 +172,7 @@ void CPHShell::setMass1(float M) void CPHShell::MassAddBox(float mass, const Fvector& full_size) { dMass m; - dMassSetBox(&m, mass, full_size.x, full_size.y, full_size.z); // mass = m_Shell->getMass()/100.f, full_size (1,1,1) + dMassSetBox(&m, mass, full_size.x, full_size.y, full_size.z); // mass = m_Shell->getMass()/100.f, full_size (1,1,1) addEquelInertiaToEls(m); } @@ -713,7 +713,7 @@ void CPHShell::AddElementRecursive( lvis_check = (check_obb_sise(bone_data.get_obb())); bool* arg_check = vis_check; - if (breakable || !root_e) //. + if (breakable || !root_e) //. { arg_check = &lvis_check; } @@ -723,13 +723,13 @@ void CPHShell::AddElementRecursive( } ///////////////////////////////////////////////////////////////////// - bool element_added = false; // set true when if elemen created and added by this call + bool element_added = false; // set true when if elemen created and added by this call u16 splitter_position = 0; u16 fracture_num = u16(-1); - if (!no_physics_shape(bone_data.get_shape()) || !root_e) // + if (!no_physics_shape(bone_data.get_shape()) || !root_e) // { - if (joint_data.type == jtRigid && root_e) // + if (joint_data.type == jtRigid && root_e) // { Fmatrix vs_root_position; vs_root_position.set(root_e->mXFORM); @@ -766,7 +766,7 @@ void CPHShell::AddElementRecursive( // B.Callback_Param=root_e; // B.Callback=NULL; } - else // + else // { E = P_create_Element(); E->m_SelfID = id; @@ -845,8 +845,8 @@ void CPHShell::AddElementRecursive( CPHFracture& fracture = E->Fracture(fracture_num); fracture.m_bone_id = id; fracture.m_end_geom_num = E->numberOfGeoms(); - fracture.m_end_el_num = u16(elements.size()); // just after this el = current+1 - fracture.m_end_jt_num = u16(joints.size()); // current+1 + fracture.m_end_el_num = u16(elements.size()); // just after this el = current+1 + fracture.m_end_jt_num = u16(joints.size()); // current+1 } else { @@ -876,7 +876,7 @@ void CPHShell::AddElementRecursive( Log("end-------"); } - VERIFY3(bbb, dbg_obj->ObjectNameVisual(), "has breaking parts with no vertexes or size less than 1mm"); // + VERIFY3(bbb, dbg_obj->ObjectNameVisual(), "has breaking parts with no vertexes or size less than 1mm"); // #endif } @@ -1183,7 +1183,7 @@ void CPHShell::PassEndElements(u16 from, u16 to, CPHShell* dest) for (ELEMENT_I i = i_from; i != e; ++i) { dGeomID spaced_geom = (*i)->dSpacedGeometry(); - if (spaced_geom) // for active elems + if (spaced_geom) // for active elems { dSpaceRemove(m_space, spaced_geom); dSpaceAdd(dest->m_space, spaced_geom); @@ -1222,8 +1222,8 @@ void CPHShell::DeleteJoint(u16 joint) void CPHShell::setEndElementSplitter() { - if (!elements.back()->FracturesHolder()) // adding fracture for element supposed before adding splitter. Need only - // one splitter for an element + if (!elements.back()->FracturesHolder()) // adding fracture for element supposed before adding splitter. Need only + // one splitter for an element AddSplitter(CPHShellSplitter::splElement, u16(elements.size() - 1), u16(joints.size() - 1)); } @@ -1244,8 +1244,8 @@ void CPHShell::AddSplitter(CPHShellSplitter::EType type, u16 element, u16 joint, } void CPHShell::setEndJointSplitter() { - if (!joints.back()->JointDestroyInfo()) // setting joint breacable supposed before adding splitter. Need only one - // splitter for a joint + if (!joints.back()->JointDestroyInfo()) // setting joint breacable supposed before adding splitter. Need only one + // splitter for a joint AddSplitter(CPHShellSplitter::splJoint, u16(elements.size() - 1), u16(joints.size() - 1)); } diff --git a/src/xrPhysics/PHShellActivate.cpp b/src/xrPhysics/PHShellActivate.cpp index d58f79fe2b4..72be584096f 100644 --- a/src/xrPhysics/PHShellActivate.cpp +++ b/src/xrPhysics/PHShellActivate.cpp @@ -52,7 +52,7 @@ void CPHShell::Activate(const Fmatrix& m0, float dt01, const Fmatrix& m2, bool d Fmatrix m; { - Fmatrix old_m = mXFORM; //+GetGlobalTransformDynamic update mXFORM; + Fmatrix old_m = mXFORM; //+GetGlobalTransformDynamic update mXFORM; GetGlobalTransformDynamic(&m); mXFORM = old_m; } diff --git a/src/xrPhysics/PHShellBuildJoint.h b/src/xrPhysics/PHShellBuildJoint.h index 8bb203ce981..b3030f01e6e 100644 --- a/src/xrPhysics/PHShellBuildJoint.h +++ b/src/xrPhysics/PHShellBuildJoint.h @@ -19,8 +19,8 @@ IC void SetJointLimit(CPhysicsJoint& J, const IBoneData& bone_data, u8 limit_num { const SJointIKData& joint_data = bone_data.get_IK_data(); const SJointLimit& limit = joint_data.limits[limit_num]; - float lo = bone_data.lo_limit(limit_num); // limit.x; - float hi = bone_data.hi_limit(limit_num); // limit.y; + float lo = bone_data.lo_limit(limit_num); // limit.x; + float hi = bone_data.hi_limit(limit_num); // limit.y; J.SetLimits(lo, hi, axis_num); J.SetAxisSDfactors(limit.spring_factor, limit.damping_factor, axis_num); @@ -30,8 +30,8 @@ IC bool IsFreeRLimit(const IBoneData& bone_data, u8 limit_num) { // const SJointIKData& joint_data = bone_data.get_IK_data(); // const SJointLimit& limit = joint_data.limits[limit_num]; - float lo = bone_data.lo_limit(limit_num); // limit.x; - float hi = bone_data.hi_limit(limit_num); // limit.y; + float lo = bone_data.lo_limit(limit_num); // limit.x; + float hi = bone_data.hi_limit(limit_num); // limit.y; return !(hi - lo < M_PI * 2.f); } @@ -198,7 +198,7 @@ IC CPhysicsJoint* BuildJoint(const IBoneData& bone_data, CPhysicsElement* root_e default: NODEFAULT; } - if (J) J->SetForceAndVelocity(joint_data.friction); // joint_data.friction + if (J) J->SetForceAndVelocity(joint_data.friction); // joint_data.friction return J; } \ No newline at end of file diff --git a/src/xrPhysics/PHShellSplitter.cpp b/src/xrPhysics/PHShellSplitter.cpp index 2b06fa4a85a..3c9c4a25d57 100644 --- a/src/xrPhysics/PHShellSplitter.cpp +++ b/src/xrPhysics/PHShellSplitter.cpp @@ -77,7 +77,7 @@ void CPHShellSplitterHolder::PassEndSplitters( R_ASSERT2(source_elements.size() >= spl_inf.m_start_el_num && source_elements.size() >= spl_inf.m_end_el_num, "wrong spl_inf"); - for (; i_elem != e_elem; ++i_elem) // until start elem in both joint or elem split fractures + for (; i_elem != e_elem; ++i_elem) // until start elem in both joint or elem split fractures // end elems have to be corrected // if grater then end elem in moving diapason { @@ -215,11 +215,11 @@ void CPHShellSplitterHolder::PassEndSplitters( u16& elem = spl_i->m_element; u16& joint = spl_i->m_joint; if (spl_i->m_type == CPHShellSplitter::splElement) { - if (elem != u16(-1) && elem >= spl_inf.m_start_el_num) break; // we at begining + if (elem != u16(-1) && elem >= spl_inf.m_start_el_num) break; // we at begining } else { - if (joint != u16(-1) && joint >= spl_inf.m_start_jt_num) break; // we at begining + if (joint != u16(-1) && joint >= spl_inf.m_start_jt_num) break; // we at begining } if (elem != u16(-1) && elem > spl_inf.m_end_el_num) elem = elem - shift_e; if (joint != u16(-1) && joint > spl_inf.m_end_jt_num) joint = joint - shift_j; @@ -231,11 +231,11 @@ void CPHShellSplitterHolder::PassEndSplitters( u16& elem = spl_i->m_element; u16& joint = spl_i->m_joint; if (spl_i->m_type == CPHShellSplitter::splElement) { - if (elem != u16(-1) && elem >= spl_inf.m_end_el_num) break; // we after begining + if (elem != u16(-1) && elem >= spl_inf.m_end_el_num) break; // we after begining } else { - if (joint != u16(-1) && joint >= spl_inf.m_end_jt_num) break; // we after begining + if (joint != u16(-1) && joint >= spl_inf.m_end_jt_num) break; // we after begining } if (elem != u16(-1)) elem = elem - passed_shift_e; if (joint != u16(-1)) joint = joint - passed_shift_j; @@ -318,8 +318,8 @@ shell_root CPHShellSplitterHolder::ElementSingleSplit( // the last new shell will have all splitted old elements end joints and one new element reattached to old joint // m_splitters.erase(m_splitters.begin()+aspl); // now aspl points to the next splitter - if ((split_elem.first)->FracturesHolder()) // if this element can be splitted add a splitter for it - new_shell_last_desc->AddSplitter(CPHShellSplitter::splElement, 0, u16(-1)); // + if ((split_elem.first)->FracturesHolder()) // if this element can be splitted add a splitter for it + new_shell_last_desc->AddSplitter(CPHShellSplitter::splElement, 0, u16(-1)); // new_shell_last_desc->add_Element(split_elem.first); // pass splitters taking into account that one element was olready added @@ -379,9 +379,9 @@ void CPHShellSplitterHolder::SplitElement(u16 aspl, PHSHELL_PAIR_VECTOR& out_she } if (!E->FracturesHolder()) - m_splitters.erase(spl_i); // delete splitter if the element no longer have fractures + m_splitters.erase(spl_i); // delete splitter if the element no longer have fractures else - spl_i->m_breaked = false; // it is no longer breaked + spl_i->m_breaked = false; // it is no longer breaked } void CPHShellSplitterHolder::SplitProcess(PHSHELL_PAIR_VECTOR& out_shels) @@ -438,8 +438,8 @@ void CPHShellSplitterHolder::PhDataUpdate(dReal step) case CPHShellSplitter::splElement: { CPHElement* element = m_pShell->elements[i->m_element]; - dBodyID body = element->get_body(); //! element->EnabledStateOnStep() - if (!dBodyIsEnabled(body)) return; // + dBodyID body = element->get_body(); //! element->EnabledStateOnStep() + if (!dBodyIsEnabled(body)) return; // i->m_breaked = (element->FracturesHolder()->PhDataUpdate(element)) || i->m_breaked; break; } diff --git a/src/xrPhysics/PHShellSplitter.h b/src/xrPhysics/PHShellSplitter.h index f7799428772..87136e4d425 100644 --- a/src/xrPhysics/PHShellSplitter.h +++ b/src/xrPhysics/PHShellSplitter.h @@ -35,25 +35,24 @@ class CPHShellSplitter DEFINE_VECTOR(CPHShellSplitter, SPLITTER_STORAGE, SPLITTER_I) typedef xr_vector::reverse_iterator SPLITTER_RI; -class CPHShellSplitterHolder : public CPHUpdateObject // call all Fractures and Breakable Joints Updates +class CPHShellSplitterHolder : public CPHUpdateObject // call all Fractures and Breakable Joints Updates { friend class CPHShell; bool m_has_breaks; bool m_unbreakable; - CPHShell* m_pShell; // purpose: to extract elements and joints corresponded splitters - SPLITTER_STORAGE m_splitters; // - GEOM_MAP m_geom_root_map; // to find geom pointer by bone id - virtual void PhTune(dReal step); // call fractures PhTune for element splitters - // m_pShell->m_elements[m_splitters[i]->m_element]->m_pFracturesHolder->PhTune() - virtual void PhDataUpdate( - dReal step); // call fractures PhDataUpdate for element splitters - // m_pShell->m_elements[m_splitters[i]->m_element]->m_pFracturesHolder->PhDataUpdate() - bool CheckSplitter(u16 aspl); // - shell_root SplitJoint(u16 aspl); // create new shell moving into it departed elements and joints + CPHShell* m_pShell; // purpose: to extract elements and joints corresponded splitters + SPLITTER_STORAGE m_splitters; // + GEOM_MAP m_geom_root_map; // to find geom pointer by bone id + virtual void PhTune(dReal step); // call fractures PhTune for element splitters + // m_pShell->m_elements[m_splitters[i]->m_element]->m_pFracturesHolder->PhTune() + virtual void PhDataUpdate(dReal step); // call fractures PhDataUpdate for element splitters + // m_pShell->m_elements[m_splitters[i]->m_element]->m_pFracturesHolder->PhDataUpdate() + bool CheckSplitter(u16 aspl); // + shell_root SplitJoint(u16 aspl); // create new shell moving into it departed elements and joints shell_root ElementSingleSplit(const element_fracture& split_elem, const CPHElement* source_element); - void SplitElement(u16 aspl, PHSHELL_PAIR_VECTOR& out_shels); // + void SplitElement(u16 aspl, PHSHELL_PAIR_VECTOR& out_shels); // void PassEndSplitters(const CShellSplitInfo& spl_inf, CPHShell* dest, u16 jt_add_shift, u16 el_add_shift); - void InitNewShell(CPHShell* shell); // inits new active shell + void InitNewShell(CPHShell* shell); // inits new active shell public: CPHShellSplitterHolder(CPHShell* shell); virtual ~CPHShellSplitterHolder(); diff --git a/src/xrPhysics/PHSimpleCharacter.cpp b/src/xrPhysics/PHSimpleCharacter.cpp index 8a519bad1a3..a6039d099f9 100644 --- a/src/xrPhysics/PHSimpleCharacter.cpp +++ b/src/xrPhysics/PHSimpleCharacter.cpp @@ -36,7 +36,7 @@ IC bool PhOutOfBoundaries(const Fvector& v) //#endif -const float LOSE_CONTROL_DISTANCE = 0.5f; // fly distance to lose control +const float LOSE_CONTROL_DISTANCE = 0.5f; // fly distance to lose control const float CLAMB_DISTANCE = 0.5f; const float CLIMB_GETUP_HEIGHT = 0.3f; @@ -378,7 +378,7 @@ void CPHSimpleCharacter::Destroy() if (!b_exist) return; b_exist = false; R_ASSERT2(!ph_world->Processing(), - "can not deactivate physics character shell during physics processing!!!"); // if(ph_world) + "can not deactivate physics character shell during physics processing!!!"); // if(ph_world) R_ASSERT2(!ph_world->IsFreezed(), "can not deactivate physics character when ph world is freezed!!!"); R_ASSERT2(!CPHObject::IsFreezed(), "can not deactivate freezed !!!"); m_elevator_state.Deactivate(); @@ -533,8 +533,8 @@ void CPHSimpleCharacter::PhDataUpdate(dReal /**step/**/) const float* linear_velocity = dBodyGetLinearVel(m_body); dReal linear_velocity_mag = _sqrt(dDOT(linear_velocity, linear_velocity)); dBodyGetMass(m_body, &mass); - dReal l_air = linear_velocity_mag * default_k_l; // force/velocity !!! - if (l_air > mass.mass / fixed_step) l_air = mass.mass / fixed_step; // validate + dReal l_air = linear_velocity_mag * default_k_l; // force/velocity !!! + if (l_air > mass.mass / fixed_step) l_air = mass.mass / fixed_step; // validate if (!fis_zero(l_air)) dBodyAddForce(m_body, -linear_velocity[0] * l_air, -linear_velocity[1] * l_air, -linear_velocity[2] * l_air); @@ -633,14 +633,14 @@ void CPHSimpleCharacter::PhTune(dReal step) if (b_lose_control && (b_on_ground && m_ground_contact_normal[1] > M_SQRT1_2 / 2.f //&& // !b_external_impulse - /*&& - dSqrt(velocity[0]*velocity[0]+velocity[2]*velocity[2])<5.*/ + /*&& + dSqrt(velocity[0]*velocity[0]+velocity[2]*velocity[2])<5.*/ || fis_zero(linear_vel_smag) || m_elevator_state.ClimbingState())) b_lose_control = false; if (b_jumping && b_good_graund || (m_elevator_state.ClimbingState() && - b_valide_wall_contact)) // b_good_graund=b_valide_ground_contact&&m_ground_contact_normal[1]>M_SQRT1_2 + b_valide_wall_contact)) // b_good_graund=b_valide_ground_contact&&m_ground_contact_normal[1]>M_SQRT1_2 b_jumping = false; // deside if control lost @@ -660,7 +660,7 @@ void CPHSimpleCharacter::PhTune(dReal step) if (b_jump) { b_lose_control = true; b_depart_control = true; - dBodySetLinearVel(m_body, m_jump_accel.x, m_jump_accel.y, m_jump_accel.z); // vel[1]+ + dBodySetLinearVel(m_body, m_jump_accel.x, m_jump_accel.y, m_jump_accel.z); // vel[1]+ // Log("jmp",m_jump_accel); dVectorSet(m_jump_depart_position, dBodyGetPosition(m_body)); // m_jump_accel=m_acceleration; @@ -687,10 +687,10 @@ void CPHSimpleCharacter::PhTune(dReal step) accurate_normalize(sidedir); dReal vProj = dDOT(sidedir, chVel); - dBodyAddForce(m_body, m_control_force[0], m_control_force[1], m_control_force[2]); //+2.f*9.8f*70.f - if (!b_lose_control || b_clamb_jump) //)&&!b_external_impulse + dBodyAddForce(m_body, m_control_force[0], m_control_force[1], m_control_force[2]); //+2.f*9.8f*70.f + if (!b_lose_control || b_clamb_jump) //)&&!b_external_impulse dBodyAddForce(m_body, -sidedir[0] * vProj * (500.f + 200.f * b_clamb_jump) * m_friction_factor, - -m.mass * (50.f) * (!b_lose_control && !(is_contact || (b_any_contacts))), //&&!b_climb + -m.mass * (50.f) * (!b_lose_control && !(is_contact || (b_any_contacts))), //&&!b_climb -sidedir[2] * vProj * (500.f + 200.f * b_clamb_jump) * m_friction_factor); #ifdef DEBUG if (debug_output().ph_dbg_draw_mask().test(phDbgCharacterControl)) { @@ -717,7 +717,7 @@ void CPHSimpleCharacter::PhTune(dReal step) if (b_jumping) { float air_factor = 1.f; - if (b_lose_control && CastActorCharacter()) // + if (b_lose_control && CastActorCharacter()) // air_factor = 10.f * m_air_control_factor; dReal proj = m_acceleration.x * chVel[0] + m_acceleration.z * chVel[2]; @@ -728,7 +728,7 @@ void CPHSimpleCharacter::PhTune(dReal step) dReal amag = _sqrt(m_acceleration.x * m_acceleration.x + m_acceleration.z * m_acceleration.z); if (amag > 0.f) if (dif[0] * m_acceleration.x / amag + dif[2] * m_acceleration.z / amag < 0.3f) { - Fvector jump_fv = m_acceleration; //{ m_acceleration.x/amag*1000.f,0,m_acceleration.z/amag*1000.f } + Fvector jump_fv = m_acceleration; //{ m_acceleration.x/amag*1000.f,0,m_acceleration.z/amag*1000.f } jump_fv.mul(1000.f / amag * air_factor); dBodyAddForce(m_body, jump_fv.x, 0, jump_fv.z); } @@ -785,7 +785,7 @@ bool CPHSimpleCharacter::ValidateWalkOnObject() const dReal* current_pos = dBodyGetPosition(m_body); dVector3 dif = {current_pos[0] - m_clamb_depart_position[0], current_pos[1] - m_clamb_depart_position[1], current_pos[2] - m_clamb_depart_position[2]}; - if ( //! b_valide_wall_contact|| + if ( //! b_valide_wall_contact|| //(dDOT(dif,dif)>CLAMB_DISTANCE*CLAMB_DISTANCE)) // (m_wall_contact_normal[1]> M_SQRT1_2) || //] dFabs(dif[1]) > CLAMB_DISTANCE) @@ -798,7 +798,7 @@ bool CPHSimpleCharacter::ValidateWalkOnObject() // decide to clamb if (!m_elevator_state.Active() && b_valide_wall_contact && (m_contact_count > 1) && (m_wall_contact_normal[1] < M_SQRT1_2) && - !b_side_contact) //&& dDOT(m_wall_contact_normal,m_ground_contact_normal)<.9f + !b_side_contact) //&& dDOT(m_wall_contact_normal,m_ground_contact_normal)<.9f { // if( dDOT(m_wall_contact_normal,m_ground_contact_normal)<.999999f) // dVector3 @@ -811,8 +811,8 @@ bool CPHSimpleCharacter::ValidateWalkOnObject() } if (b_valide_wall_contact && (m_contact_count > 1) && b_clamb_jump) - if (dFabs((m_wall_contact_position[0] - m_ground_contact_position[0]) + //*m_control_force[0] - (m_wall_contact_position[2] - m_ground_contact_position[2])) > 0.05f && // 0.01f//*m_control_force[2] + if (dFabs((m_wall_contact_position[0] - m_ground_contact_position[0]) + //*m_control_force[0] + (m_wall_contact_position[2] - m_ground_contact_position[2])) > 0.05f && // 0.01f//*m_control_force[2] m_wall_contact_position[1] - m_ground_contact_position[1] > 0.01f) dVectorSet(m_clamb_depart_position, dBodyGetPosition(m_body)); return b_clamb_jump; @@ -980,7 +980,7 @@ void CPHSimpleCharacter::ApplyAcceleration() } else { - if (b_valide_ground_contact && (m_ground_contact_normal[1] > M_SQRT1_2)) { // M_SQRT1_2//0.8660f + if (b_valide_ground_contact && (m_ground_contact_normal[1] > M_SQRT1_2)) { // M_SQRT1_2//0.8660f dCROSS(fvdir, =, sidedir, m_ground_contact_normal); accurate_normalize(fvdir); dVectorAddMul(m_control_force, fvdir, m.mass * pull_force); @@ -992,7 +992,7 @@ void CPHSimpleCharacter::ApplyAcceleration() dVectorAddMul(m_control_force, fvdir, m.mass * pull_force * 1.5f); } } - if (!m_elevator_state.ClimbingState() && b_clamb_jump) { //&&m_wall_contact_normal[1]= 0.f ? m_control_force[0] : -m_control_force[0]; @@ -1189,7 +1189,7 @@ void CPHSimpleCharacter::SafeAndLimitVelocity() const float* linear_velocity = dBodyGetLinearVel(m_body); if (dV_valid(linear_velocity)) { dReal mag = _sqrt(linear_velocity[0] * linear_velocity[0] + linear_velocity[1] * linear_velocity[1] + - linear_velocity[2] * linear_velocity[2]); //; + linear_velocity[2] * linear_velocity[2]); //; // limit velocity dReal l_limit; if (is_control && !b_lose_control) @@ -1215,12 +1215,12 @@ void CPHSimpleCharacter::SafeAndLimitVelocity() } //////////////////////////////////////////////////////////////////////////////////////////// m_mean_y = m_mean_y * 0.9999f + linear_velocity[1] * 0.0001f; - if (mag > l_limit) { // CutVelocity(m_l_limit,m_w_limit); + if (mag > l_limit) { // CutVelocity(m_l_limit,m_w_limit); if (!fis_zero(l_limit)) { dReal f = mag / l_limit; if (b_lose_ground && linear_velocity[1] < 0.f && linear_velocity[1] > -default_l_limit) - dBodySetLinearVel(m_body, linear_velocity[0] / f, linear_velocity[1], linear_velocity[2] / f); /// f + dBodySetLinearVel(m_body, linear_velocity[0] / f, linear_velocity[1], linear_velocity[2] / f); /// f else CutVelocity(l_limit, 0.f); // dBodySetLinearVel(m_body,linear_velocity[0]/f,linear_velocity[1]/f,linear_velocity[2]/f);///f @@ -1347,7 +1347,7 @@ u16 CPHSimpleCharacter::RetriveContactBone() Fvector dir; m_collision_damage_info.HitDir(dir); collide::ray_defs Q(m_collision_damage_info.HitPos(), dir, m_radius, CDB::OPT_ONLYNEAREST | CDB::OPT_CULL, - collide::rqtBoth); // CDB::OPT_ONLYFIRST CDB::OPT_ONLYNEAREST + collide::rqtBoth); // CDB::OPT_ONLYFIRST CDB::OPT_ONLYNEAREST RQR.r_clear(); u16 contact_bone = 0; // IGameObject* object = smart_cast(m_phys_ref_object); @@ -1377,12 +1377,12 @@ u16 CPHSimpleCharacter::RetriveContactBone() Fvector pos_in_object; pos_in_object.sub(m_collision_damage_info.HitPos(), m_phys_ref_object - ->ObjectPosition()); // vector from object center to contact position currently in global frame + ->ObjectPosition()); // vector from object center to contact position currently in global frame Fmatrix object_form; object_form.set(m_phys_ref_object->ObjectXFORM()); object_form.transpose(); object_form.transform_dir( - pos_in_object); // project pos_in_object on object axes now it is position of contact in object frame + pos_in_object); // project pos_in_object on object axes now it is position of contact in object frame float sq_dist = dInfinity; for (u16 i = 0; i < count; ++i) { @@ -1482,7 +1482,7 @@ void CPHSimpleCharacter::InitContact(dContact* c, bool& do_collide, u16 material ++m_contact_count; if (bo1) { - if (normal[1] > m_ground_contact_normal[1] || !b_valide_ground_contact) // + if (normal[1] > m_ground_contact_normal[1] || !b_valide_ground_contact) // { dVectorSet(m_ground_contact_normal, normal); dVectorSet(m_ground_contact_position, pos); @@ -1498,24 +1498,24 @@ void CPHSimpleCharacter::InitContact(dContact* c, bool& do_collide, u16 material } else { - if (normal[1] < -m_ground_contact_normal[1] || !b_valide_ground_contact) // + if (normal[1] < -m_ground_contact_normal[1] || !b_valide_ground_contact) // { dVectorSetInvert(m_ground_contact_normal, normal); dVectorSet(m_ground_contact_position, pos); b_valide_ground_contact = true; } if (dXZDot(normal, cast_fp(m_acceleration)) > -dXZDot(m_wall_contact_normal, cast_fp(m_acceleration)) || - !b_valide_wall_contact) // + !b_valide_wall_contact) // { dVectorSetInvert(m_wall_contact_normal, normal); dVectorSet(m_wall_contact_position, pos); b_valide_wall_contact = true; } } - float soft_param = dumping_rate + normal[1] * (1.f - dumping_rate); //=(1.f-normal[1])*dumping_rate +normal[1] - if (is_control) { //&&!b_lose_control||b_jumping + float soft_param = dumping_rate + normal[1] * (1.f - dumping_rate); //=(1.f-normal[1])*dumping_rate +normal[1] + if (is_control) { //&&!b_lose_control||b_jumping if (g1 == m_wheel || g2 == m_wheel && !bClimable) { - c->surface.mu = 0.f; // 0.00f; + c->surface.mu = 0.f; // 0.00f; } else { @@ -1647,7 +1647,7 @@ bool CPHSimpleCharacter::IsInitiated() const } u16 CPHSimpleCharacter::DamageInitiatorID() const { - u16 ret = u16(-1); // m_collision_damage_info.DamageInitiatorID(); + u16 ret = u16(-1); // m_collision_damage_info.DamageInitiatorID(); IPhysicsShellHolder* object = 0; if (m_collision_damage_info.m_obj_id != u16(-1)) { diff --git a/src/xrPhysics/PHSimpleCharacter.h b/src/xrPhysics/PHSimpleCharacter.h index 4cec1bd556a..542fd746f02 100644 --- a/src/xrPhysics/PHSimpleCharacter.h +++ b/src/xrPhysics/PHSimpleCharacter.h @@ -84,7 +84,7 @@ class CPHSimpleCharacter : public CPHCharacter, ICollisionDamageInfo dVector3 m_depart_position; dVector3 m_wall_contact_position; dVector3 m_ground_contact_position; - dReal jump_up_velocity; //=6.0f;//5.6f; + dReal jump_up_velocity; //=6.0f;//5.6f; dReal m_collision_damage_factor; dReal m_max_velocity; diff --git a/src/xrPhysics/PHStaticGeomShell.cpp b/src/xrPhysics/PHStaticGeomShell.cpp index 2b735a603f9..61202045dea 100644 --- a/src/xrPhysics/PHStaticGeomShell.cpp +++ b/src/xrPhysics/PHStaticGeomShell.cpp @@ -74,7 +74,7 @@ IPHStaticGeomShell* P_BuildStaticGeomShell(IPhysicsShellHolder* obj, ObjectConta // R_ASSERT2(V,"need visual to build"); IKinematics* K = obj->ObjectKinematics(); R_ASSERT2(K, "need visual to build"); - K->CalculateBones(TRUE); //. bForce - was TRUE + K->CalculateBones(TRUE); //. bForce - was TRUE // V->getVisData().box.getradius (b.m_halfsize); K->GetBox().getradius(b.m_halfsize); diff --git a/src/xrPhysics/PHWorld.cpp b/src/xrPhysics/PHWorld.cpp index 45304b1c6d0..42000cf500a 100644 --- a/src/xrPhysics/PHWorld.cpp +++ b/src/xrPhysics/PHWorld.cpp @@ -47,9 +47,9 @@ IPHWorld* __stdcall physics_world() } void __stdcall create_physics_world( - bool mt, CObjectSpace* os, CObjectList* lo, CRenderDeviceBase* dv) // IPHWorldUpdateCallbck &commander, + bool mt, CObjectSpace* os, CObjectList* lo, CRenderDeviceBase* dv) // IPHWorldUpdateCallbck &commander, { - ph_world = new CPHWorld(); //&commander + ph_world = new CPHWorld(); //&commander VERIFY(os); // VERIFY( lo ); VERIFY(dv); @@ -129,7 +129,7 @@ static struct sempty_update_callback : public IPHWorldUpdateCallbck } empty_update_callback; CPHWorld::CPHWorld() - : // IPHWorldUpdateCallbck *_update_callback + : // IPHWorldUpdateCallbck *_update_callback m_update_callback(&empty_update_callback), m_default_contact_shotmark(0), m_default_character_contact_shotmark(0), physics_step_time_callback(0), m_object_space(0), m_level_objects(0), m_device(0) @@ -194,7 +194,7 @@ dVector3 center = {level_center.x,0.f,level_center.z}; #endif ContactGroup = dJointGroupCreate(0); - dWorldSetGravity(phWorld, 0, -Gravity(), 0); //-2.f*9.81f + dWorldSetGravity(phWorld, 0, -Gravity(), 0); //-2.f*9.81f Mesh.Create(0, phWorld); #ifdef PH_PLAIN plane = dCreatePlane(Space, 0, 1, 0, 0.3f); @@ -245,7 +245,7 @@ void CPHWorld::SetGravity(float g) { m_gravity = g; dWorldID phWorld = 0; - dWorldSetGravity(phWorld, 0, -m_gravity, 0); //-2.f*9.81f + dWorldSetGravity(phWorld, 0, -m_gravity, 0); //-2.f*9.81f } void CPHWorld::OnFrame() @@ -428,7 +428,7 @@ void CPHWorld::Step() #ifdef DEBUG debug_output().dbg_contacts_num() = ContactGroup->num; #endif - dJointGroupEmpty(ContactGroup); // this is to be called after PhDataUpdate!!!-the order is critical!!! + dJointGroupEmpty(ContactGroup); // this is to be called after PhDataUpdate!!!-the order is critical!!! ContactFeedBacks.empty(); ContactEffectors.empty(); @@ -520,7 +520,7 @@ void CPHWorld::FrameStep(dReal step) #endif b_processing = true; - start_time = Device().dwTimeGlobal; // - u32(m_frame_time*1000); + start_time = Device().dwTimeGlobal; // - u32(m_frame_time*1000); if (ph_console::g_bDebugDumpPhysicsStep && it_number > 20) Msg("!!!TOO MANY PHYSICS STEPS PER FRAME = %d !!!", it_number); for (UINT i = 0; i < it_number; ++i) diff --git a/src/xrPhysics/Physics.cpp b/src/xrPhysics/Physics.cpp index dd425151661..e98819dfbe1 100644 --- a/src/xrPhysics/Physics.cpp +++ b/src/xrPhysics/Physics.cpp @@ -25,11 +25,11 @@ extern CPHWorld* ph_world; // union dInfBytes dInfinityValue = {{0,0,0x80,0x7f}}; // PhysicsStepTimeCallback *physics_step_time_callback = 0; -const float default_w_limit = 9.8174770f; //(M_PI/16.f/(fixed_step=0.02f)); -const float default_l_limit = 150.f; //(3.f/fixed_step=0.02f); +const float default_w_limit = 9.8174770f; //(M_PI/16.f/(fixed_step=0.02f)); +const float default_l_limit = 150.f; //(3.f/fixed_step=0.02f); const float default_l_scale = 1.01f; const float default_w_scale = 1.01f; -const float default_k_l = 0.0002f; // square resistance !! +const float default_k_l = 0.0002f; // square resistance !! const float default_k_w = 0.05f; extern const u16 max_joint_allowed_for_exeact_integration = 30; @@ -117,11 +117,11 @@ IC static int CollideIntoGroup( u16 material_idx_1 = 0; u16 material_idx_2 = 0; - surface.mu = 1.f; // 5000.f; - surface.soft_erp = 1.f; // ERP(world_spring,world_damping); - surface.soft_cfm = 1.f; // CFM(world_spring,world_damping); - surface.bounce = 0.01f; // 0.1f; - surface.bounce_vel = 1.5f; // 0.005f; + surface.mu = 1.f; // 5000.f; + surface.soft_erp = 1.f; // ERP(world_spring,world_damping); + surface.soft_cfm = 1.f; // CFM(world_spring,world_damping); + surface.bounce = 0.01f; // 0.1f; + surface.bounce_vel = 1.5f; // 0.005f; usr_data_1 = retrieveGeomUserData(g1); usr_data_2 = retrieveGeomUserData(g2); /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -135,7 +135,7 @@ IC static int CollideIntoGroup( SGameMtl* material_1 = GMLibrary().GetMaterialByIdx(material_idx_1); SGameMtl* material_2 = GMLibrary().GetMaterialByIdx(material_idx_2); ////////////////params can be changed in - ///callbacks////////////////////////////////////////////////////////////////////////// + /// callbacks////////////////////////////////////////////////////////////////////////// surface.mode = dContactApprox1 | dContactSoftERP | dContactSoftCFM; float spring = material_2->fPHSpring * material_1->fPHSpring * world_spring; float damping = material_2->fPHDamping * material_1->fPHDamping * world_damping; @@ -435,8 +435,8 @@ void dMassSub(dMass* a, const dMass* b) ////Energy of non Elastic collision; // body - static case -float E_NlS(dBodyID body, const dReal* norm, float norm_sign) // if body c.geom.g1 norm_sign + else - -{ // norm*norm_sign - to body +float E_NlS(dBodyID body, const dReal* norm, float norm_sign) // if body c.geom.g1 norm_sign + else - +{ // norm*norm_sign - to body const dReal* vel = dBodyGetLinearVel(body); dReal prg = -dDOT(vel, norm) * norm_sign; prg = prg < 0.f ? prg = 0.f : prg; @@ -446,7 +446,7 @@ float E_NlS(dBodyID body, const dReal* norm, float norm_sign) // if body c.geom } // body - body case -float E_NLD(dBodyID b1, dBodyID b2, const dReal* norm) // norm - from 2 to 1 +float E_NLD(dBodyID b1, dBodyID b2, const dReal* norm) // norm - from 2 to 1 { dMass m1, m2; dBodyGetMass(b1, &m1); @@ -457,7 +457,7 @@ float E_NLD(dBodyID b1, dBodyID b2, const dReal* norm) // norm - from 2 to 1 dReal vel_pr1 = dDOT(vel1, norm); dReal vel_pr2 = dDOT(vel2, norm); - if (vel_pr1 > vel_pr2) return 0.f; // exit if the bodies are departing + if (vel_pr1 > vel_pr2) return 0.f; // exit if the bodies are departing dVector3 impuls1 = {vel1[0] * m1.mass, vel1[1] * m1.mass, vel1[2] * m1.mass}; dVector3 impuls2 = {vel2[0] * m2.mass, vel2[1] * m2.mass, vel2[2] * m2.mass}; diff --git a/src/xrPhysics/PhysicsCommon.h b/src/xrPhysics/PhysicsCommon.h index f173f764666..e5ff2615a91 100644 --- a/src/xrPhysics/PhysicsCommon.h +++ b/src/xrPhysics/PhysicsCommon.h @@ -65,4 +65,4 @@ IC void MulSprDmp(float& cfm, float& erp, float mul_spring, float mul_damping) erp *= (factor * mul_spring); } -#endif // PHYSICS_COMMON_H \ No newline at end of file +#endif // PHYSICS_COMMON_H \ No newline at end of file diff --git a/src/xrPhysics/PhysicsShell.cpp b/src/xrPhysics/PhysicsShell.cpp index 71832c4a9f3..caa04ec9b76 100644 --- a/src/xrPhysics/PhysicsShell.cpp +++ b/src/xrPhysics/PhysicsShell.cpp @@ -65,9 +65,9 @@ CPhysicsShell* __stdcall P_build_Shell( pPhysicsShell->set_PhysicsRefObject(obj); pPhysicsShell->mXFORM.set(obj->ObjectXFORM()); - pPhysicsShell->Activate(not_active_state, not_set_bone_callbacks); //, + pPhysicsShell->Activate(not_active_state, not_set_bone_callbacks); //, // m_pPhysicsShell->SmoothElementsInertia(0.3f); - pPhysicsShell->SetAirResistance(); // 0.0014f,1.5f + pPhysicsShell->SetAirResistance(); // 0.0014f,1.5f return pPhysicsShell; } @@ -327,7 +327,7 @@ bool __stdcall can_create_phys_shell(string1024& reason, IPhysicsShellHolder& O) return result; } -float NonElasticCollisionEnergy(CPhysicsElement* e1, CPhysicsElement* e2, const Fvector& norm) // norm - from 2 to 1 +float NonElasticCollisionEnergy(CPhysicsElement* e1, CPhysicsElement* e2, const Fvector& norm) // norm - from 2 to 1 { VERIFY(e1); VERIFY(e2); diff --git a/src/xrPhysics/PhysicsShell.h b/src/xrPhysics/PhysicsShell.h index b0808cf3e43..9a0d56aa7c5 100644 --- a/src/xrPhysics/PhysicsShell.h +++ b/src/xrPhysics/PhysicsShell.h @@ -54,7 +54,7 @@ extern XRPHYSICS_API void get_box(const CPhysicsBase* shell, const Fmatrix& form class XRPHYSICS_API CPhysicsBase : public iphysics_scripted_class { public: - Fmatrix mXFORM; // In parent space + Fmatrix mXFORM; // In parent space public: virtual void Activate(const Fmatrix& m0, float dt01, const Fmatrix& m2, bool disable = false) = 0; virtual void Activate( @@ -182,12 +182,15 @@ class XRPHYSICS_API CPhysicsElement : public CPhysicsBase, public IPhysicsElemen virtual bool isFixed() = 0; ////////////////////////////////////////////////////////////////IPhysicsElement//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// virtual const Fmatrix& XFORM() const { return CPhysicsBase::XFORM(); } - // virtual void CalculateBoneTransform ( Fmatrix &bone_transform )const = + // virtual void CalculateBoneTransform ( Fmatrix &bone_transform )const + // = // 0; virtual void GetPointVel(Fvector& res_vel, const Fvector& point) const = 0; - // virtual void get_LinearVel ( Fvector& velocity ) const + // virtual void get_LinearVel ( Fvector& velocity ) + //const //{ get_LinearVel( velocity ); } - // virtual void get_AngularVel ( Fvector& velocity ) const + // virtual void get_AngularVel ( Fvector& velocity ) + //const //{ get_AngularVel( velocity ); } virtual void get_Box(Fvector& sz, Fvector& c) const { return CPhysicsBase::get_Box(sz, c); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -195,7 +198,7 @@ class XRPHYSICS_API CPhysicsElement : public CPhysicsBase, public IPhysicsElemen }; XRPHYSICS_API float NonElasticCollisionEnergy( - CPhysicsElement* e1, CPhysicsElement* e2, const Fvector& norm); // norm - from 2 to 1 + CPhysicsElement* e1, CPhysicsElement* e2, const Fvector& norm); // norm - from 2 to 1 // ABSTRACT: // Joint between two elements @@ -205,21 +208,21 @@ class XRPHYSICS_API CPhysicsJoint : public iphysics_scripted_class public: bool bActive; enum eVs - { // coordinate system - vs_first, // in first local - vs_second, // in second local - vs_global // in global + { // coordinate system + vs_first, // in first local + vs_second, // in second local + vs_global // in global }; enum enumType - { // joint type - ball, // ball-socket - hinge, // standart hinge 1 - axis - hinge2, // for car wheels 2-axes - full_control, // 3 - axes control (eiler - angles) + { // joint type + ball, // ball-socket + hinge, // standart hinge 1 - axis + hinge2, // for car wheels 2-axes + full_control, // 3 - axes control (eiler - angles) slider }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - enumType eType; // type of the joint + enumType eType; // type of the joint public: virtual ~CPhysicsJoint(){}; virtual u16 BoneID() = 0; @@ -299,7 +302,8 @@ class XRPHYSICS_API CPhysicsShell : public CPhysicsBase, public IPhysicsShell virtual const Fmatrix& XFORM() const { return CPhysicsBase::XFORM(); } virtual const IPhysicsElement& Element(u16 index) const { return *get_ElementByStoreOrder(index); }; virtual void GetGlobalTransformDynamic(Fmatrix* m) = 0; - // virtual u16 get_ElementsNumber ( ) const = + // virtual u16 get_ElementsNumber ( ) const + // = // 0; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -322,8 +326,9 @@ class XRPHYSICS_API CPhysicsShell : public CPhysicsBase, public IPhysicsShell virtual const _flags& collide_class_bits() const = 0; virtual void CreateShellAnimator(CInifile const* ini, LPCSTR section) = 0; virtual void SetIgnoreAnimated() = 0; - // virtual bool Animated () = - //0; + // virtual bool Animated () + //= + // 0; virtual void AnimatorOnFrame() = 0; virtual void SetSmall() = 0; virtual void SetIgnoreSmall() = 0; @@ -444,4 +449,4 @@ bool has_physics_collision_shapes(IKinematics& K); XRPHYSICS_API void phys_shell_verify_object_model(IPhysicsShellHolder& O); void phys_shell_verify_model(IKinematics& K); -#endif // PhysicsShellH +#endif // PhysicsShellH diff --git a/src/xrPhysics/PhysicsShellAnimatorBoneData.h b/src/xrPhysics/PhysicsShellAnimatorBoneData.h index 9b760721fcf..46d1f0d953e 100644 --- a/src/xrPhysics/PhysicsShellAnimatorBoneData.h +++ b/src/xrPhysics/PhysicsShellAnimatorBoneData.h @@ -2,7 +2,7 @@ #include "PHShell.h" -class CPhysicsShellAnimatorBoneData //Содержит информацию об целевой матрице анимации +class CPhysicsShellAnimatorBoneData //Содержит информацию об целевой матрице анимации { friend class CPhysicsShellAnimator; dJointID m_anim_fixed_dJointID; diff --git a/src/xrPhysics/ShellHit.cpp b/src/xrPhysics/ShellHit.cpp index a3dacce98e7..f0f6353693b 100644 --- a/src/xrPhysics/ShellHit.cpp +++ b/src/xrPhysics/ShellHit.cpp @@ -12,7 +12,7 @@ void CPHShell::applyHit(const Fvector& pos, const Fvector& dir, float val, const u16 id, ALife::EHitType hit_type) { - if (id == u16(-1)) return; // + if (id == u16(-1)) return; // #pragma todo("Kosya to kosya:this code shold treat all hit types") if (!m_pKinematics) { applyImpulseTrace(pos, dir, val); @@ -53,7 +53,7 @@ void CPHShell::ExplosionHit(const Fvector& pos, const Fvector& dir, float val, c r_dir.add(dir); } - r_dir.normalize_safe(); // safe??? + r_dir.normalize_safe(); // safe??? element->applyImpulseTrace(r_pos, r_dir, g_impulse, element->CPHGeometryOwner::Geom(j)->bone_id()); } } diff --git a/src/xrPhysics/collisiondamagereceiver.cpp b/src/xrPhysics/collisiondamagereceiver.cpp index 04814f5a86c..9213a44971c 100644 --- a/src/xrPhysics/collisiondamagereceiver.cpp +++ b/src/xrPhysics/collisiondamagereceiver.cpp @@ -42,7 +42,7 @@ void DamageReceiverCollisionCallback(bool& do_colide, bool bo1, dContact& c, SGa dir.set(*(Fvector*)c.geom.normal); Fvector pos; pos.sub(*(Fvector*)c.geom.pos, - *(Fvector*)dGeomGetPosition(bo1 ? c.geom.g1 : c.geom.g2)); // it is not true pos in bone space + *(Fvector*)dGeomGetPosition(bo1 ? c.geom.g1 : c.geom.g2)); // it is not true pos in bone space dr->CollisionHit( source_id, ud_self->bone_id, E_NL(b1, b2, c.geom.normal) * damager_material_factor / dfs, dir, pos); diff --git a/src/xrPhysics/console_vars.h b/src/xrPhysics/console_vars.h index 49df2dda179..7dcfaa024ab 100644 --- a/src/xrPhysics/console_vars.h +++ b/src/xrPhysics/console_vars.h @@ -2,10 +2,10 @@ struct XRPHYSICS_API ph_console { - static BOOL g_bDebugDumpPhysicsStep; //= 0; - static float ph_tri_query_ex_aabb_rate; //= 1.3f; - static int ph_tri_clear_disable_count; //= 10; - static float phBreakCommonFactor; //= 0.01f; - static float phRigidBreakWeaponFactor; //= 1.f; - static float ph_step_time; //=fixed_step; + static BOOL g_bDebugDumpPhysicsStep; //= 0; + static float ph_tri_query_ex_aabb_rate; //= 1.3f; + static int ph_tri_clear_disable_count; //= 10; + static float phBreakCommonFactor; //= 0.01f; + static float phRigidBreakWeaponFactor; //= 1.f; + static float ph_step_time; //=fixed_step; }; \ No newline at end of file diff --git a/src/xrPhysics/dRayMotions.h b/src/xrPhysics/dRayMotions.h index 8ef20cfc232..da489f931d6 100644 --- a/src/xrPhysics/dRayMotions.h +++ b/src/xrPhysics/dRayMotions.h @@ -8,4 +8,4 @@ dxGeom* dCreateRayMotions(dSpaceID space); void dGeomRayMotionsSet(dGeomID g, const dReal* p, const dReal* d, dReal l); void dGeomRayMotionSetGeom(dGeomID rm, dGeomID g); -#endif // dRayMotions_h \ No newline at end of file +#endif // dRayMotions_h \ No newline at end of file diff --git a/src/xrPhysics/dcylinder/dCylinder.cpp b/src/xrPhysics/dcylinder/dCylinder.cpp index fbb183fd506..fef347c00c7 100644 --- a/src/xrPhysics/dcylinder/dCylinder.cpp +++ b/src/xrPhysics/dcylinder/dCylinder.cpp @@ -9,8 +9,8 @@ #define M_COS_PI_3 REAL(0.5000000000000000000000000000000000) struct dxCylinder -{ // cylinder - dReal radius, lz; // radius, length along y axis // +{ // cylinder + dReal radius, lz; // radius, length along y axis // }; int dCylinderClassUser = -1; @@ -53,7 +53,7 @@ inline bool circleIntersection( B_A = B / A; B_A_2 = B_A * B_A; D = B_A_2 - C; - if (D < 0.f) { // somewhat strange solution + if (D < 0.f) { // somewhat strange solution //- it is needed to set some // axis to sepparate cylinders // when their edges approach @@ -202,7 +202,7 @@ extern "C" int dCylBox(const dVector3 p1, const dMatrix3 R1, const dReal radius, p[0] = p2[0] - p1[0]; p[1] = p2[1] - p1[1]; p[2] = p2[2] - p1[2]; - dMULTIPLY1_331(pp, R1, p); // get pp = p relative to body 1 + dMULTIPLY1_331(pp, R1, p); // get pp = p relative to body 1 // get side lengths / 2 // A1 =radius; A2 = lz*REAL(0.5); A3 = radius; @@ -639,7 +639,7 @@ extern "C" int dCylCyl(const dVector3 p1, const dMatrix3 R1, const dReal radius1 p[0] = p2[0] - p1[0]; p[1] = p2[1] - p1[1]; p[2] = p2[2] - p1[2]; - dMULTIPLY1_331(pp1, R1, p); // get pp1 = p relative to body 1 + dMULTIPLY1_331(pp1, R1, p); // get pp1 = p relative to body 1 dMULTIPLY1_331(pp2, R2, p); // get side lengths / 2 hlz1 = lz1 * REAL(0.5); @@ -664,7 +664,7 @@ extern "C" int dCylCyl(const dVector3 p1, const dMatrix3 R1, const dReal radius1 dReal c_cos = dFabs(dDOT44(R1 + 1, R2 + 1)); dReal c_sin = dSqrt(1.f - (c_cos > 1.f ? 1.f : c_cos)); - TEST(pp1[1], (hlz1 + radius2 * c_sin + hlz2 * c_cos), R1 + 1, 0); // pp + TEST(pp1[1], (hlz1 + radius2 * c_sin + hlz2 * c_cos), R1 + 1, 0); // pp /// TEST (pp2[1],(radius1*c_sin + hlz1*c_cos + hlz2),R2+1,1); @@ -1273,16 +1273,16 @@ int dCollideCylPlane(dxGeom* o1, dxGeom* o2, int flags, dContactGeom* contact, i dReal hlz; dGeomCylinderGetParams(o1, &radius, &hlz); hlz /= REAL(2.); - const dReal* R = dGeomGetRotation(o1); // rotation of cylinder + const dReal* R = dGeomGetRotation(o1); // rotation of cylinder const dReal* p = dGeomGetPosition(o1); - dVector4 n; // normal vector3 + dVector4 n; // normal vector3 dReal pp; dGeomPlaneGetParams(o2, n); pp = n[3]; dReal cos1, sin1; cos1 = dFabs(dDOT14(n, R + 1)); - cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f + cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f sin1 = dSqrt(REAL(1.) - cos1 * cos1); ////////////////////////////// @@ -1374,10 +1374,10 @@ int dCollideCylRay(dxGeom* o1, dxGeom* o2, int flags, dContactGeom* contact, int dReal lz; dGeomCylinderGetParams(o1, &radius, &lz); dReal lz2 = lz * REAL(0.5); - const dReal* R = dGeomGetRotation(o1); // rotation of the cylinder - const dReal* p = dGeomGetPosition(o1); // position of the cylinder + const dReal* R = dGeomGetRotation(o1); // rotation of the cylinder + const dReal* p = dGeomGetPosition(o1); // position of the cylinder dVector3 start, dir; - dGeomRayGet(o2, start, dir); // position and orientation of the ray + dGeomRayGet(o2, start, dir); // position and orientation of the ray dReal length = dGeomRayGetLength(o2); // compute some useful info @@ -1386,7 +1386,7 @@ int dCollideCylRay(dxGeom* o1, dxGeom* o2, int flags, dContactGeom* contact, int cs[0] = start[0] - p[0]; cs[1] = start[1] - p[1]; cs[2] = start[2] - p[2]; - k = dDOT41(R + 1, cs); // position of ray start along cyl axis (Y) + k = dDOT41(R + 1, cs); // position of ray start along cyl axis (Y) q[0] = k * R[0 * 4 + 1] - cs[0]; q[1] = k * R[1 * 4 + 1] - cs[1]; q[2] = k * R[2 * 4 + 1] - cs[2]; @@ -1469,9 +1469,9 @@ int dCollideCylRay(dxGeom* o1, dxGeom* o2, int flags, dContactGeom* contact, int q[2] = start[2] - (p[2] + k * R[2 * 4 + 1]); dReal alpha = -dDOT14(q, R + 1); dReal k2 = dDOT14(dir, R + 1); - if (k2 == 0) return 0; // ray parallel to the plane + if (k2 == 0) return 0; // ray parallel to the plane alpha /= k2; - if (alpha < 0 || alpha > length) return 0; // too short + if (alpha < 0 || alpha > length) return 0; // too short contact->pos[0] = start[0] + alpha * dir[0]; contact->pos[1] = start[1] + alpha * dir[1]; contact->pos[2] = start[2] + alpha * dir[2]; diff --git a/src/xrPhysics/dcylinder/dCylinder.h b/src/xrPhysics/dcylinder/dCylinder.h index d118e7a53ed..8246040efd0 100644 --- a/src/xrPhysics/dcylinder/dCylinder.h +++ b/src/xrPhysics/dcylinder/dCylinder.h @@ -11,4 +11,4 @@ dxGeom* dCreateCylinder(dSpaceID space, dReal r, dReal lz); void dGeomCylinderSetParams(dGeomID g, dReal radius, dReal length); void dGeomCylinderGetParams(dGeomID g, dReal* radius, dReal* length); -#endif // dCylinder_h \ No newline at end of file +#endif // dCylinder_h \ No newline at end of file diff --git a/src/xrPhysics/debug_output.cpp b/src/xrPhysics/debug_output.cpp index 333a433056b..fd02a5ea129 100644 --- a/src/xrPhysics/debug_output.cpp +++ b/src/xrPhysics/debug_output.cpp @@ -24,11 +24,14 @@ static class DebugOutputEmptyImpl : public IDebugOutput virtual void DBG_DrawOBB(const Fmatrix& m, const Fvector h, u32 c) {} virtual void DBG_DrawPoint(const Fvector& p, float size, u32 c) {} virtual void DBG_DrawMatrix(const Fmatrix& m, float size, u8 a = 255) {} - // virtual void DBG_DrawRotationX( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationX( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; - // virtual void DBG_DrawRotationY( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationY( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; - // virtual void DBG_DrawRotationZ( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationZ( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; virtual void _cdecl DBG_OutText(LPCSTR s, ...) {} // virtual void DBG_TextOutSet( float x, float y ) =0; diff --git a/src/xrPhysics/debug_output.h b/src/xrPhysics/debug_output.h index ce79b240111..26614ad0454 100644 --- a/src/xrPhysics/debug_output.h +++ b/src/xrPhysics/debug_output.h @@ -87,11 +87,14 @@ class IDebugOutput virtual void DBG_DrawOBB(const Fmatrix& m, const Fvector h, u32 c) = 0; virtual void DBG_DrawPoint(const Fvector& p, float size, u32 c) = 0; virtual void DBG_DrawMatrix(const Fmatrix& m, float size, u8 a = 255) = 0; - // virtual void DBG_DrawRotationX( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationX( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; - // virtual void DBG_DrawRotationY( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationY( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; - // virtual void DBG_DrawRotationZ( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = false, + // virtual void DBG_DrawRotationZ( const Fmatrix &m, float ang0, float ang1, float size, u32 ac, bool solid = + // false, // u32 tessel = 7 ) = 0; virtual void _cdecl DBG_OutText(LPCSTR s, ...) = 0; // virtual void DBG_TextOutSet( float x, float y ) =0; diff --git a/src/xrPhysics/iclimableobject.h b/src/xrPhysics/iclimableobject.h index a05be46f3b6..bdba5ac8575 100644 --- a/src/xrPhysics/iclimableobject.h +++ b/src/xrPhysics/iclimableobject.h @@ -13,11 +13,11 @@ class IClimableObject virtual const Fvector& Norm() const = 0; virtual float DDNorm(Fvector& dir) const = 0; virtual bool BeforeLadder(CPHCharacter* actor, float tolerance = 0.f) const = 0; - virtual float DDLowerP(CPHCharacter* actor, Fvector& out_dir) const = 0; // returns distance and dir to lover point - virtual float DDUpperP(CPHCharacter* actor, Fvector& out_dir) const = 0; // returns distance and dir to upper point + virtual float DDLowerP(CPHCharacter* actor, Fvector& out_dir) const = 0; // returns distance and dir to lover point + virtual float DDUpperP(CPHCharacter* actor, Fvector& out_dir) const = 0; // returns distance and dir to upper point // // virtual void DToAxis (CPHCharacter *actor,Fvector &dir)const=0; - virtual float DDToAxis(CPHCharacter* actor, Fvector& out_dir) const = 0; // returns distance and dir to ladder axis + virtual float DDToAxis(CPHCharacter* actor, Fvector& out_dir) const = 0; // returns distance and dir to ladder axis // virtual void POnAxis (CPHCharacter *actor,Fvector &P)const=0; // virtual float AxDistToUpperP(CPHCharacter* actor) const = 0; diff --git a/src/xrPhysics/iphysics_scripted.h b/src/xrPhysics/iphysics_scripted.h index 840590acfc1..280d0d19dcb 100644 --- a/src/xrPhysics/iphysics_scripted.h +++ b/src/xrPhysics/iphysics_scripted.h @@ -42,7 +42,7 @@ class noncopyable protected: noncopyable() {} ~noncopyable() {} -private: // emphasize the following members are private +private: // emphasize the following members are private noncopyable(const noncopyable&); const noncopyable& operator=(const noncopyable&); }; diff --git a/src/xrPhysics/ode_redefine.h b/src/xrPhysics/ode_redefine.h index 849bc4c1709..9cf6767a318 100644 --- a/src/xrPhysics/ode_redefine.h +++ b/src/xrPhysics/ode_redefine.h @@ -28,6 +28,6 @@ #define dFabs(x) ((float)_abs(x)) /* absolute value */ #endif -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS -#endif // ODE_REDEFINE \ No newline at end of file +#endif // ODE_REDEFINE \ No newline at end of file diff --git a/src/xrPhysics/params.cpp b/src/xrPhysics/params.cpp index 525417526e9..0b892b7cd0c 100644 --- a/src/xrPhysics/params.cpp +++ b/src/xrPhysics/params.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "params.h" -float object_damage_factor = 1.f; // times increace damage from object collision +float object_damage_factor = 1.f; // times increace damage from object collision void LoadParams() { if (!pSettings) return; diff --git a/src/xrPhysics/tri-colliderknoopc/__aabb_tri.h b/src/xrPhysics/tri-colliderknoopc/__aabb_tri.h index c4f3f57c598..98de4ed345a 100644 --- a/src/xrPhysics/tri-colliderknoopc/__aabb_tri.h +++ b/src/xrPhysics/tri-colliderknoopc/__aabb_tri.h @@ -22,10 +22,12 @@ class Point // IC float Max() const { return MAX(x, MAX(y, z)); // } //! TO BE DOCUMENTED - // IC Point& Min(const Point& p) { x = MIN(x, p.x); y = MIN(y, p.y); z = MIN(z, p.z); return *this; + // IC Point& Min(const Point& p) { x = MIN(x, p.x); y = MIN(y, p.y); z = MIN(z, p.z); return + // *this; // } //! TO BE DOCUMENTED - // IC Point& Max(const Point& p) { x = MAX(x, p.x); y = MAX(y, p.y); z = MAX(z, p.z); return *this; + // IC Point& Max(const Point& p) { x = MAX(x, p.x); y = MAX(y, p.y); z = MAX(z, p.z); return + // *this; // } //! Computes square magnitude @@ -130,9 +132,9 @@ class Point //! Access as array ICF operator float*() { return &x; } public: - float x; //!< x coordinate - float y; //!< y coordinate - float z; //!< z coordinate + float x; //!< x coordinate + float y; //!< y coordinate + float z; //!< z coordinate }; // using namespace CDB; using namespace Opcode; diff --git a/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h b/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h index 86ed140a2e5..fa95a599c97 100644 --- a/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h +++ b/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h @@ -49,7 +49,7 @@ int SetBackTrajectoryCnt( } else { - Contacts->depth = dSqrt(sq_mag); // neg_tri.depth;// + Contacts->depth = dSqrt(sq_mag); // neg_tri.depth;// dReal r_mag = 1.f / Contacts->depth; Contacts->normal[0] *= r_mag; Contacts->normal[1] *= r_mag; @@ -131,8 +131,8 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide( bool* pushing_b_neg = &data->pushing_b_neg; bool spushing_neg = *pushing_neg; bool spushing_b_neg = *pushing_b_neg; - Triangle neg_tri; //=&(data->neg_tri); - Triangle b_neg_tri; //=&(data->b_neg_tri); + Triangle neg_tri; //=&(data->neg_tri); + Triangle b_neg_tri; //=&(data->b_neg_tri); bool neg_tri_contains_point = true; if (*pushing_neg) { CalculateTri(data->neg_tri, p, neg_tri, V_array); @@ -176,7 +176,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide( #endif } - bool b_pushing = *pushing_neg; //||*pushing_b_neg; + bool b_pushing = *pushing_neg; //||*pushing_b_neg; gl_cl_tries_state.resize(data->cashed_tries.size(), Flags8().assign(0)); B = data->cashed_tries.begin(), E = data->cashed_tries.end(); bool gb_pased = false; @@ -257,9 +257,8 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide( if (neg_depth > tri.depth && (!(*pushing_neg || spushing_neg) || dDOT(neg_tri.norm, tri.norm) > -M_SQRT1_2) && (!(*pushing_b_neg || spushing_b_neg) || - dDOT(b_neg_tri.norm, tri.norm) > - -M_SQRT1_2)) // exclude switching on opposite side - // &&(!*pushing_b_neg||dDOT(b_neg_tri->norm,tri.norm)>-M_SQRT1_2) + dDOT(b_neg_tri.norm, tri.norm) > -M_SQRT1_2)) // exclude switching on opposite side + // &&(!*pushing_b_neg||dDOT(b_neg_tri->norm,tri.norm)>-M_SQRT1_2) { neg_depth = tri.depth; neg_tri = tri; @@ -269,15 +268,15 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide( } } - if (!b_pased && b_passable) { //! contain_pos&& + if (!b_pased && b_passable) { //! contain_pos&& ++b_count; dReal sidePr = primitive.Proj(o1, tri.norm); tri.depth = sidePr - tri.dist; if (b_neg_depth > tri.depth && (!(*pushing_b_neg || spushing_b_neg) || dDOT(b_neg_tri.norm, tri.norm) > -M_SQRT1_2) && ((!*pushing_neg || !spushing_neg) || dDOT(neg_tri.norm, tri.norm) > -M_SQRT1_2)) - { // exclude switching on opposite side - // &&(!*pushing_neg||dDOT(neg_tri->norm,tri.norm)>-M_SQRT1_2) + { // exclude switching on opposite side + // &&(!*pushing_neg||dDOT(neg_tri->norm,tri.norm)>-M_SQRT1_2) b_neg_depth = tri.depth; b_neg_tri = tri; data->b_neg_tri = tri.T; @@ -380,7 +379,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide( ret = bret; } } - if (!*pushing_neg) // no_last_pos|| && !*pushing_b_neg + if (!*pushing_neg) // no_last_pos|| && !*pushing_b_neg dVectorSet(last_pos, p); return ret; } diff --git a/src/xrPhysics/tri-colliderknoopc/dTriBox.cpp b/src/xrPhysics/tri-colliderknoopc/dTriBox.cpp index 7fd5bdb05d7..196aecf5652 100644 --- a/src/xrPhysics/tri-colliderknoopc/dTriBox.cpp +++ b/src/xrPhysics/tri-colliderknoopc/dTriBox.cpp @@ -22,18 +22,18 @@ int dcTriListCollider::dSortedTriBox(const dReal* triSideAx0, const dReal* triSi // find number of contacts requested int maxc = flags & NUMC_MASK; if (maxc < 1) maxc = 1; - if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed + if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed int code = 0; dReal outDepth; - char signum; //,sn; + char signum; //,sn; dReal sidePr = dFabs(dDOT14(triAx, R + 0) * hside[0]) + dFabs(dDOT14(triAx, R + 1) * hside[1]) + dFabs(dDOT14(triAx, R + 2) * hside[2]); - dReal depth = sidePr - dist; // dFabs(dist); + dReal depth = sidePr - dist; // dFabs(dist); outDepth = depth; - signum = -1; // dist<0.f ? -1 : 1; + signum = -1; // dist<0.f ? -1 : 1; code = 0; if (depth < 0.f) return 0; @@ -122,7 +122,7 @@ int dcTriListCollider::dSortedTriBox(const dReal* triSideAx0, const dReal* triSi goto use_side_3; else { - BAR(1, 0, 1); // use side 1 + BAR(1, 0, 1); // use side 1 if (maxc == 2) goto done; if (B2 < B3) goto contact2_2; @@ -133,7 +133,7 @@ int dcTriListCollider::dSortedTriBox(const dReal* triSideAx0, const dReal* triSi else { if (B3 < B2) { - use_side_3: // use side 3 + use_side_3: // use side 3 BAR(1, 2, 3); if (maxc == 2) goto done; if (B1 < B2) @@ -143,7 +143,7 @@ int dcTriListCollider::dSortedTriBox(const dReal* triSideAx0, const dReal* triSi } else { - BAR(1, 1, 2); // use side 2 + BAR(1, 1, 2); // use side 2 if (maxc == 2) goto done; if (B1 < B3) goto contact2_1; @@ -268,11 +268,11 @@ int dcTriListCollider::dTriBox(const dReal* v0, const dReal* v1, const dReal* v2 // find number of contacts requested int maxc = flags & NUMC_MASK; if (maxc < 1) maxc = 1; - if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed + if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed // dVector3 triAx; - const dReal* triSideAx0 = T->side0; //{v1[0]-v0[0],v1[1]-v0[1],v1[2]-v0[2]}; - const dReal* triSideAx1 = T->side1; //{v2[0]-v1[0],v2[1]-v1[1],v2[2]-v1[2]}; + const dReal* triSideAx0 = T->side0; //{v1[0]-v0[0],v1[1]-v0[1],v1[2]-v0[2]}; + const dReal* triSideAx1 = T->side1; //{v2[0]-v1[0],v2[1]-v1[1],v2[2]-v1[2]}; dVector3 triSideAx2 = {v0[0] - v2[0], v0[1] - v2[1], v0[2] - v2[2]}; // dCROSS(triAx,=,triSideAx0,triSideAx1); int code = 0; diff --git a/src/xrPhysics/tri-colliderknoopc/dTriBox.h b/src/xrPhysics/tri-colliderknoopc/dTriBox.h index 4fe9a105eb3..aff73fce258 100644 --- a/src/xrPhysics/tri-colliderknoopc/dTriBox.h +++ b/src/xrPhysics/tri-colliderknoopc/dTriBox.h @@ -8,7 +8,7 @@ struct Triangle; struct dxBox { - dVector3 side; // side lengths (x,y,z) + dVector3 side; // side lengths (x,y,z) }; IC float dcTriListCollider::dBoxProj(dxGeom* box, const dReal* normal) @@ -85,7 +85,7 @@ IC bool dcTriListCollider::CrossProjLine14( dReal t2 = (ac_vc1 * vc1_vc2 - ac_vc2 * vc1_2) / factor; - dReal nt2 = t2; //*_sqrt(vc2_2); + dReal nt2 = t2; //*_sqrt(vc2_2); if (nt2 > hside || nt2 < -hside) return false; proj[0] = pt1[0] + vc1[0] * t1; diff --git a/src/xrPhysics/tri-colliderknoopc/dTriCylinder.cpp b/src/xrPhysics/tri-colliderknoopc/dTriCylinder.cpp index fa82ffafa5c..32895ef6cb0 100644 --- a/src/xrPhysics/tri-colliderknoopc/dTriCylinder.cpp +++ b/src/xrPhysics/tri-colliderknoopc/dTriCylinder.cpp @@ -79,7 +79,7 @@ int dcTriListCollider::dSortedTriCyl(const dReal* triSideAx0, const dReal* triSi // find number of contacts requested int maxc = flags & NUMC_MASK; if (maxc < 1) maxc = 1; - if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed + if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed dReal signum, outDepth, cos1, sin1; //////////////////////////////////////////////////////////////////////////// @@ -94,7 +94,7 @@ int dcTriListCollider::dSortedTriCyl(const dReal* triSideAx0, const dReal* triSi //////////////////////// // another way ////////// - cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f + cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f sin1 = _sqrt(REAL(1.) - cos1 * cos1); ////////////////////////////// @@ -121,7 +121,7 @@ int dcTriListCollider::dSortedTriCyl(const dReal* triSideAx0, const dReal* triSi dReal Q3 = signum * dDOT14(triAx, R + 2); dReal factor = _sqrt(Q1 * Q1 + Q3 * Q3); dReal C1, C3; - dReal centerDepth; // depth in the cirle centre + dReal centerDepth; // depth in the cirle centre if (factor > 0.f) { C1 = Q1 / factor; C3 = Q3 / factor; @@ -132,9 +132,9 @@ int dcTriListCollider::dSortedTriCyl(const dReal* triSideAx0, const dReal* triSi C3 = 0.f; } - dReal A1 = radius * C1; // cosinus + dReal A1 = radius * C1; // cosinus dReal A2 = hlz * Q2; - dReal A3 = radius * C3; // sinus + dReal A3 = radius * C3; // sinus if (factor > 0.f) centerDepth = outDepth - A1 * Q1 - A3 * Q3; @@ -267,11 +267,11 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 // find number of contacts requested int maxc = flags & NUMC_MASK; if (maxc < 1) maxc = 1; - if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed + if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed const dVector3& triAx = T->norm; - dVector3 triSideAx0 = {T->side0[0], T->side0[1], T->side0[2]}; //{v1[0]-v0[0],v1[1]-v0[1],v1[2]-v0[2]}; - dVector3 triSideAx1 = {T->side1[0], T->side1[1], T->side1[2]}; //{v2[0]-v1[0],v2[1]-v1[1],v2[2]-v1[2]}; + dVector3 triSideAx0 = {T->side0[0], T->side0[1], T->side0[2]}; //{v1[0]-v0[0],v1[1]-v0[1],v1[2]-v0[2]}; + dVector3 triSideAx1 = {T->side1[0], T->side1[1], T->side1[2]}; //{v2[0]-v1[0],v2[1]-v1[1],v2[2]-v1[2]}; dVector3 triSideAx2 = {v0[0] - v2[0], v0[1] - v2[1], v0[2] - v2[2]}; // dCROSS(triAx,=,triSideAx0,triSideAx1); int code = 0; @@ -289,13 +289,13 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 //////////////////////// // another way ////////// - cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f + cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f sin1 = _sqrt(REAL(1.) - cos1 * cos1); ////////////////////////////// dReal sidePr = cos1 * hlz + sin1 * radius; - dReal dist = -T->dist; // dDOT(triAx,v0)-dDOT(triAx,p); + dReal dist = -T->dist; // dDOT(triAx,v0)-dDOT(triAx,p); if (dist > 0.f) RETURN0; dReal depth = sidePr - dFabs(dist); outDepth = depth; @@ -331,7 +331,7 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 testV2 = depth2 > 0.f; if (isPdist0 == isPdist1 && - isPdist1 == isPdist2) //(here and lower) check the tryangle is on one side of the cylinder + isPdist1 == isPdist2) //(here and lower) check the tryangle is on one side of the cylinder { if (depth0 > depth1) @@ -434,7 +434,7 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 #undef TEST dVector3 tpos, pos; - if (code > 3) outDepth = pointDepth; // deepest vertex axis used if its depth less than outDepth + if (code > 3) outDepth = pointDepth; // deepest vertex axis used if its depth less than outDepth // else{ // bool outV0=!(testV0&&sideTestV00&&sideTestV10&&sideTestV20); // bool outV1=!(testV1&&sideTestV01&&sideTestV11&&sideTestV21); @@ -589,7 +589,7 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 dReal Q3 = dDOT14(norm, R + 2); dReal factor = _sqrt(Q1 * Q1 + Q3 * Q3); dReal C1, C3; - dReal centerDepth; // depth in the cirle centre + dReal centerDepth; // depth in the cirle centre if (factor > 0.f) { C1 = Q1 / factor; C3 = Q3 / factor; @@ -600,9 +600,9 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 C3 = 0.f; } - dReal A1 = radius * C1; // cosinus - dReal A2 = hlz; // Q2 - dReal A3 = radius * C3; // sinus + dReal A1 = radius * C1; // cosinus + dReal A2 = hlz; // Q2 + dReal A3 = radius * C3; // sinus if (factor > 0.f) centerDepth = outDepth - A1 * Q1 - A3 * Q3; @@ -682,7 +682,7 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 ++ret; } } - else if (code < 7) // 1-6 + else if (code < 7) // 1-6 { ret = 1; contact->depth = outDepth; @@ -711,7 +711,7 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 break; } - if (code < 4) { // 1-3 + if (code < 4) { // 1-3 norm[0] = R[1] * signum; norm[1] = R[5] * signum; norm[2] = R[9] * signum; @@ -725,7 +725,7 @@ int dcTriListCollider::dTriCyl(const dReal* v0, const dReal* v1, const dReal* v2 } else - { // 7-12 + { // 7-12 ret = 1; int iv0 = (code - 7) % 3; int iv1 = (iv0 + 1) % 3; diff --git a/src/xrPhysics/tri-colliderknoopc/dTriCylinder.h b/src/xrPhysics/tri-colliderknoopc/dTriCylinder.h index 14733e238c0..192a10bf42b 100644 --- a/src/xrPhysics/tri-colliderknoopc/dTriCylinder.h +++ b/src/xrPhysics/tri-colliderknoopc/dTriCylinder.h @@ -5,8 +5,8 @@ #include "xrPhysics/dCylinder/dCylinder.h" struct dxCylinder -{ // cylinder - dReal radius, lz; // radius, length along z axis */ +{ // cylinder + dReal radius, lz; // radius, length along z axis */ }; IC float dcTriListCollider::dCylProj(dxGeom* cylinder, const dReal* normal) @@ -17,7 +17,7 @@ IC float dcTriListCollider::dCylProj(dxGeom* cylinder, const dReal* normal) const dReal* R = dGeomGetRotation(cylinder); hlz *= 0.5f; float cos1 = dFabs(dDOT14(normal, R + 1)); - cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f + cos1 = cos1 < REAL(1.) ? cos1 : REAL(1.); // cos1 may slightly exeed 1.f float sin1 = _sqrt(REAL(1.) - cos1 * cos1); ////////////////////////////// return cos1 * hlz + sin1 * radius; diff --git a/src/xrPhysics/tri-colliderknoopc/dTriList.cpp b/src/xrPhysics/tri-colliderknoopc/dTriList.cpp index 2774a1fd389..591e39d1b7b 100644 --- a/src/xrPhysics/tri-colliderknoopc/dTriList.cpp +++ b/src/xrPhysics/tri-colliderknoopc/dTriList.cpp @@ -1,5 +1,5 @@ #include "dTriCollideK.h" -#include "dcTriListCollider.cpp" // Allow inlining +#include "dcTriListCollider.cpp" // Allow inlining #include "dcTriListCollider.h" #include "dxTriList.h" #include "stdafx.h" diff --git a/src/xrPhysics/tri-colliderknoopc/dTriSphere.cpp b/src/xrPhysics/tri-colliderknoopc/dTriSphere.cpp index 068162a121a..8de050629b9 100644 --- a/src/xrPhysics/tri-colliderknoopc/dTriSphere.cpp +++ b/src/xrPhysics/tri-colliderknoopc/dTriSphere.cpp @@ -68,7 +68,7 @@ IC bool dcTriListCollider::FragmentonSphereTest( dVector3 L = {pt1[0] - center[0], pt1[1] - center[1], pt1[2] - center[2]}; dReal sq_mag_V = dDOT(V, V); dReal dot_L_V = dDOT(L, V); - dReal t = -dot_L_V / sq_mag_V; // t + dReal t = -dot_L_V / sq_mag_V; // t if (t < 0.f || t > 1.f) return false; dVector3 Pc = {pt1[0] + t * V[0], pt1[1] + t * V[1], pt1[2] + t * V[2]}; dVector3 Dc = {center[0] - Pc[0], center[1] - Pc[1], center[2] - Pc[2]}; @@ -127,7 +127,7 @@ int dcTriListCollider::dSortedTriSphere(const dReal* /**v1/**/, const dReal* /** const float SphereRadius = dGeomSphereGetRadius(Sphere); // dNormalize3(triAx); - const dReal* ContactNormal = triAx; //{triAx[0],triAx[1],triAx[2]}; + const dReal* ContactNormal = triAx; //{triAx[0],triAx[1],triAx[2]}; dVector3 ContactPos = {SphereCenter[0] - triAx[0] * SphereRadius, SphereCenter[1] - triAx[1] * SphereRadius, SphereCenter[2] - triAx[2] * SphereRadius}; diff --git a/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.cpp b/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.cpp index f4145b34fe1..144c1d88927 100644 --- a/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.cpp +++ b/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.cpp @@ -18,8 +18,7 @@ dcTriListCollider::~dcTriListCollider() { } -int dCollideBP( - const dxGeom* o1, const dxGeom* o2, int flags, dContactGeom* contact, int skip); // ODE internal function +int dCollideBP(const dxGeom* o1, const dxGeom* o2, int flags, dContactGeom* contact, int skip); // ODE internal function //#define CONTACT(Ptr, Stride) ((dContactGeom*) (((byte*)Ptr) + (Stride))) //#define SURFACE(Ptr, Stride) ((dSurfaceParameters*) (((byte*)Ptr) + (Stride-sizeof(dSurfaceParameters)))) diff --git a/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.h b/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.h index 4d9e000d325..3f49e18b88d 100644 --- a/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.h +++ b/src/xrPhysics/tri-colliderknoopc/dcTriListCollider.h @@ -16,8 +16,8 @@ enum class dcTriListCollider; class dcTriListCollider { - dxGeom* Geometry; // The geom object - dxTriList* GeomData; // Buffered pointer to classdata + dxGeom* Geometry; // The geom object + dxTriList* GeomData; // Buffered pointer to classdata xr_vector pos_tries; xr_vector neg_tries; @@ -119,4 +119,4 @@ IC void dcTriListCollider::SideToGlClTriState(u32 v0, u32 v1, CDB::TRI* T_array) } } -#endif //__DCTRILISTCOLLIDER_INCLUDED__( \ No newline at end of file +#endif //__DCTRILISTCOLLIDER_INCLUDED__( \ No newline at end of file diff --git a/src/xrPhysics/tri-colliderknoopc/dxTriList.h b/src/xrPhysics/tri-colliderknoopc/dxTriList.h index 13d1f9d143b..43e8476393a 100644 --- a/src/xrPhysics/tri-colliderknoopc/dxTriList.h +++ b/src/xrPhysics/tri-colliderknoopc/dxTriList.h @@ -27,7 +27,7 @@ struct dcVector3 ~dcVector3() {} operator float*() - { //&slipch + { //&slipch return reinterpret_cast(this); } @@ -261,7 +261,7 @@ class dcTriListCollider; struct dxTriList { - dReal p[4]; // dxPlane + dReal p[4]; // dxPlane dTriCallback* Callback; @@ -301,7 +301,7 @@ struct dcPlane bool Contains(const dcVector3& RefObject, float Epsilon = 0.0f) const { - return Normal.DotProduct(RefObject) - Distance >= -Epsilon; //@slipch ">=" instead ">" + return Normal.DotProduct(RefObject) - Distance >= -Epsilon; //@slipch ">=" instead ">" } }; @@ -317,4 +317,4 @@ const T& dcMIN(const T& x, const T& y) return x < y ? x : y; } -#endif //__DXTRILIST_INCLUDED__ \ No newline at end of file +#endif //__DXTRILIST_INCLUDED__ \ No newline at end of file diff --git a/src/xrPhysics/xrPhysics.cpp b/src/xrPhysics/xrPhysics.cpp index 3127dc28f57..028f37827d5 100644 --- a/src/xrPhysics/xrPhysics.cpp +++ b/src/xrPhysics/xrPhysics.cpp @@ -28,7 +28,7 @@ static void ode_free(void* ptr, size_t size) { return xr_free(ptr); } -#else // DEBUG_MEMORY_MANAGER +#else // DEBUG_MEMORY_MANAGER static void* ode_alloc(size_t size) { return xr_malloc(size); @@ -41,7 +41,7 @@ static void ode_free(void* ptr, size_t size) { return xr_free(ptr); } -#endif // DEBUG_MEMORY_MANAGER +#endif // DEBUG_MEMORY_MANAGER BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { diff --git a/src/xrScriptEngine/BindingsDumper.cpp b/src/xrScriptEngine/BindingsDumper.cpp index c8ad727ac55..e4f81bc3717 100644 --- a/src/xrScriptEngine/BindingsDumper.cpp +++ b/src/xrScriptEngine/BindingsDumper.cpp @@ -52,10 +52,10 @@ luabind::detail::function_object* get_upvalue_function(lua_State* ls, int n) if (ltype == LUA_TFUNCTION) { if (lua_getupvalue(ls, -1, 1)) { if (lua_type(ls, -1) == LUA_TUSERDATA) f = *static_cast(lua_touserdata(ls, -1)); - lua_pop(ls, 1); // upvalue + lua_pop(ls, 1); // upvalue } } - lua_pop(ls, 1); // upvalue + lua_pop(ls, 1); // upvalue } return f; } @@ -106,9 +106,9 @@ void BindingsDumper::PrintFunction(SignatureFormatter formatter, const void* fco done = true; } } - lua_pop(ls, 1); // pop upvalue + lua_pop(ls, 1); // pop upvalue } - if (cfunc && !done && hasupvalue) // property + if (cfunc && !done && hasupvalue) // property { const char* propName = lua_tostring(ls, -2); function_object* getter = get_upvalue_function(ls, 1); @@ -144,14 +144,14 @@ void BindingsDumper::PrintStaticFunction() void BindingsDumper::FormatMemberFunction(const SignatureFormatterParams& params) { auto refClassName = static_cast(params.Context); - bool stripReturnValue = false; // for constructors and operators + bool stripReturnValue = false; // for constructors and operators xr_string funcName; auto refFuncName = params.Function->name; if (refFuncName == "__init") { funcName = refClassName; stripReturnValue = true; } - else // check operators + else // check operators { auto it = operatorSubst.find(refFuncName); if (it != operatorSubst.end()) { @@ -178,7 +178,7 @@ void BindingsDumper::FormatMemberFunction(const SignatureFormatterParams& params xr_string className = refClassName; // check if arg matches 'className[ const]{*|&}' std::regex matcher(className + "( const)?(\\*|&)$"); - if (std::regex_match(arg, matcher)) // non-derived member function + if (std::regex_match(arg, matcher)) // non-derived member function { if (options.StripThis) signLen -= StripArg(ls, argIndex); } @@ -187,12 +187,12 @@ void BindingsDumper::FormatMemberFunction(const SignatureFormatterParams& params // check special cases: opertators and constructors // void __tostring(lua_State*, ClassName&); // operator // void __init(luabind::argument const&, int); // constructor - if (arg == "lua_State*" && argCount > 1) // operator? + if (arg == "lua_State*" && argCount > 1) // operator? { // 1] check next argument: int nextArgIndex = argIndex + 2; const char* nextArg = lua_tostring(ls, nextArgIndex); - if (className.append("&") != nextArg) // derived? + if (className.append("&") != nextArg) // derived? { // if next!=className && ignoreDerived => ignore if (options.IgnoreDerived) { @@ -205,11 +205,11 @@ void BindingsDumper::FormatMemberFunction(const SignatureFormatterParams& params // 3] if stripThis => remove next argIndex = nextArgIndex; } - else if (arg == "luabind::argument const&") // constructor? + else if (arg == "luabind::argument const&") // constructor? { if (!options.StripThis) ReplaceArg(ls, argIndex, className.append("&").c_str()); } - else if (options.IgnoreDerived) // some derived function, ignore? + else if (options.IgnoreDerived) // some derived function, ignore? { lua_pop(ls, signLen); return; @@ -220,7 +220,7 @@ void BindingsDumper::FormatMemberFunction(const SignatureFormatterParams& params } const char* signature = lua_tostring(ls, -1); PrintfIndented("%s;\n", signature); - lua_pop(ls, 1); // pop concatenated signature + lua_pop(ls, 1); // pop concatenated signature }; void BindingsDumper::PrintMemberFunction(const char* className) @@ -274,7 +274,7 @@ void BindingsDumper::PrintClass() lua_pop(ls, 1); R_ASSERT(lua_gettop(ls) == prev); } - lua_pop(ls, 1); // pop default table + lua_pop(ls, 1); // pop default table // print constants auto& constants = crep->static_constants(); for (auto& c : constants) @@ -288,12 +288,12 @@ void BindingsDumper::PrintClass() int prev = lua_gettop(ls); proxy.push(ls); int ltype = luabind::type(proxy); - if (ltype == LUA_TFUNCTION) // XXX: print class members in reverse order + if (ltype == LUA_TFUNCTION) // XXX: print class members in reverse order PrintMemberFunction(crep->name()); lua_pop(ls, 1); R_ASSERT(lua_gettop(ls) == prev); } - lua_pop(ls, 1); // pop table + lua_pop(ls, 1); // pop table shiftLevel--; PrintIndented("}\n"); } @@ -309,15 +309,15 @@ void BindingsDumper::PrintNamespace(luabind::object& namesp) int ltype = luabind::type(proxy); switch (ltype) { - case LUA_TFUNCTION: // free function + case LUA_TFUNCTION: // free function scopeFunctions++; functions.push(it); break; - case LUA_TUSERDATA: // class + case LUA_TUSERDATA: // class scopeClasses++; classes.push(it); break; - case LUA_TTABLE: // namespace + case LUA_TTABLE: // namespace scopeNamespaces++; namespaces.push(it); break; diff --git a/src/xrScriptEngine/LuaStudio/Backend/Backend.hpp b/src/xrScriptEngine/LuaStudio/Backend/Backend.hpp index a7b1f2c8641..0b06f7a4614 100644 --- a/src/xrScriptEngine/LuaStudio/Backend/Backend.hpp +++ b/src/xrScriptEngine/LuaStudio/Backend/Backend.hpp @@ -58,5 +58,5 @@ struct DECLSPEC_NOVTABLE value_to_expand virtual void CS_LUA_STUDIO_BACKEND_CALL add_value( char const* id, char const* type, char const* value, icon_type icon_type) = 0; }; -} // namespace lua_studio -} // namespace cs +} // namespace lua_studio +} // namespace cs diff --git a/src/xrScriptEngine/LuaStudio/Backend/Engine.hpp b/src/xrScriptEngine/LuaStudio/Backend/Engine.hpp index e5587c70970..d086bfa2cc2 100644 --- a/src/xrScriptEngine/LuaStudio/Backend/Engine.hpp +++ b/src/xrScriptEngine/LuaStudio/Backend/Engine.hpp @@ -147,5 +147,5 @@ struct DECLSPEC_NOVTABLE XRSCRIPTENGINE_API engine virtual bool CS_LUA_STUDIO_BACKEND_CALL expand_value( cs::lua_studio::backend& backend, cs::lua_studio::value_to_expand& value, lua_State* state) = 0; }; -} // namespace lua_studio -} // namespace cs +} // namespace lua_studio +} // namespace cs diff --git a/src/xrScriptEngine/LuaStudio/Backend/World.hpp b/src/xrScriptEngine/LuaStudio/Backend/World.hpp index 43c6dba979c..93bf1a1b48a 100644 --- a/src/xrScriptEngine/LuaStudio/Backend/World.hpp +++ b/src/xrScriptEngine/LuaStudio/Backend/World.hpp @@ -23,7 +23,7 @@ struct DECLSPEC_NOVTABLE world virtual int CS_LUA_STUDIO_BACKEND_CALL on_error(lua_State* state) = 0; virtual void CS_LUA_STUDIO_BACKEND_CALL add_log_line(const char* log_line) = 0; virtual bool CS_LUA_STUDIO_BACKEND_CALL evaluating_watch() = 0; -}; // struct DECLSPEC_NOVTABLE world +}; // struct DECLSPEC_NOVTABLE world typedef void* maf_parameter; typedef void*(CS_LUA_STUDIO_BACKEND_CALL* maf_ptr)(maf_parameter parameter, void const*, size_t); @@ -33,8 +33,8 @@ typedef void(CS_LUA_STUDIO_BACKEND_CALL* destroy_world_function_type)(world*& wo typedef void(CS_LUA_STUDIO_BACKEND_CALL* memory_allocator_function_type)( maf_ptr memory_allocator, maf_parameter parameter); typedef size_t(CS_LUA_STUDIO_BACKEND_CALL* memory_stats_function_type)(); -} // namespace lua_studio -} // namespace cs +} // namespace lua_studio +} // namespace cs extern "C" { CS_LUA_STUDIO_BACKEND_API cs::lua_studio::world* CS_LUA_STUDIO_BACKEND_CALL cs_lua_studio_backend_create_world( diff --git a/src/xrScriptEngine/LuaStudio/Config.hpp b/src/xrScriptEngine/LuaStudio/Config.hpp index 659e7bb1c79..ee1aff8c347 100644 --- a/src/xrScriptEngine/LuaStudio/Config.hpp +++ b/src/xrScriptEngine/LuaStudio/Config.hpp @@ -13,20 +13,20 @@ #if defined(WIN32) #define CS_PLATFORM_WINDOWS_32 #define CS_PLATFORM_ID -#elif defined(_XBOX) // #if defined(WIN32) +#elif defined(_XBOX) // #if defined(WIN32) #define CS_PLATFORM_XBOX_360 #define CS_STATIC_LIBRARIES #define CS_PLATFORM_ID [xbox_360] -#else // #elif defined(_XBOX) +#else // #elif defined(_XBOX) STATIC_CHECK(false, Unknown_Platform); -#endif // #elif defined(_XBOX) +#endif // #elif defined(_XBOX) #ifdef DEBUG #define CS_DEBUG_LIBRARIES #define CS_SOLUTION_CONFIGURATION_ID (debug) -#else // #ifdef DEBUG +#else // #ifdef DEBUG #define CS_SOLUTION_CONFIGURATION_ID -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG #define CS_LIBRARY_PREFIX cs. #define CS_CALL __stdcall @@ -35,10 +35,10 @@ STATIC_CHECK(false, Unknown_Platform); #ifndef CS_API #ifdef CS_STATIC_LIBRARIES #define CS_API -#else // #ifdef CS_STATIC_LIBRARIES +#else // #ifdef CS_STATIC_LIBRARIES #define CS_API __declspec(dllimport) -#endif // #ifdef CS_STATIC_LIBRARIES -#endif // #ifndef CS_API +#endif // #ifdef CS_STATIC_LIBRARIES +#endif // #ifndef CS_API // exceptions haven't been supported yet // #define CS_USE_EXCEPTIONS diff --git a/src/xrScriptEngine/LuaStudio/Defines.hpp b/src/xrScriptEngine/LuaStudio/Defines.hpp index 7e84077dae6..5400d06108c 100644 --- a/src/xrScriptEngine/LuaStudio/Defines.hpp +++ b/src/xrScriptEngine/LuaStudio/Defines.hpp @@ -11,21 +11,21 @@ // STATIC_CHECK macro #ifndef STATIC_CHECK #define STATIC_CHECK(expr, msg) typedef char ERROR_##msg[1][(expr)] -#endif // #ifndef STATIC_CHECK +#endif // #ifndef STATIC_CHECK // DECLSPEC_NOVTABLE macro #ifndef DECLSPEC_NOVTABLE #if (_MSC_VER >= 1100) && defined(__cplusplus) #define DECLSPEC_NOVTABLE __declspec(novtable) -#else // #if (_MSC_VER >= 1100) && defined(__cplusplus) +#else // #if (_MSC_VER >= 1100) && defined(__cplusplus) #define DECLSPEC_NOVTABLE -#endif // #if (_MSC_VER >= 1100) && defined(__cplusplus) -#endif // #ifndef DECLSPEC_NOVTABLE +#endif // #if (_MSC_VER >= 1100) && defined(__cplusplus) +#endif // #ifndef DECLSPEC_NOVTABLE // CS_STRING_CONCAT macro #if defined(CS_STRING_CONCAT) || defined(CS_STRING_CONCAT_HELPER) STATIC_CHECK(false, CS_STRING_CONCAT_or_CS_STRING_CONCAT_HELPER_or_CS_STRING_CONCAT4_macro_already_defined); -#endif // #if defined(CS_STRING_CONCAT) || defined(CS_STRING_CONCAT_HELPER) +#endif // #if defined(CS_STRING_CONCAT) || defined(CS_STRING_CONCAT_HELPER) #define CS_STRING_CONCAT_HELPER(a, b) a##b #define CS_STRING_CONCAT(a, b) CS_STRING_CONCAT_HELPER(a, b) @@ -33,7 +33,7 @@ STATIC_CHECK(false, CS_STRING_CONCAT_or_CS_STRING_CONCAT_HELPER_or_CS_STRING_CON // CS_MAKE_STRING macro #if defined(CS_MAKE_STRING) || defined(CS_MAKE_STRING_HELPER) STATIC_CHECK(false, CS_MAKE_STRING_or_CS_MAKE_STRING_HELPER_macro_already_defined); -#endif // #if defined(CS_MAKE_STRING) || defined(CS_MAKE_STRING_HELPER) +#endif // #if defined(CS_MAKE_STRING) || defined(CS_MAKE_STRING_HELPER) #define CS_MAKE_STRING_HELPER(a) #a #define CS_MAKE_STRING(a) CS_MAKE_STRING_HELPER(a) diff --git a/src/xrScriptEngine/ScriptExportMacros.hpp b/src/xrScriptEngine/ScriptExportMacros.hpp index 868429b2679..93fa02571f3 100644 --- a/src/xrScriptEngine/ScriptExportMacros.hpp +++ b/src/xrScriptEngine/ScriptExportMacros.hpp @@ -85,14 +85,14 @@ { \ return ptr->self_type::inherited::v_func_name(p1); \ } -#else // DEBUG +#else // DEBUG #define DEFINE_LUA_WRAPPER_CONST_METHOD_1(v_func_name, ret_type, t1) \ virtual ret_type v_func_name(t1 p1) const { return call_member(this, #v_func_name, p1); } \ static ret_type v_func_name##_static(const inherited* ptr, t1 p1) \ { \ return ptr->self_type::inherited::v_func_name(p1); \ } -#endif // DEBUG +#endif // DEBUG #define DEFINE_LUA_WRAPPER_METHOD_V0(v_func_name) \ virtual void v_func_name() \ diff --git a/src/xrScriptEngine/mslotutils.h b/src/xrScriptEngine/mslotutils.h index aadd3cb2946..5174baca999 100644 --- a/src/xrScriptEngine/mslotutils.h +++ b/src/xrScriptEngine/mslotutils.h @@ -97,9 +97,9 @@ class CMailSlotMsg inline HANDLE CreateMailSlotByName(LPSTR slotName) { HANDLE hSlot = CreateMailslot(slotName, - 0, // no maximum message size - MAILSLOT_WAIT_FOREVER, // no time-out for operations - (LPSECURITY_ATTRIBUTES)NULL); // no security attributes + 0, // no maximum message size + MAILSLOT_WAIT_FOREVER, // no time-out for operations + (LPSECURITY_ATTRIBUTES)NULL); // no security attributes return hSlot; } @@ -108,7 +108,7 @@ inline BOOL CheckExisting(LPSTR slotName) HANDLE hFile; BOOL res; hFile = CreateFile(slotName, GENERIC_WRITE, - FILE_SHARE_READ, // required to write to a mailslot + FILE_SHARE_READ, // required to write to a mailslot (LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE)NULL); res = hFile != INVALID_HANDLE_VALUE; if (res) CloseHandle(hFile); @@ -121,7 +121,7 @@ inline BOOL SendMailslotMessage(LPSTR slotName, CMailSlotMsg& msg) HANDLE hFile; DWORD cbWritten; hFile = CreateFile(slotName, GENERIC_WRITE, - FILE_SHARE_READ, // required to write to a mailslot + FILE_SHARE_READ, // required to write to a mailslot (LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE)NULL); R_ASSERT(hFile != INVALID_HANDLE_VALUE); if (hFile == INVALID_HANDLE_VALUE) return false; @@ -144,11 +144,11 @@ inline BOOL CheckMailslotMessage(HANDLE hSlot, CMailSlotMsg& msg) ov.Offset = 0; ov.OffsetHigh = 0; ov.hEvent = hEvent; - fResult = GetMailslotInfo(hSlot, // mailslot handle - (LPDWORD)NULL, // no maximum message size - &cbMessage, // size of next message - &cMessage, // number of messages - (LPDWORD)NULL); // no read time-out + fResult = GetMailslotInfo(hSlot, // mailslot handle + (LPDWORD)NULL, // no maximum message size + &cbMessage, // size of next message + &cMessage, // number of messages + (LPDWORD)NULL); // no read time-out R_ASSERT(fResult); if (!fResult || cbMessage == MAILSLOT_NO_MESSAGE) { CloseHandle(hEvent); diff --git a/src/xrScriptEngine/script_debugger.cpp b/src/xrScriptEngine/script_debugger.cpp index b21850ca804..46687874b09 100644 --- a/src/xrScriptEngine/script_debugger.cpp +++ b/src/xrScriptEngine/script_debugger.cpp @@ -156,7 +156,7 @@ CScriptDebugger::~CScriptDebugger() void CScriptDebugger::UnPrepareLua(lua_State* l, int idx) { - if (idx == -1) return; // !Active() + if (idx == -1) return; // !Active() m_lua->UnPrepareLua(l, idx); } @@ -319,7 +319,7 @@ void CScriptDebugger::CheckNewMessages() } } -void CScriptDebugger::WaitForReply(bool bWaitForModalResult) // UINT nMsg) +void CScriptDebugger::WaitForReply(bool bWaitForModalResult) // UINT nMsg) { bool mr = false; do @@ -331,7 +331,7 @@ void CScriptDebugger::WaitForReply(bool bWaitForModalResult) // UINT nMsg) Sleep(10); } R_ASSERT(msg.GetLen()); - mr = TranslateIdeMessage(&msg); // mr--is this an ide modalResult ? + mr = TranslateIdeMessage(&msg); // mr--is this an ide modalResult ? } while (bWaitForModalResult && !mr); } diff --git a/src/xrScriptEngine/script_debugger.hpp b/src/xrScriptEngine/script_debugger.hpp index f8e508bfc77..70f09380575 100644 --- a/src/xrScriptEngine/script_debugger.hpp +++ b/src/xrScriptEngine/script_debugger.hpp @@ -89,9 +89,9 @@ class XRSCRIPTENGINE_API CScriptDebugger CScriptCallStack* m_callStack; // static CScriptDebugger *m_pDebugger; int m_nMode; - int m_nLevel; // for step into/over/out - string_path m_strPathName; // for run_to_line_number - int m_nLine; // for run_to_line_number + int m_nLevel; // for step into/over/out + string_path m_strPathName; // for run_to_line_number + int m_nLine; // for run_to_line_number HANDLE m_mailSlot; BOOL m_bIdePresent; xr_vector m_breakPoints; diff --git a/src/xrScriptEngine/script_engine.cpp b/src/xrScriptEngine/script_engine.cpp index 2f3b71df234..b32a2fb3e52 100644 --- a/src/xrScriptEngine/script_engine.cpp +++ b/src/xrScriptEngine/script_engine.cpp @@ -98,7 +98,7 @@ static void* lua_alloc(void* ud, void* ptr, size_t osize, size_t nsize) #endif } -#endif // PURE_ALLOC +#endif // PURE_ALLOC static void* __cdecl luabind_allocator(void* context, const void* pointer, size_t const size) { @@ -158,7 +158,7 @@ void CScriptEngine::reinit() stateMapLock.Enter(); if (!stateMap) { stateMap = new xr_hash_map(); - stateMap->reserve(32); // 32 lua states should be enough + stateMap->reserve(32); // 32 lua states should be enough } stateMapLock.Leave(); if (m_virtual_machine) { @@ -363,14 +363,14 @@ bool CScriptEngine::do_file(LPCSTR caScriptName, LPCSTR caNameSpaceName) if (debugger()) errFuncId = debugger()->PrepareLua(lua()); #endif #endif - if (0) //. + if (0) //. { for (int i = 0; lua_type(lua(), -i - 1); i++) Msg("%2d : %s", -i - 1, lua_typename(lua(), lua_type(lua(), -i - 1))); } // because that's the first and the only call of the main chunk - there is no point to compile it // luaJIT_setmode(lua(), 0, LUAJIT_MODE_ENGINE|LUAJIT_MODE_OFF); // Oles - int l_iErrorCode = lua_pcall(lua(), 0, 0, (-1 == errFuncId) ? 0 : errFuncId); // new_Andy + int l_iErrorCode = lua_pcall(lua(), 0, 0, (-1 == errFuncId) ? 0 : errFuncId); // new_Andy // luaJIT_setmode(lua(), 0, LUAJIT_MODE_ENGINE|LUAJIT_MODE_ON); // Oles #ifdef USE_DEBUGGER #ifndef USE_LUA_STUDIO @@ -424,7 +424,7 @@ bool CScriptEngine::namespace_loaded(LPCSTR name, bool remove_from_stack) VERIFY(lua_gettop(lua()) >= 2); lua_pop(lua(), 2); VERIFY(start == lua_gettop(lua())); - return false; // there is no namespace! + return false; // there is no namespace! } else if (!lua_istable(lua(), -1)) { @@ -958,7 +958,7 @@ bool CScriptEngine::process_file_if_exists(LPCSTR file_name, bool warn_if_not_ex FS.update_path(S, "$game_scripts$", strconcat(sizeof(S1), S1, file_name, ".script")); if (!warn_if_not_exist && !FS.exist(S)) { #ifdef DEBUG - if (false) // XXX: restore (check script engine flags) + if (false) // XXX: restore (check script engine flags) { print_stack(); Msg("! WARNING: Access to nonexistent variable '%s' or loading nonexistent script '%s'", file_name, S1); diff --git a/src/xrScriptEngine/script_engine.hpp b/src/xrScriptEngine/script_engine.hpp index 93940a91662..209b9be5e98 100644 --- a/src/xrScriptEngine/script_engine.hpp +++ b/src/xrScriptEngine/script_engine.hpp @@ -89,7 +89,7 @@ class XRSCRIPTENGINE_API CScriptEngine CScriptProcessStorage m_script_processes; int m_stack_level; #ifdef DEBUG - CMemoryWriter m_output; // for call stack + CMemoryWriter m_output; // for call stack #endif #ifdef USE_DEBUGGER #ifndef USE_LUA_STUDIO diff --git a/src/xrScriptEngine/script_lua_helper.cpp b/src/xrScriptEngine/script_lua_helper.cpp index 849662c9300..1ec3147e029 100644 --- a/src/xrScriptEngine/script_lua_helper.cpp +++ b/src/xrScriptEngine/script_lua_helper.cpp @@ -50,8 +50,8 @@ int CDbgLuaHelper::OutputTop(lua_State* l) return 0; } -#define LEVELS1 12 // size of the first part of the stack -#define LEVELS2 10 // size of the second part of the stack +#define LEVELS1 12 // size of the first part of the stack +#define LEVELS2 10 // size of the second part of the stack void CDbgLuaHelper::errormessageLuaBind(lua_State* l) { @@ -69,8 +69,8 @@ int CDbgLuaHelper::errormessageLua(lua_State* l) { if (!m_pThis) return 0; L = l; - int level = 1; // skip level 0 (it's this function) - int firstpart = 1; // still before eventual `...' + int level = 1; // skip level 0 (it's this function) + int firstpart = 1; // still before eventual `...' lua_Debug ar; if (!lua_isstring(L, 1)) return lua_gettop(L); lua_settop(L, 1); @@ -82,11 +82,11 @@ int CDbgLuaHelper::errormessageLua(lua_State* l) if (level > LEVELS1 && firstpart) { // no more than `LEVELS2' more levels? if (!lua_getstack(L, level + LEVELS2, &ar)) - level--; // keep going + level--; // keep going else { - lua_pushliteral(L, " ...\n"); // too many levels - while (lua_getstack(L, level + LEVELS2, &ar)) // find last levels + lua_pushliteral(L, " ...\n"); // too many levels + while (lua_getstack(L, level + LEVELS2, &ar)) // find last levels level++; } firstpart = 0; @@ -99,17 +99,17 @@ int CDbgLuaHelper::errormessageLua(lua_State* l) if (ar.currentline > 0) lua_pushfstring(L, "%d:", ar.currentline); switch (*ar.namewhat) { - case 'g': // global - case 'l': // local - case 'f': // field - case 'm': // method + case 'g': // global + case 'l': // local + case 'f': // field + case 'm': // method lua_pushfstring(L, " in function `%s'", ar.name); break; default: { - if (*ar.what == 'm') // main? + if (*ar.what == 'm') // main? lua_pushfstring(L, " in main chunk"); - else if (*ar.what == 'C') // C function? + else if (*ar.what == 'C') // C function? lua_pushfstring(L, "%s", ar.short_src); else lua_pushfstring(L, " in function <%s:%d>", ar.short_src, ar.linedefined); @@ -249,7 +249,7 @@ void CDbgLuaHelper::DrawLocalVariables() while (name = lua_getlocal(L, &ar, i++), name) { DrawVariable(L, name, true); - lua_pop(L, 1); // remove variable value + lua_pop(L, 1); // remove variable value } } } @@ -258,7 +258,7 @@ void CDbgLuaHelper::DrawGlobalVariables() { debugger()->ClearGlobalVariables(); lua_pushvalue(L, LUA_GLOBALSINDEX); - lua_pushnil(L); // first key + lua_pushnil(L); // first key string1024 var; var[0] = 0; while (lua_next(L, -2)) @@ -266,9 +266,9 @@ void CDbgLuaHelper::DrawGlobalVariables() //!!!! TRACE2("%s - %s\n", lua_typename(L, lua_type(L, -2)), lua_typename(L, lua_type(L, -1))); // xr_sprintf(var, "%s-%s", lua_typename(L, lua_type(L, -2)), lua_typename(L, lua_type(L, -1)) ); // CScriptDebugger::GetDebugger()->AddLocalVariable(var, "global", "_g_"); - lua_pop(L, 1); // pop value, keep key for next iteration; + lua_pop(L, 1); // pop value, keep key for next iteration; } - lua_pop(L, 1); // pop table of globals; + lua_pop(L, 1); // pop table of globals; } bool CDbgLuaHelper::GetCalltip(const char* szWord, char* szCalltip, int sz_calltip) @@ -284,14 +284,14 @@ bool CDbgLuaHelper::GetCalltip(const char* szWord, char* szCalltip, int sz_callt char szRet[64]; Describe(szRet, -1, sizeof(szRet)); xr_sprintf(szCalltip, sz_calltip, "local %s : %s ", name, szRet); - lua_pop(L, 1); // remove variable value + lua_pop(L, 1); // remove variable value return true; } - lua_pop(L, 1); // remove variable value + lua_pop(L, 1); // remove variable value } } lua_pushvalue(L, LUA_GLOBALSINDEX); - lua_pushnil(L); // first key + lua_pushnil(L); // first key while (lua_next(L, -2)) { const char* name = lua_tostring(L, -2); @@ -299,12 +299,12 @@ bool CDbgLuaHelper::GetCalltip(const char* szWord, char* szCalltip, int sz_callt char szRet[64]; Describe(szRet, -1, sizeof(szRet)); xr_sprintf(szCalltip, sz_calltip, "global %s : %s ", name, szRet); - lua_pop(L, 3); // remove table, key, value + lua_pop(L, 3); // remove table, key, value return true; } - lua_pop(L, 1); // pop value, keep key for next iteration + lua_pop(L, 1); // pop value, keep key for next iteration } - lua_pop(L, 1); // pop table of globals + lua_pop(L, 1); // pop table of globals return false; } @@ -317,7 +317,7 @@ bool CDbgLuaHelper::Eval(const char* szCode, char* szRet, int szret_size) xr_sprintf(szRet, szret_size, "%s", luaL_checkstring(L, -1)); else { - status = lua_pcall(L, 0, LUA_MULTRET, 0); // call main + status = lua_pcall(L, 0, LUA_MULTRET, 0); // call main if (status) { const char* szErr = luaL_checkstring(L, -1); const char* szErr2 = strstr(szErr, ": "); @@ -348,22 +348,22 @@ void CDbgLuaHelper::Describe(char* szRet, int nIndex, int szRet_size) void CDbgLuaHelper::CoverGlobals() { - lua_newtable(L); // save there globals covered by locals + lua_newtable(L); // save there globals covered by locals int nLevel = debugger()->GetStackTraceLevel(); lua_Debug ar; if (lua_getstack(L, nLevel, &ar)) { int i = 1; const char* name; while (name = lua_getlocal(L, &ar, i++), name) - { // SAVE lvalue - lua_pushstring(L, name); // SAVE lvalue name - lua_pushvalue(L, -1); // SAVE lvalue name name - lua_pushvalue(L, -1); // SAVE lvalue name name name - lua_insert(L, -4); // SAVE name lvalue name name - lua_rawget(L, LUA_GLOBALSINDEX); // SAVE name lvalue name gvalue - lua_rawset(L, -5); // save global value in local table + { // SAVE lvalue + lua_pushstring(L, name); // SAVE lvalue name + lua_pushvalue(L, -1); // SAVE lvalue name name + lua_pushvalue(L, -1); // SAVE lvalue name name name + lua_insert(L, -4); // SAVE name lvalue name name + lua_rawget(L, LUA_GLOBALSINDEX); // SAVE name lvalue name gvalue + lua_rawset(L, -5); // save global value in local table // SAVE name lvalue - lua_rawset(L, LUA_GLOBALSINDEX); // SAVE + lua_rawset(L, LUA_GLOBALSINDEX); // SAVE } } } @@ -371,16 +371,16 @@ void CDbgLuaHelper::CoverGlobals() void CDbgLuaHelper::RestoreGlobals() { // there is table of covered globals on top - lua_pushnil(L); // first key + lua_pushnil(L); // first key // SAVE nil - while (lua_next(L, -2)) // SAVE key value + while (lua_next(L, -2)) // SAVE key value { - lua_pushvalue(L, -2); // SAVE key value key - lua_insert(L, -2); // SAVE key key value - lua_rawset(L, LUA_GLOBALSINDEX); // restore global + lua_pushvalue(L, -2); // SAVE key value key + lua_insert(L, -2); // SAVE key key value + lua_rawset(L, LUA_GLOBALSINDEX); // restore global // SAVE key } - lua_pop(L, 1); // pop table of covered globals; + lua_pop(L, 1); // pop table of covered globals; } void CDbgLuaHelper::DrawVariable(lua_State* l, const char* name, bool bOpenTable) @@ -431,7 +431,7 @@ void CDbgLuaHelper::DrawTable(lua_State* l, LPCSTR S, bool bRecursive) { // char str[1024]; if (!lua_istable(l, -1)) return; - lua_pushnil(l); // first key + lua_pushnil(l); // first key while (lua_next(l, -2)) { char stype[256]; @@ -441,7 +441,7 @@ void CDbgLuaHelper::DrawTable(lua_State* l, LPCSTR S, bool bRecursive) xr_sprintf(sname, "%s", lua_tostring(l, -2)); xr_sprintf(sFullName, "%s.%s", S, sname); DrawVariable(l, sFullName, false); - lua_pop(l, 1); // removes `value'; keeps `key' for next iteration + lua_pop(l, 1); // removes `value'; keeps `key' for next iteration } } diff --git a/src/xrScriptEngine/script_process.cpp b/src/xrScriptEngine/script_process.cpp index 37c177fb42c..85e906dbfbf 100644 --- a/src/xrScriptEngine/script_process.cpp +++ b/src/xrScriptEngine/script_process.cpp @@ -13,7 +13,7 @@ #include "script_engine.hpp" #include "script_thread.hpp" -string4096 g_ca_stdout; // XXX: allocate dynamically for each CScriptEngine instance +string4096 g_ca_stdout; // XXX: allocate dynamically for each CScriptEngine instance CScriptProcess::CScriptProcess(CScriptEngine* scriptEngine, shared_str name, shared_str scripts) { @@ -71,7 +71,7 @@ void CScriptProcess::update() if (!m_scripts[_id]->update()) { xr_delete(m_scripts[_id]); m_scripts.erase(m_scripts.begin() + _id); - --m_iterator; // try to avoid skipping + --m_iterator; // try to avoid skipping } if (g_ca_stdout[0]) { fputc(0, stderr); diff --git a/src/xrScriptEngine/script_process.hpp b/src/xrScriptEngine/script_process.hpp index b6443965114..615688707f5 100644 --- a/src/xrScriptEngine/script_process.hpp +++ b/src/xrScriptEngine/script_process.hpp @@ -51,7 +51,7 @@ class XRSCRIPTENGINE_API CScriptProcess SCRIPT_REGISTRY m_scripts; SCRIPTS_TO_RUN m_scripts_to_run; shared_str m_name; - u32 m_iterator; // Oles: iterative update + u32 m_iterator; // Oles: iterative update protected: void run_scripts(); diff --git a/src/xrScriptEngine/script_stack_tracker.cpp b/src/xrScriptEngine/script_stack_tracker.cpp index 47418ba15bc..b63eaedf5d3 100644 --- a/src/xrScriptEngine/script_stack_tracker.cpp +++ b/src/xrScriptEngine/script_stack_tracker.cpp @@ -27,7 +27,7 @@ CScriptStackTracker::~CScriptStackTracker() void CScriptStackTracker::script_hook(lua_State* L, lua_Debug* dbg) { - VERIFY(L); // && (m_virtual_machine == L)); + VERIFY(L); // && (m_virtual_machine == L)); switch (dbg->event) { case LUA_HOOKCALL: @@ -58,7 +58,7 @@ void CScriptStackTracker::script_hook(lua_State* L, lua_Debug* dbg) void CScriptStackTracker::print_stack(lua_State* L) { - VERIFY(L); // && (m_virtual_machine == L)); + VERIFY(L); // && (m_virtual_machine == L)); for (int j = m_current_stack_level - 1, k = 0; j >= 0; j--, k++) { lua_Debug l_tDebugInfo = *m_stack[j]; diff --git a/src/xrScriptEngine/xrScriptEngine.hpp b/src/xrScriptEngine/xrScriptEngine.hpp index 9fc22337863..69b35affed5 100644 --- a/src/xrScriptEngine/xrScriptEngine.hpp +++ b/src/xrScriptEngine/xrScriptEngine.hpp @@ -11,7 +11,7 @@ #pragma warning(disable : 4244) #pragma warning(disable : 4995) #pragma warning(disable : 4267) -#pragma warning(disable : 4100) // unreferenced formal parameter +#pragma warning(disable : 4100) // unreferenced formal parameter extern "C" { #include @@ -19,12 +19,12 @@ extern "C" { #include } -#pragma warning(disable : 4127) // conditional expression is constant -#pragma warning(disable : 4456) // declaration of 'x' hides previous local declaration -#pragma warning(disable : 4458) // declaration of 'x' hides class member -#pragma warning(disable : 4459) // declaration of 'x' hides global declaration -#pragma warning(disable : 4913) // user defined binary operator 'x' exists but no overload could convert all operands -#pragma warning(disable : 4297) // function assumed not to throw exception but does +#pragma warning(disable : 4127) // conditional expression is constant +#pragma warning(disable : 4456) // declaration of 'x' hides previous local declaration +#pragma warning(disable : 4458) // declaration of 'x' hides class member +#pragma warning(disable : 4459) // declaration of 'x' hides global declaration +#pragma warning(disable : 4913) // user defined binary operator 'x' exists but no overload could convert all operands +#pragma warning(disable : 4297) // function assumed not to throw exception but does // XXX: define LUABIND_DYNAMIC_LINK in engine config header #include #include diff --git a/src/xrServerEntities/PHNetState.cpp b/src/xrServerEntities/PHNetState.cpp index cafeef05acd..16aadb2841f 100644 --- a/src/xrServerEntities/PHNetState.cpp +++ b/src/xrServerEntities/PHNetState.cpp @@ -138,12 +138,12 @@ template void SPHNetState::read(src& P) { linear_vel = P.r_vec3(); - angular_vel.set(0.f, 0.f, 0.f); // P.r_vec3(angular_vel); - force.set(0.f, 0.f, 0.f); // P.r_vec3(force); - torque.set(0.f, 0.f, 0.f); // P.r_vec3(torque); + angular_vel.set(0.f, 0.f, 0.f); // P.r_vec3(angular_vel); + force.set(0.f, 0.f, 0.f); // P.r_vec3(force); + torque.set(0.f, 0.f, 0.f); // P.r_vec3(torque); position = P.r_vec3(); *((Fvector4*)&quaternion) = P.r_vec4(); - previous_quaternion.set(quaternion); // P.r_vec4(*((Fvector4*)&previous_quaternion)); + previous_quaternion.set(quaternion); // P.r_vec4(*((Fvector4*)&previous_quaternion)); enabled = !!P.r_u8(); } @@ -227,7 +227,7 @@ void SPHBonesData::net_Save(NET_Packet& P) P.w_vec3(get_min()); P.w_vec3(get_max()); - P.w_u16((u16)bones.size()); // bones number; + P.w_u16((u16)bones.size()); // bones number; PHNETSTATE_I i = bones.begin(), e = bones.end(); for (; e != i; i++) { @@ -250,7 +250,7 @@ void SPHBonesData::net_Load(NET_Packet& P) P.r_vec3(_mx); set_min_max(_mn, _mx); - u16 bones_number = P.r_u16(); // bones number /**/ + u16 bones_number = P.r_u16(); // bones number /**/ for (int i = 0; i < bones_number; i++) { SPHNetState S; diff --git a/src/xrServerEntities/PHSynchronize.h b/src/xrServerEntities/PHSynchronize.h index 09ae18eda3c..499bc702598 100644 --- a/src/xrServerEntities/PHSynchronize.h +++ b/src/xrServerEntities/PHSynchronize.h @@ -8,7 +8,7 @@ class NET_Packet; class CPHSynchronize { public: - virtual void net_Export(NET_Packet& P){}; // export to server + virtual void net_Export(NET_Packet& P){}; // export to server virtual void net_Import(NET_Packet& P){}; virtual void get_State(SPHNetState& state) = 0; virtual void set_State(const SPHNetState& state) = 0; diff --git a/src/xrServerEntities/PropertiesListTypes.h b/src/xrServerEntities/PropertiesListTypes.h index 96917659213..06e6af2492f 100644 --- a/src/xrServerEntities/PropertiesListTypes.h +++ b/src/xrServerEntities/PropertiesListTypes.h @@ -19,7 +19,7 @@ enum EPropType PROP_SHORTCUT, PROP_BUTTON, PROP_CHOOSE, - PROP_NUMERIC, // {u8,u16,u32,s8,s16,s32,f32} + PROP_NUMERIC, // {u8,u16,u32,s8,s16,s32,f32} PROP_BOOLEAN, PROP_FLAG, PROP_VECTOR, diff --git a/src/xrServerEntities/alife_human_brain.cpp b/src/xrServerEntities/alife_human_brain.cpp index f3bd8f0afd2..8921d5f7bf3 100644 --- a/src/xrServerEntities/alife_human_brain.cpp +++ b/src/xrServerEntities/alife_human_brain.cpp @@ -12,19 +12,19 @@ #include "xrServer_Objects_ALife_Monsters.h" #ifdef XRGAME_EXPORTS +#include "ai_space.h" +#include "alife_graph_registry.h" #include "alife_human_object_handler.h" -#include "alife_monster_movement_manager.h" #include "alife_monster_detail_path_manager.h" +#include "alife_monster_movement_manager.h" #include "alife_monster_patrol_path_manager.h" -#include "ai_space.h" -#include "ef_storage.h" -#include "ef_primary.h" #include "alife_simulator.h" -#include "alife_graph_registry.h" -#include "movement_manager_space.h" #include "alife_smart_terrain_registry.h" #include "alife_time_manager.h" #include "date_time.h" +#include "ef_primary.h" +#include "ef_storage.h" +#include "movement_manager_space.h" #ifdef DEBUG #include "Level.h" #include "map_location.h" diff --git a/src/xrServerEntities/alife_monster_brain.cpp b/src/xrServerEntities/alife_monster_brain.cpp index ebc2a74190f..0427680c5a1 100644 --- a/src/xrServerEntities/alife_monster_brain.cpp +++ b/src/xrServerEntities/alife_monster_brain.cpp @@ -12,18 +12,18 @@ #include "xrServer_Objects_ALife_Monsters.h" #ifdef XRGAME_EXPORTS -#include "alife_monster_movement_manager.h" +#include "ai_space.h" +#include "alife_graph_registry.h" #include "alife_monster_detail_path_manager.h" +#include "alife_monster_movement_manager.h" #include "alife_monster_patrol_path_manager.h" -#include "ai_space.h" -#include "ef_storage.h" -#include "ef_primary.h" #include "alife_simulator.h" -#include "alife_graph_registry.h" -#include "movement_manager_space.h" #include "alife_smart_terrain_registry.h" #include "alife_time_manager.h" #include "date_time.h" +#include "ef_primary.h" +#include "ef_storage.h" +#include "movement_manager_space.h" #ifdef DEBUG #include "Level.h" #include "map_location.h" @@ -148,7 +148,7 @@ void CALifeMonsterBrain::select_task() void CALifeMonsterBrain::update() { -#if 0 // def DEBUG +#if 0 // def DEBUG if (!Level().MapManager().HasMapLocation("debug_stalker",object().ID)) { CMapLocation *map_location = Level().MapManager().AddMapLocation( @@ -185,4 +185,4 @@ void CALifeMonsterBrain::on_switch_offline() movement().on_switch_offline(); } -#endif // XRGAME_EXPORTS \ No newline at end of file +#endif // XRGAME_EXPORTS \ No newline at end of file diff --git a/src/xrServerEntities/alife_movement_manager_holder.h b/src/xrServerEntities/alife_movement_manager_holder.h index 954d5cce550..a6e2e36af6a 100644 --- a/src/xrServerEntities/alife_movement_manager_holder.h +++ b/src/xrServerEntities/alife_movement_manager_holder.h @@ -24,5 +24,5 @@ class CMovementManagerHolder virtual void on_location_change() const = 0; virtual CSE_ALifeDynamicObject const& get_object() const = 0; virtual CSE_ALifeDynamicObject& get_object() = 0; -#endif //#ifdef XRGAME_EXPORTS -}; // CMovementManagerHolder \ No newline at end of file +#endif //#ifdef XRGAME_EXPORTS +}; // CMovementManagerHolder \ No newline at end of file diff --git a/src/xrServerEntities/alife_space.h b/src/xrServerEntities/alife_space.h index 52dc8b93266..09a36e0ee57 100644 --- a/src/xrServerEntities/alife_space.h +++ b/src/xrServerEntities/alife_space.h @@ -34,15 +34,15 @@ class CGameGraph; namespace ALife { -typedef u64 _CLASS_ID; // Class ID -typedef u16 _OBJECT_ID; // Object ID -typedef u64 _TIME_ID; // Time ID -typedef u32 _EVENT_ID; // Event ID -typedef u32 _TASK_ID; // Event ID -typedef u16 _SPAWN_ID; // Spawn ID -typedef u16 _TERRAIN_ID; // Terrain ID -typedef u32 _STORY_ID; // Story ID -typedef u32 _SPAWN_STORY_ID; // Spawn Story ID +typedef u64 _CLASS_ID; // Class ID +typedef u16 _OBJECT_ID; // Object ID +typedef u64 _TIME_ID; // Time ID +typedef u32 _EVENT_ID; // Event ID +typedef u32 _TASK_ID; // Event ID +typedef u16 _SPAWN_ID; // Spawn ID +typedef u16 _TERRAIN_ID; // Terrain ID +typedef u32 _STORY_ID; // Story ID +typedef u32 _SPAWN_STORY_ID; // Spawn Story ID struct SSumStackCell { @@ -99,7 +99,7 @@ enum EHitType eHitTypeFireWound, eHitTypeStrike, eHitTypeExplosion, - eHitTypeWound_2, // knife's alternative fire + eHitTypeWound_2, // knife's alternative fire // eHitTypePhysicStrike, eHitTypeLightBurn, eHitTypeMax, @@ -206,4 +206,4 @@ DEFINE_MAP(_OBJECT_ID, CSE_ALifeDynamicObject*, D_OBJECT_P_MAP, D_OBJECT_P_PAIR_ DEFINE_MAP(_STORY_ID, CSE_ALifeDynamicObject*, STORY_P_MAP, STORY_P_PAIR_IT); }; -#endif // XRAY_ALIFE_SPACE +#endif // XRAY_ALIFE_SPACE diff --git a/src/xrServerEntities/character_info.cpp b/src/xrServerEntities/character_info.cpp index b71ad734ab6..e5fe5fe8998 100644 --- a/src/xrServerEntities/character_info.cpp +++ b/src/xrServerEntities/character_info.cpp @@ -7,12 +7,12 @@ #include "stdafx.h" #ifdef XRGAME_EXPORTS -#include "ui/xrUIXmlParser.h" #include "PhraseDialog.h" +#include "ui/xrUIXmlParser.h" #include "xrServer_Objects_ALife_Monsters.h" -#else // XRGAME_EXPORTS +#else // XRGAME_EXPORTS #include "xrUIXmlParser.h" -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// SCharacterProfile::SCharacterProfile() diff --git a/src/xrServerEntities/character_info.h b/src/xrServerEntities/character_info.h index 95f06c5ad0a..8566947bb8b 100644 --- a/src/xrServerEntities/character_info.h +++ b/src/xrServerEntities/character_info.h @@ -131,6 +131,6 @@ class CCharacterInfo : public CSharedClass CHARACTER_RANK m_CurrentRank; CHARACTER_REPUTATION m_CurrentReputation; CHARACTER_COMMUNITY m_CurrentCommunity; - float m_Sympathy; // % влияния на группировку + float m_Sympathy; // % влияния на группировку #endif }; \ No newline at end of file diff --git a/src/xrServerEntities/doug_lea_memory_allocator.c b/src/xrServerEntities/doug_lea_memory_allocator.c index 3dc9d5ff5a6..4c99008478f 100644 --- a/src/xrServerEntities/doug_lea_memory_allocator.c +++ b/src/xrServerEntities/doug_lea_memory_allocator.c @@ -439,7 +439,7 @@ DEFAULT_MMAP_THRESHOLD default: 256K */ #ifdef DEBUG #undef DEBUG -#endif // DEBUG +#endif // DEBUG #ifndef WIN32 #ifdef _WIN32 @@ -1413,7 +1413,7 @@ static int win32_acquire_lock(MLOCK_T* sl) { #ifdef InterlockedCompareExchangePointer if (!InterlockedCompareExchange(sl, 1, 0)) return 0; -#else /* Use older void* version */ +#else /* Use older void* version */ if (!InterlockedCompareExchange((void**)sl, (void*)1, (void*)0)) return 0; #endif /* InterlockedCompareExchangePointer */ Sleep(0); diff --git a/src/xrServerEntities/doug_lea_memory_allocator.h b/src/xrServerEntities/doug_lea_memory_allocator.h index 1f60fd3a0d9..ea1841a8473 100644 --- a/src/xrServerEntities/doug_lea_memory_allocator.h +++ b/src/xrServerEntities/doug_lea_memory_allocator.h @@ -187,8 +187,8 @@ size_t dlmalloc_footprint(); be kept as longs, the reported values may wrap around zero and thus be inaccurate. */ -#if 1 // ndef HAVE_USR_INCLUDE_MALLOC_H -#if 1 // ndef _MALLOC_H +#if 1 // ndef HAVE_USR_INCLUDE_MALLOC_H +#if 1 // ndef _MALLOC_H #ifndef MALLINFO_FIELD_TYPE #define MALLINFO_FIELD_TYPE size_t #endif /* MALLINFO_FIELD_TYPE */ diff --git a/src/xrServerEntities/gametype_chooser.cpp b/src/xrServerEntities/gametype_chooser.cpp index 3cd76fedb84..a18d1bef841 100644 --- a/src/xrServerEntities/gametype_chooser.cpp +++ b/src/xrServerEntities/gametype_chooser.cpp @@ -5,7 +5,7 @@ #include "xrServer_Objects_Abstract.h" // old enum ERPGameType -{ // [0..255] +{ // [0..255] rpgtGameAny = u8(0), rpgtGameDeathmatch, rpgtGameTeamDeathmatch, @@ -77,4 +77,4 @@ void GameTypeChooser::FillProp(LPCSTR pref, PropItemVec& items) eGameIDTeamDominationZone); */ } -#endif // #ifndef XRGAME_EXPORTS \ No newline at end of file +#endif // #ifndef XRGAME_EXPORTS \ No newline at end of file diff --git a/src/xrServerEntities/gametype_chooser.h b/src/xrServerEntities/gametype_chooser.h index 8a3364b7d50..d9eec7617f4 100644 --- a/src/xrServerEntities/gametype_chooser.h +++ b/src/xrServerEntities/gametype_chooser.h @@ -26,7 +26,7 @@ inline EGameIDs ParseStringToGameType(LPCSTR str) if (!xr_strcmp(str, "capturetheartefact") || !xr_strcmp(str, "cta")) return eGameIDCaptureTheArtefact; if (!xr_strcmp(str, "dominationzone")) return eGameIDDominationZone; if (!xr_strcmp(str, "teamdominationzone")) return eGameIDTeamDominationZone; - return eGameIDNoGame; // EGameIDs + return eGameIDNoGame; // EGameIDs } class PropValue; @@ -38,7 +38,7 @@ struct GameTypeChooser Flags16 m_GameType; #ifndef XRGAME_EXPORTS void FillProp(LPCSTR pref, PropItemVec& items); -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS #ifdef _EDITOR bool LoadStream(IReader& F); diff --git a/src/xrServerEntities/inventory_space.h b/src/xrServerEntities/inventory_space.h index f57653d6d86..600e6dccec4 100644 --- a/src/xrServerEntities/inventory_space.h +++ b/src/xrServerEntities/inventory_space.h @@ -6,17 +6,17 @@ enum { NO_ACTIVE_SLOT = 0, - KNIFE_SLOT = 1, // btn1 was (0) !!! - INV_SLOT_2, // btn2 PISTOL_SLOT was (1) - INV_SLOT_3, // btn3 RIFLE_SLOT was (2) - GRENADE_SLOT, // btn4 GRENADE_SLOT was (3) - BINOCULAR_SLOT, // btn5 BINOCULAR_SLOT - BOLT_SLOT, // btn6 BOLT_SLOT - OUTFIT_SLOT, // outfit - PDA_SLOT, // pda - DETECTOR_SLOT, // detector - TORCH_SLOT, // torch - ARTEFACT_SLOT, // artefact + KNIFE_SLOT = 1, // btn1 was (0) !!! + INV_SLOT_2, // btn2 PISTOL_SLOT was (1) + INV_SLOT_3, // btn3 RIFLE_SLOT was (2) + GRENADE_SLOT, // btn4 GRENADE_SLOT was (3) + BINOCULAR_SLOT, // btn5 BINOCULAR_SLOT + BOLT_SLOT, // btn6 BOLT_SLOT + OUTFIT_SLOT, // outfit + PDA_SLOT, // pda + DETECTOR_SLOT, // detector + TORCH_SLOT, // torch + ARTEFACT_SLOT, // artefact HELMET_SLOT, LAST_SLOT = HELMET_SLOT }; diff --git a/src/xrServerEntities/object_factory_impl.h b/src/xrServerEntities/object_factory_impl.h index 44ce5f1ea46..6d30f6fd91b 100644 --- a/src/xrServerEntities/object_factory_impl.h +++ b/src/xrServerEntities/object_factory_impl.h @@ -17,7 +17,7 @@ #ifndef NO_XR_GAME #include "Common/object_type_traits.h" #include "object_item_client_server.h" -#endif // NO_XR_GAME +#endif // NO_XR_GAME #ifndef NO_XR_GAME @@ -47,7 +47,7 @@ IC void CObjectFactory::add(const CLASS_ID& clsid, LPCSTR script_clsid) object_type_traits::is_base_and_derived::value>(clsid, script_clsid)); } -#else // NO_XR_GAME +#else // NO_XR_GAME template IC void CObjectFactory::add(const CLASS_ID& clsid, LPCSTR script_clsid) @@ -55,6 +55,6 @@ IC void CObjectFactory::add(const CLASS_ID& clsid, LPCSTR script_clsid) add(new CObjectItemSingle<_unknown_type, false>(clsid, script_clsid)); } -#endif // NO_XR_GAME +#endif // NO_XR_GAME -#endif // object_factory_implH \ No newline at end of file +#endif // object_factory_implH \ No newline at end of file diff --git a/src/xrServerEntities/object_factory_register.cpp b/src/xrServerEntities/object_factory_register.cpp index cbe3aa4792e..e75a0c9acc1 100644 --- a/src/xrServerEntities/object_factory_register.cpp +++ b/src/xrServerEntities/object_factory_register.cpp @@ -18,31 +18,31 @@ // client entities includes #ifndef NO_XR_GAME -#include "xrEngine/std_classes.h" #include "Level.h" +#include "actor.h" #include "gamepersistent.h" #include "hudmanager.h" -#include "actor.h" #include "spectator.h" +#include "xrEngine/std_classes.h" -#include "ai/monsters/flesh/flesh.h" -#include "ai/monsters/chimera/chimera.h" -#include "ai/monsters/dog/dog.h" -#include "ai/stalker/ai_stalker.h" -#include "ai/monsters/bloodsucker/bloodsucker.h" -#include "ai/monsters/boar/boar.h" -#include "ai/monsters/pseudodog/pseudodog.h" -#include "ai/monsters/pseudodog/psy_dog.h" #include "ai/monsters/Burer/burer.h" #include "ai/monsters/PseudoGigant/pseudo_gigant.h" +#include "ai/monsters/bloodsucker/bloodsucker.h" +#include "ai/monsters/boar/boar.h" +#include "ai/monsters/cat/cat.h" +#include "ai/monsters/chimera/chimera.h" #include "ai/monsters/controller/controller.h" -#include "ai/monsters/poltergeist/poltergeist.h" -#include "ai/monsters/zombie/zombie.h" +#include "ai/monsters/dog/dog.h" +#include "ai/monsters/flesh/flesh.h" #include "ai/monsters/fracture/fracture.h" +#include "ai/monsters/poltergeist/poltergeist.h" +#include "ai/monsters/pseudodog/pseudodog.h" +#include "ai/monsters/pseudodog/psy_dog.h" +#include "ai/monsters/rats/ai_rat.h" #include "ai/monsters/snork/snork.h" -#include "ai/monsters/cat/cat.h" #include "ai/monsters/tushkano/tushkano.h" -#include "ai/monsters/rats/ai_rat.h" +#include "ai/monsters/zombie/zombie.h" +#include "ai/stalker/ai_stalker.h" #include "ai/phantom/phantom.h" @@ -51,71 +51,71 @@ #include "ai/crow/ai_crow.h" #ifdef DEBUG -#include "xrEngine/StatGraph.h" #include "PHDebug.h" -#endif // DEBUG +#include "xrEngine/StatGraph.h" +#endif // DEBUG -#include "hit.h" #include "PHDestroyable.h" #include "car.h" +#include "hit.h" #include "helicopter.h" -#include "MercuryBall.h" +#include "BastArtifact.h" #include "BlackDrops.h" #include "BlackGraviArtifact.h" -#include "BastArtifact.h" #include "DummyArtifact.h" -#include "ZudaArtifact.h" -#include "ThornArtifact.h" -#include "FadedBall.h" #include "ElectricBall.h" -#include "RustyHairArtifact.h" +#include "FadedBall.h" #include "GalantineArtifact.h" #include "GraviArtifact.h" +#include "MercuryBall.h" +#include "RustyHairArtifact.h" +#include "ThornArtifact.h" +#include "ZudaArtifact.h" #include "cta_game_artefact.h" -#include "weaponFN2000.h" +#include "WeaponStatMgun.h" #include "weaponAK74.h" -#include "weaponLR300.h" -#include "weaponHPSA.h" -#include "weaponPM.h" #include "weaponAMMO.h" -#include "weaponFORT.h" #include "weaponBINOCULARS.h" +#include "weaponBM16.h" +#include "weaponFN2000.h" +#include "weaponFORT.h" +#include "weaponHPSA.h" +#include "weaponLR300.h" +#include "weaponPM.h" +#include "weaponRG6.h" #include "weaponShotgun.h" +#include "weapongroza.h" +#include "weaponknife.h" +#include "weaponrpg7.h" #include "weaponsvd.h" #include "weaponsvu.h" -#include "weaponrpg7.h" +#include "weaponusp45.h" #include "weaponval.h" #include "weaponvintorez.h" #include "weaponwalther.h" -#include "weaponusp45.h" -#include "weapongroza.h" -#include "weaponknife.h" -#include "weaponBM16.h" -#include "weaponRG6.h" -#include "WeaponStatMgun.h" +#include "grenadelauncher.h" #include "scope.h" #include "silencer.h" -#include "grenadelauncher.h" -#include "bolt.h" -#include "medkit.h" #include "antirad.h" -#include "fooditem.h" +#include "bolt.h" #include "bottleitem.h" #include "explosiveitem.h" +#include "fooditem.h" +#include "medkit.h" -#include "infodocument.h" #include "attachable_item.h" +#include "infodocument.h" +#include "ActorHelmet.h" +#include "ExoOutfit.h" +#include "MilitaryOutfit.h" #include "ScientificOutfit.h" #include "StalkerOutfit.h" -#include "MilitaryOutfit.h" -#include "ExoOutfit.h" -#include "ActorHelmet.h" #include "f1.h" #include "rgd5.h" @@ -124,61 +124,61 @@ #include "MPPlayersBag.h" +#include "ZoneVisual.h" #include "customzone.h" -#include "mosquitobald.h" -#include "mincer.h" #include "gravizone.h" -#include "radioactivezone.h" +#include "hairszone.h" #include "level_changer.h" +#include "mincer.h" +#include "mosquitobald.h" +#include "radioactivezone.h" #include "script_zone.h" #include "team_base_zone.h" #include "torridZone.h" -#include "ZoneVisual.h" -#include "hairszone.h" //. # include "amebazone.h" +#include "advanceddetector.h" +#include "elitedetector.h" #include "nogravityzone.h" #include "simpledetector.h" -#include "elitedetector.h" -#include "advanceddetector.h" #include "zonecampfire.h" -#include "torch.h" -#include "pda.h" #include "flare.h" +#include "pda.h" +#include "torch.h" #include "searchlight.h" +#include "BreakableObject.h" +#include "DestroyablePhysicsObject.h" #include "HangingLamp.h" +#include "PhysicsSkeletonObject.h" #include "physicobject.h" #include "script_object.h" -#include "BreakableObject.h" -#include "PhysicsSkeletonObject.h" -#include "DestroyablePhysicsObject.h" -#include "game_sv_single.h" -#include "game_sv_deathmatch.h" -#include "game_sv_teamdeathmatch.h" #include "game_sv_ArtefactHunt.h" #include "game_sv_capture_the_artefact.h" +#include "game_sv_deathmatch.h" +#include "game_sv_single.h" +#include "game_sv_teamdeathmatch.h" -#include "game_cl_single.h" -#include "game_cl_deathmatch.h" -#include "game_cl_teamdeathmatch.h" #include "game_cl_ArtefactHunt.h" #include "game_cl_capture_the_artefact.h" +#include "game_cl_deathmatch.h" +#include "game_cl_single.h" +#include "game_cl_teamdeathmatch.h" -#include "UIGameSP.h" +#include "InventoryBox.h" #include "UIGameAHunt.h" #include "UIGameCTA.h" +#include "UIGameSP.h" #include "climableobject.h" -#include "space_restrictor.h" #include "smart_zone.h" -#include "InventoryBox.h" +#include "space_restrictor.h" -#include "actor_mp_server.h" #include "actor_mp_client.h" +#include "actor_mp_server.h" #include "smart_cover_object.h" -#endif // NO_XR_GAME +#endif // NO_XR_GAME #ifndef NO_XR_GAME ENGINE_API bool g_dedicated_server; @@ -202,7 +202,7 @@ void CObjectFactory::register_classes() add(CLSID_SV_GAME_TEAMDEATHMATCH, "game_sv_team_deathmatch"); add(CLSID_SV_GAME_ARTEFACTHUNT, "game_sv_artefact_hunt"); add(CLSID_SV_GAME_CAPTURETHEARTEFACT, "game_sv_capture_the_artefact"); -#endif // BENCHMARK_BUILD +#endif // BENCHMARK_BUILD // Client Game type add(CLSID_CL_GAME_SINGLE, "game_cl_single"); #ifndef BENCHMARK_BUILD @@ -210,7 +210,7 @@ void CObjectFactory::register_classes() add(CLSID_CL_GAME_TEAMDEATHMATCH, "game_cl_team_deathmatch"); add(CLSID_CL_GAME_ARTEFACTHUNT, "game_cl_artefact_hunt"); add(CLSID_CL_GAME_CAPTURETHEARTEFACT, "game_cl_capture_the_artefact"); -#endif // BENCHMARK_BUILD +#endif // BENCHMARK_BUILD add(CLSID_GAME_UI_SINGLE, "game_ui_single"); add(CLSID_GAME_UI_DEATHMATCH, "game_ui_deathmatch"); @@ -218,9 +218,9 @@ void CObjectFactory::register_classes() add(CLSID_GAME_UI_ARTEFACTHUNT, "game_ui_artefact_hunt"); add(CLSID_GAME_UI_CAPTURETHEARTEFACT, "game_ui_capture_the_artefact"); ADD_MP(CActor, CActorMP, CSE_ALifeCreatureActor, CSE_ActorMP, CLSID_OBJECT_ACTOR, "actor"); -#else // NO_XR_GAME +#else // NO_XR_GAME ADD(CActor, CSE_ALifeCreatureActor, CLSID_OBJECT_ACTOR, "actor"); -#endif // NO_XR_GAME +#endif // NO_XR_GAME // server entities add>(CLSID_AI_FLESH_GROUP, "flesh_group"); @@ -356,7 +356,7 @@ void CObjectFactory::register_classes() ADD(CMosquitoBald, CSE_ALifeAnomalousZone, CLSID_Z_DEAD, "zone_dead"); #ifndef BENCHMARK_BUILD ADD(CLevelChanger, CSE_ALifeLevelChanger, CLSID_LEVEL_CHANGER, "level_changer"); -#endif // BENCHMARK_BUILD +#endif // BENCHMARK_BUILD ADD(CScriptZone, CSE_ALifeSpaceRestrictor, CLSID_SCRIPT_ZONE, "script_zone"); ADD(CSmartZone, CSE_ALifeSmartZone, CLSID_SMART_ZONE, "smart_zone"); ADD(CTeamBaseZone, CSE_ALifeTeamBaseZone, CLSID_Z_TEAM_BASE, "team_base_zone"); @@ -427,5 +427,5 @@ void CObjectFactory::register_classes() ADD(CMincer, CSE_ALifeAnomalousZone, TEXT2CLSID("ZS_GALAN"), "zone_galant_s"); ADD(CMincer, CSE_ALifeAnomalousZone, TEXT2CLSID("ZS_MINCE"), "zone_mincer_s"); ADD(CSpaceRestrictor, CSE_ALifeSpaceRestrictor, TEXT2CLSID("SPC_RS_S"), "script_restr"); -#endif // NO_XR_GAME +#endif // NO_XR_GAME } diff --git a/src/xrServerEntities/object_factory_script.cpp b/src/xrServerEntities/object_factory_script.cpp index 8408f4b95e9..e4f582dc509 100644 --- a/src/xrServerEntities/object_factory_script.cpp +++ b/src/xrServerEntities/object_factory_script.cpp @@ -57,13 +57,13 @@ void CObjectFactory::register_script_class(LPCSTR unknown_class, LPCSTR clsid, L #ifndef NO_XR_GAME ENGINE_API bool g_dedicated_server; -#endif // NO_XR_GAME +#endif // NO_XR_GAME void CObjectFactory::register_script_classes() { #ifndef NO_XR_GAME if (!g_dedicated_server) -#endif // NO_XR_GAME +#endif // NO_XR_GAME ai(); } diff --git a/src/xrServerEntities/object_item_client_server.h b/src/xrServerEntities/object_item_client_server.h index 6af8cf2ed55..f8a2812c2fd 100644 --- a/src/xrServerEntities/object_item_client_server.h +++ b/src/xrServerEntities/object_item_client_server.h @@ -43,7 +43,7 @@ class CObjectItemClientServerSingleMp : public CObjectItemAbstract virtual ObjectFactory::ClientObjectBaseClass* client_object() const; virtual ObjectFactory::ServerObjectBaseClass* server_object(LPCSTR section) const; }; -#endif // NO_XR_GAME +#endif // NO_XR_GAME #include "object_item_client_server_inline.h" diff --git a/src/xrServerEntities/object_item_client_server_inline.h b/src/xrServerEntities/object_item_client_server_inline.h index 35f6157a5de..cdecbc8cd8b 100644 --- a/src/xrServerEntities/object_item_client_server_inline.h +++ b/src/xrServerEntities/object_item_client_server_inline.h @@ -75,6 +75,6 @@ ObjectFactory::ServerObjectBaseClass* CSObjectItemClientServerSingleMp::server_o #undef TEMPLATE_SPECIALIZATION #undef CSObjectItemClientServerSingleMp -#endif // NO_XR_GAME +#endif // NO_XR_GAME #endif \ No newline at end of file diff --git a/src/xrServerEntities/pch_script.h b/src/xrServerEntities/pch_script.h index d891629e402..1f974dd5d50 100644 --- a/src/xrServerEntities/pch_script.h +++ b/src/xrServerEntities/pch_script.h @@ -12,4 +12,4 @@ #include "stdafx.h" #include "xrScriptEngine/xrScriptEngine.hpp" -#endif // PCH_SCRIPT_H +#endif // PCH_SCRIPT_H diff --git a/src/xrServerEntities/script_fmatrix_script.cpp b/src/xrServerEntities/script_fmatrix_script.cpp index 7a15632c5ef..c2cf8e5c5b2 100644 --- a/src/xrServerEntities/script_fmatrix_script.cpp +++ b/src/xrServerEntities/script_fmatrix_script.cpp @@ -22,143 +22,142 @@ void matrix_transform(Fmatrix* self, Fvector* v) } SCRIPT_EXPORT(Fmatrix, (), { - module( - luaState)[class_( + module(luaState)[class_( "matrix").def_readwrite("i", &Fmatrix::i) - .def_readwrite("_14_", &Fmatrix::_14_) - .def_readwrite("j", &Fmatrix::j) - .def_readwrite("_24_", &Fmatrix::_24_) - .def_readwrite("k", &Fmatrix::k) - .def_readwrite("_34_", &Fmatrix::_34_) - .def_readwrite("c", &Fmatrix::c) - .def_readwrite("_44_", &Fmatrix::_44_) - .def(constructor<>()) - .def("set", (Fmatrix & (Fmatrix::*)(const Fmatrix&))(&Fmatrix::set), return_reference_to<1>()) - .def("set", (Fmatrix & (Fmatrix::*)(const Fvector&, const Fvector&, const Fvector&, - const Fvector&))(&Fmatrix::set), - return_reference_to<1>()) - .def("identity", &Fmatrix::identity, return_reference_to<1>()) - .def("mk_xform", &Fmatrix::mk_xform, return_reference_to<1>()) - .def("mul", (Fmatrix & (Fmatrix::*)(const Fmatrix&, const Fmatrix&))(&Fmatrix::mul), - return_reference_to<1>()) - .def("mul", (Fmatrix & (Fmatrix::*)(const Fmatrix&, float))(&Fmatrix::mul), - return_reference_to<1>()) - .def("mul", (Fmatrix & (Fmatrix::*)(float))(&Fmatrix::mul), return_reference_to<1>()) - .def("div", (Fmatrix & (Fmatrix::*)(const Fmatrix&, float))(&Fmatrix::div), - return_reference_to<1>()) - .def("div", (Fmatrix & (Fmatrix::*)(float))(&Fmatrix::div), return_reference_to<1>()) - // .def("invert", (Fmatrix & (Fmatrix::*)())(&Fmatrix::invert), - //return_reference_to<1>()) - // .def("invert", (Fmatrix & (Fmatrix::*)(const Fmatrix - //&))(&Fmatrix::invert), return_reference_to<1>()) - // .def("transpose", (Fmatrix & - //(Fmatrix::*)())(&Fmatrix::transpose), - //return_reference_to<1>()) - // .def("transpose", (Fmatrix & (Fmatrix::*)(const Fmatrix - //&))(&Fmatrix::transpose), return_reference_to<1>()) - // .def("translate", (Fmatrix & (Fmatrix::*)(const Fvector - //&))(&Fmatrix::translate), return_reference_to<1>()) - // .def("translate", (Fmatrix & (Fmatrix::*)(float, float, - //float))(&Fmatrix::translate), return_reference_to<1>()) - // .def("translate_over", (Fmatrix & (Fmatrix::*)(const Fvector - //&))(&Fmatrix::translate_over), return_reference_to<1>()) - // .def("translate_over", (Fmatrix & (Fmatrix::*)(float, float, - //float))(&Fmatrix::translate_over), - //return_reference_to<1>()) - // .def("translate_add", &Fmatrix::translate_add, - //return_reference_to<1>()) - // .def("scale", (Fmatrix & (Fmatrix::*)(const Fvector - //&))(&Fmatrix::scale), return_reference_to<1>()) - // .def("scale", (Fmatrix & (Fmatrix::*)(float, float, - //float))(&Fmatrix::scale), return_reference_to<1>()) - // .def("rotateX", &Fmatrix::rotateX, - //return_reference_to<1>()) - // .def("rotateY", &Fmatrix::rotateY, - //return_reference_to<1>()) - // .def("rotateZ", &Fmatrix::rotateZ, - //return_reference_to<1>()) - // .def("rotation", (Fmatrix & (Fmatrix::*)(const Fvector &, const - //Fvector &))(&Fmatrix::rotation), return_reference_to<1>()) - // .def("rotation", (Fmatrix & (Fmatrix::*)(const Fvector &, - //float))(&Fmatrix::rotation), return_reference_to<1>()) - // .def("rotation", &Fmatrix::rotation, - //return_reference_to<1>()) - /* - .def("mapXYZ", &Fmatrix::mapXYZ, - return_reference_to<1>()) - .def("mapXZY", &Fmatrix::mapXZY, - return_reference_to<1>()) - .def("mapYXZ", &Fmatrix::mapYXZ, - return_reference_to<1>()) - .def("mapYZX", &Fmatrix::mapYZX, - return_reference_to<1>()) - .def("mapZXY", &Fmatrix::mapZXY, - return_reference_to<1>()) - .def("mapZYX", &Fmatrix::mapZYX, - return_reference_to<1>()) - .def("mirrorX", &Fmatrix::mirrorX, - return_reference_to<1>()) - .def("mirrorX_over", &Fmatrix::mirrorX_over, - return_reference_to<1>()) - .def("mirrorX_add ", &Fmatrix::mirrorX_add, - return_reference_to<1>()) - .def("mirrorY", &Fmatrix::mirrorY, - return_reference_to<1>()) - .def("mirrorY_over", &Fmatrix::mirrorY_over, - return_reference_to<1>()) - .def("mirrorY_add ", &Fmatrix::mirrorY_add, - return_reference_to<1>()) - .def("mirrorZ", &Fmatrix::mirrorZ, - return_reference_to<1>()) - .def("mirrorZ_over", &Fmatrix::mirrorZ_over, - return_reference_to<1>()) - .def("mirrorZ_add ", &Fmatrix::mirrorZ_add, - return_reference_to<1>()) - */ - // .def("build_projection", &Fmatrix::build_projection, - //return_reference_to<1>()) - // .def("build_projection_HAT", &Fmatrix::build_projection_HAT, - //return_reference_to<1>()) - // .def("build_projection_ortho", &Fmatrix::build_projection_ortho, - //return_reference_to<1>()) - // .def("build_camera", &Fmatrix::build_camera, - //return_reference_to<1>()) - // .def("build_camera_dir", &Fmatrix::build_camera_dir, - //return_reference_to<1>()) - // .def("inertion", &Fmatrix::inertion, - //return_reference_to<1>()) - // .def("transform_tiny32", &Fmatrix::transform_tiny32) - // .def("transform_tiny23", &Fmatrix::transform_tiny23) - // .def("transform_tiny", (void (Fmatrix::*)(Fvector &) - //const)(&Fmatrix::transform_tiny), out_value<2>()) - // .def("transform_tiny", (void (Fmatrix::*)(Fvector &, const - //Fvector &) const)(&Fmatrix::transform_tiny), out_value<2>()) - // .def("transform_dir", (void (Fmatrix::*)(Fvector &) - //const)(&Fmatrix::transform_dir), out_value<2>()) - // .def("transform_dir", (void (Fmatrix::*)(Fvector &, const - //Fvector &) const)(&Fmatrix::transform_dir), out_value<2>()) - // .def("transform", (void (Fmatrix::*)(Fvector &) - //const)(&Fmatrix::transform), out_value<2>()) - // .def("transform", &matrix_transform) - .def("setHPB", &Fmatrix::setHPB, return_reference_to<1>()) - // .def("setXYZ", (Fmatrix & (Fmatrix::*)(Fvector - //&))(&Fmatrix::setXYZ), policy_list, out_value<2>>()) - .def("setXYZ", (Fmatrix & (Fmatrix::*)(float, float, float))(&Fmatrix::setXYZ), - return_reference_to<1>()) - // .def("setXYZi", (Fmatrix & (Fmatrix::*)(Fvector - //&))(&Fmatrix::setXYZi), policy_list, out_value<2>>()) - .def("setXYZi", (Fmatrix & (Fmatrix::*)(float, float, float))(&Fmatrix::setXYZi), - return_reference_to<1>()) - // .def("getHPB", (void (Fmatrix::*)(Fvector &) - //const)(&Fmatrix::getHPB), out_value<2>()) - .def("getHPB", &get_matrix_hpb) + .def_readwrite("_14_", &Fmatrix::_14_) + .def_readwrite("j", &Fmatrix::j) + .def_readwrite("_24_", &Fmatrix::_24_) + .def_readwrite("k", &Fmatrix::k) + .def_readwrite("_34_", &Fmatrix::_34_) + .def_readwrite("c", &Fmatrix::c) + .def_readwrite("_44_", &Fmatrix::_44_) + .def(constructor<>()) + .def("set", (Fmatrix & (Fmatrix::*)(const Fmatrix&))(&Fmatrix::set), return_reference_to<1>()) + .def("set", (Fmatrix & (Fmatrix::*)(const Fvector&, const Fvector&, const Fvector&, + const Fvector&))(&Fmatrix::set), + return_reference_to<1>()) + .def("identity", &Fmatrix::identity, return_reference_to<1>()) + .def("mk_xform", &Fmatrix::mk_xform, return_reference_to<1>()) + .def("mul", (Fmatrix & (Fmatrix::*)(const Fmatrix&, const Fmatrix&))(&Fmatrix::mul), + return_reference_to<1>()) + .def("mul", (Fmatrix & (Fmatrix::*)(const Fmatrix&, float))(&Fmatrix::mul), + return_reference_to<1>()) + .def("mul", (Fmatrix & (Fmatrix::*)(float))(&Fmatrix::mul), return_reference_to<1>()) + .def("div", (Fmatrix & (Fmatrix::*)(const Fmatrix&, float))(&Fmatrix::div), + return_reference_to<1>()) + .def("div", (Fmatrix & (Fmatrix::*)(float))(&Fmatrix::div), return_reference_to<1>()) + // .def("invert", (Fmatrix & (Fmatrix::*)())(&Fmatrix::invert), + // return_reference_to<1>()) + // .def("invert", (Fmatrix & (Fmatrix::*)(const Fmatrix + //&))(&Fmatrix::invert), return_reference_to<1>()) + // .def("transpose", (Fmatrix & + //(Fmatrix::*)())(&Fmatrix::transpose), + // return_reference_to<1>()) + // .def("transpose", (Fmatrix & (Fmatrix::*)(const Fmatrix + //&))(&Fmatrix::transpose), return_reference_to<1>()) + // .def("translate", (Fmatrix & (Fmatrix::*)(const Fvector + //&))(&Fmatrix::translate), return_reference_to<1>()) + // .def("translate", (Fmatrix & (Fmatrix::*)(float, float, + // float))(&Fmatrix::translate), return_reference_to<1>()) + // .def("translate_over", (Fmatrix & (Fmatrix::*)(const Fvector + //&))(&Fmatrix::translate_over), return_reference_to<1>()) + // .def("translate_over", (Fmatrix & (Fmatrix::*)(float, float, + // float))(&Fmatrix::translate_over), + // return_reference_to<1>()) + // .def("translate_add", &Fmatrix::translate_add, + // return_reference_to<1>()) + // .def("scale", (Fmatrix & (Fmatrix::*)(const Fvector + //&))(&Fmatrix::scale), return_reference_to<1>()) + // .def("scale", (Fmatrix & (Fmatrix::*)(float, float, + // float))(&Fmatrix::scale), return_reference_to<1>()) + // .def("rotateX", &Fmatrix::rotateX, + // return_reference_to<1>()) + // .def("rotateY", &Fmatrix::rotateY, + // return_reference_to<1>()) + // .def("rotateZ", &Fmatrix::rotateZ, + // return_reference_to<1>()) + // .def("rotation", (Fmatrix & (Fmatrix::*)(const Fvector &, const + // Fvector &))(&Fmatrix::rotation), return_reference_to<1>()) + // .def("rotation", (Fmatrix & (Fmatrix::*)(const Fvector &, + // float))(&Fmatrix::rotation), return_reference_to<1>()) + // .def("rotation", &Fmatrix::rotation, + // return_reference_to<1>()) + /* + .def("mapXYZ", &Fmatrix::mapXYZ, + return_reference_to<1>()) + .def("mapXZY", &Fmatrix::mapXZY, + return_reference_to<1>()) + .def("mapYXZ", &Fmatrix::mapYXZ, + return_reference_to<1>()) + .def("mapYZX", &Fmatrix::mapYZX, + return_reference_to<1>()) + .def("mapZXY", &Fmatrix::mapZXY, + return_reference_to<1>()) + .def("mapZYX", &Fmatrix::mapZYX, + return_reference_to<1>()) + .def("mirrorX", &Fmatrix::mirrorX, + return_reference_to<1>()) + .def("mirrorX_over", &Fmatrix::mirrorX_over, + return_reference_to<1>()) + .def("mirrorX_add ", &Fmatrix::mirrorX_add, + return_reference_to<1>()) + .def("mirrorY", &Fmatrix::mirrorY, + return_reference_to<1>()) + .def("mirrorY_over", &Fmatrix::mirrorY_over, + return_reference_to<1>()) + .def("mirrorY_add ", &Fmatrix::mirrorY_add, + return_reference_to<1>()) + .def("mirrorZ", &Fmatrix::mirrorZ, + return_reference_to<1>()) + .def("mirrorZ_over", &Fmatrix::mirrorZ_over, + return_reference_to<1>()) + .def("mirrorZ_add ", &Fmatrix::mirrorZ_add, + return_reference_to<1>()) + */ + // .def("build_projection", &Fmatrix::build_projection, + // return_reference_to<1>()) + // .def("build_projection_HAT", &Fmatrix::build_projection_HAT, + // return_reference_to<1>()) + // .def("build_projection_ortho", &Fmatrix::build_projection_ortho, + // return_reference_to<1>()) + // .def("build_camera", &Fmatrix::build_camera, + // return_reference_to<1>()) + // .def("build_camera_dir", &Fmatrix::build_camera_dir, + // return_reference_to<1>()) + // .def("inertion", &Fmatrix::inertion, + // return_reference_to<1>()) + // .def("transform_tiny32", &Fmatrix::transform_tiny32) + // .def("transform_tiny23", &Fmatrix::transform_tiny23) + // .def("transform_tiny", (void (Fmatrix::*)(Fvector &) + // const)(&Fmatrix::transform_tiny), out_value<2>()) + // .def("transform_tiny", (void (Fmatrix::*)(Fvector &, const + // Fvector &) const)(&Fmatrix::transform_tiny), out_value<2>()) + // .def("transform_dir", (void (Fmatrix::*)(Fvector &) + // const)(&Fmatrix::transform_dir), out_value<2>()) + // .def("transform_dir", (void (Fmatrix::*)(Fvector &, const + // Fvector &) const)(&Fmatrix::transform_dir), out_value<2>()) + // .def("transform", (void (Fmatrix::*)(Fvector &) + // const)(&Fmatrix::transform), out_value<2>()) + // .def("transform", &matrix_transform) + .def("setHPB", &Fmatrix::setHPB, return_reference_to<1>()) + // .def("setXYZ", (Fmatrix & (Fmatrix::*)(Fvector + //&))(&Fmatrix::setXYZ), policy_list, out_value<2>>()) + .def("setXYZ", (Fmatrix & (Fmatrix::*)(float, float, float))(&Fmatrix::setXYZ), + return_reference_to<1>()) + // .def("setXYZi", (Fmatrix & (Fmatrix::*)(Fvector + //&))(&Fmatrix::setXYZi), policy_list, out_value<2>>()) + .def("setXYZi", (Fmatrix & (Fmatrix::*)(float, float, float))(&Fmatrix::setXYZi), + return_reference_to<1>()) + // .def("getHPB", (void (Fmatrix::*)(Fvector &) + // const)(&Fmatrix::getHPB), out_value<2>()) + .def("getHPB", &get_matrix_hpb) // .def("getXYZ", (void (Fmatrix::*)(Fvector &) const)(&Fmatrix::getXYZ), - //out_value<2>()) + // out_value<2>()) // .def("getXYZ", (void (Fmatrix::*)(float &, float &, float &) - //const)(&Fmatrix::getXYZ)) + // const)(&Fmatrix::getXYZ)) // .def("getXYZi", (void (Fmatrix::*)(Fvector &) const)(&Fmatrix::getXYZi), - //out_value<2>()) + // out_value<2>()) // .def("getXYZi", (void (Fmatrix::*)(float &, float &, float &) - //const)(&Fmatrix::getXYZi)) + // const)(&Fmatrix::getXYZi)) ]; }); diff --git a/src/xrServerEntities/script_fvector_script.cpp b/src/xrServerEntities/script_fvector_script.cpp index 31a4cc14c64..a10f5855b67 100644 --- a/src/xrServerEntities/script_fvector_script.cpp +++ b/src/xrServerEntities/script_fvector_script.cpp @@ -12,126 +12,113 @@ using namespace luabind; using namespace luabind::policy; -SCRIPT_EXPORT( - Fvector, (), { - module( - luaState)[class_( - "vector").def_readwrite("x", &Fvector::x) - .def_readwrite("y", &Fvector::y) - .def_readwrite("z", &Fvector::z) - .def(constructor<>()) - .def("set", (Fvector & (Fvector::*)(float, float, float))(&Fvector::set), - return_reference_to<1>()) - .def("set", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::set), return_reference_to<1>()) - .def("add", (Fvector & (Fvector::*)(float))(&Fvector::add), return_reference_to<1>()) - .def("add", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::add), return_reference_to<1>()) - .def("add", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::add), - return_reference_to<1>()) - .def("add", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::add), - return_reference_to<1>()) - .def("sub", (Fvector & (Fvector::*)(float))(&Fvector::sub), return_reference_to<1>()) - .def("sub", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::sub), return_reference_to<1>()) - .def("sub", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::sub), - return_reference_to<1>()) - .def("sub", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::sub), - return_reference_to<1>()) - .def("mul", (Fvector & (Fvector::*)(float))(&Fvector::mul), return_reference_to<1>()) - .def("mul", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::mul), return_reference_to<1>()) - .def("mul", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::mul), - return_reference_to<1>()) - .def("mul", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::mul), - return_reference_to<1>()) - .def("div", (Fvector & (Fvector::*)(float))(&Fvector::div), return_reference_to<1>()) - .def("div", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::div), return_reference_to<1>()) - .def("div", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::div), - return_reference_to<1>()) - .def("div", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::div), - return_reference_to<1>()) - .def("invert", (Fvector & (Fvector::*)())(&Fvector::invert), return_reference_to<1>()) - .def("invert", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::invert), - return_reference_to<1>()) - .def("min", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::min), return_reference_to<1>()) - .def("min", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::min), - return_reference_to<1>()) - .def("max", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::max), return_reference_to<1>()) - .def("max", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::max), - return_reference_to<1>()) - .def("abs", &Fvector::abs, return_reference_to<1>()) - .def("similar", &Fvector::similar) - .def("set_length", &Fvector::set_length, return_reference_to<1>()) - .def("align", &Fvector::align, return_reference_to<1>()) - // .def("squeeze", &Fvector::squeeze, - //return_reference_to<1>()) - .def("clamp", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::clamp), - return_reference_to<1>()) - .def("clamp", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::clamp), - return_reference_to<1>()) - .def("inertion", &Fvector::inertion, return_reference_to<1>()) - .def("average", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::average), - return_reference_to<1>()) - .def("average", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::average), - return_reference_to<1>()) - .def("lerp", &Fvector::lerp, return_reference_to<1>()) - .def("mad", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::mad), - return_reference_to<1>()) - .def("mad", (Fvector & (Fvector::*)(const Fvector&, const Fvector&, float))(&Fvector::mad), - return_reference_to<1>()) - .def("mad", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::mad), - return_reference_to<1>()) - .def("mad", - (Fvector & (Fvector::*)(const Fvector&, const Fvector&, const Fvector&))(&Fvector::mad), - return_reference_to<1>()) - // .def("square_magnitude", &Fvector::square_magnitude) - .def("magnitude", &Fvector::magnitude) - // .def("normalize_magnitude", &Fvector::normalize_magn) - .def("normalize", (Fvector & (Fvector::*)())(&Fvector::normalize_safe), - return_reference_to<1>()) - .def("normalize", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::normalize_safe), - return_reference_to<1>()) - .def("normalize_safe", (Fvector & (Fvector::*)())(&Fvector::normalize_safe), - return_reference_to<1>()) - .def("normalize_safe", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::normalize_safe), - return_reference_to<1>()) - // .def("random_dir", (Fvector & - //(Fvector::*)())(&Fvector::random_dir), - //return_reference_to<1>()) - // .def("random_dir", (Fvector & (Fvector::*)(const Fvector &, - //float))(&Fvector::random_dir), - //return_reference_to<1>()) - // .def("random_point", (Fvector & (Fvector::*)(const Fvector - //&))(&Fvector::random_point), - //return_reference_to<1>()) - // .def("random_point", (Fvector & - //(Fvector::*)(float))(&Fvector::random_point), - //return_reference_to<1>()) - .def("dotproduct", &Fvector::dotproduct) - .def("crossproduct", &Fvector::crossproduct, return_reference_to<1>()) - .def("distance_to_xz", &Fvector::distance_to_xz) - .def("distance_to_sqr", &Fvector::distance_to_sqr) - .def("distance_to", &Fvector::distance_to) - // .def("from_bary", (Fvector & (Fvector::*)(const Fvector &, - //const Fvector &, const Fvector &, float, float, float))(&Fvector::from_bary), - //return_reference_to<1>()) - // .def("from_bary", (Fvector & (Fvector::*)(const Fvector &, - //const Fvector &, const Fvector &, const Fvector &))(&Fvector::from_bary), - //return_reference_to<1>()) - // .def("from_bary4", &Fvector::from_bary4, - //return_reference_to<1>()) - // .def("mknormal_non_normalized", &Fvector::mknormal_non_normalized, - //return_reference_to<1>()) - // .def("mknormal", &Fvector::mknormal, - //return_reference_to<1>()) - .def("setHP", &Fvector::setHP, return_reference_to<1>()) - // .def("getHP", &Fvector::getHP, policy_list, - //out_value<3>>()) - .def("getH", &Fvector::getH) - .def("getP", &Fvector::getP) +SCRIPT_EXPORT(Fvector, (), { + module(luaState) + [class_("vector") + .def_readwrite("x", &Fvector::x) + .def_readwrite("y", &Fvector::y) + .def_readwrite("z", &Fvector::z) + .def(constructor<>()) + .def("set", (Fvector & (Fvector::*)(float, float, float))(&Fvector::set), return_reference_to<1>()) + .def("set", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::set), return_reference_to<1>()) + .def("add", (Fvector & (Fvector::*)(float))(&Fvector::add), return_reference_to<1>()) + .def("add", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::add), return_reference_to<1>()) + .def("add", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::add), + return_reference_to<1>()) + .def("add", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::add), return_reference_to<1>()) + .def("sub", (Fvector & (Fvector::*)(float))(&Fvector::sub), return_reference_to<1>()) + .def("sub", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::sub), return_reference_to<1>()) + .def("sub", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::sub), + return_reference_to<1>()) + .def("sub", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::sub), return_reference_to<1>()) + .def("mul", (Fvector & (Fvector::*)(float))(&Fvector::mul), return_reference_to<1>()) + .def("mul", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::mul), return_reference_to<1>()) + .def("mul", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::mul), + return_reference_to<1>()) + .def("mul", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::mul), return_reference_to<1>()) + .def("div", (Fvector & (Fvector::*)(float))(&Fvector::div), return_reference_to<1>()) + .def("div", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::div), return_reference_to<1>()) + .def("div", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::div), + return_reference_to<1>()) + .def("div", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::div), return_reference_to<1>()) + .def("invert", (Fvector & (Fvector::*)())(&Fvector::invert), return_reference_to<1>()) + .def("invert", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::invert), return_reference_to<1>()) + .def("min", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::min), return_reference_to<1>()) + .def("min", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::min), + return_reference_to<1>()) + .def("max", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::max), return_reference_to<1>()) + .def("max", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::max), + return_reference_to<1>()) + .def("abs", &Fvector::abs, return_reference_to<1>()) + .def("similar", &Fvector::similar) + .def("set_length", &Fvector::set_length, return_reference_to<1>()) + .def("align", &Fvector::align, return_reference_to<1>()) + // .def("squeeze", &Fvector::squeeze, + // return_reference_to<1>()) + .def("clamp", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::clamp), return_reference_to<1>()) + .def("clamp", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::clamp), + return_reference_to<1>()) + .def("inertion", &Fvector::inertion, return_reference_to<1>()) + .def("average", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::average), return_reference_to<1>()) + .def("average", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::average), + return_reference_to<1>()) + .def("lerp", &Fvector::lerp, return_reference_to<1>()) + .def("mad", (Fvector & (Fvector::*)(const Fvector&, float))(&Fvector::mad), return_reference_to<1>()) + .def("mad", (Fvector & (Fvector::*)(const Fvector&, const Fvector&, float))(&Fvector::mad), + return_reference_to<1>()) + .def("mad", (Fvector & (Fvector::*)(const Fvector&, const Fvector&))(&Fvector::mad), + return_reference_to<1>()) + .def("mad", (Fvector & (Fvector::*)(const Fvector&, const Fvector&, const Fvector&))(&Fvector::mad), + return_reference_to<1>()) + // .def("square_magnitude", &Fvector::square_magnitude) + .def("magnitude", &Fvector::magnitude) + // .def("normalize_magnitude", &Fvector::normalize_magn) + .def("normalize", (Fvector & (Fvector::*)())(&Fvector::normalize_safe), return_reference_to<1>()) + .def("normalize", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::normalize_safe), + return_reference_to<1>()) + .def("normalize_safe", (Fvector & (Fvector::*)())(&Fvector::normalize_safe), return_reference_to<1>()) + .def("normalize_safe", (Fvector & (Fvector::*)(const Fvector&))(&Fvector::normalize_safe), + return_reference_to<1>()) + // .def("random_dir", (Fvector & + //(Fvector::*)())(&Fvector::random_dir), + // return_reference_to<1>()) + // .def("random_dir", (Fvector & (Fvector::*)(const Fvector &, + // float))(&Fvector::random_dir), + // return_reference_to<1>()) + // .def("random_point", (Fvector & (Fvector::*)(const Fvector + //&))(&Fvector::random_point), + // return_reference_to<1>()) + // .def("random_point", (Fvector & + //(Fvector::*)(float))(&Fvector::random_point), + // return_reference_to<1>()) + .def("dotproduct", &Fvector::dotproduct) + .def("crossproduct", &Fvector::crossproduct, return_reference_to<1>()) + .def("distance_to_xz", &Fvector::distance_to_xz) + .def("distance_to_sqr", &Fvector::distance_to_sqr) + .def("distance_to", &Fvector::distance_to) + // .def("from_bary", (Fvector & (Fvector::*)(const Fvector &, + // const Fvector &, const Fvector &, float, float, float))(&Fvector::from_bary), + // return_reference_to<1>()) + // .def("from_bary", (Fvector & (Fvector::*)(const Fvector &, + // const Fvector &, const Fvector &, const Fvector &))(&Fvector::from_bary), + // return_reference_to<1>()) + // .def("from_bary4", &Fvector::from_bary4, + // return_reference_to<1>()) + // .def("mknormal_non_normalized", &Fvector::mknormal_non_normalized, + // return_reference_to<1>()) + // .def("mknormal", &Fvector::mknormal, + // return_reference_to<1>()) + .def("setHP", &Fvector::setHP, return_reference_to<1>()) + // .def("getHP", &Fvector::getHP, policy_list, + // out_value<3>>()) + .def("getH", &Fvector::getH) + .def("getP", &Fvector::getP) - .def("reflect", &Fvector::reflect, return_reference_to<1>()) - .def("slide", &Fvector::slide, return_reference_to<1>()) + .def("reflect", &Fvector::reflect, return_reference_to<1>()) + .def("slide", &Fvector::slide, return_reference_to<1>()) // .def("generate_orthonormal_basis", &Fvector::generate_orthonormal_basis), - ]; - }); + ]; +}); SCRIPT_EXPORT(Fvector2, (), { module(luaState)[class_( diff --git a/src/xrServerEntities/smart_cast.cpp b/src/xrServerEntities/smart_cast.cpp index 3e8edc61ea7..c1c6221e43a 100644 --- a/src/xrServerEntities/smart_cast.cpp +++ b/src/xrServerEntities/smart_cast.cpp @@ -11,15 +11,15 @@ #ifndef PURE_DYNAMIC_CAST #ifdef XRGAME_EXPORTS #include "Include/xrRender/rendervisual.h" -#include "alife_space.h" -#include "hit.h" #include "actor.h" -#include "custommonster.h" #include "ai/stalker/ai_stalker.h" -#include "ui/uiwindow.h" +#include "alife_space.h" +#include "cameraeffector.h" +#include "custommonster.h" #include "customzone.h" +#include "hit.h" +#include "ui/uiwindow.h" #include "weapon.h" -#include "cameraeffector.h" #endif #include "xrServer_Objects_ALife_Monsters.h" #endif diff --git a/src/xrServerEntities/smart_cast.h b/src/xrServerEntities/smart_cast.h index 08f46cf49f0..e175fbf636e 100644 --- a/src/xrServerEntities/smart_cast.h +++ b/src/xrServerEntities/smart_cast.h @@ -11,7 +11,7 @@ #ifdef DEBUG #define PURE_DYNAMIC_CAST -#endif // DEBUG +#endif // DEBUG #ifdef PURE_DYNAMIC_CAST #define smart_cast dynamic_cast @@ -332,4 +332,4 @@ DECLARE_SPECIALIZATION(CSE_ALifeItemPDA, CSE_Abstract, cast_item_pda); #endif #endif -#endif // SMART_CAST_H \ No newline at end of file +#endif // SMART_CAST_H \ No newline at end of file diff --git a/src/xrServerEntities/smart_cast_impl1.h b/src/xrServerEntities/smart_cast_impl1.h index 217a06bddc3..9ec0f3ef5e7 100644 --- a/src/xrServerEntities/smart_cast_impl1.h +++ b/src/xrServerEntities/smart_cast_impl1.h @@ -17,9 +17,9 @@ void add_smart_cast_stats_all(LPCSTR, LPCSTR); #ifdef MASTER_GOLD #define MAX_SEQUENCE_LENGTH 1 -#else // #ifdef MASTER_GOLD +#else // #ifdef MASTER_GOLD #define MAX_SEQUENCE_LENGTH 1 -#endif // #ifdef MASTER_GOLD +#endif // #ifdef MASTER_GOLD //#define SHOW_SMART_CAST_UNOPTIMIZED_CASES diff --git a/src/xrServerEntities/smart_cast_stats.cpp b/src/xrServerEntities/smart_cast_stats.cpp index 7e6a93b2e1f..d4efdbf4054 100644 --- a/src/xrServerEntities/smart_cast_stats.cpp +++ b/src/xrServerEntities/smart_cast_stats.cpp @@ -170,4 +170,4 @@ void release_smart_cast_stats() #endif } -#endif // DEBUG \ No newline at end of file +#endif // DEBUG \ No newline at end of file diff --git a/src/xrServerEntities/specific_character.cpp b/src/xrServerEntities/specific_character.cpp index 578e56ad62c..cad6bc67893 100644 --- a/src/xrServerEntities/specific_character.cpp +++ b/src/xrServerEntities/specific_character.cpp @@ -178,7 +178,7 @@ void CSpecificCharacter::load_shared(LPCSTR) MoneyDef().min_money = pXML->ReadAttribInt("money", 0, "min"); MoneyDef().max_money = pXML->ReadAttribInt("money", 0, "max"); MoneyDef().inf_money = !!pXML->ReadAttribInt("money", 0, "infinitive"); - MoneyDef().max_money = _max(MoneyDef().max_money, MoneyDef().min_money); // :) + MoneyDef().max_money = _max(MoneyDef().max_money, MoneyDef().min_money); // :) } else { diff --git a/src/xrServerEntities/xml_str_id_loader.h b/src/xrServerEntities/xml_str_id_loader.h index ffed1b59512..90f758d6fe7 100644 --- a/src/xrServerEntities/xml_str_id_loader.h +++ b/src/xrServerEntities/xml_str_id_loader.h @@ -2,10 +2,10 @@ #ifdef XRGAME_EXPORTS #include "ui/xrUIXmlParser.h" -#else // XRGAME_EXPORTS -#include "xrUIXmlParser.h" +#else // XRGAME_EXPORTS #include "Common/object_broker.h" -#endif // XRGAME_EXPORTS +#include "xrUIXmlParser.h" +#endif // XRGAME_EXPORTS // T_ID - уникальный текстовый идентификатор (аттрибут id в XML файле) // T_INDEX - уникальный числовой индекс diff --git a/src/xrServerEntities/xrMessages.h b/src/xrServerEntities/xrMessages.h index b5b5078426d..f91f5194caa 100644 --- a/src/xrServerEntities/xrMessages.h +++ b/src/xrServerEntities/xrMessages.h @@ -8,35 +8,35 @@ enum { - M_UPDATE = 0, // DUAL: Update state - M_SPAWN, // DUAL: Spawning, full state + M_UPDATE = 0, // DUAL: Update state + M_SPAWN, // DUAL: Spawning, full state M_SV_CONFIG_NEW_CLIENT, M_SV_CONFIG_GAME, M_SV_CONFIG_FINISHED, - M_MIGRATE_DEACTIVATE, // TO: Changing server, just deactivate - M_MIGRATE_ACTIVATE, // TO: Changing server, full state + M_MIGRATE_DEACTIVATE, // TO: Changing server, just deactivate + M_MIGRATE_ACTIVATE, // TO: Changing server, full state - M_CHAT, // DUAL: + M_CHAT, // DUAL: - M_EVENT, // Game Event - M_CL_INPUT, // Client Input Data + M_EVENT, // Game Event + M_CL_INPUT, // Client Input Data //----------- for E3 ----------------------------- M_CL_UPDATE, M_UPDATE_OBJECTS, //------------------------------------------------- - M_CLIENTREADY, // Client has finished to load level and are ready to play + M_CLIENTREADY, // Client has finished to load level and are ready to play - M_CHANGE_LEVEL, // changing level + M_CHANGE_LEVEL, // changing level M_LOAD_GAME, M_RELOAD_GAME, M_SAVE_GAME, M_SAVE_PACKET, M_SWITCH_DISTANCE, - M_GAMEMESSAGE, // Game Message - M_EVENT_PACK, // Pack of M_EVENT + M_GAMEMESSAGE, // Game Message + M_EVENT_PACK, // Pack of M_EVENT //----------------------------------------------------- M_GAMESPY_CDKEY_VALIDATION_CHALLENGE, @@ -69,8 +69,8 @@ enum M_REMOTE_CONTROL_CMD, M_BATTLEYE, - M_SV_MAP_NAME, // request and responce - M_SV_DIGEST, // request and responce + M_SV_MAP_NAME, // request and responce + M_SV_DIGEST, // request and responce M_FILE_TRANSFER, M_MAKE_SCREENSHOT, @@ -85,15 +85,15 @@ enum enum { GE_RESPAWN, - GE_OWNERSHIP_TAKE, // DUAL: Client request for ownership of an item + GE_OWNERSHIP_TAKE, // DUAL: Client request for ownership of an item GE_OWNERSHIP_TAKE_MP_FORCED, - GE_OWNERSHIP_REJECT, // DUAL: Client request ownership rejection - GE_TRANSFER_AMMO, // DUAL: Take ammo out of weapon for our weapon - GE_HIT, // - GE_DIE, // - GE_ASSIGN_KILLER, // - GE_DESTROY, // authorative client request for entity-destroy - GE_DESTROY_REJECT, // GE_DESTROY + GE_OWNERSHIP_REJECT + GE_OWNERSHIP_REJECT, // DUAL: Client request ownership rejection + GE_TRANSFER_AMMO, // DUAL: Take ammo out of weapon for our weapon + GE_HIT, // + GE_DIE, // + GE_ASSIGN_KILLER, // + GE_DESTROY, // authorative client request for entity-destroy + GE_DESTROY_REJECT, // GE_DESTROY + GE_OWNERSHIP_REJECT GE_TELEPORT_OBJECT, GE_ADD_RESTRICTION, @@ -102,7 +102,7 @@ enum GE_BUY, - GE_INFO_TRANSFER, // transfer _new_ info on PDA + GE_INFO_TRANSFER, // transfer _new_ info on PDA GE_TRADE_SELL, GE_TRADE_BUY, @@ -116,14 +116,14 @@ enum GE_INSTALL_UPGRADE, GE_GRENADE_EXPLODE, - GE_INV_ACTION, // a action beign taken on inventory + GE_INV_ACTION, // a action beign taken on inventory GE_INV_BOX_STATUS, GE_INV_OWNER_STATUS, GE_ZONE_STATE_CHANGE, - GE_MOVE_ACTOR, // move actor to desired position instantly - GE_ACTOR_JUMPING, // actor press jump key + GE_MOVE_ACTOR, // move actor to desired position instantly + GE_ACTOR_JUMPING, // actor press jump key GE_ACTOR_MAX_POWER, GE_ACTOR_MAX_HEALTH, @@ -164,10 +164,10 @@ enum }; enum EGameMessages -{ // game_cl <----> game_sv messages +{ // game_cl <----> game_sv messages GAME_EVENT_PLAYER_READY, - GAME_EVENT_PLAYER_KILL, // player wants to die - GAME_EVENT_PLAYER_BUY_FINISHED, // player end to buy items + GAME_EVENT_PLAYER_KILL, // player wants to die + GAME_EVENT_PLAYER_BUY_FINISHED, // player end to buy items GAME_EVENT_PLAYER_BUYMENU_OPEN, GAME_EVENT_PLAYER_BUYMENU_CLOSE, GAME_EVENT_PLAYER_BUY_SPAWN, @@ -179,7 +179,7 @@ enum EGameMessages GAME_EVENT_PLAYER_DISCONNECTED, GAME_EVENT_PLAYER_ENTERED_GAME, - GAME_EVENT_PLAYER_KILLED, //////!!!!! + GAME_EVENT_PLAYER_KILLED, //////!!!!! GAME_EVENT_PLAYER_HITTED, GAME_EVENT_PLAYER_JOIN_TEAM, @@ -228,20 +228,20 @@ enum EGameMessages GAME_EVENT_PLAYERS_INFO_REPLY, //----------------------------------------- - GAME_EVENT_SCRIPT_BEGINS_FROM, // don't add messages after this + GAME_EVENT_SCRIPT_BEGINS_FROM, // don't add messages after this GAME_EVENT_FORCEDWORD = u32(-1) }; enum { - M_SPAWN_OBJECT_LOCAL = (1 << 0), // after spawn it becomes local (authorative) - M_SPAWN_OBJECT_HASUPDATE = (1 << 2), // after spawn info it has update inside message - M_SPAWN_OBJECT_ASPLAYER = (1 << 3), // after spawn it must become viewable - M_SPAWN_OBJECT_PHANTOM = (1 << 4), // after spawn it must become viewable - M_SPAWN_VERSION = (1 << 5), // control version - M_SPAWN_UPDATE = (1 << 6), // + update packet - M_SPAWN_TIME = (1 << 7), // + spawn time - M_SPAWN_DENIED = (1 << 8), // don't spawn entity with this flag + M_SPAWN_OBJECT_LOCAL = (1 << 0), // after spawn it becomes local (authorative) + M_SPAWN_OBJECT_HASUPDATE = (1 << 2), // after spawn info it has update inside message + M_SPAWN_OBJECT_ASPLAYER = (1 << 3), // after spawn it must become viewable + M_SPAWN_OBJECT_PHANTOM = (1 << 4), // after spawn it must become viewable + M_SPAWN_VERSION = (1 << 5), // control version + M_SPAWN_UPDATE = (1 << 6), // + update packet + M_SPAWN_TIME = (1 << 7), // + spawn time + M_SPAWN_DENIED = (1 << 8), // don't spawn entity with this flag M_SPAWN_OBJECT_FORCEDWORD = u32(-1) }; @@ -253,6 +253,6 @@ enum enum_connection_results ecr_password_verification_failed, ecr_have_been_banned, ecr_profile_error, -}; // enum enum_connection_results +}; // enum enum_connection_results #endif /*_INCDEF_XRMESSAGES_H_*/ \ No newline at end of file diff --git a/src/xrServerEntities/xrServer_Object_Base.cpp b/src/xrServerEntities/xrServer_Object_Base.cpp index a791bc57e4a..667b5347cb4 100644 --- a/src/xrServerEntities/xrServer_Object_Base.cpp +++ b/src/xrServerEntities/xrServer_Object_Base.cpp @@ -36,7 +36,7 @@ IPropHelper& PHelper() #ifdef XRGAME_EXPORTS #include "ai_space.h" #include "alife_simulator.h" -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS #endif LPCSTR script_section = "script"; @@ -88,10 +88,10 @@ CSE_Abstract::CSE_Abstract(LPCSTR caSection) owner = 0; m_gameType.SetDefaults(); //. s_gameid = 0; - s_RP = 0xFE; // Use supplied coords + s_RP = 0xFE; // Use supplied coords s_flags.assign(0); s_name = caSection; - s_name_replace = 0; // xr_strdup(""); + s_name_replace = 0; // xr_strdup(""); o_Angle.set(0.f, 0.f, 0.f); o_Position.set(0.f, 0.f, 0.f); m_bALifeControl = false; @@ -122,7 +122,7 @@ CSE_Abstract::CSE_Abstract(LPCSTR caSection) if (ai().get_alife()) config = ai().alife().get_config(raw_file_name); else -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS { string_path file_name; FS.update_path(file_name, "$game_config$", raw_file_name); @@ -138,7 +138,7 @@ CSE_Abstract::CSE_Abstract(LPCSTR caSection) #ifdef XRGAME_EXPORTS if (NULL == ai().get_alife()) -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS { IReader* _r = (IReader*)config; FS.r_close(_r); @@ -213,9 +213,10 @@ void CSE_Abstract::Spawn_Write(NET_Packet& tNetPacket, BOOL bLocal) tNetPacket.w_u16(script_server_object_version()); // client object custom data serialization SAVE - u16 client_data_size = (u16)client_data.size(); //не может быть больше 256 байт + u16 client_data_size = (u16)client_data.size(); //не может быть больше 256 байт tNetPacket.w_u16(client_data_size); - // Msg ("SERVER:saving:save:%d bytes:%d:%s",client_data_size,ID,s_name_replace ? s_name_replace : + // Msg ("SERVER:saving:save:%d bytes:%d:%s",client_data_size,ID,s_name_replace ? s_name_replace + //: //""); if (client_data_size > 0) { tNetPacket.w(&*client_data.begin(), client_data_size); @@ -257,7 +258,7 @@ static enum EGameTypes { GAME_CAPTURETHEARTEFACT = 8, // identifiers in range [100...254] are registered for script game type - GAME_DUMMY = 255 // temporary game type + GAME_DUMMY = 255 // temporary game type }; BOOL CSE_Abstract::Spawn_Read(NET_Packet& tNetPacket) @@ -307,10 +308,10 @@ BOOL CSE_Abstract::Spawn_Read(NET_Packet& tNetPacket) // client object custom data serialization LOAD if (m_wVersion > 70) { u16 client_data_size = - (m_wVersion > 93) ? tNetPacket.r_u16() : tNetPacket.r_u8(); //не может быть больше 256 байт + (m_wVersion > 93) ? tNetPacket.r_u16() : tNetPacket.r_u8(); //не может быть больше 256 байт if (client_data_size > 0) { // Msg ("SERVER:loading:load:%d bytes:%d:%s",client_data_size,ID,s_name_replace ? - //s_name_replace : ""); + // s_name_replace : ""); client_data.resize(client_data_size); tNetPacket.r(&*client_data.begin(), client_data_size); } @@ -323,26 +324,26 @@ BOOL CSE_Abstract::Spawn_Read(NET_Packet& tNetPacket) if (m_wVersion > 79) tNetPacket.r_u16(m_tSpawnID); if (m_wVersion < 112) { - if (m_wVersion > 82) tNetPacket.r_float(); // m_spawn_probability); + if (m_wVersion > 82) tNetPacket.r_float(); // m_spawn_probability); if (m_wVersion > 83) { - tNetPacket.r_u32(); // m_spawn_flags.assign(tNetPacket.r_u32()); + tNetPacket.r_u32(); // m_spawn_flags.assign(tNetPacket.r_u32()); xr_string temp; - tNetPacket.r_stringZ(temp); // tNetPacket.r_stringZ(m_spawn_control); - tNetPacket.r_u32(); // m_max_spawn_count); + tNetPacket.r_stringZ(temp); // tNetPacket.r_stringZ(m_spawn_control); + tNetPacket.r_u32(); // m_max_spawn_count); // this stuff we do not need even in case of uncomment - tNetPacket.r_u32(); // m_spawn_count); - tNetPacket.r_u64(); // m_last_spawn_time); + tNetPacket.r_u32(); // m_spawn_count); + tNetPacket.r_u64(); // m_last_spawn_time); } if (m_wVersion > 84) { - tNetPacket.r_u64(); // m_min_spawn_interval); - tNetPacket.r_u64(); // m_max_spawn_interval); + tNetPacket.r_u64(); // m_min_spawn_interval); + tNetPacket.r_u64(); // m_max_spawn_interval); } } u16 size; - tNetPacket.r_u16(size); // size + tNetPacket.r_u16(size); // size bool b1 = (m_tClassID == CLSID_SPECTATOR); bool b2 = (size > sizeof(size)) || (tNetPacket.inistream != NULL); R_ASSERT3((b1 || b2), "cannot read object, which is not successfully saved :(", name_replace()); @@ -353,12 +354,13 @@ BOOL CSE_Abstract::Spawn_Read(NET_Packet& tNetPacket) void CSE_Abstract::load(NET_Packet& tNetPacket) { CPureServerObject::load(tNetPacket); - u16 client_data_size = (m_wVersion > 93) ? tNetPacket.r_u16() : tNetPacket.r_u8(); //не может быть больше 256 байт + u16 client_data_size = (m_wVersion > 93) ? tNetPacket.r_u16() : tNetPacket.r_u8(); //не может быть больше 256 байт if (client_data_size > 0) { #ifdef DEBUG -// Msg ("SERVER:loading:load:%d bytes:%d:%s",client_data_size,ID,s_name_replace ? s_name_replace : +// Msg ("SERVER:loading:load:%d bytes:%d:%s",client_data_size,ID,s_name_replace ? s_name_replace +//: //""); -#endif // DEBUG +#endif // DEBUG client_data.resize(client_data_size); tNetPacket.r(&*client_data.begin(), client_data_size); } @@ -366,7 +368,7 @@ void CSE_Abstract::load(NET_Packet& tNetPacket) { #ifdef DEBUG if (!client_data.empty()) Msg("CSE_Abstract::load: client_data is cleared for [%d][%s]", ID, name_replace()); -#endif // DEBUG +#endif // DEBUG client_data.clear(); } } @@ -423,7 +425,7 @@ void CSE_Abstract::FillProps(LPCSTR pref, PropItemVec& items) { #ifdef XRSE_FACTORY_EXPORTS m_gameType.FillProp(pref, items); -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS /* #ifdef XRGAME_EXPORTS # ifdef DEBUG @@ -439,7 +441,7 @@ void CSE_Abstract::FillProp(LPCSTR pref, PropItemVec& items) CScriptValueContainer::clear(); FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_Abstract::validate() { diff --git a/src/xrServerEntities/xrServer_Object_Base.h b/src/xrServerEntities/xrServer_Object_Base.h index 49850baf370..e0bf4a36aaa 100644 --- a/src/xrServerEntities/xrServer_Object_Base.h +++ b/src/xrServerEntities/xrServer_Object_Base.h @@ -71,15 +71,15 @@ class CSE_Abstract : public IServerEntity, public CPureServerObject, public CScr public: BOOL net_Ready; - BOOL net_Processed; // Internal flag for connectivity-graph + BOOL net_Processed; // Internal flag for connectivity-graph u16 m_wVersion; u16 m_script_version; u16 RespawnTime; - u16 ID; // internal ID - u16 ID_Parent; // internal ParentID, 0xffff means no parent - u16 ID_Phantom; // internal PhantomID, 0xffff means no phantom + u16 ID; // internal ID + u16 ID_Parent; // internal ParentID, 0xffff means no parent + u16 ID_Phantom; // internal PhantomID, 0xffff means no phantom xrClientData* owner; // spawn data @@ -87,7 +87,7 @@ class CSE_Abstract : public IServerEntity, public CPureServerObject, public CScr //. u8 s_gameid; GameTypeChooser m_gameType; u8 s_RP; - Flags16 s_flags; // state flags + Flags16 s_flags; // state flags xr_vector children; // update data @@ -125,8 +125,8 @@ class CSE_Abstract : public IServerEntity, public CPureServerObject, public CScr virtual visual_data* __stdcall visual_collection() const { return 0; } virtual u32 __stdcall visual_collection_size() const { return 0; } virtual void __stdcall set_additional_info(void* info){}; -#endif // #ifndef XRGAME_EXPORTS - virtual BOOL Net_Relevant() { return FALSE; }; // !!!! WARNING!!! +#endif // #ifndef XRGAME_EXPORTS + virtual BOOL Net_Relevant() { return FALSE; }; // !!!! WARNING!!! // virtual void __stdcall Spawn_Write(NET_Packet& tNetPacket, BOOL bLocal); virtual BOOL __stdcall Spawn_Read(NET_Packet& tNetPacket); diff --git a/src/xrServerEntities/xrServer_Objects.cpp b/src/xrServerEntities/xrServer_Objects.cpp index 3e652fe28b3..7641043180a 100644 --- a/src/xrServerEntities/xrServer_Objects.cpp +++ b/src/xrServerEntities/xrServer_Objects.cpp @@ -118,7 +118,7 @@ void CSE_Spectator::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_Temporary @@ -148,7 +148,7 @@ void CSE_Temporary::UPDATE_Write(NET_Packet& tNetPacket){}; #ifndef XRGAME_EXPORTS void CSE_Temporary::FillProps(LPCSTR pref, PropItemVec& values){}; -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS /** //////////////////////////////////////////////////////////////////////////// @@ -263,7 +263,7 @@ void CSE_PHSkeleton::load(NET_Packet& tNetPacket) { _flags.assign(tNetPacket.r_u8()); data_load(tNetPacket); - source_id = u16(-1); //. + source_id = u16(-1); //. } void CSE_PHSkeleton::UPDATE_Write(NET_Packet& tNetPacket) { @@ -277,7 +277,7 @@ void CSE_PHSkeleton::UPDATE_Read(NET_Packet& tNetPacket) void CSE_PHSkeleton::FillProps(LPCSTR pref, PropItemVec& values) { } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS CSE_AbstractVisual::CSE_AbstractVisual(LPCSTR section) : inherited1(section), inherited2(section) { @@ -305,7 +305,7 @@ void CSE_AbstractVisual::FillProps(LPCSTR pref, PropItemVec& values) inherited1::FillProps(pref, values); inherited2::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS void CSE_AbstractVisual::UPDATE_Read(NET_Packet& tNetPacket) { diff --git a/src/xrServerEntities/xrServer_Objects.h b/src/xrServerEntities/xrServer_Objects.h index d89a83b6b01..8312f647a60 100644 --- a/src/xrServerEntities/xrServer_Objects.h +++ b/src/xrServerEntities/xrServer_Objects.h @@ -226,7 +226,7 @@ class CSE_PHSkeleton }; Flags8 _flags; SPHBonesData saved_bones; - u16 source_id; // for break only + u16 source_id; // for break only virtual void load(NET_Packet& tNetPacket); virtual bool need_save() const { return (!_flags.test(flNotSave)); } virtual void set_sorce_id(u16 si) { source_id = si; } diff --git a/src/xrServerEntities/xrServer_Objects_ALife.cpp b/src/xrServerEntities/xrServer_Objects_ALife.cpp index 0ef7da92d82..ab929f05501 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife.cpp +++ b/src/xrServerEntities/xrServer_Objects_ALife.cpp @@ -15,15 +15,15 @@ #ifndef AI_COMPILER #include "character_info.h" -#endif // AI_COMPILER +#endif // AI_COMPILER #include "xrCore/Animation/Bone.hpp" #ifndef XRGAME_EXPORTS LPCSTR GAME_CONFIG = "game.ltx"; -#else // XRGAME_EXPORTS +#else // XRGAME_EXPORTS #include "xrEngine/render.h" -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS #ifdef XRSE_FACTORY_EXPORTS #include "ai_space.h" @@ -77,9 +77,9 @@ struct logical_string_predicate return (StrCmpLogicalW(buffer0, buffer1) < 0); } -}; // struct logical_string_predicate +}; // struct logical_string_predicate -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS bool SortStringsByAlphabetPred(const shared_str& s1, const shared_str& s2) { @@ -116,13 +116,13 @@ void SFillPropData::load() // create ini #ifdef XRGAME_EXPORTS CInifile* Ini = pGameIni; -#else // XRGAME_EXPORTS +#else // XRGAME_EXPORTS CInifile* Ini = 0; string_path gm_name; FS.update_path(gm_name, "$game_config$", GAME_CONFIG); R_ASSERT3(FS.exist(gm_name), "Couldn't find file", gm_name); Ini = new CInifile(gm_name); -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS // location type LPCSTR N, V; @@ -184,12 +184,12 @@ void SFillPropData::load() } std::sort(character_profiles.begin(), character_profiles.end(), SortStringsByAlphabetPred); -#endif // AI_COMPILER +#endif // AI_COMPILER // destroy ini #ifndef XRGAME_EXPORTS xr_delete(Ini); -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS luabind::object table; R_ASSERT(ai().script_engine().function_object("smart_covers.descriptions", table, LUA_TTABLE)); @@ -229,7 +229,7 @@ void SFillPropData::inc() ++counter; } static SFillPropData fp_data; -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS #ifndef XRGAME_EXPORTS void CSE_ALifeTraderAbstract::FillProps(LPCSTR pref, PropItemVec& items) @@ -242,9 +242,9 @@ void CSE_ALifeTraderAbstract::FillProps(LPCSTR pref, PropItemVec& items) &m_sCharacterProfile, &*fp_data.character_profiles.begin(), fp_data.character_profiles.size()); value->OnChangeEvent.bind(this, &CSE_ALifeTraderAbstract::OnChangeProfile); -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeGraphPoint //////////////////////////////////////////////////////////////////////////// @@ -258,14 +258,14 @@ CSE_ALifeGraphPoint::CSE_ALifeGraphPoint(LPCSTR caSection) : CSE_Abstract(caSect #ifdef XRSE_FACTORY_EXPORTS fp_data.inc(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS } CSE_ALifeGraphPoint::~CSE_ALifeGraphPoint() { #ifdef XRSE_FACTORY_EXPORTS fp_data.dec(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS } void CSE_ALifeGraphPoint::STATE_Read(NET_Packet& tNetPacket, u16 size) @@ -313,7 +313,7 @@ void CSE_ALifeGraphPoint::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateRList(items, PrepareKey(pref, *s_name, "Connection\\Level name"), &m_caConnectionLevelName, &*fp_data.level_ids.begin(), fp_data.level_ids.size()); PHelper().CreateRText(items, PrepareKey(pref, *s_name, "Connection\\Point name"), &m_caConnectionPointName); -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS } void CSE_ALifeGraphPoint::on_render( @@ -348,10 +348,10 @@ void CSE_ALifeGraphPoint::on_render( du->DrawIndexedPrimitive(4 /*D3DPT_TRIANGLELIST*/, 4, parent.c, PT, 6, IT, 12, C.get()); if (bSelected) du->DrawSelectionBox(parent.c, Fvector().set(0.5f, 1.0f, 0.5f), NULL); -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeObject @@ -374,7 +374,7 @@ CSE_ALifeObject::CSE_ALifeObject(LPCSTR caSection) : CSE_Abstract(caSection) #endif #ifdef XRSE_FACTORY_EXPORTS fp_data.inc(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS m_flags.set(flOfflineNoMove, FALSE); seed(u32(CPU::QPC() & 0xffffffff)); } @@ -396,7 +396,7 @@ CSE_ALifeObject::~CSE_ALifeObject() { #ifdef XRSE_FACTORY_EXPORTS fp_data.dec(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS } bool CSE_ALifeObject::move_offline() const @@ -436,7 +436,7 @@ void CSE_ALifeObject::STATE_Read(NET_Packet& tNetPacket, u16 size) if (m_wVersion >= 1) { if (m_wVersion > 24) { if (m_wVersion < 83) { - tNetPacket.r_float(); // m_spawn_probability); + tNetPacket.r_float(); // m_spawn_probability); } } else @@ -470,7 +470,7 @@ void CSE_ALifeObject::STATE_Read(NET_Packet& tNetPacket, u16 size) if ((m_wVersion > 23) && (m_wVersion < 84)) { shared_str temp; - tNetPacket.r_stringZ(temp); // m_spawn_control); + tNetPacket.r_stringZ(temp); // m_spawn_control); } if (m_wVersion > 49) { @@ -510,9 +510,9 @@ void CSE_ALifeObject::FillProps(LPCSTR pref, PropItemVec& items) &*fp_data.story_names.begin(), fp_data.story_names.size()); PHelper().CreateRToken32(items, PrepareKey(pref, *s_name, "ALife\\Spawn Story ID"), &m_spawn_story_id, &*fp_data.spawn_story_names.begin(), fp_data.spawn_story_names.size()); -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS u32 CSE_ALifeObject::ef_equipment_type() const { @@ -647,7 +647,7 @@ void CSE_ALifeGroupAbstract::FillProps(LPCSTR pref, PropItemVec& items) { PHelper().CreateU16(items, PrepareKey(pref, "ALife\\Count"), &m_wCount, 0, 0xff); }; -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeDynamicObject @@ -688,7 +688,7 @@ void CSE_ALifeDynamicObject::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeDynamicObjectVisual @@ -736,7 +736,7 @@ void CSE_ALifeDynamicObjectVisual::FillProps(LPCSTR pref, PropItemVec& items) inherited1::FillProps(pref, items); inherited2::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifePHSkeletonObject @@ -797,7 +797,7 @@ void CSE_ALifePHSkeletonObject::FillProps(LPCSTR pref, PropItemVec& items) inherited1::FillProps(pref, items); inherited2::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeSpaceRestrictor @@ -867,7 +867,7 @@ void CSE_ALifeSpaceRestrictor::FillProps(LPCSTR pref, PropItemVec& items) items, PrepareKey(pref, *s_name, "restrictor type"), &m_space_restrictor_type, defaul_retrictor_types); PHelper().CreateFlag32(items, PrepareKey(pref, *s_name, "check for separator"), &m_flags, flCheckForSeparator); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeLevelChanger @@ -880,7 +880,7 @@ CSE_ALifeLevelChanger::CSE_ALifeLevelChanger(LPCSTR caSection) : CSE_ALifeSpaceR m_tAngles.set(0.f, 0.f, 0.f); #ifdef XRSE_FACTORY_EXPORTS fp_data.inc(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS m_bSilentMode = FALSE; } @@ -888,7 +888,7 @@ CSE_ALifeLevelChanger::~CSE_ALifeLevelChanger() { #ifdef XRSE_FACTORY_EXPORTS fp_data.dec(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS } void CSE_ALifeLevelChanger::STATE_Read(NET_Packet& tNetPacket, u16 size) @@ -951,9 +951,9 @@ void CSE_ALifeLevelChanger::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateRText(items, PrepareKey(pref, *s_name, "Level point to change"), &m_caLevelPointToChange); PHelper().CreateBOOL(items, PrepareKey(pref, *s_name, "Silent mode"), &m_bSilentMode); -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeObjectPhysic @@ -1015,7 +1015,7 @@ void CSE_ALifeObjectPhysic::STATE_Read(NET_Packet& tNetPacket, u16 size) if (m_wVersion < 65 && m_wVersion > 28) tNetPacket.r_stringZ(startup_animation); if (m_wVersion < 64) { - if (m_wVersion > 39) // > 39 + if (m_wVersion > 39) // > 39 tNetPacket.r_u8(_flags.flags); if (m_wVersion > 56) tNetPacket.r_u16(source_id); @@ -1046,14 +1046,14 @@ const u32 CSE_ALifeObjectPhysic::random_limit = 40; #ifdef DEBUG const u32 CSE_ALifeObjectPhysic::m_update_delta_time = 0; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG // if TRUE, then object sends update packet BOOL CSE_ALifeObjectPhysic::Net_Relevant() { if (!freezed) { #ifdef XRGAME_EXPORTS -#ifdef DEBUG // this block of code is only for test +#ifdef DEBUG // this block of code is only for test if (Device.dwTimeGlobal < (m_last_update_time + m_update_delta_time)) return FALSE; #endif #endif @@ -1064,7 +1064,7 @@ BOOL CSE_ALifeObjectPhysic::Net_Relevant() if (Device.dwTimeGlobal >= (m_freeze_time + m_freeze_delta_time)) return FALSE; #endif if (!prev_freezed) { - prev_freezed = true; // i.e. freezed + prev_freezed = true; // i.e. freezed return TRUE; } @@ -1078,7 +1078,7 @@ void CSE_ALifeObjectPhysic::UPDATE_Read(NET_Packet& tNetPacket) inherited1::UPDATE_Read(tNetPacket); inherited2::UPDATE_Read(tNetPacket); - if (tNetPacket.r_eof()) // backward compatibility + if (tNetPacket.r_eof()) // backward compatibility return; ////////////////////////////////////////////////////////////////////////// @@ -1138,7 +1138,7 @@ void CSE_ALifeObjectPhysic::UPDATE_Read(NET_Packet& tNetPacket) }*/ } prev_freezed = freezed; - if (tNetPacket.r_eof()) // in case spawn + update + if (tNetPacket.r_eof()) // in case spawn + update { freezed = false; return; @@ -1210,7 +1210,7 @@ void CSE_ALifeObjectPhysic::UPDATE_Write(NET_Packet& tNetPacket) } } //. Msg("--- Sync PH [%d].", ID); - tNetPacket.w_u8(1); // not freezed - doesn't mean anything.. + tNetPacket.w_u8(1); // not freezed - doesn't mean anything.. #ifdef XRGAME_EXPORTS #ifdef DEBUG @@ -1242,7 +1242,7 @@ void CSE_ALifeObjectPhysic::FillProps(LPCSTR pref, PropItemVec& values) PHelper().CreateChoose(values, PrepareKey(pref, *s_name, "Model\\Fixed bones"), &fixed_bones, smSkeletonBones, 0, (void*)visual()->get_visual(), 8); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeObjectPhysic::used_ai_locations() const { @@ -1504,7 +1504,7 @@ void CSE_ALifeObjectHangingLamp::on_render( if (flags.is(flPointAmbient)) du->DrawPointLight(ambient_xform.c, VIS_RADIUS, clr); } } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeObjectHangingLamp::used_ai_locations() const { @@ -1569,7 +1569,7 @@ void CSE_ALifeObjectProjector::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeObjectProjector::used_ai_locations() const { @@ -1706,7 +1706,7 @@ void CSE_ALifeHelicopter::FillProps(LPCSTR pref, PropItemVec& values) PHelper().CreateChoose(values, PrepareKey(pref, *s_name, "Engine Sound"), &engine_sound, smSoundSource); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeHelicopter::used_ai_locations() const { @@ -1854,7 +1854,7 @@ void CSE_ALifeCar::FillProps(LPCSTR pref, PropItemVec& values) inherited2::FillProps(pref, values); PHelper().CreateFloat(values, PrepareKey(pref, *s_name, "Health"), &health, 0.f, 1.0f); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeObjectBreakable @@ -1898,7 +1898,7 @@ void CSE_ALifeObjectBreakable::FillProps(LPCSTR pref, PropItemVec& values) inherited::FillProps(pref, values); PHelper().CreateFloat(values, PrepareKey(pref, *s_name, "Health"), &m_health, 0.f, 100.f); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeObjectBreakable::used_ai_locations() const { @@ -1972,7 +1972,7 @@ void CSE_ALifeObjectClimable::set_additional_info(void* info) LPCSTR material_name = (LPCSTR)info; material = material_name; } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeObjectClimable::used_ai_locations() const { @@ -2020,7 +2020,7 @@ void CSE_ALifeMountedWeapon::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS CSE_ALifeStationaryMgun::CSE_ALifeStationaryMgun(LPCSTR caSection) : CSE_ALifeDynamicObjectVisual(caSection) { @@ -2059,7 +2059,7 @@ void CSE_ALifeStationaryMgun::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeTeamBaseZone @@ -2101,7 +2101,7 @@ void CSE_ALifeTeamBaseZone::FillProps(LPCSTR pref, PropItemVec& items) inherited::FillProps(pref, items); PHelper().CreateU8(items, PrepareKey(pref, *s_name, "team"), &m_team, 0, 16); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeSmartZone @@ -2158,7 +2158,7 @@ void CSE_ALifeSmartZone::FillProps(LPCSTR pref, PropItemVec& items) { inherited1::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS void CSE_ALifeSmartZone::update() { @@ -2226,4 +2226,4 @@ void CSE_ALifeInventoryBox::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS diff --git a/src/xrServerEntities/xrServer_Objects_ALife.h b/src/xrServerEntities/xrServer_Objects_ALife.h index d71919beae5..980e78d2853 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife.h +++ b/src/xrServerEntities/xrServer_Objects_ALife.h @@ -14,7 +14,7 @@ #include "xrServer_Objects.h" #ifdef XRGAME_EXPORTS #include "alife_smart_terrain_task.h" -#endif //#ifdef XRGAME_EXPORTS +#endif //#ifdef XRGAME_EXPORTS #pragma warning(push) #pragma warning(disable : 4005) @@ -28,7 +28,7 @@ class CSE_ALifeDynamicObject; class CSE_ALifeObject; #ifdef XRGAME_EXPORTS class CALifeSmartTerrainTask; -#endif //#ifdef XRGAME_EXPORTS +#endif //#ifdef XRGAME_EXPORTS class CALifeMonsterAbstract; struct SFillPropData @@ -265,7 +265,7 @@ class CSE_ALifeGroupTemplate : public __A, public CSE_ALifeGroupAbstract inherited1::FillProps(pref, items); inherited2::FillProps(pref, items); }; -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS virtual CSE_Abstract* cast_abstract() { return (this); } virtual CSE_ALifeGroupAbstract* cast_group_abstract() { return (this); } @@ -452,7 +452,7 @@ class CSE_ALifeObjectPhysic : public CSE_ALifeDynamicObjectVisual, public CSE_PH private: u32 m_freeze_time; static const u32 m_freeze_delta_time; -#ifdef DEBUG // only for testing interpolation +#ifdef DEBUG // only for testing interpolation u32 m_last_update_time; static const u32 m_update_delta_time; #endif @@ -464,7 +464,7 @@ class CSE_ALifeObjectPhysic : public CSE_ALifeDynamicObjectVisual, public CSE_PH { inventory_item_state_enabled = u8(1) << 0, inventory_item_angular_null = u8(1) << 1, - inventory_item_linear_null = u8(1) << 2 //, + inventory_item_linear_null = u8(1) << 2 //, // animated = u8(1) << 3 }; union mask_num_items @@ -548,7 +548,7 @@ class CSE_ALifeObjectHangingLamp : public CSE_ALifeDynamicObjectVisual, public C #ifndef XRGAME_EXPORTS virtual void __stdcall on_render(CDUInterface* du, IServerEntityLEOwner* owner, bool bSelected, const Fmatrix& parent, int priority, bool strictB2F); -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS virtual CSE_Abstract* cast_abstract() { return this; } virtual void UPDATE_Read(NET_Packet& P); virtual void UPDATE_Write(NET_Packet& P); diff --git a/src/xrServerEntities/xrServer_Objects_ALife_Items.cpp b/src/xrServerEntities/xrServer_Objects_ALife_Items.cpp index 1c5ae70776a..4cf71b30396 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife_Items.cpp +++ b/src/xrServerEntities/xrServer_Objects_ALife_Items.cpp @@ -117,7 +117,7 @@ BOOL CSE_ALifeInventoryItem::Net_Relevant() #endif if (!prev_freezed) { - prev_freezed = true; // i.e. freezed + prev_freezed = true; // i.e. freezed return TRUE; } @@ -174,7 +174,7 @@ void CSE_ALifeInventoryItem::UPDATE_Write(NET_Packet& tNetPacket) tNetPacket.w_float(State.linear_vel.z); } } - tNetPacket.w_u8(1); // not freezed - doesn't mean anything... + tNetPacket.w_u8(1); // not freezed - doesn't mean anything... }; void CSE_ALifeInventoryItem::UPDATE_Read(NET_Packet& tNetPacket) @@ -206,7 +206,7 @@ void CSE_ALifeInventoryItem::UPDATE_Read(NET_Packet& tNetPacket) tNetPacket.r_vec3(State.torque); tNetPacket.r_vec3(State.position); - base()->o_Position.set(State.position); // this is very important because many functions use this o_Position.. + base()->o_Position.set(State.position); // this is very important because many functions use this o_Position.. tNetPacket.r_float(State.quaternion.x); tNetPacket.r_float(State.quaternion.y); @@ -237,7 +237,7 @@ void CSE_ALifeInventoryItem::UPDATE_Read(NET_Packet& tNetPacket) }*/ } prev_freezed = freezed; - if (tNetPacket.r_eof()) // in case spawn + update + if (tNetPacket.r_eof()) // in case spawn + update { freezed = false; return; @@ -268,7 +268,7 @@ void CSE_ALifeInventoryItem::FillProps(LPCSTR pref, PropItemVec& values) PHelper().CreateFlag32(values, PrepareKey(pref, *base()->s_name, "ALife\\Visible for AI"), &alife_object->m_flags, CSE_ALifeObject::flVisibleForAI); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeInventoryItem::bfUseful() { @@ -348,7 +348,7 @@ void CSE_ALifeItem::UPDATE_Write(NET_Packet& tNetPacket) #ifdef XRGAME_EXPORTS m_last_update_time = Device.dwTimeGlobal; -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS }; void CSE_ALifeItem::UPDATE_Read(NET_Packet& tNetPacket) @@ -365,7 +365,7 @@ void CSE_ALifeItem::FillProps(LPCSTR pref, PropItemVec& values) inherited1::FillProps(pref, values); inherited2::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS BOOL CSE_ALifeItem::Net_Relevant() { @@ -380,7 +380,7 @@ BOOL CSE_ALifeItem::Net_Relevant() #ifdef XRGAME_EXPORTS // if (Device.dwTimeGlobal < (m_last_update_time + update_rate())) // return (FALSE); -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS return (FALSE); } @@ -451,7 +451,7 @@ void CSE_ALifeItemTorch::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemWeapon @@ -626,7 +626,7 @@ void CSE_ALifeItemWeapon::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateFlag8( items, PrepareKey(pref, *s_name, "Addons\\Podstvolnik"), &m_addon_flags, eWeaponAddonGrenadeLauncher); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemWeaponShotGun @@ -675,7 +675,7 @@ void CSE_ALifeItemWeaponShotGun::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemWeaponAutoShotGun //////////////////////////////////////////////////////////////////////////// @@ -708,7 +708,7 @@ void CSE_ALifeItemWeaponAutoShotGun::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemWeaponMagazined //////////////////////////////////////////////////////////////////////////// @@ -747,7 +747,7 @@ void CSE_ALifeItemWeaponMagazined::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemWeaponMagazinedWGL @@ -786,7 +786,7 @@ void CSE_ALifeItemWeaponMagazinedWGL::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemAmmo @@ -834,7 +834,7 @@ void CSE_ALifeItemAmmo::FillProps(LPCSTR pref, PropItemVec& values) inherited::FillProps(pref, values); PHelper().CreateU16(values, PrepareKey(pref, *s_name, "Ammo: left"), &a_elapsed, 0, m_boxSize, m_boxSize); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeItemAmmo::can_switch_online() const { @@ -888,7 +888,7 @@ void CSE_ALifeItemDetector::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemDetector @@ -928,7 +928,7 @@ void CSE_ALifeItemArtefact::FillProps(LPCSTR pref, PropItemVec& items) inherited::FillProps(pref, items); PHelper().CreateFloat(items, PrepareKey(pref, *s_name, "Anomaly value:"), &m_fAnomalyValue, 0.f, 200.f); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS BOOL CSE_ALifeItemArtefact::Net_Relevant() { @@ -1003,7 +1003,7 @@ void CSE_ALifeItemPDA::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemDocument @@ -1053,7 +1053,7 @@ void CSE_ALifeItemDocument::FillProps(LPCSTR pref, PropItemVec& items) // PHelper().CreateU16 (items, PrepareKey(pref, *s_name, "Document index :"), &m_wDocIndex, 0, 65535); PHelper().CreateRText(items, PrepareKey(pref, *s_name, "Info portion :"), &m_wDoc); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemGrenade @@ -1098,7 +1098,7 @@ void CSE_ALifeItemGrenade::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemExplosive @@ -1136,7 +1136,7 @@ void CSE_ALifeItemExplosive::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemBolt @@ -1180,7 +1180,7 @@ void CSE_ALifeItemBolt::UPDATE_Read(NET_Packet& tNetPacket) bool CSE_ALifeItemBolt::can_save() const { - return (false); //! attached()); + return (false); //! attached()); } bool CSE_ALifeItemBolt::used_ai_locations() const { @@ -1192,7 +1192,7 @@ void CSE_ALifeItemBolt::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeItemCustomOutfit @@ -1238,7 +1238,7 @@ void CSE_ALifeItemCustomOutfit::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS BOOL CSE_ALifeItemCustomOutfit::Net_Relevant() { @@ -1283,7 +1283,7 @@ void CSE_ALifeItemHelmet::FillProps(LPCSTR pref, PropItemVec& items) { inherited::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS BOOL CSE_ALifeItemHelmet::Net_Relevant() { diff --git a/src/xrServerEntities/xrServer_Objects_ALife_Items.h b/src/xrServerEntities/xrServer_Objects_ALife_Items.h index f7870ba9e6d..e14678b205a 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife_Items.h +++ b/src/xrServerEntities/xrServer_Objects_ALife_Items.h @@ -195,9 +195,9 @@ class CSE_ALifeItemWeapon : public CSE_ALifeItem void unpack_from_byte(u8 const b) { grenades_type = (b >> 6); - grenades_count = b & 0x3f; // 111111 + grenades_count = b & 0x3f; // 111111 } - }; // struct grenade_count_t + }; // struct grenade_count_t grenade_count_t a_elapsed_grenades; float m_fHitPower; diff --git a/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp b/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp index d1f28ee1815..6aca6a16990 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp +++ b/src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp @@ -594,7 +594,7 @@ void CSE_ALifeTrader::FillProps(LPCSTR _pref, PropItemVec& items) inherited1::FillProps(_pref, items); inherited2::FillProps(_pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeCustomZone @@ -674,7 +674,7 @@ void CSE_ALifeCustomZone::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateU32( items, PrepareKey(pref, *s_name, "on/off mode\\Disabled time (sec)"), &m_disabled_time, 0, 100000); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeAnomalousZone @@ -759,7 +759,7 @@ void CSE_ALifeAnomalousZone::STATE_Read(NET_Packet& tNetPacket, u16 size) tNetPacket.r_float(); tNetPacket.r_float(); } - if ((m_wVersion == 102)) { // fuck + if ((m_wVersion == 102)) { // fuck u32 dummy; tNetPacket.r_u32(dummy); } @@ -793,7 +793,7 @@ void CSE_ALifeAnomalousZone::FillProps(LPCSTR pref, PropItemVec& items) items, PrepareKey(pref, *s_name, "ALife\\Artefact spawn places count"), &m_artefact_spawn_count, 32, 256); PHelper().CreateFlag32(items, PrepareKey(pref, *s_name, "ALife\\Visible for AI"), &m_flags, flVisibleForAI); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// // SE_ALifeTorridZone @@ -840,7 +840,7 @@ void CSE_ALifeTorridZone::FillProps(LPCSTR pref, PropItemVec& values) inherited1::FillProps(pref, values); inherited2::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// // CSE_ALifeZoneVisual @@ -896,7 +896,7 @@ void CSE_ALifeZoneVisual::FillProps(LPCSTR pref, PropItemVec& values) PHelper().CreateChoose(values, PrepareKey(pref, abstract->name(), "Attack animation"), &attack_animation, smSkeletonAnims, 0, (void*)*visual_name); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////// // CSE_ALifeCreatureAbstract @@ -955,7 +955,7 @@ void CSE_ALifeCreatureAbstract::on_death(CSE_Abstract* killer) m_game_death_time = ai().get_alife() ? alife().time_manager().game_time() : Level().GetGameTime(); fHealth = -1.f; } -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS void CSE_ALifeCreatureAbstract::STATE_Write(NET_Packet& tNetPacket) { @@ -1057,7 +1057,7 @@ void CSE_ALifeCreatureAbstract::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateU8(items, PrepareKey(pref, *s_name, "Group"), &s_group, 0, 64, 1); PHelper().CreateFloat(items, PrepareKey(pref, *s_name, "Personal", "Health"), &fHealth, 0, 2, 5); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeCreatureAbstract::used_ai_locations() const { @@ -1150,7 +1150,7 @@ CSE_ALifeMonsterAbstract::CSE_ALifeMonsterAbstract(LPCSTR caSection) #ifdef XRGAME_EXPORTS m_stay_after_death_time_interval = generate_time(1, 1, 1, pSettings->r_u32("monsters_common", "stay_after_death_time_interval"), 0, 0); -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS } CSE_ALifeMonsterAbstract::~CSE_ALifeMonsterAbstract() @@ -1271,7 +1271,7 @@ void CSE_ALifeMonsterAbstract::FillProps(LPCSTR pref, PropItemVec& items) smSpawnItem, 0, (void*)gcs, 16); } } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeMonsterAbstract::need_update(CSE_ALifeDynamicObject* object) { @@ -1295,7 +1295,7 @@ bool CSE_ALifeMonsterAbstract::has_detector() return false; } -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_ALifeCreatureActor @@ -1384,7 +1384,7 @@ void CSE_ALifeCreatureActor::load(NET_Packet& tNetPacket) BOOL CSE_ALifeCreatureActor::Net_Relevant() { - return TRUE; // this is a big question ;) + return TRUE; // this is a big question ;) } void CSE_ALifeCreatureActor::UPDATE_Read(NET_Packet& tNetPacket) @@ -1472,7 +1472,7 @@ void CSE_ALifeCreatureActor::FillProps(LPCSTR pref, PropItemVec& items) inherited1::FillProps(pref, items); inherited2::FillProps(pref, items); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS #ifdef XRGAME_EXPORTS void CSE_ALifeCreatureActor::spawn_supplies() @@ -1525,7 +1525,7 @@ void CSE_ALifeCreatureCrow::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeCreatureCrow::used_ai_locations() const { @@ -1572,7 +1572,7 @@ void CSE_ALifeCreaturePhantom::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeCreaturePhantom::used_ai_locations() const { @@ -1590,7 +1590,7 @@ CSE_ALifeMonsterRat::CSE_ALifeMonsterRat(LPCSTR caSection) // personal charactersitics fEyeFov = 120; fEyeRange = 10; - set_health(5); // fHealth = 5; + set_health(5); // fHealth = 5; fMinSpeed = .5; fMaxSpeed = 1.5; fAttackSpeed = 4.0; @@ -1739,7 +1739,7 @@ void CSE_ALifeMonsterRat::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateFloat( items, PrepareKey(pref, *s_name, "Attack", "Success probability"), &fAttackSuccessProbability, 0, 100, 1); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS bool CSE_ALifeMonsterRat::bfUseful() { @@ -1756,7 +1756,7 @@ CSE_ALifeMonsterZombie::CSE_ALifeMonsterZombie(LPCSTR caSection) : CSE_ALifeMons // personal charactersitics fEyeFov = 120; fEyeRange = 30; - set_health(200); // fHealth = 200; + set_health(200); // fHealth = 200; fMinSpeed = 1.5; fMaxSpeed = 1.75; fAttackSpeed = 2.0; @@ -1842,7 +1842,7 @@ void CSE_ALifeMonsterZombie::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateFloat(items, PrepareKey(pref, *s_name, "Attack", "Distance"), &fAttackDistance, 0, 300, 10); PHelper().CreateFloat(items, PrepareKey(pref, *s_name, "Attack", "Maximum angle"), &fAttackAngle, 0, 100, 1); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// // CSE_ALifeMonsterBase @@ -1898,7 +1898,7 @@ void CSE_ALifeMonsterBase::FillProps(LPCSTR pref, PropItemVec& values) inherited1::FillProps(pref, values); inherited2::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// // CSE_ALifePsyDogPhantom @@ -1936,7 +1936,7 @@ void CSE_ALifePsyDogPhantom::FillProps(LPCSTR pref, PropItemVec& values) { inherited::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// // CSE_ALifeHumanAbstract @@ -2014,7 +2014,7 @@ void CSE_ALifeHumanAbstract::FillProps(LPCSTR pref, PropItemVec& items) inherited2::FillProps(pref, items); PHelper().CreateFlag32(items, PrepareKey(pref, *s_name, "Group behaviour"), &m_flags, flGroupBehaviour); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// // CSE_ALifeHumanStalker @@ -2071,7 +2071,7 @@ void CSE_ALifeHumanStalker::FillProps(LPCSTR pref, PropItemVec& values) inherited1::FillProps(pref, values); inherited2::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS ////////////////////////////////////////////////////////////////////////// // CSE_ALifeOnlineOfflineGroup @@ -2121,9 +2121,9 @@ CALifeSmartTerrainTask* CSE_ALifeOnlineOfflineGroup::get_current_task() NODEFAULT; #ifdef DEBUG return 0; -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG } -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS void CSE_ALifeOnlineOfflineGroup::STATE_Write(NET_Packet& tNetPacket) { @@ -2170,4 +2170,4 @@ void CSE_ALifeOnlineOfflineGroup::FillProps(LPCSTR pref, PropItemVec& values) { inherited1::FillProps(pref, values); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS diff --git a/src/xrServerEntities/xrServer_Objects_ALife_Monsters.h b/src/xrServerEntities/xrServer_Objects_ALife_Monsters.h index f92838893d1..a243a156891 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife_Monsters.h +++ b/src/xrServerEntities/xrServer_Objects_ALife_Monsters.h @@ -86,7 +86,7 @@ class CSE_ALifeTraderAbstract #ifdef XRGAME_EXPORTS virtual void add_online(const bool& update_registries); virtual void add_offline(const xr_vector& saved_children, const bool& update_registries); -#if 0 // def DEBUG +#if 0 // def DEBUG bool check_inventory_consistency (); #endif void vfInitInventory(); @@ -239,10 +239,10 @@ class CSE_ALifeCreatureAbstract : public CSE_ALifeDynamicObjectVisual float m_fAccuracy; float m_fIntelligence; - u32 timestamp; // server(game) timestamp + u32 timestamp; // server(game) timestamp u8 flags; - float o_model; // model yaw - SRotation o_torso; // torso in world coords + float o_model; // model yaw + SRotation o_torso; // torso in world coords bool m_bDeathIsProcessed; xr_vector m_dynamic_out_restrictions; @@ -344,7 +344,7 @@ class CSE_ALifeMonsterAbstract : public CSE_ALifeCreatureAbstract, #ifdef XRGAME_EXPORTS void kill(); bool has_detector(); -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS #ifndef XRGAME_EXPORTS virtual void update(){}; @@ -493,7 +493,7 @@ class CSE_ALifeMonsterRat : public CSE_ALifeMonsterAbstract, public CSE_ALifeInv float fAttackAngle; float fAttackSuccessProbability; - CSE_ALifeMonsterRat(LPCSTR caSection); // constructor for variable initialization + CSE_ALifeMonsterRat(LPCSTR caSection); // constructor for variable initialization virtual ~CSE_ALifeMonsterRat(); virtual bool bfUseful(); virtual CSE_Abstract* init(); @@ -527,7 +527,7 @@ class CSE_ALifeMonsterZombie : public CSE_ALifeMonsterAbstract float fAttackDistance; float fAttackAngle; - CSE_ALifeMonsterZombie(LPCSTR caSection); // constructor for variable initialization + CSE_ALifeMonsterZombie(LPCSTR caSection); // constructor for variable initialization virtual ~CSE_ALifeMonsterZombie(); virtual void UPDATE_Read(NET_Packet& P); virtual void UPDATE_Write(NET_Packet& P); @@ -544,7 +544,7 @@ class CSE_ALifeMonsterBase : public CSE_ALifeMonsterAbstract, public CSE_PHSkele public: u16 m_spec_object_id; - CSE_ALifeMonsterBase(LPCSTR caSection); // constructor for variable initialization + CSE_ALifeMonsterBase(LPCSTR caSection); // constructor for variable initialization virtual ~CSE_ALifeMonsterBase(); virtual void load(NET_Packet& tNetPacket); virtual CSE_Abstract* cast_abstract() { return this; } @@ -554,7 +554,7 @@ class CSE_ALifeMonsterBase : public CSE_ALifeMonsterAbstract, public CSE_PHSkele virtual void on_spawn(); virtual void add_online(const bool& update_registries); virtual void add_offline(const xr_vector& saved_children, const bool& update_registries); -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS virtual void UPDATE_Read(NET_Packet& P); virtual void UPDATE_Write(NET_Packet& P); virtual void STATE_Read(NET_Packet& P, u16 size); @@ -567,7 +567,7 @@ class CSE_ALifePsyDogPhantom : public CSE_ALifeMonsterBase using inherited = CSE_ALifeMonsterBase; public: - CSE_ALifePsyDogPhantom(LPCSTR caSection); // constructor for variable initialization + CSE_ALifePsyDogPhantom(LPCSTR caSection); // constructor for variable initialization virtual ~CSE_ALifePsyDogPhantom(); virtual CSE_Abstract* cast_abstract() { return this; } virtual bool bfActive() { return false; } @@ -668,7 +668,7 @@ class CSE_ALifeOnlineOfflineGroup : public CSE_ALifeDynamicObject, virtual CSE_ALifeOnlineOfflineGroup* cast_online_offline_group() { return this; }; #ifdef XRGAME_EXPORTS virtual CALifeSmartTerrainTask* get_current_task(); -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS public: typedef CSE_ALifeMonsterAbstract MEMBER; diff --git a/src/xrServerEntities/xrServer_Objects_ALife_Monsters_script4.cpp b/src/xrServerEntities/xrServer_Objects_ALife_Monsters_script4.cpp index eebb6fb9459..482172b085d 100644 --- a/src/xrServerEntities/xrServer_Objects_ALife_Monsters_script4.cpp +++ b/src/xrServerEntities/xrServer_Objects_ALife_Monsters_script4.cpp @@ -12,7 +12,7 @@ #include "xrServer_script_macroses.h" #ifdef XRGAME_EXPORTS #include "relation_registry.h" -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS #include "xrScriptEngine/ScriptExporter.hpp" using namespace luabind; @@ -77,7 +77,7 @@ void ForceSetGoodwill(CSE_ALifeMonsterAbstract* self, int goodwill, ALife::_OBJE { RELATION_REGISTRY().ForceSetGoodwill(self->ID, pWhoToSet, goodwill); } -#endif // #ifdef XRGAME_EXPORTS +#endif // #ifdef XRGAME_EXPORTS static void CSE_ALifeMonsterAbstract_Export(lua_State* luaState) { diff --git a/src/xrServerEntities/xrServer_Objects_Abstract.cpp b/src/xrServerEntities/xrServer_Objects_Abstract.cpp index c70d9deebf1..b3bbf72b050 100644 --- a/src/xrServerEntities/xrServer_Objects_Abstract.cpp +++ b/src/xrServerEntities/xrServer_Objects_Abstract.cpp @@ -84,7 +84,7 @@ void CSE_Visual::FillProps(LPCSTR pref, PropItemVec& items) V->OnChangeEvent.bind(this, &CSE_Visual::OnChangeAnim); PHelper().CreateFlag8(items, PrepareKey(pref, abstract->name(), "Model\\Obstacle"), &flags, flObstacle); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS //////////////////////////////////////////////////////////////////////////// // CSE_Animated @@ -129,6 +129,6 @@ void CSE_Motion::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateChoose(items, PrepareKey(pref, abstract->name(), "Motion"), &motion_name, smGameAnim); V->OnChangeEvent.bind(this, &CSE_Motion::OnChangeMotion); } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS #pragma pack(pop, 4) diff --git a/src/xrServerEntities/xrServer_Objects_Abstract.h b/src/xrServerEntities/xrServer_Objects_Abstract.h index 54e25e208dd..aacd5785d32 100644 --- a/src/xrServerEntities/xrServer_Objects_Abstract.h +++ b/src/xrServerEntities/xrServer_Objects_Abstract.h @@ -66,7 +66,7 @@ class CSE_Visual LPCSTR get_visual() const { return *visual_name; }; #ifndef XRGAME_EXPORTS virtual void FillProps(LPCSTR pref, PropItemVec& items); -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS virtual CSE_Visual* __stdcall visual() = 0; }; @@ -90,7 +90,7 @@ class CSE_Motion LPCSTR get_motion() const { return *motion_name; }; #ifndef XRGAME_EXPORTS virtual void FillProps(LPCSTR pref, PropItemVec& items); -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS virtual CSE_Motion* __stdcall motion() = 0; }; @@ -141,7 +141,7 @@ class IServerEntity virtual visual_data* __stdcall visual_collection() const = 0; virtual u32 __stdcall visual_collection_size() const = 0; virtual void __stdcall set_additional_info(void* info) = 0; -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS virtual LPCSTR __stdcall name() const = 0; virtual void __stdcall set_name(LPCSTR) = 0; virtual LPCSTR __stdcall name_replace() const = 0; @@ -162,4 +162,4 @@ IC IServerEntity::~IServerEntity() #pragma warning(pop) #pragma pack(pop) -#endif // xrServer_Objects_AbstractH +#endif // xrServer_Objects_AbstractH diff --git a/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.cpp b/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.cpp index 6373ffa8d2e..1263baf660f 100644 --- a/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.cpp +++ b/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.cpp @@ -24,7 +24,7 @@ #pragma comment(lib, "shlwapi.lib") static SFillPropData fp_data; -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS #ifdef XRSE_FACTORY_EXPORTS bool parse_bool(luabind::object const& table, LPCSTR identifier) @@ -61,13 +61,13 @@ BOOL is_combat_cover(shared_str const& table_id) return (parse_bool(table, "is_combat_cover") ? TRUE : FALSE); } -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS CSE_SmartCover::CSE_SmartCover(LPCSTR section) : CSE_ALifeDynamicObject(section) { #ifdef XRSE_FACTORY_EXPORTS fp_data.inc(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS m_enter_min_enemy_distance = pSettings->r_float(section, "enter_min_enemy_distance"); m_exit_min_enemy_distance = pSettings->r_float(section, "exit_min_enemy_distance"); @@ -80,7 +80,7 @@ CSE_SmartCover::~CSE_SmartCover() { #ifdef XRSE_FACTORY_EXPORTS fp_data.dec(); -#endif // XRSE_FACTORY_EXPORTS +#endif // XRSE_FACTORY_EXPORTS } IServerEntityShape* CSE_SmartCover::shape() @@ -123,7 +123,7 @@ void CSE_SmartCover::set_available_loopholes(luabind::object table) { m_available_loopholes = table; } -#endif // #ifndef AI_COMPILER +#endif // #ifndef AI_COMPILER void CSE_SmartCover::STATE_Read(NET_Packet& tNetPacket, u16 size) { @@ -180,9 +180,9 @@ void CSE_SmartCover::FillProps(LPCSTR pref, PropItemVec& items) PHelper().CreateBOOL(items, PrepareKey(pref, *s_name, "is combat cover"), &m_is_combat_cover); PHelper().CreateBOOL(items, PrepareKey(pref, *s_name, "can fire"), &m_can_fire); } -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS } -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS #ifdef XRSE_FACTORY_EXPORTS void CSE_SmartCover::set_loopholes_table_checker(BOOLValue* value) @@ -258,7 +258,7 @@ shared_str parse_vertex(luabind::object const& table, LPCSTR identifier, bool co { return (transform_vertex(parse_string(table, identifier), in)); } -} // namespace smart_cover +} // namespace smart_cover void CSE_SmartCover::set_enterable(shared_str const& id) { @@ -310,7 +310,7 @@ class CSE_SmartVisual : public CSE_Visual { public: virtual CSE_Visual* __stdcall visual() { return (this); } -}; // class CSE_SmartVisual +}; // class CSE_SmartVisual void CSE_SmartCover::fill_visuals() { @@ -363,7 +363,7 @@ void draw_frustum(CDUInterface* du, float FOV, float _FAR, float A, Fvector& P, COP.set(P); // calculate the corner vertices of the window - Fvector sPts[4]; // silhouette points (corners of window) + Fvector sPts[4]; // silhouette points (corners of window) Fvector Offset, T; Offset.add(D, COP); @@ -556,4 +556,4 @@ void CSE_SmartCover::on_render( draw_frustum(du, H.fov, H.range, 1.f, pos, dir, up, color_rgba(255, 0, 0, 255)); } } -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS diff --git a/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.h b/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.h index 7a89c9acf63..64cc9c84aa4 100644 --- a/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.h +++ b/src/xrServerEntities/xrServer_Objects_Alife_Smartcovers.h @@ -43,7 +43,7 @@ class CSE_SmartCover : public CSE_ALifeDynamicObject, public CSE_Shape bool m_need_to_reparse_loopholes; #ifndef AI_COMPILER luabind::object m_available_loopholes; -#endif // #ifndef AI_COMPILER +#endif // #ifndef AI_COMPILER #ifdef XRSE_FACTORY_EXPORTS private: @@ -57,7 +57,7 @@ class CSE_SmartCover : public CSE_ALifeDynamicObject, public CSE_Shape private: mutable visuals_collection m_visuals; -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS public: CSE_SmartCover(LPCSTR caSection); @@ -71,13 +71,13 @@ class CSE_SmartCover : public CSE_ALifeDynamicObject, public CSE_Shape LPCSTR description() const; #ifndef AI_COMPILER void set_available_loopholes(luabind::object table); -#endif // #ifndef AI_COMPILER +#endif // #ifndef AI_COMPILER #ifdef XRSE_FACTORY_EXPORTS virtual void __stdcall on_render(CDUInterface* du, IServerEntityLEOwner* owner, bool bSelected, const Fmatrix& parent, int priority, bool strictB2F); virtual visual_data* __stdcall visual_collection() const { return &*m_visuals.begin(); } virtual u32 __stdcall visual_collection_size() const { return m_visuals.size(); } -#endif // #ifdef XRSE_FACTORY_EXPORTS +#endif // #ifdef XRSE_FACTORY_EXPORTS private: void check_enterable_loopholes(shared_str const& description); diff --git a/src/xrServerEntities/xrServer_Space.h b/src/xrServerEntities/xrServer_Space.h index a4121a6f505..b5982fff7b4 100644 --- a/src/xrServerEntities/xrServer_Space.h +++ b/src/xrServerEntities/xrServer_Space.h @@ -11,9 +11,9 @@ #ifndef XRGAME_EXPORTS #define SERVER_ENTITY_EDITOR_METHODS virtual void FillProps(LPCSTR pref, PropItemVec& values); -#else // #ifdef XRGAME_EXPORTS +#else // #ifdef XRGAME_EXPORTS #define SERVER_ENTITY_EDITOR_METHODS -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS // XXX: move to core/math struct SRotation { diff --git a/src/xrServerEntities/xrServer_script_macroses.h b/src/xrServerEntities/xrServer_script_macroses.h index 0d1c9826270..4bf6c111eea 100644 --- a/src/xrServerEntities/xrServer_script_macroses.h +++ b/src/xrServerEntities/xrServer_script_macroses.h @@ -15,7 +15,7 @@ #include "xrScriptEngine/script_engine.hpp" #ifdef XRGAME_EXPORTS #include "alife_smart_terrain_task.h" -#endif //#ifdef XRGAME_EXPORTS +#endif //#ifdef XRGAME_EXPORTS //#define USE_WRITER_READER class CSE_Abstract; @@ -23,7 +23,7 @@ class NET_Packet; class CSE_ALifeMonsterAbstract; #ifdef XRGAME_EXPORTS class CALifeSmartTerrainTask; -#endif //#ifdef XRGAME_EXPORTS +#endif //#ifdef XRGAME_EXPORTS #define INHERIT_PURE @@ -46,13 +46,13 @@ class CALifeSmartTerrainTask; DEFINE_LUA_WRAPPER_METHOD_R2P1_V2(STATE_Read, NET_Packet, u16) \ DEFINE_LUA_WRAPPER_METHOD_R2P2_V2(FillProps, LPCSTR, PropItemVec) \ DEFINE_LUA_WRAPPER_METHOD_0(init, CSE_Abstract*) -#else // #ifndef XRGAME_EXPORTS +#else // #ifndef XRGAME_EXPORTS #define INHERIT_ABSTRACT \ INHERIT_PURE \ DEFINE_LUA_WRAPPER_METHOD_R2P1_V1(STATE_Write, NET_Packet) \ DEFINE_LUA_WRAPPER_METHOD_R2P1_V2(STATE_Read, NET_Packet, u16) \ DEFINE_LUA_WRAPPER_METHOD_0(init, CSE_Abstract*) -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS #define INHERIT_ALIFE \ INHERIT_ABSTRACT \ @@ -111,13 +111,13 @@ class CALifeSmartTerrainTask; DEFINE_LUA_WRAPPER_METHOD_0(g_squad, u8) \ DEFINE_LUA_WRAPPER_METHOD_0(g_group, u8) \ DEFINE_LUA_WRAPPER_METHOD_V1(on_death, CSE_Abstract*) -#else // XRGAME_EXPORTS +#else // XRGAME_EXPORTS #define INHERIT_CREATURE \ INHERIT_DYNAMIC_ALIFE \ DEFINE_LUA_WRAPPER_METHOD_0(g_team, u8) \ DEFINE_LUA_WRAPPER_METHOD_0(g_squad, u8) \ DEFINE_LUA_WRAPPER_METHOD_0(g_group, u8) -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS #define INHERIT_MONSTER \ INHERIT_CREATURE \ @@ -231,12 +231,12 @@ struct CWrapperAbstractItem : public T, public luabind::wrap_base DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, STATE_Write) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, STATE_Read) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, init) -#else // #ifndef XRGAME_EXPORTS +#else // #ifndef XRGAME_EXPORTS #define luabind_virtual_abstract(a, b) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, STATE_Write) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, STATE_Read) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, init) -#endif // #ifndef XRGAME_EXPORTS +#endif // #ifndef XRGAME_EXPORTS #define luabind_virtual_alife(a, b) \ DEFINE_LUABIND_VIRTUAL_FUNCTION_EXPLICIT_CONST_0(a, b, can_switch_online, bool) \ @@ -264,12 +264,12 @@ struct CWrapperAbstractItem : public T, public luabind::wrap_base DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, g_squad) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, g_group) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, on_death) -#else // XRGAME_EXPORTS +#else // XRGAME_EXPORTS #define luabind_virtual_creature(a, b) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, g_team) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, g_squad) \ DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, g_group) -#endif // XRGAME_EXPORTS +#endif // XRGAME_EXPORTS #ifdef XRGAME_EXPORTS #define luabind_virtual_zone(a, b) \ @@ -293,7 +293,7 @@ struct CWrapperAbstractItem : public T, public luabind::wrap_base DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, get_current_task) #else #define luabind_virtual_online_offline_group(a, b) DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, update) -#endif //#ifdef XRGAME_EXPORTS +#endif //#ifdef XRGAME_EXPORTS #define luabind_virtual_monster(a, b) DEFINE_LUABIND_VIRTUAL_FUNCTION(a, b, update) diff --git a/src/xrSound/MusicStream.h b/src/xrSound/MusicStream.h index 50fe4fe1389..b0bfe307697 100644 --- a/src/xrSound/MusicStream.h +++ b/src/xrSound/MusicStream.h @@ -27,4 +27,4 @@ class CMusicStream void Update(); }; -#endif // !defined(AFX_MUSICSTREAM_H__7DAD65D5_8E32_4262_89C8_67A135405BAF__INCLUDED_) +#endif // !defined(AFX_MUSICSTREAM_H__7DAD65D5_8E32_4262_89C8_67A135405BAF__INCLUDED_) diff --git a/src/xrSound/OpenALDeviceList.cpp b/src/xrSound/OpenALDeviceList.cpp index 78e33a0ab1e..3925af83574 100644 --- a/src/xrSound/OpenALDeviceList.cpp +++ b/src/xrSound/OpenALDeviceList.cpp @@ -200,7 +200,7 @@ void ALDeviceList::SelectBestDevice() } if (new_device_id == u32(-1)) { R_ASSERT(GetNumDevices() != 0); - new_device_id = 0; // first + new_device_id = 0; // first }; snd_device_id = new_device_id; } diff --git a/src/xrSound/OpenALDeviceList.h b/src/xrSound/OpenALDeviceList.h index 28e0af33cc5..13cb4cd60e5 100644 --- a/src/xrSound/OpenALDeviceList.h +++ b/src/xrSound/OpenALDeviceList.h @@ -55,4 +55,4 @@ class ALDeviceList void SelectBestDevice(); }; -#endif // ALDEVICELIST_H +#endif // ALDEVICELIST_H diff --git a/src/xrSound/Sound.h b/src/xrSound/Sound.h index 5d759ec915b..a7d2d80c0a3 100644 --- a/src/xrSound/Sound.h +++ b/src/xrSound/Sound.h @@ -45,8 +45,8 @@ XRSOUND_API extern u32 snd_device_id; // Flags enum { - ss_Hardware = (1ul << 1ul), //!< Use hardware mixing only - ss_EAX = (1ul << 2ul), //!< Use eax + ss_Hardware = (1ul << 1ul), //!< Use hardware mixing only + ss_EAX = (1ul << 2ul), //!< Use eax ss_forcedword = u32(-1) }; @@ -66,8 +66,8 @@ enum }; enum { - sm_Looped = (1ul << 0ul), //!< Looped - sm_2D = (1ul << 1ul), //!< 2D mode + sm_Looped = (1ul << 0ul), //!< Looped + sm_2D = (1ul << 1ul), //!< 2D mode sm_forcedword = u32(-1), }; enum esound_type @@ -92,11 +92,11 @@ class ref_sound_data : public xr_resource { public: // shared_str nm; - CSound_source* handle; //!< Pointer to wave-source interface - CSound_emitter* feedback; //!< Pointer to emitter, automaticaly clears on emitter-stop + CSound_source* handle; //!< Pointer to wave-source interface + CSound_emitter* feedback; //!< Pointer to emitter, automaticaly clears on emitter-stop esound_type s_type; - int g_type; //!< Sound type, usually for AI - IGameObject* g_object; //!< Game object that emitts ref_sound + int g_type; //!< Sound type, usually for AI + IGameObject* g_object; //!< Game object that emitts ref_sound CSound_UserDataPtr g_userdata; shared_str fn_attached[2]; diff --git a/src/xrSound/SoundRender.h b/src/xrSound/SoundRender.h index 63981ba864e..fcbfc089c72 100644 --- a/src/xrSound/SoundRender.h +++ b/src/xrSound/SoundRender.h @@ -12,12 +12,12 @@ class CSoundRender_Target; class CSoundRender_Environment; class SoundEnvironment_LIB; -const u32 sdef_target_count = 3; // -const u32 sdef_target_block = 400; // ms -const u32 sdef_target_size = sdef_target_count * sdef_target_block; // ms -const float s_f_def_source_footer = 0.0f; // sec of silence after buffer data, just for rendering -const u32 sdef_env_version = 4; // current version of env-def -const u32 sdef_level_version = 1; // current version of level-def -const float s_f_def_event_pulse = 0.5f; // sec +const u32 sdef_target_count = 3; // +const u32 sdef_target_block = 400; // ms +const u32 sdef_target_size = sdef_target_count * sdef_target_block; // ms +const float s_f_def_source_footer = 0.0f; // sec of silence after buffer data, just for rendering +const u32 sdef_env_version = 4; // current version of env-def +const u32 sdef_level_version = 1; // current version of level-def +const float s_f_def_event_pulse = 0.5f; // sec #endif \ No newline at end of file diff --git a/src/xrSound/SoundRender_Cache.cpp b/src/xrSound/SoundRender_Cache.cpp index c499708811f..ab51c198c64 100644 --- a/src/xrSound/SoundRender_Cache.cpp +++ b/src/xrSound/SoundRender_Cache.cpp @@ -21,7 +21,7 @@ CSoundRender_Cache::~CSoundRender_Cache() void CSoundRender_Cache::move2top(cache_line* line) { VERIFY(line); - if (line == c_begin) return; // already at top + if (line == c_begin) return; // already at top // track end if (line == c_end) c_end = c_end->prev; @@ -128,8 +128,8 @@ void CSoundRender_Cache::format() void CSoundRender_Cache::purge() { - disconnect(); // disconnect from CATs - format(); // format + disconnect(); // disconnect from CATs + format(); // format } void CSoundRender_Cache::destroy() diff --git a/src/xrSound/SoundRender_Cache.h b/src/xrSound/SoundRender_Cache.h index 2b0557877b8..0d9ab6a9cf4 100644 --- a/src/xrSound/SoundRender_Cache.h +++ b/src/xrSound/SoundRender_Cache.h @@ -16,48 +16,48 @@ struct cache_line; struct cache_ptr; ////////////////////////////////////////////////////////////////////////// -struct cache_line // internal, LRU queue +struct cache_line // internal, LRU queue { cache_line* prev; cache_line* next; - void* data; // pre-formatted - u16* loopback; // dual-connectivity - u16 id; // need this for dual-connectivity + void* data; // pre-formatted + u16* loopback; // dual-connectivity + u16 id; // need this for dual-connectivity }; ////////////////////////////////////////////////////////////////////////// -struct cache_cat // cache allocation table +struct cache_cat // cache allocation table { - u16* table; // page-table - u32 size; // in pages + u16* table; // page-table + u32 size; // in pages }; #define CAT_FREE 0xffff ////////////////////////////////////////////////////////////////////////// class CSoundRender_Cache { - u8* data; // just memory - cache_line* c_storage; // just memory - cache_line* c_begin; // >>> - cache_line* c_end; // <<< - u32 _total; // bytes total (heap) - u32 _line; // line size (bytes) - u32 _count; // number of lines + u8* data; // just memory + cache_line* c_storage; // just memory + cache_line* c_begin; // >>> + cache_line* c_end; // <<< + u32 _total; // bytes total (heap) + u32 _line; // line size (bytes) + u32 _count; // number of lines public: u32 _stat_hit; u32 _stat_miss; private: - void move2top(cache_line* line); // move one line to TOP-priority - void disconnect(); // disconnect from CATs - void format(); // format structure (like filesystem) + void move2top(cache_line* line); // move one line to TOP-priority + void disconnect(); // disconnect from CATs + void format(); // format structure (like filesystem) public: - BOOL request(cache_cat& cat, u32 id); // TRUE=need to fill, FALSE=cached info avail - void purge(); // discard all contents of cache + BOOL request(cache_cat& cat, u32 id); // TRUE=need to fill, FALSE=cached info avail + void purge(); // discard all contents of cache void* get_dataptr(cache_cat& cat, u32 id) { id %= cat.size; return c_storage[cat.table[id]].data; - } //. + } //. u32 get_linesize() { return _line; } void cat_create(cache_cat& cat, u32 bytes); void cat_destroy(cache_cat& cat); diff --git a/src/xrSound/SoundRender_Core.cpp b/src/xrSound/SoundRender_Core.cpp index b1f423d1ff0..b00b265af57 100644 --- a/src/xrSound/SoundRender_Core.cpp +++ b/src/xrSound/SoundRender_Core.cpp @@ -246,8 +246,8 @@ void CSoundRender_Core::set_geometry_env(IReader* I) for (u32 it = 0; it < H.facecount; it++) { CDB::TRI* T = tris + it; - u16 id_front = (u16)((T->dummy & 0x0000ffff) >> 0); // front face - u16 id_back = (u16)((T->dummy & 0xffff0000) >> 16); // back face + u16 id_front = (u16)((T->dummy & 0x0000ffff) >> 0); // front face + u16 id_back = (u16)((T->dummy & 0xffff0000) >> 16); // back face R_ASSERT(id_front < (u16)ids.size()); R_ASSERT(id_back < (u16)ids.size()); T->dummy = u32(ids[id_back] << 16) | u32(ids[id_front]); @@ -279,7 +279,7 @@ void CSoundRender_Core::attach_tail(ref_sound& S, const char* fName) if (S._p->fn_attached[0].size() && S._p->fn_attached[1].size()) { #ifdef DEBUG Msg("! 2 file already in queue [%s][%s]", S._p->fn_attached[0].c_str(), S._p->fn_attached[1].c_str()); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG return; } @@ -421,12 +421,12 @@ CSoundRender_Environment* CSoundRender_Core::get_environment(const Fvector& P) tri_norm.mknormal(V[T->verts[0]], V[T->verts[1]], V[T->verts[2]]); float dot = dir.dotproduct(tri_norm); if (dot < 0) { - u16 id_front = (u16)((T->dummy & 0x0000ffff) >> 0); // front face + u16 id_front = (u16)((T->dummy & 0x0000ffff) >> 0); // front face return s_environment->Get(id_front); } else { - u16 id_back = (u16)((T->dummy & 0xffff0000) >> 16); // back face + u16 id_back = (u16)((T->dummy & 0xffff0000) >> 16); // back face return s_environment->Get(id_back); } } @@ -468,20 +468,20 @@ void CSoundRender_Core::i_eax_listener_set(CSound_environment* _E) VERIFY(bEAX); CSoundRender_Environment* E = static_cast(_E); EAXLISTENERPROPERTIES ep; - ep.lRoom = iFloor(E->Room); // room effect level at low frequencies - ep.lRoomHF = iFloor(E->RoomHF); // room effect high-frequency level re. low frequency level - ep.flRoomRolloffFactor = E->RoomRolloffFactor; // like DS3D flRolloffFactor but for room effect - ep.flDecayTime = E->DecayTime; // reverberation decay time at low frequencies - ep.flDecayHFRatio = E->DecayHFRatio; // high-frequency to low-frequency decay time ratio - ep.lReflections = iFloor(E->Reflections); // early reflections level relative to room effect - ep.flReflectionsDelay = E->ReflectionsDelay; // initial reflection delay time - ep.lReverb = iFloor(E->Reverb); // late reverberation level relative to room effect - ep.flReverbDelay = E->ReverbDelay; // late reverberation delay time relative to initial reflection - ep.dwEnvironment = EAXLISTENER_DEFAULTENVIRONMENT; // sets all listener properties - ep.flEnvironmentSize = E->EnvironmentSize; // environment size in meters - ep.flEnvironmentDiffusion = E->EnvironmentDiffusion; // environment diffusion - ep.flAirAbsorptionHF = E->AirAbsorptionHF; // change in level per meter at 5 kHz - ep.dwFlags = EAXLISTENER_DEFAULTFLAGS; // modifies the behavior of properties + ep.lRoom = iFloor(E->Room); // room effect level at low frequencies + ep.lRoomHF = iFloor(E->RoomHF); // room effect high-frequency level re. low frequency level + ep.flRoomRolloffFactor = E->RoomRolloffFactor; // like DS3D flRolloffFactor but for room effect + ep.flDecayTime = E->DecayTime; // reverberation decay time at low frequencies + ep.flDecayHFRatio = E->DecayHFRatio; // high-frequency to low-frequency decay time ratio + ep.lReflections = iFloor(E->Reflections); // early reflections level relative to room effect + ep.flReflectionsDelay = E->ReflectionsDelay; // initial reflection delay time + ep.lReverb = iFloor(E->Reverb); // late reverberation level relative to room effect + ep.flReverbDelay = E->ReverbDelay; // late reverberation delay time relative to initial reflection + ep.dwEnvironment = EAXLISTENER_DEFAULTENVIRONMENT; // sets all listener properties + ep.flEnvironmentSize = E->EnvironmentSize; // environment size in meters + ep.flEnvironmentDiffusion = E->EnvironmentDiffusion; // environment diffusion + ep.flAirAbsorptionHF = E->AirAbsorptionHF; // change in level per meter at 5 kHz + ep.dwFlags = EAXLISTENER_DEFAULTFLAGS; // modifies the behavior of properties u32 deferred = bDeferredEAX ? DSPROPERTY_EAXLISTENER_DEFERRED : 0; diff --git a/src/xrSound/SoundRender_Core.h b/src/xrSound/SoundRender_Core.h index f97c2e04728..ba50a43cd98 100644 --- a/src/xrSound/SoundRender_Core.h +++ b/src/xrSound/SoundRender_Core.h @@ -12,7 +12,7 @@ class CSoundRender_Core : public CSound_manager_interface protected: struct SoundStatistics { - CStatTimer Update; // total time taken by sound subsystem (accurate only in single-threaded mode) + CStatTimer Update; // total time taken by sound subsystem (accurate only in single-threaded mode) SoundStatistics() { FrameStart(); } void FrameStart() { Update.FrameStart(); } @@ -40,7 +40,7 @@ class CSoundRender_Core : public CSound_manager_interface public: BOOL bPresent; BOOL bUserEnvironment; - BOOL bEAX; // Boolean variable to indicate presence of EAX Extension + BOOL bEAX; // Boolean variable to indicate presence of EAX Extension BOOL bDeferredEAX; BOOL bReady; @@ -61,10 +61,10 @@ class CSoundRender_Core : public CSound_manager_interface // Containers xr_vector s_sources; xr_vector s_emitters; - u32 s_emitters_u; // emitter update marker + u32 s_emitters_u; // emitter update marker xr_vector s_targets; xr_vector s_targets_defer; - u32 s_targets_pu; // parameters update + u32 s_targets_pu; // parameters update SoundEnvironment_LIB* s_environment; CSoundRender_Environment s_user_environment; diff --git a/src/xrSound/SoundRender_CoreA.h b/src/xrSound/SoundRender_CoreA.h index e17d2df7ef5..06c84664591 100644 --- a/src/xrSound/SoundRender_CoreA.h +++ b/src/xrSound/SoundRender_CoreA.h @@ -35,8 +35,8 @@ class CSoundRender_CoreA : public CSoundRender_Core { typedef CSoundRender_Core inherited; - EAXSet eaxSet; // EAXSet function, retrieved if EAX Extension is supported - EAXGet eaxGet; // EAXGet function, retrieved if EAX Extension is supported + EAXSet eaxSet; // EAXSet function, retrieved if EAX Extension is supported + EAXGet eaxGet; // EAXGet function, retrieved if EAX Extension is supported ALCdevice* pDevice; ALCcontext* pContext; ALDeviceList* pDeviceList; diff --git a/src/xrSound/SoundRender_CoreD.h b/src/xrSound/SoundRender_CoreD.h index 63379545143..e84f61e5b90 100644 --- a/src/xrSound/SoundRender_CoreD.h +++ b/src/xrSound/SoundRender_CoreD.h @@ -36,8 +36,8 @@ class CSoundRender_CoreD : public CSoundRender_Core public: // DSound interface - IDirectSound8* pDevice; // The device itself - IDirectSoundBuffer* pBuffer; // The primary buffer (mixer destination) + IDirectSound8* pDevice; // The device itself + IDirectSoundBuffer* pBuffer; // The primary buffer (mixer destination) IDirectSound3DListener8* pListener; LPKSPROPERTYSET pExtensions; DSCAPS dsCaps; diff --git a/src/xrSound/SoundRender_Core_Processor.cpp b/src/xrSound/SoundRender_Core_Processor.cpp index 119b3fdadd5..5b803daab2b 100644 --- a/src/xrSound/SoundRender_Core_Processor.cpp +++ b/src/xrSound/SoundRender_Core_Processor.cpp @@ -42,7 +42,7 @@ void CSoundRender_Core::update(const Fvector& P, const Fvector& D, const Fvector if (E) { E->update(dt_sec); E->marker = s_emitters_u; - E = T->get_emitter(); // update can stop itself + E = T->get_emitter(); // update can stop itself if (E) T->priority = E->priority(); else diff --git a/src/xrSound/SoundRender_Emitter.h b/src/xrSound/SoundRender_Emitter.h index 45d6acd5c54..d6f92c02cbc 100644 --- a/src/xrSound/SoundRender_Emitter.h +++ b/src/xrSound/SoundRender_Emitter.h @@ -43,7 +43,7 @@ class CSoundRender_Emitter : public CSound_emitter float priority_scale; float smooth_volume; - float occluder_volume; // USER + float occluder_volume; // USER float fade_volume; Fvector occluder[3]; @@ -59,8 +59,8 @@ class CSoundRender_Emitter : public CSound_emitter BOOL b2D; BOOL bStopping; BOOL bRewind; - float fTimeStarted; // time of "Start" - float fTimeToStop; // time to "Stop" + float fTimeStarted; // time of "Start" + float fTimeToStop; // time to "Stop" float fTimeToPropagade; u32 marker; @@ -101,7 +101,7 @@ class CSoundRender_Emitter : public CSound_emitter float priority(); void start(ref_sound* _owner, BOOL _loop, float delay); - void cancel(); // manager forces out of rendering + void cancel(); // manager forces out of rendering void update(float dt); BOOL update_culling(float dt); void update_environment(float dt); diff --git a/src/xrSound/SoundRender_Emitter_FSM.cpp b/src/xrSound/SoundRender_Emitter_FSM.cpp index e98c440a08c..3f4550b2a0d 100644 --- a/src/xrSound/SoundRender_Emitter_FSM.cpp +++ b/src/xrSound/SoundRender_Emitter_FSM.cpp @@ -10,9 +10,9 @@ XRSOUND_API extern float psSoundCull; inline u32 calc_cursor(const float& fTimeStarted, float& fTime, const float& fTimeTotal, const WAVEFORMATEX& wfx) { if (fTime < fTimeStarted) - fTime = fTimeStarted; // Андрюха посоветовал, ассерт что ниже вылетел из за паузы как то хитро + fTime = fTimeStarted; // Андрюха посоветовал, ассерт что ниже вылетел из за паузы как то хитро R_ASSERT((fTime - fTimeStarted) >= 0.0f); - while ((fTime - fTimeStarted) > fTimeTotal) // looped + while ((fTime - fTimeStarted) > fTimeTotal) // looped { fTime -= fTimeTotal; } @@ -104,7 +104,7 @@ void CSoundRender_Emitter::update(float dt) { if (!update_culling(dt)) { // switch to: SIMULATE - m_current_state = stSimulating; // switch state + m_current_state = stSimulating; // switch state SoundRender->i_stop(this); } else @@ -156,7 +156,7 @@ void CSoundRender_Emitter::update(float dt) } if (!update_culling(dt)) { // switch to: SIMULATE - m_current_state = stSimulatingLooped; // switch state + m_current_state = stSimulatingLooped; // switch state SoundRender->i_stop(this); } else @@ -173,7 +173,7 @@ void CSoundRender_Emitter::update(float dt) } if (update_culling(dt)) { // switch to: PLAY - m_current_state = stPlayingLooped; // switch state + m_current_state = stPlayingLooped; // switch state u32 ptr = calc_cursor(fTimeStarted, fTime, get_length_sec(), source()->m_wformat); set_cursor(ptr); @@ -252,7 +252,7 @@ BOOL CSoundRender_Emitter::update_culling(float dt) .1f * (p_source.base_volume * p_source.volume * (owner_data->s_type == st_Effect ? psSoundVEffects * psSoundVFactor : psSoundVMusic) * occluder_volume * fade_volume); - if (smooth_volume < psSoundCull) return FALSE; // allow volume to go up + if (smooth_volume < psSoundCull) return FALSE; // allow volume to go up // Here we has enought "PRIORITY" to be soundable // If we are playing already, return OK // --- else check availability of resources diff --git a/src/xrSound/SoundRender_Emitter_StartStop.cpp b/src/xrSound/SoundRender_Emitter_StartStop.cpp index 09bd84d6291..d8c14da4dfb 100644 --- a/src/xrSound/SoundRender_Emitter_StartStop.cpp +++ b/src/xrSound/SoundRender_Emitter_StartStop.cpp @@ -14,12 +14,12 @@ void CSoundRender_Emitter::start(ref_sound* _owner, BOOL _loop, float delay) VERIFY(owner_data); // source = (CSoundRender_Source*)owner_data->handle; p_source.position.set(0, 0, 0); - p_source.min_distance = source()->m_fMinDist; // DS3D_DEFAULTMINDISTANCE; - p_source.max_distance = source()->m_fMaxDist; // 300.f; - p_source.base_volume = source()->m_fBaseVolume; // 1.f - p_source.volume = 1.f; // 1.f + p_source.min_distance = source()->m_fMinDist; // DS3D_DEFAULTMINDISTANCE; + p_source.max_distance = source()->m_fMaxDist; // 300.f; + p_source.base_volume = source()->m_fBaseVolume; // 1.f + p_source.volume = 1.f; // 1.f p_source.freq = 1.f; - p_source.max_ai_distance = source()->m_fMaxAIDist; // 300.f; + p_source.max_ai_distance = source()->m_fMaxAIDist; // 300.f; if (fis_zero(delay, EPS_L)) { m_current_state = _loop ? stStartingLooped : stStarting; @@ -86,12 +86,12 @@ void CSoundRender_Emitter::cancel() { case stPlaying: // switch to: SIMULATE - m_current_state = stSimulating; // switch state + m_current_state = stSimulating; // switch state SoundRender->i_stop(this); break; case stPlayingLooped: // switch to: SIMULATE - m_current_state = stSimulatingLooped; // switch state + m_current_state = stSimulatingLooped; // switch state SoundRender->i_stop(this); break; default: FATAL("Non playing ref_sound forced out of render queue"); break; diff --git a/src/xrSound/SoundRender_Emitter_streamer.cpp b/src/xrSound/SoundRender_Emitter_streamer.cpp index edca6e8e57a..fe2547c3721 100644 --- a/src/xrSound/SoundRender_Emitter_streamer.cpp +++ b/src/xrSound/SoundRender_Emitter_streamer.cpp @@ -82,7 +82,7 @@ void CSoundRender_Emitter::fill_block(void* ptr, u32 size) switch (m_current_state) { case stPlaying: - { // Fill as much data as we can, zeroing remainder + { // Fill as much data as we can, zeroing remainder if (get_cursor(true) >= dwBytesTotal) { // ??? We requested the block after remainder - just zero memset(dest, 0, size); @@ -128,13 +128,13 @@ void CSoundRender_Emitter::fill_block(void* ptr, u32 size) #ifdef DEBUG Msg("reminder from prev source %d", rem); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG fill_data(dest, get_cursor(false), rem); move_cursor(rem); } #ifdef DEBUG Msg("recurce from next source %d", size - rem); -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG fill_block(dest + rem, size - rem); } else diff --git a/src/xrSound/SoundRender_Environment.h b/src/xrSound/SoundRender_Environment.h index 549efffdc5a..fbec78147a3 100644 --- a/src/xrSound/SoundRender_Environment.h +++ b/src/xrSound/SoundRender_Environment.h @@ -9,19 +9,19 @@ class XRSOUND_EDITOR_API CSoundRender_Environment : public CSound_environment u32 version; shared_str name; - u32 Environment; // sorce environment - float Room; // room effect level at low frequencies - float RoomHF; // room effect high-frequency level re. low frequency level - float RoomRolloffFactor; // like DS3D flRolloffFactor but for room effect - float DecayTime; // reverberation decay time at low frequencies - float DecayHFRatio; // high-frequency to low-frequency decay time ratio - float Reflections; // early reflections level relative to room effect - float ReflectionsDelay; // initial reflection delay time - float Reverb; // late reverberation level relative to room effect - float ReverbDelay; // late reverberation delay time relative to initial reflection - float EnvironmentSize; // environment size in meters - float EnvironmentDiffusion; // environment diffusion - float AirAbsorptionHF; // change in level per meter at 5 kHz + u32 Environment; // sorce environment + float Room; // room effect level at low frequencies + float RoomHF; // room effect high-frequency level re. low frequency level + float RoomRolloffFactor; // like DS3D flRolloffFactor but for room effect + float DecayTime; // reverberation decay time at low frequencies + float DecayHFRatio; // high-frequency to low-frequency decay time ratio + float Reflections; // early reflections level relative to room effect + float ReflectionsDelay; // initial reflection delay time + float Reverb; // late reverberation level relative to room effect + float ReverbDelay; // late reverberation delay time relative to initial reflection + float EnvironmentSize; // environment size in meters + float EnvironmentDiffusion; // environment diffusion + float AirAbsorptionHF; // change in level per meter at 5 kHz public: CSoundRender_Environment(void); ~CSoundRender_Environment(void); diff --git a/src/xrSound/SoundRender_Source.cpp b/src/xrSound/SoundRender_Source.cpp index d0e5342fa98..d3a29c40dc9 100644 --- a/src/xrSound/SoundRender_Source.cpp +++ b/src/xrSound/SoundRender_Source.cpp @@ -71,7 +71,7 @@ void CSoundRender_Source::i_decompress_fr(OggVorbis_File* ovf, char* _dest, u32 // if end of file or read limit exceeded if (ret == 0) break; - else if (ret < 0) // Error in bitstream + else if (ret < 0) // Error in bitstream { // } diff --git a/src/xrSound/SoundRender_Source.h b/src/xrSound/SoundRender_Source.h index 9fa98cd3464..407f3d6d09a 100644 --- a/src/xrSound/SoundRender_Source.h +++ b/src/xrSound/SoundRender_Source.h @@ -17,7 +17,7 @@ class XRSOUND_EDITOR_API CSoundRender_Source : public CSound_source float fTimeTotal; u32 dwBytesTotal; - WAVEFORMATEX m_wformat; //= SoundRender->wfm; + WAVEFORMATEX m_wformat; //= SoundRender->wfm; float m_fBaseVolume; float m_fMinDist; diff --git a/src/xrSound/SoundRender_Source_loader.cpp b/src/xrSound/SoundRender_Source_loader.cpp index 927423fbead..d365f3f426a 100644 --- a/src/xrSound/SoundRender_Source_loader.cpp +++ b/src/xrSound/SoundRender_Source_loader.cpp @@ -74,11 +74,11 @@ void CSoundRender_Source::LoadWave(LPCSTR pName) if (ovi->channels == 2) { Msg("stereo sound source [%s]", pName); } -#endif // #ifdef DEBUG +#endif // #ifdef DEBUG ZeroMemory(&m_wformat, sizeof(WAVEFORMATEX)); - m_wformat.nSamplesPerSec = (ovi->rate); // 44100; + m_wformat.nSamplesPerSec = (ovi->rate); // 44100; m_wformat.wFormatTag = WAVE_FORMAT_PCM; m_wformat.nChannels = u16(ovi->channels); m_wformat.wBitsPerSample = 16; diff --git a/src/xrSound/SoundRender_TargetD.h b/src/xrSound/SoundRender_TargetD.h index f38b77bc609..84d0537933f 100644 --- a/src/xrSound/SoundRender_TargetD.h +++ b/src/xrSound/SoundRender_TargetD.h @@ -15,12 +15,12 @@ class CSoundRender_TargetD : public CSoundRender_Target BOOL bDX7; - u32 buf_size; // bytes + u32 buf_size; // bytes u32 buf_block; s32 cache_hw_volume; s32 cache_hw_freq; - u32 pos_write; // bytes + u32 pos_write; // bytes private: void fill_block(); u32 calc_interval(u32 ptr); diff --git a/src/xrSound/xr_cda.h b/src/xrSound/xr_cda.h index 217cfc92657..6866bdea1fb 100644 --- a/src/xrSound/xr_cda.h +++ b/src/xrSound/xr_cda.h @@ -32,4 +32,4 @@ class CCDA void OnMove(); }; -#endif //__XR_CDAudio_H__ +#endif //__XR_CDAudio_H__ diff --git a/src/xrSound/xr_streamsnd.cpp b/src/xrSound/xr_streamsnd.cpp index 35cb6c3dacb..45f0b97f049 100644 --- a/src/xrSound/xr_streamsnd.cpp +++ b/src/xrSound/xr_streamsnd.cpp @@ -230,9 +230,9 @@ BOOL CSoundStream::Decompress(unsigned char* dest) //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- -void CSoundStream::AppWriteDataToBuffer(u32 dwOffset, // our own write cursor - LPBYTE lpbSoundData, // start of our data - u32 dwSoundBytes) // size of block to copy +void CSoundStream::AppWriteDataToBuffer(u32 dwOffset, // our own write cursor + LPBYTE lpbSoundData, // start of our data + u32 dwSoundBytes) // size of block to copy { LPVOID lpvPtr1, lpvPtr2; DWORD dwBytes1; @@ -257,7 +257,7 @@ BOOL ADPCMCreateSoundBuffer(IDirectSound8* lpDS, IDirectSoundBuffer** pDSB, WAVE DSBUFFERDESC dsBD; // Set up DSBUFFERDESC structure. - ZeroMemory(&dsBD, sizeof(DSBUFFERDESC)); // Zero it out. + ZeroMemory(&dsBD, sizeof(DSBUFFERDESC)); // Zero it out. dsBD.dwSize = sizeof(DSBUFFERDESC); dsBD.dwFlags = DSBCAPS_CTRLVOLUME | DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_LOCSOFTWARE; diff --git a/src/xrSound/xr_streamsnd.h b/src/xrSound/xr_streamsnd.h index 550f65ec567..f14fd68b8c3 100644 --- a/src/xrSound/xr_streamsnd.h +++ b/src/xrSound/xr_streamsnd.h @@ -11,15 +11,15 @@ class ENGINE_API CSoundStream : public CSound_stream_interface protected: struct sxr_riff { - u8 id[4]; // identifier string = "RIFF" - u32 len; // remaining length after this header - char wave_id[4]; // "WAVE" + u8 id[4]; // identifier string = "RIFF" + u32 len; // remaining length after this header + char wave_id[4]; // "WAVE" }; struct sxr_hdr { - u8 id[4]; // identifier, e.g. "fmt " or "data" - u32 len; // remaining chunk length after header + u8 id[4]; // identifier, e.g. "fmt " or "data" + u32 len; // remaining chunk length after header }; private: @@ -52,7 +52,7 @@ class ENGINE_API CSoundStream : public CSound_stream_interface unsigned char *WaveSource, *WaveDest; u32 writepos; - BOOL isPresentData; // признак окончания буфера + BOOL isPresentData; // признак окончания буфера u32 dwDecPos; IReader* hf; int DataPos; @@ -60,9 +60,9 @@ class ENGINE_API CSoundStream : public CSound_stream_interface private: //----------------------------------------------------- BOOL Decompress(unsigned char* dest); - void AppWriteDataToBuffer(u32 dwOffset, // our own write cursor - LPBYTE lpbSoundData, // start of our data - u32 dwSoundBytes); // size of block to copy + void AppWriteDataToBuffer(u32 dwOffset, // our own write cursor + LPBYTE lpbSoundData, // start of our data + u32 dwSoundBytes); // size of block to copy void LoadADPCM(); @@ -90,4 +90,4 @@ class ENGINE_API CSoundStream : public CSound_stream_interface void OnMove(); }; -#endif //__XR_STREAM_SOUND_H__ +#endif //__XR_STREAM_SOUND_H__