Added support for scrolling HD textures

This commit is contained in:
KiritoDv
2025-02-02 01:05:35 -06:00
parent 7fe51d2f9f
commit 2d803af01f
3 changed files with 108 additions and 38 deletions
+13
View File
@@ -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);
}