Working element buffer object

This commit is contained in:
2021-09-20 12:36:35 +01:00
parent c605ac74ff
commit 5cbcbec101
22 changed files with 242 additions and 212 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ import Dodge.Item.Weapon.TriggerType
import Dodge.SoundLogic.LoadSound
import Picture
import Geometry
import ShapePicture
--import ShapePicture
import Shape
import qualified Data.Sequence as Seq
@@ -51,12 +51,12 @@ autoGun = defaultAutoGun
, _wpSpread = autogunSpread
, _wpRange = 20
, _itHammer = HammerUp
, _itFloorPict = SPic emptySH $ onLayer FlItLayer autoGunPic
, _itFloorPict = (,) emptySH $ onLayer FlItLayer autoGunPic
, _itAimingSpeed = 0.4
, _itAimingRange = 1
, _itZoom = defaultItZoom
, _itAimZoom = defaultItZoom {_itZoomFac = 1.5}
, _itEquipPict = pictureWeaponOnAim $ SPic emptySH autoGunPic
, _itEquipPict = pictureWeaponOnAim $ (,) emptySH autoGunPic
, _itEffect = wpRecock
, _itAttachment = ItCharMode $ Seq.fromList "MS"
, _itScroll = scrollCharMode
+3 -3
View File
@@ -18,7 +18,7 @@ import Dodge.Picture.Layer
import Dodge.SoundLogic.LoadSound
import Picture
import Geometry
import ShapePicture
--import ShapePicture
import Shape
--import System.Random
@@ -37,8 +37,8 @@ bezierGun = defaultGun
. withRecoilI 40
. torqueBefore 0.05
]
, _itFloorPict = SPic emptySH $ onLayer FlItLayer bezierGunPic
, _itEquipPict = pictureWeaponOnAim $ SPic emptySH bezierGunPic
, _itFloorPict = (,) emptySH $ onLayer FlItLayer bezierGunPic
, _itEquipPict = pictureWeaponOnAim $ (,) emptySH bezierGunPic
, _itAttachment = NoItAttachment
, _itScroll = \_ _ -> removeItTarget
, _itHammer = HammerUp
+2 -2
View File
@@ -52,7 +52,7 @@ moveGrenade time dir pID w = case hitWl of
grenadePic :: Int -> SPic
grenadePic x = SPic emptySH $ pictures
grenadePic x = (,) emptySH $ pictures
[ color (dark $ dark green) $ circleSolid 5
, color green $ arc (degToRad $ (179 * fromIntegral x / 50) - 180 )
(degToRad $ 180 - (179 * fromIntegral x / 50) )
@@ -79,7 +79,7 @@ throwGrenade explosion cr w = setWp $ removePict $ over projectiles addG w
, _pjPayload = explosion
}
j = _crInvSel cr
removePict = set (creatures . ix n . crInv . ix j . itEquipPict) $ \ _ _ -> SPic emptySH blank
removePict = set (creatures . ix n . crInv . ix j . itEquipPict) $ \ _ _ -> (,) emptySH blank
i = newProjectileKey w
--(_, g) = randomR (-grenadeAccA,grenadeAccA::Float) (_randGen w)
--(_, _) = randomR (1 - 2*grenadeAccL,1+grenadeAccL::Float) g
+3 -3
View File
@@ -22,7 +22,7 @@ import Geometry.Vector3D
import Picture
import qualified IntMapHelp as IM
import Padding
import ShapePicture
--import ShapePicture
import Shape
import Data.Maybe
@@ -50,10 +50,10 @@ launcher = defaultGun
]
, _wpSpread = 0.02
, _wpRange = 20
, _itFloorPict = SPic emptySH $ onLayer FlItLayer launcherPic
, _itFloorPict = (,) emptySH $ onLayer FlItLayer launcherPic
, _itAimingSpeed = 0.2
, _itAimingRange = 0.5
, _itEquipPict = pictureWeaponOnAim $ SPic emptySH launcherPic
, _itEquipPict = pictureWeaponOnAim $ (,) emptySH launcherPic
, _itHammer = NoHammer
, _itEffect = NoItEffect
, _wpAmmo = defaultShellAmmo