Add twisting weapons and feet

This commit is contained in:
2021-06-07 15:03:15 +02:00
parent edd947a857
commit c9ca94e82e
16 changed files with 226 additions and 117 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 431 KiB

+16 -16
View File
@@ -16,20 +16,20 @@ invert = M.foldrWithKey (\k val -> M.insertWith (++) val [k]) M.empty
combineList :: [([ItemType], ItemType)] combineList :: [([ItemType], ItemType)]
combineList = combineList =
[ ( [ Pistol, Pipe, Hardware ] , Rifle ) [ ( [ TPistol, TPipe, THardware ] , TRifle )
, ( [ Rifle, Hardware ] , Pistol ) , ( [ TRifle, THardware ] , TPistol )
, ( [ Pistol, Pistol, Hardware ] , SpreadGun 2 ) , ( [ TPistol, TPistol, THardware ] , TSpreadGun 2 )
, ( [ SpreadGun 2, Pistol, Hardware ] , SpreadGun 3 ) , ( [ TSpreadGun 2, TPistol, THardware ] , TSpreadGun 3 )
, ( [ SpreadGun 3, Pistol, Hardware ] , SpreadGun 4 ) , ( [ TSpreadGun 3, TPistol, THardware ] , TSpreadGun 4 )
, ( [ SpreadGun 4, Pistol, Hardware ] , SpreadGun 5 ) , ( [ TSpreadGun 4, TPistol, THardware ] , TSpreadGun 5 )
, ( [ Pistol, AutoGun, Hardware ] , LtAutoGun ) , ( [ TPistol, TAutoGun, THardware ] , TLtAutoGun )
, ( [ LtAutoGun, Pipe, Hardware ] , AutoGun ) , ( [ TLtAutoGun, TPipe, THardware ] , TAutoGun )
, ( [ Rifle, Rifle, Hardware ] , MultGun 2 ) , ( [ TRifle, TRifle, THardware ] , TMultGun 2 )
, ( [ MultGun 2, Rifle, Hardware ] , MultGun 3 ) , ( [ TMultGun 2, TRifle, THardware ] , TMultGun 3 )
, ( [ MultGun 3, Rifle, Hardware ] , MultGun 4 ) , ( [ TMultGun 3, TRifle, THardware ] , TMultGun 4 )
, ( [ MultGun 4, Rifle, Hardware ] , MultGun 5 ) , ( [ TMultGun 4, TRifle, THardware ] , TMultGun 5 )
, ( [ LtAutoGun, Pipe, Hardware ] , AutoGun ) , ( [ TLtAutoGun, TPipe, THardware ] , TAutoGun )
, ( [ Pistol, BigTube, Hardware] , Launcher 1 ) , ( [ TPistol, TBigTube, THardware] , TLauncher 1 )
, ( [ Launcher 1, BigTube, Pistol, Hardware] , Launcher 2) , ( [ TLauncher 1, TBigTube, TPistol, THardware] , TLauncher 2)
, ( [ Launcher 2, BigTube, Pistol, Hardware] , Launcher 3) , ( [ TLauncher 2, TBigTube, TPistol, THardware] , TLauncher 3)
] ]
+30 -30
View File
@@ -1,34 +1,34 @@
module Dodge.Combine.Data module Dodge.Combine.Data
where where
data ItemType data ItemType
= Pipe = TPipe
| BigTube | TBigTube
| Plate | TPlate
| MChip | TMChip
| Magnet | TMagnet
| Motor | TMotor
| LED | TLED
| Hardware | THardware
| Nailbox | TNailbox
| Plank | TPlank
| Prism | TPrism
| LightSensor | TLightSensor
| SoundSensor | TSoundSensor
| HeatSensor | THeatSensor
| CopperWire | TCopperWire
| EmptyCan | TEmptyCan
| Pistol | TPistol
| AutoGun | TAutoGun
| Rifle | TRifle
| LtAutoGun | TLtAutoGun
| HvAutoGun | THvAutoGun
| HvRifle | THvRifle
| MultGun Int | TMultGun Int
| SpreadGun Int | TSpreadGun Int
| Launcher Int | TLauncher Int
| Battery | TBattery
| PortableFusion | TPortableFusion
| AutoFiringMech | TAutoFiringMech
| FiringMech | TFiringMech
| TargetingModule | TTargetingModule
deriving (Eq,Ord) deriving (Eq,Ord)
+2
View File
@@ -30,6 +30,7 @@ import Dodge.Data
import Dodge.Default import Dodge.Default
import Dodge.Item.Weapon import Dodge.Item.Weapon
import Dodge.Item.Weapon.Launcher import Dodge.Item.Weapon.Launcher
import Dodge.Item.Weapon.AutoGun
import Dodge.Item.Weapon.Bezier import Dodge.Item.Weapon.Bezier
import Dodge.Item.Equipment import Dodge.Item.Equipment
import Dodge.Item.Consumable import Dodge.Item.Consumable
@@ -158,6 +159,7 @@ startInventory :: IM.IntMap Item
startInventory = IM.fromList (zip [0..20] startInventory = IM.fromList (zip [0..20]
( (
[hvAutoGun [hvAutoGun
,pistol
,teslaGun ,teslaGun
,blinkGun ,blinkGun
,miniGun ,miniGun
+6 -2
View File
@@ -15,7 +15,9 @@ crMvBy
:: Point2 -- ^ Movement translation vector, will be made relative to creature direction :: Point2 -- ^ Movement translation vector, will be made relative to creature direction
-> Creature -> Creature
-> Creature -> Creature
crMvBy p' cr = advanceStepCounter (magV p) $ over crPos (+.+ p) cr crMvBy p' cr = advanceStepCounter (magV p) cr
& crPos %~ (+.+ p)
& crMvDir .~ argV p
where where
p = (*.*) (equipFactor * aimingFactor) $ rotateV (_crDir cr) p' p = (*.*) (equipFactor * aimingFactor) $ rotateV (_crDir cr) p'
equipFactor equipFactor
@@ -31,7 +33,9 @@ crMvAbsolute
:: Point2 -- ^ Movement translation vector :: Point2 -- ^ Movement translation vector
-> Creature -> Creature
-> Creature -> Creature
crMvAbsolute p' cr = advanceStepCounter (magV p) $ over crPos (+.+ p) cr crMvAbsolute p' cr = advanceStepCounter (magV p) cr
& crPos %~ (+.+ p)
& crMvDir .~ argV p
where where
p = (*.*) (equipFactor * aimingFactor) p' p = (*.*) (equipFactor * aimingFactor) p'
equipFactor equipFactor
+1 -1
View File
@@ -9,7 +9,7 @@ import Dodge.Creature.SentinelAI
import Dodge.Creature.Rationality import Dodge.Creature.Rationality
import Dodge.Creature.State import Dodge.Creature.State
--import Dodge.Creature.State.Data --import Dodge.Creature.State.Data
import Dodge.Item.Weapon import Dodge.Item.Weapon.AutoGun
import Dodge.Item.Consumable import Dodge.Item.Consumable
--import Geometry --import Geometry
import Picture import Picture
+61 -14
View File
@@ -9,8 +9,11 @@ module Dodge.Creature.Picture
import Dodge.Data import Dodge.Data
--import Dodge.Creature.Stance.Data --import Dodge.Creature.Stance.Data
import Dodge.Creature.State.Data import Dodge.Creature.State.Data
import Dodge.Creature.Stance.Data
import Dodge.Creature.Test
--import Dodge.Creature.AlertLevel.Data --import Dodge.Creature.AlertLevel.Data
import Dodge.Picture.Layer import Dodge.Picture.Layer
import Dodge.Item.Data
import Picture import Picture
import Geometry import Geometry
@@ -24,27 +27,16 @@ basicCrPict
-> Picture -> Picture
basicCrPict col cr w = pictures $ basicCrPict col cr w = pictures $
targetingPic ++ targetingPic ++
[ tr . onLayer CrLayer . piercingMod $ bluntScale $ naked [ tr . piercingMod $ bluntScale $ naked col cr
-- , drawAwakeLevel cr , trFeet $ feet cr
, tr $ drawEquipment cr , tr $ drawEquipment cr
] ]
where where
targetingPic = IM.elems $ IM.mapMaybeWithKey f $ _crInv cr targetingPic = IM.elems $ IM.mapMaybeWithKey f $ _crInv cr
f invid it = fmap ((\g -> g invid it cr w) . snd) (it ^? itTargeting . _Just) f invid it = fmap ((\g -> g invid it cr w) . snd) (it ^? itTargeting . _Just)
tr = uncurry translate (_crPos cr) . rotate (_crDir cr) tr = uncurry translate (_crPos cr) . rotate (_crDir cr)
trFeet = uncurry translate (_crPos cr) . rotate (_crMvDir cr)
cdir = _crDir cr cdir = _crDir cr
naked
| strikeMelee = color white $ circleSolid $ _crRad cr
| pdam > 200 = color red $ circleSolid $ _crRad cr
| pdam > 99 = color white $ circleSolid $ _crRad cr
| otherwise = pictures
[ translate (0.25 * crad) 0 $ circleSolid (crad * 0.5)
, scale 0.5 1 $ color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr
]
crad = _crRad cr
pastDams = _crPastDamage $ _crState cr
pdam = sum $ concatMap (map _dmAmount) pastDams
col' = light . light . light $ light col
bluntDam :: Maybe Point2 bluntDam :: Maybe Point2
bluntDam = find isBluntDam (concat pastDams) >>= (\dm -> (-.-) <$> dm ^? dmFrom <*> dm ^? dmTo) bluntDam = find isBluntDam (concat pastDams) >>= (\dm -> (-.-) <$> dm ^? dmFrom <*> dm ^? dmTo)
bluntScale = case fmap argV bluntDam of bluntScale = case fmap argV bluntDam of
@@ -58,9 +50,64 @@ basicCrPict col cr w = pictures $
piercingMod = case fmap argV piercingDam of piercingMod = case fmap argV piercingDam of
Just a -> rotate (a + cdir) . scale 0.8 1.2 . rotate (negate $ cdir + a) Just a -> rotate (a + cdir) . scale 0.8 1.2 . rotate (negate $ cdir + a)
_ -> id _ -> id
pastDams = _crPastDamage $ _crState cr
feet :: Creature -> Picture
feet cr = case cr ^? crStance . carriage of
Just (Walking _ LeftForward) -> setL
[ translate up off $ circleSolid 5
, translate (-up) (-off) $ circleSolid 5
]
Just (Walking _ RightForward) -> setL
[ translate (-up) off $ circleSolid 5
, translate (up) (-off) $ circleSolid 5
]
_ -> setL
[ translate 0 off $ circleSolid 5
, translate 0 (-off) $ circleSolid 5
]
where
setL = onLayerL [levLayer CrLayer, (-2)] . color (greyN 0.2) . pictures
off = 5
up = 5
naked :: Color -> Creature -> Picture
naked col cr
| strikeMelee = onCrL . color white $ circleSolid $ _crRad cr
| pdam > 200 = onCrL . color red $ circleSolid $ _crRad cr
| pdam > 99 = onCrL . color white $ circleSolid $ _crRad cr
| aimingTwist = rotate twistA $ pictures
[ aboveIt . translate (negate 0.25 * crad) 0.25 $
circleSolid (crad * 0.5)
, onCrL . translate 0 3 . rotate (negate 0.2) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr
, onCrL . translate 0 (negate 3) . rotate (0.2) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr
--, shoulderRot . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr
]
| otherwise = onCrL $ pictures
[ translate (0.25 * crad) 0 $ circleSolid (crad * 0.5)
, translate 0 3 . rotate (negate 0.2) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr
, translate 0 (negate 3) . rotate (0.2) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr
--, shoulderRot . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr
]
where
aboveIt = onLayer HPtLayer
onCrL = onLayer CrLayer
twistA = negate 1
aimingOneHand = crIsAiming' cr && crIt ^? itAimStance == Just OneHand
aimingTwist = crIsAiming' cr && crIt ^? itAimStance == Just TwoHandTwist
crIt = _crInv cr IM.! _crInvSel cr
shoulderRot = case cr ^? crStance . carriage of
Just (Walking _ LeftForward) -> rotate 0.1
Just (Walking _ RightForward) -> rotate $ negate 0.1
_ -> id
strikeMelee = case _crMeleeCooldown cr of strikeMelee = case _crMeleeCooldown cr of
Nothing -> False Nothing -> False
Just x -> x > 5 Just x -> x > 5
pdam = sum $ concatMap (map _dmAmount) pastDams
crad = _crRad cr
pastDams = _crPastDamage $ _crState cr
col' = light . light . light $ light col
--drawAwakeLevel --drawAwakeLevel
-- :: Creature -- :: Creature
+1
View File
@@ -144,6 +144,7 @@ data Creature = Creature
, _crOldPos :: Point2 , _crOldPos :: Point2
, _crVel :: Point2 , _crVel :: Point2
, _crDir :: Float , _crDir :: Float
, _crMvDir :: Float
, _crID :: Int , _crID :: Int
, _crPict :: Creature -> World -> Picture , _crPict :: Creature -> World -> Picture
, _crUpdate , _crUpdate
+1
View File
@@ -95,6 +95,7 @@ defaultCreature = Creature
, _crOldPos = (0,0) , _crOldPos = (0,0)
, _crVel = (0,0) , _crVel = (0,0)
, _crDir = 0 , _crDir = 0
, _crMvDir = 0
, _crID = 1 , _crID = 1
, _crPict = \_ _ -> onLayer CrLayer $ circleSolid 10 , _crPict = \_ _ -> onLayer CrLayer $ circleSolid 10
, _crUpdate = \ _ f cr -> (f , Just cr) , _crUpdate = \ _ f cr -> (f , Just cr)
+2
View File
@@ -45,3 +45,5 @@ data AimStance
| TwoHand | TwoHand
| OneHand | OneHand
| LeaveHolstered | LeaveHolstered
deriving
(Eq,Show,Ord,Enum)
+13 -4
View File
@@ -1,25 +1,34 @@
module Dodge.Item.Draw module Dodge.Item.Draw
where where
import Dodge.Data import Dodge.Data
import Dodge.Item.Data
import Dodge.Picture.Layer import Dodge.Picture.Layer
import Dodge.Creature.Stance.Data import Dodge.Creature.Stance.Data
import Picture import Picture
{- |
Places an item picture onto a creature when the item is selected. -} import qualified Data.IntMap.Strict as IM
{- | Places an item picture onto a creature when the item is selected. -}
pictureWeaponOnAim pictureWeaponOnAim
:: Picture :: Picture
-> Creature -> Creature
-> Int -- ^ Position of item in inventory -> Int -- ^ Position of item in inventory
-> Picture -> Picture
pictureWeaponOnAim p cr posInInv pictureWeaponOnAim p cr posInInv
| _crInvSel cr == posInInv && _posture (_crStance cr) == Aiming | isSelected && _posture (_crStance cr) == Aiming
&& isTwisting
= onLayer PtLayer twistWep
| isSelected && _posture (_crStance cr) == Aiming
= onLayer PtLayer drawnWep = onLayer PtLayer drawnWep
| _crInvSel cr == posInInv | isSelected
= onLayer PtLayer holsteredWep = onLayer PtLayer holsteredWep
| otherwise = blank | otherwise = blank
where where
isSelected = _crInvSel cr == posInInv
drawnWep = uncurry translate (_crRad cr,0) p drawnWep = uncurry translate (_crRad cr,0) p
twistWep = uncurry translate (0.5 * _crRad cr,negate 0.5 * _crRad cr) p
holsteredWep = uncurry translate (_crRad cr,0) (scale 0.1 1 p) holsteredWep = uncurry translate (_crRad cr,0) (scale 0.1 1 p)
theIt = _crInv cr IM.! posInInv
isTwisting = _itAimStance theIt == TwoHandTwist
pictureItem pictureItem
:: Picture :: Picture
+10 -49
View File
@@ -20,6 +20,7 @@ import Dodge.Item.Weapon.ExtraEffect
import Dodge.Item.Weapon.UseEffect import Dodge.Item.Weapon.UseEffect
import Dodge.Item.Weapon.Laser import Dodge.Item.Weapon.Laser
import Dodge.Item.Weapon.Shell import Dodge.Item.Weapon.Shell
import Dodge.Item.Weapon.Bullet
import Dodge.Default.Weapon import Dodge.Default.Weapon
import Dodge.Item.Weapon.Booster import Dodge.Item.Weapon.Booster
import Dodge.Item.Weapon.Grenade import Dodge.Item.Weapon.Grenade
@@ -83,13 +84,6 @@ pistol = defaultGun
, _itWorldTrigger = Nothing , _itWorldTrigger = Nothing
, _wpAmmo = basicBullet , _wpAmmo = basicBullet
} }
basicBullet :: Ammo
basicBullet = BulletAmmo
{ _amString = "BULLET"
, _amBulEff = destroyOnImpact bulHitCr bulHitWall' bulHitFF'
, _amBulWth = 2
, _amBulVel = (30,0)
}
useAmmoParams :: Item -> Creature -> World -> World useAmmoParams :: Item -> Creature -> World -> World
useAmmoParams it = withVelWthHiteff (_amBulVel b) (_amBulWth b) (_amBulEff b) useAmmoParams it = withVelWthHiteff (_amBulVel b) (_amBulWth b) (_amBulEff b)
where where
@@ -105,45 +99,6 @@ autoEffectGun name eff = defaultAutoGun
{ _itName = name ++ "Gun" { _itName = name ++ "Gun"
, _itUse = \_ -> eff , _itUse = \_ -> eff
} }
autoGun :: Item
autoGun = defaultGun
{ _itName = "AUTOGUN"
, _itIdentity = AutoGun
, _wpMaxAmmo = 30
, _wpLoadedAmmo = 30
, _wpReloadTime = 80
, _wpReloadState = 0
, _itUseRate = 6
, _itUseTime = 0
, _itUse = \_ -> charFiringStrat
[('M',autoFireMode)
,('S',singleFireMode)
]
, _wpSpread = autogunSpread
, _wpRange = 20
, _itHammer = HammerUp
, _itFloorPict = onLayer FlItLayer $ color red $ pictures [polygon [(-4,-4),(-4,4),(4,4),(4,-4)]]
, _itAimingSpeed = 0.4
, _itAimingRange = 1
, _itZoom = defaultItZoom {_itAimZoomFac = 1.5}
, _itEquipPict = pictureWeaponOnAim $ color red $ polygon $ rectNESW 4 4 (-4) (-4)
, _itEffect = wpRecock
, _itAttachment = Just $ ItCharMode $ Seq.fromList "MS"
, _itScrollUp = incCharMode
, _itScrollDown = decCharMode
, _itInvDisplay = basicWeaponDisplay
, _wpAmmo = basicBullet
}
autoFireMode, singleFireMode, autoGunNonTwistEff :: Creature -> World -> World
autoFireMode = shootWithSound (fromIntegral autoGunSound)
. torqueBefore 0.05
$ autoGunNonTwistEff
singleFireMode = hammerCheck $ shootWithSound (fromIntegral autoGunSound) autoGunNonTwistEff
autoGunNonTwistEff = withRecoil 40
. withRandomDir (autogunSpread/2)
. withMuzFlare
. withVelWthHiteff (50,0) 3
$ destroyOnImpact bulHitCr bulHitWall' bulHitFF'
rezGun :: Item rezGun :: Item
rezGun = defaultGun rezGun = defaultGun
{ _itName = "REANIMATOR" { _itName = "REANIMATOR"
@@ -364,11 +319,17 @@ miniGun = defaultAutoGun
. withVelWthHiteff (30,0) 2 . withVelWthHiteff (30,0) 2
$ destroyOnImpact bulBounceArmCr' bulHitWall' bulHitFF' $ destroyOnImpact bulBounceArmCr' bulHitWall' bulHitFF'
, _wpRange = 20 , _wpRange = 20
, _itFloorPict = onLayer FlItLayer $ color red $ polygon $ rectNESW 9 5 (-9) (-5) , _itFloorPict = onLayer FlItLayer miniGunPict
, _itAimingSpeed = 0.4 , _itAimingSpeed = 0.4
, _itAimingRange = 1 , _itAimingRange = 1
, _itEquipPict = pictureWeaponOnAim $ color red $ polygon $ rectNESW 9 5 (-9) (-5) , _itEquipPict = pictureWeaponOnAim miniGunPict
} }
miniGunPict :: Picture
miniGunPict = pictures
[ translate 5 0 . color red $ polygon $ rectNESW 9 7 (-9) (-5)
, color red . polygon $ rectNESW 4 12 (-4) (-12)
]
spreadGun :: Item spreadGun :: Item
spreadGun = defaultGun spreadGun = defaultGun
{ _itName = "SPREAD" { _itName = "SPREAD"
@@ -1023,7 +984,7 @@ spawnGun cr = defaultGun
, _wpReloadTime = 80 , _wpReloadTime = 80
, _wpReloadState = 0 , _wpReloadState = 0
, _itUseRate = 100 , _itUseRate = 100
, _itUse = \_ -> spawnCrNextTo cr , _itUse = \_ -> hammerCheck $ spawnCrNextTo cr
} }
spawnCrNextTo spawnCrNextTo
:: Creature -- ^ Creature to spawn :: Creature -- ^ Creature to spawn
+68
View File
@@ -0,0 +1,68 @@
module Dodge.Item.Weapon.AutoGun
where
import Dodge.Data
import Dodge.Default.Weapon
import Dodge.Default
import Dodge.Item.Attachment
import Dodge.Item.Attachment.Data
import Dodge.Item.Weapon.ExtraEffect
import Dodge.Item.Weapon.InventoryDisplay
import Dodge.Item.Data
import Dodge.Picture.Layer
import Dodge.Item.Draw
import Dodge.Item.Weapon.Bullet
import Dodge.Item.Weapon.TriggerType
import Dodge.SoundLogic.Synonyms
import Dodge.WorldEvent.HitEffect
import Dodge.Particle.Bullet.HitEffect
import Picture
import Geometry
import qualified Data.Sequence as Seq
autoGun :: Item
autoGun = defaultAutoGun
{ _itName = "AUTOGUN"
, _itIdentity = AutoGun
, _wpMaxAmmo = 30
, _wpLoadedAmmo = 30
, _wpReloadTime = 80
, _wpReloadState = 0
, _itUseRate = 6
, _itUseTime = 0
, _itUse = \_ -> charFiringStrat
[('M',autoFireMode)
,('S',singleFireMode)
]
, _wpSpread = autogunSpread
, _wpRange = 20
, _itHammer = HammerUp
, _itFloorPict = onLayer FlItLayer autoGunPict
, _itAimingSpeed = 0.4
, _itAimingRange = 1
, _itZoom = defaultItZoom {_itAimZoomFac = 1.5}
, _itEquipPict = pictureWeaponOnAim autoGunPict
, _itEffect = wpRecock
, _itAttachment = Just $ ItCharMode $ Seq.fromList "MS"
, _itScrollUp = incCharMode
, _itScrollDown = decCharMode
, _itInvDisplay = basicWeaponDisplay
, _wpAmmo = basicBullet
}
autoFireMode, singleFireMode, autoGunNonTwistEff :: Creature -> World -> World
autoFireMode = shootWithSound (fromIntegral autoGunSound)
. torqueBefore 0.05
$ autoGunNonTwistEff
singleFireMode = hammerCheck $ shootWithSound (fromIntegral autoGunSound) autoGunNonTwistEff
autoGunNonTwistEff = withRecoil 40
. withRandomDir (autogunSpread/2)
. withMuzFlare
. withVelWthHiteff (50,0) 3
$ destroyOnImpact bulHitCr bulHitWall' bulHitFF'
autoGunPict :: Picture
autoGunPict = color red $ polygon $ rectNESW 4 12 (-4) (-12)
autogunSpread :: Float
autogunSpread = 0.07
+12
View File
@@ -0,0 +1,12 @@
module Dodge.Item.Weapon.Bullet
where
import Dodge.Data
import Dodge.WorldEvent.HitEffect
import Dodge.Particle.Bullet.HitEffect
basicBullet :: Ammo
basicBullet = BulletAmmo
{ _amString = "BULLET"
, _amBulEff = destroyOnImpact bulHitCr bulHitWall' bulHitFF'
, _amBulWth = 2
, _amBulVel = (30,0)
}
+1
View File
@@ -7,6 +7,7 @@ module Dodge.Room
) where ) where
import Dodge.Data import Dodge.Data
import Dodge.Item.Weapon import Dodge.Item.Weapon
import Dodge.Item.Weapon.AutoGun
import Dodge.Item.Weapon.Launcher import Dodge.Item.Weapon.Launcher
import Dodge.Creature import Dodge.Creature
--import Dodge.Creature.Inanimate --import Dodge.Creature.Inanimate
+2 -1
View File
@@ -78,7 +78,8 @@ preloadRender = do
_ <- F.foldM (pokeShader grayscaleShad) [()] -- fix fullscreen vertex positions now _ <- F.foldM (pokeShader grayscaleShad) [()] -- fix fullscreen vertex positions now
-- background shader -- background shader
bgShad <- makeShader "background" [vert,geom,frag] [(0,4),(1,2)] Points pokeBGStrat bgShad <- makeShader "background" [vert,geom,frag] [(0,4),(1,2)] Points pokeBGStrat
>>= addTexture "data/texture/smudgedDirt.png" >>= addTexture "data/texture/marbleSlabs.png"
-- >>= addTexture "data/texture/smudgedDirt.png"
-- blank wallShader -- blank wallShader
wlBlank <- makeShader "wall/blank" [vert,geom,frag] [(0,4),(1,4)] Points pokeWPColStrat wlBlank <- makeShader "wall/blank" [vert,geom,frag] [(0,4),(1,4)] Points pokeWPColStrat
-- >>= addTexture "data/texture/grayscaleDirt.png" -- >>= addTexture "data/texture/grayscaleDirt.png"