// SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 1999-2018 by Sonic Team Junior. // // 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__ #ifdef __cplusplus extern "C" { #endif #include "doomtype.h" #ifdef __GNUG__ #pragma interface #endif boolean I_UseNativeKeyboard(void); void I_SetTextInput(boolean enable); typedef enum { /// Software render_soft = 1, /// OpenGL render_opengl = 2, /// Dedicated render_none = 3 // for dedicated server } rendermode_t; /** \brief currect render mode */ extern rendermode_t rendermode; /** \brief setup video mode */ void I_StartupGraphics(void); /** \brief restore old video mode */ 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 \return currect video mode */ INT32 VID_SetMode(INT32 modenum); /** \brief The VID_GetModeName function \param modenum video mode number \return name of video mode */ const char *VID_GetModeName(INT32 modenum); void VID_RefreshModeList(void); void VID_PrepareModeList(void); /** \brief can video system do fullscreen */ extern boolean allow_fullscreen; /** \brief Update video system with updating frame */ void I_FinishUpdate(void); /** \brief I_FinishUpdate(), but vsync disabled */ void I_UpdateNoVsync(void); /** \brief The I_ReadScreen function \param scr buffer to copy screen to \return void */ void I_ReadScreen(UINT8 * restrict scr, INT32 scale); UINT32 I_GetRefreshRate(void); boolean I_CheckAboveDesktopRes(INT32 width, INT32 height); boolean I_CheckNativeRes(void); void I_SetBorderlessWindow(void); #ifdef USE_FBO_OGL extern float InvSupersampleFactorX; extern float InvSupersampleFactorY; void RefreshOGLSDLSurface(void); void I_DownSample(void); boolean UseScreenFBO(void); extern boolean downsample; #endif // So we can call this from i_video event loop void I_ShutdownJoystick(UINT8 index); // Quick thing to make SDL_JOYDEVICEADDED events less of an abomination void I_UpdateJoystickDeviceIndex(UINT8 player); void I_UpdateJoystickDeviceIndices(UINT8 excludePlayer); void I_HandleControllerHatRepeat(void); #ifdef __cplusplus } // extern "C" #endif #endif