parent
57c4cc6df1
commit
1f2de36907
4 changed files with 4 additions and 46 deletions
|
|
@ -1,25 +0,0 @@
|
||||||
// DR. ROBOTNIK'S RING RACERS
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// Copyright (C) 2024 by James Robert Roman.
|
|
||||||
// Copyright (C) 2024 by Kart Krew.
|
|
||||||
//
|
|
||||||
// This program is free software distributed under the
|
|
||||||
// terms of the GNU General Public License, version 2.
|
|
||||||
// See the 'LICENSE' file for more details.
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef r_debug_hpp
|
|
||||||
#define r_debug_hpp
|
|
||||||
|
|
||||||
#include "doomtype.h"
|
|
||||||
|
|
||||||
namespace srb2::r_debug
|
|
||||||
{
|
|
||||||
|
|
||||||
void add_texture_to_frame_list(INT32 texnum);
|
|
||||||
void clear_frame_list();
|
|
||||||
void draw_frame_list();
|
|
||||||
|
|
||||||
}; // namespace srb2::r_debug
|
|
||||||
|
|
||||||
#endif/*r_debug_hpp*/
|
|
||||||
|
|
@ -743,8 +743,6 @@ static void R_DrawSkyPlane(visplane_t *pl, void(*colfunc)(drawcolumndata_t*), bo
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 angle = (pl->viewangle + xtoviewangle[viewssnum][x + i])>>ANGLETOSKYSHIFT;
|
INT32 angle = (pl->viewangle + xtoviewangle[viewssnum][x + i])>>ANGLETOSKYSHIFT;
|
||||||
angle -= (skytextureoffset >> FRACBITS);
|
|
||||||
|
|
||||||
dc.iscale = FixedMul(skyscale[viewssnum], FINECOSINE(xtoviewangle[viewssnum][x + i]>>ANGLETOFINESHIFT));
|
dc.iscale = FixedMul(skyscale[viewssnum], FINECOSINE(xtoviewangle[viewssnum][x + i]>>ANGLETOFINESHIFT));
|
||||||
dc.x = x + i;
|
dc.x = x + i;
|
||||||
dc.source =
|
dc.source =
|
||||||
|
|
|
||||||
21
src/r_sky.c
21
src/r_sky.c
|
|
@ -37,14 +37,10 @@ INT32 skyflatnum;
|
||||||
*/
|
*/
|
||||||
INT32 skytexture;
|
INT32 skytexture;
|
||||||
|
|
||||||
/** \brief the horizon line of the sky texture
|
/** \brief the horizon line in a 256x128 sky texture
|
||||||
*/
|
*/
|
||||||
INT32 skytexturemid;
|
INT32 skytexturemid;
|
||||||
|
|
||||||
/** \brief the x offset of the sky texture
|
|
||||||
*/
|
|
||||||
INT32 skytextureoffset;
|
|
||||||
|
|
||||||
/** \brief the scale of the sky
|
/** \brief the scale of the sky
|
||||||
*/
|
*/
|
||||||
fixed_t skyscale[MAXSPLITSCREENPLAYERS];
|
fixed_t skyscale[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
@ -65,19 +61,8 @@ char globallevelskytexture[9];
|
||||||
*/
|
*/
|
||||||
void R_SetupSkyDraw(void)
|
void R_SetupSkyDraw(void)
|
||||||
{
|
{
|
||||||
// the horizon line in the sky texture
|
// the horizon line in a 256x128 sky texture
|
||||||
skytexturemid = (textures[skytexture]->height / 2) << FRACBITS;
|
skytexturemid = (textures[skytexture]->height/2)<<FRACBITS;
|
||||||
skytextureoffset = 0;
|
|
||||||
|
|
||||||
if (textures[skytexture]->type == TEXTURETYPE_SINGLEPATCH)
|
|
||||||
{
|
|
||||||
// Sal: Allow for sky offsets
|
|
||||||
texpatch_t *const tex_patch = &textures[skytexture]->patches[0];
|
|
||||||
patch_t *patch = W_CachePatchNumPwad(tex_patch->wad, tex_patch->lump, PU_CACHE);
|
|
||||||
|
|
||||||
skytexturemid += (patch->topoffset << FRACBITS);
|
|
||||||
skytextureoffset += (patch->leftoffset << FRACBITS);
|
|
||||||
}
|
|
||||||
|
|
||||||
R_SetSkyScale();
|
R_SetSkyScale();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ extern "C" {
|
||||||
/// \brief The sky map is 256*128*4 maps.
|
/// \brief The sky map is 256*128*4 maps.
|
||||||
#define ANGLETOSKYSHIFT 22
|
#define ANGLETOSKYSHIFT 22
|
||||||
|
|
||||||
extern INT32 skytexture, skytexturemid, skytextureoffset;
|
extern INT32 skytexture, skytexturemid;
|
||||||
extern fixed_t skyscale[MAXSPLITSCREENPLAYERS];
|
extern fixed_t skyscale[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
||||||
extern INT32 skyflatnum;
|
extern INT32 skyflatnum;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue