Skip to content

Commit

Permalink
feat(Model): implement Model save
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Dec 30, 2023
1 parent cd2e3d7 commit 60d49f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/zenkit/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace zenkit {
[[nodiscard]] ZKREM("use ::load()") ZKAPI static Model parse(phoenix::buffer&& buf);

ZKAPI void load(Read* r);
ZKAPI void save(Write* w, GameVersion version) const;

public:
/// \brief The zenkit::ModelHierarchy associated with this model.
Expand Down
7 changes: 6 additions & 1 deletion src/Model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ namespace zenkit {
this->mesh.load(r);
}

void Model::save(Write* w, GameVersion version) const {
this->hierarchy.save(w);
this->mesh.save(w, version);
}

Model Model::parse(phoenix::buffer&& buf) {
return Model::parse(buf);
return parse(buf);
}
} // namespace zenkit

0 comments on commit 60d49f1

Please sign in to comment.