Costume

From OuroDev
Revision as of 15:06, 1 June 2019 by pc>Herald
        kBodyType_Male        = 0,  // All the values in body type MUST match the
	kBodyType_Female      = 1,  // ones which are read in the menu file.
	kBodyType_BasicMale   = 2,
	kBodyType_BasicFemale = 3,
	kBodyType_Huge        = 4,
	kBodyType_Enemy       = 5,
	kBodyType_Villain     = 6, // Except this one. This one is only set by code.
	kBodyType_Enemy2	  = 7, // Except this one. This one is only set by code.
	kBodyType_Enemy3	  = 8, // Except this one. This one is only set by code.

		
        F32 fScale;       // ranges from -9 to 9. Yields approx +/-20% size change
	F32 fBoneScale;	// -1 = skinniest guy, 0 = normal guy, 1 = fattest guy

void costume_PartSetTexture1(Costume* costume, int iIdxBone, const char *pchTex);
void costume_PartSetTexture2(Costume* costume, int iIdxBone, const char *pchTex);
void costume_PartSetFx(Costume* costume, int iIdxBone, const char *pchFx);
// Sets the primary/secondary base texture name for a body part.
// This name will be magically munged with the bodytype's texture prefix.

void costume_PartSetGeometry(Costume* costume, int iIdxBone, const char *pchGeom);
// Sets the geometry to be used for a body part.
// This name will be magically munged with the bodytype's entname prefix.

// Stores data for a costume set
//
typedef struct CostumeSetSet
{
	const char *filename;
	const char *name;
	const char *displayName;
	const char *npcName;
	const char **keys;					// the set isn't shown unless the player has all keys or
	const char **storeProductList;		// the set isn't shown unless the player has all products
} CostumeSetSet;

	if( !part->pchGeom || !stricmp( part->pchGeom, "none" )  )
	{
		if( stricmp( pchName, "pants" ) == 0 ||  // These parts must be set
			stricmp( pchName, "chest" ) == 0 ||
			stricmp( pchName, "gloves") == 0 ||
			stricmp( pchName, "boots" ) == 0 )
		{
			return false;
		}
		else
			bMatchGeo = true;
	}

	if( !part->pchTex1 || !stricmp( part->pchTex1, "base" ) || !stricmp( part->pchTex1, "none" ) )
	{
		if( stricmp( pchName, "pants" ) == 0 ||  // These parts must be set
			stricmp( pchName, "chest" ) == 0 ||
			stricmp( pchName, "gloves") == 0 ||
			stricmp( pchName, "boots" ) == 0 )
		{
			return false;
		}
		else
			bMatchTex1 = true;
	}

// "numParts" must be less than MAX_COSTUME_PARTS because that's how many
	// parts containersaveload.c is hardcoded to save/load.
	//
	// This is also the reason why we always allocate MAX_COSTUME_PART parts even
	// though the number of parts in use is likely to be less.

// Create and fill the CostumeParts array with emtpy parts for this costume.
	// JS:	It is required that these things be filled with emtpty entries because
	//		the contaier loading code does not know how to create this kind of
	//		structure on its own.
	{

		if(!stricmp(e->pchar->pclass->pchName, "Class_Arachnos_Soldier") ||
			!stricmp(e->pchar->pclass->pchName, "Class_Arachnos_Widow"))
		{
			// If this is a VEAT, we will attempt to clone the 1st slot, since slot 0
			//	contains the uniform

costume->appearance.costumeFilePrefix = allocAddString_checked(bodyName);