ScummVM API documentation
gfxstub_dutch.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * Additional copyright for this file:
8  * Copyright (C) 1999-2000 Revolution Software Ltd.
9  * This code is based on source code created by Revolution Software,
10  * used with permission.
11  *
12  * This program is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation, either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program. If not, see <http://www.gnu.org/licenses/>.
24  *
25  */
26 
27 #ifndef ICB_GFXSTUB_DUTCH_HH
28 #define ICB_GFXSTUB_DUTCH_HH
29 
30 namespace ICB {
31 
32 typedef struct {
33  uint32 width; // 640
34  uint32 height; // 480
35  uint32 stride; // width * 4
36  uint8 *RGBdata; // width * height * 32-bits
37  uint16 *Zdata; // width * height * 16-bits
39 
40 typedef struct {
41  int32 x, y; // fixed-point 16:16
42  int32 u, v; // fixed-point 16:16
43  uint32 colour; // B, G, R, alpha (low->high mem)
44 } vertex2D;
45 
46 typedef struct {
47  uint32 *palette; /*[256]*/ // windows 32-bit RGB with 1 byte of padding
48  uint32 width; // must be power of 2
49  uint32 height; // must be power of 2
50  uint8 *level[9]; // width/1 * height/1 -> width/256 * height/256
51 } RevTexture;
52 
53 class TextureHandle;
54 
55 TextureHandle *RegisterTexture(const RevTexture *revInput);
56 int32 UnregisterTexture(TextureHandle *);
57 
58 int32 SetTextureState(TextureHandle *texture);
59 int32 GetTextureState(TextureHandle *texture);
60 
61 int32 SetRenderDevice(RevRenderDevice *renderDev);
62 int32 GetRenderDevice(RevRenderDevice *renderDev);
63 
64 // Colour is verts[0].colour
65 int32 DrawFlatUnTexturedPolygon(const vertex2D *verts, int32 nVerts, uint16 z);
66 
67 int32 DrawGouraudUnTexturedPolygon(const vertex2D *verts, int32 nVerts, uint16 z);
68 
69 // Colour is verts[0].colour
70 int32 DrawFlatTexturedPolygon(const vertex2D *verts, int32 nVerts, uint16 z);
71 
72 int32 DrawGouraudTexturedPolygon(const vertex2D *verts, int32 nVerts, uint16 z);
73 
74 // Colour is verts[0].colour
75 int32 DrawFlatTexturedTransparentPolygon(const vertex2D *verts, int32 nVerts, uint16 z);
76 
77 int32 DrawGouraudTexturedTransparentPolygon(const vertex2D *verts, int32 nVerts, uint16 z);
78 
79 static const int32 GFXLIB_TRANSPARENT_COLOUR = 0xDEADBEAF;
80 
81 // This value CANNOT be changed
82 
83 static const int32 GFXLIB_TRANSPARENT_INDEX = 0x00000000;
84 
85 void ClearProcessorState(void);
86 
87 } // End of namespace ICB
88 
89 #endif // #ifndef GFXSTUB_DUTCH_HH
Definition: actor.h:32
Definition: gfxstub_dutch.h:32
Definition: gfxstub_dutch.h:40
Definition: gfxstub_dutch.h:46
Definition: gfxstub_rev_dutch.h:34