diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2025-02-02 01:05:35 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2025-02-02 01:05:35 -0600 |
| commit | 2d803af01f6c9d218af75884e267b057f69cfc80 (patch) | |
| tree | b7cd22a14459853a17d2e039922e8a6bf9cb22cd /src/port/Engine.cpp | |
| parent | 7fe51d2f9f1725a0fdbaad69889c800cde8eb230 (diff) | |
Added support for scrolling HD textures
Diffstat (limited to 'src/port/Engine.cpp')
| -rw-r--r-- | src/port/Engine.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp index dd6f825b..98492a67 100644 --- a/src/port/Engine.cpp +++ b/src/port/Engine.cpp @@ -584,6 +584,19 @@ extern "C" uint8_t GameEngine_OTRSigCheck(const char* data) { return strncmp(data, sOtrSignature, strlen(sOtrSignature)) == 0; } +extern "C" void GameEngine_GetTextureInfo(const char* path, int32_t* width, int32_t* height, float* scale, bool* custom) { + if(GameEngine_OTRSigCheck(path) != 1){ + *custom = false; + return; + } + std::shared_ptr<Fast::Texture> tex = std::static_pointer_cast<Fast::Texture>( + Ship::Context::GetInstance()->GetResourceManager()->LoadResourceProcess(path)); + *width = tex->Width; + *height = tex->Height; + *scale = tex->VPixelScale; + *custom = tex->Flags & (1 << 0); +} + extern "C" float __cosf(float angle) throw() { return cosf(angle); } |
