mirror of
https://github.com/zeldaret/botw
synced 2026-08-03 16:52:22 -04:00
Generate AIs
This commit is contained in:
@@ -64,6 +64,11 @@ struct AiFactory {
|
||||
using CreateFn = Ai* (*)(const Ai::InitArg& arg, sead::Heap* heap);
|
||||
u32 hash;
|
||||
CreateFn create_fn;
|
||||
|
||||
template <typename T>
|
||||
static Ai* make(const Ai::InitArg& arg, sead::Heap* heap) {
|
||||
return new (heap) T(arg);
|
||||
}
|
||||
};
|
||||
|
||||
class Ais {
|
||||
|
||||
Reference in New Issue
Block a user