diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index c8872920c..252bb7b1f 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -1801,9 +1801,8 @@ int UIWindow::RestoreEditTexts(const unsigned char* data) { return offset; } -// OFFSET: 0x00A83FD0 -// FUNCTION: fn_17008 -bool UIWindow::FitSprite(const ActionFrame* frame, const CSprRes* sprite, int width, int height, int* x, int* y, float* scale) { +// INLINED +static __forceinline bool FitSpriteFrame(const ActionFrame* frame, const CSprRes* sprite, int width, int height, int* x, int* y, float* scale) { if (!width || !height || !frame || !sprite || !x || !y || !scale) { return false; } @@ -1884,6 +1883,16 @@ bool UIWindow::FitSprite(const ActionFrame* frame, const CSprRes* sprite, int wi return true; } +// OFFSET: 0x00A83FD0 +// FUNCTION: fn_17008 +bool UIWindow::FitSprite(const ActionFrame* frame, const CSprRes* sprite, int width, int height, int* x, int* y, float* scale) { + if (!FitSpriteFrame(frame, sprite, width, height, x, y, scale)) { + return false; + } + + return true; +} + // OFFSET: 0x005C27E0 // FUNCTION: fn_03535 UIListBox_NaviSearch::UIListBox_NaviSearch() : UIListBox() { @@ -3281,7 +3290,7 @@ void UIWindow::DrawActionSprite( int offsetX; int offsetY; float scale; - if (!this->FitSprite(&frames[0], sprite, width, height, &offsetX, &offsetY, &scale)) { + if (!FitSpriteFrame(&frames[0], sprite, width, height, &offsetX, &offsetY, &scale)) { return; }