I have been trying to implement reflection for a project. More or less its worked up already, but im not finding a workaround for the allocation of the struct without writing huge boilerplate, cause the different structs declaration come from a game, and there are more than a hundred.
The problem is, when loading an archive from the game it has all the struct names. I need to allocate the struct by getting the c type string converted to a token. Like this:
Struct1Name* inst = ...malloc...;
So converting the "Struct1Name" string as it comes from the file, but somehow paste it as a token. Need to do this for each struct present in the archive, which of course will have different names.
Struct1Name is defined as follows, for example:
typedef struct {float f1;bool b1;}Struct1Name;
I dont know what steps im missing here...and im not able to come up with a solution.