XenevaOS
Loading...
Searching...
No Matches
v_video.h
Go to the documentation of this file.
1//
2// Copyright(C) 1993-1996 Id Software, Inc.
3// Copyright(C) 2005-2014 Simon Howard
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// DESCRIPTION:
16// Gamma correction LUT.
17// Functions to draw patches (by post) directly to screen.
18// Functions to blit a block to the screen.
19//
20
21
22#ifndef __V_VIDEO__
23#define __V_VIDEO__
24
25#include "doomtype.h"
26
27// Needed because we are refering to patches.
28#include "v_patch.h"
29
30//
31// VIDEO
32//
33
34#define CENTERY (SCREENHEIGHT/2)
35
36
37extern int dirtybox[4];
38
39extern byte *tinttable;
40
41// haleyjd 08/28/10: implemented for Strife support
42// haleyjd 08/28/10: Patch clipping callback, implemented to support Choco
43// Strife.
44typedef boolean (*vpatchclipfunc_t)(patch_t *, int, int);
46
47
48// Allocates buffer screens, call before R_Init.
49void V_Init (void);
50
51// Draw a block from the specified source screen to the screen.
52
53void V_CopyRect(int srcx, int srcy, byte *source,
54 int width, int height,
55 int destx, int desty);
56
57void V_DrawPatch(int x, int y, patch_t *patch);
58void V_DrawPatchFlipped(int x, int y, patch_t *patch);
59void V_DrawTLPatch(int x, int y, patch_t *patch);
60void V_DrawAltTLPatch(int x, int y, patch_t * patch);
61void V_DrawShadowedPatch(int x, int y, patch_t *patch);
62void V_DrawXlaPatch(int x, int y, patch_t * patch); // villsa [STRIFE]
63void V_DrawPatchDirect(int x, int y, patch_t *patch);
64
65// Draw a linear block of pixels into the view buffer.
66
67void V_DrawBlock(int x, int y, int width, int height, byte *src);
68
69void V_MarkRect(int x, int y, int width, int height);
70
71void V_DrawFilledBox(int x, int y, int w, int h, int c);
72void V_DrawHorizLine(int x, int y, int w, int c);
73void V_DrawVertLine(int x, int y, int h, int c);
74void V_DrawBox(int x, int y, int w, int h, int c);
75
76// Draw a raw screen lump
77
78void V_DrawRawScreen(byte *raw);
79
80// Temporarily switch to using a different buffer to draw graphics, etc.
81
82void V_UseBuffer(byte *buffer);
83
84// Return to using the normal screen buffer to draw graphics.
85
86void V_RestoreBuffer(void);
87
88// Save a screenshot of the current screen to a file, named in the
89// format described in the string passed to the function, eg.
90// "DOOM%02i.pcx"
91
92void V_ScreenShot(char *format);
93
94// Load the lookup table for translucency calculations from the TINTTAB
95// lump.
96
97void V_LoadTintTable(void);
98
99// villsa [STRIFE]
100// Load the lookup table for translucency calculations from the XLATAB
101// lump.
102
103void V_LoadXlaTable(void);
104
105void V_DrawMouseSpeedBox(int speed);
106
107#endif
108
boolean
Definition doomtype.h:74
const char const char * format
Definition drm_print.h:516
int h
Definition layout.c:118
void V_DrawTLPatch(int x, int y, patch_t *patch)
Definition v_video.c:279
void V_DrawPatchDirect(int x, int y, patch_t *patch)
Definition v_video.c:268
void V_SetPatchClipCallback(vpatchclipfunc_t func)
Definition v_video.c:129
void V_LoadXlaTable(void)
Definition v_video.c:493
void V_DrawFilledBox(int x, int y, int w, int h, int c)
Definition v_video.c:529
void V_DrawMouseSpeedBox(int speed)
Definition v_video.c:846
int dirtybox[4]
Definition v_video.c:60
void V_DrawShadowedPatch(int x, int y, patch_t *patch)
Definition v_video.c:428
void V_DrawVertLine(int x, int y, int h, int c)
Definition v_video.c:562
void V_MarkRect(int x, int y, int width, int height)
Definition v_video.c:69
void V_DrawPatchFlipped(int x, int y, patch_t *patch)
Definition v_video.c:203
void V_DrawBlock(int x, int y, int width, int height, byte *src)
Definition v_video.c:503
void V_Init(void)
Definition v_video.c:597
void V_DrawRawScreen(byte *raw)
Definition v_video.c:589
void V_DrawHorizLine(int x, int y, int w, int c)
Definition v_video.c:549
void V_DrawBox(int x, int y, int w, int h, int c)
Definition v_video.c:576
void V_LoadTintTable(void)
Definition v_video.c:482
void V_DrawXlaPatch(int x, int y, patch_t *patch)
Definition v_video.c:329
void V_DrawAltTLPatch(int x, int y, patch_t *patch)
Definition v_video.c:378
byte * tinttable
Definition v_video.c:51
boolean(* vpatchclipfunc_t)(patch_t *, int, int)
Definition v_video.h:44
void V_UseBuffer(byte *buffer)
Definition v_video.c:606
void V_RestoreBuffer(void)
Definition v_video.c:613
void V_ScreenShot(char *format)
Definition v_video.c:791
void V_CopyRect(int srcx, int srcy, byte *source, int width, int height, int destx, int desty)
Definition v_video.c:85
void V_DrawPatch(int x, int y, patch_t *patch)
Definition v_video.c:139