2014-03-15 16:59:03 +00:00
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// Copyright (C) 1998-2000 by DooM Legacy Team.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
//-----------------------------------------------------------------------------
/// \file
/// \brief 3D render mode functions
# ifndef __HWR_MAIN_H__
# define __HWR_MAIN_H__
# include "hw_data.h"
# include "hw_defs.h"
# include "../am_map.h"
# include "../d_player.h"
# include "../r_defs.h"
// Startup & Shutdown the hardware mode renderer
void HWR_Startup ( void ) ;
void HWR_Shutdown ( void ) ;
void HWR_drawAMline ( const fline_t * fl , INT32 color ) ;
2018-02-12 17:47:31 +00:00
void HWR_FadeScreenMenuBack ( UINT16 color , UINT8 strength ) ;
2014-03-15 16:59:03 +00:00
void HWR_DrawConsoleBack ( UINT32 color , INT32 height ) ;
2018-11-03 21:14:17 +00:00
void HWR_DrawTutorialBack ( UINT32 color , INT32 boxheight ) ;
2014-03-20 20:13:15 +00:00
void HWR_RenderSkyboxView ( INT32 viewnumber , player_t * player ) ;
2014-03-15 16:59:03 +00:00
void HWR_RenderPlayerView ( INT32 viewnumber , player_t * player ) ;
void HWR_DrawViewBorder ( INT32 clearlines ) ;
void HWR_DrawFlatFill ( INT32 x , INT32 y , INT32 w , INT32 h , lumpnum_t flatlumpnum ) ;
void HWR_InitTextureMapping ( void ) ;
void HWR_SetViewSize ( void ) ;
void HWR_DrawPatch ( GLPatch_t * gpatch , INT32 x , INT32 y , INT32 option ) ;
Sound test is cool now!
https://cdn.discordapp.com/attachments/405336003239477249/641295998395613224/srb20042.gif
* Port MUSICDEFs from Kart.
* Safe to modify without modifying game, so we can put it in music.dta eventually.
* "Title", "AltTitle", "Authors" fields are self-evident.
* "Soundtestpage" and "Soundtestcond" are used to determine which sound test unlockable can play them (set with Unlockable's variable, just like Level Select).
* "Stoppingtime" and "BPM" both accept floats, and are used for presentation stuff on the sound test.
* Ironically, we don't share a single field name with them. Such is the case of differing foci, though, and I expect they'll change their implementation to match (since this is necessary for a sound test).
* Change how S_AddSoundFx works to avoid iterating through all of them, and to allow cv_soundtest to only scroll through defined slots (instead of the infinite wall of thok sounds when scrolling to the left).
* Change V_DrawFixedPatch to allow scaling on two seperate axes.
* Now called "V_DrawStretchyFixedPatch".
* "V_DrawFixedPatch" is a macro to V_DrawStretchyFixedPatch now (same scale on both axes).
* Available to Lua under v.drawStretched!
* Even works in GL!
* Bugfix: Add SR_PLAYER to SOC's menutypes_list.
Stay tuned for the merge request, where I put the onus on the Music Team to finish this off...
2019-11-05 16:23:46 +00:00
void HWR_DrawStretchyFixedPatch ( GLPatch_t * gpatch , fixed_t x , fixed_t y , fixed_t pscale , fixed_t vscale , INT32 option , const UINT8 * colormap ) ;
2014-03-21 18:42:55 +00:00
void HWR_DrawCroppedPatch ( GLPatch_t * gpatch , fixed_t x , fixed_t y , fixed_t scale , INT32 option , fixed_t sx , fixed_t sy , fixed_t w , fixed_t h ) ;
2017-08-19 17:51:56 +00:00
void HWR_MakePatch ( const patch_t * patch , GLPatch_t * grPatch , GLMipmap_t * grMipmap , boolean makebitmap ) ;
2014-03-15 16:59:03 +00:00
void HWR_CreatePlanePolygons ( INT32 bspnum ) ;
void HWR_CreateStaticLightmaps ( INT32 bspnum ) ;
void HWR_PrepLevelCache ( size_t pnumtextures ) ;
void HWR_DrawFill ( INT32 x , INT32 y , INT32 w , INT32 h , INT32 color ) ;
A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)
Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-27 23:32:57 +00:00
void HWR_DrawFadeFill ( INT32 x , INT32 y , INT32 w , INT32 h , INT32 color , UINT16 actualcolor , UINT8 strength ) ;
2019-08-04 09:27:09 +00:00
void HWR_DrawConsoleFill ( INT32 x , INT32 y , INT32 w , INT32 h , INT32 color , UINT32 actualcolor ) ; // Lat: separate flags from color since color needs to be an uint to work right.
2014-03-15 16:59:03 +00:00
void HWR_DrawPic ( INT32 x , INT32 y , lumpnum_t lumpnum ) ;
2019-01-02 03:41:52 +00:00
UINT8 * HWR_GetScreenshot ( void ) ;
2019-01-02 04:01:57 +00:00
boolean HWR_Screenshot ( const char * pathname ) ;
2019-01-02 03:41:52 +00:00
2014-03-15 16:59:03 +00:00
void HWR_AddCommands ( void ) ;
void HWR_CorrectSWTricks ( void ) ;
void transform ( float * cx , float * cy , float * cz ) ;
FBITFIELD HWR_TranstableToAlpha ( INT32 transtablenum , FSurfaceInfo * pSurf ) ;
INT32 HWR_GetTextureUsed ( void ) ;
void HWR_DoPostProcessor ( player_t * player ) ;
void HWR_StartScreenWipe ( void ) ;
void HWR_EndScreenWipe ( void ) ;
void HWR_DrawIntermissionBG ( void ) ;
2014-09-04 00:35:29 +00:00
void HWR_DoWipe ( UINT8 wipenum , UINT8 scrnnum ) ;
2019-11-05 15:10:42 +00:00
void HWR_DoTintedWipe ( UINT8 wipenum , UINT8 scrnnum ) ;
2014-11-14 00:06:38 +00:00
void HWR_MakeScreenFinalTexture ( void ) ;
void HWR_DrawScreenFinalTexture ( int width , int height ) ;
2014-03-15 16:59:03 +00:00
// This stuff is put here so MD2's can use them
UINT32 HWR_Lighting ( INT32 light , UINT32 color , UINT32 fadecolor , boolean fogblockpoly , boolean plane ) ;
FUNCMATH UINT8 LightLevelToLum ( INT32 l ) ;
extern CV_PossibleValue_t granisotropicmode_cons_t [ ] ;
2016-04-21 17:50:30 +00:00
# ifdef ALAM_LIGHTING
2014-03-15 16:59:03 +00:00
extern consvar_t cv_grdynamiclighting ;
extern consvar_t cv_grstaticlighting ;
extern consvar_t cv_grcoronas ;
extern consvar_t cv_grcoronasize ;
2016-04-21 17:50:30 +00:00
# endif
2014-03-15 16:59:03 +00:00
extern consvar_t cv_grfov ;
2019-09-03 02:29:16 +00:00
extern consvar_t cv_grmodels ;
2019-11-04 15:21:53 +00:00
extern consvar_t cv_grmodelinterpolation ;
2014-03-15 16:59:03 +00:00
extern consvar_t cv_grfog ;
extern consvar_t cv_grfogcolor ;
extern consvar_t cv_grfogdensity ;
extern consvar_t cv_grsoftwarefog ;
extern consvar_t cv_grgammared ;
extern consvar_t cv_grgammagreen ;
extern consvar_t cv_grgammablue ;
extern consvar_t cv_grfiltermode ;
extern consvar_t cv_granisotropicmode ;
extern consvar_t cv_grcorrecttricks ;
extern consvar_t cv_grfovchange ;
extern consvar_t cv_grsolvetjoin ;
2019-05-06 15:57:32 +00:00
extern consvar_t cv_grspritebillboarding ;
2019-09-18 02:38:04 +00:00
extern consvar_t cv_grskydome ;
2014-03-15 16:59:03 +00:00
extern float gr_viewwidth , gr_viewheight , gr_baseviewwindowy ;
extern float gr_viewwindowx , gr_basewindowcentery ;
// BP: big hack for a test in lighting ref : 1249753487AB
extern fixed_t * hwbbox ;
extern FTransform atransform ;
# endif