mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2024-11-23 16:10:09 +00:00
draw: constify qpic_t usage
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
8e1cb8076d
commit
f407557721
@ -43,16 +43,16 @@ typedef struct {
|
||||
vrect_t rect;
|
||||
int width;
|
||||
int height;
|
||||
byte *ptexbytes;
|
||||
const byte *ptexbytes;
|
||||
int rowbytes;
|
||||
} rectdesc_t;
|
||||
|
||||
static rectdesc_t r_rectdesc;
|
||||
|
||||
byte *draw_chars; // 8*8 graphic characters
|
||||
qpic_t *draw_disc;
|
||||
const qpic_t *draw_disc;
|
||||
|
||||
static qpic_t *draw_backtile;
|
||||
static const qpic_t *draw_backtile;
|
||||
|
||||
//=============================================================================
|
||||
/* Support Routines */
|
||||
@ -67,7 +67,7 @@ static cachepic_t menu_cachepics[MAX_CACHED_PICS];
|
||||
static int menu_numcachepics;
|
||||
|
||||
|
||||
qpic_t *
|
||||
const qpic_t *
|
||||
Draw_PicFromWad(const char *name)
|
||||
{
|
||||
return W_GetLumpName(name);
|
||||
@ -359,10 +359,11 @@ Draw_SubPic
|
||||
=============
|
||||
*/
|
||||
void
|
||||
Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width,
|
||||
Draw_SubPic(int x, int y, const qpic_t *pic, int srcx, int srcy, int width,
|
||||
int height)
|
||||
{
|
||||
byte *dest, *source;
|
||||
const byte *source;
|
||||
byte *dest;
|
||||
unsigned short *pusdest;
|
||||
int v, u;
|
||||
|
||||
@ -553,7 +554,7 @@ Draw_TransPicTranslate(int x, int y, const qpic_t *pic, byte *translation)
|
||||
#define CHAR_HEIGHT 8
|
||||
|
||||
static void
|
||||
Draw_ScaledCharToConback(qpic_t *conback, int num, byte *dest)
|
||||
Draw_ScaledCharToConback(const qpic_t *conback, int num, byte *dest)
|
||||
{
|
||||
int row, col;
|
||||
byte *source, *src;
|
||||
@ -614,7 +615,8 @@ void
|
||||
Draw_ConsoleBackground(int lines)
|
||||
{
|
||||
int x, y, v;
|
||||
byte *src, *dest;
|
||||
const byte *src;
|
||||
byte *dest;
|
||||
unsigned short *pusdest;
|
||||
int f, fstep;
|
||||
qpic_t *conback;
|
||||
@ -679,7 +681,7 @@ R_DrawRect8
|
||||
==============
|
||||
*/
|
||||
static void
|
||||
R_DrawRect8(vrect_t *prect, int rowbytes, byte *psrc, int transparent)
|
||||
R_DrawRect8(vrect_t *prect, int rowbytes, const byte *psrc, int transparent)
|
||||
{
|
||||
byte t;
|
||||
int i, j, srcdelta, destdelta;
|
||||
@ -721,7 +723,7 @@ R_DrawRect16
|
||||
==============
|
||||
*/
|
||||
static void
|
||||
R_DrawRect16(vrect_t *prect, int rowbytes, byte *psrc, int transparent)
|
||||
R_DrawRect16(vrect_t *prect, int rowbytes, const byte *psrc, int transparent)
|
||||
{
|
||||
byte t;
|
||||
int i, j, srcdelta, destdelta;
|
||||
@ -777,7 +779,7 @@ void
|
||||
Draw_TileClear(int x, int y, int w, int h)
|
||||
{
|
||||
int width, height, tileoffsetx, tileoffsety;
|
||||
byte *psrc;
|
||||
const byte *psrc;
|
||||
vrect_t vr;
|
||||
|
||||
if (x < 0 || (unsigned)(x + w) > vid.width ||
|
||||
|
@ -47,8 +47,8 @@ static cvar_t gl_constretch = { "gl_constretch", "0", true };
|
||||
cvar_t gl_max_size = { "gl_max_size", "1024" };
|
||||
|
||||
byte *draw_chars; /* 8*8 graphic characters */
|
||||
qpic_t *draw_disc;
|
||||
static qpic_t *draw_backtile;
|
||||
const qpic_t *draw_disc;
|
||||
static const qpic_t *draw_backtile;
|
||||
|
||||
static GLuint translate_texture;
|
||||
static GLuint char_texture;
|
||||
@ -208,10 +208,10 @@ static byte menuplyr_pixels[4096];
|
||||
static int pic_texels;
|
||||
static int pic_count;
|
||||
|
||||
qpic_t *
|
||||
const qpic_t *
|
||||
Draw_PicFromWad(const char *name)
|
||||
{
|
||||
qpic_t *p;
|
||||
const qpic_t *p;
|
||||
glpic_t *gl;
|
||||
|
||||
p = W_GetLumpName(name);
|
||||
@ -254,7 +254,7 @@ Draw_PicFromWad(const char *name)
|
||||
Draw_CachePic
|
||||
================
|
||||
*/
|
||||
qpic_t *
|
||||
const qpic_t *
|
||||
Draw_CachePic(const char *path)
|
||||
{
|
||||
cachepic_t *pic;
|
||||
|
@ -26,8 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
// draw.h -- these are the only functions outside the refresh allowed
|
||||
// to touch the vid buffer
|
||||
|
||||
extern qpic_t *draw_disc; // also used on sbar
|
||||
extern byte *draw_chars;
|
||||
extern const qpic_t *draw_disc; // also used on sbar
|
||||
extern const byte *draw_chars;
|
||||
|
||||
void Draw_Init(void);
|
||||
void Draw_Character(int x, int y, int num);
|
||||
|
Loading…
Reference in New Issue
Block a user