-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGFX.H
76 lines (65 loc) · 2.42 KB
/
GFX.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// gfx.h
#include <stdio.h>
#include "datasize.h"
#ifndef GFXH
#define GFXH
#define repeat do
#define until(a) while(!(a))
typedef struct Vector {
float x, y, z;
} Vector;
typedef struct intVector {
int x, y;
float z;
Vector tex_coord;
} intVector;
extern int XRES, YRES;
extern int FRAMESIZE;
extern uchar *video;
extern int bAllowRepeated3dTextures;
extern float texture_offset_x, texture_offset_y;
extern float *ZBufVideo;
#define GORAUD_TYPE_STATIC 0
#define GORAUD_TYPE_Z 1
#define BIT_OP_NORMAL 0
#define BIT_OP_OR 1
#define BIT_OP_AND 2
#define BIT_OP_XOR 3
#define BIT_OP_ADD 4
#define BIT_OP_SUB 5
#define BIT_OP_SUB_ME 6
#define BIT_NORMAL_IPOLY 7
#define BIT_OP_ADD_REAL 8
#define BIT_OP_SUB_REAL 9
#define BIT_OP_SUB_ME_REAL 10
#ifdef _RGB32
#define BIT_OP_ADD_FGRGB 16
#define BIT_OP_ADD_RGB 17
#define BIT_OP_SUB_FGRGB 18
#define BIT_OP_SUB_RGB 19
#define BIT_OP_BLEND_FGRGB 20
#define BIT_OP_BLEND_RGB 21
#endif
int scan3(intVector vv[], int clipedges[], uchar col);
int scan3_goraud(intVector vv[], int clipedges[], int I[], int goraudType, PREPCOL plusVal, int divZ, int plusZ, int maxZ);
int scan3_tmap(intVector vv[], int clipedges[], Bitmap *tex, PREPCOL plusVal);
int scanPoly(intVector p[],int points, uchar col, uchar bitOp);
int scanConvex(intVector vv[], int points, int clipedges[], uchar col);
int scanConvex_goraud(intVector vv[], int points, int clipedges[], int I[], int goraudType, PREPCOL plusVal, int divZ, int plusZ, int maxZ);
int scanConvex_tmap(intVector vv[], int points, int clipedges[], Bitmap *bild, PREPCOL plusVal, int bPerspectiveCorrected);
void polyLine(intVector v[], int points, uchar col, uchar connect, int clip);
void circle(int x, int y, int radius, uchar col);
void ellipse(int xc, int yc, int rx, int ry, uchar col);
void filled_ellipse(int xc, int yc, int rx, int ry, uchar col);
void filled_circle(int xc, int yc, int radius, uchar col);
void box (int x, int y, int xrange, int yrange, uchar col);
void fbox(uchar *inVid, int x, int y, int xrange, int yrange, uchar col);
void line(int x1, int y1, int x2, int y2, uchar col, int clip);
void vline(int x, int y1, int y2, uchar col);
void hline(int x1, int x2, int y, uchar col);
int line_clip(int *x1, int *y1, int *x2, int *y2);
void setpixel(int x, int y, uchar col);
void bezier(long n, int *xPoints, int *yPoints, uchar col);
int __scan3(intVector vv[], uchar col);
int __scanConvex(intVector vv[], int points, uchar col);
#endif