diff --git a/src/swrenderer/scene/r_bsp.cpp b/src/swrenderer/scene/r_bsp.cpp index 7c323fbbe..d701a0e6a 100644 --- a/src/swrenderer/scene/r_bsp.cpp +++ b/src/swrenderer/scene/r_bsp.cpp @@ -875,7 +875,7 @@ namespace swrenderer } else { - R_ProjectSprite(thing, sprite.pos, sprite.tex, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, spriteshade); + RenderSprite::Project(thing, sprite.pos, sprite.tex, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, spriteshade); } } } diff --git a/src/swrenderer/things/r_playersprite.cpp b/src/swrenderer/things/r_playersprite.cpp index bf648e851..dd86cafb8 100644 --- a/src/swrenderer/things/r_playersprite.cpp +++ b/src/swrenderer/things/r_playersprite.cpp @@ -579,7 +579,7 @@ namespace swrenderer short *mfloorclip = screenheightarray; short *mceilingclip = zeroarray; - R_DrawVisSprite(vis, mfloorclip, mceilingclip); + RenderSprite::Render(vis, mfloorclip, mceilingclip); } void R_DrawRemainingPlayerSprites() diff --git a/src/swrenderer/things/r_sprite.cpp b/src/swrenderer/things/r_sprite.cpp index 7bc93e4ac..d5766611c 100644 --- a/src/swrenderer/things/r_sprite.cpp +++ b/src/swrenderer/things/r_sprite.cpp @@ -57,7 +57,7 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor) namespace swrenderer { - void R_ProjectSprite(AActor *thing, const DVector3 &pos, FTexture *tex, const DVector2 &spriteScale, int renderflags, WaterFakeSide fakeside, F3DFloor *fakefloor, F3DFloor *fakeceiling, sector_t *current_sector, int spriteshade) + void RenderSprite::Project(AActor *thing, const DVector3 &pos, FTexture *tex, const DVector2 &spriteScale, int renderflags, WaterFakeSide fakeside, F3DFloor *fakefloor, F3DFloor *fakeceiling, sector_t *current_sector, int spriteshade) { // transform the origin point double tr_x = pos.X - ViewPos.X; @@ -271,7 +271,7 @@ namespace swrenderer } } - void R_DrawVisSprite(vissprite_t *vis, const short *mfloorclip, const short *mceilingclip) + void RenderSprite::Render(vissprite_t *vis, const short *mfloorclip, const short *mceilingclip) { fixed_t frac; FTexture *tex; diff --git a/src/swrenderer/things/r_sprite.h b/src/swrenderer/things/r_sprite.h index 860885e67..2711af7ec 100644 --- a/src/swrenderer/things/r_sprite.h +++ b/src/swrenderer/things/r_sprite.h @@ -17,6 +17,10 @@ namespace swrenderer { - void R_ProjectSprite(AActor *thing, const DVector3 &pos, FTexture *tex, const DVector2 &spriteScale, int renderflags, WaterFakeSide fakeside, F3DFloor *fakefloor, F3DFloor *fakeceiling, sector_t *current_sector, int spriteshade); - void R_DrawVisSprite(vissprite_t *vis, const short *mfloorclip, const short *mceilingclip); + class RenderSprite + { + public: + static void Project(AActor *thing, const DVector3 &pos, FTexture *tex, const DVector2 &spriteScale, int renderflags, WaterFakeSide fakeside, F3DFloor *fakefloor, F3DFloor *fakeceiling, sector_t *current_sector, int spriteshade); + static void Render(vissprite_t *vis, const short *mfloorclip, const short *mceilingclip); + }; } diff --git a/src/swrenderer/things/r_visiblesprite.cpp b/src/swrenderer/things/r_visiblesprite.cpp index bc27f3520..2ac874d48 100644 --- a/src/swrenderer/things/r_visiblesprite.cpp +++ b/src/swrenderer/things/r_visiblesprite.cpp @@ -595,7 +595,7 @@ namespace swrenderer { if (!spr->bWallSprite) { - R_DrawVisSprite(spr, clipbot, cliptop); + RenderSprite::Render(spr, clipbot, cliptop); } else {