Changeset 20223 for lang/haskell

Show
Ignore:
Timestamp:
09/29/08 21:34:45 (2 months ago)
Author:
mokehehe
Message:

画面の縦のサイズを224ドットに修正

Location:
lang/haskell/nario
Files:
5 modified

Legend:

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

    r20175 r20223  
    1313-- 画像 
    1414data ImageType = 
    15           ImgNario00 | ImgNario01 | ImgNario02 | ImgNario03 | ImgNario04 
    16         | ImgNario10 | ImgNario11 | ImgNario12 | ImgNario13 | ImgNario14 
     15          ImgNarioLStand | ImgNarioLWalk1 | ImgNarioLWalk2 | ImgNarioLWalk3 | ImgNarioLJump 
     16        | ImgNarioRStand | ImgNarioRWalk1 | ImgNarioRWalk2 | ImgNarioRWalk3 | ImgNarioRJump 
    1717        | ImgBlock1 | ImgBlock2 | ImgBlock3 | ImgBlock4 | ImgBlock5 
    1818        | ImgMt02 | ImgMt11 | ImgMt12 | ImgMt13 | ImgMt22 
     
    2121        | ImgGrass00 | ImgGrass01 | ImgGrass02 
    2222        | ImgFont 
     23        | ImgTitle 
    2324        deriving Eq 
    2425 
    2526 
    26 imageFn ImgNario00 = "nario00.bmp" 
    27 imageFn ImgNario01 = "nario01.bmp" 
    28 imageFn ImgNario02 = "nario02.bmp" 
    29 imageFn ImgNario03 = "nario03.bmp" 
    30 imageFn ImgNario04 = "nario04.bmp" 
    31 imageFn ImgNario10 = "nario10.bmp" 
    32 imageFn ImgNario11 = "nario11.bmp" 
    33 imageFn ImgNario12 = "nario12.bmp" 
    34 imageFn ImgNario13 = "nario13.bmp" 
    35 imageFn ImgNario14 = "nario14.bmp" 
     27imageFn ImgNarioLStand = "narioLStand.bmp" 
     28imageFn ImgNarioLWalk1 = "narioLWalk1.bmp" 
     29imageFn ImgNarioLWalk2 = "narioLWalk2.bmp" 
     30imageFn ImgNarioLWalk3 = "narioLWalk3.bmp" 
     31imageFn ImgNarioLJump = "narioLJump.bmp" 
     32imageFn ImgNarioRStand = "narioRStand.bmp" 
     33imageFn ImgNarioRWalk1 = "narioRWalk1.bmp" 
     34imageFn ImgNarioRWalk2 = "narioRWalk2.bmp" 
     35imageFn ImgNarioRWalk3 = "narioRWalk3.bmp" 
     36imageFn ImgNarioRJump = "narioRJump.bmp" 
    3637imageFn ImgBlock1 = "block1.bmp" 
    3738imageFn ImgBlock2 = "block2.bmp" 
     
    5859imageFn ImgGrass02 = "grass02.bmp" 
    5960imageFn ImgFont = "font.bmp" 
     61imageFn ImgTitle = "title.bmp" 
    6062 
    6163images = [ 
    62         ImgNario00, ImgNario01, ImgNario02, ImgNario03, ImgNario04, 
    63         ImgNario10, ImgNario11, ImgNario12, ImgNario13, ImgNario14, 
     64        ImgNarioLStand, ImgNarioLWalk1, ImgNarioLWalk2, ImgNarioLWalk3, ImgNarioLJump, 
     65        ImgNarioRStand, ImgNarioRWalk1, ImgNarioRWalk2, ImgNarioRWalk3, ImgNarioRJump, 
    6466        ImgBlock1, ImgBlock2, ImgBlock3, ImgBlock4, ImgBlock5, 
    6567        ImgMt02, ImgMt11, ImgMt12, ImgMt13, ImgMt22, 
     
    6769        ImgDk00, ImgDk01, ImgDk10, ImgDk11, 
    6870        ImgGrass00, ImgGrass01, ImgGrass02, 
    69         ImgFont 
     71        ImgFont, 
     72        ImgTitle 
    7073        ] 
  • lang/haskell/nario/Field.hs

    r20045 r20223  
    7171                cellProc _ (_, ' ') = return () 
    7272                cellProc y (x, c) = putchr x y c >> return () 
    73                 putchr x y c = blitSurface (getImageSurface imgres $ chr2img c) Nothing sur $ pt (x*chrSize - rx) (y*chrSize) 
     73                putchr x y c = blitSurface (getImageSurface imgres $ chr2img c) Nothing sur $ pt (x*chrSize - rx) (y*chrSize - 8) 
    7474 
    7575                -- 表示される部分だけ取り出す 
  • lang/haskell/nario/Main.hs

    r20175 r20223  
    1515import Font 
    1616 
    17 wndTitle = "delayed-stream test" 
     17wndTitle = "NARIO in Haskell" 
    1818wndWidth = 256 
    19 wndHeight = 240 
     19wndHeight = 224 
    2020wndBpp = 32 
    2121 
     
    127127renderInfo gs imgres sur = do 
    128128        puts 3 1 "MARIO" 
    129         puts 3 2 "00000" 
     129        puts 3 2 "000000" 
    130130        puts 11 2 "?*00" 
    131         puts 19 1 "WORLD" 
    132         puts 20 2 "1-1" 
    133         puts 26 1 "TIME" 
    134         puts 27 2 "255" 
     131        puts 18 1 "WORLD" 
     132        puts 19 2 "1-1" 
     133        puts 25 1 "TIME" 
     134        puts 26 2 "255" 
    135135        where 
    136136                puts = fontPut sur fontsur 
    137137                fontsur = getImageSurface imgres ImgFont 
     138 
     139-- タイトル画面 
     140renderTitle gs imgres sur = do 
     141        blitSurface (getImageSurface imgres ImgTitle) Nothing sur (pt (5*8) (3*8)) 
     142        puts 13 14 "@1985 NINTENDO" 
     143        puts 9 17 "> 1 PLAYER GAME" 
     144        puts 9 19 "  2 PLAYER GAME" 
     145        puts 12 22 "TOP- 000000" 
     146        where 
     147                puts = fontPut sur fontsur 
     148                fontsur = getImageSurface imgres ImgFont 
  • lang/haskell/nario/Player.hs

    r20156 r20223  
    5757 
    5858imgTable = [ 
    59         [ImgNario00, ImgNario01, ImgNario02, ImgNario03, ImgNario04], 
    60         [ImgNario10, ImgNario11, ImgNario12, ImgNario13, ImgNario14] 
     59        [ImgNarioLStand, ImgNarioLWalk1, ImgNarioLWalk2, ImgNarioLWalk3, ImgNarioLJump], 
     60        [ImgNarioRStand, ImgNarioRWalk1, ImgNarioRWalk2, ImgNarioRWalk3, ImgNarioRJump] 
    6161        ] 
    6262 
     
    7676                vx' 
    7777                        | ax /= 0                       = rangeadd (vx player) ax (-maxspd) maxspd 
    78                         | (stand player)        = friction (vx player) acc 
    79                         | otherwise                     = friction (vx player) (acc `div` 2) 
     78                        | stand player          = friction (vx player) acc 
     79                        | otherwise                     = vx player 
    8080                x' = max xmin $ (x player) + vx' 
    8181                scrx' 
     
    178178        blitSurface (getImageSurface imgres imgtype) Nothing sur pos 
    179179        where 
    180                 pos = pt ((x player) `div` one - chrSize `div` 2 - scrx) ((y player) `div` one - chrSize) 
     180                pos = pt ((x player) `div` one - chrSize `div` 2 - scrx) ((y player) `div` one - chrSize - 8) 
    181181                imgtype = imgTable !! (lr player) !! (pat player) 
  • lang/haskell/nario/data/stage0.map

    r20045 r20223  
    1                                                                                                                                                                                                                  
    2                   123               1223                           123              1223                                                                                                              o          
    3         123       456      12223    4556                123        456     12223    4556                           123              1223                           123              1223              | 123      
    4         456                45556                        456                45556                        123        456     12223    4556                123        456     12223    4556              ! 456      
    5                                                                                                         456                45556                        456                45556                      !          
     1 
     2                                                                                                                                                                                                      o          
     3                  123               1223                           123              1223                           123              1223                           123              1223              | 123      
     4        123       456      12223    4556                123        456     12223    4556                123        456     12223    4556                123        456     12223    4556              ! 456      
     5        456                45556                        456                45556                        456                45556                        456                45556                      !          
    66                      ?                                                         OOOOOOOO   OOO?              ?           OOO    O??O                                                        XX        !          
    77                                                                                                                                                                                           XXX        !