diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c2326399..819b9cc35 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -148,6 +148,7 @@ set(SRB2_CORE_RENDER_SOURCES r_things.h r_textures.h r_patch.h + r_patchrotation.h r_picformats.h r_portal.h ) diff --git a/src/r_patch.h b/src/r_patch.h index 71f185c9d..6991d3637 100644 --- a/src/r_patch.h +++ b/src/r_patch.h @@ -31,8 +31,6 @@ void *Patch_CreateGL(patch_t *patch); void Patch_Rotate(patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip); patch_t *Patch_GetRotated(patch_t *patch, INT32 angle, boolean flip); patch_t *Patch_GetRotatedSprite(spriteframe_t *sprite, size_t frame, size_t spriteangle, boolean flip, void *info, INT32 rotationangle);INT32 R_GetRollAngle(angle_t rollangle); -extern fixed_t rollcosang[ROTANGLES]; -extern fixed_t rollsinang[ROTANGLES]; #endif #endif // __R_PATCH__ diff --git a/src/r_patchrotation.c b/src/r_patchrotation.c index 77544c3ac..83eb4eeba 100644 --- a/src/r_patchrotation.c +++ b/src/r_patchrotation.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2018-2020 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020 by Jaime "Lactozilla" Passos. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -9,17 +9,12 @@ /// \file r_patchrotation.c /// \brief Patch rotation. -#include "r_patch.h" -#include "r_picformats.h" +#include "r_patchrotation.h" #include "r_things.h" // FEETADJUST #include "z_zone.h" #include "w_wad.h" #ifdef ROTSPRITE - -static rotsprite_t *RotatedPatch_Create(INT32 numangles); -static void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip); - fixed_t rollcosang[ROTANGLES]; fixed_t rollsinang[ROTANGLES]; diff --git a/src/r_patchrotation.h b/src/r_patchrotation.h new file mode 100644 index 000000000..2744f71d2 --- /dev/null +++ b/src/r_patchrotation.h @@ -0,0 +1,21 @@ +// SONIC ROBO BLAST 2 +//----------------------------------------------------------------------------- +// Copyright (C) 2020 by Jaime "Lactozilla" Passos. +// +// 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 r_patchrotation.h +/// \brief Patch rotation. + +#include "r_patch.h" +#include "r_picformats.h" + +#ifdef ROTSPRITE +rotsprite_t *RotatedPatch_Create(INT32 numangles); +void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip); + +extern fixed_t rollcosang[ROTANGLES]; +extern fixed_t rollsinang[ROTANGLES]; +#endif diff --git a/src/r_things.c b/src/r_things.c index b7d7302f8..33b9820c8 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -25,6 +25,7 @@ #include "i_system.h" #include "r_things.h" #include "r_patch.h" +#include "r_patchrotation.h" #include "r_picformats.h" #include "r_plane.h" #include "r_portal.h"