1998-04-07 00:00:00 +00:00
|
|
|
// Emacs style mode select -*- C++ -*-
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// $Id:$
|
|
|
|
//
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
//
|
|
|
|
// This source is available for distribution and/or modification
|
|
|
|
// only under the terms of the DOOM Source Code License as
|
|
|
|
// published by id Software. All rights reserved.
|
|
|
|
//
|
|
|
|
// The source is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
// DESCRIPTION:
|
|
|
|
// System specific interface stuff.
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __R_DRAW__
|
|
|
|
#define __R_DRAW__
|
|
|
|
|
|
|
|
|
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
extern int dc_pitch; // [RH] Distance between rows
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
extern lighttable_t* dc_colormap;
|
|
|
|
extern int dc_x;
|
|
|
|
extern int dc_yl;
|
|
|
|
extern int dc_yh;
|
|
|
|
extern fixed_t dc_iscale;
|
|
|
|
extern fixed_t dc_texturemid;
|
|
|
|
|
|
|
|
// first pixel in a column
|
|
|
|
extern byte* dc_source;
|
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
// [RH] Tutti-Frutti fix
|
|
|
|
unsigned int dc_mask;
|
|
|
|
|
|
|
|
|
|
|
|
// [RH] Pointers to the different column and span drawers...
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
// The span blitting interface.
|
|
|
|
// Hook in assembler or system specific BLT
|
|
|
|
// here.
|
1998-07-14 00:00:00 +00:00
|
|
|
void (*R_DrawColumn)(void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
// The Spectre/Invisibility effect.
|
1998-07-14 00:00:00 +00:00
|
|
|
void (*R_DrawFuzzColumn)(void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
// [RH] Draw translucent column;
|
|
|
|
void (*R_DrawTranslucentColumn)(void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
// Draw with color translation tables,
|
|
|
|
// for player sprite rendering,
|
|
|
|
// Green/Red/Blue/Indigo shirts.
|
1998-07-14 00:00:00 +00:00
|
|
|
void (*R_DrawTranslatedColumn)(void);
|
|
|
|
|
|
|
|
// Span blitting for rows, floor/ceiling.
|
|
|
|
// No Sepctre effect needed.
|
|
|
|
void (*R_DrawSpan)(void);
|
|
|
|
|
|
|
|
|
|
|
|
// [RH] Initialize the above five pointers
|
|
|
|
void R_InitColumnDrawers (BOOL is8bit);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
|
|
|
|
#ifndef USEASM
|
|
|
|
void R_DrawColumnP_C (void);
|
|
|
|
void R_DrawFuzzColumnP_C (void);
|
|
|
|
void R_DrawTranslucentColumnP_C (void);
|
|
|
|
void R_DrawTranslatedColumnP_C (void);
|
|
|
|
void R_DrawSpanP (void);
|
|
|
|
|
|
|
|
void R_DrawColumnD_C (void);
|
|
|
|
void R_DrawFuzzColumnD_C (void);
|
|
|
|
void R_DrawTranslucentColumnD_C (void);
|
|
|
|
void R_DrawTranslatedColumnD_C (void);
|
|
|
|
void R_DrawSpanD (void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
#else /* USEASM */
|
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
void R_DrawColumnP_ASM (void);
|
|
|
|
void R_DrawFuzzColumnP_ASM (void);
|
|
|
|
void R_DrawTranslucentColumnP_ASM (void);
|
|
|
|
void R_DrawTranslatedColumnP_C (void);
|
|
|
|
void R_DrawSpanP (void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
void R_DrawColumnD_C (void);
|
|
|
|
void R_DrawFuzzColumnD_C (void);
|
|
|
|
void R_DrawTranslucentColumnD_C (void);
|
|
|
|
void R_DrawTranslatedColumnD_C (void);
|
|
|
|
void R_DrawSpanD (void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
#endif
|
1998-04-07 00:00:00 +00:00
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
void R_VideoErase (int x1, int y1, int x2, int y2);
|
|
|
|
|
|
|
|
extern int ds_colsize; // [RH] Distance between columns
|
|
|
|
extern int ds_colshift;
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
extern int ds_y;
|
|
|
|
extern int ds_x1;
|
|
|
|
extern int ds_x2;
|
|
|
|
|
|
|
|
extern lighttable_t* ds_colormap;
|
|
|
|
|
|
|
|
extern fixed_t ds_xfrac;
|
|
|
|
extern fixed_t ds_yfrac;
|
|
|
|
extern fixed_t ds_xstep;
|
|
|
|
extern fixed_t ds_ystep;
|
|
|
|
|
|
|
|
// start of a 64*64 tile image
|
1998-07-14 00:00:00 +00:00
|
|
|
extern byte* ds_source;
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
extern byte* translationtables;
|
|
|
|
extern byte* dc_translation;
|
|
|
|
|
1998-04-07 00:00:00 +00:00
|
|
|
extern byte* dc_transmap;
|
|
|
|
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
/* [Petteri] R_DrawSpan8() optimized inner loop (does two pixels
|
|
|
|
per cycle) */
|
1998-07-14 00:00:00 +00:00
|
|
|
void STACK_ARGS DrawSpan8Loop (fixed_t xfrac, fixed_t yfrac, int count, byte *dest);
|
|
|
|
|
1998-04-07 00:00:00 +00:00
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
// [RH] Double view pixels by detail mode
|
|
|
|
void R_DetailDouble (void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
void R_InitBuffer (int width, int height);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Initialize color translation tables,
|
|
|
|
// for player rendering etc.
|
1998-07-14 00:00:00 +00:00
|
|
|
void R_InitTranslationTables (void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
// [RH] Actually create a player's translation table.
|
|
|
|
void R_BuildPlayerTranslation (int player, int color);
|
|
|
|
|
|
|
|
// [RH] Build the same translation tables as org. Doom.
|
|
|
|
void R_BuildCompatiblePlayerTranslations (void);
|
1998-04-07 00:00:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Rendering function.
|
|
|
|
void R_FillBackScreen (void);
|
|
|
|
|
|
|
|
// If the view size is not full screen, draws a border around it.
|
|
|
|
void R_DrawViewBorder (void);
|
|
|
|
|
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
// [RH] Added for muliresolution support
|
1998-04-07 00:00:00 +00:00
|
|
|
void R_InitFuzzTable (void);
|
|
|
|
|
1998-07-14 00:00:00 +00:00
|
|
|
|
1998-04-07 00:00:00 +00:00
|
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// $Log:$
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|