Show
Ignore:
Timestamp:
10/08/08 07:34:08 (3 months ago)
Author:
mokehehe
Message:

キー入力処理変更
Sキーでスクリーンショットを取れるように

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/haskell/nario/Player.hs

    r20925 r20943  
    2626 
    2727import Util 
    28 import AppUtil (KeyProc, isPressed, PadBtn(..), cellCrd, KeyState(..), getImageSurface, Rect(..), putimg) 
     28import AppUtil (KeyProc, padPressed, padPressing, PadBtn(..), cellCrd, KeyState(..), getImageSurface, Rect(..), putimg) 
    2929import Const 
    3030import Images 
     
    132132                x' = max xmin $ (x self) + vx' 
    133133 
    134                 padd = if isPressed (kp PadD) then True else False 
    135                 padl = if isPressed (kp PadL) then 1 else 0 
    136                 padr = if isPressed (kp PadR) then 1 else 0 
     134                padd = if padPressing kp PadD then True else False 
     135                padl = if padPressing kp PadL then 1 else 0 
     136                padr = if padPressing kp PadR then 1 else 0 
    137137                maxspd 
    138138                        | not $ stand self      = walkVx `div` 2 
    139                         | isPressed (kp PadB)   = runVx 
     139                        | padPressing kp PadB   = runVx 
    140140                        | otherwise                             = walkVx 
    141141                nowacc 
    142                         | isPressed (kp PadB)   = acc2 
     142                        | padPressing kp PadB   = acc2 
    143143                        | otherwise                             = acc 
    144144                xmin = (scrx self + chrSize `div` 2) * one 
     
    237237doJump :: KeyProc -> Player -> Player 
    238238doJump kp self 
    239         | stand self && kp PadA == Pushed       = self { vy = vy', stand = False, pat = patJump } 
     239        | stand self && padPressed kp PadA      = self { vy = vy', stand = False, pat = patJump } 
    240240        | otherwise                                                     = self 
    241241        where 
     
    257257        moveY $ scroll self $ checkX fld $ moveX kp self 
    258258        where 
    259                 moveY = checkCeil fld . doJump kp . checkFloor fld . fall (isPressed $ kp PadA) 
     259                moveY = checkCeil fld . doJump kp . checkFloor fld . fall (padPressing kp PadA) 
    260260 
    261261-- 死亡時