stunts 0.1.1 → 0.1.2
raw patch · 5 files changed
+164/−213 lines, 5 files
Files
- media/newstunts.zip binary
- src/GameData.hs +31/−81
- src/GamePhysics.hs +2/−2
- src/Stunts/Color.hs +130/−129
- stunts.cabal +1/−1
media/newstunts.zip view
binary file changed (2226 → 2198 bytes)
src/GameData.hs view
@@ -11,13 +11,8 @@ import qualified Data.IntMap as IM import Data.List import qualified Data.Map as M-import Data.Maybe import Data.Ord import Graphics.LambdaCube as LC-import Graphics.LambdaCube.Material as LC hiding (Material)-import Graphics.LambdaCube.Pass as LC-import Graphics.LambdaCube.Technique as LC-import Graphics.LambdaCube.World as LC import Stunts.Color import Stunts.Loader import Stunts.Track@@ -25,20 +20,6 @@ import System.Random import qualified Data.Vector as V -{--TODO: load all resources:- - build resource Map- - model Map- - car Map- - opponent Map--data StuntsData- = StuntsData- { terrainMap :: ModelMap- , trackMap :: ModelMap- }--}- cube :: VMesh cube = VMesh [sm] $ Just vvb where@@ -73,26 +54,18 @@ tread = [Primitive Polygon True False [38] [i,i+n,i'+n,i'] | i <- [0..n-1], let i' = if i == n-1 then 0 else i+1] -{-- - generate normal for each vertex- - group faces by material- - map stunts material to LC material- - generate extra vertex attributes if necessary (e.g. texcoord)- - make face triangulation--} toVMesh :: Model -> VMesh-toVMesh md = VMesh ({- debugNormals: -} sml) $ Just vvb+toVMesh mdOrig = VMesh sml (Just vvb) where+ md = separateFaces mdOrig+ groupToSubMesh prs@(pr:_) = case prType pr of Particle -> vsm OT_POINT_LIST (vib id) Line -> vsm OT_LINE_LIST (vib id) Polygon -> vsm OT_TRIANGLE_LIST (vib triangulate) _ -> vsm OT_TRIANGLE_LIST V.empty where- --mat = "StuntsMaterial" ++ (if True {- prTwoSided pr -} then "TwoSided" else "") ++ show (head (prMaterials pr))- mid = head (prMaterials pr)- mat = "StuntsMaterial" ++ (if mid `elem` [16,101,102,103,104,105] then "InverseBiased" else if prZBias pr then "Biased" else "") ++ show mid- vsm pty = VSubMesh mat pty Nothing . Just+ vsm pty = VSubMesh "StuntsMaterial" pty Nothing . Just vib fun = V.fromList $ fun . prIndices =<< prs triangulate (v0:vs@(_:_)) = concat [[v0,v1,v2] | v1 <- tail vs | v2 <- vs] triangulate _ = []@@ -100,29 +73,37 @@ f a = realToFrac a v = V.fromList [Vec3 (f x) (f y) (f z) | (x,y,z) <- mdVertices md] vvb = if V.length n == V.length v- then V.fromList [VVD_POSITION v, VVD_NORMAL n]+ then V.fromList [VVD_POSITION v, VVD_NORMAL n, VVD_DIFFUSE d, VVD_SPECULAR s] else error $ "not matching sizes: " ++ show (V.length n) ++ " " ++ show (V.length v) sml = map groupToSubMesh $ groupSetBy (comparing (prMaterials &&& prType)) $ mdPrimitives md - -- Temp code: genNormal (a:b:c:_) = normalize $ (vc &- va) &^ (vb &- va) where va = v V.! a vb = v V.! b vc = v V.! c genNormal _ = zero- -- normal calculation- nf = V.fromList [genNormal (prIndices f) | f <- mdPrimitives md]- n = V.backpermute nf $ V.fromList [ix | (ix,pr) <- zip [0..] (mdPrimitives md), _ <- prIndices pr]- --n = V.fromList $ IM.elems $ nM `IM.union` (IM.fromList [(i,zero) | i <- [0..V.length v-1]])- --nM = IM.fromList [(fst $ head g,avg g) | g <- groupSetBy (comparing fst) [(i,fi) | (fi,fc) <- zip [0..] $ mdPrimitives md, i <- prIndices fc]]- --avg a = foldl' (\r (_,b) -> r &+ (nf V.! b)) zero a &* (1 / (fromIntegral $ length a))- -- Normal debugging- --debugNormals = VSubMesh "StuntsMaterial60" OT_LINE_LIST dv di- --dv = Just $ V.fromList [VVD_POSITION $ v V.++ V.zipWith (\a b -> a &+ (b &* 40)) v n]- --vl = V.length v- --di = Just $ V.fromList $ concat [[i,i+vl] | i <- [0..vl-1]] + genMat pr = (Vec4 r g b 1, Vec3 d z shiny)+ where+ i = head (prMaterials pr)+ Material pattern rgb _ shiny = materialMap IM.! i+ r = fromIntegral (rgb `shiftR` 16) / 255+ g = fromIntegral ((rgb `shiftR` 8) .&. 0xff) / 255+ b = fromIntegral (rgb .&. 0xff) / 255+ d = case pattern of+ Grate -> 0.5+ Transparent -> 0+ _ -> 1+ z = if i `elem` [16,101,102,103,104,105] then 1.00001+ else if prZBias pr then 1 else 1.000005++ (nf,df,sf) = V.unzip3 $ V.fromList [(genNormal (prIndices pr), d, s) | pr <- mdPrimitives md, let (d,s) = genMat pr]+ i = V.fromList [ix | (ix,pr) <- zip [0..] (mdPrimitives md), _ <- prIndices pr]+ n = V.backpermute nf i+ d = V.backpermute df i+ s = V.backpermute sf i+ separateFaces :: Model -> Model separateFaces md = Model { mdVertices = vs', mdPrimitives = prs' } where@@ -137,36 +118,11 @@ n' = n+l pr' = pr { prIndices = take l [n..] } -prepareMaterials :: RenderSystem r vb ib q t p lp => String -> LCM (World r vb ib q t p lp) e ()-prepareMaterials base = do- mat <- loadMaterialResources =<< fromJust <$> getLoadedMaterial base- let Just (tch:tchs) = mtSupportedTechniques mat- pass:passes = tchPasses tch-- forM_ (IM.toList materialMap) $ \(i, Material pattern rgb _) -> do- let name' = base ++ show i- mat' = mat { mtName = name', mtSupportedTechniques = Just (tch':tchs) }- tch' = tch { tchPasses = pass':passes }- pass' = pass { psAmbient = (r,g,b,1), psDiffuse = (d,0,0,1) }- r = fromIntegral (rgb `shiftR` 16) / 255- g = fromIntegral ((rgb `shiftR` 8) .&. 0xff) / 255- b = fromIntegral (rgb .&. 0xff) / 255- d = case pattern of- Grate -> 0.5- Transparent -> 0- _ -> 1- updateResource $ \rl -> rl { rlMaterialMap = M.insert name' mat' (rlMaterialMap rl) }- readStuntsData :: RenderSystem r vb ib q t p lp => Int -> String -> LCM (World r vb ib q t p lp) e (VMesh, [(Vec3,Float,Float,VMesh)], VMesh, VMesh,(FloatType,Vec3),Car) readStuntsData carNum trkFile = do- prepareMaterials "StuntsMaterial"- prepareMaterials "StuntsMaterialBiased"- prepareMaterials "StuntsMaterialInverseBiased"- --prepareMaterials "StuntsMaterialTwoSided"- let loadRes n = readResources <$> unpackResource <$> LC.readFile n- loadVMesh n = M.map (toVMesh . separateFaces . runGet getModel) <$> loadRes n- loadCarVMesh n = M.mapWithKey (\k -> toVMesh . separateFaces . fixOp k . runGet getModel) <$> loadRes n+ loadVMesh n = M.map (toVMesh . runGet getModel) <$> loadRes n+ loadCarVMesh n = M.mapWithKey (\k -> toVMesh . fixOp k . runGet getModel) <$> loadRes n where fixOp k = if k == "car0" then addBottom . fixLambo else id @@ -227,6 +183,8 @@ v1 = vec i1 v2 = vec i2 v3 = vec i3+ isNewFace _ = False+ scaleFactor = 0.3048 * 205 / 1024 car0ScaleFactor = scaleFactor / 20 loadCarWheels n = do@@ -285,9 +243,6 @@ | otherwise = Nothing startPos = head [i | Just i <- map startOrientation trackItems] - --carsMesh0 = [(toProj4 0 i 2 True,m M.! "car0") | (i,(m,_)) <- zip [0..] cars]- --carsMesh1 = [(toProj4 0 i 3 True,m M.! "car1") | (i,(m,_)) <- zip [0..] cars]- fenc = game1Map M.! "fenc" cfen = game1Map M.! "cfen" fence = [(toProj4 o x y False, fenc) | x <- [1..28], (o,y) <- [(0,0),(pi,29)]] ++@@ -304,15 +259,10 @@ (a,x,z) <- getCoord <$> randomIO <*> randomIO y <- randomIO return (scalingUniformProj4 (y*0.4+0.3) .*. rotMatrixProj4 a (Vec3 0 1 0) .*. translation (Vec3 x (y*1500+600) z), m)- {-- - read car sim data- - collect these data:- - wheel sizes- - wheel position- -}+ let (carModel,carSim,carWheels) = cars !! (carNum `mod` 11) return $ (mkVMesh' [(scalingUniformProj4 (1/20) .*. toProj4 pi 0 0 False,carModel M.! "car0")],- [(p,w,r,mkVMesh' [(scaling $ Vec3 w r r,toVMesh $ separateFaces $ wheelBase 16)]) | (p,w,r) <- carWheels],+ [(p,w,r,mkVMesh' [(scaling $ Vec3 w r r,toVMesh (wheelBase 16))]) | (p,w,r) <- carWheels], mkVMesh' (terrain ++ clouds ++ fence), mkVMesh' track, startPos,
src/GamePhysics.hs view
@@ -84,8 +84,8 @@ return () let (gEngineForce, gBrakingForce) = case (up,down) of- (False,True) -> (0,dt*500*120)- (True,False) -> (dt*1500*120,0)+ (False,True) -> (0,5*120)+ (True,False) -> (15*120,0) _ -> (0,0) btRaycastVehicle_applyEngineForce carVehicle gEngineForce 2 btRaycastVehicle_setBrake carVehicle gBrakingForce 2
src/Stunts/Color.hs view
@@ -19,6 +19,7 @@ { pattern :: Pattern , color :: Word32 , colorIndex :: Int+ , shininess :: Float } toRGBA :: Word32 -> [Word8]@@ -34,135 +35,135 @@ -- MaterialIndex Pattern Color ColorIndexOnPalette materialMap :: IntMap Material materialMap = IM.fromList- [ ( 0, (Material Opaque 0x000000 0)) -- Black- , ( 1, (Material Opaque 0x0000A8 1)) -- Blue- , ( 2, (Material Opaque 0x00A800 2)) -- Green- , ( 3, (Material Opaque 0x00A8A8 3))- , ( 4, (Material Opaque 0xA80000 4)) -- Highway light / cork l/r wall- , ( 5, (Material Opaque 0xA800A8 5))- , ( 6, (Material Opaque 0xA85400 6)) -- Barn roof- , ( 7, (Material Opaque 0xA8A8A8 7)) -- Gas station doors- , ( 8, (Material Opaque 0x545454 8))- , ( 9, (Material Opaque 0x5454FC 9))- , ( 10, (Material Opaque 0x54FC54 10)) -- Tree (pine)- , ( 11, (Material Opaque 0x54FCFC 11))- , ( 12, (Material Opaque 0xFC5454 12)) -- Highway split light- , ( 13, (Material Opaque 0xFC54FC 13))- , ( 14, (Material Opaque 0xFCFC54 14)) -- Sharp turn sign- , ( 15, (Material Opaque 0xFCFCFC 15)) -- Tennis court lines- , ( 16, (Material Opaque 0x246820 108)) -- Grass- , ( 17, (Material Opaque 0x5CFCFC 116)) -- Sky- , ( 18, (Material Opaque 0xFCFCFC 15)) -- Highway centerline- , ( 19, (Material Opaque 0x484848 28)) -- Asphalt pavement- , ( 20, (Material Opaque 0x383838 29)) -- Tunnel centerline- , ( 21, (Material Opaque 0xFCFC54 14)) -- Asphalt centerline- , ( 22, (Material Grate 0x484848 28)) -- Loop / Elev. road surface- , ( 23, (Material Grate 0x202020 31)) -- Pipe surface- , ( 24, (Material Grate 0xFCFC54 14))- , ( 25, (Material Opaque 0x9C6438 200)) -- Dirt pavement- , ( 26, (Material Opaque 0xB48054 198))- , ( 27, (Material Opaque 0xCCA080 196)) -- Dirt centerline- , ( 28, (Material Opaque 0xD8FCFC 112)) -- Ice pavement- , ( 29, (Material Opaque 0x9CFCFC 114))- , ( 30, (Material Opaque 0x5CFCFC 116)) -- Ice centerline- , ( 31, (Material Opaque 0xE4C4AC 194)) -- Bridges, buildings, etc.- , ( 32, (Material Opaque 0xC0906C 197)) -- Bridges, buildings, etc.- , ( 33, (Material Opaque 0x9C6438 200)) -- Bridges, buildings, etc.- , ( 34, (Material Grate 0x9C9CFC 146))- , ( 35, (Material Opaque 0xFC4040 37)) -- Banked road outer side- , ( 36, (Material Opaque 0xFC7C7C 35)) -- Tunnel walls / Bankings- , ( 37, (Material Opaque 0xFC40FC 181)) -- Bridge cables- , ( 38, (Material Opaque 0x383838 29)) -- Wheel (tyre tread)- , ( 39, (Material Opaque 0x202020 31)) -- Wheel (tyre sidewall)- , ( 40, (Material Opaque 0xC0C0C0 19)) -- Wheel ("rim")- , ( 41, (Material Opaque 0x00A8A8 3)) -- Windows (LM002 car1)- , ( 42, (Material Opaque 0x54FCFC 11)) -- Gas station windows- , ( 43, (Material Opaque 0x545454 8)) -- Windows and windshields- , ( 44, (Material Opaque 0x000000 0)) -- Windows and windshields- , ( 45, (Material Opaque 0xA80000 4))- , ( 46, (Material Opaque 0xA80000 4))- , ( 47, (Material Opaque 0xFC5454 12))- , ( 48, (Material Opaque 0x00007C 156)) -- Blue 1 Car body- , ( 49, (Material Opaque 0x0000A8 1)) -- Blue 2 Car body- , ( 50, (Material Opaque 0x0000D0 152)) -- Blue 3 Car body- , ( 51, (Material Opaque 0x0004FC 150)) -- Blue 4 Car body- , ( 52, (Material Opaque 0xB40000 42)) -- Red 1 Car body- , ( 53, (Material Opaque 0xE40000 40)) -- Red 2 Car body- , ( 54, (Material Opaque 0xFC2020 38)) -- Red 3 Car body- , ( 55, (Material Opaque 0xFC4040 37)) -- Red 4 Car body- , ( 56, (Material Opaque 0x545454 8)) -- Graphite 1 Car body- , ( 57, (Material Opaque 0x606060 26)) -- Graphite 2 Car body- , ( 58, (Material Opaque 0x707070 25)) -- Graphite 3 Car body- , ( 59, (Material Opaque 0x7C7C7C 24)) -- Graphite 4 Car body- , ( 60, (Material Opaque 0xE4D800 72)) -- Yellow 1 Car body- , ( 61, (Material Opaque 0xFCF420 70)) -- Yellow 2 Car body- , ( 62, (Material Opaque 0xFCF85C 68)) -- Yellow 3 Car body- , ( 63, (Material Opaque 0xFCFC9C 66)) -- Yellow 4 Car body- , ( 64, (Material Opaque 0x009C9C 123)) -- Cyan 1 Car body- , ( 65, (Material Opaque 0x00CCCC 121)) -- Cyan 2 Car body- , ( 66, (Material Opaque 0x00E4E4 120)) -- Cyan 3 Car body- , ( 67, (Material Opaque 0x40FCFC 117)) -- Cyan 4 Car body- , ( 68, (Material Opaque 0x508400 92)) -- Green 1 Car body / Tree (palm)- , ( 69, (Material Opaque 0x74B400 90)) -- Green 2 Car body / Tree (palm)- , ( 70, (Material Opaque 0x90E400 88)) -- Green 3 Car body / Tree (palm)- , ( 71, (Material Opaque 0xA0FC00 87)) -- Green 4 Car body- , ( 72, (Material Opaque 0x440070 173)) -- Purple 1 Car body- , ( 73, (Material Opaque 0x60009C 171)) -- Purple 2 Car body- , ( 74, (Material Opaque 0x8000CC 169)) -- Purple 3 Car body- , ( 75, (Material Opaque 0xA800FC 167)) -- Purple 4 Car body- , ( 76, (Material Opaque 0xB0B0B0 20)) -- Silver 1 Car body- , ( 77, (Material Opaque 0xC0C0C0 19)) -- Silver 2 Car body- , ( 78, (Material Opaque 0xCCCCCC 18)) -- Silver 3 Car body- , ( 79, (Material Opaque 0xDCDCDC 17)) -- Silver 4 Car body- , ( 80, (Material Opaque 0x6C5800 77)) -- Golden 1 Car body- , ( 81, (Material Opaque 0x847400 76)) -- Golden 2 Car body- , ( 82, (Material Opaque 0xB4A400 74)) -- Golden 3 Car body- , ( 83, (Material Opaque 0xCCC000 73)) -- Golden 4 Car body- , ( 84, (Material Opaque 0x700000 45)) -- Burgundy 1 Car body- , ( 85, (Material Opaque 0x840000 44)) -- Burgundy 2 Car body- , ( 86, (Material Opaque 0xB40000 42)) -- Burgundy 3 Car body- , ( 87, (Material Opaque 0xCC0000 41)) -- Burgundy 4 Car body- , ( 88, (Material Opaque 0x000040 159)) -- Violet 1 Car body- , ( 89, (Material Opaque 0x280040 175)) -- Violet 2 Car body- , ( 90, (Material Opaque 0x340058 174)) -- Violet 3 Car body- , ( 91, (Material Opaque 0x500084 172)) -- Violet 4 Car body- , ( 92, (Material Opaque 0x383838 29))- , ( 93, (Material Opaque 0x484848 28))- , ( 94, (Material Grate 0xCCCCCC 18)) -- Tennis net- , ( 95, (Material Opaque 0x74B400 90)) -- Tennis grass- , ( 96, (Material Opaque 0xFCFCFC 15)) -- Clouds- , ( 97, (Material Opaque 0xA8A8A8 7)) -- Clouds- , ( 98, (Material Opaque 0x9C6438 200)) -- Pinetree trunk- , ( 99, (Material Opaque 0xC0602C 219)) -- Pinetree trunk- , (100, (Material Opaque 0x0080D0 136)) -- Water- , (101, (Material Opaque 0x84E084 99)) -- Grass (hilltop)- , (102, (Material Opaque 0x70C46C 101)) -- Grass (hill slope)- , (103, (Material Opaque 0x58A858 103)) -- Grass (angled slope)- , (104, (Material Opaque 0x509C4C 104)) -- Grass (angled slope)- , (105, (Material Opaque 0x388034 106)) -- Grass (angled slope)- , (106, (Material Opaque 0xDCDCDC 17)) -- Gas station / Joe's- , (107, (Material Opaque 0xB0B0B0 20)) -- Gas station / Joe's- , (108, (Material Opaque 0x905410 60)) -- Trunk (palmtree)- , (109, (Material Opaque 0x6C5800 77)) -- Trunk (palmtree)- , (110, (Material Opaque 0x580000 46)) -- Joe's roof- , (111, (Material Opaque 0x744008 61)) -- Windmill (base)- , (112, (Material Opaque 0x700000 45)) -- Windmill (base)- , (113, (Material Opaque 0x80542C 202)) -- Windmill (blades)- , (114, (Material Opaque 0x540054 190)) -- Joe's flashing sign- , (115, (Material Opaque 0xA400A4 186)) -- Joe's flashing sign- , (116, (Material Opaque 0xE000E4 183)) -- Joe's flashing sign- , (117, (Material Opaque 0xFC5CFC 180)) -- Joe's flashing sign- , (118, (Material Transparent 0xFFFFFF 255)) -- Windmill animation mask- , (119, (Material Grille 0x484848 28))- , (120, (Material InverseGrille 0x2C2C2C 30))- , (121, (Material Glass 0xFCFCFC 15))- , (122, (Material InverseGlass 0xB0B0B0 20))- , (123, (Material Glass 0xFCF85C 68))- , (124, (Material InverseGlass 0xFCAC54 54))- , (125, (Material Glass 0xFC0000 39))- , (126, (Material InverseGlass 0x9C0000 43))- , (127, (Material Opaque 0xFC5454 12)) -- Corner kerbs- , (128, (Material Opaque 0xDCDCDC 17)) -- Corner kerbs+ [ ( 0, (Material Opaque 0x000000 0 4.0)) -- Black+ , ( 1, (Material Opaque 0x0000A8 1 4.0)) -- Blue+ , ( 2, (Material Opaque 0x00A800 2 4.0)) -- Green+ , ( 3, (Material Opaque 0x00A8A8 3 4.0))+ , ( 4, (Material Opaque 0xA80000 4 4.0)) -- Highway light / cork l/r wall+ , ( 5, (Material Opaque 0xA800A8 5 4.0))+ , ( 6, (Material Opaque 0xA85400 6 20.0)) -- Barn roof+ , ( 7, (Material Opaque 0xA8A8A8 7 4.0)) -- Gas station doors+ , ( 8, (Material Opaque 0x545454 8 4.0))+ , ( 9, (Material Opaque 0x5454FC 9 4.0))+ , ( 10, (Material Opaque 0x54FC54 10 4.0)) -- Tree (pine)+ , ( 11, (Material Opaque 0x54FCFC 11 4.0))+ , ( 12, (Material Opaque 0xFC5454 12 4.0)) -- Highway split light+ , ( 13, (Material Opaque 0xFC54FC 13 4.0))+ , ( 14, (Material Opaque 0xFCFC54 14 4.0)) -- Sharp turn sign+ , ( 15, (Material Opaque 0xFCFCFC 15 4.0)) -- Tennis court lines+ , ( 16, (Material Opaque 0x246820 108 4.0)) -- Grass+ , ( 17, (Material Opaque 0x5CFCFC 116 0.0)) -- Sky+ , ( 18, (Material Opaque 0xFCFCFC 15 20.0)) -- Highway centerline+ , ( 19, (Material Opaque 0x484848 28 20.0)) -- Asphalt pavement+ , ( 20, (Material Opaque 0x383838 29 20.0)) -- Tunnel centerline+ , ( 21, (Material Opaque 0xFCFC54 14 20.0)) -- Asphalt centerline+ , ( 22, (Material Grate 0x484848 28 15.0)) -- Loop / Elev. road surface+ , ( 23, (Material Grate 0x202020 31 15.0)) -- Pipe surface+ , ( 24, (Material Grate 0xFCFC54 14 15.0))+ , ( 25, (Material Opaque 0x9C6438 200 4.0)) -- Dirt pavement+ , ( 26, (Material Opaque 0xB48054 198 4.0))+ , ( 27, (Material Opaque 0xCCA080 196 4.0)) -- Dirt centerline+ , ( 28, (Material Opaque 0xD8FCFC 112 4.0)) -- Ice pavement+ , ( 29, (Material Opaque 0x9CFCFC 114 4.0))+ , ( 30, (Material Opaque 0x5CFCFC 116 4.0)) -- Ice centerline+ , ( 31, (Material Opaque 0xE4C4AC 194 4.0)) -- Bridges, buildings, etc.+ , ( 32, (Material Opaque 0xC0906C 197 4.0)) -- Bridges, buildings, etc.+ , ( 33, (Material Opaque 0x9C6438 200 4.0)) -- Bridges, buildings, etc.+ , ( 34, (Material Grate 0x9C9CFC 146 4.0))+ , ( 35, (Material Opaque 0xFC4040 37 15.0)) -- Banked road outer side+ , ( 36, (Material Opaque 0xFC7C7C 35 15.0)) -- Tunnel walls / Bankings+ , ( 37, (Material Opaque 0xFC40FC 181 4.0)) -- Bridge cables+ , ( 38, (Material Opaque 0x383838 29 20.0)) -- Wheel (tyre tread)+ , ( 39, (Material Opaque 0x202020 31 20.0)) -- Wheel (tyre sidewall)+ , ( 40, (Material Opaque 0xC0C0C0 19 40.0)) -- Wheel ("rim")+ , ( 41, (Material Opaque 0x00A8A8 3 40.0)) -- Windows (LM002 car1)+ , ( 42, (Material Opaque 0x54FCFC 11 40.0)) -- Gas station windows+ , ( 43, (Material Opaque 0x545454 8 40.0)) -- Windows and windshields+ , ( 44, (Material Opaque 0x000000 0 40.0)) -- Windows and windshields+ , ( 45, (Material Opaque 0xA80000 4 4.0))+ , ( 46, (Material Opaque 0xA80000 4 4.0))+ , ( 47, (Material Opaque 0xFC5454 12 4.0))+ , ( 48, (Material Opaque 0x00007C 156 30.0)) -- Blue 1 Car body+ , ( 49, (Material Opaque 0x0000A8 1 30.0)) -- Blue 2 Car body+ , ( 50, (Material Opaque 0x0000D0 152 30.0)) -- Blue 3 Car body+ , ( 51, (Material Opaque 0x0004FC 150 30.0)) -- Blue 4 Car body+ , ( 52, (Material Opaque 0xB40000 42 30.0)) -- Red 1 Car body+ , ( 53, (Material Opaque 0xE40000 40 30.0)) -- Red 2 Car body+ , ( 54, (Material Opaque 0xFC2020 38 30.0)) -- Red 3 Car body+ , ( 55, (Material Opaque 0xFC4040 37 30.0)) -- Red 4 Car body+ , ( 56, (Material Opaque 0x545454 8 30.0)) -- Graphite 1 Car body+ , ( 57, (Material Opaque 0x606060 26 30.0)) -- Graphite 2 Car body+ , ( 58, (Material Opaque 0x707070 25 30.0)) -- Graphite 3 Car body+ , ( 59, (Material Opaque 0x7C7C7C 24 30.0)) -- Graphite 4 Car body+ , ( 60, (Material Opaque 0xE4D800 72 30.0)) -- Yellow 1 Car body+ , ( 61, (Material Opaque 0xFCF420 70 30.0)) -- Yellow 2 Car body+ , ( 62, (Material Opaque 0xFCF85C 68 30.0)) -- Yellow 3 Car body+ , ( 63, (Material Opaque 0xFCFC9C 66 30.0)) -- Yellow 4 Car body+ , ( 64, (Material Opaque 0x009C9C 123 30.0)) -- Cyan 1 Car body+ , ( 65, (Material Opaque 0x00CCCC 121 30.0)) -- Cyan 2 Car body+ , ( 66, (Material Opaque 0x00E4E4 120 30.0)) -- Cyan 3 Car body+ , ( 67, (Material Opaque 0x40FCFC 117 30.0)) -- Cyan 4 Car body+ , ( 68, (Material Opaque 0x508400 92 30.0)) -- Green 1 Car body / Tree (palm)+ , ( 69, (Material Opaque 0x74B400 90 30.0)) -- Green 2 Car body / Tree (palm)+ , ( 70, (Material Opaque 0x90E400 88 30.0)) -- Green 3 Car body / Tree (palm)+ , ( 71, (Material Opaque 0xA0FC00 87 30.0)) -- Green 4 Car body+ , ( 72, (Material Opaque 0x440070 173 30.0)) -- Purple 1 Car body+ , ( 73, (Material Opaque 0x60009C 171 30.0)) -- Purple 2 Car body+ , ( 74, (Material Opaque 0x8000CC 169 30.0)) -- Purple 3 Car body+ , ( 75, (Material Opaque 0xA800FC 167 30.0)) -- Purple 4 Car body+ , ( 76, (Material Opaque 0xB0B0B0 20 30.0)) -- Silver 1 Car body+ , ( 77, (Material Opaque 0xC0C0C0 19 30.0)) -- Silver 2 Car body+ , ( 78, (Material Opaque 0xCCCCCC 18 30.0)) -- Silver 3 Car body+ , ( 79, (Material Opaque 0xDCDCDC 17 30.0)) -- Silver 4 Car body+ , ( 80, (Material Opaque 0x6C5800 77 30.0)) -- Golden 1 Car body+ , ( 81, (Material Opaque 0x847400 76 30.0)) -- Golden 2 Car body+ , ( 82, (Material Opaque 0xB4A400 74 30.0)) -- Golden 3 Car body+ , ( 83, (Material Opaque 0xCCC000 73 30.0)) -- Golden 4 Car body+ , ( 84, (Material Opaque 0x700000 45 30.0)) -- Burgundy 1 Car body+ , ( 85, (Material Opaque 0x840000 44 30.0)) -- Burgundy 2 Car body+ , ( 86, (Material Opaque 0xB40000 42 30.0)) -- Burgundy 3 Car body+ , ( 87, (Material Opaque 0xCC0000 41 30.0)) -- Burgundy 4 Car body+ , ( 88, (Material Opaque 0x000040 159 30.0)) -- Violet 1 Car body+ , ( 89, (Material Opaque 0x280040 175 30.0)) -- Violet 2 Car body+ , ( 90, (Material Opaque 0x340058 174 30.0)) -- Violet 3 Car body+ , ( 91, (Material Opaque 0x500084 172 30.0)) -- Violet 4 Car body+ , ( 92, (Material Opaque 0x383838 29 4.0))+ , ( 93, (Material Opaque 0x484848 28 4.0))+ , ( 94, (Material Grate 0xCCCCCC 18 4.0)) -- Tennis net+ , ( 95, (Material Opaque 0x74B400 90 4.0)) -- Tennis grass+ , ( 96, (Material Opaque 0xFCFCFC 15 0.0)) -- Clouds+ , ( 97, (Material Opaque 0xA8A8A8 7 0.0)) -- Clouds+ , ( 98, (Material Opaque 0x9C6438 200 4.0)) -- Pinetree trunk+ , ( 99, (Material Opaque 0xC0602C 219 4.0)) -- Pinetree trunk+ , (100, (Material Opaque 0x0080D0 136 50.0)) -- Water+ , (101, (Material Opaque 0x84E084 99 4.0)) -- Grass (hilltop)+ , (102, (Material Opaque 0x70C46C 101 4.0)) -- Grass (hill slope)+ , (103, (Material Opaque 0x58A858 103 4.0)) -- Grass (angled slope)+ , (104, (Material Opaque 0x509C4C 104 4.0)) -- Grass (angled slope)+ , (105, (Material Opaque 0x388034 106 4.0)) -- Grass (angled slope)+ , (106, (Material Opaque 0xDCDCDC 17 4.0)) -- Gas station / Joe's+ , (107, (Material Opaque 0xB0B0B0 20 4.0)) -- Gas station / Joe's+ , (108, (Material Opaque 0x905410 60 4.0)) -- Trunk (palmtree)+ , (109, (Material Opaque 0x6C5800 77 4.0)) -- Trunk (palmtree)+ , (110, (Material Opaque 0x580000 46 30.0)) -- Joe's roof+ , (111, (Material Opaque 0x744008 61 4.0)) -- Windmill (base)+ , (112, (Material Opaque 0x700000 45 4.0)) -- Windmill (base)+ , (113, (Material Opaque 0x80542C 202 20.0)) -- Windmill (blades)+ , (114, (Material Opaque 0x540054 190 20.0)) -- Joe's flashing sign+ , (115, (Material Opaque 0xA400A4 186 20.0)) -- Joe's flashing sign+ , (116, (Material Opaque 0xE000E4 183 20.0)) -- Joe's flashing sign+ , (117, (Material Opaque 0xFC5CFC 180 20.0)) -- Joe's flashing sign+ , (118, (Material Transparent 0xFFFFFF 255 0.0)) -- Windmill animation mask+ , (119, (Material Grille 0x484848 28 4.0))+ , (120, (Material InverseGrille 0x2C2C2C 30 4.0))+ , (121, (Material Glass 0xFCFCFC 15 4.0))+ , (122, (Material InverseGlass 0xB0B0B0 20 4.0))+ , (123, (Material Glass 0xFCF85C 68 4.0))+ , (124, (Material InverseGlass 0xFCAC54 54 4.0))+ , (125, (Material Glass 0xFC0000 39 4.0))+ , (126, (Material InverseGlass 0x9C0000 43 4.0))+ , (127, (Material Opaque 0xFC5454 12 20.0)) -- Corner kerbs+ , (128, (Material Opaque 0xDCDCDC 17 20.0)) -- Corner kerbs ] vgaPal :: IntMap [Word8]
stunts.cabal view
@@ -1,5 +1,5 @@ Name: stunts-Version: 0.1.1+Version: 0.1.2 Cabal-Version: >= 1.2 Synopsis: A revival of the classic game Stunts (LambdaCube tech demo) Category: Graphics