Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:iw4x/iw4x-client into codo_461_dump
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Components/Modules/AssetHandler.cpp
#	src/Components/Modules/ZoneBuilder.cpp
  • Loading branch information
Louvenarde committed Jun 16, 2024
2 parents 38b97c8 + 3a70a93 commit 824fb06
Show file tree
Hide file tree
Showing 56 changed files with 2,225 additions and 1,400 deletions.
2 changes: 1 addition & 1 deletion deps/iw4-open-formats
Submodule iw4-open-formats updated 38 files
+5 −0 include/api.hpp
+20 −0 include/iw4_native_asset.hpp
+5 −0 src/iw4-of/api.cpp
+24 −3 src/iw4-of/assets/asset_interface.hpp
+39 −7 src/iw4-of/assets/asset_interfaces/iclipmap.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/iclipmap.hpp
+23 −0 src/iw4-of/assets/asset_interfaces/icomworld.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/icomworld.hpp
+148 −29 src/iw4-of/assets/asset_interfaces/ifx.cpp
+3 −0 src/iw4-of/assets/asset_interfaces/ifx.hpp
+19 −2 src/iw4-of/assets/asset_interfaces/ifxworld.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/ifxworld.hpp
+123 −7 src/iw4-of/assets/asset_interfaces/igfxworld.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/igfxworld.hpp
+2 −3 src/iw4-of/assets/asset_interfaces/iglassworld.cpp
+71 −70 src/iw4-of/assets/asset_interfaces/ilightdef.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/ilightdef.hpp
+13 −4 src/iw4-of/assets/asset_interfaces/imapents.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/imapents.hpp
+52 −1 src/iw4-of/assets/asset_interfaces/imaterial.cpp
+3 −1 src/iw4-of/assets/asset_interfaces/imaterial.hpp
+125 −0 src/iw4-of/assets/asset_interfaces/iphyscollmap.cpp
+30 −0 src/iw4-of/assets/asset_interfaces/iphyscollmap.hpp
+80 −34 src/iw4-of/assets/asset_interfaces/irawfile.cpp
+5 −2 src/iw4-of/assets/asset_interfaces/irawfile.hpp
+48 −1 src/iw4-of/assets/asset_interfaces/isndalias.cpp
+3 −1 src/iw4-of/assets/asset_interfaces/isndalias.hpp
+8 −1 src/iw4-of/assets/asset_interfaces/isndcurve.cpp
+44 −2 src/iw4-of/assets/asset_interfaces/itechniqueset.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/itechniqueset.hpp
+13 −0 src/iw4-of/assets/asset_interfaces/itracerdef.cpp
+2 −1 src/iw4-of/assets/asset_interfaces/itracerdef.hpp
+248 −4 src/iw4-of/assets/asset_interfaces/iweapon.cpp
+1 −0 src/iw4-of/assets/asset_interfaces/iweapon.hpp
+47 −0 src/iw4-of/assets/asset_interfaces/ixmodel.cpp
+3 −2 src/iw4-of/assets/asset_interfaces/ixmodel.hpp
+28 −7 src/iw4-of/assets/assets.cpp
+13 −1 src/iw4-of/assets/assets.hpp
7 changes: 6 additions & 1 deletion src/Components/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "Modules/ClientCommand.hpp"
#include "Modules/ConnectProtocol.hpp"
#include "Modules/Console.hpp"
#include "Modules/ConfigStrings.hpp"
#include "Modules/D3D9Ex.hpp"
#include "Modules/Debug.hpp"
#include "Modules/Discord.hpp"
Expand All @@ -32,6 +33,7 @@
#include "Modules/MapRotation.hpp"
#include "Modules/Materials.hpp"
#include "Modules/ModList.hpp"
#include "Modules/ModelCache.hpp"
#include "Modules/ModelSurfs.hpp"
#include "Modules/NetworkDebug.hpp"
#include "Modules/News.hpp"
Expand Down Expand Up @@ -110,6 +112,8 @@ namespace Components
Register(new UIScript());
Register(new ZoneBuilder());

Register(new ConfigStrings()); // Needs to be there early !! Before modelcache & weapons

Register(new ArenaLength());
Register(new AssetHandler());
Register(new Bans());
Expand Down Expand Up @@ -144,6 +148,7 @@ namespace Components
Register(new Materials());
Register(new Menus());
Register(new ModList());
Register(new ModelCache());
Register(new ModelSurfs());
Register(new NetworkDebug());
Register(new News());
Expand Down Expand Up @@ -173,7 +178,7 @@ namespace Components
Register(new Threading());
Register(new Toast());
Register(new UIFeeder());
//Register(new Updater());
Register(new Updater());
Register(new VisionFile());
Register(new Voice());
Register(new Vote());
Expand Down
13 changes: 10 additions & 3 deletions src/Components/Modules/AssetHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,17 @@ namespace Components

void AssetHandler::ModifyAsset(Game::XAssetType type, Game::XAssetHeader asset, const std::string& name)
{
if (name == "zfeather_dfog_dtex.hlsl"s)
#ifdef DEBUG
if (type == Game::XAssetType::ASSET_TYPE_IMAGE && name[0] != ',')
{
printf("");
const auto image = asset.image;
const auto cat = static_cast<Game::ImageCategory>(image->category);
if (cat == Game::ImageCategory::IMG_CATEGORY_UNKNOWN)
{
Logger::Warning(Game::CON_CHANNEL_GFX, "Image {} has wrong category IMG_CATEGORY_UNKNOWN, this is an IMPORTANT ISSUE that should be fixed!\n", name);
}
}
#endif

if (type == Game::ASSET_TYPE_MATERIAL && (name == "gfx_distortion_knife_trail" || name == "gfx_distortion_heat_far" || name == "gfx_distortion_ring_light" || name == "gfx_distortion_heat") && asset.material->info.sortKey >= 43)
{
Expand Down Expand Up @@ -624,7 +631,7 @@ namespace Components
Game::ReallocateAssetPool(Game::ASSET_TYPE_VERTEXSHADER, ZoneBuilder::IsEnabled() ? 0x2000 : 3072);
Game::ReallocateAssetPool(Game::ASSET_TYPE_MATERIAL, 8192 * 2);
Game::ReallocateAssetPool(Game::ASSET_TYPE_VERTEXDECL, ZoneBuilder::IsEnabled() ? 0x400 : 196);
Game::ReallocateAssetPool(Game::ASSET_TYPE_WEAPON, WEAPON_LIMIT);
Game::ReallocateAssetPool(Game::ASSET_TYPE_WEAPON, Weapon::WEAPON_LIMIT);
Game::ReallocateAssetPool(Game::ASSET_TYPE_STRINGTABLE, 800);
Game::ReallocateAssetPool(Game::ASSET_TYPE_IMPACT_FX, 8);

Expand Down
Loading

0 comments on commit 824fb06

Please sign in to comment.