Skip to content

Commit

Permalink
add font asset (#36)
Browse files Browse the repository at this point in the history
* add font asset

* only add enum

* update switch statements

* update version
  • Loading branch information
McCallisterRomer authored Feb 12, 2024
1 parent f6de6dc commit a901276
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
type: boolean

env:
VERSION: '3.0.0'
VERSION: '3.1.0'

jobs:
Build:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20)
project("nc-tools" VERSION "3.0.0" LANGUAGES CXX)
project("nc-tools" VERSION "3.1.0" LANGUAGES CXX)

if(${PROJECT_SOURCE_DIR} EQUAL ${PROJECT_BINARY_DIR})
message(FATAL_ERROR "Don't be a fool, out-of-source build with your tool.")
Expand Down
3 changes: 2 additions & 1 deletion include/ncasset/AssetType.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ enum class AssetType
Mesh,
Shader,
SkeletalAnimation,
Texture
Texture,
Font
};
} // namespace nc::asset
4 changes: 4 additions & 0 deletions source/ncconvert/builder/Builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ auto Builder::Build(asset::AssetType type, const Target& target) -> bool
convert::Serialize(outFile, asset, assetId);
return true;
}
case asset::AssetType::Font:
{
throw NcError("Not implemented");
}
}
throw NcError(fmt::format("Unknown AssetType: {} for {}",
static_cast<int>(type), target.sourcePath.string()
Expand Down
5 changes: 5 additions & 0 deletions source/ncconvert/builder/Inspect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ void Inspect(const std::filesystem::path& ncaPath)
LOG(textureTemplate, asset.width, asset.height);
break;
}
case asset::AssetType::Font:
{
LOG("Font not supported");
break;
}
}
}
} // namespace nc::convert

0 comments on commit a901276

Please sign in to comment.