working on sprite config, kinda scared I'm f***ing everything up :)

This commit is contained in:
herbglitch 2025-03-25 04:54:13 -06:00
parent da2be7780b
commit 8845cf78e0
7 changed files with 149 additions and 55 deletions

View file

@ -22,7 +22,7 @@ typedef void (* ARC_ConfigType_CopyFn)(void **type, ARC_ParserTagToken *parsedDa
/**
* @brief a function callback to destroy a type
*/
typedef void (* ARC_ConfigType_DestroyFn)(void *type);
typedef void (* ARC_ConfigType_DestroyFn)(ARC_Config *config, void *type);
/**
* @brief the functions for used for loading and unloading a type, the name will be the key of a hashtable
@ -103,10 +103,11 @@ void ARC_Config_AddWithCStr(ARC_Config *config, const char *type, const char *na
* @note not specifying the group will use the current group
* @note this function uses ARC_Config_RemoveWithCStr so it shares error messages with that function
*
* @param[in] config ARC_Config to remove value from
* @param[in] name name of a variable to remove to specified group
* @param[in] config ARC_Config to remove value from
* @param[in] name name of a variable to remove to specified group
* @param[in] isArray a boolean to specify if the variable is an array
*/
void ARC_Config_Remove(ARC_Config *config, ARC_String *name);
void ARC_Config_Remove(ARC_Config *config, ARC_String *name, ARC_Bool isArray);
/**
* @brief remove a value with a given keyname
@ -114,10 +115,11 @@ void ARC_Config_Remove(ARC_Config *config, ARC_String *name);
* @note name should be prefaced with <group>:: to specify group, or just the name if it is in the default group
* @note not specifying the group will use the current group
*
* @param[in] config ARC_Config to remove value from
* @param[in] name name of a variable to remove to specified group
* @param[in] config ARC_Config to remove value from
* @param[in] name name of a variable to remove to specified group
* @param[in] isArray a boolean to specify if the variable is an array
*/
void ARC_Config_RemoveWithCStr(ARC_Config *config, const char *name);
void ARC_Config_RemoveWithCStr(ARC_Config *config, const char *name, ARC_Bool isArray);
/**
* @brief sets current group in config
@ -281,7 +283,7 @@ void ARC_ConfigType_BoolCopyFn(void **type, ARC_ParserTagToken *parsedData, ARC_
/**
* @brief
*/
void ARC_ConfigType_BoolDestroyFn(void *type);
void ARC_ConfigType_BoolDestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -291,7 +293,7 @@ void ARC_ConfigType_CharCopyFn(void **type, ARC_ParserTagToken *parsedData, ARC_
/**
* @brief
*/
void ARC_ConfigType_CharDestroyFn(void *type);
void ARC_ConfigType_CharDestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -301,7 +303,7 @@ void ARC_ConfigType_Int8CopyFn(void **type, ARC_ParserTagToken *parsedData, ARC_
/**
* @brief
*/
void ARC_ConfigType_Int8DestroyFn(void *type);
void ARC_ConfigType_Int8DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -311,7 +313,7 @@ void ARC_ConfigType_Uint8CopyFn(void **type, ARC_ParserTagToken *parsedData, ARC
/**
* @brief
*/
void ARC_ConfigType_Uint8DestroyFn(void *type);
void ARC_ConfigType_Uint8DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -321,7 +323,7 @@ void ARC_ConfigType_Int16CopyFn(void **type, ARC_ParserTagToken *parsedData, ARC
/**
* @brief
*/
void ARC_ConfigType_Int16DestroyFn(void *type);
void ARC_ConfigType_Int16DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -331,7 +333,7 @@ void ARC_ConfigType_Uint16CopyFn(void **type, ARC_ParserTagToken *parsedData, AR
/**
* @brief
*/
void ARC_ConfigType_Uint16DestroyFn(void *type);
void ARC_ConfigType_Uint16DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -341,7 +343,7 @@ void ARC_ConfigType_Int32CopyFn(void **type, ARC_ParserTagToken *parsedData, ARC
/**
* @brief
*/
void ARC_ConfigType_Int32DestroyFn(void *type);
void ARC_ConfigType_Int32DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -351,7 +353,7 @@ void ARC_ConfigType_Uint32CopyFn(void **type, ARC_ParserTagToken *parsedData, AR
/**
* @brief
*/
void ARC_ConfigType_Uint32DestroyFn(void *type);
void ARC_ConfigType_Uint32DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -361,7 +363,7 @@ void ARC_ConfigType_Int64CopyFn(void **type, ARC_ParserTagToken *parsedData, ARC
/**
* @brief
*/
void ARC_ConfigType_Int64DestroyFn(void *type);
void ARC_ConfigType_Int64DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -371,7 +373,7 @@ void ARC_ConfigType_Uint64CopyFn(void **type, ARC_ParserTagToken *parsedData, AR
/**
* @brief
*/
void ARC_ConfigType_Uint64DestroyFn(void *type);
void ARC_ConfigType_Uint64DestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -381,7 +383,7 @@ void ARC_ConfigType_FloatCopyFn(void **type, ARC_ParserTagToken *parsedData, ARC
/**
* @brief
*/
void ARC_ConfigType_FloatDestroyFn(void *type);
void ARC_ConfigType_FloatDestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -391,7 +393,7 @@ void ARC_ConfigType_DoubleCopyFn(void **type, ARC_ParserTagToken *parsedData, AR
/**
* @brief
*/
void ARC_ConfigType_DoubleDestroyFn(void *type);
void ARC_ConfigType_DoubleDestroyFn(ARC_Config *config, void *type);
/**
* @brief
@ -401,7 +403,7 @@ void ARC_ConfigType_StringCopyFn(void **type, ARC_ParserTagToken *parsedData, AR
/**
* @brief
*/
void ARC_ConfigType_StringDestroyFn(void *type);
void ARC_ConfigType_StringDestroyFn(ARC_Config *config, void *type);
#ifdef __cplusplus
}