-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from Laupetin/feature/t6-default-assets
chore: add asset loaders for all asset types of t6
- Loading branch information
Showing
73 changed files
with
829 additions
and
102 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderAddonMapEnts.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderAddonMapEnts.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderAddonMapEnts::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetAddonMapEnts::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderAddonMapEnts.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderAddonMapEnts final : public BasicAssetLoader<AssetAddonMapEnts> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
23 changes: 23 additions & 0 deletions
23
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderClipMap.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "AssetLoaderClipMap.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderClipMapBase::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<clipMap_t>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} | ||
|
||
asset_type_t AssetLoaderClipMap::GetHandlingAssetType() const | ||
{ | ||
return ASSET_TYPE_CLIPMAP; | ||
} | ||
|
||
asset_type_t AssetLoaderClipMapPvs::GetHandlingAssetType() const | ||
{ | ||
return ASSET_TYPE_CLIPMAP_PVS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderClipMapBase : public BasicAssetLoaderWithoutType<clipMap_t> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
|
||
class AssetLoaderClipMap final : public AssetLoaderClipMapBase | ||
{ | ||
public: | ||
[[nodiscard]] asset_type_t GetHandlingAssetType() const override; | ||
}; | ||
|
||
class AssetLoaderClipMapPvs final : public AssetLoaderClipMapBase | ||
{ | ||
public: | ||
[[nodiscard]] asset_type_t GetHandlingAssetType() const override; | ||
}; | ||
} // namespace T6 |
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderComWorld.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderComWorld.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderComWorld::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetComWorld::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderComWorld final : public BasicAssetLoader<AssetComWorld> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderDDL.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderDDL::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetDDL::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderDDL final : public BasicAssetLoader<AssetDDL> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderDestructibleDef.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderDestructibleDef.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderDestructibleDef::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetDestructibleDef::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderDestructibleDef.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderDestructibleDef final : public BasicAssetLoader<AssetDestructibleDef> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderEmblemSet.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderEmblemSet.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderEmblemSet::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
// Asset does not have a name | ||
// So this cannot be an asset reference | ||
return nullptr; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderEmblemSet.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderEmblemSet final : public BasicAssetLoader<AssetEmblemSet> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderFont.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderFont::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetFont::Type>(); | ||
asset->fontName = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderFont final : public BasicAssetLoader<AssetFont> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderFootstepFxTable.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderFootstepFxTable.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderFootstepFxTable::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetFootstepFxTable::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderFootstepFxTable.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderFootstepFxTable final : public BasicAssetLoader<AssetFootstepFxTable> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderFootstepTable.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderFootstepTable.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderFootstepTable::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetFootstepTable::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderFootstepTable.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderFootstepTable final : public BasicAssetLoader<AssetFootstepTable> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderFx.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderFx::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetFx::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderFx final : public BasicAssetLoader<AssetFx> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderGameWorldMp.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderGameWorldMp.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderGameWorldMp::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetGameWorldMp::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderGameWorldMp.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderGameWorldMp final : public BasicAssetLoader<AssetGameWorldMp> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
13 changes: 13 additions & 0 deletions
13
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderGameWorldSp.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "AssetLoaderGameWorldSp.h" | ||
|
||
#include "Game/T6/T6.h" | ||
#include "ObjLoading.h" | ||
|
||
using namespace T6; | ||
|
||
void* AssetLoaderGameWorldSp::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) | ||
{ | ||
auto* asset = memory->Alloc<AssetGameWorldSp::Type>(); | ||
asset->name = memory->Dup(assetName.c_str()); | ||
return asset; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ObjLoading/Game/T6/AssetLoaders/AssetLoaderGameWorldSp.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "AssetLoading/BasicAssetLoader.h" | ||
#include "Game/T6/T6.h" | ||
#include "SearchPath/ISearchPath.h" | ||
|
||
namespace T6 | ||
{ | ||
class AssetLoaderGameWorldSp final : public BasicAssetLoader<AssetGameWorldSp> | ||
{ | ||
public: | ||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override; | ||
}; | ||
} // namespace T6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.