- file renaming and includes done
[genesis3d.git] / G3D / Drivers / SoftDrv / SPAN.H
1 /****************************************************************************************/\r
2 /*  span.h                                                                              */\r
3 /*                                                                                      */\r
4 /*  Author:       John Pollard, Ken Baird                                               */\r
5 /*  Description:  Header for span.c and important defines                               */\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 SPAN_H\r
23 #define SPAN_H\r
24 \r
25 #include "basetype.h"\r
26 \r
27 #define MAXSPANS 25000\r
28 #define MAXSCANLINES 768\r
29 \r
30 typedef struct SList \r
31 {\r
32     uint8               Used;\r
33         int32           Min, Max;\r
34         geFloat z1, z2;         // So we can spit z spans out for other spans that need to be occluded\r
35     uint32              Flags;\r
36     struct SList        *Last;\r
37     struct SList        *Next;\r
38 } SList;\r
39 \r
40 typedef struct\r
41 {\r
42         SList   *First;\r
43         SList   *Current;\r
44 } SpanMinMax;\r
45 \r
46 extern  int32   NumCachedAlphaPolys;\r
47 extern  int32   NumCachedAlphaSpans;\r
48 \r
49 SList   *NewSList(void);\r
50 void    FreeSList(SList *s);\r
51 void    ResetSList(void);\r
52 void    ResetSpans(uint32 Rows);\r
53 \r
54 extern SpanMinMax SMinMax[MAXSCANLINES];\r
55 extern SList ScanHash[MAXSPANS];  // hash table for SList\r
56 extern int32 CurrentSList;\r
57 \r
58 \r
59 #endif\r