28 Commits
Author SHA1 Message Date
Waterdish f64cf9d56d 1.0.1 Update app values 2024-06-02 15:34:41 -07:00
Waterdish 43ebcd0305 Update to 2S2H 1.0.1 2024-06-02 15:18:22 -07:00
WaterdishandGitHub 07ac8c2a1b Update README.md 2024-06-02 14:36:26 -07:00
Garrett CoxandGitHub 3a86bdf2dc Version bump Rika Bravo (#626) 2024-05-31 19:51:23 -05:00
Garrett CoxandGitHub 78f0525ec0 Bump LUS (#625) 2024-05-31 19:50:36 -05:00
inspectredcandGitHub a3add6092b Fix Dpad Ocarina L Btn & GI Dpad Stuff (#578) 2024-05-31 19:21:57 -05:00
Jacob ErlyandGitHub a39a9a58e9 Adds sanity checks for bottle duping over items and prevents the issue causing Big Goron to not give the player the Keg License. (#605)
* Update Infinite.cpp

Adds sanity checks for bottle duping and prevents the issue causing Big Goron to not give the player the Keg License.

* Update Infinite.cpp

Formatting.

* Update Infinite.cpp

* Update Infinite.cpp

More formatting trying to work around this Clang stuff while working from Github.
2024-05-31 18:13:42 -04:00
ArchezandGitHub 7bf60f6771 fix hud editor position bugs (#622) 2024-05-31 17:39:26 -04:00
MalkierianandGitHub 63c293f78a Implement Alt Assets Variable LUS (#619)
* Bump LUS to `94b755b77c0c0f566686c9d23fa4c15e23473a0c`.
Remove `CVAR_ALT_ASSETS` from LUS cvars cmake.
Change all pertinent `CVarGetInteger` calls for `CVAR_ALT_ASSETS` to `ResourceManager::IsAltAssetsEnabled`.
Implement frame-end toggle of `mAltAssetsEnabled`.

* Remove `ShouldClearTextureCacheAtEndOfFrame`.
Move prevAltAssets check to end of `Gfx_ProcessGfxCommands`.

* Missed initial `mAltAssetsEnabled` set.
2024-05-31 17:26:04 -04:00
Garrett CoxandGitHub 57d4e62ed0 Fix issue where skipping clock tower cutscene would not return you correctly (#618) 2024-05-30 23:21:18 -05:00
Reinhardt R. GamingandGitHub 877d7f732b Display a MSAA value of 1x as "Off" (#597)
* Change terminology for MSAA setting + tooltip

* Update BenMenuBar.cpp
2024-05-30 22:46:41 -05:00
inspectredcandGitHub 47e98e8ee9 Fix GC Warning Labels (#529) 2024-05-30 22:46:07 -05:00
briaguyaandGitHub 65870f3c07 update to latest lus main (#614)
* update to latest lus main

* upstream otrexporter and zapdtr submodules

* upstream LUS submodule
2024-05-30 23:30:05 -04:00
Garrett CoxandGitHub 464c55fcbb Tweaks to autosaves and pause saves to always persist them, along with preventing saves when it's too early or late in the game (#616) 2024-05-30 23:20:29 -04:00
Garrett CoxandGitHub 8ac7dc6b7d Fix play as kafei by swapping out resources later (#617) 2024-05-30 23:10:45 -04:00
briaguyaandGitHub f32bccc5b9 ci(linux): install libzip without crypto, bump sdl from 2.28.5 -> 2.30.3 (#588)
* ci(linux): install libzip without crypto, bump sdl from 2.28.5 -> 2.30.3

* just install libzip with apt for otr gen

* copy the .so to a place linuxdeploy looks for it

* but do it in the right place
2024-05-30 22:21:24 -04:00
ArchezandGitHub c7aafb65fd Fix o2r file copy (#592)
* fix o2r file copy script

* move script to cmake folder
2024-05-30 22:12:14 -04:00
ArchezandGitHub 6ff53d4827 fix taking transformation mask off setting unexpected flags (#612) 2024-05-30 22:03:29 -04:00
ArchezandGitHub 73c468d5cf Fix Skybox star colors (#608)
* Fix Skybox star colors

* switch to Color_RGBA8 solution
2024-05-30 21:56:08 -04:00
Garrett CoxandGitHub 74afca9bf7 Remove path sanitize for file drops (#611) 2024-05-30 15:01:55 -05:00
AltoXorgandGitHub 3590cfa118 Append appShortName in savesFolderPath for non-portable builds (#593) 2024-05-29 23:42:17 -04:00
ArchezandGitHub c2e1c56413 Fix crash with Deku King during credits (#601) 2024-05-29 17:01:52 +01:00
MalkierianandGitHub e2fb954d99 Disabled checkbox fix (#498)
* Prevent style change and toggle when disabled.

* Fix performance issues for disabled elements being drawn.

* Move `BeginDisabled` to after visible window check to avoid potential mismatch issues.
2024-05-29 12:33:55 +01:00
inspectredcandGitHub 63def6f8df Display GC Version String On Title (#579)
* Display GC Version String On Title

* remove uncompressed case
2024-05-28 23:50:03 -05:00
inspectredcandGitHub eb208233e2 Fix Free Look On Woodfall Lilypads/Water (#587) 2024-05-28 19:37:26 -05:00
Garrett CoxandGitHub 788c74a19e Fix PR artifacts (#563) 2024-05-27 21:18:14 -05:00
ArchezandGitHub 41e35ff3ee Fix macports cache (#543)
* fix macports cache

* cache key obey os version

* more tweaks

* fix sccache and try mac gtar replacement

* oh a custom gtar wrapper..

* comments and different test

* update

* soh otr after main build

* cache bust

* 2ship o2r builder

* change install path

* bust cache

* sccache cmake fixes

* dont list 2ship.o2r in pr artifacts
2024-05-27 17:58:30 -05:00
ArchezandGitHub 0eaa533f25 Use GH artifacts (#511)
* use gh artifacts

* update nightly links
2024-05-27 00:01:54 -05:00
50 changed files with 509 additions and 394 deletions
+1 -1
View File
@@ -1 +1 @@
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
# Call the original gtar executable with sudo for macports cache restoration to root folder
exec sudo /opt/homebrew/bin/gtar.orig "$@"
+179 -217
View File
@@ -98,74 +98,8 @@ jobs:
# source-dir: _packages # source-dir: _packages
# destination-dir: ./ # destination-dir: ./
# generate-2ship-otr: generate-2ship-otr:
# runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1.2.11
# with:
# key: ${{ runner.os }}-otr-ccache-${{ github.ref }}-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-otr-ccache-${{ github.ref }}
# ${{ runner.os }}-otr-ccache
# - name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y $(cat .github/workflows/apt-deps.txt)
# - name: Cache build folders
# uses: actions/cache@v4
# with:
# key: ${{ runner.os }}-otr-build-${{ github.ref }}-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-otr-build-${{ github.ref }}
# ${{ runner.os }}-otr-build
# path: |
# build-cmake
# SDL2-2.28.5
# tinyxml2-10.0.0
# - name: Install latest SDL
# run: |
# export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
# if [ ! -d "SDL2-2.28.5" ]; then
# wget https://www.libsdl.org/release/SDL2-2.28.5.tar.gz
# tar -xzf SDL2-2.28.5.tar.gz
# fi
# cd SDL2-2.28.5
# ./configure --enable-hidapi-libusb
# make -j 10
# sudo make install
# sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
# - name: Install latest tinyxml2
# run: |
# sudo apt-get remove libtinyxml2-dev
# export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
# if [ ! -d "tinyxml2-10.0.0" ]; then
# wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
# tar -xzf 10.0.0.tar.gz
# fi
# cd tinyxml2-10.0.0
# mkdir -p build
# cd build
# cmake ..
# make
# sudo make install
# - name: Generate 2ship.o2r
# run: |
# export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
# cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
# cmake --build build-cmake --config Release --target Generate2ShipOtr -j3
# - uses: actions/upload-artifact@v4
# with:
# name: 2ship.o2r
# path: 2ship.o2r
# retention-days: 1
build-macos:
# needs: generate-2ship-otr
runs-on: macos-14
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@@ -173,99 +107,24 @@ jobs:
- name: ccache - name: ccache
uses: hendrikmuhs/ccache-action@v1.2.13 uses: hendrikmuhs/ccache-action@v1.2.13
with: with:
create-symlink: true key: ${{ runner.os }}-otr-ccache-${{ github.ref }}-${{ github.sha }}
key: ${{ runner.os }}-14-ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-14-ccache-${{ github.ref }} ${{ runner.os }}-otr-ccache-${{ github.ref }}
${{ runner.os }}-14-ccache ${{ runner.os }}-otr-ccache-
- name: Cache MacPorts
id: cache-macports
uses: actions/cache@v4
with:
path: /opt/local/
key: ${{ runner.os }}-macports-${{ hashFiles('.github/workflows/macports-deps.txt') }}
restore-keys: |
${{ runner.os }}-macports
- name: Install MacPorts (if necessary)
run: |
if [ -d /opt/local/ ]; then
echo "MacPorts already installed"
else
wget https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3-14-Sonoma.pkg
sudo installer -pkg ./MacPorts-2.9.3-14-Sonoma.pkg -target /
fi
echo "/opt/local/bin:/opt/local/sbin" >> $GITHUB_PATH
- name: Install dependencies
run: |
brew uninstall --ignore-dependencies libpng
sudo port install $(cat .github/workflows/macports-deps.txt)
brew install ninja
# - name: Download 2ship.o2r
# uses: actions/download-artifact@v4
# with:
# name: 2ship.o2r
# path: build-cmake/mm
- name: Build 2Ship
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build-cmake --config Release --target Generate2ShipOtr --parallel 10
cmake --build build-cmake --config Release --parallel 10
(cd build-cmake && cpack)
mv _packages/*.dmg 2Ship.dmg
mv README.md readme.txt
# - name: Upload build
# if: ${{ startsWith(github.ref, 'refs/heads/develop') }}
# uses: actions/upload-artifact@v4
# with:
# name: 2ship-mac
# path: |
# 2Ship.dmg
# readme.txt
- name: Zip build
run: |
mkdir -p _release
zip -qq _release/2ship-mac.zip 2ship.dmg readme.txt
- name: Upload build
if: ${{ startsWith(github.ref, 'refs/heads/develop') }}
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: _release
destination-dir: ./
build-linux:
# needs: generate-2ship-otr
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt) sudo apt-get install -y $(cat .github/workflows/apt-deps.txt) libzip-dev zipcmp zipmerge ziptool
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11
with:
key: linux-ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
linux-ccache-${{ github.ref }}
linux-ccache
- name: Cache build folders - name: Cache build folders
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
key: linux-build-${{ github.ref }}-${{ github.sha }} key: ${{ runner.os }}-otr-build-${{ github.ref }}-${{ github.sha }}
restore-keys: | restore-keys: |
linux-build-${{ github.ref }} ${{ runner.os }}-otr-build-${{ github.ref }}
linux-build ${{ runner.os }}-otr-build-
path: | path: |
build-cmake
SDL2-2.28.5 SDL2-2.28.5
SDL2_net-2.2.0
tinyxml2-10.0.0 tinyxml2-10.0.0
- name: Install latest SDL - name: Install latest SDL
run: | run: |
@@ -293,28 +152,160 @@ jobs:
cmake .. cmake ..
make make
sudo make install sudo make install
- name: Install latest SDL_net - name: Generate 2ship.o2r
run: | run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
if [ ! -d "SDL2_net-2.2.0" ]; then cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
wget https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.2.0.tar.gz cmake --build build-cmake --config Release --target Generate2ShipOtr -j3
tar -xzf SDL2_net-2.2.0.tar.gz - uses: actions/upload-artifact@v4
with:
name: 2ship.o2r
path: 2ship.o2r
retention-days: 1
build-macos:
needs: generate-2ship-otr
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.13
with:
create-symlink: true
key: ${{ runner.os }}-14-ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-14-ccache-${{ github.ref }}
${{ runner.os }}-14-ccache-
# Needed to apply sudo for macports cache restore
- name: Install gtar wrapper
run: |
sudo mv /opt/homebrew/bin/gtar /opt/homebrew/bin/gtar.orig
sudo cp .github/workflows/gtar /opt/homebrew/bin/gtar
sudo chmod +x /opt/homebrew/bin/gtar
- name: Cache MacPorts
id: cache-macports
uses: actions/cache@v4
with:
path: /opt/local/
key: ${{ runner.os }}-14-macports-${{ hashFiles('.github/workflows/macports-deps.txt') }}
restore-keys: |
${{ runner.os }}-14-macports-
- name: Install MacPorts (if necessary)
run: |
if [ command -v port &>/dev/null ]; then
echo "MacPorts already installed"
else
wget https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3-14-Sonoma.pkg
sudo installer -pkg ./MacPorts-2.9.3-14-Sonoma.pkg -target /
fi fi
cd SDL2_net-2.2.0 echo "/opt/local/bin:/opt/local/sbin" >> $GITHUB_PATH
./configure - name: Install dependencies
run: |
brew uninstall --ignore-dependencies libpng
sudo port install $(cat .github/workflows/macports-deps.txt)
brew install ninja
- name: Download 2ship.o2r
uses: actions/download-artifact@v4
with:
name: 2ship.o2r
path: build-cmake/mm
- name: Build 2Ship
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build-cmake --config Release --parallel 10
(cd build-cmake && cpack)
mv _packages/*.dmg 2Ship.dmg
mv README.md readme.txt
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: 2ship-mac
path: |
2Ship.dmg
readme.txt
build-linux:
needs: generate-2ship-otr
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt)
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.13
with:
key: linux-ccache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
linux-ccache-${{ github.ref }}
linux-ccache-
- name: Cache build folders
uses: actions/cache@v4
with:
key: linux-build-${{ github.ref }}-${{ github.sha }}
restore-keys: |
linux-build-${{ github.ref }}
linux-build-
path: |
SDL2-2.30.3
tinyxml2-10.0.0
libzip-1.10.1
- name: Install latest SDL
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
if [ ! -d "SDL2-2.30.3" ]; then
wget https://www.libsdl.org/release/SDL2-2.30.3.tar.gz
tar -xzf SDL2-2.30.3.tar.gz
fi
cd SDL2-2.30.3
./configure --enable-hidapi-libusb
make -j 10 make -j 10
sudo make install sudo make install
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/ sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
# - name: Download 2ship.o2r - name: Install latest tinyxml2
# uses: actions/download-artifact@v4 run: |
# with: sudo apt-get remove libtinyxml2-dev
# name: 2ship.o2r export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
# path: build-cmake/mm if [ ! -d "tinyxml2-10.0.0" ]; then
wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
tar -xzf 10.0.0.tar.gz
fi
cd tinyxml2-10.0.0
mkdir -p build
cd build
cmake ..
make
sudo make install
- name: Install libzip without crypto
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
if [ ! -d "libzip-1.10.1" ]; then
wget https://github.com/nih-at/libzip/releases/download/v1.10.1/libzip-1.10.1.tar.gz
tar -xzf libzip-1.10.1.tar.gz
fi
cd libzip-1.10.1
mkdir -p build
cd build
cmake .. -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF
make
sudo make install
sudo cp -av /usr/local/lib/libzip* /lib/x86_64-linux-gnu/
- name: Download 2ship.o2r
uses: actions/download-artifact@v4
with:
name: 2ship.o2r
path: build-cmake/mm
- name: Build 2Ship - name: Build 2Ship
run: | run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_REMOTE_CONTROL=1 cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_REMOTE_CONTROL=1
cmake --build build-cmake --config Release --target Generate2ShipOtr -j3
cmake --build build-cmake --config Release -j3 cmake --build build-cmake --config Release -j3
(cd build-cmake && cpack -G External) (cd build-cmake && cpack -G External)
@@ -323,32 +314,16 @@ jobs:
env: env:
CC: gcc-12 CC: gcc-12
CXX: g++-12 CXX: g++-12
# Temporarily replaced with an upload to R2 until we go public
# - name: Upload build
# uses: actions/upload-artifact@v4
# with:
# name: 2ship-linux
# path: |
# 2ship.appimage
# readme.txt
# Remove Zip step when uploading directly to GH artifactory
- name: Zip build
run: |
mkdir -p _release
zip -qq _release/2ship-linux.zip 2ship.appimage readme.txt
- name: Upload build - name: Upload build
if: ${{ startsWith(github.ref, 'refs/heads/develop') }} uses: actions/upload-artifact@v4
uses: ryand56/r2-upload-action@latest
with: with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} name: 2ship-linux
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} path: |
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} 2ship.appimage
r2-bucket: ${{ secrets.R2_BUCKET }} readme.txt
source-dir: _release
destination-dir: ./
build-windows: build-windows:
# needs: generate-2ship-otr needs: generate-2ship-otr
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Install dependencies - name: Install dependencies
@@ -359,60 +334,47 @@ jobs:
with: with:
submodules: true submodules: true
- name: ccache - name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 uses: hendrikmuhs/ccache-action@v1.2.13
with: with:
variant: sccache variant: sccache
max-size: "1G" max-size: "1G"
key: ${{ runner.os }}-ccache-${{ github.ref }}-${{ github.sha }} key: ${{ runner.os }}-ccache1-${{ github.ref }}-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-ccache-${{ github.ref }} ${{ runner.os }}-ccache1-${{ github.ref }}
${{ runner.os }}-ccache ${{ runner.os }}-ccache1-
- name: Cache build folder - name: Cache build folder
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
save-always: true save-always: true
key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.sha }} key: ${{ runner.os }}-build1-${{ github.ref }}-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-build-${{ github.ref }} ${{ runner.os }}-build1-${{ github.ref }}
${{ runner.os }}-build ${{ runner.os }}-build1-
path: | path: |
build-windows build-windows
vcpkg vcpkg
- name: Configure Developer Command Prompt - name: Configure Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
# - name: Download 2ship.o2r - name: Download 2ship.o2r
# uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
# with: with:
# name: 2ship.o2r name: 2ship.o2r
# path: build-windows/mm path: build-windows/mm
- name: Build 2Ship - name: Build 2Ship
env: env:
VCPKG_ROOT: ${{github.workspace}}/vcpkg VCPKG_ROOT: ${{github.workspace}}/vcpkg
run: | run: |
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH" set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
cmake -S . -B build-windows -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE:STRING=Release cmake -S . -B build-windows -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
cmake --build build-windows --config Release --target Generate2ShipOtr --parallel 10
cmake --build build-windows --config Release --parallel 10 cmake --build build-windows --config Release --parallel 10
(cd build-windows && cpack) (cd build-windows && cpack)
cd .. cd ..
mv _packages/*.zip _packages/2ship-windows.zip mv _packages/*.zip _packages/2ship-windows.zip
# Temporarily replaced with an upload to R2 until we go public - name: Unzip package
# - name: Unzip package run: Expand-Archive -Path _packages/2ship-windows.zip -DestinationPath 2ship-windows
# run: Expand-Archive -Path _packages/2ship-windows.zip -DestinationPath 2ship-windows
# - name: Upload build
# if: ${{ startsWith(github.ref, 'refs/heads/develop') }}
# uses: actions/upload-artifact@v4
# with:
# name: 2ship-windows
# path: 2ship-windows
- name: Upload build - name: Upload build
if: ${{ startsWith(github.ref, 'refs/heads/develop') }} uses: actions/upload-artifact@v4
uses: ryand56/r2-upload-action@latest
with: with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} name: 2ship-windows
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} path: 2ship-windows
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: _packages
destination-dir: ./
+2 -1
View File
@@ -48,8 +48,9 @@ jobs:
return allArtifacts.data.artifacts.reduce((acc, item) => { return allArtifacts.data.artifacts.reduce((acc, item) => {
if (item.name === "assets") return acc; if (item.name === "assets") return acc;
if (item.name === "2ship.o2r") return acc;
acc += ` acc += `
- [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip?h=20a00267c7ffeb2eb80ab31f356f2ba5f120f43c)`; - [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip)`;
return acc; return acc;
}, '### Build Artifacts'); }, '### Build Artifacts');
- id: 'add-to-pr' - id: 'add-to-pr'
+2 -2
View File
@@ -16,8 +16,8 @@ android {
} }
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 31 targetSdkVersion 31
versionCode 1 versionCode 2
versionName "1.0.0.0" versionName "1.0.1"
externalNativeBuild { externalNativeBuild {
//ndkBuild { //ndkBuild {
// arguments "APP_PLATFORM=android-23" // arguments "APP_PLATFORM=android-23"
+2 -2
View File
@@ -4,8 +4,8 @@
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dishii.mm" package="com.dishii.mm"
android:versionCode="1" android:versionCode="2"
android:versionName="1.0.0.1" android:versionName="1.0.1"
android:installLocation="auto"> android:installLocation="auto">
<!-- OpenGL ES 3.0 --> <!-- OpenGL ES 3.0 -->
-1
View File
@@ -1,3 +1,2 @@
# Extractor Assets Copied by CMake during buildtime # Extractor Assets Copied by CMake during buildtime
assets/ assets/
2ship.o2r
+7 -2
View File
@@ -8,5 +8,10 @@ if(MSVC)
set_target_properties("${PROPS_TARGET}" PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") set_target_properties("${PROPS_TARGET}" PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
set_config_specific_property("DEFAULT_CXX_EXCEPTION_HANDLING" "/EHsc") set_config_specific_property("DEFAULT_CXX_EXCEPTION_HANDLING" "/EHsc")
set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Zi")
endif() if (CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache|sccache")
set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Z7")
else()
set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Zi")
endif()
endif()
-1
View File
@@ -79,7 +79,6 @@ execute_process(
--executable=$<TARGET_FILE:2ship> --executable=$<TARGET_FILE:2ship>
$<$<BOOL:$<TARGET_PROPERTY:2ship,APPIMAGE_DESKTOP_FILE>>:--desktop-file=$<TARGET_PROPERTY:2ship,APPIMAGE_DESKTOP_FILE>> $<$<BOOL:$<TARGET_PROPERTY:2ship,APPIMAGE_DESKTOP_FILE>>:--desktop-file=$<TARGET_PROPERTY:2ship,APPIMAGE_DESKTOP_FILE>>
$<$<BOOL:$<TARGET_PROPERTY:2ship,APPIMAGE_ICON_FILE>>:--icon-file=$<TARGET_PROPERTY:2ship,APPIMAGE_ICON_FILE>> $<$<BOOL:$<TARGET_PROPERTY:2ship,APPIMAGE_ICON_FILE>>:--icon-file=$<TARGET_PROPERTY:2ship,APPIMAGE_ICON_FILE>>
--exclude-library "*libcrypto*"
--output=appimage --output=appimage
# --verbosity=2 # --verbosity=2
) )
@@ -17,7 +17,7 @@ if(SYSTEM_NAME MATCHES "Windows")
if(NOT ONLY2SHIPOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/mm.zip) if(NOT ONLY2SHIPOTR AND EXISTS ${SOURCE_DIR}/OTRExporter/mm.zip)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.zip ${TARGET_DIR}/mm.o2r) execute_process(COMMAND ${CMAKE_COMMAND} -E copy mm.zip ${TARGET_DIR}/mm.o2r)
endif() endif()
if(EXISTS ${SOURCE_DIR}/OTRExporter/o2r) if(EXISTS ${SOURCE_DIR}/OTRExporter/2ship.o2r)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy 2ship.o2r ${TARGET_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E copy 2ship.o2r ${TARGET_DIR})
endif() endif()
endif() endif()
-2
View File
@@ -1,6 +1,5 @@
set(CVAR_VSYNC_ENABLED "${CVAR_PREFIX_SETTING}.VsyncEnabled" CACHE STRING "") set(CVAR_VSYNC_ENABLED "${CVAR_PREFIX_SETTING}.VsyncEnabled" CACHE STRING "")
set(CVAR_Z_FIGHTING_MODE "${CVAR_PREFIX_SETTING}.ZFightingMode" CACHE STRING "") set(CVAR_Z_FIGHTING_MODE "${CVAR_PREFIX_SETTING}.ZFightingMode" CACHE STRING "")
set(CVAR_DISABLE_CLOSE_COLOR_WRAP "${CVAR_PREFIX_SETTING}.DisableCloseColorWrap" CACHE STRING "")
set(CVAR_NEW_FILE_DROPPED "${CVAR_PREFIX_GENERAL}.NewFileDropped" CACHE STRING "") set(CVAR_NEW_FILE_DROPPED "${CVAR_PREFIX_GENERAL}.NewFileDropped" CACHE STRING "")
set(CVAR_DROPPED_FILE "${CVAR_PREFIX_GENERAL}.DroppedFile" CACHE STRING "") set(CVAR_DROPPED_FILE "${CVAR_PREFIX_GENERAL}.DroppedFile" CACHE STRING "")
set(CVAR_INTERNAL_RESOLUTION "${CVAR_PREFIX_SETTING}.InternalResolution" CACHE STRING "") set(CVAR_INTERNAL_RESOLUTION "${CVAR_PREFIX_SETTING}.InternalResolution" CACHE STRING "")
@@ -17,7 +16,6 @@ set(CVAR_STATS_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.Stats" CACHE STRING "")
set(CVAR_ENABLE_MULTI_VIEWPORTS "${CVAR_PREFIX_SETTING}.EnableMultiViewports" CACHE STRING "") set(CVAR_ENABLE_MULTI_VIEWPORTS "${CVAR_PREFIX_SETTING}.EnableMultiViewports" CACHE STRING "")
set(CVAR_LOW_RES_MODE "${CVAR_PREFIX_SETTING}.LowResMode" CACHE STRING "") set(CVAR_LOW_RES_MODE "${CVAR_PREFIX_SETTING}.LowResMode" CACHE STRING "")
set(CVAR_SIMULATED_INPUT_LAG "${CVAR_PREFIX_SETTING}.SimulatedInputLag" CACHE STRING "") set(CVAR_SIMULATED_INPUT_LAG "${CVAR_PREFIX_SETTING}.SimulatedInputLag" CACHE STRING "")
set(CVAR_ALT_ASSETS "${CVAR_PREFIX_ENHANCEMENT}.AltAssets" CACHE STRING "")
set(CVAR_GAME_OVERLAY_FONT "${CVAR_PREFIX_SETTING}.OverlayFont" CACHE STRING "") set(CVAR_GAME_OVERLAY_FONT "${CVAR_PREFIX_SETTING}.OverlayFont" CACHE STRING "")
set(CVAR_MENU_BAR_OPEN "${CVAR_PREFIX_SETTING}.OpenMenuBar" CACHE STRING "") set(CVAR_MENU_BAR_OPEN "${CVAR_PREFIX_SETTING}.OpenMenuBar" CACHE STRING "")
set(CVAR_PREFIX_CONTROLLERS "${CVAR_PREFIX_SETTING}.Controllers" CACHE STRING "") set(CVAR_PREFIX_CONTROLLERS "${CVAR_PREFIX_SETTING}.Controllers" CACHE STRING "")
+16 -5
View File
@@ -5,16 +5,23 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
project(2s2h VERSION 1.0.0 LANGUAGES C CXX) project(2s2h VERSION 1.0.1 LANGUAGES C CXX)
include(CMake/2ship-cvars.cmake) include(CMake/2ship-cvars.cmake)
include(CMake/lus-cvars.cmake) include(CMake/lus-cvars.cmake)
set(PROJECT_BUILD_NAME "Rika Alfa" CACHE STRING "") set(PROJECT_BUILD_NAME "Rika Bravo" CACHE STRING "")
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "") set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "")
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT 2ship) set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT 2ship)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>) add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/utf-8>) add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/utf-8>)
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
if (CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache|sccache")
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
endif()
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Windows|Linux") if (CMAKE_SYSTEM_NAME MATCHES "Windows|Linux")
if(NOT DEFINED BUILD_CROWD_CONTROL) if(NOT DEFINED BUILD_CROWD_CONTROL)
set(BUILD_CROWD_CONTROL OFF) set(BUILD_CROWD_CONTROL OFF)
@@ -24,6 +31,9 @@ endif()
# Enable the Gfx debugger in LUS to use libgfxd from ZAPDTR # Enable the Gfx debugger in LUS to use libgfxd from ZAPDTR
set(GFX_DEBUG_DISASSEMBLER ON) set(GFX_DEBUG_DISASSEMBLER ON)
# Tell LUS we're using F3DEX_GBI_2 (in a way that doesn't break libgfxd)
set(USE_F3DEX2 ON)
################################################################################ ################################################################################
# Set target arch type if empty. Visual studio solution generator provides it. # Set target arch type if empty. Visual studio solution generator provides it.
################################################################################ ################################################################################
@@ -52,6 +62,7 @@ elseif ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
set(VCPKG_TRIPLET x64-windows-static) set(VCPKG_TRIPLET x64-windows-static)
set(VCPKG_TARGET_TRIPLET x64-windows-static) set(VCPKG_TARGET_TRIPLET x64-windows-static)
endif() endif()
vcpkg_bootstrap() vcpkg_bootstrap()
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog) vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog)
endif() endif()
@@ -111,7 +122,7 @@ set_property(TARGET 2ship PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/2s2hI
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
install(PROGRAMS "${CMAKE_BINARY_DIR}/linux/2s2h.sh" DESTINATION . COMPONENT appimage) install(PROGRAMS "${CMAKE_BINARY_DIR}/linux/2s2h.sh" DESTINATION . COMPONENT appimage)
install(FILES "${CMAKE_SOURCE_DIR}/2ship.o2r" DESTINATION . COMPONENT ship) install(FILES "${CMAKE_BINARY_DIR}/mm/2ship.o2r" DESTINATION . COMPONENT ship)
install(TARGETS ZAPD DESTINATION ./assets/extractor COMPONENT extractor) install(TARGETS ZAPD DESTINATION ./assets/extractor COMPONENT extractor)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/mm/assets/extractor/" DESTINATION ./assets/extractor COMPONENT extractor) install(DIRECTORY "${CMAKE_SOURCE_DIR}/mm/assets/extractor/" DESTINATION ./assets/extractor COMPONENT extractor)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/mm/assets/xml/" DESTINATION ./assets/extractor/xmls COMPONENT extractor) install(DIRECTORY "${CMAKE_SOURCE_DIR}/mm/assets/xml/" DESTINATION ./assets/extractor/xmls COMPONENT extractor)
@@ -148,7 +159,7 @@ add_custom_target(
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions # CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f mm.zip 2ship.o2r COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f mm.zip 2ship.o2r
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive --xml-root ../mm/assets/xml --custom-otr-file 2ship.o2r "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/mm/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}" COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive --xml-root ../mm/assets/xml --custom-otr-file 2ship.o2r "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/mm/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/copy-existing-otrs.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
COMMENT "Running asset extraction..." COMMENT "Running asset extraction..."
DEPENDS ZAPD DEPENDS ZAPD
@@ -170,7 +181,7 @@ add_custom_target(
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions # CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f 2ship.o2r COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f 2ship.o2r
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom --custom-otr-file 2ship.o2r "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/mm/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}" COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom --custom-otr-file 2ship.o2r "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/mm/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLY2SHIPOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLY2SHIPOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/copy-existing-otrs.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
COMMENT "Generating 2ship.o2r..." COMMENT "Generating 2ship.o2r..."
DEPENDS ZAPD DEPENDS ZAPD
+1 -4
View File
@@ -32,13 +32,12 @@ Q: The GUI scaling is too big/too small. <br>
A: There is no GUI scaling option implemented yet. This will come in a future update. <br><br> A: There is no GUI scaling option implemented yet. This will come in a future update. <br><br>
Q: Gyro Aim? <br> Q: Gyro Aim? <br>
A: Working on it. <br> <br> A: It will come once it works in the base 2 Ship 2 Harkinian. <br> <br>
Q: My controller is not doing anything. <br> Q: My controller is not doing anything. <br>
A: Close the Enhancements Menu. If the Enhancements Menu is not open, open it with the Android back button and check if it is detected in Settings->Controller->Controller Mapping. If it is, press refresh. <br><br> A: Close the Enhancements Menu. If the Enhancements Menu is not open, open it with the Android back button and check if it is detected in Settings->Controller->Controller Mapping. If it is, press refresh. <br><br>
<b>Known Bugs</b>:<br> <b>Known Bugs</b>:<br>
Re-connected controllers do not open the GUI anymore. Use the back button or restart the app.<br>
Orientation Lock does not work. https://github.com/libsdl-org/SDL/issues/6090<br> Orientation Lock does not work. https://github.com/libsdl-org/SDL/issues/6090<br>
Near-plane clipping when the camera is close to walls.<br> Near-plane clipping when the camera is close to walls.<br>
Picto box images render black. <br> Picto box images render black. <br>
@@ -46,5 +45,3 @@ Picto box images render black. <br>
<h3>Build Instructions:</h3> <h3>Build Instructions:</h3>
1. Edit the app/build.gradle file to point to your ndk folder. NDK 26+ tested as working.<br> 1. Edit the app/build.gradle file to point to your ndk folder. NDK 26+ tested as working.<br>
2. Open the project in android studio and build.<br> 2. Open the project in android studio and build.<br>
+1 -1
Submodule ZAPDTR updated: 7d257b0d7d...24ca939d54
-2
View File
@@ -20,8 +20,6 @@
#include "include/global.h" #include "include/global.h"
#include "include/z64audio.h" #include "include/z64audio.h"
bool ShouldClearTextureCacheAtEndOfFrame = false;
namespace BenGui { namespace BenGui {
// MARK: - Delegates // MARK: - Delegates
+14 -14
View File
@@ -14,8 +14,6 @@
#include "2s2h/DeveloperTools/WarpPoint.h" #include "2s2h/DeveloperTools/WarpPoint.h"
#include "HudEditor.h" #include "HudEditor.h"
extern bool ShouldClearTextureCacheAtEndOfFrame;
extern "C" { extern "C" {
#include "z64.h" #include "z64.h"
#include "functions.h" #include "functions.h"
@@ -184,11 +182,15 @@ void DrawSettingsMenu() {
"form of anti-aliasing"); "form of anti-aliasing");
#endif #endif
#ifndef __WIIU__ #ifndef __WIIU__
if (UIWidgets::CVarSliderInt("MSAA: %d", CVAR_MSAA_VALUE, 1, 8, 1)) { if (UIWidgets::CVarSliderInt((CVarGetInteger(CVAR_MSAA_VALUE, 1) == 1) ? "Anti-aliasing (MSAA): Off"
: "Anti-aliasing (MSAA): %d",
CVAR_MSAA_VALUE, 1, 8, 1)) {
Ship::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger(CVAR_MSAA_VALUE, 1)); Ship::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger(CVAR_MSAA_VALUE, 1));
}; };
UIWidgets::Tooltip( UIWidgets::Tooltip(
"Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel"); "Activates MSAA (multi-sample anti-aliasing) from 2x up to 8x, to smooth the edges of rendered "
"geometry.\n"
"Higher sample count will result in smoother edges on models, but may reduce performance.");
#endif #endif
{ // FPS Slider { // FPS Slider
@@ -440,14 +442,14 @@ void DrawEnhancementsMenu() {
UIWidgets::CVarCheckbox( UIWidgets::CVarCheckbox(
"Pause Menu Save", "gEnhancements.Saving.PauseSave", "Pause Menu Save", "gEnhancements.Saving.PauseSave",
{ .tooltip = "Re-introduce the pause menu save system. Pressing B in the pause menu will give you the " { .tooltip = "Re-introduce the pause menu save system. Pressing B in the pause menu will give you the "
"option to create an Owl Save from your current location.\n\nWhen loading back into the " "option to create a persistent Owl Save from your current location.\n\nWhen loading back "
"game, you will be placed either at the entrance of the dungeon you saved in, or in South " "into the game, you will be placed either at the entrance of the dungeon you saved in, or "
"Clock Town." }); "in South Clock Town." });
if (UIWidgets::CVarCheckbox( if (UIWidgets::CVarCheckbox(
"Autosave", "gEnhancements.Saving.Autosave", "Autosave", "gEnhancements.Saving.Autosave",
{ .tooltip = "Automatically create owl saves on the chosen interval.\n\nWhen loading back into the " { .tooltip = "Automatically create a persistent Owl Save on the chosen interval.\n\nWhen loading "
"game, you will be placed either at the entrance of the dungeon you saved in, or in " "back into the game, you will be placed either at the entrance of the dungeon you "
"South Clock Town." })) { "saved in, or in South Clock Town." })) {
RegisterAutosave(); RegisterAutosave();
} }
UIWidgets::CVarSliderInt("Autosave Interval (minutes): %d", "gEnhancements.Saving.AutosaveInterval", 1, 60, UIWidgets::CVarSliderInt("Autosave Interval (minutes): %d", "gEnhancements.Saving.AutosaveInterval", 1, 60,
@@ -534,10 +536,8 @@ void DrawEnhancementsMenu() {
} }
if (UIWidgets::BeginMenu("Modes")) { if (UIWidgets::BeginMenu("Modes")) {
if (UIWidgets::CVarCheckbox("Play As Kafei", "gModes.PlayAsKafei", UIWidgets::CVarCheckbox("Play As Kafei", "gModes.PlayAsKafei",
{ .tooltip = "Requires scene reload to take effect." })) { { .tooltip = "Requires scene reload to take effect." });
UpdatePlayAsKafeiSkeletons();
}
ImGui::EndMenu(); ImGui::EndMenu();
} }
if (UIWidgets::BeginMenu("Player Movement")) { if (UIWidgets::BeginMenu("Player Movement")) {
+18 -11
View File
@@ -59,9 +59,9 @@ extern "C" void HudEditor_ModifyRectPosValuesFromBase(s16 baseX, s16 baseY, s16*
*rectTop = baseY + (offsetFromBaseY * CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f)); *rectTop = baseY + (offsetFromBaseY * CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f));
} }
extern "C" void HudEditor_ModifyRectPosValues(s16* rectLeft, s16* rectTop) { void HudEditor_ModifyRectPosValuesFloat(f32* rectLeft, f32* rectTop) {
s16 offsetFromBaseX = *rectLeft - hudEditorElements[hudEditorActiveElement].defaultX; f32 offsetFromBaseX = *rectLeft - hudEditorElements[hudEditorActiveElement].defaultX;
s16 offsetFromBaseY = *rectTop - hudEditorElements[hudEditorActiveElement].defaultY; f32 offsetFromBaseY = *rectTop - hudEditorElements[hudEditorActiveElement].defaultY;
*rectLeft = CVarGetInteger(hudEditorElements[hudEditorActiveElement].xCvar, *rectLeft = CVarGetInteger(hudEditorElements[hudEditorActiveElement].xCvar,
hudEditorElements[hudEditorActiveElement].defaultX) + hudEditorElements[hudEditorActiveElement].defaultX) +
(offsetFromBaseX * CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f)); (offsetFromBaseX * CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f));
@@ -78,6 +78,16 @@ extern "C" void HudEditor_ModifyRectPosValues(s16* rectLeft, s16* rectTop) {
} }
} }
extern "C" void HudEditor_ModifyRectPosValues(s16* rectLeft, s16* rectTop) {
f32 newLeft = *rectLeft;
f32 newTop = *rectTop;
HudEditor_ModifyRectPosValuesFloat(&newLeft, &newTop);
*rectLeft = (s16)newLeft;
*rectTop = (s16)newTop;
}
extern "C" void HudEditor_ModifyRectSizeValues(s16* rectWidth, s16* rectHeight) { extern "C" void HudEditor_ModifyRectSizeValues(s16* rectWidth, s16* rectHeight) {
*rectWidth *= CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f); *rectWidth *= CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f);
*rectHeight *= CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f); *rectHeight *= CVarGetFloat(hudEditorElements[hudEditorActiveElement].scaleCvar, 1.0f);
@@ -90,16 +100,13 @@ extern "C" void HudEditor_ModifyTextureStepValues(s16* dsdx, s16* dtdy) {
// Modify matrix values based on the identity matrix (0,0) centered on the screen // Modify matrix values based on the identity matrix (0,0) centered on the screen
extern "C" void HudEditor_ModifyMatrixValues(f32* transX, f32* transY) { extern "C" void HudEditor_ModifyMatrixValues(f32* transX, f32* transY) {
*transX = (f32)(SCREEN_WIDTH / 2) + *transX; *transX = ((f32)SCREEN_WIDTH / 2) + *transX;
*transY = (f32)(SCREEN_HEIGHT / 2) - *transY; *transY = ((f32)SCREEN_HEIGHT / 2) - *transY;
s16 newX = *transX; HudEditor_ModifyRectPosValuesFloat(transX, transY);
s16 newY = *transY;
HudEditor_ModifyRectPosValues(&newX, &newY); *transX = *transX - ((f32)SCREEN_WIDTH / 2);
*transY = ((f32)SCREEN_HEIGHT / 2) - *transY;
*transX = (f32)newX - (SCREEN_WIDTH / 2);
*transY = (f32)(SCREEN_HEIGHT / 2) - newY;
} }
extern "C" void HudEditor_ModifyKaleidoEquipAnimValues(s16* ulx, s16* uly, s16* shrinkRate) { extern "C" void HudEditor_ModifyKaleidoEquipAnimValues(s16* ulx, s16* uly, s16* shrinkRate) {
+5 -7
View File
@@ -180,6 +180,8 @@ bool Checkbox(const char* _label, bool* value, const CheckboxOptions& options) {
if (window->SkipItems) if (window->SkipItems)
return false; return false;
ImGui::BeginDisabled(options.disabled);
bool above = options.labelPosition == LabelPosition::Above; bool above = options.labelPosition == LabelPosition::Above;
bool lpFar = options.labelPosition == LabelPosition::Far; bool lpFar = options.labelPosition == LabelPosition::Far;
bool right = options.alignment == ComponentAlignment::Right; bool right = options.alignment == ComponentAlignment::Right;
@@ -210,19 +212,15 @@ bool Checkbox(const char* _label, bool* value, const CheckboxOptions& options) {
ImGui::ItemSize(total_bb, style.FramePadding.y); ImGui::ItemSize(total_bb, style.FramePadding.y);
if (!ImGui::ItemAdd(total_bb, id)) { if (!ImGui::ItemAdd(total_bb, id)) {
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, ImGui::EndDisabled();
g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Checkable |
(*value ? ImGuiItemStatusFlags_Checked : 0));
return false; return false;
} }
bool hovered, held, pressed;
bool hovered, held; pressed = ImGui::ButtonBehavior(total_bb, id, &hovered, &held);
bool pressed = ImGui::ButtonBehavior(total_bb, id, &hovered, &held);
if (pressed) { if (pressed) {
*value = !(*value); *value = !(*value);
ImGui::MarkItemEdited(id); ImGui::MarkItemEdited(id);
} }
ImGui::BeginDisabled(options.disabled);
PushStyleCheckbox(options.color); PushStyleCheckbox(options.color);
ImVec2 checkPos = pos; ImVec2 checkPos = pos;
ImVec2 labelPos = pos; ImVec2 labelPos = pos;

Some files were not shown because too many files have changed in this diff Show More