Files
SRB2Kart-Saturn/src/hardware/hw_md2.h
T
alufolie91 9cacbb1067 dynamically allocate skin/localskins
based on https://gitlab.com/kart-krew-dev/ring-racers/-/commit/255570cfca8ac6a2700098036085a48a10a3a84b

this also extends to localskins and some other things that were static arrays before, like the faceprefixes and md2 models
those are now part of the skin_t structs aswell

TODO: dynamic allocate the translationtablecaches so we can completely remove the localskin limits and maybe further cleanup localskin handling

also cleans up a few parts of the localskin handling
and might reduce general memory usage slightly in some cases

this gave me an intense headache ngl
2026-10-08 09:06:13 +02:00

55 lines
1.5 KiB
C

// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 1993-1996 by id Software, Inc.
// Copyright (C) 1998-2000 by DooM Legacy Team.
// Copyright (C) 1999-2019 by Sonic Team Junior.
//
// 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
/// \brief MD2 Handling
/// Inspired from md2.h by Mete Ciragan (mete@swissquake.ch)
#ifndef _HW_MD2_H_
#define _HW_MD2_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "hw_glob.h"
#include "hw_model.h"
typedef struct
{
char filename[32];
float scale;
float offset;
model_t *model;
void *glpatch;
boolean notexturefile; // true if texture file was not found
void *blendglpatch;
boolean noblendfile; // true if blend texture file was not found
boolean notfound;
INT32 skinnum;
boolean error;
} md2_t;
extern md2_t md2_models[NUMSPRITES];
void HWR_InitMD2(void);
void HWR_DrawMD2(gl_vissprite_t *spr);
void HWR_AddPlayerMD2(INT32 skin, boolean local);
void HWR_AddSpriteMD2(size_t spritenum);
void HWR_Draw2DModel(md2_t *md2, INT32 x, INT32 y, INT32 skinnum,
skincolors_t color, const UINT8 *colormap,
fixed_t scale, INT32 frame, angle_t angle);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _HW_MD2_H_