This introduces a more sophisticated and featured final assembler into kas. This assembler is responsible for taking a kdk::resource object (which contains all of the information specified in the input KDL source) and builds a binary data object that represents the resource Kestrel would expect to use.
Current Limitations
At present file reference types have not been implemented, due to the type mechanism not being fully fleshed out. This will need to wait for a type mechanism to be devised so that the assembler knows what resource type the file contents should be stored with in. This mechanism will also need to a mechanism for determining appropriate Resource ID's.
Usage
Resource Type Assemblers are implemented as distinct classes that inherit from the kdk::assembler base class. The base class provides the guts and workings of the assembler, whilst the subclass should define the general structure of the binary data for the resource.
class foo : public assembler
{
public:
using assembler::assembler;
rsrc::data assemble();
}
The binary data structure is defined in the kdk::sprite_animation::assemble() function, progressively, as the assembler operates.
This introduces a more sophisticated and featured final assembler into kas. This assembler is responsible for taking a
kdk::resource
object (which contains all of the information specified in the input KDL source) and builds a binary data object that represents the resource Kestrel would expect to use.Current Limitations
At present file reference types have not been implemented, due to the type mechanism not being fully fleshed out. This will need to wait for a type mechanism to be devised so that the assembler knows what resource type the file contents should be stored with in. This mechanism will also need to a mechanism for determining appropriate Resource ID's.
Usage
Resource Type Assemblers are implemented as distinct classes that inherit from the
kdk::assembler
base class. The base class provides the guts and workings of the assembler, whilst the subclass should define the general structure of the binary data for the resource.The binary data structure is defined in the
kdk::sprite_animation::assemble()
function, progressively, as the assembler operates.Take the following KDL
We could define this field in the
foo
type assembler like so:Further documentation will follow with a subsequent piece of work once things have been further fleshed out.