Add r_patchrotation.h

This commit is contained in:
Jaime Passos 2020-10-10 18:53:05 -03:00
parent 6e5f71dd45
commit b2f45986ad
5 changed files with 25 additions and 9 deletions

View file

@ -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
)

View file

@ -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__

View file

@ -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];

21
src/r_patchrotation.h Normal file
View file

@ -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

View file

@ -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"