diff --git a/CMakeLists.txt b/CMakeLists.txt index 7029f79..7c29f7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,7 +207,7 @@ set(MAIN_SOURCE ) if(WIN32) - list(APPEND MAIN_SOURCE assets/resource.rc) + list(APPEND MAIN_SOURCE windows/resource.rc) endif() source_group("MKXP Source" FILES ${MAIN_SOURCE} ${MAIN_HEADERS}) @@ -409,8 +409,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES} ) target_include_directories(${PROJECT_NAME} PRIVATE - assets src + windows ${SIGCXX_INCLUDE_DIRS} ${PIXMAN_INCLUDE_DIRS} ${PHYSFS_INCLUDE_DIRS} diff --git a/src/sprite.cpp b/src/sprite.cpp index 2cfe13a..26eb297 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -140,15 +140,12 @@ struct SpritePrivate if (!nullOrDisposed(bitmap)) bmSize = Vec2i(bitmap->width(), bitmap->height()); - if (mirrored) - rect = rect.hFlipped(); - /* Clamp the rectangle so it doesn't reach outside * the bitmap bounds */ rect.w = clamp(rect.w, 0, bmSize.x-rect.x); rect.h = clamp(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)); recomputeBushDepth(); diff --git a/assets/icon.ico b/windows/icon.ico similarity index 100% rename from assets/icon.ico rename to windows/icon.ico diff --git a/assets/resource.h b/windows/resource.h similarity index 100% rename from assets/resource.h rename to windows/resource.h diff --git a/assets/resource.rc b/windows/resource.rc similarity index 100% rename from assets/resource.rc rename to windows/resource.rc