%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
  m_ObjectHideFlags: 0
  serializedVersion: 2
  m_OcclusionBakeSettings:
    smallestOccluder: 5
    smallestHole: 0.25
    backfaceThreshold: 100
  m_SceneGUID: 00000000000000000000000000000000
  m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
  m_ObjectHideFlags: 0
  serializedVersion: 9
  m_Fog: 0
  m_FogColor: {r: 0.121568635, g: 0.18431373, b: 0.3803922, a: 1}
  m_FogMode: 3
  m_FogDensity: 0.015
  m_LinearFogStart: 0
  m_LinearFogEnd: 300
  m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
  m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
  m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
  m_AmbientIntensity: 1
  m_AmbientMode: 0
  m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
  m_SkyboxMaterial: {fileID: 2100000, guid: 22b5117545d774b5cb61a7808c5123ee, type: 2}
  m_HaloStrength: 0.5
  m_FlareStrength: 1
  m_FlareFadeSpeed: 3
  m_HaloTexture: {fileID: 0}
  m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
  m_DefaultReflectionMode: 0
  m_DefaultReflectionResolution: 128
  m_ReflectionBounces: 1
  m_ReflectionIntensity: 1
  m_CustomReflection: {fileID: 0}
  m_Sun: {fileID: 1379798262}
  m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
  m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
  m_ObjectHideFlags: 0
  serializedVersion: 11
  m_GIWorkflowMode: 1
  m_GISettings:
    serializedVersion: 2
    m_BounceScale: 1
    m_IndirectOutputScale: 1
    m_AlbedoBoost: 1
    m_EnvironmentLightingMode: 0
    m_EnableBakedLightmaps: 0
    m_EnableRealtimeLightmaps: 0
  m_LightmapEditorSettings:
    serializedVersion: 12
    m_Resolution: 2
    m_BakeResolution: 20
    m_AtlasSize: 512
    m_AO: 0
    m_AOMaxDistance: 1
    m_CompAOExponent: 1
    m_CompAOExponentDirect: 0
    m_ExtractAmbientOcclusion: 0
    m_Padding: 2
    m_LightmapParameters: {fileID: 0}
    m_LightmapsBakeMode: 1
    m_TextureCompression: 1
    m_FinalGather: 0
    m_FinalGatherFiltering: 1
    m_FinalGatherRayCount: 256
    m_ReflectionCompression: 2
    m_MixedBakeMode: 0
    m_BakeBackend: 1
    m_PVRSampling: 1
    m_PVRDirectSampleCount: 16
    m_PVRSampleCount: 30
    m_PVRBounces: 1
    m_PVREnvironmentSampleCount: 30
    m_PVREnvironmentReferencePointCount: 2048
    m_PVRFilteringMode: 2
    m_PVRDenoiserTypeDirect: 0
    m_PVRDenoiserTypeIndirect: 0
    m_PVRDenoiserTypeAO: 0
    m_PVRFilterTypeDirect: 0
    m_PVRFilterTypeIndirect: 0
    m_PVRFilterTypeAO: 0
    m_PVREnvironmentMIS: 0
    m_PVRCulling: 0
    m_PVRFilteringGaussRadiusDirect: 1
    m_PVRFilteringGaussRadiusIndirect: 5
    m_PVRFilteringGaussRadiusAO: 2
    m_PVRFilteringAtrousPositionSigmaDirect: 0.5
    m_PVRFilteringAtrousPositionSigmaIndirect: 2
    m_PVRFilteringAtrousPositionSigmaAO: 1
    m_ExportTrainingData: 0
    m_TrainingDataDestination: TrainingData
  m_LightingDataAsset: {fileID: 112000002, guid: d235646aaa0510e46bd9ad6cd956ac82,
    type: 2}
  m_UseShadowmask: 0
--- !u!196 &4
NavMeshSettings:
  serializedVersion: 2
  m_ObjectHideFlags: 0
  m_BuildSettings:
    serializedVersion: 2
    agentTypeID: 0
    agentRadius: 0.5
    agentHeight: 2
    agentSlope: 45
    agentClimb: 0.4
    ledgeDropHeight: 0
    maxJumpAcrossDistance: 0
    minRegionArea: 2
    manualCellSize: 0
    cellSize: 0.16666667
    manualTileSize: 0
    tileSize: 256
    accuratePlacement: 0
    debug:
      m_Flags: 0
  m_NavMeshData: {fileID: 0}
--- !u!1 &2402805
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 2402806}
  m_Layer: 0
  m_Name: Cameras
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &2402806
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 2402805}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 12.855254, y: 3.9177809, z: -18.813847}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 220979867}
  - {fileID: 1496275640}
  m_Father: {fileID: 0}
  m_RootOrder: 1
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &220979866
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 220979867}
  - component: {fileID: 220979868}
  m_Layer: 0
  m_Name: VCam - Follow Player
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &220979867
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 220979866}
  m_LocalRotation: {x: 0.1724006, y: 0.8273177, z: -0.3897202, w: 0.36598048}
  m_LocalPosition: {x: -8.095254, y: 5.072219, z: 4.8838463}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 1457675942}
  m_Father: {fileID: 2402806}
  m_RootOrder: 0
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &220979868
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 220979866}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  m_ExcludedPropertiesInInspector:
  - m_Script
  m_LockStageInInspector:
  m_StreamingVersion: 20170927
  m_Priority: 10
  m_StandbyUpdate: 2
  m_LookAt: {fileID: 402024086}
  m_Follow: {fileID: 402024086}
  m_Lens:
    FieldOfView: 50
    OrthographicSize: 10
    NearClipPlane: 0.1
    FarClipPlane: 50
    Dutch: 0
    LensShift: {x: 0, y: 0}
  m_Transitions:
    m_BlendHint: 0
    m_InheritPosition: 0
    m_OnCameraLive:
      m_PersistentCalls:
        m_Calls: []
      m_TypeName: Cinemachine.CinemachineBrain+VcamActivatedEvent, Cinemachine, Version=0.0.0.0,
        Culture=neutral, PublicKeyToken=null
  m_LegacyBlendHint: 0
  m_ComponentOwner: {fileID: 1457675942}
--- !u!4 &402024085 stripped
Transform:
  m_CorrespondingSourceObject: {fileID: 4914135124288442, guid: 387be402c6e254edb8f04a699355f406,
    type: 3}
  m_PrefabInstance: {fileID: 1142627572}
  m_PrefabAsset: {fileID: 0}
--- !u!4 &402024086 stripped
Transform:
  m_CorrespondingSourceObject: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406,
    type: 3}
  m_PrefabInstance: {fileID: 1142627572}
  m_PrefabAsset: {fileID: 0}
--- !u!1 &427756555
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 427756557}
  - component: {fileID: 427756556}
  m_Layer: 0
  m_Name: Game Settings
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!114 &427756556
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 427756555}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 65022c6b389ac1e48845218a3a15af20, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  player: {fileID: 402024086}
  playerCollisionRadius: 0.8
  enemyCollisionRadius: 0.8
--- !u!4 &427756557
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 427756555}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 12.636259, y: -0.6796955, z: -18.553877}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 0}
  m_RootOrder: 5
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &454054842
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 454054846}
  - component: {fileID: 454054845}
  - component: {fileID: 454054844}
  - component: {fileID: 454054843}
  m_Layer: 0
  m_Name: Ground
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!64 &454054843
MeshCollider:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 454054842}
  m_Material: {fileID: 0}
  m_IsTrigger: 0
  m_Enabled: 1
  serializedVersion: 3
  m_Convex: 0
  m_CookingOptions: 14
  m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &454054844
MeshRenderer:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 454054842}
  m_Enabled: 1
  m_CastShadows: 0
  m_ReceiveShadows: 1
  m_DynamicOccludee: 1
  m_MotionVectors: 1
  m_LightProbeUsage: 1
  m_ReflectionProbeUsage: 1
  m_RenderingLayerMask: 4294967295
  m_RendererPriority: 0
  m_Materials:
  - {fileID: 2100000, guid: 5bc81860d99363345955e95c1557ed02, type: 2}
  m_StaticBatchInfo:
    firstSubMesh: 0
    subMeshCount: 0
  m_StaticBatchRoot: {fileID: 0}
  m_ProbeAnchor: {fileID: 0}
  m_LightProbeVolumeOverride: {fileID: 0}
  m_ScaleInLightmap: 1
  m_ReceiveGI: 1
  m_PreserveUVs: 0
  m_IgnoreNormalsForChartDetection: 0
  m_ImportantGI: 0
  m_StitchLightmapSeams: 0
  m_SelectedEditorRenderState: 3
  m_MinimumChartSize: 4
  m_AutoUVMaxDistance: 0.5
  m_AutoUVMaxAngle: 89
  m_LightmapParameters: {fileID: 0}
  m_SortingLayerID: 0
  m_SortingLayer: 0
  m_SortingOrder: 0
--- !u!33 &454054845
MeshFilter:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 454054842}
  m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &454054846
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 454054842}
  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
  m_LocalPosition: {x: 10.26, y: -1.083, z: -18.93}
  m_LocalScale: {x: 10, y: 10, z: 10}
  m_Children: []
  m_Father: {fileID: 0}
  m_RootOrder: 3
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &487209746
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 1300351076624756, guid: 137eb4d5ff6dd4c04a4e2be53f003a59,
    type: 2}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 487209747}
  - component: {fileID: 487209748}
  m_Layer: 8
  m_Name: Global Post Processing Volume
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &487209747
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 4679847986911992, guid: 137eb4d5ff6dd4c04a4e2be53f003a59,
    type: 2}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 487209746}
  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 0}
  m_RootOrder: 2
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &487209748
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 487209746}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  sharedProfile: {fileID: 11400000, guid: ae1bad5c1fb2cec45883a3fc2900054e, type: 2}
  isGlobal: 1
  blendDistance: 0
  weight: 1
  priority: 1
--- !u!1 &716467324
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 716467325}
  - component: {fileID: 716467326}
  m_Layer: 0
  m_Name: Enemy Spawner
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &716467325
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 716467324}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 0}
  m_RootOrder: 6
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &716467326
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 716467324}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 9819dff8a58816942a75b0586ae132b6, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  spawnEnemies: 1
  useECS: 1
  enemySpawnRadius: 17
  enemyPrefab: {fileID: 40720117310684751, guid: 0e3f83bdd0786fc418e17d7be7fd67a3,
    type: 3}
  spawnsPerInterval: 1
  spawnInterval: 1
--- !u!1001 &1142627572
PrefabInstance:
  m_ObjectHideFlags: 0
  serializedVersion: 2
  m_Modification:
    m_TransformParent: {fileID: 0}
    m_Modifications:
    - target: {fileID: 1500293480320252, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_Name
      value: Player
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalPosition.x
      value: 10.26
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalPosition.y
      value: -1.01
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalPosition.z
      value: -18.93
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalRotation.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalRotation.y
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalRotation.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalRotation.w
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_RootOrder
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalEulerAnglesHint.x
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalEulerAnglesHint.y
      value: 90
      objectReference: {fileID: 0}
    - target: {fileID: 4874788804663312, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: m_LocalEulerAnglesHint.z
      value: 0
      objectReference: {fileID: 0}
    - target: {fileID: 114445215679820892, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: mainCamera
      value:
      objectReference: {fileID: 1496275639}
    - target: {fileID: 114445215679820892, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: whatIsGround.m_Bits
      value: 512
      objectReference: {fileID: 0}
    - target: {fileID: 114167452494013206, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: bulletPrefab
      value:
      objectReference: {fileID: 1218724716591446, guid: c4b4b81382c254a999d09f9375fbe2c7,
        type: 3}
    - target: {fileID: 114167452494013206, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: spreadAmount
      value: 20
      objectReference: {fileID: 0}
    - target: {fileID: 114167452494013206, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: fireRate
      value: 0.1
      objectReference: {fileID: 0}
    - target: {fileID: 114167452494013206, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: spreadShot
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 114167452494013206, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: useECS
      value: 1
      objectReference: {fileID: 0}
    - target: {fileID: 136433486275610172, guid: 387be402c6e254edb8f04a699355f406,
        type: 3}
      propertyPath: m_Center.y
      value: 1.1
      objectReference: {fileID: 0}
    - target: {fileID: 1194508039, guid: 387be402c6e254edb8f04a699355f406, type: 3}
      propertyPath: ConversionMode
      value: 1
      objectReference: {fileID: 0}
    m_RemovedComponents: []
  m_SourcePrefab: {fileID: 100100000, guid: 387be402c6e254edb8f04a699355f406, type: 3}
--- !u!1 &1379798260
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 1379798261}
  - component: {fileID: 1379798262}
  m_Layer: 0
  m_Name: Directional Light
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &1379798261
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1379798260}
  m_LocalRotation: {x: 0.42182714, y: -0, z: -0, w: 0.9066763}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children:
  - {fileID: 1552434843}
  m_Father: {fileID: 0}
  m_RootOrder: 4
  m_LocalEulerAnglesHint: {x: 49.9, y: 0, z: 0}
--- !u!108 &1379798262
Light:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1379798260}
  m_Enabled: 1
  serializedVersion: 9
  m_Type: 1
  m_Color: {r: 0.4575472, g: 0.72401524, b: 1, a: 1}
  m_Intensity: 0.5
  m_Range: 10
  m_SpotAngle: 30
  m_InnerSpotAngle: 21.80208
  m_CookieSize: 10
  m_Shadows:
    m_Type: 2
    m_Resolution: -1
    m_CustomResolution: -1
    m_Strength: 0.817
    m_Bias: 0.05
    m_NormalBias: 0.4
    m_NearPlane: 0.2
    m_CullingMatrixOverride:
      e00: 1
      e01: 0
      e02: 0
      e03: 0
      e10: 0
      e11: 1
      e12: 0
      e13: 0
      e20: 0
      e21: 0
      e22: 1
      e23: 0
      e30: 0
      e31: 0
      e32: 0
      e33: 1
    m_UseCullingMatrixOverride: 0
  m_Cookie: {fileID: 0}
  m_DrawHalo: 0
  m_Flare: {fileID: 0}
  m_RenderMode: 1
  m_CullingMask:
    serializedVersion: 2
    m_Bits: 4294967295
  m_RenderingLayerMask: 1
  m_Lightmapping: 4
  m_LightShadowCasterMode: 0
  m_AreaSize: {x: 1, y: 1}
  m_BounceIntensity: 1
  m_ColorTemperature: 6570
  m_UseColorTemperature: 0
  m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
  m_UseBoundingSphereOverride: 0
  m_ShadowRadius: 0
  m_ShadowAngle: 15.4
--- !u!1 &1415310047
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 1415310049}
  - component: {fileID: 1415310048}
  m_Layer: 0
  m_Name: Bullet Impact Object Pool
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!114 &1415310048
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1415310047}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: caa9c1b965593a04b97699021e55094b, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  bulletHitPrefab: {fileID: 1607228222434220, guid: 3c6a9770554a2499da6dc5e68b870e15,
    type: 3}
  impactPoolSize: 100
--- !u!4 &1415310049
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1415310047}
  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 0}
  m_RootOrder: 7
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1457675941
GameObject:
  m_ObjectHideFlags: 3
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 1457675942}
  - component: {fileID: 1457675945}
  - component: {fileID: 1457675944}
  - component: {fileID: 1457675943}
  m_Layer: 0
  m_Name: cm
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!4 &1457675942
Transform:
  m_ObjectHideFlags: 3
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1457675941}
  m_LocalRotation: {x: -0.17240052, y: -0.82731766, z: 0.3897204, w: 0.3659804}
  m_LocalPosition: {x: -5.5125513, y: -14.981099, z: -0.6093712}
  m_LocalScale: {x: 1.0000002, y: 1, z: 1.0000001}
  m_Children: []
  m_Father: {fileID: 220979867}
  m_RootOrder: 0
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1457675943
MonoBehaviour:
  m_ObjectHideFlags: 3
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1457675941}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  m_TrackedObjectOffset: {x: 0, y: 1, z: 0}
  m_LookaheadTime: 0.1
  m_LookaheadSmoothing: 10
  m_LookaheadIgnoreY: 0
  m_HorizontalDamping: 0.5
  m_VerticalDamping: 0.5
  m_ScreenX: 0.5
  m_ScreenY: 0.5
  m_DeadZoneWidth: 0.1
  m_DeadZoneHeight: 0.1
  m_SoftZoneWidth: 0.8
  m_SoftZoneHeight: 0.8
  m_BiasX: 0
  m_BiasY: 0
  m_CenterOnActivate: 1
--- !u!114 &1457675944
MonoBehaviour:
  m_ObjectHideFlags: 3
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1457675941}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: fa7155796051b734daa718462081dc5f, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  m_BindingMode: 4
  m_FollowOffset: {x: -5.5, y: 10, z: 5}
  m_XDamping: 1
  m_YDamping: 1
  m_ZDamping: 1
  m_AngularDampingMode: 0
  m_PitchDamping: 0
  m_YawDamping: 0
  m_RollDamping: 0
  m_AngularDamping: 0
--- !u!114 &1457675945
MonoBehaviour:
  m_ObjectHideFlags: 3
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1457675941}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
  m_Name:
  m_EditorClassIdentifier:
--- !u!1 &1496275636
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 1496275640}
  - component: {fileID: 1496275639}
  - component: {fileID: 1496275638}
  - component: {fileID: 1496275637}
  - component: {fileID: 1496275642}
  - component: {fileID: 1496275641}
  m_Layer: 0
  m_Name: Main Camera
  m_TagString: MainCamera
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!81 &1496275637
AudioListener:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1496275636}
  m_Enabled: 1
--- !u!124 &1496275638
Behaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1496275636}
  m_Enabled: 1
--- !u!20 &1496275639
Camera:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1496275636}
  m_Enabled: 1
  serializedVersion: 2
  m_ClearFlags: 1
  m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
  m_projectionMatrixMode: 1
  m_GateFitMode: 2
  m_FOVAxisMode: 0
  m_SensorSize: {x: 36, y: 24}
  m_LensShift: {x: 0, y: 0}
  m_FocalLength: 50
  m_NormalizedViewPortRect:
    serializedVersion: 2
    x: 0
    y: 0
    width: 1
    height: 1
  near clip plane: 0.1
  far clip plane: 50
  field of view: 50
  orthographic: 0
  orthographic size: 10
  m_Depth: -1
  m_CullingMask:
    serializedVersion: 2
    m_Bits: 4294967295
  m_RenderingPath: 3
  m_TargetTexture: {fileID: 0}
  m_TargetDisplay: 0
  m_TargetEye: 3
  m_HDR: 1
  m_AllowMSAA: 1
  m_AllowDynamicResolution: 0
  m_ForceIntoRT: 1
  m_OcclusionCulling: 1
  m_StereoConvergence: 10
  m_StereoSeparation: 0.022
--- !u!4 &1496275640
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1496275636}
  m_LocalRotation: {x: 0.1724006, y: 0.8273177, z: -0.3897202, w: 0.36598048}
  m_LocalPosition: {x: -8.095254, y: 5.072219, z: 4.8838463}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 2402806}
  m_RootOrder: 1
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1496275641
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1496275636}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  volumeTrigger: {fileID: 402024085}
  volumeLayer:
    serializedVersion: 2
    m_Bits: 256
  stopNaNPropagation: 1
  finalBlitToCameraTarget: 1
  antialiasingMode: 1
  temporalAntialiasing:
    jitterSpread: 0.75
    sharpness: 0.25
    stationaryBlending: 0.95
    motionBlending: 0.85
  subpixelMorphologicalAntialiasing:
    quality: 2
  fastApproximateAntialiasing:
    fastMode: 0
    keepAlpha: 0
  fog:
    enabled: 1
    excludeSkybox: 1
  debugLayer:
    lightMeter:
      width: 512
      height: 256
      showCurves: 1
    histogram:
      width: 512
      height: 256
      channel: 3
    waveform:
      exposure: 0.12
      height: 256
    vectorscope:
      size: 256
      exposure: 0.12
    overlaySettings:
      linearDepth: 0
      motionColorIntensity: 4
      motionGridSize: 64
      colorBlindnessType: 0
      colorBlindnessStrength: 1
  m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2}
  m_ShowToolkit: 0
  m_ShowCustomSorter: 0
  breakBeforeColorGrading: 0
  m_BeforeTransparentBundles: []
  m_BeforeStackBundles: []
  m_AfterStackBundles: []
--- !u!114 &1496275642
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1496275636}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
  m_Name:
  m_EditorClassIdentifier:
  m_ShowDebugText: 0
  m_ShowCameraFrustum: 1
  m_IgnoreTimeScale: 0
  m_WorldUpOverride: {fileID: 0}
  m_UpdateMethod: 2
  m_DefaultBlend:
    m_Style: 1
    m_Time: 2
    m_CustomCurve:
      serializedVersion: 2
      m_Curve: []
      m_PreInfinity: 2
      m_PostInfinity: 2
      m_RotationOrder: 4
  m_CustomBlends: {fileID: 0}
  m_CameraCutEvent:
    m_PersistentCalls:
      m_Calls: []
    m_TypeName: Cinemachine.CinemachineBrain+BrainEvent, Cinemachine, Version=0.0.0.0,
      Culture=neutral, PublicKeyToken=null
  m_CameraActivatedEvent:
    m_PersistentCalls:
      m_Calls: []
    m_TypeName: Cinemachine.CinemachineBrain+VcamActivatedEvent, Cinemachine, Version=0.0.0.0,
      Culture=neutral, PublicKeyToken=null
--- !u!1 &1552434841
GameObject:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  serializedVersion: 6
  m_Component:
  - component: {fileID: 1552434843}
  - component: {fileID: 1552434842}
  m_Layer: 0
  m_Name: High light
  m_TagString: Untagged
  m_Icon: {fileID: 0}
  m_NavMeshLayer: 0
  m_StaticEditorFlags: 0
  m_IsActive: 1
--- !u!108 &1552434842
Light:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1552434841}
  m_Enabled: 1
  serializedVersion: 9
  m_Type: 1
  m_Color: {r: 0.9622642, g: 0.9622642, b: 0.9622642, a: 1}
  m_Intensity: 0.11
  m_Range: 10
  m_SpotAngle: 30
  m_InnerSpotAngle: 21.80208
  m_CookieSize: 10
  m_Shadows:
    m_Type: 0
    m_Resolution: -1
    m_CustomResolution: -1
    m_Strength: 0.817
    m_Bias: 0.05
    m_NormalBias: 0.4
    m_NearPlane: 0.2
    m_CullingMatrixOverride:
      e00: 1
      e01: 0
      e02: 0
      e03: 0
      e10: 0
      e11: 1
      e12: 0
      e13: 0
      e20: 0
      e21: 0
      e22: 1
      e23: 0
      e30: 0
      e31: 0
      e32: 0
      e33: 1
    m_UseCullingMatrixOverride: 0
  m_Cookie: {fileID: 0}
  m_DrawHalo: 0
  m_Flare: {fileID: 0}
  m_RenderMode: 1
  m_CullingMask:
    serializedVersion: 2
    m_Bits: 4294967295
  m_RenderingLayerMask: 1
  m_Lightmapping: 4
  m_LightShadowCasterMode: 0
  m_AreaSize: {x: 1, y: 1}
  m_BounceIntensity: 0
  m_ColorTemperature: 6570
  m_UseColorTemperature: 0
  m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
  m_UseBoundingSphereOverride: 0
  m_ShadowRadius: 0
  m_ShadowAngle: 15.4
--- !u!4 &1552434843
Transform:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 1552434841}
  m_LocalRotation: {x: -0.15697315, y: 0.6948365, z: -0.45876932, w: 0.53112376}
  m_LocalPosition: {x: 0, y: 0, z: 0}
  m_LocalScale: {x: 1, y: 1, z: 1}
  m_Children: []
  m_Father: {fileID: 1379798261}
  m_RootOrder: 0
  m_LocalEulerAnglesHint: {x: 16.97, y: 112.739006, z: 0}

{'repo_name': 'UnityTechnologies/AngryBots_ECS', 'stars': '286', 'repo_language': 'C#', 'file_name': 'AudioManager.asset', 'mime_type': 'text/plain', 'hash': 3687011847798389651, 'source_dataset': 'data'}


/*
 * Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
 * and other contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.hawkular.metrics.core.service;

import static org.hawkular.metrics.model.AvailabilityType.UP;

import java.util.HashMap;
import java.util.Map;

import org.hawkular.metrics.model.AvailabilityBucketPoint;
import org.hawkular.metrics.model.AvailabilityType;
import org.hawkular.metrics.model.Buckets;
import org.hawkular.metrics.model.DataPoint;

/**
 * Accumulates availability data points to produce an {@link AvailabilityBucketPoint}.
 *
 * @author Thomas Segismont
 */
final class AvailabilityDataPointCollector {

    private final Buckets buckets;
    private final long bucketStart;

    private DataPoint<AvailabilityType> previous;
    private Map<AvailabilityType, Long> durationMap;
    private long lastNotUptime;
    private long notUpCount;
    private long samples;

    AvailabilityDataPointCollector(Buckets buckets, int bucketIndex) {
        this.buckets = buckets;
        this.bucketStart = buckets.getBucketStart(bucketIndex);

        this.durationMap = new HashMap<>();
    }

    void increment(DataPoint<AvailabilityType> dataPoint) {
        long timestamp = dataPoint.getTimestamp();
        AvailabilityType availType = dataPoint.getValue();

        if (previous != null && timestamp <= previous.getTimestamp()) {
            throw new IllegalStateException("Expected stream sorted in time ascending order");
        }

        ++samples;

        if (previous == null) {
            Long availTypeDuration = durationMap.getOrDefault(availType, 0L);
            availTypeDuration += (timestamp - bucketStart);
            durationMap.put(availType, availTypeDuration);
            if (availType != UP) {
                lastNotUptime = timestamp;
                ++notUpCount;
            }
        }
        else {
            Long previousAvailTypeDuration = durationMap.getOrDefault(previous.getValue(), 0L);
            previousAvailTypeDuration += (timestamp - previous.getTimestamp());
            durationMap.put(previous.getValue(), previousAvailTypeDuration);

            if (availType == UP) {
                if (previous.getValue() != UP) {
                    lastNotUptime = timestamp;
                }
            } else {
                if (previous.getValue() == UP) {
                    ++notUpCount;
                }
                lastNotUptime = timestamp;
            }
        }

        previous = dataPoint;
    }

    AvailabilityBucketPoint toBucketPoint() {
        long to = bucketStart + buckets.getStep();

        Long availTypeDuration = durationMap.getOrDefault(previous.getValue(), 0L);
        availTypeDuration += (to - previous.getTimestamp());
        durationMap.put(previous.getValue(), availTypeDuration);

        if (previous.getValue() != UP) {
            lastNotUptime = to;
        }

        return new AvailabilityBucketPoint.Builder(bucketStart, to)
                .setDurationMap(durationMap)
                .setLastNotUptime(lastNotUptime)
                .setUptimeRatio(((double) durationMap.getOrDefault(AvailabilityType.UP, 0L) / buckets.getStep()))
                .setNotUptimeCount(notUpCount)
                .setSamples(samples)
                .build();
    }
}

{'repo_name': 'hawkular/hawkular-metrics', 'stars': '222', 'repo_language': 'Java', 'file_name': 'main.yml', 'mime_type': 'text/plain', 'hash': -2132194052641402525, 'source_dataset': 'data'}


/*************************************************
*      Perl-Compatible Regular Expressions       *
*************************************************/

/*
PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.

Written by: Philip Hazel <ph10@cam.ac.uk>

           Copyright (c) 1997-2003 University of Cambridge

-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

    * Neither the name of the University of Cambridge nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------

See the file Tech.Notes for some information on the internals.
*/

/* This file is compiled on its own as part of the PCRE library. However,
it is also included in the compilation of dftables.c, in which case the macro
DFTABLES is defined. */

#ifndef DFTABLES
#include "internal.h"
#endif

/*************************************************
*           Create PCRE character tables         *
*************************************************/

/* This function builds a set of character tables for use by PCRE and returns
a pointer to them. They are build using the ctype functions, and consequently
their contents will depend upon the current locale setting. When compiled as
part of the library, the store is obtained via pcre_malloc(), but when compiled
inside dftables, use malloc().

Arguments:   none
Returns:     pointer to the contiguous block of data
*/

const unsigned char *
pcre_maketables(void)
{
unsigned char *yield, *p;
int i;

#ifndef DFTABLES
yield = (unsigned char*)(pcre_malloc)(tables_length);
#else
yield = (unsigned char*)malloc(tables_length);
#endif

if (yield == NULL) return NULL;
p = yield;

/* First comes the lower casing table */

for (i = 0; i < 256; i++) *p++ = tolower(i);

/* Next the case-flipping table */

for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i);

/* Then the character class tables. Don't try to be clever and save effort
on exclusive ones - in some locales things may be different. Note that the
table for "space" includes everything "isspace" gives, including VT in the
default locale. This makes it work for the POSIX class [:space:]. */

memset(p, 0, cbit_length);
for (i = 0; i < 256; i++)
  {
  if (isdigit(i))
    {
    p[cbit_digit  + i/8] |= 1 << (i&7);
    p[cbit_word   + i/8] |= 1 << (i&7);
    }
  if (isupper(i))
    {
    p[cbit_upper  + i/8] |= 1 << (i&7);
    p[cbit_word   + i/8] |= 1 << (i&7);
    }
  if (islower(i))
    {
    p[cbit_lower  + i/8] |= 1 << (i&7);
    p[cbit_word   + i/8] |= 1 << (i&7);
    }
  if (i == '_')   p[cbit_word   + i/8] |= 1 << (i&7);
  if (isspace(i)) p[cbit_space  + i/8] |= 1 << (i&7);
  if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7);
  if (isgraph(i)) p[cbit_graph  + i/8] |= 1 << (i&7);
  if (isprint(i)) p[cbit_print  + i/8] |= 1 << (i&7);
  if (ispunct(i)) p[cbit_punct  + i/8] |= 1 << (i&7);
  if (iscntrl(i)) p[cbit_cntrl  + i/8] |= 1 << (i&7);
  }
p += cbit_length;

/* Finally, the character type table. In this, we exclude VT from the white
space chars, because Perl doesn't recognize it as such for \s and for comments
within regexes. */

for (i = 0; i < 256; i++)
  {
  int x = 0;
  if (i != 0x0b && isspace(i)) x += ctype_space;
  if (isalpha(i)) x += ctype_letter;
  if (isdigit(i)) x += ctype_digit;
  if (isxdigit(i)) x += ctype_xdigit;
  if (isalnum(i) || i == '_') x += ctype_word;

  /* Note: strchr includes the terminating zero in the characters it considers.
  In this instance, that is ok because we want binary zero to be flagged as a
  meta-character, which in this sense is any character that terminates a run
  of data characters. */

  if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta; *p++ = x; }

return yield;
}

/* End of maketables.c */

{'repo_name': 'etternagame/etterna', 'stars': '191', 'repo_language': 'C++', 'file_name': 'NoteSkin.lua', 'mime_type': 'text/plain', 'hash': 680654676079607946, 'source_dataset': 'data'}


--- Makefile.in.orig	2009-07-04 02:29:28.000000000 -0300
+++ Makefile.in	2011-08-01 21:22:47.000000000 -0300
@@ -142,9 +142,7 @@
 	$(INSTALL_PROG) $(CTAGS_EXEC) $@  &&  chmod 755 $@

 $(DEST_ETAGS):
-	- if [ -x $(DEST_CTAGS) ]; then \
-	    cd $(bindir) && $(SLINK) $(CTAGS_EXEC) $(ETAGS_EXEC); \
-	fi
+	- cd $(bindir) && $(SLINK) $(CTAGS_EXEC) $(ETAGS_EXEC)

 #
 # install the man pages
@@ -157,9 +155,7 @@
 	- $(INSTALL_DATA) $(srcdir)/$(MANPAGE) $@  &&  chmod 644 $@

 $(DEST_EMAN):
-	- if [ -f $(DEST_CMAN) ]; then \
-	    cd $(man1dir) && $(SLINK) $(CMAN) $(EMAN); \
-	fi
+	- cd $(man1dir) && $(SLINK) $(CMAN) $(EMAN)

 #
 # install the library

{'repo_name': 'rudix-mac/rudix', 'stars': '181', 'repo_language': 'Makefile', 'file_name': 'Makefile', 'mime_type': 'text/plain', 'hash': 3695179076155737937, 'source_dataset': 'data'}


{$mode objfpc}
{$h+}
unit pkghandler;

{$IFDEF OS2}
 {$DEFINE NO_UNIT_PROCESS}
{$ENDIF OS2}

{$IFDEF GO32V2}
 {$DEFINE NO_UNIT_PROCESS}
{$ENDIF GO32V2}

{$ifndef NO_UNIT_PROCESS}
  {$define HAS_UNIT_PROCESS}
{$endif NO_UNIT_PROCESS}

interface

uses
  Classes,SysUtils,
  pkgglobals,
  pkgoptions,
{$ifdef HAS_UNIT_PROCESS}
  process,
{$endif HAS_UNIT_PROCESS}
  fprepos,
  pkgFppkg;

type
  { TPackageHandler }

  TPackageHandler = Class(TComponent)
  private
    FPackageName : string;
    FPackageManager: tpkgFPpkg;
  Protected
    Procedure Log(Level: TLogLevel;Msg : String);
    Procedure Log(Level: TLogLevel;Fmt : String; const Args : array of const);
    Procedure Error(Msg : String);
    Procedure Error(Fmt : String; const Args : array of const);
    Function ExecuteProcess(Const Prog,Args:String):Integer;
    Procedure SetCurrentDir(Const ADir:String);
    Property PackageManager:TpkgFPpkg Read FPackageManager;
  Public
    Constructor Create(AOwner:TComponent; APackageManager:TpkgFPpkg; const APackageName:string); virtual;
    function PackageLogPrefix:String;
    function ExecuteAction(const APackageName,AAction:string): Boolean;
    function Execute: Boolean; virtual; abstract;
    Property PackageName:string Read FPackageName;
  end;
  TPackageHandlerClass = class of TPackageHandler;

  EPackageHandler = Class(Exception);

// Actions/PkgHandler
procedure RegisterPkgHandler(const AAction:string;pkghandlerclass:TPackageHandlerClass);
function GetPkgHandler(const AAction:string):TPackageHandlerClass;
function ExecuteAction(const APackageName,AAction:string; PackageManager: TpkgFPpkg): Boolean;

function PackageManifestFile(APackage:TFPPackage): String;
procedure ClearExecutedAction;

Implementation

uses
  typinfo,
  contnrs,
  uriparser,
  pkgrepos,
  pkgmessages;

var
  PkgHandlerList  : TFPHashList;
  ExecutedActions : TFPHashList;
  CurrentDir      : string;

procedure RegisterPkgHandler(const AAction:string;pkghandlerclass:TPackageHandlerClass);
begin
  if PkgHandlerList.Find(AAction)<>nil then
    begin
      Raise EPackageHandler.CreateFmt(SErrActionAlreadyRegistered,[AAction]);
      exit;
    end;
  PkgHandlerList.Add(AAction,pkghandlerclass);
end;

function GetPkgHandler(const AAction:string):TPackageHandlerClass;
begin
  result:=TPackageHandlerClass(PkgHandlerList.Find(AAction));
  if result=nil then
    Raise EPackageHandler.CreateFmt(SErrActionNotFound,[AAction]);
end;

function ExecuteAction(const APackageName,AAction:string; PackageManager: TpkgFPpkg): Boolean;
var
  pkghandlerclass : TPackageHandlerClass;
  FullActionName : string;
begin
  Result := True;
  // Check if we have already executed or are executing the action
  FullActionName:=APackageName+AAction;
  if ExecutedActions.Find(FullActionName)<>nil then
    begin
      Log(llDebug,'Already executed or executing action '+FullActionName);
      exit;
    end;

  ExecutedActions.Add(FullActionName,Pointer(PtrUInt(1)));

  // Create action handler class
  pkghandlerclass:=GetPkgHandler(AAction);
  With pkghandlerclass.Create(nil,PackageManager,APackageName) do
    try
      Log(llDebug,SLogRunAction+' start',[AAction]);
      Result := Execute;
      Log(llDebug,SLogRunAction+' end',[AAction]);
    finally
      Free;
    end;
end;

function PackageManifestFile(APackage:TFPPackage): String;
begin
  Result:=ManifestFileName;
end;

procedure ClearExecutedAction;
begin
  ExecutedActions.Clear;
end;

{ TPackageHandler }

Constructor TPackageHandler.Create(AOwner: TComponent; APackageManager: TpkgFPpkg;
  const APackageName: string);
begin
  inherited Create(AOwner);
  FPackageName:=APackageName;
  FPackageManager:=APackageManager;
end;

{$ifdef HAS_UNIT_PROCESS}
function ExecuteFPC(const Path: string; const ComLine: string): integer;
var
  P: TProcess;
  ConsoleOutput: TMemoryStream;
  BytesRead: longint;

  function ReadFromStream: longint;

  const
    READ_BYTES = 2048;

  var
    n: longint;
    BuffPos: longint;
    sLine: string;
    ch: char;
  begin
    // make sure we have room
    ConsoleOutput.SetSize(BytesRead + READ_BYTES);

    // try reading it
    n := P.Output.Read((ConsoleOutput.Memory + BytesRead)^, READ_BYTES);
    if n > 0 then
    begin
      Inc(BytesRead, n);

      sLine := '';
      BuffPos := ConsoleOutput.Position;

      //read lines from the stream
      repeat
        ConsoleOutput.Read(ch,1);

        if ch in [#10, #13] then
        begin
          log(llProgress,sLine);
          sLine := '';
          BuffPos := ConsoleOutput.Position;
        end
        else
          sLine := sLine + ch;

      until ConsoleOutput.Position >= BytesRead;

      ConsoleOutput.Position := BuffPos;
    end
    else
    begin
      // no data, wait 100 ms
      Sleep(100);
    end;

    Result := n;
  end;

begin
  result := -1;
  BytesRead := 0;
  ConsoleOutput := TMemoryStream.Create;
  try
    P := TProcess.Create(nil);
    try
      P.CommandLine := Path + ' ' + ComLine;
      P.Options := [poUsePipes];
      P.Execute;
      while P.Running do
        ReadFromStream;

      // read last part
      repeat
      until ReadFromStream = 0;
      ConsoleOutput.SetSize(BytesRead);

      result := P.ExitStatus;
    finally
      P.Free;
    end;
  finally
    ConsoleOutput.Free;
  end;
end;
{$endif HAS_UNIT_PROCESS}

Function TPackageHandler.ExecuteProcess(Const Prog,Args:String):Integer;
begin
  Log(llCommands,SLogExecute,[Prog,Args]);
  Flush(StdOut);
{$ifdef HAS_UNIT_PROCESS}
  Result:=ExecuteFPC(Prog,Args);
{$else HAS_UNIT_PROCESS}
  Result:=SysUtils.ExecuteProcess(Prog,Args);
{$endif HAS_UNIT_PROCESS}
end;

Procedure TPackageHandler.SetCurrentDir(Const ADir:String);
begin
  Log(llCommands,SLogChangeDir,[ADir]);
  if not SysUtils.SetCurrentDir(ADir) then
    Error(SErrChangeDirFailed,[ADir]);
end;

function TPackageHandler.PackageLogPrefix:String;
begin
  if PackageName<>'' then
    Result:='['+PackageName+'] '
  else
    Result:='';
end;

function TPackageHandler.ExecuteAction(const APackageName, AAction: string): Boolean;
begin
  Result := pkghandler.ExecuteAction(APackageName,AAction,PackageManager);
end;

Procedure TPackageHandler.Log(Level:TLogLevel; Msg:String);
begin
  pkgglobals.Log(Level,PackageLogPrefix+Msg);
end;

Procedure TPackageHandler.Log(Level:TLogLevel; Fmt:String; const Args:array of const);
begin
  pkgglobals.log(Level,PackageLogPrefix+Fmt,Args);
end;

Procedure TPackageHandler.Error(Msg:String);
begin
  pkgglobals.Error(PackageLogPrefix+Msg);
end;

Procedure TPackageHandler.Error(Fmt:String; const Args:array of const);
begin
  pkgglobals.Error(PackageLogPrefix+Fmt,Args);
end;

initialization
  PkgHandlerList:=TFPHashList.Create;
  ExecutedActions:=TFPHashList.Create;
finalization
  FreeAndNil(PkgHandlerList);
  FreeAndNil(ExecutedActions);
end.

{'repo_name': 'graemeg/freepascal', 'stars': '350', 'repo_language': 'Pascal', 'file_name': 'Makefile', 'mime_type': 'text/plain', 'hash': 2139526469859544319, 'source_dataset': 'data'}


/*
 * Copyright (C) 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "suggest/policyimpl/typing/typing_suggest_policy.h"

namespace latinime {
const TypingSuggestPolicy TypingSuggestPolicy::sInstance;
} // namespace latinime

{'repo_name': 'smc/Indic-Keyboard', 'stars': '103', 'repo_language': 'Java', 'file_name': 'sample.combined', 'mime_type': 'text/plain', 'hash': 1180582089611446700, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:aapt="http://schemas.android.com/aapt">
    <item android:state_focused="true" android:drawable="@drawable/aul"/>
    <item android:state_pressed="true" android:drawable="@drawable/aul"/>
    <item android:state_selected="true" android:drawable="@drawable/aul"/>
    <item android:drawable="@drawable/auk"/>
</selector>

{'repo_name': 'HelloHuDi/AndroidReverseNotes', 'stars': '116', 'repo_language': 'Smali', 'file_name': 'v.java', 'mime_type': 'text/x-java', 'hash': -2831008059092171671, 'source_dataset': 'data'}


// just pre-load all the stuff that index.js lazily exports
const internalRe = require('./internal/re')
module.exports = {
  re: internalRe.re,
  src: internalRe.src,
  tokens: internalRe.t,
  SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION,
  SemVer: require('./classes/semver'),
  compareIdentifiers: require('./internal/identifiers').compareIdentifiers,
  rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers,
  parse: require('./functions/parse'),
  valid: require('./functions/valid'),
  clean: require('./functions/clean'),
  inc: require('./functions/inc'),
  diff: require('./functions/diff'),
  major: require('./functions/major'),
  minor: require('./functions/minor'),
  patch: require('./functions/patch'),
  prerelease: require('./functions/prerelease'),
  compare: require('./functions/compare'),
  rcompare: require('./functions/rcompare'),
  compareLoose: require('./functions/compare-loose'),
  compareBuild: require('./functions/compare-build'),
  sort: require('./functions/sort'),
  rsort: require('./functions/rsort'),
  gt: require('./functions/gt'),
  lt: require('./functions/lt'),
  eq: require('./functions/eq'),
  neq: require('./functions/neq'),
  gte: require('./functions/gte'),
  lte: require('./functions/lte'),
  cmp: require('./functions/cmp'),
  coerce: require('./functions/coerce'),
  Comparator: require('./classes/comparator'),
  Range: require('./classes/range'),
  satisfies: require('./functions/satisfies'),
  toComparators: require('./ranges/to-comparators'),
  maxSatisfying: require('./ranges/max-satisfying'),
  minSatisfying: require('./ranges/min-satisfying'),
  minVersion: require('./ranges/min-version'),
  validRange: require('./ranges/valid'),
  outside: require('./ranges/outside'),
  gtr: require('./ranges/gtr'),
  ltr: require('./ranges/ltr'),
  intersects: require('./ranges/intersects'),
  simplifyRange: require('./ranges/simplify'),
  subset: require('./ranges/subset'),
}

{'repo_name': 'nodejs/node', 'stars': '71611', 'repo_language': 'JavaScript', 'file_name': 'rc4-586.s', 'mime_type': 'text/x-asm', 'hash': 7980732461228535357, 'source_dataset': 'data'}


// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package codestar

const (

	// ErrCodeConcurrentModificationException for service response error code
	// "ConcurrentModificationException".
	//
	// Another modification is being made. That modification must complete before
	// you can make your change.
	ErrCodeConcurrentModificationException = "ConcurrentModificationException"

	// ErrCodeInvalidNextTokenException for service response error code
	// "InvalidNextTokenException".
	//
	// The next token is not valid.
	ErrCodeInvalidNextTokenException = "InvalidNextTokenException"

	// ErrCodeInvalidServiceRoleException for service response error code
	// "InvalidServiceRoleException".
	//
	// The service role is not valid.
	ErrCodeInvalidServiceRoleException = "InvalidServiceRoleException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// A resource limit has been exceeded.
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodeProjectAlreadyExistsException for service response error code
	// "ProjectAlreadyExistsException".
	//
	// An AWS CodeStar project with the same ID already exists in this region for
	// the AWS account. AWS CodeStar project IDs must be unique within a region
	// for the AWS account.
	ErrCodeProjectAlreadyExistsException = "ProjectAlreadyExistsException"

	// ErrCodeProjectConfigurationException for service response error code
	// "ProjectConfigurationException".
	//
	// Project configuration information is required but not specified.
	ErrCodeProjectConfigurationException = "ProjectConfigurationException"

	// ErrCodeProjectCreationFailedException for service response error code
	// "ProjectCreationFailedException".
	//
	// The project creation request was valid, but a nonspecific exception or error
	// occurred during project creation. The project could not be created in AWS
	// CodeStar.
	ErrCodeProjectCreationFailedException = "ProjectCreationFailedException"

	// ErrCodeProjectNotFoundException for service response error code
	// "ProjectNotFoundException".
	//
	// The specified AWS CodeStar project was not found.
	ErrCodeProjectNotFoundException = "ProjectNotFoundException"

	// ErrCodeTeamMemberAlreadyAssociatedException for service response error code
	// "TeamMemberAlreadyAssociatedException".
	//
	// The team member is already associated with a role in this project.
	ErrCodeTeamMemberAlreadyAssociatedException = "TeamMemberAlreadyAssociatedException"

	// ErrCodeTeamMemberNotFoundException for service response error code
	// "TeamMemberNotFoundException".
	//
	// The specified team member was not found.
	ErrCodeTeamMemberNotFoundException = "TeamMemberNotFoundException"

	// ErrCodeUserProfileAlreadyExistsException for service response error code
	// "UserProfileAlreadyExistsException".
	//
	// A user profile with that name already exists in this region for the AWS account.
	// AWS CodeStar user profile names must be unique within a region for the AWS
	// account.
	ErrCodeUserProfileAlreadyExistsException = "UserProfileAlreadyExistsException"

	// ErrCodeUserProfileNotFoundException for service response error code
	// "UserProfileNotFoundException".
	//
	// The user profile was not found.
	ErrCodeUserProfileNotFoundException = "UserProfileNotFoundException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	//
	// The specified input is either not valid, or it could not be validated.
	ErrCodeValidationException = "ValidationException"
)

{'repo_name': 'amazon-archives/aws-service-operator', 'stars': '747', 'repo_language': 'Go', 'file_name': 'PATENTS', 'mime_type': 'text/plain', 'hash': 1793790041287385524, 'source_dataset': 'data'}


from unittest import mock

import pytest
from urllib3.response import HTTPHeaderDict

from briefcase.exceptions import (
    BadNetworkResourceError,
    MissingNetworkResourceError
)

@pytest.mark.parametrize(
    'url,content_disposition',
    [
        # A `None` value for `content_disposition` means we skip the header.
        # Other values are passed through as HTTP header values.
        ('https://example.com/path/to/something.zip', None),
        # Ensure empty header is ignored.
        ('https://example.com/path/to/something.zip', ''),
        # Paradigmatic case for Content-Disposition: attachment.
        ('https://example.com/path/to/irrelevant.zip',
            'attachment; filename=something.zip'),
        # Ensure extra parameters are ignored.
        ('https://example.com/path/to/irrelevant.zip',
            'attachment; filename=something.zip; ignored=okay'),
        # Ensure garbage headers are ignored.
        ('https://example.com/path/to/something.zip',
            'garbage'),
        # Ensure we respect unusual quoting & case permitted by RFC 6266.
        ('https://example.com/path/to/irrelevant.zip',
            'ATTACHment; filename=    "something.zip"'),
        # Ensure we use filename=, even if filename*= is provided. This makes us a
        # "legacy user agent" in the terms of RFC 6266, for our own simplicity.
        ('https://example.com/path/to/irrelevant.zip',
            'attachment; filename="something.zip"; filename*=utf-8' "''%e2%82%ac%20rates"),
    ]
)
def test_new_download_oneshot(base_command, url, content_disposition):
    base_command.requests = mock.MagicMock()
    response = mock.MagicMock()
    response.url = url
    response.status_code = 200
    response.headers = mock.Mock(wraps=HTTPHeaderDict({
            'content-disposition': content_disposition,
        } if content_disposition is not None else {}))
    response.content = b'all content'
    base_command.requests.get.return_value = response

    # Download the file
    filename = base_command.download_url(
        url='https://example.com/support?useful=Yes',
        download_path=base_command.base_path / 'downloads',
    )

    # requests.get has been invoked, but content isn't iterated
    base_command.requests.get.assert_called_with(
        'https://example.com/support?useful=Yes',
        stream=True,
    )
    response.headers.get.assert_called_with('content-length')
    response.iter_content.assert_not_called()

    # The filename is derived from the URL or header
    assert filename == base_command.base_path / 'downloads' / 'something.zip'

    # File content is as expected
    with (base_command.base_path / 'downloads' / 'something.zip').open() as f:
        assert f.read() == 'all content'

def test_new_download_chunked(base_command):
    base_command.requests = mock.MagicMock()
    response = mock.MagicMock()
    response.url = 'https://example.com/path/to/something.zip'
    response.status_code = 200
    response.headers.get.return_value = '24'
    response.iter_content.return_value = iter([
        b'chunk-1;',
        b'chunk-2;',
        b'chunk-3;',
    ])
    base_command.requests.get.return_value = response

    # Download the file
    filename = base_command.download_url(
        url='https://example.com/support?useful=Yes',
        download_path=base_command.base_path
    )

    # requests.get has been invoked, and content is chunked.
    base_command.requests.get.assert_called_with(
        'https://example.com/support?useful=Yes',
        stream=True,
    )
    response.headers.get.assert_called_with('content-length')
    response.iter_content.assert_called_once_with(chunk_size=1048576)

    # The filename is derived from the URL
    assert filename == base_command.base_path / 'something.zip'

    # The downloaded file exists, and content is as expected
    assert filename.exists()
    with (base_command.base_path / 'something.zip').open() as f:
        assert f.read() == 'chunk-1;chunk-2;chunk-3;'

def test_already_downloaded(base_command):
    # Create an existing file
    existing_file = base_command.base_path / 'something.zip'
    with (existing_file).open('w') as f:
        f.write('existing content')

    base_command.requests = mock.MagicMock()
    response = mock.MagicMock()
    response.headers.get.return_value = ''
    response.url = 'https://example.com/path/to/something.zip'
    response.status_code = 200
    base_command.requests.get.return_value = response

    # Download the file
    filename = base_command.download_url(
        url='https://example.com/support?useful=Yes',
        download_path=base_command.base_path
    )

    # The GET request will have been made
    base_command.requests.get.assert_called_with(
        'https://example.com/support?useful=Yes',
        stream=True,
    )

    # The request's Content-Disposition header is consumed to
    # examine the filename; the request is abandoned before
    # any other headers are read.
    response.headers.get.assert_called_once_with('Content-Disposition')

    # but the file existed, so the method returns
    assert filename == existing_file
    assert filename.exists()

def test_missing_resource(base_command):
    base_command.requests = mock.MagicMock()
    response = mock.MagicMock()
    response.status_code = 404

    base_command.requests.get.return_value = response

    # Download the file
    with pytest.raises(MissingNetworkResourceError):
        base_command.download_url(
            url='https://example.com/support?useful=Yes',
            download_path=base_command.base_path
        )

    # requests.get has been invoked, but nothing else.
    base_command.requests.get.assert_called_with(
        'https://example.com/support?useful=Yes',
        stream=True,
    )
    response.headers.get.assert_not_called()

    # The file doesn't exist as a result of the download failure
    assert not (base_command.base_path / 'something.zip').exists()

def test_bad_resource(base_command):
    base_command.requests = mock.MagicMock()
    response = mock.MagicMock()
    response.status_code = 500

    base_command.requests.get.return_value = response

    # Download the file
    with pytest.raises(BadNetworkResourceError):
        base_command.download_url(
            url='https://example.com/support?useful=Yes',
            download_path=base_command.base_path
        )

    # requests.get has been invoked, but nothing else.
    base_command.requests.get.assert_called_with(
        'https://example.com/support?useful=Yes',
        stream=True,
    )
    response.headers.get.assert_not_called()

    # The file doesn't exist as a result of the download failure
    assert not (base_command.base_path / 'something.zip').exists()

{'repo_name': 'beeware/briefcase', 'stars': '809', 'repo_language': 'Python', 'file_name': 'test_call.py', 'mime_type': 'text/x-python', 'hash': 5812601831061380655, 'source_dataset': 'data'}


using System;
using System.Collections.Generic;
using Dev2.Common.Interfaces.DB;

namespace Dev2.Common.Interfaces
{
    public interface IWcfService
    {
        string Name { get; set; }
        Guid Id { get; set; }
        IWcfServerSource Source { get; set; }
        IList<IServiceInput> Inputs { get; set; }
        IList<IServiceOutputMapping> OutputMappings { get; set; }
        string Path { get; set; }
        IWcfAction Action { get; set; }
    }
}

{'repo_name': 'Warewolf-ESB/Warewolf', 'stars': '227', 'repo_language': 'C#', 'file_name': 'testElasticsearchSource.xml', 'mime_type': 'text/plain', 'hash': 5948946056465699123, 'source_dataset': 'data'}


// Configuration for ImageMin task(s)
// Compresses jpg, jpeg, png, and svg files
'use strict';

var pngquant = require('imagemin-pngquant');
var svgo = require('imagemin-svgo');

var taskConfig = function(grunt) {

  grunt.config.set('imagemin', {
    dist: {
      options: {
        use: [pngquant({ quality: '65-80', speed: 4 }), svgo()]
      },
      files: [{
        expand: true,
        cwd: '<%= snippod.client %>/static/images',
        src: '**/*.{jpg,jpeg,gif,png,svg}',
        dest: '<%= snippod.dist %>/client/images'
      }]
    }
  });

};

module.exports = taskConfig;

{'repo_name': 'shalomeir/snippod-boilerplate', 'stars': '120', 'repo_language': 'JavaScript', 'file_name': 'prod.txt', 'mime_type': 'text/plain', 'hash': 8601230142732496149, 'source_dataset': 'data'}


/**
 * @file quests.cpp
 *
 * Implementation of functionality for handling quests.
 */
#include "all.h"

DEVILUTION_BEGIN_NAMESPACE

int qtopline;
BOOL questlog;
BYTE *pQLogCel;
/** Contains the quests of the current game. */
QuestStruct quests[MAXQUESTS];
int qline;
int qlist[MAXQUESTS];
int numqlines;
int WaterDone;
int ReturnLvlX;
int ReturnLvlY;
int ReturnLvlT;
int ReturnLvl;

/** Contains the data related to each quest_id. */
QuestData questlist[MAXQUESTS] = {
	// clang-format off
	// _qdlvl, _qdmultlvl, _qlvlt,          _qdtype,   _qdrnd, _qslvl, _qflags, _qdmsg,         _qlstr
	{       5,         -1, DTYPE_NONE,      Q_ROCK,  100,      0,       0, TEXT_INFRA5,   "The Magic Rock"           },
	{       9,         -1, DTYPE_NONE,      Q_MUSHROOM,   100,      0,       0, TEXT_MUSH8,    "Black Mushroom"           },
	{       4,         -1, DTYPE_NONE,      Q_GARBUD,   100,      0,       0, TEXT_GARBUD1,  "Gharbad The Weak"         },
	{       8,         -1, DTYPE_NONE,      Q_ZHAR,   100,      0,       0, TEXT_ZHAR1,    "Zhar the Mad"             },
	{      14,         -1, DTYPE_NONE,      Q_VEIL,   100,      0,       0, TEXT_VEIL9,    "Lachdanan"                },
	{      15,         -1, DTYPE_NONE,      Q_DIABLO,    100,      0,       1, TEXT_VILE3,    "Diablo"                   },
	{       2,          2, DTYPE_NONE,      Q_BUTCHER,  100,      0,       1, TEXT_BUTCH9,   "The Butcher"              },
	{       4,         -1, DTYPE_NONE,      Q_LTBANNER,    100,      0,       0, TEXT_BANNER2,  "Ogden's Sign"             },
	{       7,         -1, DTYPE_NONE,      Q_BLIND,  100,      0,       0, TEXT_BLINDING, "Halls of the Blind"       },
	{       5,         -1, DTYPE_NONE,      Q_BLOOD,  100,      0,       0, TEXT_BLOODY,   "Valor"                    },
	{      10,         -1, DTYPE_NONE,      Q_ANVIL,  100,      0,       0, TEXT_ANVIL5,   "Anvil of Fury"            },
	{      13,         -1, DTYPE_NONE,      Q_WARLORD, 100,      0,       0, TEXT_BLOODWAR, "Warlord of Blood"         },
	{       3,          3, DTYPE_CATHEDRAL, Q_SKELKING,   100,      1,       1, TEXT_KING2,    "The Curse of King Leoric" },
	{       2,         -1, DTYPE_CAVES,     Q_PWATER,     100,      4,       0, TEXT_POISON3,  "Poisoned Water Supply"    },
	{       6,         -1, DTYPE_CATACOMBS, Q_SCHAMB,   100,      2,       0, TEXT_BONER,    "The Chamber of Bone"      },
	{      15,         15, DTYPE_CATHEDRAL, Q_BETRAYER,     100,      5,       1, TEXT_VILE1,    "Archbishop Lazarus"       },
	// clang-format on
};
/**
 * Specifies a delta in X-coordinates from the quest entrance for
 * which the hover text of the cursor will be visible.
 */
char questxoff[7] = { 0, -1, 0, -1, -2, -1, -2 };
/**
 * Specifies a delta in Y-coordinates from the quest entrance for
 * which the hover text of the cursor will be visible.
 */
char questyoff[7] = { 0, 0, -1, -1, -1, -2, -2 };
char *questtrigstr[5] = {
	"King Leoric's Tomb",
	"The Chamber of Bone",
	"Maze",
	"A Dark Passage",
	"Unholy Altar"
};
/**
 * A quest group containing the three quests the Butcher,
 * Ogden's Sign and Gharbad the Weak, which ensures that exactly
 * two of these three quests appear in any single player game.
 */
int QuestGroup1[3] = { Q_BUTCHER, Q_LTBANNER, Q_GARBUD };
/**
 * A quest group containing the three quests Halls of the Blind,
 * the Magic Rock and Valor, which ensures that exactly two of
 * these three quests appear in any single player game.
 */
int QuestGroup2[3] = { Q_BLIND, Q_ROCK, Q_BLOOD };
/**
 * A quest group containing the three quests Black Mushroom,
 * Zhar the Mad and Anvil of Fury, which ensures that exactly
 * two of these three quests appear in any single player game.
 */
int QuestGroup3[3] = { Q_MUSHROOM, Q_ZHAR, Q_ANVIL };
/**
 * A quest group containing the two quests Lachdanan and Warlord
 * of Blood, which ensures that exactly one of these two quests
 * appears in any single player game.
 */
int QuestGroup4[2] = { Q_VEIL, Q_WARLORD };

void InitQuests()
{
	int i, initiatedQuests;
	DWORD z;

	if (gbMaxPlayers == 1) {
		for (i = 0; i < MAXQUESTS; i++) {
			quests[i]._qactive = QUEST_NOTAVAIL;
		}
	} else {
		for (i = 0; i < MAXQUESTS; i++) {
			if (!(questlist[i]._qflags & 1)) {
				quests[i]._qactive = QUEST_NOTAVAIL;
			}
		}
	}

	questlog = FALSE;
	PentSpn2Frame = 1;
	WaterDone = 0;
	initiatedQuests = 0;

	for (z = 0; z < MAXQUESTS; z++) {
		if (gbMaxPlayers <= 1 || questlist[z]._qflags & 1) {
			quests[z]._qtype = questlist[z]._qdtype;
			if (gbMaxPlayers > 1) {
				quests[z]._qlevel = questlist[z]._qdmultlvl;
				if (!delta_quest_inited(initiatedQuests)) {
					quests[z]._qactive = QUEST_INIT;
					quests[z]._qvar1 = 0;
					quests[z]._qlog = 0;
				}
				initiatedQuests++;
			} else {
				quests[z]._qactive = QUEST_INIT;
				quests[z]._qlevel = questlist[z]._qdlvl;
				quests[z]._qvar1 = 0;
				quests[z]._qlog = 0;
			}

			quests[z]._qslvl = questlist[z]._qslvl;
			quests[z]._qtx = 0;
			quests[z]._qty = 0;
			quests[z]._qidx = z;
			quests[z]._qlvltype = questlist[z]._qlvlt;
			quests[z]._qvar2 = 0;
			quests[z]._qmsg = questlist[z]._qdmsg;
		}
	}

	if (gbMaxPlayers == 1) {
		SetRndSeed(glSeedTbl[15]);
		if (random_(0, 2))
			quests[Q_PWATER]._qactive = QUEST_NOTAVAIL;
		else
			quests[Q_SKELKING]._qactive = QUEST_NOTAVAIL;

		quests[QuestGroup1[random_(0, sizeof(QuestGroup1) / sizeof(int))]]._qactive = QUEST_NOTAVAIL;
		quests[QuestGroup2[random_(0, sizeof(QuestGroup2) / sizeof(int))]]._qactive = QUEST_NOTAVAIL;
		quests[QuestGroup3[random_(0, sizeof(QuestGroup3) / sizeof(int))]]._qactive = QUEST_NOTAVAIL;
		quests[QuestGroup4[random_(0, sizeof(QuestGroup4) / sizeof(int))]]._qactive = QUEST_NOTAVAIL;
	}
#ifdef _DEBUG
	if (questdebug != -1)
		quests[questdebug]._qactive = QUEST_ACTIVE;
#endif

#ifdef SPAWN
	for (z = 0; z < MAXQUESTS; z++) {
		quests[z]._qactive = QUEST_NOTAVAIL;
	}
#endif

	if (!quests[Q_SKELKING]._qactive)
		quests[Q_SKELKING]._qvar2 = 2;
	if (!quests[Q_ROCK]._qactive)
		quests[Q_ROCK]._qvar2 = 2;
	quests[Q_LTBANNER]._qvar1 = 1;
	if (gbMaxPlayers != 1)
		quests[Q_BETRAYER]._qvar1 = 2;
}

void CheckQuests()
{
#ifndef SPAWN
	int i, rportx, rporty;

	if (QuestStatus(Q_BETRAYER) && gbMaxPlayers != 1 && quests[Q_BETRAYER]._qvar1 == 2) {
		AddObject(OBJ_ALTBOY, 2 * setpc_x + 20, 2 * setpc_y + 22);
		quests[Q_BETRAYER]._qvar1 = 3;
		NetSendCmdQuest(TRUE, Q_BETRAYER);
	}

	if (gbMaxPlayers != 1) {
		return;
	}

	if (currlevel == quests[Q_BETRAYER]._qlevel
	    && !setlevel
	    && quests[Q_BETRAYER]._qvar1 >= 2
	    && (quests[Q_BETRAYER]._qactive == QUEST_ACTIVE || quests[Q_BETRAYER]._qactive == QUEST_DONE)
	    && (quests[Q_BETRAYER]._qvar2 == 0 || quests[Q_BETRAYER]._qvar2 == 2)) {
		quests[Q_BETRAYER]._qtx = 2 * quests[Q_BETRAYER]._qtx + 16;
		quests[Q_BETRAYER]._qty = 2 * quests[Q_BETRAYER]._qty + 16;
		rportx = quests[Q_BETRAYER]._qtx;
		rporty = quests[Q_BETRAYER]._qty;
		AddMissile(rportx, rporty, rportx, rporty, 0, MIS_RPORTAL, 0, myplr, 0, 0);
		quests[Q_BETRAYER]._qvar2 = 1;
		if (quests[Q_BETRAYER]._qactive == QUEST_ACTIVE) {
			quests[Q_BETRAYER]._qvar1 = 3;
		}
	}

	if (quests[Q_BETRAYER]._qactive == QUEST_DONE
	    && setlevel
	    && setlvlnum == SL_VILEBETRAYER
	    && quests[Q_BETRAYER]._qvar2 == 4) {
		rportx = 35;
		rporty = 32;
		AddMissile(rportx, rporty, rportx, rporty, 0, MIS_RPORTAL, 0, myplr, 0, 0);
		quests[Q_BETRAYER]._qvar2 = 3;
	}

	if (setlevel) {
		if (setlvlnum == quests[Q_PWATER]._qslvl
		    && quests[Q_PWATER]._qactive != QUEST_INIT
		    && leveltype == quests[Q_PWATER]._qlvltype
		    && nummonsters == 4
		    && quests[Q_PWATER]._qactive != QUEST_DONE) {
			quests[Q_PWATER]._qactive = QUEST_DONE;
			PlaySfxLoc(IS_QUESTDN, plr[myplr]._px, plr[myplr]._py);
			LoadPalette("Levels\\L3Data\\L3pwater.pal");
			WaterDone = 32;
		}
		if (WaterDone > 0) {
			palette_update_quest_palette(WaterDone);
			WaterDone--;
		}
	} else if (plr[myplr]._pmode == PM_STAND) {
		for (i = 0; i < MAXQUESTS; i++) {
			if (currlevel == quests[i]._qlevel
			    && quests[i]._qslvl != 0
			    && quests[i]._qactive != QUEST_NOTAVAIL
			    && plr[myplr]._px == quests[i]._qtx
			    && plr[myplr]._py == quests[i]._qty) {
				if (quests[i]._qlvltype != DTYPE_NONE) {
					setlvltype = quests[i]._qlvltype;
				}
				StartNewLvl(myplr, WM_DIABSETLVL, quests[i]._qslvl);
			}
		}
	}
#endif
}

BOOL ForceQuests()
{
#ifndef SPAWN
	int i, j, qx, qy, ql;

	if (gbMaxPlayers != 1) {
		return FALSE;
	}

	for (i = 0; i < MAXQUESTS; i++) {

		if (i != Q_BETRAYER && currlevel == quests[i]._qlevel && quests[i]._qslvl != 0) {
			ql = quests[quests[i]._qidx]._qslvl - 1;
			qx = quests[i]._qtx;
			qy = quests[i]._qty;

			for (j = 0; j < 7; j++) {
				if (qx + questxoff[j] == cursmx && qy + questyoff[j] == cursmy) {
					sprintf(infostr, "To %s", questtrigstr[ql]);
					cursmx = qx;
					cursmy = qy;
					return TRUE;
				}
			}
		}
	}
#endif

	return FALSE;
}

BOOL QuestStatus(int i)
{
	BOOL result;

	if (setlevel
	    || currlevel != quests[i]._qlevel
	    || !quests[i]._qactive
	    || (result = 1, gbMaxPlayers != 1) && !(questlist[i]._qflags & 1)) {
		result = FALSE;
	}
	return result;
}

void CheckQuestKill(int m, BOOL sendmsg)
{
#ifndef SPAWN
	int i, j;

	if (monster[m].MType->mtype == MT_SKING) {
		quests[Q_SKELKING]._qactive = QUEST_DONE;
		sfxdelay = 30;
		if (plr[myplr]._pClass == PC_WARRIOR) {
			sfxdnum = PS_WARR82;
		} else if (plr[myplr]._pClass == PC_ROGUE) {
			sfxdnum = PS_ROGUE82;
		} else if (plr[myplr]._pClass == PC_SORCERER) {
			sfxdnum = PS_MAGE82;
		}
		if (sendmsg)
			NetSendCmdQuest(TRUE, Q_SKELKING);

	} else if (monster[m].MType->mtype == MT_CLEAVER) {
		quests[Q_BUTCHER]._qactive = QUEST_DONE;
		sfxdelay = 30;
		if (plr[myplr]._pClass == PC_WARRIOR) {
			sfxdnum = PS_WARR80;
		} else if (plr[myplr]._pClass == PC_ROGUE) {
			sfxdnum = PS_ROGUE80;
		} else if (plr[myplr]._pClass == PC_SORCERER) {
			sfxdnum = PS_MAGE80;
		}
		if (sendmsg)
			NetSendCmdQuest(TRUE, Q_BUTCHER);
	} else if (monster[m].mName == UniqMonst[UMT_GARBUD].mName) { //"Gharbad the Weak"
		quests[Q_GARBUD]._qactive = QUEST_DONE;
		sfxdelay = 30;
		if (plr[myplr]._pClass == PC_WARRIOR) {
			sfxdnum = PS_WARR61;
		} else if (plr[myplr]._pClass == PC_ROGUE) {
			sfxdnum = PS_ROGUE61;
		} else if (plr[myplr]._pClass == PC_SORCERER) {
			sfxdnum = PS_MAGE61;
		}
	} else if (monster[m].mName == UniqMonst[UMT_ZHAR].mName) { //"Zhar the Mad"
		quests[Q_ZHAR]._qactive = QUEST_DONE;
		sfxdelay = 30;
		if (plr[myplr]._pClass == PC_WARRIOR) {
			sfxdnum = PS_WARR62;
		} else if (plr[myplr]._pClass == PC_ROGUE) {
			sfxdnum = PS_ROGUE62;
		} else if (plr[myplr]._pClass == PC_SORCERER) {
			sfxdnum = PS_MAGE62;
		}
	} else if (monster[m].mName == UniqMonst[UMT_LAZURUS].mName && gbMaxPlayers != 1) { //"Arch-Bishop Lazarus"
		quests[Q_BETRAYER]._qactive = QUEST_DONE;
		quests[Q_BETRAYER]._qvar1 = 7;
		sfxdelay = 30;
		quests[Q_DIABLO]._qactive = QUEST_ACTIVE;

		for (j = 0; j < MAXDUNY; j++) {
			for (i = 0; i < MAXDUNX; i++) {
				if (dPiece[i][j] == 370) {
					trigs[numtrigs]._tx = i;
					trigs[numtrigs]._ty = j;
					trigs[numtrigs]._tmsg = WM_DIABNEXTLVL;
					numtrigs++;
				}
			}
		}
		if (plr[myplr]._pClass == PC_WARRIOR) {
			sfxdnum = PS_WARR83;
		} else if (plr[myplr]._pClass == PC_ROGUE) {
			sfxdnum = PS_ROGUE83;
		} else if (plr[myplr]._pClass == PC_SORCERER) {
			sfxdnum = PS_MAGE83;
		}
		if (sendmsg) {
			NetSendCmdQuest(TRUE, Q_BETRAYER);
			NetSendCmdQuest(TRUE, Q_DIABLO);
		}
	} else if (monster[m].mName == UniqMonst[UMT_LAZURUS].mName && gbMaxPlayers == 1) { //"Arch-Bishop Lazarus"
		quests[Q_BETRAYER]._qactive = QUEST_DONE;
		sfxdelay = 30;
		InitVPTriggers();
		quests[Q_BETRAYER]._qvar1 = 7;
		quests[Q_BETRAYER]._qvar2 = 4;
		quests[Q_DIABLO]._qactive = QUEST_ACTIVE;
		AddMissile(35, 32, 35, 32, 0, MIS_RPORTAL, 0, myplr, 0, 0);
		if (plr[myplr]._pClass == PC_WARRIOR) {
			sfxdnum = PS_WARR83;
		} else if (plr[myplr]._pClass == PC_ROGUE) {
			sfxdnum = PS_ROGUE83;
		} else if (plr[myplr]._pClass == PC_SORCERER) {
			sfxdnum = PS_MAGE83;
		}
	} else if (monster[m].mName == UniqMonst[UMT_WARLORD].mName) { //"Warlord of Blood"
		quests[Q_WARLORD]._qactive = QUEST_DONE;
		sfxdelay = 30;
		if (plr[myplr]._pClass == PC_WARRIOR) {
			sfxdnum = PS_WARR94;
		} else if (plr[myplr]._pClass == PC_ROGUE) {
			sfxdnum = PS_ROGUE94;
		} else if (plr[myplr]._pClass == PC_SORCERER) {
			sfxdnum = PS_MAGE94;
		}
	}
#endif
}

void DrawButcher()
{
	int x, y;

	x = 2 * setpc_x + 16;
	y = 2 * setpc_y + 16;
	DRLG_RectTrans(x + 3, y + 3, x + 10, y + 10);
}

void DrawSkelKing(int q, int x, int y)
{
	quests[q]._qtx = 2 * x + 28;
	quests[q]._qty = 2 * y + 23;
}

void DrawWarLord(int x, int y)
{
	int rw, rh;
	int i, j;
	BYTE *sp, *setp;
	int v;

	setp = LoadFileInMem("Levels\\L4Data\\Warlord2.DUN", NULL);
	rw = *setp;
	sp = setp + 2;
	rh = *sp;
	sp += 2;
	setpc_w = rw;
	setpc_h = rh;
	setpc_x = x;
	setpc_y = y;
	for (j = y; j < y + rh; j++) {
		for (i = x; i < x + rw; i++) {
			if (*sp != 0) {
				v = *sp;
			} else {
				v = 6;
			}
			dungeon[i][j] = v;
			sp += 2;
		}
	}
	mem_free_dbg(setp);
}

void DrawSChamber(int q, int x, int y)
{
	int i, j;
	int rw, rh;
	int xx, yy;
	BYTE *sp, *setp;
	int v;

	setp = LoadFileInMem("Levels\\L2Data\\Bonestr1.DUN", NULL);
	rw = *setp;
	sp = setp + 2;
	rh = *sp;
	sp += 2;
	setpc_w = rw;
	setpc_h = rh;
	setpc_x = x;
	setpc_y = y;
	for (j = y; j < y + rh; j++) {
		for (i = x; i < x + rw; i++) {
			if (*sp != 0) {
				v = *sp;
			} else {
				v = 3;
			}
			dungeon[i][j] = v;
			sp += 2;
		}
	}
	xx = 2 * x + 22;
	yy = 2 * y + 23;
	quests[q]._qtx = xx;
	quests[q]._qty = yy;
	mem_free_dbg(setp);
}

void DrawLTBanner(int x, int y)
{
	int rw, rh;
	int i, j;
	BYTE *sp, *setp;

	setp = LoadFileInMem("Levels\\L1Data\\Banner1.DUN", NULL);
	rw = *setp;
	sp = setp + 2;
	rh = *sp;
	sp += 2;
	setpc_w = rw;
	setpc_h = rh;
	setpc_x = x;
	setpc_y = y;
	for (j = 0; j < rh; j++) {
		for (i = 0; i < rw; i++) {
			if (*sp != 0) {
				pdungeon[x + i][y + j] = *sp;
			}
			sp += 2;
		}
	}
	mem_free_dbg(setp);
}

void DrawBlind(int x, int y)
{
	int rw, rh;
	int i, j;
	BYTE *sp, *setp;

	setp = LoadFileInMem("Levels\\L2Data\\Blind1.DUN", NULL);
	rw = *setp;
	sp = setp + 2;
	rh = *sp;
	sp += 2;
	setpc_x = x;
	setpc_y = y;
	setpc_w = rw;
	setpc_h = rh;
	for (j = 0; j < rh; j++) {
		for (i = 0; i < rw; i++) {
			if (*sp != 0) {
				pdungeon[x + i][y + j] = *sp;
			}
			sp += 2;
		}
	}
	mem_free_dbg(setp);
}

void DrawBlood(int x, int y)
{
	int rw, rh;
	int i, j;
	BYTE *sp, *setp;

	setp = LoadFileInMem("Levels\\L2Data\\Blood2.DUN", NULL);
	rw = *setp;
	sp = setp + 2;
	rh = *sp;
	sp += 2;
	setpc_x = x;
	setpc_y = y;
	setpc_w = rw;
	setpc_h = rh;
	for (j = 0; j < rh; j++) {
		for (i = 0; i < rw; i++) {
			if (*sp != 0) {
				dungeon[x + i][y + j] = *sp;
			}
			sp += 2;
		}
	}
	mem_free_dbg(setp);
}

void DRLG_CheckQuests(int x, int y)
{
	int i;

	for (i = 0; i < MAXQUESTS; i++) {
		if (QuestStatus(i)) {
			switch (quests[i]._qtype) {
			case Q_BUTCHER:
				DrawButcher();
				break;
			case Q_LTBANNER:
				DrawLTBanner(x, y);
				break;
			case Q_BLIND:
				DrawBlind(x, y);
				break;
			case Q_BLOOD:
				DrawBlood(x, y);
				break;
			case Q_WARLORD:
				DrawWarLord(x, y);
				break;
			case Q_SKELKING:
				DrawSkelKing(i, x, y);
				break;
			case Q_SCHAMB:
				DrawSChamber(i, x, y);
				break;
			}
		}
	}
}

void SetReturnLvlPos()
{
	switch (setlvlnum) {
	case SL_SKELKING:
		ReturnLvlX = quests[Q_SKELKING]._qtx + 1;
		ReturnLvlY = quests[Q_SKELKING]._qty;
		ReturnLvl = quests[Q_SKELKING]._qlevel;
		ReturnLvlT = DTYPE_CATHEDRAL;
		break;
	case SL_BONECHAMB:
		ReturnLvlX = quests[Q_SCHAMB]._qtx + 1;
		ReturnLvlY = quests[Q_SCHAMB]._qty;
		ReturnLvl = quests[Q_SCHAMB]._qlevel;
		ReturnLvlT = DTYPE_CATACOMBS;
		break;
	case SL_POISONWATER:
		ReturnLvlX = quests[Q_PWATER]._qtx;
		ReturnLvlY = quests[Q_PWATER]._qty + 1;
		ReturnLvl = quests[Q_PWATER]._qlevel;
		ReturnLvlT = DTYPE_CATHEDRAL;
		break;
	case SL_VILEBETRAYER:
		ReturnLvlX = quests[Q_BETRAYER]._qtx + 1;
		ReturnLvlY = quests[Q_BETRAYER]._qty - 1;
		ReturnLvl = quests[Q_BETRAYER]._qlevel;
		ReturnLvlT = DTYPE_HELL;
		break;
	}
}

void GetReturnLvlPos()
{
	if (quests[Q_BETRAYER]._qactive == QUEST_DONE)
		quests[Q_BETRAYER]._qvar2 = 2;
	ViewX = ReturnLvlX;
	ViewY = ReturnLvlY;
	currlevel = ReturnLvl;
	leveltype = ReturnLvlT;
}

void ResyncMPQuests()
{
#ifndef SPAWN
	if (quests[Q_SKELKING]._qactive == QUEST_INIT
	    && currlevel >= quests[Q_SKELKING]._qlevel - 1
	    && currlevel <= quests[Q_SKELKING]._qlevel + 1) {
		quests[Q_SKELKING]._qactive = QUEST_ACTIVE;
		NetSendCmdQuest(TRUE, Q_SKELKING);
	}
	if (quests[Q_BUTCHER]._qactive == QUEST_INIT
	    && currlevel >= quests[Q_BUTCHER]._qlevel - 1
	    && currlevel <= quests[Q_BUTCHER]._qlevel + 1) {
		quests[Q_BUTCHER]._qactive = QUEST_ACTIVE;
		NetSendCmdQuest(TRUE, Q_BUTCHER);
	}
	if (quests[Q_BETRAYER]._qactive == QUEST_INIT && currlevel == quests[Q_BETRAYER]._qlevel - 1) {
		quests[Q_BETRAYER]._qactive = QUEST_ACTIVE;
		NetSendCmdQuest(TRUE, Q_BETRAYER);
	}
	if (QuestStatus(Q_BETRAYER))
		AddObject(OBJ_ALTBOY, 2 * setpc_x + 20, 2 * setpc_y + 22);
#endif
}

void ResyncQuests()
{
#ifndef SPAWN
	int i, tren, x, y;

	if (setlevel && setlvlnum == quests[Q_PWATER]._qslvl && quests[Q_PWATER]._qactive != QUEST_INIT && leveltype == quests[Q_PWATER]._qlvltype) {

		if (quests[Q_PWATER]._qactive == QUEST_DONE)
			LoadPalette("Levels\\L3Data\\L3pwater.pal");
		else
			LoadPalette("Levels\\L3Data\\L3pfoul.pal");

		for (i = 0; i <= 32; i++)
			palette_update_quest_palette(i);
	}

	if (QuestStatus(Q_LTBANNER)) {
		if (quests[Q_LTBANNER]._qvar1 == 1)
			ObjChangeMapResync(
			    setpc_w + setpc_x - 2,
			    setpc_h + setpc_y - 2,
			    setpc_w + setpc_x + 1,
			    setpc_h + setpc_y + 1);
		if (quests[Q_LTBANNER]._qvar1 == 2) {
			ObjChangeMapResync(
			    setpc_w + setpc_x - 2,
			    setpc_h + setpc_y - 2,
			    setpc_w + setpc_x + 1,
			    setpc_h + setpc_y + 1);
			ObjChangeMapResync(setpc_x, setpc_y, (setpc_w >> 1) + setpc_x + 2, (setpc_h >> 1) + setpc_y - 2);
			for (i = 0; i < nobjects; i++)
				SyncObjectAnim(objectactive[i]);
			tren = TransVal;
			TransVal = 9;
			DRLG_MRectTrans(setpc_x, setpc_y, (setpc_w >> 1) + setpc_x + 4, setpc_y + (setpc_h >> 1));
			TransVal = tren;
		}
		if (quests[Q_LTBANNER]._qvar1 == 3) {
			x = setpc_x;
			y = setpc_y;
			ObjChangeMapResync(x, y, x + setpc_w + 1, y + setpc_h + 1);
			for (i = 0; i < nobjects; i++)
				SyncObjectAnim(objectactive[i]);
			tren = TransVal;
			TransVal = 9;
			DRLG_MRectTrans(setpc_x, setpc_y, (setpc_w >> 1) + setpc_x + 4, setpc_y + (setpc_h >> 1));
			TransVal = tren;
		}
	}
	if (currlevel == quests[Q_MUSHROOM]._qlevel) {
		if (quests[Q_MUSHROOM]._qactive == QUEST_INIT && !quests[Q_MUSHROOM]._qvar1) {
			SpawnQuestItem(IDI_FUNGALTM, 0, 0, 5, 1);
			quests[Q_MUSHROOM]._qvar1 = QS_TOMESPAWNED;
		} else {
			if (quests[Q_MUSHROOM]._qactive == QUEST_ACTIVE) {
				if (quests[Q_MUSHROOM]._qvar1 >= QS_MUSHGIVEN) {
					Qtalklist[TOWN_WITCH]._qblkm = -1;
					Qtalklist[TOWN_HEALER]._qblkm = TEXT_MUSH3;
				} else if (quests[Q_MUSHROOM]._qvar1 >= QS_BRAINGIVEN) {
					Qtalklist[TOWN_HEALER]._qblkm = -1;
				}
			}
		}
	}
	if (currlevel == quests[Q_VEIL]._qlevel + 1 && quests[Q_VEIL]._qactive == QUEST_ACTIVE && !quests[Q_VEIL]._qvar1) {
		quests[Q_VEIL]._qvar1 = 1;
		SpawnQuestItem(IDI_GLDNELIX, 0, 0, 5, 1);
	}
	if (setlevel && setlvlnum == SL_VILEBETRAYER) {
		if (quests[Q_BETRAYER]._qvar1 >= 4)
			ObjChangeMapResync(1, 11, 20, 18);
		if (quests[Q_BETRAYER]._qvar1 >= 6)
			ObjChangeMapResync(1, 18, 20, 24);
		if (quests[Q_BETRAYER]._qvar1 >= 7)
			InitVPTriggers();
		for (i = 0; i < nobjects; i++)
			SyncObjectAnim(objectactive[i]);
	}
	if (currlevel == quests[Q_BETRAYER]._qlevel
	    && !setlevel
	    && (quests[Q_BETRAYER]._qvar2 == 1 || quests[Q_BETRAYER]._qvar2 >= 3)
	    && (quests[Q_BETRAYER]._qactive == QUEST_ACTIVE || quests[Q_BETRAYER]._qactive == QUEST_DONE)) {
		quests[Q_BETRAYER]._qvar2 = 2;
	}
#endif
}

void PrintQLString(int x, int y, BOOL cjustflag, char *str, int col)
{
	int len, width, i, k, sx, sy;
	BYTE c;

	sx = x + 32 + SCREEN_X;
	sy = y * 12 + 44 + SCREEN_Y;
	len = strlen(str);
	k = 0;
	if (cjustflag) {
		width = 0;
		for (i = 0; i < len; i++)
			width += fontkern[fontframe[gbFontTransTbl[(BYTE)str[i]]]] + 1;
		if (width < 257)
			k = (257 - width) >> 1;
		sx += k;
	}
	if (qline == y) {
		CelDraw(cjustflag ? x + k + 12 + SCREEN_X : x + 12 + SCREEN_X, sy + 1, pSPentSpn2Cels, PentSpn2Frame, 12);
	}
	for (i = 0; i < len; i++) {
		c = fontframe[gbFontTransTbl[(BYTE)str[i]]];
		k += fontkern[c] + 1;
		if (c && k <= 257) {
			PrintChar(sx, sy, c, col);
		}
		sx += fontkern[c] + 1;
	}
	if (qline == y) {
		CelDraw(cjustflag ? x + k + 36 + SCREEN_X : 276 + SCREEN_X - x, sy + 1, pSPentSpn2Cels, PentSpn2Frame, 12);
	}
}

void DrawQuestLog()
{
	int y, i;

	PrintQLString(0, 2, TRUE, "Quest Log", 3);
	CelDraw(SCREEN_X, SCREEN_Y + 351, pQLogCel, 1, SPANEL_WIDTH);
	y = qtopline;
	for (i = 0; i < numqlines; i++) {
		PrintQLString(0, y, TRUE, questlist[qlist[i]]._qlstr, 0);
		y += 2;
	}
	PrintQLString(0, 22, TRUE, "Close Quest Log", 0);
	PentSpn2Spin();
}

void StartQuestlog()
{
	DWORD i;

	numqlines = 0;
	for (i = 0; i < MAXQUESTS; i++) {
		if (quests[i]._qactive == QUEST_ACTIVE && quests[i]._qlog) {
			qlist[numqlines] = i;
			numqlines++;
		}
	}
	if (numqlines > 5) {
		qtopline = 5 - (numqlines >> 1);
	} else {
		qtopline = 8;
	}
	qline = 22;
	if (numqlines != 0)
		qline = qtopline;
	questlog = TRUE;
	PentSpn2Frame = 1;
}

void QuestlogUp()
{
	if (numqlines) {
		if (qline == qtopline) {
			qline = 22;
		} else if (qline == 22) {
			qline = qtopline + 2 * numqlines - 2;
		} else {
			qline -= 2;
		}
		PlaySFX(IS_TITLEMOV);
	}
}

void QuestlogDown()
{
	if (numqlines) {
		if (qline == 22) {
			qline = qtopline;
		} else if (qline == qtopline + 2 * numqlines - 2) {
			qline = 22;
		} else {
			qline += 2;
		}
		PlaySFX(IS_TITLEMOV);
	}
}

void QuestlogEnter()
{
	PlaySFX(IS_TITLSLCT);
	if (numqlines && qline != 22)
		InitQTextMsg(quests[qlist[(qline - qtopline) >> 1]]._qmsg);
	questlog = FALSE;
}

void QuestlogESC()
{
	int y, i;

	y = (MouseY - 32) / 12;
	if (numqlines) {
		for (i = 0; i < numqlines; i++) {
			if (y == qtopline + 2 * i) {
				qline = y;
				QuestlogEnter();
			}
		}
	}
	if (y == 22) {
		qline = 22;
		QuestlogEnter();
	}
}

void SetMultiQuest(int q, int s, int l, int v1)
{
#ifndef SPAWN
	if (quests[q]._qactive != QUEST_DONE) {
		if (s > quests[q]._qactive)
			quests[q]._qactive = s;
		quests[q]._qlog |= l;
		if (v1 > quests[q]._qvar1)
			quests[q]._qvar1 = v1;
	}
#endif
}

DEVILUTION_END_NAMESPACE

{'repo_name': 'diasurgical/devilutionX', 'stars': '2677', 'repo_language': 'C++', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': 1757527409447340140, 'source_dataset': 'data'}


image: "/assets/png/tiles.png"
tile_width: 48
tile_height: 16
tile_margin: 0
tile_spacing: 0
collision: "/assets/png/tiles.png"
material_tag: "tile"
convex_hulls {
  index: 0
  count: 10
  collision_group: ""
}
convex_hulls {
  index: 10
  count: 13
  collision_group: ""
}
convex_hulls {
  index: 23
  count: 13
  collision_group: ""
}
convex_hulls {
  index: 36
  count: 13
  collision_group: ""
}
convex_hulls {
  index: 49
  count: 0
  collision_group: ""
}
convex_hulls {
  index: 49
  count: 0
  collision_group: ""
}
convex_hulls {
  index: 49
  count: 4
  collision_group: ""
}
convex_hulls {
  index: 53
  count: 4
  collision_group: ""
}
convex_hulls {
  index: 57
  count: 4
  collision_group: ""
}
animations {
  id: "arrow"
  start_tile: 2
  end_tile: 2
  playback: PLAYBACK_NONE
  fps: 30
  flip_horizontal: 0
  flip_vertical: 0
}
animations {
  id: "player"
  start_tile: 1
  end_tile: 1
  playback: PLAYBACK_NONE
  fps: 1
  flip_horizontal: 0
  flip_vertical: 0
}
animations {
  id: "sub"
  start_tile: 3
  end_tile: 3
  playback: PLAYBACK_NONE
  fps: 30
  flip_horizontal: 0
  flip_vertical: 0
}
animations {
  id: "super"
  start_tile: 2
  end_tile: 2
  playback: PLAYBACK_NONE
  fps: 30
  flip_horizontal: 0
  flip_vertical: 0
}
extrude_borders: 2
inner_padding: 0
sprite_trim_mode: SPRITE_TRIM_MODE_OFF

{'repo_name': 'benjames-171/defold-games', 'stars': '137', 'repo_language': 'Go', 'file_name': 'custom.render_script', 'mime_type': 'text/plain', 'hash': 7110511023444691471, 'source_dataset': 'data'}