diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 0e440b1..b5c603a 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -13,7 +13,7 @@ jobs: - uses: benjlevesque/short-sha@v2.2 id: short-sha with: - length: 6 + length: 7 - uses: msys2/setup-msys2@v2 with: @@ -82,7 +82,7 @@ jobs: - uses: benjlevesque/short-sha@v2.2 id: short-sha with: - length: 6 + length: 7 - name: Checkout repository uses: actions/checkout@v3 @@ -129,7 +129,13 @@ jobs: - uses: benjlevesque/short-sha@v2.2 id: short-sha with: - length: 6 + length: 7 + + - name: Remove pre-existing homebrew packages + run: | + export PKGS=$(brew list) + echo "$PKGS" + brew remove --force $PKGS - name: Checkout repository uses: actions/checkout@v3 @@ -151,7 +157,7 @@ jobs: - name: Build all dependencies run: | cd macos/Dependencies - ./setup + ./setup.sh - name: Build app run: | diff --git a/linux/Makefile b/linux/Makefile index fd34255..8cb48b7 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -164,7 +164,7 @@ $(DOWNLOADS)/physfs/cmakebuild/Makefile: $(DOWNLOADS)/physfs/CMakeLists.txt $(CMAKE) -DPHYSFS_BUILD_STATIC=true -DPHYSFS_BUILD_SHARED=false $(DOWNLOADS)/physfs/CMakeLists.txt: - $(CLONE) $(GITHUB)/mkxp-z/physfs $(DOWNLOADS)/physfs + $(CLONE) $(GITHUB)/mkxp-z/physfs -b release-3.2.0 $(DOWNLOADS)/physfs # libpng libpng: init_dirs $(LIBDIR)/libpng.a @@ -198,19 +198,17 @@ $(DOWNLOADS)/libjpeg/CMakeLists.txt: # SDL2 sdl2: init_dirs $(LIBDIR)/libSDL2.a -$(LIBDIR)/libSDL2.a: $(DOWNLOADS)/sdl2/Makefile +$(LIBDIR)/libSDL2.a: $(DOWNLOADS)/sdl2/cmakebuild/Makefile + cd $(DOWNLOADS)/sdl2/cmakebuild; \ + make -j$(NPROC); make install + +$(DOWNLOADS)/sdl2/cmakebuild/Makefile: $(DOWNLOADS)/sdl2/CMakeLists.txt cd $(DOWNLOADS)/sdl2; \ - make -j$(NPROC); make install; + mkdir cmakebuild; cd cmakebuild; \ + $(CMAKE) -DBUILD_SHARED_LIBS=no -$(DOWNLOADS)/sdl2/Makefile: $(DOWNLOADS)/sdl2/configure - cd $(DOWNLOADS)/sdl2; \ - $(CONFIGURE) --enable-static=true --enable-shared=false $(SDL_FLAGS) - -$(DOWNLOADS)/sdl2/configure: $(DOWNLOADS)/sdl2/autogen.sh - cd $(DOWNLOADS)/sdl2; ./autogen.sh - -$(DOWNLOADS)/sdl2/autogen.sh: - $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z; cd $(DOWNLOADS)/sdl2 +$(DOWNLOADS)/sdl2/CMakeLists.txt: + $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z-2.26 # SDL2 (Image) sdl2image: init_dirs sdl2 libpng libjpeg $(LIBDIR)/libSDL2_image.a @@ -325,15 +323,18 @@ $(DOWNLOADS)/openssl/Configure: $(CLONE) $(GITHUB)/openssl/openssl $(DOWNLOADS)/openssl --single-branch --branch OpenSSL_1_1_1i --depth 1 # Standard ruby -ruby: init_dirs openssl $(BUILD_PREFIX)/libruby.so.3.1 +ruby: init_dirs openssl $(LIBDIR)/libruby.so.3.1 -$(BUILD_PREFIX)/libruby.so.3.1: $(DOWNLOADS)/ruby/Makefile +$(LIBDIR)/libruby.so.3.1: $(DOWNLOADS)/ruby/Makefile cd $(DOWNLOADS)/ruby; \ make -j$(NPROC); make install $(DOWNLOADS)/ruby/Makefile: $(DOWNLOADS)/ruby/configure cd $(DOWNLOADS)/ruby; \ - $(CONFIGURE) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS) + export $(CONFIGURE_ENV); \ + export CFLAGS="-flto $$CFLAGS"; \ + export LDFLAGS="-flto $$LDFLAGS"; \ + ./configure $(CONFIGURE_ARGS) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS) $(DOWNLOADS)/ruby/configure: $(DOWNLOADS)/ruby/*.c cd $(DOWNLOADS)/ruby; autoreconf -i diff --git a/macos/Dependencies/arm64.make b/macos/Dependencies/arm64.make index 033e2a2..8e47183 100644 --- a/macos/Dependencies/arm64.make +++ b/macos/Dependencies/arm64.make @@ -1,4 +1,3 @@ -SDK := macosx ARCH := arm64 HOST := aarch64-apple-darwin MINIMUM_REQUIRED := 11.0 diff --git a/macos/Dependencies/common.make b/macos/Dependencies/common.make index f4919ca..0f24d79 100644 --- a/macos/Dependencies/common.make +++ b/macos/Dependencies/common.make @@ -1,14 +1,13 @@ -SDKROOT := $(shell xcrun -sdk $(SDK) --show-sdk-path) -TARGETFLAGS := $(TARGETFLAGS) -m$(SDK)-version-min=$(MINIMUM_REQUIRED) -DEPLOYMENT_TARGET_ENV := $(shell ruby -e 'puts "$(SDK)".upcase')_DEPLOYMENT_TARGET=$(MINIMUM_REQUIRED) -BUILD_PREFIX := ${PWD}/build-$(SDK)-$(ARCH) +TARGETFLAGS := $(TARGETFLAGS) -mmacosx-version-min=$(MINIMUM_REQUIRED) +DEPLOYMENT_TARGET_ENV := MACOSX_DEPLOYMENT_TARGET=$(MINIMUM_REQUIRED) +BUILD_PREFIX := ${PWD}/build-macosx-$(ARCH) LIBDIR := $(BUILD_PREFIX)/lib INCLUDEDIR := $(BUILD_PREFIX)/include DOWNLOADS := ${PWD}/downloads/$(HOST) NPROC := $(shell sysctl -n hw.ncpu) CFLAGS := -I$(INCLUDEDIR) $(TARGETFLAGS) $(DEFINES) -O3 LDFLAGS := -L$(LIBDIR) -CC := xcrun -sdk $(SDK) clang -arch $(ARCH) -isysroot $(SDKROOT) +CC := clang -arch $(ARCH) PKG_CONFIG_LIBDIR := $(BUILD_PREFIX)/lib/pkgconfig GIT := git CLONE := $(GIT) clone -q @@ -34,7 +33,6 @@ CONFIGURE_ARGS := \ CMAKE_ARGS := \ -DCMAKE_INSTALL_PREFIX="$(BUILD_PREFIX)" \ -DCMAKE_PREFIX_PATH="$(BUILD_PREFIX)" \ - -DCMAKE_OSX_SYSROOT=$(SDKROOT) \ -DCMAKE_OSX_ARCHITECTURES=$(ARCH) \ -DCMAKE_OSX_DEPLOYMENT_TARGET=$(MINIMUM_REQUIRED) \ -DCMAKE_C_FLAGS="$(CFLAGS)" \ @@ -50,6 +48,7 @@ RUBY_CONFIGURE_ARGS := \ --with-out-ext=fiddle,gdbm,win32ole,win32 \ --with-static-linked-ext \ --disable-rubygems \ + --without-gmp \ --disable-install-doc \ --build=$(RBUILD) \ ${EXTRA_RUBY_CONFIG_ARGS} @@ -161,7 +160,7 @@ $(DOWNLOADS)/physfs/cmakebuild/Makefile: $(DOWNLOADS)/physfs/CMakeLists.txt $(CMAKE) -DPHYSFS_BUILD_STATIC=true -DPHYSFS_BUILD_SHARED=false $(DOWNLOADS)/physfs/CMakeLists.txt: - $(CLONE) $(GITHUB)/mkxp-z/physfs $(DOWNLOADS)/physfs + $(CLONE) $(GITHUB)/mkxp-z/physfs -b release-3.2.0 $(DOWNLOADS)/physfs # libpng libpng: init_dirs $(LIBDIR)/libpng.a @@ -181,20 +180,17 @@ $(DOWNLOADS)/libpng/configure: # SDL2 sdl2: init_dirs $(LIBDIR)/libSDL2.a -$(LIBDIR)/libSDL2.a: $(DOWNLOADS)/sdl2/Makefile +$(LIBDIR)/libSDL2.a: $(DOWNLOADS)/sdl2/cmakebuild/Makefile + cd $(DOWNLOADS)/sdl2/cmakebuild; \ + make -j$(NPROC); make install + +$(DOWNLOADS)/sdl2/cmakebuild/Makefile: $(DOWNLOADS)/sdl2/CMakeLists.txt cd $(DOWNLOADS)/sdl2; \ - make -j$(NPROC); make install; + mkdir cmakebuild; cd cmakebuild; \ + $(CMAKE) -DBUILD_SHARED_LIBS=no -$(DOWNLOADS)/sdl2/Makefile: $(DOWNLOADS)/sdl2/configure - cd $(DOWNLOADS)/sdl2; \ - $(CONFIGURE) --enable-static=true --enable-shared=false \ - --enable-video-x11=false $(SDL_FLAGS) - -$(DOWNLOADS)/sdl2/configure: $(DOWNLOADS)/sdl2/autogen.sh - cd $(DOWNLOADS)/sdl2; ./autogen.sh - -$(DOWNLOADS)/sdl2/autogen.sh: - $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z; cd $(DOWNLOADS)/sdl2 +$(DOWNLOADS)/sdl2/CMakeLists.txt: + $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z-2.26 # SDL_image sdl2image: init_dirs sdl2 $(LIBDIR)/libSDL2_image.a @@ -311,7 +307,10 @@ $(LIBDIR)/libruby.3.1.dylib: $(DOWNLOADS)/ruby/Makefile $(DOWNLOADS)/ruby/Makefile: $(DOWNLOADS)/ruby/configure cd $(DOWNLOADS)/ruby; \ - $(CONFIGURE) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS) + export $(CONFIGURE_ENV); \ + export CFLAGS="-flto=full -DRUBY_FUNCTION_NAME_STRING=__func__ $$CFLAGS"; \ + export LDFLAGS="-flto=full $$LDFLAGS"; \ + ./configure $(CONFIGURE_ARGS) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS) $(DOWNLOADS)/ruby/configure: $(DOWNLOADS)/ruby/*.c cd $(DOWNLOADS)/ruby; autoreconf -i @@ -331,7 +330,7 @@ clean-downloads: -rm -rf downloads/$(HOST) clean-compiled: - -rm -rf build-$(SDK)-$(ARCH) + -rm -rf build-macosx-$(ARCH) deps-core: libtheora libvorbis pixman libpng physfs uchardet sdl2 sdl2image sdlsound sdl2ttf openal openssl everything: deps-core ruby diff --git a/macos/Dependencies/x86_64.make b/macos/Dependencies/x86_64.make index a8f1849..f871f24 100644 --- a/macos/Dependencies/x86_64.make +++ b/macos/Dependencies/x86_64.make @@ -1,4 +1,3 @@ -SDK := macosx ARCH := x86_64 HOST := $(ARCH)-apple-darwin MINIMUM_REQUIRED := 10.13 diff --git a/macos/mkxp-z.xcodeproj/project.pbxproj b/macos/mkxp-z.xcodeproj/project.pbxproj index d8053c7..26065b5 100644 --- a/macos/mkxp-z.xcodeproj/project.pbxproj +++ b/macos/mkxp-z.xcodeproj/project.pbxproj @@ -518,6 +518,12 @@ 96573E83279152DC002C3E77 /* TouchBar.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96573E80279152DC002C3E77 /* TouchBar.xcassets */; }; 96573E84279152DC002C3E77 /* TouchBar.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96573E80279152DC002C3E77 /* TouchBar.xcassets */; }; 96D8EDD128728DCE00A331EA /* gamecontrollerdb.txt in Resources */ = {isa = PBXBuildFile; fileRef = 96D8EDD028728DCA00A331EA /* gamecontrollerdb.txt */; }; + FE5204162A08E27D0070038A /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE5204152A08E27D0070038A /* CoreHaptics.framework */; }; + FE5204172A08E2880070038A /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE5204152A08E27D0070038A /* CoreHaptics.framework */; }; + FE5204182A08E28F0070038A /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE5204152A08E27D0070038A /* CoreHaptics.framework */; }; + FE5204192A08E2950070038A /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE5204152A08E27D0070038A /* CoreHaptics.framework */; }; + FE52041B2A08E58D0070038A /* lanczos3.frag in Resources */ = {isa = PBXBuildFile; fileRef = FE52041A2A08E58D0070038A /* lanczos3.frag */; }; + FE52041C2A08E62F0070038A /* lanczos3.frag in CopyFiles */ = {isa = PBXBuildFile; fileRef = FE52041A2A08E58D0070038A /* lanczos3.frag */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -733,6 +739,7 @@ 3B10ECE12568E83D00372D13 /* simpleColor.frag in CopyFiles */, 3B10ECE22568E83D00372D13 /* simpleColor.vert in CopyFiles */, 3B10ECE32568E83D00372D13 /* simpleMatrix.vert in CopyFiles */, + FE52041C2A08E62F0070038A /* lanczos3.frag in CopyFiles */, 3B10ECE42568E83D00372D13 /* sprite.frag in CopyFiles */, 3B10ECE52568E83D00372D13 /* sprite.vert in CopyFiles */, 3B10ECE62568E83D00372D13 /* tilemap.frag in CopyFiles */, @@ -981,7 +988,6 @@ 3B10EE1F2569348E00372D13 /* json5pp.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json5pp.hpp; sourceTree = ""; }; 3B1BC0DF266F7C0C00794D22 /* iniconfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = iniconfig.h; sourceTree = ""; }; 3B1BC0E0266F7C0C00794D22 /* iniconfig.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = iniconfig.cpp; sourceTree = ""; }; - 3B1BC0E6266F8E8700794D22 /* dependencies.make */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = dependencies.make; path = Dependencies/dependencies.make; sourceTree = ""; }; 3B1BC0EB266F924B00794D22 /* libuchardet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuchardet.a; path = "Dependencies/build-macosx-x86_64/lib/libuchardet.a"; sourceTree = ""; }; 3B1C230A25A144A10075EF5D /* libruby.3.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libruby.3.1.dylib; path = "Dependencies/build-macosx-x86_64/lib/libruby.3.1.dylib"; sourceTree = ""; }; 3B1C230D25A144BF0075EF5D /* libruby.3.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libruby.3.1.dylib; path = "Dependencies/build-macosx-universal/lib/libruby.3.1.dylib"; sourceTree = ""; }; @@ -1104,6 +1110,8 @@ 96573E7B27913B46002C3E77 /* TouchBar.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; name = TouchBar.h; path = views/TouchBar.h; sourceTree = ""; }; 96573E80279152DC002C3E77 /* TouchBar.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = TouchBar.xcassets; path = views/TouchBar.xcassets; sourceTree = ""; }; 96D8EDD028728DCA00A331EA /* gamecontrollerdb.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = gamecontrollerdb.txt; path = ../assets/gamecontrollerdb.txt; sourceTree = ""; }; + FE5204152A08E27D0070038A /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; }; + FE52041A2A08E58D0070038A /* lanczos3.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = lanczos3.frag; path = ../shader/lanczos3.frag; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1119,6 +1127,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + FE5204192A08E2950070038A /* CoreHaptics.framework in Frameworks */, 3B1C23C325A19C600075EF5D /* libSDL2_ttf.a in Frameworks */, 3B1C23C425A19C600075EF5D /* libvorbisenc.a in Frameworks */, 3B1C23C525A19C600075EF5D /* libssl.a in Frameworks */, @@ -1168,6 +1177,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + FE5204182A08E28F0070038A /* CoreHaptics.framework in Frameworks */, 3BBE880F2705AAFF00A574AE /* libSDL2_ttf.a in Frameworks */, 3BBE88102705AB0400A574AE /* libvorbisenc.a in Frameworks */, 3BBE88112705AB0900A574AE /* libssl.a in Frameworks */, @@ -1210,6 +1220,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + FE5204162A08E27D0070038A /* CoreHaptics.framework in Frameworks */, 96563585279A5ADA003D6A75 /* libtheora.a in Frameworks */, 3BC65E2C2584F4290063AFF1 /* libvorbisenc.a in Frameworks */, 3BC65E2D2584F4290063AFF1 /* libogg.a in Frameworks */, @@ -1253,6 +1264,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + FE5204172A08E2880070038A /* CoreHaptics.framework in Frameworks */, 3BE0810D256879FE0006849F /* libSDL2_ttf.a in Frameworks */, 3BE08119256879FE0006849F /* libvorbisenc.a in Frameworks */, 3B522DD6259BFF2D003301C4 /* libssl.a in Frameworks */, @@ -1297,10 +1309,10 @@ 3B10EC6C2568E5EA00372D13 /* Source */ = { isa = PBXGroup; children = ( + 3B10EDD52568E96A00372D13 /* binding */, 3B3F7D1325B19C5A00EA5F1C /* MacOS */, 3B10ED342568E95D00372D13 /* src */, 3B1C236625A19B780075EF5D /* steamshim */, - 3B10EDD52568E96A00372D13 /* binding */, ); name = Source; sourceTree = ""; @@ -1310,29 +1322,30 @@ children = ( 3B10EC942568E7B500372D13 /* bitmapBlit.frag */, 3B10EC9B2568E7B500372D13 /* blur.frag */, - 3B10EC912568E7B500372D13 /* blurH.vert */, - 3B10EC9A2568E7B500372D13 /* blurV.vert */, - 3B10ECA32568E7B600372D13 /* common.h */, 3B10EC8E2568E7B500372D13 /* flashMap.frag */, 3B10EC9F2568E7B500372D13 /* flatColor.frag */, 3B10ECA42568E7B600372D13 /* gray.frag */, 3B10EC932568E7B500372D13 /* hue.frag */, - 3B10ECA12568E7B600372D13 /* minimal.vert */, + FE52041A2A08E58D0070038A /* lanczos3.frag */, 3B10EC9C2568E7B500372D13 /* plane.frag */, 3B10EC992568E7B500372D13 /* simple.frag */, - 3B10EC9E2568E7B500372D13 /* simple.vert */, 3B10EC8F2568E7B500372D13 /* simpleAlpha.frag */, 3B10EC9D2568E7B500372D13 /* simpleAlphaUni.frag */, 3B10EC8D2568E7B400372D13 /* simpleColor.frag */, - 3B10ECA52568E7B600372D13 /* simpleColor.vert */, - 3B10EC902568E7B500372D13 /* simpleMatrix.vert */, 3B10EC972568E7B500372D13 /* sprite.frag */, - 3B10EC982568E7B500372D13 /* sprite.vert */, 3B10EC952568E7B500372D13 /* tilemap.frag */, - 3B10ECA02568E7B600372D13 /* tilemap.vert */, - 3B10EC962568E7B500372D13 /* tilemapvx.vert */, 3B10ECA22568E7B600372D13 /* trans.frag */, 3B10EC922568E7B500372D13 /* transSimple.frag */, + 3B10ECA32568E7B600372D13 /* common.h */, + 3B10EC912568E7B500372D13 /* blurH.vert */, + 3B10EC9A2568E7B500372D13 /* blurV.vert */, + 3B10ECA12568E7B600372D13 /* minimal.vert */, + 3B10EC9E2568E7B500372D13 /* simple.vert */, + 3B10ECA52568E7B600372D13 /* simpleColor.vert */, + 3B10EC902568E7B500372D13 /* simpleMatrix.vert */, + 3B10EC982568E7B500372D13 /* sprite.vert */, + 3B10ECA02568E7B600372D13 /* tilemap.vert */, + 3B10EC962568E7B500372D13 /* tilemapvx.vert */, ); name = Shaders; sourceTree = ""; @@ -1340,26 +1353,26 @@ 3B10ED342568E95D00372D13 /* src */ = { isa = PBXGroup; children = ( - 3B522DB1259BBFE9003301C4 /* net */, - 3B10ED362568E95D00372D13 /* crypto */, - 3B10ED392568E95D00372D13 /* util */, - 3B10ED442568E95D00372D13 /* input */, - 3B10ED4A2568E95D00372D13 /* etc */, - 3B10ED522568E95D00372D13 /* filesystem */, - 3B10ED582568E95D00372D13 /* system */, - 3B10ED5D2568E95D00372D13 /* audio */, - 3B10ED6F2568E95D00372D13 /* display */, - 9656358D279A5B74003D6A75 /* theoraplay */, - 3B10ED352568E95D00372D13 /* eventthread.cpp */, - 3B10ED492568E95D00372D13 /* eventthread.h */, - 3B10ED432568E95D00372D13 /* config.h */, 3B5A84052569B56F00BAF2E5 /* config.cpp */, - 3B10ED502568E95D00372D13 /* settingsmenu.h */, - 3B10ED512568E95D00372D13 /* sharedstate.cpp */, + 3B10ED352568E95D00372D13 /* eventthread.cpp */, 3B10ED562568E95D00372D13 /* main.cpp */, 3B10ED6E2568E95D00372D13 /* settingsmenu.cpp */, - 3B10EDA42568E95E00372D13 /* sharedstate.h */, + 3B10ED512568E95D00372D13 /* sharedstate.cpp */, 3B10EDA52568E95E00372D13 /* binding.h */, + 3B10ED432568E95D00372D13 /* config.h */, + 3B10ED492568E95D00372D13 /* eventthread.h */, + 3B10ED502568E95D00372D13 /* settingsmenu.h */, + 3B10EDA42568E95E00372D13 /* sharedstate.h */, + 3B10ED5D2568E95D00372D13 /* audio */, + 3B10ED362568E95D00372D13 /* crypto */, + 3B10ED6F2568E95D00372D13 /* display */, + 3B10ED4A2568E95D00372D13 /* etc */, + 3B10ED522568E95D00372D13 /* filesystem */, + 3B10ED442568E95D00372D13 /* input */, + 3B522DB1259BBFE9003301C4 /* net */, + 3B10ED582568E95D00372D13 /* system */, + 9656358D279A5B74003D6A75 /* theoraplay */, + 3B10ED392568E95D00372D13 /* util */, ); name = src; path = ../src; @@ -1368,8 +1381,8 @@ 3B10ED362568E95D00372D13 /* crypto */ = { isa = PBXGroup; children = ( - 3B10ED372568E95D00372D13 /* rgssad.h */, 3B10ED382568E95D00372D13 /* rgssad.cpp */, + 3B10ED372568E95D00372D13 /* rgssad.h */, ); path = crypto; sourceTree = ""; @@ -1378,20 +1391,20 @@ isa = PBXGroup; children = ( 3BFABF53267787940024C7DD /* sigslot */, + 3B1BC0E0266F7C0C00794D22 /* iniconfig.cpp */, + 3B10ED3C2568E95D00372D13 /* boost-hash.h */, + 3B10ED422568E95D00372D13 /* debugwriter.h */, + 3B10ED3E2568E95D00372D13 /* disposable.h */, + 3B609374268274CE0038E9D6 /* encoding.h */, + 3B10ED412568E95D00372D13 /* exception.h */, + 3B1BC0DF266F7C0C00794D22 /* iniconfig.h */, 3B10ED3A2568E95D00372D13 /* intrulist.h */, 3B10ED3B2568E95D00372D13 /* sdl-util.h */, - 3B10ED3C2568E95D00372D13 /* boost-hash.h */, - 3B10ED3D2568E95D00372D13 /* serializable.h */, - 3B10ED3E2568E95D00372D13 /* disposable.h */, 3B10ED3F2568E95D00372D13 /* serial-util.h */, + 3B10ED3D2568E95D00372D13 /* serializable.h */, 3B012198261544A0001E574A /* string-util.h */, 3B10ED402568E95D00372D13 /* util.h */, - 3B10ED412568E95D00372D13 /* exception.h */, - 3B10ED422568E95D00372D13 /* debugwriter.h */, 3B10EE1F2569348E00372D13 /* json5pp.hpp */, - 3B1BC0DF266F7C0C00794D22 /* iniconfig.h */, - 3B1BC0E0266F7C0C00794D22 /* iniconfig.cpp */, - 3B609374268274CE0038E9D6 /* encoding.h */, ); path = util; sourceTree = ""; @@ -1399,9 +1412,9 @@ 3B10ED442568E95D00372D13 /* input */ = { isa = PBXGroup; children = ( - 3B10ED452568E95D00372D13 /* input.h */, 3B10ED462568E95D00372D13 /* input.cpp */, 3B10ED472568E95D00372D13 /* keybindings.cpp */, + 3B10ED452568E95D00372D13 /* input.h */, 3B10ED482568E95D00372D13 /* keybindings.h */, ); path = input; @@ -1410,9 +1423,9 @@ 3B10ED4A2568E95D00372D13 /* etc */ = { isa = PBXGroup; children = ( - 3B10ED4B2568E95D00372D13 /* etc-internal.h */, - 3B10ED4C2568E95D00372D13 /* table.cpp */, 3B10ED4D2568E95D00372D13 /* etc.cpp */, + 3B10ED4C2568E95D00372D13 /* table.cpp */, + 3B10ED4B2568E95D00372D13 /* etc-internal.h */, 3B10ED4E2568E95D00372D13 /* etc.h */, 3B10ED4F2568E95D00372D13 /* table.h */, ); @@ -1422,12 +1435,12 @@ 3B10ED522568E95D00372D13 /* filesystem */ = { isa = PBXGroup; children = ( - 3B426F6A256B8AC0009EA00F /* ghc */, - 3B10ED532568E95D00372D13 /* filesystem.h */, 3B10ED542568E95D00372D13 /* filesystem.cpp */, - 3B5A840C2569BE7C00BAF2E5 /* filesystemImplApple.mm */, 3B5A84132569C28B00BAF2E5 /* filesystemImpl.cpp */, + 3B10ED532568E95D00372D13 /* filesystem.h */, 3B5A84142569C28B00BAF2E5 /* filesystemImpl.h */, + 3B5A840C2569BE7C00BAF2E5 /* filesystemImplApple.mm */, + 3B426F6A256B8AC0009EA00F /* ghc */, ); path = filesystem; sourceTree = ""; @@ -1435,9 +1448,9 @@ 3B10ED582568E95D00372D13 /* system */ = { isa = PBXGroup; children = ( + 3B5A845D256A465700BAF2E5 /* systemImpl.cpp */, 3B5A845C256A465700BAF2E5 /* system.h */, 3B5A8463256A46B200BAF2E5 /* systemImplApple.mm */, - 3B5A845D256A465700BAF2E5 /* systemImpl.cpp */, ); path = system; sourceTree = ""; @@ -1445,22 +1458,22 @@ 3B10ED5D2568E95D00372D13 /* audio */ = { isa = PBXGroup; children = ( - 3B10ED5E2568E95D00372D13 /* midisource.cpp */, 3B10ED5F2568E95D00372D13 /* alstream.cpp */, - 3B10ED602568E95D00372D13 /* fluid-fun.cpp */, - 3B10ED612568E95D00372D13 /* soundemitter.h */, - 3B10ED622568E95D00372D13 /* fluid-fun.h */, - 3B10ED632568E95D00372D13 /* sdlsoundsource.cpp */, 3B10ED642568E95D00372D13 /* audio.cpp */, - 3B10ED652568E95D00372D13 /* soundemitter.cpp */, 3B10ED662568E95D00372D13 /* audiostream.cpp */, + 3B10ED602568E95D00372D13 /* fluid-fun.cpp */, + 3B10ED5E2568E95D00372D13 /* midisource.cpp */, + 3B10ED632568E95D00372D13 /* sdlsoundsource.cpp */, + 3B10ED652568E95D00372D13 /* soundemitter.cpp */, + 3B10ED6A2568E95D00372D13 /* vorbissource.cpp */, + 3B10ED692568E95D00372D13 /* al-util.h */, + 3B10ED6B2568E95D00372D13 /* aldatasource.h */, + 3B10ED6D2568E95D00372D13 /* alstream.h */, 3B10ED672568E95D00372D13 /* audio.h */, 3B10ED682568E95D00372D13 /* audiostream.h */, - 3B10ED692568E95D00372D13 /* al-util.h */, - 3B10ED6A2568E95D00372D13 /* vorbissource.cpp */, - 3B10ED6B2568E95D00372D13 /* aldatasource.h */, + 3B10ED622568E95D00372D13 /* fluid-fun.h */, 3B10ED6C2568E95D00372D13 /* sharedmidistate.h */, - 3B10ED6D2568E95D00372D13 /* alstream.h */, + 3B10ED612568E95D00372D13 /* soundemitter.h */, ); path = audio; sourceTree = ""; @@ -1468,32 +1481,32 @@ 3B10ED6F2568E95D00372D13 /* display */ = { isa = PBXGroup; children = ( - 3BA6944D263DAB53004194EB /* libnsgif */, - 3B10ED7E2568E95D00372D13 /* gl */, - 3B10ED702568E95D00372D13 /* tilemap.h */, - 3B10ED712568E95D00372D13 /* tilemap-common.h */, - 3B10ED722568E95D00372D13 /* windowvx.cpp */, + 3B10EDA22568E95E00372D13 /* autotiles.cpp */, + 3B10ED9D2568E95E00372D13 /* autotilesvx.cpp */, 3B10ED732568E95D00372D13 /* bitmap.cpp */, - 3B10ED742568E95D00372D13 /* window.cpp */, - 3B10ED752568E95D00372D13 /* viewport.h */, - 3B10ED762568E95D00372D13 /* sprite.cpp */, 3B10ED772568E95D00372D13 /* font.cpp */, - 3B10ED782568E95D00372D13 /* window.h */, - 3B10ED792568E95D00372D13 /* windowvx.h */, - 3B10ED7A2568E95D00372D13 /* plane.h */, 3B10ED7B2568E95D00372D13 /* graphics.cpp */, - 3B10ED7C2568E95D00372D13 /* sprite.h */, + 3B10EDA12568E95E00372D13 /* plane.cpp */, + 3B10ED762568E95D00372D13 /* sprite.cpp */, + 3B10ED9C2568E95E00372D13 /* tilemap.cpp */, 3B10ED7D2568E95D00372D13 /* tilemapvx.cpp */, + 3B10ED9E2568E95E00372D13 /* viewport.cpp */, + 3B10ED742568E95D00372D13 /* window.cpp */, + 3B10ED722568E95D00372D13 /* windowvx.cpp */, + 3B10EDA02568E95E00372D13 /* bitmap.h */, + 3B10ED9F2568E95E00372D13 /* flashable.h */, 3B10ED9A2568E95E00372D13 /* font.h */, 3B10ED9B2568E95E00372D13 /* graphics.h */, - 3B10ED9C2568E95E00372D13 /* tilemap.cpp */, - 3B10ED9D2568E95E00372D13 /* autotilesvx.cpp */, - 3B10ED9E2568E95E00372D13 /* viewport.cpp */, - 3B10ED9F2568E95E00372D13 /* flashable.h */, - 3B10EDA02568E95E00372D13 /* bitmap.h */, - 3B10EDA12568E95E00372D13 /* plane.cpp */, - 3B10EDA22568E95E00372D13 /* autotiles.cpp */, + 3B10ED7A2568E95D00372D13 /* plane.h */, + 3B10ED7C2568E95D00372D13 /* sprite.h */, + 3B10ED712568E95D00372D13 /* tilemap-common.h */, + 3B10ED702568E95D00372D13 /* tilemap.h */, 3B10EDA32568E95E00372D13 /* tilemapvx.h */, + 3B10ED752568E95D00372D13 /* viewport.h */, + 3B10ED782568E95D00372D13 /* window.h */, + 3B10ED792568E95D00372D13 /* windowvx.h */, + 3B10ED7E2568E95D00372D13 /* gl */, + 3BA6944D263DAB53004194EB /* libnsgif */, ); path = display; sourceTree = ""; @@ -1535,52 +1548,44 @@ 3B10EDD52568E96A00372D13 /* binding */ = { isa = PBXGroup; children = ( - 3B10EDD62568E96A00372D13 /* window-binding.cpp */, - 3B10EDD72568E96A00372D13 /* filesystem-binding.cpp */, - 3B10EDD82568E96A00372D13 /* viewportelement-binding.h */, - 3B10EDD92568E96A00372D13 /* cusl-binding.cpp */, 3B10EDDA2568E96A00372D13 /* audio-binding.cpp */, - 3B10EDDB2568E96A00372D13 /* serializable-binding.h */, - 3B10EDDC2568E96A00372D13 /* input-binding.cpp */, - 3B10EDDD2568E96A00372D13 /* windowvx-binding.cpp */, - 3B10EDDE2568E96A00372D13 /* disposable-binding.h */, - 3B10EDDF2568E96A00372D13 /* sprite-binding.cpp */, - 3B10EDE02568E96A00372D13 /* sceneelement-binding.h */, - 3B10EDE12568E96A00372D13 /* tilemapvx-binding.cpp */, - 3B10EDE22568E96A00372D13 /* module_rpg2.rb.xxd */, + 3B10EDF02568E96A00372D13 /* binding-mri.cpp */, + 3B10EDEF2568E96A00372D13 /* binding-util.cpp */, 3B10EDE42568E96A00372D13 /* bitmap-binding.cpp */, - 3B10EDE52568E96A00372D13 /* table-binding.cpp */, + 3B10EDD92568E96A00372D13 /* cusl-binding.cpp */, 3B10EDE62568E96A00372D13 /* etc-binding.cpp */, - 3B10EDE72568E96A00372D13 /* tilemap-binding.cpp */, + 3B10EDD72568E96A00372D13 /* filesystem-binding.cpp */, + 3B10EDEC2568E96A00372D13 /* font-binding.cpp */, + 3B10EDE92568E96A00372D13 /* graphics-binding.cpp */, + 3B522DDB259C1E53003301C4 /* http-binding.cpp */, + 3B10EDDC2568E96A00372D13 /* input-binding.cpp */, 3B10EDE82568E96A00372D13 /* miniffi-binding.cpp */, 3B312842259E7DC1002EAB43 /* miniffi.cpp */, - 3B312841259E7DC1002EAB43 /* miniffi.h */, - 3B10EDE92568E96A00372D13 /* graphics-binding.cpp */, - 3B10EDEA2568E96A00372D13 /* plane-binding.cpp */, - 3B10EDEB2568E96A00372D13 /* binding-types.h */, - 3B10EDEC2568E96A00372D13 /* font-binding.cpp */, - 3B10EDED2568E96A00372D13 /* module_rpg1.rb.xxd */, - 3B10EDEE2568E96A00372D13 /* binding-util.h */, - 3B10EDEF2568E96A00372D13 /* binding-util.cpp */, - 3B10EDF02568E96A00372D13 /* binding-mri.cpp */, - 3B10EDF12568E96A00372D13 /* flashable-binding.h */, - 3B10EDF22568E96A00372D13 /* module_rpg3.rb.xxd */, 3B10EDF32568E96A00372D13 /* module_rpg.cpp */, + 3B10EDEA2568E96A00372D13 /* plane-binding.cpp */, + 3B10EDDF2568E96A00372D13 /* sprite-binding.cpp */, + 3B10EDE52568E96A00372D13 /* table-binding.cpp */, + 3B10EDE72568E96A00372D13 /* tilemap-binding.cpp */, + 3B10EDE12568E96A00372D13 /* tilemapvx-binding.cpp */, 3B10EDF42568E96A00372D13 /* viewport-binding.cpp */, - 3B522DDB259C1E53003301C4 /* http-binding.cpp */, + 3B10EDD62568E96A00372D13 /* window-binding.cpp */, + 3B10EDDD2568E96A00372D13 /* windowvx-binding.cpp */, + 3B10EDEB2568E96A00372D13 /* binding-types.h */, + 3B10EDEE2568E96A00372D13 /* binding-util.h */, + 3B10EDDE2568E96A00372D13 /* disposable-binding.h */, + 3B10EDF12568E96A00372D13 /* flashable-binding.h */, + 3B312841259E7DC1002EAB43 /* miniffi.h */, + 3B10EDE02568E96A00372D13 /* sceneelement-binding.h */, + 3B10EDDB2568E96A00372D13 /* serializable-binding.h */, + 3B10EDD82568E96A00372D13 /* viewportelement-binding.h */, + 3B10EDED2568E96A00372D13 /* module_rpg1.rb.xxd */, + 3B10EDE22568E96A00372D13 /* module_rpg2.rb.xxd */, + 3B10EDF22568E96A00372D13 /* module_rpg3.rb.xxd */, ); name = binding; path = ../binding; sourceTree = ""; }; - 3B1BC0E5266F8E2A00794D22 /* Makefiles */ = { - isa = PBXGroup; - children = ( - 3B1BC0E6266F8E8700794D22 /* dependencies.make */, - ); - name = Makefiles; - sourceTree = ""; - }; 3B1C231D25A15F8F0075EF5D /* mkxp */ = { isa = PBXGroup; children = ( @@ -1595,10 +1600,10 @@ isa = PBXGroup; children = ( 3B1C236925A19B960075EF5D /* steamshim_child.c */, - 3B1C236825A19B960075EF5D /* steamshim_child.h */, 3B1C236725A19B960075EF5D /* steamshim_parent.cpp */, - 3B1C23FC25A19FB40075EF5D /* steamshim_mac_helpers.mm */, + 3B1C236825A19B960075EF5D /* steamshim_child.h */, 3B1C240025A19FD60075EF5D /* steamshim_mac_helpers.h */, + 3B1C23FC25A19FB40075EF5D /* steamshim_mac_helpers.mm */, ); name = steamshim; sourceTree = ""; @@ -1631,12 +1636,12 @@ 3B3F7D1325B19C5A00EA5F1C /* MacOS */ = { isa = PBXGroup; children = ( - 3B3F7D1725B19DEC00EA5F1C /* settingsmenu.xib */, - 3B3F7D2925B1A73A00EA5F1C /* SettingsMenuController.mm */, - 3B3F7D3025B1A79F00EA5F1C /* SettingsMenuController.h */, 3B480E9325DCBDD6001686B4 /* sdl_codes.h */, - 96573E7A27913B46002C3E77 /* TouchBar.mm */, + 3B3F7D1725B19DEC00EA5F1C /* settingsmenu.xib */, + 3B3F7D3025B1A79F00EA5F1C /* SettingsMenuController.h */, + 3B3F7D2925B1A73A00EA5F1C /* SettingsMenuController.mm */, 96573E7B27913B46002C3E77 /* TouchBar.h */, + 96573E7A27913B46002C3E77 /* TouchBar.mm */, 96573E80279152DC002C3E77 /* TouchBar.xcassets */, ); name = MacOS; @@ -1658,11 +1663,11 @@ 3B522DB1259BBFE9003301C4 /* net */ = { isa = PBXGroup; children = ( - 3B522DBD259BD046003301C4 /* httplib.h */, - 3B522DB2259BC037003301C4 /* net.h */, - 3B522DBF259BD072003301C4 /* net.cpp */, - 3B522DE3259C2017003301C4 /* LUrlParser.h */, 3B522DE4259C2039003301C4 /* LUrlParser.cpp */, + 3B522DBF259BD072003301C4 /* net.cpp */, + 3B522DBD259BD046003301C4 /* httplib.h */, + 3B522DE3259C2017003301C4 /* LUrlParser.h */, + 3B522DB2259BC037003301C4 /* net.h */, ); path = net; sourceTree = ""; @@ -1772,7 +1777,6 @@ isa = PBXGroup; children = ( 3B251DA226DA2C8600E5D09B /* Ruby Standard Library */, - 3B1BC0E5266F8E2A00794D22 /* Makefiles */, 3BD2B7272565B343003DAD8A /* README.md */, 3BDB23E22564546E00C4A63D /* icon.icns */, 3BDB2409256470AE00C4A63D /* Player */, @@ -1811,6 +1815,7 @@ 3BDB23E5256455A400C4A63D /* Frameworks */ = { isa = PBXGroup; children = ( + FE5204152A08E27D0070038A /* CoreHaptics.framework */, 3B1C241F25A1A84D0075EF5D /* Steam */, 3BC65D792584F3030063AFF1 /* Universal */, 3BE080CA256829FE0006849F /* Intel */, @@ -1858,9 +1863,9 @@ 9656358D279A5B74003D6A75 /* theoraplay */ = { isa = PBXGroup; children = ( + 96563592279A5B74003D6A75 /* theoraplay.c */, 9656358E279A5B74003D6A75 /* theoraplay_cvtrgb.h */, 9656358F279A5B74003D6A75 /* theoraplay.h */, - 96563592279A5B74003D6A75 /* theoraplay.c */, ); path = theoraplay; sourceTree = ""; @@ -2052,6 +2057,7 @@ files = ( 3B10EC862568E78500372D13 /* icon.png in Resources */, 96D8EDD128728DCE00A331EA /* gamecontrollerdb.txt in Resources */, + FE52041B2A08E58D0070038A /* lanczos3.frag in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2632,7 +2638,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -2660,7 +2666,7 @@ "$(PROJECT_DIR)/Dependencies/Frameworks/ANGLE", "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MKXPZ_EXECUTABLE_NAME = shim; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -2707,7 +2713,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -2733,7 +2739,7 @@ "$(PROJECT_DIR)/Dependencies/Frameworks/ANGLE", "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MKXPZ_EXECUTABLE_NAME = shim; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -2915,7 +2921,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -2957,7 +2963,7 @@ "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", "$(PROJECT_DIR)/Dependencies/build-macosx-universal/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MKXPZ_EXECUTABLE_NAME = shim; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -3004,7 +3010,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -3044,7 +3050,7 @@ "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", "$(PROJECT_DIR)/Dependencies/build-macosx-universal/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MKXPZ_EXECUTABLE_NAME = shim; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -3092,7 +3098,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -3130,7 +3136,7 @@ "$(PROJECT_DIR)/Dependencies/build-macosx-universal/lib", "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_LDFLAGS = ""; @@ -3175,7 +3181,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -3211,7 +3217,7 @@ "$(PROJECT_DIR)/Dependencies/build-macosx-universal/lib", "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; OTHER_LDFLAGS = ""; @@ -3256,7 +3262,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -3280,7 +3286,7 @@ "$(PROJECT_DIR)/Dependencies/Frameworks/ANGLE", "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_LDFLAGS = ""; @@ -3325,7 +3331,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.4.1; + CURRENT_PROJECT_VERSION = 2.4.2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_HARDENED_RUNTIME = NO; @@ -3347,7 +3353,7 @@ "$(PROJECT_DIR)/Dependencies/Frameworks/ANGLE", "$(PROJECT_DIR)/Dependencies/build-macosx-x86_64/lib", ); - MARKETING_VERSION = 2.4.1; + MARKETING_VERSION = 2.4.2; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; OTHER_LDFLAGS = ""; @@ -3489,7 +3495,10 @@ ); MACOSX_DEPLOYMENT_TARGET = 10.13; ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = "-fdeclspec"; + OTHER_CFLAGS = ( + "-fdeclspec", + "-O3", + ); PRODUCT_BUNDLE_IDENTIFIER = "org.zoro.mkxp-z"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; diff --git a/meson.build b/meson.build index 8966db9..1155bb3 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('mkxp-z', 'c', 'cpp', version: '2.4.1', meson_version: '>=0.56.0', default_options: ['cpp_std=c++14', 'buildtype=release']) +project('mkxp-z', 'c', 'cpp', version: '2.4.2', meson_version: '>=0.56.0', default_options: ['cpp_std=c++14', 'buildtype=release']) host_system = host_machine.system() diff --git a/mkxp.json b/mkxp.json index 85d1efc..c6b470b 100644 --- a/mkxp.json +++ b/mkxp.json @@ -73,6 +73,13 @@ // "smoothScaling": false, + // Apply Lanczos3 interpolation when game screen + // is upscaled (typically higher quality than linear) + // (default: disabled) + // + // "lanczos3Scaling": false, + + // Sync screen redraws to the monitor refresh rate // (default: disabled) // diff --git a/shader/common.h b/shader/common.h index a34ef54..16704c4 100644 --- a/shader/common.h +++ b/shader/common.h @@ -1,9 +1,6 @@ #ifdef GLSLES -#ifdef FRAGMENT_SHADER -/* Only the fragment shader has no default float precision */ precision mediump float; -#endif #else diff --git a/shader/lanczos3.frag b/shader/lanczos3.frag new file mode 100644 index 0000000..2f84ae8 --- /dev/null +++ b/shader/lanczos3.frag @@ -0,0 +1,48 @@ +// From https://raw.githubusercontent.com/Sentmoraap/doing-sdl-right/93a52a0db0ff2da5066cce12f5b9a2ac62e6f401/assets/lanczos3.frag +// Copyright 2020 Lilian Gimenez (Sentmoraap). +// MIT license. + +uniform sampler2D texture; +uniform vec2 sourceSize; +uniform vec2 texSizeInv; +varying vec2 v_texCoord; + +float lanczos3(float x) +{ + x = max(abs(x), 0.00001); + float val = x * 3.141592654; + return sin(val) * sin(val / 3.0) / (val * val); +} + +void main() +{ + vec2 pixel = v_texCoord * sourceSize + 0.5; + vec2 frac = fract(pixel); + vec2 onePixel = texSizeInv; + pixel = floor(pixel) * texSizeInv - onePixel / 2.0; + + float lanczosX[6]; + float sum = 0.0; + for(int x = 0; x < 6; x++) + { + lanczosX[x] = lanczos3(float(x) - 2.0 - frac.x); + sum += lanczosX[x]; + } + for(int x = 0; x < 6; x++) lanczosX[x] /= sum; + sum = 0.0; + float lanczosY[6]; + for(int y = 0; y < 6; y++) + { + lanczosY[y] = lanczos3(float(y) - 2.0 - frac.y); + sum += lanczosY[y]; + } + for(int y = 0; y < 6; y++) lanczosY[y] /= sum; + gl_FragColor = vec4(0); + for(int y = -2; y <= 3; y++) + { + vec4 colour = vec4(0); + for(int x = -2; x <= 3; x++) + colour += texture2D(texture, pixel + vec2(float(x) * onePixel.x, float(y) * onePixel.y)).rgba * lanczosX[x + 2]; + gl_FragColor += colour * lanczosY[y + 2]; + } +} diff --git a/shader/meson.build b/shader/meson.build index 1290460..4b5e249 100644 --- a/shader/meson.build +++ b/shader/meson.build @@ -15,6 +15,7 @@ embedded_shaders = [ 'simpleAlphaUni.frag', 'tilemap.frag', 'flashMap.frag', + 'lanczos3.frag', 'minimal.vert', 'simple.vert', 'simpleColor.vert', diff --git a/src/config.cpp b/src/config.cpp index befb9ba..79fc426 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -134,6 +134,7 @@ void Config::read(int argc, char *argv[]) { {"fullscreen", false}, {"fixedAspectRatio", true}, {"smoothScaling", false}, + {"lanczos3Scaling", false}, {"vsync", false}, {"defScreenW", 0}, {"defScreenH", 0}, @@ -257,6 +258,7 @@ try { exp } catch (...) {} SET_OPT(fullscreen, boolean); SET_OPT(fixedAspectRatio, boolean); SET_OPT(smoothScaling, boolean); + SET_OPT(lanczos3Scaling, boolean); SET_OPT(winResizable, boolean); SET_OPT(vsync, boolean); SET_STRINGOPT(windowTitle, windowTitle); diff --git a/src/config.h b/src/config.h index a98d6bf..3f8c9e9 100644 --- a/src/config.h +++ b/src/config.h @@ -43,6 +43,7 @@ struct Config { bool fullscreen; bool fixedAspectRatio; bool smoothScaling; + bool lanczos3Scaling; bool vsync; int defScreenW; diff --git a/src/display/gl/gl-meta.cpp b/src/display/gl/gl-meta.cpp index 8733449..ad491f4 100644 --- a/src/display/gl/gl-meta.cpp +++ b/src/display/gl/gl-meta.cpp @@ -24,6 +24,7 @@ #include "sharedstate.h" #include "glstate.h" #include "quad.h" +#include "config.h" namespace GLMeta { @@ -144,10 +145,22 @@ static void _blitBegin(FBO::ID fbo, const Vec2i &size) FBO::bind(fbo); glState.viewport.pushSet(IntRect(0, 0, size.x, size.y)); - SimpleShader &shader = shState->shaders().simple; - shader.bind(); - shader.applyViewportProj(); - shader.setTranslation(Vec2i()); + if (shState->config().lanczos3Scaling) + { + Lanczos3Shader &shader = shState->shaders().lanczos3; + shader.bind(); + shader.applyViewportProj(); + shader.setTranslation(Vec2i()); + shader.setTexSize(Vec2i(size.x, size.y)); + } + else + { + SimpleShader &shader = shState->shaders().simple; + shader.bind(); + shader.applyViewportProj(); + shader.setTranslation(Vec2i()); + shader.setTexSize(Vec2i(size.x, size.y)); + } } } @@ -169,8 +182,18 @@ void blitSource(TEXFBO &source) } else { - SimpleShader &shader = shState->shaders().simple; - shader.setTexSize(Vec2i(source.width, source.height)); + if (shState->config().lanczos3Scaling) + { + Lanczos3Shader &shader = shState->shaders().lanczos3; + shader.bind(); + shader.setTexSize(Vec2i(source.width, source.height)); + } + else + { + SimpleShader &shader = shState->shaders().simple; + shader.bind(); + shader.setTexSize(Vec2i(source.width, source.height)); + } TEX::bind(source.tex); } } diff --git a/src/display/gl/shader.cpp b/src/display/gl/shader.cpp index 0a0642c..d905a5b 100644 --- a/src/display/gl/shader.cpp +++ b/src/display/gl/shader.cpp @@ -44,6 +44,7 @@ #include "simpleAlphaUni.frag.xxd" #include "tilemap.frag.xxd" #include "flashMap.frag.xxd" +#include "lanczos3.frag.xxd" #include "minimal.vert.xxd" #include "simple.vert.xxd" #include "simpleColor.vert.xxd" @@ -746,3 +747,19 @@ void BltShader::setOpacity(float value) { gl.Uniform1f(u_opacity, value); } + +Lanczos3Shader::Lanczos3Shader() +{ + INIT_SHADER(simple, lanczos3, Lanczos3Shader); + + ShaderBase::init(); + + GET_U(texOffsetX); + GET_U(sourceSize); +} + +void Lanczos3Shader::setTexSize(const Vec2i &value) +{ + ShaderBase::setTexSize(value); + gl.Uniform2f(u_sourceSize, (float)value.x, (float)value.y); +} diff --git a/src/display/gl/shader.h b/src/display/gl/shader.h index 6024d21..b7a2881 100644 --- a/src/display/gl/shader.h +++ b/src/display/gl/shader.h @@ -113,7 +113,7 @@ public: void setTexOffsetX(int value); -private: +protected: GLint u_texOffsetX; }; @@ -326,6 +326,17 @@ private: GLint u_source, u_destination, u_subRect, u_opacity; }; +class Lanczos3Shader : public SimpleShader +{ +public: + Lanczos3Shader(); + + void setTexSize(const Vec2i &value); + +protected: + GLint u_sourceSize; +}; + /* Global object containing all available shaders */ struct ShaderSet { @@ -347,6 +358,7 @@ struct ShaderSet SimpleMatrixShader simpleMatrix; BlurShader blur; TilemapVXShader tilemapVX; + Lanczos3Shader lanczos3; }; #endif // SHADER_H diff --git a/src/filesystem/filesystem.cpp b/src/filesystem/filesystem.cpp index 7e707eb..10f8d5b 100644 --- a/src/filesystem/filesystem.cpp +++ b/src/filesystem/filesystem.cpp @@ -282,7 +282,14 @@ struct FileSystemPrivate { static void throwPhysfsError(const char *desc) { PHYSFS_ErrorCode ec = PHYSFS_getLastErrorCode(); - const char *englishStr = PHYSFS_getErrorByCode(ec); + const char *englishStr; + if (ec == 0) { + // Sometimes on Windows PHYSFS_init can return null + // but the error code never changes + englishStr = "unknown error"; + } else { + englishStr = PHYSFS_getErrorByCode(ec); + } throw Exception(Exception::PHYSFSError, "%s: %s", desc, englishStr); } diff --git a/src/main.cpp b/src/main.cpp index d7f5104..4779221 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -395,7 +395,7 @@ int main(int argc, char *argv[]) { ALCdevice *alcDev = alcOpenDevice(0); if (!alcDev) { - showInitError("Error opening OpenAL device"); + showInitError("Could not detect an available audio device."); SDL_DestroyWindow(win); TTF_Quit(); IMG_Quit(); @@ -517,7 +517,7 @@ static SDL_GLContext initGL(SDL_Window *win, Config &conf, glCtx = SDL_GL_CreateContext(win); if (!glCtx) { - GLINIT_SHOWERROR(std::string("Error creating context: ") + SDL_GetError()); + GLINIT_SHOWERROR(std::string("Could not create OpenGL context: ") + SDL_GetError()); return 0; } diff --git a/windows/Makefile b/windows/Makefile index a201c11..4c4b4eb 100755 --- a/windows/Makefile +++ b/windows/Makefile @@ -10,6 +10,7 @@ RUBY_FLAGS := ${RUBY_FLAGS} BUILD_PREFIX := ${PWD}/build-$(ARCH) LIBDIR := $(BUILD_PREFIX)/lib +BINDIR := $(BUILD_PREFIX)/bin INCLUDEDIR := $(BUILD_PREFIX)/include DOWNLOADS := ${PWD}/downloads/$(ARCH) NPROC := $(shell nproc) @@ -133,7 +134,7 @@ $(DOWNLOADS)/physfs/cmakebuild/Makefile: $(DOWNLOADS)/physfs/CMakeLists.txt $(CMAKE) -DPHYSFS_BUILD_STATIC=true -DPHYSFS_BUILD_SHARED=false $(DOWNLOADS)/physfs/CMakeLists.txt: - $(CLONE) $(GITHUB)/mkxp-z/physfs $(DOWNLOADS)/physfs + $(CLONE) $(GITHUB)/mkxp-z/physfs -b release-3.2.0 $(DOWNLOADS)/physfs # libpng libpng: init_dirs $(LIBDIR)/libpng.a @@ -182,19 +183,17 @@ $(DOWNLOADS)/uchardet/CMakeLists.txt: # SDL2 sdl2: init_dirs $(LIBDIR)/libSDL2.a -$(LIBDIR)/libSDL2.a: $(DOWNLOADS)/sdl2/Makefile +$(LIBDIR)/libSDL2.a: $(DOWNLOADS)/sdl2/cmakebuild/Makefile + cd $(DOWNLOADS)/sdl2/cmakebuild; \ + make -j$(NPROC); make install + +$(DOWNLOADS)/sdl2/cmakebuild/Makefile: $(DOWNLOADS)/sdl2/CMakeLists.txt cd $(DOWNLOADS)/sdl2; \ - make -j$(NPROC); make install; + mkdir cmakebuild; cd cmakebuild; \ + $(CMAKE) -DBUILD_SHARED_LIBS=no -$(DOWNLOADS)/sdl2/Makefile: $(DOWNLOADS)/sdl2/configure - cd $(DOWNLOADS)/sdl2; \ - $(CONFIGURE) --enable-static=true --enable-shared=false $(SDL_FLAGS) - -$(DOWNLOADS)/sdl2/configure: $(DOWNLOADS)/sdl2/autogen.sh - cd $(DOWNLOADS)/sdl2; ./autogen.sh - -$(DOWNLOADS)/sdl2/autogen.sh: - $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z; cd $(DOWNLOADS)/sdl2 +$(DOWNLOADS)/sdl2/CMakeLists.txt: + $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z-2.26 # SDL2 (Image) sdl2image: init_dirs sdl2 libpng libjpeg $(LIBDIR)/libSDL2_image.a @@ -312,15 +311,18 @@ $(DOWNLOADS)/openssl/Configure: $(CLONE) $(GITHUB)/openssl/openssl $(DOWNLOADS)/openssl --single-branch --branch OpenSSL_1_1_1i --depth 1 # Standard ruby -ruby: init_dirs openssl $(BUILD_PREFIX)/$(RB_PREFIX)-ruby310.dll +ruby: init_dirs openssl $(BINDIR)/$(RB_PREFIX)-ruby310.dll -$(BUILD_PREFIX)/$(RB_PREFIX)-ruby310.dll: $(DOWNLOADS)/ruby/Makefile +$(BINDIR)/$(RB_PREFIX)-ruby310.dll: $(DOWNLOADS)/ruby/Makefile cd $(DOWNLOADS)/ruby; \ make -j$(NPROC); make install $(DOWNLOADS)/ruby/Makefile: $(DOWNLOADS)/ruby/configure cd $(DOWNLOADS)/ruby; \ - $(CONFIGURE) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS) + export $(CONFIGURE_ENV); \ + export CFLAGS="-flto $$CFLAGS"; \ + export LDFLAGS="-flto $$LDFLAGS"; \ + ./configure $(CONFIGURE_ARGS) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS) $(DOWNLOADS)/ruby/configure: $(DOWNLOADS)/ruby/*.c cd $(DOWNLOADS)/ruby; autoreconf -i diff --git a/windows/resource.rc b/windows/resource.rc index 5ae9c94..2a21aeb 100644 --- a/windows/resource.rc +++ b/windows/resource.rc @@ -6,17 +6,17 @@ IDI_APPICON ICON "icon.ico" IDI_MANIFEST RT_MANIFEST "mkxpz.manifest" VS_VERSION_INFO VERSIONINFO -FILEVERSION 2,4,1,0 -PRODUCTVERSION 2,4,1,0 +FILEVERSION 2,4,2,0 +PRODUCTVERSION 2,4,2,0 { BLOCK "StringFileInfo" { BLOCK "040904b0" { -VALUE "FileVersion", "2.4.1\0" +VALUE "FileVersion", "2.4.2\0" VALUE "OriginalFilename", "mkxp-z.exe\0" VALUE "ProductName", "mkxp-z\0" -VALUE "ProductVersion", "2.4.1\0" +VALUE "ProductVersion", "2.4.2\0" } } BLOCK "VarFileInfo"