2019-10-28 18:28:42 +00:00
|
|
|
// SONIC ROBO BLAST 2
|
|
|
|
//-----------------------------------------------------------------------------
|
2023-03-31 12:53:31 +00:00
|
|
|
// Copyright (C) 2020-2023 by Jaime "Lactozilla" Passos.
|
2019-10-28 18:28:42 +00:00
|
|
|
//
|
|
|
|
// 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_patch.h
|
|
|
|
/// \brief Patch generation.
|
|
|
|
|
|
|
|
#ifndef __R_PATCH__
|
|
|
|
#define __R_PATCH__
|
|
|
|
|
|
|
|
#include "r_defs.h"
|
2020-10-12 03:13:22 +00:00
|
|
|
#include "r_picformats.h"
|
2020-10-30 19:54:58 +00:00
|
|
|
#include "r_fps.h"
|
2019-10-28 18:28:42 +00:00
|
|
|
#include "doomdef.h"
|
|
|
|
|
2020-08-08 08:16:47 +00:00
|
|
|
// Patch functions
|
2023-09-23 23:43:59 +00:00
|
|
|
patch_t *Patch_Create(INT16 width, INT16 height);
|
|
|
|
patch_t *Patch_CreateFromDoomPatch(softwarepatch_t *source);
|
2023-07-30 23:56:28 +00:00
|
|
|
void Patch_CalcDataSizes(softwarepatch_t *source, size_t *total_pixels, size_t *total_posts);
|
2023-09-03 15:57:11 +00:00
|
|
|
void Patch_MakeColumns(softwarepatch_t *source, size_t num_columns, INT16 width, UINT8 *pixels, column_t *columns, post_t *posts, boolean flip);
|
2020-08-08 08:16:47 +00:00
|
|
|
void Patch_Free(patch_t *patch);
|
|
|
|
|
2020-09-07 05:23:07 +00:00
|
|
|
#define Patch_FreeTag(tagnum) Patch_FreeTags(tagnum, tagnum)
|
|
|
|
void Patch_FreeTags(INT32 lowtag, INT32 hightag);
|
|
|
|
|
2020-10-12 03:13:22 +00:00
|
|
|
void Patch_GenerateFlat(patch_t *patch, pictureflags_t flags);
|
|
|
|
|
2020-08-08 08:16:47 +00:00
|
|
|
#ifdef HWRENDER
|
|
|
|
void *Patch_AllocateHardwarePatch(patch_t *patch);
|
|
|
|
void *Patch_CreateGL(patch_t *patch);
|
|
|
|
#endif
|
|
|
|
|
2020-10-10 21:43:26 +00:00
|
|
|
#ifdef ROTSPRITE
|
|
|
|
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);
|
2020-10-12 03:13:22 +00:00
|
|
|
patch_t *Patch_GetRotatedSprite(
|
|
|
|
spriteframe_t *sprite,
|
|
|
|
size_t frame, size_t spriteangle,
|
2023-09-21 14:50:30 +00:00
|
|
|
boolean flip,
|
2020-10-12 03:13:22 +00:00
|
|
|
void *info, INT32 rotationangle);
|
2021-12-10 08:32:46 +00:00
|
|
|
angle_t R_ModelRotationAngle(interpmobjstate_t *interp);
|
2020-10-30 19:54:58 +00:00
|
|
|
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp);
|
2020-10-12 03:13:22 +00:00
|
|
|
INT32 R_GetRollAngle(angle_t rollangle);
|
2020-10-10 21:43:26 +00:00
|
|
|
#endif
|
|
|
|
|
2019-10-28 18:28:42 +00:00
|
|
|
#endif // __R_PATCH__
|