Subversion Repositories Kolibri OS

Rev

Rev 5312 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5312 Anton_K 1
; ============================ Data definitions ============================== ;
2
 
3
struct akode.Point
4
        X               dd ?
5
        Y               dd ?
6
ends
7
 
8
struct akode.Point3D akode.Point
9
        Z               dd ?
10
ends
11
 
12
struct akode.Size
13
        Width           dd ?
14
        Height          dd ?
15
ends
16
 
17
struct akode.Rect
18
        X               dd ?
19
        Y               dd ?
20
        Width           dd ?
21
        Height          dd ?
22
ends
23
 
24
struct akode.Camera
25
        Position        akode.Point3D
26
        Direction       dd ?
27
        FieldOfView     dd ?
28
ends
29
 
30
struct akode.ProjectionPlane
31
        MidY            dd ?
32
        Size            akode.Size
33
ends
34
 
35
struct akode.CombinedTexture                            ; combine 2 textures
36
        DescPtr1        dd ?                            ; main texture
37
        DescPtr2        dd ?                            ; 2nd optional texture
38
ends
39
 
40
AKODE_TEXTURE_TYPE.IMAGE                = 0
41
AKODE_TEXTURE_TYPE.COLOR                = 1
42
 
43
AKODE_TEXTURE_USAGE.ENVIRONMENT         = 0
44
AKODE_TEXTURE_USAGE.OBJECT              = 1
45
 
46
AKODE_VIRTUAL_SCALE_MODE.TOPLEFT        = 00h
47
AKODE_VIRTUAL_SCALE_MODE.TOPCENTER      = 01h
48
AKODE_VIRTUAL_SCALE_MODE.TOPRIGHT       = 02h
49
AKODE_VIRTUAL_SCALE_MODE.CENTERLEFT     = 10h
50
AKODE_VIRTUAL_SCALE_MODE.CENTER         = 11h
51
AKODE_VIRTUAL_SCALE_MODE.CENTERRIGHT    = 12h
52
AKODE_VIRTUAL_SCALE_MODE.BOTTOMLEFT     = 20h
53
AKODE_VIRTUAL_SCALE_MODE.BOTTOMCENTER   = 21h
54
AKODE_VIRTUAL_SCALE_MODE.BOTTOMRIGHT    = 22h
55
 
56
struct akode.TextureDesc
57
        Type            dd ?                            ; AKODE_TEXTURE_TYPE
58
 
59
        union
60
                ImagePathPtr    dd ?
61
                Color           dd ?
62
        ends
63
 
64
        ImageDataPtr    dd ?
65
 
66
        HasMagicPink    db ?                            ; boolean
5480 Anton_K 67
        TileWalls       db ?                            ; boolean, not supported yet
5312 Anton_K 68
        Usage           db ?                            ; AKODE_TEXTURE_USAGE
69
        VirtualScale    db ?                            ; AKODE_VIRTUAL_SCALE_MODE, not supported yet
70
        VirtualSize     akode.Size                      ; (0, 0) for original size, not supported yet
71
ends
72
 
73
struct akode.GridCell
74
        WallTexture1    akode.CombinedTexture           ; 4 combined textures for walls
75
        WallTexture2    akode.CombinedTexture
76
        WallTexture3    akode.CombinedTexture
77
        WallTexture4    akode.CombinedTexture
78
 
79
        FloorTexture    akode.CombinedTexture
80
        CeilingTexture  akode.CombinedTexture
81
 
82
        Passable        dd ?                            ; boolean
83
 
84
        ActionCallback  dd ?                            ; proc callback AKODE_ACTION, cell x, cell y
85
ends
86
 
87
struct akode.Object
88
        TextureDescPtr  dd ?
89
        Position        akode.Point
90
        Visible         dd ?                            ; boolean
91
        DisableShading  dd ?                            ; boolean
92
        Tag             dd ?
93
 
94
        ; for internal use
95
        Distance        dd ?
96
        ShadingDistance dd ?
97
        Angle           dd ?
98
ends
99
 
100
AKODE_DIRECTION.EAST                    = 0
101
AKODE_DIRECTION.NORTH                   = 1
102
AKODE_DIRECTION.WEST                    = 2
103
AKODE_DIRECTION.SOUTH                   = 3
104
 
105
struct akode.LevelHeader
106
        Size            akode.Size
107
        StartPosition   akode.Point
108
        StartDirection  dd ?                            ; AKODE_DIRECTION
109
        BackgroundColor dd ?                            ; FF00FF for no background color
110
        ShadingColor    dd ?
111
        ShadingDistance dd ?                            ; 0 for no shading
112
 
113
        ObjectCount     dd ?
114
        TextureCount    dd ?                            ; number of additional textures
115
 
116
        InitCallback    dd ?
117
        DestroyCallback dd ?
118
        ActionCallback  dd ?                            ; proc callback AKODE_ACTION, cell x, cell y
119
ends
120
 
121
AKODE_LEVEL_LOAD.START                  = 0
122
AKODE_LEVEL_LOAD.END                    = 1
123
AKODE_LEVEL_LOAD.UNLOADED               = 2
124
 
125
AKODE_ACTION.CELL_LEAVE                 = 0
126
AKODE_ACTION.CELL_ENTER                 = 1
127
AKODE_ACTION.CUSTOM                     = 0100h