isle-portable/extensions/include/extensions/textureloader.h
foxtacles 569c8b467b
Separate extensions (#18)
* WIP

* WIP

* Make camera the single source of truth for broadcast state

Remove redundant local copies of walkAnimId, idleAnimId, and
displayActorIndex from NetworkManager. BroadcastLocalState now reads
these from the camera's Controller, eliminating dual-copy sync issues.

Additional cleanup:
- Early-return on null cam in SendEmote/HandleCustomize for clarity
- Only consume camera-dependent pending requests when cam is available
- Move local name bubble creation from BroadcastLocalState to Tickle
- Remove dead NetworkManager::SetDisplayActorIndex method

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix clang format

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 23:12:07 +01:00

40 lines
897 B
C++

#pragma once
#include "extensions/extensions.h"
#include "legotextureinfo.h"
#include <array>
#include <map>
#include <vector>
namespace Extensions
{
class TextureLoaderExt {
public:
static void Initialize();
static bool PatchTexture(LegoTextureInfo* p_textureInfo);
static void AddExcludedFile(const std::string& p_file);
static std::map<std::string, std::string> options;
static bool enabled;
static constexpr std::array<std::pair<std::string_view, std::string_view>, 1> defaults = {
{{"texture loader:texture path", "/textures"}}
};
private:
static std::vector<std::string> excludedFiles;
static SDL_Surface* FindTexture(const char* p_name);
};
namespace TL
{
#ifdef EXTENSIONS
constexpr auto PatchTexture = &TextureLoaderExt::PatchTexture;
#else
constexpr decltype(&TextureLoaderExt::PatchTexture) PatchTexture = nullptr;
#endif
} // namespace TL
}; // namespace Extensions