mirror of
https://github.com/zeldaret/botw
synced 2026-07-28 15:17:37 -04:00
Generate actions
This commit is contained in:
@@ -24,6 +24,11 @@ struct ActionFactory {
|
||||
using CreateFn = Action* (*)(const Action::InitArg& arg, sead::Heap* heap);
|
||||
u32 hash;
|
||||
CreateFn create_fn;
|
||||
|
||||
template <typename T>
|
||||
static Action* make(const Action::InitArg& arg, sead::Heap* heap) {
|
||||
return new (heap) T(arg);
|
||||
}
|
||||
};
|
||||
|
||||
class Actions {
|
||||
|
||||
Reference in New Issue
Block a user