SRB2/src/i_video.h

155 lines
3 KiB
C
Raw Normal View History

2014-03-15 16:59:03 +00:00
// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 1993-1996 by id Software, Inc.
// Copyright (C) 1998-2000 by DooM Legacy Team.
2020-02-19 22:08:45 +00:00
// Copyright (C) 1999-2020 by Sonic Team Junior.
2014-03-15 16:59:03 +00:00
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file i_video.h
/// \brief System specific interface stuff.
#ifndef __I_VIDEO__
#define __I_VIDEO__
#include "doomtype.h"
#ifdef __GNUG__
#pragma interface
#endif
typedef enum
{
/// Software
render_soft = 1,
/// OpenGL
render_opengl = 2,
/// Dedicated
render_none = 3 // for dedicated server
} rendermode_t;
2020-01-27 04:57:55 +00:00
/** \brief current render mode
2014-03-15 16:59:03 +00:00
*/
extern rendermode_t rendermode;
2020-02-18 00:11:56 +00:00
/** \brief OpenGL state
0 = never loaded, 1 = loaded successfully, -1 = failed loading
2020-01-27 04:57:55 +00:00
*/
2020-02-18 00:11:56 +00:00
extern INT32 vid_opengl_state;
2014-03-15 16:59:03 +00:00
/** \brief use highcolor modes if true
*/
extern boolean highcolor;
/** \brief setup video mode
*/
void I_StartupGraphics(void);
2020-01-27 04:57:55 +00:00
2020-02-18 00:11:56 +00:00
/** \brief shutdown video mode
2014-03-15 16:59:03 +00:00
*/
void I_ShutdownGraphics(void);
/** \brief The I_SetPalette function
\param palette Takes full 8 bit values
\return void
*/
void I_SetPalette(RGBA_t *palette);
/** \brief return the number of video modes
*/
INT32 VID_NumModes(void);
/** \brief The VID_GetModeForSize function
\param w width
\param h height
\return vidmode closest to w : h
*/
INT32 VID_GetModeForSize(INT32 w, INT32 h);
/** \brief The VID_SetMode function
Set the video mode right now,
the video mode change is delayed until the start of the next refresh
by setting the setmodeneeded to a value >0
setup a video mode, this is to be called from the menu
\param modenum video mode to set to
2020-01-27 04:57:55 +00:00
\return current video mode
2014-03-15 16:59:03 +00:00
*/
INT32 VID_SetMode(INT32 modenum);
2020-01-27 04:57:55 +00:00
/** \brief Checks the render state
*/
2019-09-08 21:27:35 +00:00
void VID_CheckRenderer(void);
2014-03-15 16:59:03 +00:00
2020-02-18 00:11:56 +00:00
/** \brief Load OpenGL mode
*/
void VID_StartupOpenGL(void);
/** \brief Checks if OpenGL loaded
*/
void VID_CheckGLLoaded(rendermode_t oldrender);
2014-03-15 16:59:03 +00:00
/** \brief The VID_GetModeName function
\param modenum video mode number
\return name of video mode
*/
const char *VID_GetModeName(INT32 modenum);
void VID_PrepareModeList(void); /// note hack for SDL
/** \brief can video system do fullscreen
*/
extern boolean allow_fullscreen;
/** \brief Update video system without updating frame
*/
void I_UpdateNoBlit(void);
/** \brief Update video system with updating frame
*/
void I_FinishUpdate(void);
/** \brief I_FinishUpdate(), but vsync disabled
*/
void I_UpdateNoVsync(void);
/** \brief Wait for vertical retrace or pause a bit.
\param count max wait
\return void
*/
void I_WaitVBL(INT32 count);
/** \brief The I_ReadScreen function
\param scr buffer to copy screen to
\return void
*/
void I_ReadScreen(UINT8 *scr);
/** \brief Start disk icon
*/
void I_BeginRead(void);
/** \brief Stop disk icon
*/
void I_EndRead(void);
#endif