mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
#ifndef COMPONENT_UTIL_HPP
|
|
#define COMPONENT_UTIL_HPP
|
|
|
|
#include "component/Types.hpp"
|
|
#include <cstdint>
|
|
|
|
class CharacterFacialHairStylesRec;
|
|
class CharSectionsRec;
|
|
|
|
struct ComponentData;
|
|
struct st_variation;
|
|
|
|
struct st_color {
|
|
CharSectionsRec* rec;
|
|
};
|
|
|
|
struct st_race {
|
|
// The use of "section" here refers to the groups of variations represented in
|
|
// COMPONENT_VARIATIONS. It does NOT refer to COMPONENT_SECTIONS.
|
|
struct {
|
|
int32_t variationCount = 0;
|
|
st_variation* variationArray = nullptr;
|
|
} sections[NUM_COMPONENT_VARIATIONS];
|
|
};
|
|
|
|
struct st_variation {
|
|
int32_t colorCount = 0;
|
|
st_color* colorArray = nullptr;
|
|
};
|
|
|
|
int32_t BuildComponentArray(uint32_t varArrayLength, st_race** varArrayPtr);
|
|
|
|
CharacterFacialHairStylesRec* ComponentGetFacialHairStyleRecord(ComponentData* data);
|
|
|
|
int32_t ComponentGetHairGeoset(ComponentData* data);
|
|
|
|
int32_t ComponentGetNumColors(st_race* varArray, int32_t raceId, int32_t sexId, COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex);
|
|
|
|
CharSectionsRec* ComponentGetSectionsRecord(st_race* varArray, int32_t raceId, int32_t sexId, COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex, bool* found);
|
|
|
|
int32_t ComponentValidateBase(st_race* varArray, int32_t raceId, int32_t sexId, COMPONENT_VARIATIONS sectionIndex, int32_t variationIndex, int32_t colorIndex);
|
|
|
|
int32_t CountFacialFeatures(uint32_t varArrayLength, uint32_t** featuresListPtr);
|
|
|
|
COMPONENT_SELECTION GetSelectionFromContext(COMPONENT_CONTEXT context, int32_t classID);
|
|
|
|
#endif
|