From 37d81e9c0faebd45f01b6dbeadd25242efde0244 Mon Sep 17 00:00:00 2001 From: maxbyte9p Date: Thu, 16 May 2024 13:57:30 -0400 Subject: [PATCH] tweaked for amo parser implementation and testing --- include/Collage/types/model.h | 3 ++- main.cpp | 3 +++ src/types/model.cpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/Collage/types/model.h b/include/Collage/types/model.h index c004b99..72eac24 100644 --- a/include/Collage/types/model.h +++ b/include/Collage/types/model.h @@ -24,6 +24,7 @@ class Model { protected: void load(const std::string& file); void loadOBJ(const std::string& filename); + void loadAMO(const std::string& filename); public: ModelType type; std::vector vertices; @@ -37,4 +38,4 @@ class SkeletalModel : public Model { public: std::vector vertices; Bone boneMap; -}; \ No newline at end of file +}; diff --git a/main.cpp b/main.cpp index f4be74a..8512436 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,7 @@ #include +#include int main() { + Model m = Model("chicken.amo"); + //Model::loadOBJ("chicken.amo"); } diff --git a/src/types/model.cpp b/src/types/model.cpp index 3a110b2..8bcbc0e 100644 --- a/src/types/model.cpp +++ b/src/types/model.cpp @@ -3,6 +3,8 @@ void Model::load(const std::string& file) { if (file.ends_with(".obj")) loadOBJ(file); + if (file.ends_with(".amo")) + loadAMO(file); } Model::Model(const std::string &file) {