GameFunctions.dcl 1.96 KB
Newer Older
Peter Achten's avatar
Peter Achten committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
definition module GameFunctions

//      Version 1.0

import	gameintrface_12, osgame
from	StdIOBasic	import Point2

// game result codes (GRESULT)
GR_OK                  :==  0
GR_FAILED              :== -1  // very unlikely errors
GR_OS_ERROR            :== -2  // OS specific error
GR_INVALID_BITMAP_ID   :== -3  // bitmap ID doesn't exist or already used
GR_INVALID_SPRITE_ID   :== -4  // sprite ID not found
GR_INVALID_MAP_ID      :== -5  // layer map ID is invalid
GR_NOT_FOUND           :== -6  // file or resource not found

InitGameBitmap :: !BID !{#Char} !Int !Int !Int !Int !*OSToolbox -> (!GRESULT, !*OSToolbox)

GameBitmapDone :: !BID !*OSToolbox -> (!GRESULT, !*OSToolbox)

ClearAllGameBitmaps :: !*OSToolbox -> (!GRESULT, !*OSToolbox)

23
SetTransparentColor :: !BID !Point2 !*OSToolbox -> (!GRESULT, !*OSToolbox)
Peter Achten's avatar
Peter Achten committed
24

25
InitBlockSequence :: !BID !(!SEQID, ![(Int,Int)]) !*OSToolbox -> (!GRESULT, !*OSToolbox)
Peter Achten's avatar
Peter Achten committed
26

27
InitGameLayerMap :: !MAPID !BID ![{#Int}] !Bool !*OSToolbox -> (!GRESULT, !*OSToolbox)
Peter Achten's avatar
Peter Achten committed
28
29
30
31

GameLayerMapDone :: !MAPID !*OSToolbox -> (!GRESULT, !*OSToolbox)

// OSGameData gs should only contain the current level here!
32
RunGameEngine :: !(OSGameData .gs) !*OSToolbox -> (.gs, !*OSToolbox)
Peter Achten's avatar
Peter Achten committed
33
34
35

SetGameBoundMap :: !Int !Int [{#Int}] !Int !Int !Int !*OSToolbox -> (!GRESULT, !*OSToolbox)

36
MoveScreenTo :: !Point2 !*OSToolbox -> (!GRESULT, !*OSToolbox)
Peter Achten's avatar
Peter Achten committed
37

38
InitSpriteAnimation :: !BID ![(Int,Int)] !Bool !*OSToolbox -> (!GRESULT, !*OSToolbox)
Peter Achten's avatar
Peter Achten committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

InitGameObject :: !ObjectType !SubType !Point2 !*OSToolbox -> (!GRESULT, !*OSToolbox)

SetObjectFocus :: !Int !Int !Int !Int !Int !Int !*OSToolbox -> (!GRESULT, !*OSToolbox)

// modified 01/11/99
CreateUserEvent :: !Int !Int !Int !Int !Int !Int !*OSToolbox -> (!GRESULT, !*OSToolbox)

/*
ShowStatistic :: !Int !Int !{#Char} !Int !Colour !{#Char} !Int !Bool !Bool  !Bool !Int !Int !Colour !Int !*OSToolbox -> (!GRESULT, !*OSToolbox)
*/

PlayMusic :: !{#Char} !Bool !*OSToolbox -> (!GRESULT, !*OSToolbox)

StopMusic :: !*OSToolbox -> (!GRESULT, !*OSToolbox)