Commit 4a212c25 authored by Diederik van Arkel's avatar Diederik van Arkel

Add project and support files

parent 755fe0f6
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,6 +2,7 @@
definition module SintGfx
import StdEnv, StdGameDef
import SintGfx2
OBJ_START :== 0x10
......@@ -110,215 +111,3 @@ L1_32x32BoatsWideBoundMap :: BoundMap
L1_32x32Sequences :: [(Int, [(Int, Int)])]
L1_32x32BoatsLayer :: Layer
L2Bitmap :: GameBitmap
L2LevelMap :: [{#Int}]
L2LevelBoundMapData :: [{#Int}]
L2LevelBoundMap :: BoundMap
L2LevelWideBoundMap :: BoundMap
L2BonusMap :: [{#Int}]
L2BonusBoundMapData :: [{#Int}]
L2BonusBoundMap :: BoundMap
L2BonusWideBoundMap :: BoundMap
L2BackGrMap :: [{#Int}]
L2BackGrBoundMapData :: [{#Int}]
L2BackGrBoundMap :: BoundMap
L2BackGrWideBoundMap :: BoundMap
L2Seq1 :: (Int, [(Int, Int)])
L2Seq2 :: (Int, [(Int, Int)])
L2Seq3 :: (Int, [(Int, Int)])
L2Seq4 :: (Int, [(Int, Int)])
L2Sequences :: [(Int, [(Int, Int)])]
L2LevelLayer :: Layer
L2BonusLayer :: Layer
L2BackGrLayer :: Layer
LevelSprite6 :: Sprite
LevelAnimation6 :: Sprite
LevelSprite4 :: Sprite
LevelAnimation4 :: Sprite
BonusSprite5 :: Sprite
BonusAnimation5 :: Sprite
L2Sprite3 :: Sprite
L2Animation3 :: Sprite
L2_40x24Bitmap :: GameBitmap
L2_40x24Sky2Map :: [{#Int}]
L2_40x24Sky2BoundMapData :: [{#Int}]
L2_40x24Sky2BoundMap :: BoundMap
L2_40x24Sky2WideBoundMap :: BoundMap
L2_40x24Seq1 :: (Int, [(Int, Int)])
L2_40x24Seq2 :: (Int, [(Int, Int)])
L2_40x24Seq3 :: (Int, [(Int, Int)])
L2_40x24Seq4 :: (Int, [(Int, Int)])
L2_40x24Sequences :: [(Int, [(Int, Int)])]
L2_40x24Sky2Layer :: Layer
Sky2Sprite5 :: Sprite
Sky2Animation5 :: Sprite
L2_40x24Sprite1 :: Sprite
L2_40x24Animation1 :: Sprite
Sky2Sprite2 :: Sprite
Sky2Animation2 :: Sprite
Sky2Sprite4 :: Sprite
Sky2Animation4 :: Sprite
MainCharBitmap :: GameBitmap
MainCharSintMap :: [{#Int}]
MainCharSintBoundMapData :: [{#Int}]
MainCharSintBoundMap :: BoundMap
MainCharSintWideBoundMap :: BoundMap
MainCharSeq1 :: (Int, [(Int, Int)])
MainCharSeq2 :: (Int, [(Int, Int)])
MainCharSeq3 :: (Int, [(Int, Int)])
MainCharSeq4 :: (Int, [(Int, Int)])
MainCharSeq5 :: (Int, [(Int, Int)])
MainCharSeq6 :: (Int, [(Int, Int)])
MainCharSeq7 :: (Int, [(Int, Int)])
MainCharSequences :: [(Int, [(Int, Int)])]
MainCharSintLayer :: Layer
SintSprite1 :: Sprite
SintAnimation1 :: Sprite
SintSprite2 :: Sprite
SintAnimation2 :: Sprite
SintSprite3 :: Sprite
SintAnimation3 :: Sprite
SintSprite4 :: Sprite
SintAnimation4 :: Sprite
SintSprite5 :: Sprite
SintAnimation5 :: Sprite
SintSprite6 :: Sprite
SintAnimation6 :: Sprite
SintSprite7 :: Sprite
SintAnimation7 :: Sprite
ItemsBitmap :: GameBitmap
ItemsItemMap :: [{#Int}]
ItemsItemBoundMapData :: [{#Int}]
ItemsItemBoundMap :: BoundMap
ItemsItemWideBoundMap :: BoundMap
ItemsSeq1 :: (Int, [(Int, Int)])
ItemsSeq2 :: (Int, [(Int, Int)])
ItemsSeq3 :: (Int, [(Int, Int)])
ItemsSeq4 :: (Int, [(Int, Int)])
ItemsSeq5 :: (Int, [(Int, Int)])
ItemsSeq6 :: (Int, [(Int, Int)])
ItemsSeq7 :: (Int, [(Int, Int)])
ItemsSequences :: [(Int, [(Int, Int)])]
ItemsItemLayer :: Layer
ItemSprite1 :: Sprite
ItemAnimation1 :: Sprite
ItemSprite2 :: Sprite
ItemAnimation2 :: Sprite
ItemSprite3 :: Sprite
ItemAnimation3 :: Sprite
ItemSprite4 :: Sprite
ItemAnimation4 :: Sprite
ItemSprite5 :: Sprite
ItemAnimation5 :: Sprite
ItemSprite6 :: Sprite
ItemAnimation6 :: Sprite
ItemSprite7 :: Sprite
ItemAnimation7 :: Sprite
PepernotenBitmap :: GameBitmap
PepernotenPepernootMap :: [{#Int}]
PepernotenPepernootBoundMapData :: [{#Int}]
PepernotenPepernootBoundMap :: BoundMap
PepernotenPepernootWideBoundMap :: BoundMap
PepernotenSeq1 :: (Int, [(Int, Int)])
PepernotenSequences :: [(Int, [(Int, Int)])]
PepernotenPepernootLayer :: Layer
PepernootSprite1 :: Sprite
PepernootAnimation1 :: Sprite
StatusBitmap :: GameBitmap
StatusStatusMap :: [{#Int}]
StatusStatusBoundMapData :: [{#Int}]
StatusStatusBoundMap :: BoundMap
StatusStatusWideBoundMap :: BoundMap
StatusSeq1 :: (Int, [(Int, Int)])
StatusSeq2 :: (Int, [(Int, Int)])
StatusSeq3 :: (Int, [(Int, Int)])
StatusSeq4 :: (Int, [(Int, Int)])
StatusSeq5 :: (Int, [(Int, Int)])
StatusSeq6 :: (Int, [(Int, Int)])
StatusSequences :: [(Int, [(Int, Int)])]
StatusStatusLayer :: Layer
StatusSprite1 :: Sprite
StatusAnimation1 :: Sprite
StatusSprite2 :: Sprite
StatusAnimation2 :: Sprite
StatusSprite3 :: Sprite
StatusAnimation3 :: Sprite
StatusSprite4 :: Sprite
StatusAnimation4 :: Sprite
StatusSprite5 :: Sprite
StatusAnimation5 :: Sprite
StatusSprite6 :: Sprite
StatusAnimation6 :: Sprite
SunBitmap :: GameBitmap
SunSunMap :: [{#Int}]
SunSunBoundMapData :: [{#Int}]
SunSunBoundMap :: BoundMap
SunSunWideBoundMap :: BoundMap
SunSeq1 :: (Int, [(Int, Int)])
SunSequences :: [(Int, [(Int, Int)])]
SunSunLayer :: Layer
SunSprite1 :: Sprite
SunAnimation1 :: Sprite
FadeBitmap :: GameBitmap
FadeMap1Map :: [{#Int}]
FadeMap1BoundMapData :: [{#Int}]
FadeMap1BoundMap :: BoundMap
FadeMap1WideBoundMap :: BoundMap
FadeSequences :: [(Int, [(Int, Int)])]
FadeMap1Layer :: Layer
AutoBitmap :: GameBitmap
AutoCarMap :: [{#Int}]
AutoCarBoundMapData :: [{#Int}]
AutoCarBoundMap :: BoundMap
AutoCarWideBoundMap :: BoundMap
AutoSeq1 :: (Int, [(Int, Int)])
AutoSequences :: [(Int, [(Int, Int)])]
AutoCarLayer :: Layer
CarSprite1 :: Sprite
CarAnimation1 :: Sprite
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Version: 1.4
Global
Built: True
Target: Object IO
Exec: {Project}\bounce.exe
CodeGen
CheckStacks: False
CheckIndexes: True
TargetProcessor: CurrentProcessor
Application
HeapSize: 409600
StackSize: 102400
ExtraMemory: 81920
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
StandardRuntimeEnv: True
Profile
Memory: False
MemoryMinimumHeapSize: 0
Time: False
Stack: False
Output
Output: NoConsole
Font: Courier
FontSize: 9
WriteStdErr: False
Link
LinkMethod: Static
GenerateRelocations: False
GenerateLinkMap: False
LinkResources: False
ResourceSource:
GenerateDLL: False
ExportedNames:
Paths
Path: {Project}
Precompile:
Postlink:
MainModule
Name: bounce
Dir: {Project}
Version: 1.4
Global
Built: True
Target: Object IO
Exec: {Project}\clipboardview.exe
CodeGen
CheckStacks: False
CheckIndexes: True
TargetProcessor: CurrentProcessor
Application
HeapSize: 409600
StackSize: 102400
ExtraMemory: 81920
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
StandardRuntimeEnv: True
Profile
Memory: False
MemoryMinimumHeapSize: 0
Time: False
Stack: False
Output
Output: NoConsole
Font: Courier
FontSize: 9
WriteStdErr: False
Link
LinkMethod: Static
GenerateRelocations: False
GenerateLinkMap: False
LinkResources: False
ResourceSource:
GenerateDLL: False
ExportedNames:
Paths
Path: {Project}
Precompile:
Postlink:
MainModule
Name: clipboardview
Dir: {Project}
module compare
// **************************************************************************************************
//
// A program in which two text files can be compared char by char.
//
// The program has been written in Clean 1.3.1 and uses the Clean Standard Object I/O library 1.0.1
//
// **************************************************************************************************
import StdEnv, StdIO
:: Local
= { name1 :: String
, name2 :: String
}
noFilesSelected
= { name1="", name2="" }
Start :: *World -> *World
Start world
= startIO noFilesSelected 0 [initIO] [] world
Hocus pocus pilatus pas
initIO :: (PSt Local .p) -> PSt Local .p
initIO ps
# (showid,ps) = accPIO openId ps
# (_,ps) = openMenu undef (file showid) ps
= ps
where
file showid
= Menu "File"
( MenuItem "Compare..." [MenuFunction (noLS compare), MenuShortKey 'c']
:+: MenuItem "Compare again" [MenuFunction (noLS again), MenuShortKey 'a']
:+: MenuSeparator []
:+: MenuItem "Quit" [MenuFunction (noLS closeProcess), MenuShortKey 'q']
) []
where
compare :: (PSt Local .p) -> PSt Local .p
compare ps
# (maybeFirstFile,ps) = selectInputFile ps
| isNothing maybeFirstFile
= {ps & ls=noFilesSelected}
# (maybeSecondFile,ps) = selectInputFile ps
| isNothing maybeSecondFile
= {ps & ls=noFilesSelected}
| otherwise
# ps = {ps & ls={name1=fromJust maybeFirstFile,name2=fromJust maybeSecondFile}}
= showdifference ps
again :: (PSt Local .p) -> PSt Local .p
again ps=:{ls={name1,name2}}
| name1=="" || name2==""
= compare ps
| otherwise
= showdifference ps
showdifference :: (PSt Local .p) -> PSt Local .p
showdifference ps=:{ls={name1,name2}}
# ps = closeWindow showid ps
# (files,ps) = accFiles (openfilepair (name1,name2)) ps
(maybeDifference,files) = comparefilepair 1 files
# ps = appFiles (closefilepair files) ps
| isNothing maybeDifference
= appPIO beep ps
# (error,ps) = openDialog undef (dialog (fromJust maybeDifference)) ps
| error<>NoError
= abort "Could not open dialog."
| otherwise
= ps
where
dialog (i,line1,line2) = Dialog "Difference found"
( ListLS
[ TextControl ("Difference at line "+++toString i) []
, TextControl line1 [ControlPos (Left,zero)]
, TextControl line2 [ControlPos (Left,zero)]
])
[ WindowId showid
, WindowClose (noLS (closeWindow showid))
]
openfilepair :: (String,String) *Files -> ((*File,*File), *Files)
openfilepair (fname1,fname2) files
# (ok,f1,files) = fopen fname1 FReadText files
| not ok
= abort ("Could not open "+++fname1)
# (ok,f2,files) = fopen fname2 FReadText files
| not ok
= abort ("Could not open "+++fname2)
| otherwise
= ((f1,f2),files)
closefilepair :: (*File,*File) *Files -> *Files
closefilepair (f1,f2) files
# (ok,files) = fclose f1 files
| not ok
= abort "Could not close first file."
# (ok,files) = fclose f2 files
| not ok
= abort "Could not close second file."
| otherwise
= files
comparefilepair :: Int (*File,*File) -> (Maybe (Int,String,String), (*File,*File))
comparefilepair i (f1,f2)
| sfend f1 && sfend f2
= (Nothing,(f1,f2))
# (line1,f1) = freadline f1
# (line2,f2) = freadline f2
| line1<>line2
= (Just (i,line1,line2),(f1,f2))
| otherwise
= comparefilepair (i+1) (f1,f2)
module compare
// **************************************************************************************************
//
// A program in which two text files can be compared char by char.
//
// The program has been written in Clean 1.3.1 and uses the Clean Standard Object I/O library 1.0.1
//
// **************************************************************************************************
import StdEnv, StdIO
:: Local
= { name1 :: String
, name2 :: String
}
noFilesSelected
= { name1="", name2="" }
Start :: *World -> *World
Start world
= startIO noFilesSelected 0 [initIO] [] world
initIO :: (PSt Local .p) -> PSt Local .p
initIO ps
# (showid,ps) = accPIO openId ps
# (_,ps) = openMenu undef (file showid) ps
= ps
where
file showid
= Menu "File"
( MenuItem "Compare..." [MenuFunction (noLS compare), MenuShortKey 'c']
:+: MenuItem "Compare again" [MenuFunction (noLS again), MenuShortKey 'a']
:+: MenuSeparator []
:+: MenuItem "Quit" [MenuFunction (noLS closeProcess), MenuShortKey 'q']
) []
where
compare :: (PSt Local .p) -> PSt Local .p
compare ps
# (maybeFirstFile,ps) = selectInputFile ps
| isNothing maybeFirstFile
= {ps & ls=noFilesSelected}
# (maybeSecondFile,ps) = selectInputFile ps
| isNothing maybeSecondFile
= {ps & ls=noFilesSelected}
| otherwise
# ps = {ps & ls={name1=fromJust maybeFirstFile,name2=fromJust maybeSecondFile}}
= showdifference ps
again :: (PSt Local .p) -> PSt Local .p
again ps=:{ls={name1,name2}}
| name1=="" || name2==""
= compare ps
| otherwise
= showdifference ps
showdifference :: (PSt Local .p) -> PSt Local .p
showdifference ps=:{ls={name1,name2}}
# ps = closeWindow showid ps
# (files,ps) = accFiles (openfilepair (name1,name2)) ps
(maybeDifference,files) = comparefilepair 1 files
# ps = appFiles (closefilepair files) ps
| isNothing maybeDifference
= appPIO beep ps
# (error,ps) = openDialog undef (dialog (fromJust maybeDifference)) ps
| error<>NoError
= abort "Could not open dialog."
| otherwise
= ps
where
dialog (i,line1,line2) = Dialog "Difference found"
( ListLS
[ TextControl ("Difference at line "+++toString i) []
, TextControl line1 [ControlPos (Left,zero)]
, TextControl line2 [ControlPos (Left,zero)]
])
[ WindowId showid
, WindowClose (noLS (closeWindow showid))
]
openfilepair :: (String,String) *Files -> ((*File,*File), *Files)
openfilepair (fname1,fname2) files
# (ok,f1,files) = fopen fname1 FReadText files
| not ok
= abort ("Could not open "+++fname1)
# (ok,f2,files) = fopen fname2 FReadText files
| not ok
= abort ("Could not open "+++fname2)
| otherwise
= ((f1,f2),files)
closefilepair :: (*File,*File) *Files -> *Files
closefilepair (f1,f2) files
# (ok,files) = fclose f1 files
| not ok
= abort "Could not close first file."
# (ok,files) = fclose f2 files
| not ok
= abort "Could not close second file."
| otherwise
= files
comparefilepair :: Int (*File,*File) -> (Maybe (Int,String,String), (*File,*File))
comparefilepair i (f1,f2)
| sfend f1 && sfend f2
= (Nothing,(f1,f2))
# (line1,f1) = freadline f1
# (line2,f2) = freadline f2
| line1<>line2
= (Just (i,line1,line2),(f1,f2))
| otherwise
= comparefilepair (i+1) (f1,f2)
Version: 1.4
Global
Built: True
Target: Object IO
Exec: {Project}\compare.exe
CodeGen
CheckStacks: False
CheckIndexes: True
TargetProcessor: CurrentProcessor
Application
HeapSize: 409600
StackSize: 102400
ExtraMemory: 81920
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
StandardRuntimeEnv: True
Profile
Memory: False
MemoryMinimumHeapSize: 0
Time: False
Stack: False
Output
Output: NoConsole
Font: Courier
FontSize: 9
WriteStdErr: False
Link
LinkMethod: Static
GenerateRelocations: False
GenerateLinkMap: False
LinkResources: False
ResourceSource:
GenerateDLL: False
ExportedNames:
Paths
Path: {Project}
Precompile:
Postlink:
MainModule
Name: compare
Dir: {Project}
Version: 1.4
Global
Built: True
Target: Object IO
Exec: {Project}\counter.exe
CodeGen
CheckStacks: False
CheckIndexes: True
TargetProcessor: CurrentProcessor
Application
HeapSize: 409600
StackSize: 102400
ExtraMemory: 81920
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
StandardRuntimeEnv: True
Profile
Memory: False