Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
e4ca2c4e66
|
@ -207,7 +207,7 @@ set(MAIN_SOURCE
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND MAIN_SOURCE assets/resource.rc)
|
list(APPEND MAIN_SOURCE windows/resource.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
source_group("MKXP Source" FILES ${MAIN_SOURCE} ${MAIN_HEADERS})
|
source_group("MKXP Source" FILES ${MAIN_SOURCE} ${MAIN_HEADERS})
|
||||||
|
@ -409,8 +409,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||||
${DEFINES}
|
${DEFINES}
|
||||||
)
|
)
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||||
assets
|
|
||||||
src
|
src
|
||||||
|
windows
|
||||||
${SIGCXX_INCLUDE_DIRS}
|
${SIGCXX_INCLUDE_DIRS}
|
||||||
${PIXMAN_INCLUDE_DIRS}
|
${PIXMAN_INCLUDE_DIRS}
|
||||||
${PHYSFS_INCLUDE_DIRS}
|
${PHYSFS_INCLUDE_DIRS}
|
||||||
|
|
|
@ -140,15 +140,12 @@ struct SpritePrivate
|
||||||
if (!nullOrDisposed(bitmap))
|
if (!nullOrDisposed(bitmap))
|
||||||
bmSize = Vec2i(bitmap->width(), bitmap->height());
|
bmSize = Vec2i(bitmap->width(), bitmap->height());
|
||||||
|
|
||||||
if (mirrored)
|
|
||||||
rect = rect.hFlipped();
|
|
||||||
|
|
||||||
/* Clamp the rectangle so it doesn't reach outside
|
/* Clamp the rectangle so it doesn't reach outside
|
||||||
* the bitmap bounds */
|
* the bitmap bounds */
|
||||||
rect.w = clamp<int>(rect.w, 0, bmSize.x-rect.x);
|
rect.w = clamp<int>(rect.w, 0, bmSize.x-rect.x);
|
||||||
rect.h = clamp<int>(rect.h, 0, bmSize.y-rect.y);
|
rect.h = clamp<int>(rect.h, 0, bmSize.y-rect.y);
|
||||||
|
|
||||||
quad.setTexRect(rect);
|
quad.setTexRect(mirrored ? rect.hFlipped() : rect);
|
||||||
|
|
||||||
quad.setPosRect(FloatRect(0, 0, rect.w, rect.h));
|
quad.setPosRect(FloatRect(0, 0, rect.w, rect.h));
|
||||||
recomputeBushDepth();
|
recomputeBushDepth();
|
||||||
|
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue