#include "setups_special.h"
-#include <msp/geometry/loader.h>
namespace Msp::Game {
{
static ActionMap shared_actions;
set_actions(shared_actions);
+
+ add_auxiliary_loader(shape_ldr);
}
void ShapeSetup::Loader::init_actions()
{
add("render_detail", &ShapeSetup::render_detail);
- add("shape", &Loader::shape);
add("technique_name", &ShapeSetup::technique_name);
}
-void ShapeSetup::Loader::shape()
+void ShapeSetup::Loader::finish()
{
- Geometry::Loader<float, 3> ldr;
- load_sub_with(ldr);
- obj.shape = ldr.take_shape();
+ obj.shape = shape_ldr.take_shape();
}
} // namespace Msp::Game
#include <memory>
#include <msp/datafile/objectloader.h>
+#include <msp/geometry/loader.h>
#include <msp/geometry/shape.h>
#include "mspgame_api.h"
{
class MSPGAME_API Loader: public DataFile::ObjectLoader<ShapeSetup>
{
+ private:
+ Geometry::Loader<float, 3> shape_ldr;
+
public:
Loader(ShapeSetup &);
private:
void init_actions() override;
-
- void shape();
+ void finish() override;
};
std::unique_ptr<Geometry::Shape<float, 3>> shape;