1 // SONIC ROBO BLAST 2 2 //----------------------------------------------------------------------------- 3 // Copyright (C) 1993-1996 by id Software, Inc. 4 // Copyright (C) 1998-2000 by DooM Legacy Team. 5 // Copyright (C) 1999-2020 by Sonic Team Junior. 6 // 7 // This program is free software distributed under the 8 // terms of the GNU General Public License, version 2. 9 // See the 'LICENSE' file for more details. 10 //----------------------------------------------------------------------------- 11 /// \file r_skins.h 12 /// \brief Skins stuff 13 14 #ifndef __R_SKINS__ 15 #define __R_SKINS__ 16 17 #include "info.h" 18 #include "sounds.h" 19 #include "d_player.h" // skinflags 20 #include "r_patch.h" 21 #include "r_picformats.h" // spriteinfo_t 22 #include "r_defs.h" // spritedef_t 23 24 /// Defaults 25 #define SKINNAMESIZE 16 26 // should be all lowercase!! S_SKIN processing does a strlwr 27 #define DEFAULTSKIN "sonic" 28 #define DEFAULTSKIN2 "tails" // secondary player 29 #define DEFAULTNIGHTSSKIN 0 30 31 /// The skin_t struct 32 typedef struct 33 { 34 char name[SKINNAMESIZE+1]; // INT16 descriptive name of the skin 35 UINT16 wadnum; 36 skinflags_t flags; 37 38 char realname[SKINNAMESIZE+1]; // Display name for level completion. 39 char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long) 40 41 UINT8 ability; // ability definition 42 UINT8 ability2; // secondary ability definition 43 INT32 thokitem; 44 INT32 spinitem; 45 INT32 revitem; 46 INT32 followitem; 47 fixed_t actionspd; 48 fixed_t mindash; 49 fixed_t maxdash; 50 51 fixed_t normalspeed; // Normal ground 52 fixed_t runspeed; // Speed that you break into your run animation 53 54 UINT8 thrustfactor; // Thrust = thrustfactor * acceleration 55 UINT8 accelstart; // Acceleration if speed = 0 56 UINT8 acceleration; // Acceleration 57 58 fixed_t jumpfactor; // multiple of standard jump height 59 60 fixed_t radius; // Bounding box changes. 61 fixed_t height; 62 fixed_t spinheight; 63 64 fixed_t shieldscale; // no change to bounding box, but helps set the shield's sprite size 65 fixed_t camerascale; 66 67 // Definable color translation table 68 UINT8 starttranscolor; 69 UINT16 prefcolor; 70 UINT16 supercolor; 71 UINT16 prefoppositecolor; // if 0 use tables instead 72 73 fixed_t highresscale; // scale of highres, default is 0.5 74 UINT8 contspeed; // continue screen animation speed 75 UINT8 contangle; // initial angle on continue screen 76 77 // specific sounds per skin 78 sfxenum_t soundsid[NUMSKINSOUNDS]; // sound # in S_sfx table 79 80 // contains super versions too 81 spritedef_t sprites[NUMPLAYERSPRITES*2]; 82 spriteinfo_t sprinfo[NUMPLAYERSPRITES*2]; 83 84 UINT8 availability; // lock? 85 } skin_t; 86 87 /// Externs 88 extern INT32 numskins; 89 extern skin_t skins[MAXSKINS]; 90 91 /// Function prototypes 92 void R_InitSkins(void); 93 94 void SetPlayerSkin(INT32 playernum,const char *skinname); 95 void SetPlayerSkinByNum(INT32 playernum,INT32 skinnum); // Tails 03-16-2002 96 boolean R_SkinUsable(INT32 playernum, INT32 skinnum); 97 UINT32 R_GetSkinAvailabilities(void); 98 INT32 R_SkinAvailable(const char *name); 99 void R_PatchSkins(UINT16 wadnum); 100 void R_AddSkins(UINT16 wadnum); 101 102 UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player); 103 104 #endif //__R_SKINS__ 105