- file renaming and includes done
[genesis3d.git] / G3D / Drivers / D3D8Drv / GSPAN.H
1 /****************************************************************************************/\r
2 /*  GSpan.h                                                                             */\r
3 /*                                                                                      */\r
4 /*  Author: John Pollard                                                                */\r
5 /*  Description: Front to back span code                                                */\r
6 /*                                                                                      */\r
7 /*  The contents of this file are subject to the Genesis3D Public License               */\r
8 /*  Version 1.01 (the "License"); you may not use this file except in                   */\r
9 /*  compliance with the License. You may obtain a copy of the License at                */\r
10 /*  http://www.genesis3d.com                                                            */\r
11 /*                                                                                      */\r
12 /*  Software distributed under the License is distributed on an "AS IS"                 */\r
13 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */\r
14 /*  the License for the specific language governing rights and limitations              */\r
15 /*  under the License.                                                                  */\r
16 /*                                                                                      */\r
17 /*  The Original Code is Genesis3D, released March 25, 1999.                            */\r
18 /*  Genesis3D Version 1.1 released November 15, 1999                                 */\r
19 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */\r
20 /*                                                                                      */\r
21 /****************************************************************************************/\r
22 #ifndef GSPAN\r
23 #define GSPAN\r
24 \r
25 #include <Windows.h>\r
26 \r
27 #define MAX_SPAN_LINES                  1024\r
28 #define MAX_SPANS                               35000\r
29 \r
30 typedef struct \r
31 {\r
32         int32   x1;                                                             // Starting x on screen\r
33         int32   x2;                                                             // Ending x on screen\r
34 } SPAN;\r
35 \r
36 typedef struct _SList\r
37 {\r
38     int32       Min, Max;\r
39     uint8       Used;\r
40     uint32      Flags;\r
41     _SList      *Last;\r
42     _SList      *Next;\r
43 } SLIST;\r
44 \r
45 typedef struct\r
46 {\r
47         SLIST *First;\r
48         SLIST *Current;\r
49 } SPAN_MINMAX;\r
50 \r
51 extern  SPAN    SpanLines[MAX_SPAN_LINES];\r
52 \r
53 extern  SPAN_MINMAX     SMinMax[MAX_SPAN_LINES];                        // Linked list of spans for each scanline...\r
54 extern  SLIST   ScanHash[MAX_SPANS];                                    // hash table for SList\r
55 \r
56 extern  int32           NumWorldPixels;\r
57 extern  int32           NumSpans;\r
58 extern  int32           NumSpanPixels[MAX_SPAN_LINES];\r
59 extern  int32           PolysRendered;\r
60 \r
61 void    DRIVERCC EdgeOutNoUV (int32 x1, int32 y1, int32 x2, int32 y2);\r
62 void    DRIVERCC AddSpanNoUV(int32 x1, int32 x2, int32 y);\r
63 \r
64 void    ResetSList(void);\r
65 SLIST   *NewSList(void);\r
66 void    ResetSpans(int32 Rows);\r
67 \r
68 #endif