Commit 26d8c373 authored by Peter Achten's avatar Peter Achten
Browse files

(MW): removed old stuff for new stuff

parent 6bcc2b3e
/*
Version 1.0.1
Ronny Wichers Schreur
ronny@cs.kun.nl
*/
definition module ArgEnv
:: EnvironmentVariable
= EnvironmentVariableUndefined
| EnvironmentVariable !.{#Char}
// get the value of an environment variable
getEnvironmentVariable :: !{#Char} -> *EnvironmentVariable
// get the command line, first element is the command name,
// arguments that are interpreted by the run-time system
// (for example to set the heap size) are excluded
// Clean 1.1: getCommandLine :: {{#Char}}
getCommandLine :: {.{#Char}}
implementation module ArgEnv
import StdEnv
:: CString :== Int
NULL :== 0
:: EnvironmentVariable
= EnvironmentVariableUndefined
| EnvironmentVariable !.{#Char}
getEnvSize :: !{#Char} -> Int
getEnvSize _
= code {
.inline getEnv
ccall ArgEnvGetEnvironmentVariableSizeC "S-I"
.end
}
copyEnv :: !Int !{#Char} -> {#.Char}
copyEnv _ _
= code {
.inline getEnv
| Clean 1.1: use create_array
| pushC '?'
| push_b 1
| update_b 1 2
| update_b 0 1
| pop_b 1
| create_array CHAR 0 1
| Clean 1.2 and later: use create_array_
create_array_ CHAR 0 1
push_a 1
push_a 1
ccall ArgEnvGetEnvironmentVariableCharsC "SS-I"
pop_b 1
update_a 0 1
pop_a 1
.end
}
getEnvironmentVariable :: !{#Char} -> *EnvironmentVariable
getEnvironmentVariable name
| size == 0
= EnvironmentVariableUndefined
| otherwise
= EnvironmentVariable (copyEnv size name`)
where
size
= getEnvSize name`
name`
= name +++ "\0"
copy :: !Int !CString -> {#.Char}
copy length cString
= code {
.inline copy
| Clean 1.1: use create_array
| pushC '\000'
| push_b 1
| update_b 1 2
| update_b 0 1
| pop_b 1
| create_array CHAR 0 1
| Clean 1.2 and later: use create_array_
create_array_ CHAR 0 1
push_a 0
ccall ArgEnvCopyCStringToCleanStringC "IS-I"
pop_b 1
.end
}
getCommandLineCount :: Int
getCommandLineCount
= code {
.inline getCommandLineCount
ccall ArgEnvGetCommandLineCountC "-I"
.end
}
getCommandLineArgument :: !Int -> (!Int, !Int)
getCommandLineArgument _
= code {
.inline getCommandLineArgument
ccall ArgEnvGetCommandLineArgumentC "I-II"
.end
}
getArg :: !Int -> {#.Char}
getArg i
= copy size cString
where
(size, cString)
= getCommandLineArgument i
// Clean 1.1: getCommandLine :: {{#Char}}
getCommandLine :: {.{#Char}}
getCommandLine
= {getArg i \\ i <- [0 .. getCommandLineCount-1]}
definition module B1
import StdEnv, StdGameDef
BackGr1Bitmap :: GameBitmap
BackGr1Map :: [{#Int}]
BackGr1Seq001 :: (Int, [(Int, Int)])
BackGr1Sequences :: [(Int, [(Int, Int)])]
implementation module B1
import StdEnv, StdGameDef
BackGr1Bitmap :: GameBitmap
BackGr1Bitmap
= { bitmapname = "B1.BMP"
, unitsize = { w = 20, h = 20 }
, dimensions = (16, 1)
, transparent = Just { x = 259, y = 18 }
}
BackGr1Map :: [{#Int}]
BackGr1Map = [{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1},
{-1,2,-1,-1,3,4,-1,5,1,6,-1,-1,-1},
{5,7,6,8,9,9,10,11,9,11,12,13,-1},
{2,11,2,14,15,9,11,11,11,1,1,9,10},
{2,7,2,11,9,9,1,9,1,9,11,9,1},
{11,2,11,2,9,9,1,1,1,1,1,9,2},
{11,11,2,7,9,9,1,1,1,2,1,9,1},
{11,11,11,11,9,9,1,1,2,1,1,9,1},
{11,11,2,7,9,9,1,1,1,1,1,9,1}]
BackGr1Seq001 :: (Int, [(Int, Int)])
BackGr1Seq001 = (-1,[])
BackGr1Sequences :: [(Int, [(Int, Int)])]
BackGr1Sequences = [BackGr1Seq001]
\ No newline at end of file
definition module B1B
import StdEnv, StdGameDef
BackGr1bBitmap :: GameBitmap
BackGr1bMap :: [{#Int}]
BackGr1bSeq001 :: (Int, [(Int, Int)])
BackGr1bSequences :: [(Int, [(Int, Int)])]
implementation module B1B
import StdEnv, StdGameDef
BackGr1bBitmap :: GameBitmap
BackGr1bBitmap
= { bitmapname = "B1B.BMP"
, unitsize = { w = 20, h = 20 }
, dimensions = (16, 2)
, transparent = Just { x = 39, y = 19 }
}
BackGr1bMap :: [{#Int}]
BackGr1bMap = [{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1},
{-1,2,3,4,-1,-1,3,4,5,6,3,4,-1,-1},
{-1,5,7,7,6,5,8,9,10,11,8,8,6,-1},
{12,7,7,7,7,7,8,13,14,10,9,10,8,15},
{14,10,16,10,17,17,18,19,14,20,21,20,16,14},
{14,14,14,20,7,8,13,22,23,22,23,14,14,14},
{14,22,23,14,10,8,13,24,25,25,26,14,14,14},
{23,24,26,14,20,18,14,24,25,25,25,23,14,22},
{26,24,26,14,14,14,22,25,25,25,25,26,14,24}]
BackGr1bSeq001 :: (Int, [(Int, Int)])
BackGr1bSeq001 = (-1,[])
BackGr1bSequences :: [(Int, [(Int, Int)])]
BackGr1bSequences = [BackGr1bSeq001]
\ No newline at end of file
definition module B2
import StdEnv, StdGameDef
BackGr2Bitmap :: GameBitmap
BackGr2Map :: [{#Int}]
BackGr2Seq001 :: (Int, [(Int, Int)])
BackGr2Sequences :: [(Int, [(Int, Int)])]
implementation module B2
import StdEnv, StdGameDef
BackGr2Bitmap :: GameBitmap
BackGr2Bitmap
= { bitmapname = "B2.BMP"
, unitsize = { w = 20, h = 20 }
, dimensions = (16, 2)
, transparent = Just { x = 19, y = 39 }
}
BackGr2Map :: [{#Int}]
BackGr2Map = [{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,16385,-1,-1,-1},
{16387,16387,-1,-1,-1,-1,16387,5,16387,5,16387,16387,16387},
{6,-1,-1,-1,-1,-1,7,7,-1,16385,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1,-1,-1,8,-1,-1,-1},
{-1,-1,-1,-1,16385,-1,-1,-1,-1,16385,-1,-1,-1},
{16387,16387,16387,16387,16387,16387,16387,-1,-1,8,-1,-1,16387},
{-1,9,-1,-1,16385,7,10,-1,-1,16385,-1,-1,-1},
{-1,-1,-1,-1,8,-1,-1,-1,-1,8,-1,-1,-1},
{-1,-1,-1,-1,16385,-1,-1,-1,-1,16385,-1,-1,-1},
{-1,-1,-1,-1,8,-1,-1,-1,-1,8,-1,-1,-1},
{-1,-1,-1,-1,16385,-1,-1,-1,-1,16385,-1,-1,-1},
{-1,-1,-1,-1,8,-1,-1,-1,-1,8,-1,-1,-1},
{-1,-1,-1,-1,16385,-1,-1,-1,-1,16385,-1,-1,-1},
{-1,-1,-1,-1,8,-1,11,-1,-1,8,-1,11,-1},
{-1,-1,11,7,16385,12,11,16397,15,16385,12,7,-1},
{-1,11,16400,18,19,16400,20,18,20,20,20,20,16400},
{16400,18,19,20,19,18,19,20,20,19,20,19,19},
{19,20,20,21,19,19,19,20,19,20,21,20,19},
{21,20,21,19,19,18,19,19,22,19,19,18,20},
{21,21,20,22,19,19,19,19,19,20,19,20,19},
{21,18,21,21,19,19,19,18,20,19,18,19,19},
{21,21,20,18,19,19,19,19,19,19,19,20,19}]
BackGr2Seq001 :: (Int, [(Int, Int)])
BackGr2Seq001 = (-1,[])
BackGr2Sequences :: [(Int, [(Int, Int)])]
BackGr2Sequences = [BackGr2Seq001]
\ No newline at end of file
definition module CARS
import StdEnv, StdGameDef
CarsBitmap :: GameBitmap
CarsMap :: [{#Int}]
CarsSeq001 :: (Int, [(Int, Int)])
CarsSequences :: [(Int, [(Int, Int)])]
implementation module CARS
import StdEnv, StdGameDef
CarsBitmap :: GameBitmap
CarsBitmap
= { bitmapname = "CARS.BMP"
, unitsize = { w = 80, h = 50 }
, dimensions = (4, 1)
, transparent = Just { x = 159, y = 49 }
}
CarsMap :: [{#Int}]
CarsMap = [{1,2,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1},
{-1,-1,-1,-1,-1,-1,-1}]
CarsSeq001 :: (Int, [(Int, Int)])
CarsSeq001 = (-1,[])
CarsSequences :: [(Int, [(Int, Int)])]
CarsSequences = [CarsSeq001]
\ No newline at end of file
definition module F1
import StdEnv, StdGameDef
ForeGr1Bitmap :: GameBitmap
ForeGr1Map :: [{#Int}]
ForeGr1Seq001 :: (Int, [(Int, Int)])
ForeGr1Sequences :: [(Int, [(Int, Int)])]
implementation module F1
import StdEnv, StdGameDef
ForeGr1Bitmap :: GameBitmap
ForeGr1Bitmap
= { bitmapname = "F1.BMP"
, unitsize = { w = 32, h = 32 }
, dimensions = (10, 6)
, transparent = Just { x = 255, y = 191 }
}
ForeGr1Map :: [{#Int}]
ForeGr1Map = [{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}]
ForeGr1Seq001 :: (Int, [(Int, Int)])
ForeGr1Seq001 = (-1,[(2,32),(2,32)])
ForeGr1Sequences :: [(Int, [(Int, Int)])]
ForeGr1Sequences = [ForeGr1Seq001]
\ No newline at end of file
definition module FADE
import StdEnv, StdGameDef
FadeBitmap :: GameBitmap
FadeMap :: [{#Int}]
FadeSeq001 :: (Int, [(Int, Int)])
FadeSequences :: [(Int, [(Int, Int)])]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment