123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- #ifndef __R_DRAW__
- #define __R_DRAW__
- #include "r_defs.h"
- enum column_pipeline_e {
- RDC_PIPELINE_STANDARD,
- RDC_PIPELINE_TRANSLUCENT,
- RDC_PIPELINE_TRANSLATED,
- RDC_PIPELINE_FUZZ,
- RDC_PIPELINE_MAXPIPELINES,
- };
- enum draw_filter_type_e {
- RDRAW_FILTER_NONE,
- RDRAW_FILTER_POINT,
- RDRAW_FILTER_LINEAR,
- RDRAW_FILTER_ROUNDED,
- RDRAW_FILTER_MAXFILTERS
- };
- enum sloped_edge_type_e {
- RDRAW_MASKEDCOLUMNEDGE_SQUARE,
- RDRAW_MASKEDCOLUMNEDGE_SLOPED
- };
- typedef struct {
- int x;
- int yl;
- int yh;
- fixed_t z;
- fixed_t iscale;
- fixed_t texturemid;
- int texheight;
- fixed_t texu;
- const byte *source;
- const byte *prevsource;
- const byte *nextsource;
- const lighttable_t *colormap;
- const lighttable_t *nextcolormap;
- const byte *translation;
- int edgeslope;
-
- int drawingmasked;
- enum sloped_edge_type_e edgetype;
- } draw_column_vars_t;
- void R_SetDefaultDrawColumnVars(draw_column_vars_t *dcvars);
- void R_VideoErase(int x, int y, int count);
- typedef struct {
- int y;
- int x1;
- int x2;
- fixed_t z;
- fixed_t xfrac;
- fixed_t yfrac;
- fixed_t xstep;
- fixed_t ystep;
- const byte *source;
- const lighttable_t *colormap;
- const lighttable_t *nextcolormap;
- } draw_span_vars_t;
- typedef struct {
- byte *byte_topleft;
- unsigned short *short_topleft;
- unsigned int *int_topleft;
- int byte_pitch;
- int short_pitch;
- int int_pitch;
- enum draw_filter_type_e filterwall;
- enum draw_filter_type_e filterfloor;
- enum draw_filter_type_e filtersprite;
- enum draw_filter_type_e filterz;
- enum draw_filter_type_e filterpatch;
- enum sloped_edge_type_e sprite_edges;
- enum sloped_edge_type_e patch_edges;
-
-
-
- fixed_t mag_threshold;
- } draw_vars_t;
- extern draw_vars_t drawvars;
- extern byte playernumtotrans[MAXPLAYERS];
- extern byte *translationtables;
- typedef void (*R_DrawColumn_f)(draw_column_vars_t *dcvars);
- R_DrawColumn_f R_GetDrawColumnFunc(enum column_pipeline_e type,
- enum draw_filter_type_e filter,
- enum draw_filter_type_e filterz);
- typedef void (*R_DrawSpan_f)(draw_span_vars_t *dsvars);
- R_DrawSpan_f R_GetDrawSpanFunc(enum draw_filter_type_e filter,
- enum draw_filter_type_e filterz);
- void R_DrawSpan(draw_span_vars_t *dsvars);
- void R_InitBuffer(int width, int height);
- void R_InitTranslationTables(void);
- void R_FillBackScreen(void);
- void R_DrawViewBorder(void);
- void R_ResetColumnBuffer(void);
- #endif
|