Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Speak2Erase committed Sep 20, 2024
2 parents 343f093 + a5d5749 commit 9d39095
Show file tree
Hide file tree
Showing 56 changed files with 1,148 additions and 715 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-egl-headers
mingw-w64-ucrt-x86_64-gles-headers
zip
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -56,7 +56,7 @@ jobs:
shell: msys2 {0}
run: |
source windows/vars.sh
meson build
meson setup build
cd build
ninja
strip ./oneshot.exe
Expand All @@ -76,6 +76,11 @@ jobs:
cp ../journal/_______.exe .
cp ../../mkxp.json .
cp ../../assets/LICENSE.mkxp-z-with-https.txt .
cd ..
# Zipping before uploading decreases the upload time considerably.
# Unfortunately this results in double-zipping; tracked at:
# https://github.com/actions/upload-artifact/issues/426
zip -r artifact.zip artifact
- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -136,7 +141,6 @@ jobs:
name: mkxp-z.linux.x86_64.${{github.event_name == 'pull_request' && format('PR{0}', github.event.number) || github.ref_name}}-${{steps.short-sha.outputs.sha}}
path: build/lib.zip

# We do not care about supporting either of these platforms.
# build-linux-cross:
# name: Ubuntu 22.04 ${{matrix.arch_mkxpz}}
# runs-on: ubuntu-22.04
Expand All @@ -148,13 +152,11 @@ jobs:
# - arch_mkxpz: armv6
# arch_debian: armhf
# arch_gcc: arm-linux-gnueabihf
# # GCC doesn't like the -mcpu flags, TODO investigate.
# experimental: true
# experimental: false
# - arch_mkxpz: armv7
# arch_debian: armhf
# arch_gcc: arm-linux-gnueabihf
# # GCC doesn't like the -mcpu flags, TODO investigate.
# experimental: true
# experimental: false
# - arch_mkxpz: armv7-neon
# arch_debian: armhf
# arch_gcc: arm-linux-gnueabihf
Expand All @@ -171,11 +173,16 @@ jobs:
# arch_debian: ppc64el
# arch_gcc: powerpc64le-linux-gnu
# experimental: false
# - arch_mkxpz: s390x
# arch_debian: s390x
# arch_gcc: s390x-linux-gnu
# # src/util/serial-util.h errors on big-endian targets.
# experimental: true
# - arch_mkxpz: riscv64
# arch_debian: riscv64
# arch_gcc: riscv64-linux-gnu
# # libjxl/highway compatibility issue, TODO check if fixed in later SDL_image.
# # Also probably an OpenSSL arch name issue.
# # Also probably an OpenSSL arch name issue, which might be fixed by now.
# experimental: true
# steps:
# - uses: benjlevesque/[email protected]
Expand Down Expand Up @@ -287,8 +294,8 @@ jobs:
# cp ../../../../assets/LICENSE.mkxp-z-with-https.txt ./Z-universal.app/
# ditto -c -k --sequesterRsrc --keepParent Z-universal.app Z-universal.app.zip

# - name: Upload archive
# uses: actions/upload-artifact@v3
# with:
# name: mkxp-z.macos.${{github.event_name == 'pull_request' && format('PR{0}', github.event.number) || github.ref_name}}-${{steps.short-sha.outputs.sha}}
# path: build/Build/Products/Release/Z-universal.app.zip
# - name: Upload archive
# uses: actions/upload-artifact@v3
# with:
# name: mkxp-z.macos.${{github.event_name == 'pull_request' && format('PR{0}', github.event.number) || github.ref_name}}-${{steps.short-sha.outputs.sha}}
# path: build/Build/Products/Release/Z-universal.app.zip
22 changes: 13 additions & 9 deletions binding/audio-binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,19 @@ AL::Filter::ID constructALFilter(int argc, VALUE *argv) {
}

#define DEF_PLAY_STOP_POS(entity) \
RB_METHOD(audio_##entity##Play) \
RB_METHOD_GUARD(audio_##entity##Play) \
{ \
RB_UNUSED_PARAM; \
const char *filename; \
int volume = 100; \
int pitch = 100; \
bool _unused = false; \
double pos = 0.0; \
rb_get_args(argc, argv, "z|iifb", &filename, &volume, &pitch, &pos, &_unused RB_ARG_END); \
GUARD_EXC( shState->audio().entity##Play(filename, volume, pitch, pos); ) \
rb_get_args(argc, argv, "z|iifb", &filename, &volume, &pitch, &pos, &_unused RB_ARG_END); \
shState->audio().entity##Play(filename, volume, pitch, pos); \
return Qnil; \
} \
RB_METHOD_GUARD_END \
RB_METHOD(audio_##entity##Stop) \
{ \
RB_UNUSED_PARAM; \
Expand All @@ -92,16 +93,17 @@ AL::Filter::ID constructALFilter(int argc, VALUE *argv) {
}

#define DEF_PLAY_STOP(entity) \
RB_METHOD(audio_##entity##Play) \
RB_METHOD_GUARD(audio_##entity##Play) \
{ \
RB_UNUSED_PARAM; \
const char *filename; \
int volume = 100; \
int pitch = 100; \
rb_get_args(argc, argv, "z|ii", &filename, &volume, &pitch RB_ARG_END); \
GUARD_EXC( shState->audio().entity##Play(filename, volume, pitch); ) \
shState->audio().entity##Play(filename, volume, pitch); \
return Qnil; \
} \
RB_METHOD_GUARD_END \
RB_METHOD(audio_##entity##Stop) \
{ \
RB_UNUSED_PARAM; \
Expand Down Expand Up @@ -158,17 +160,18 @@ RB_METHOD(audio_##entity##Fade) \
}

#define DEF_ALL_AUDIO_CH_FUNC(entity) \
RB_METHOD(audio_##entity##Play) \
RB_METHOD_GUARD(audio_##entity##Play) \
{ \
unsigned int id; \
const char *filename; \
int volume = 100; \
int pitch = 100; \
double pos = -1.0; \
rb_get_args(argc, argv, "iz|iif", &id, &filename, &volume, &pitch, &pos RB_ARG_END); \
GUARD_EXC( shState->audio().entity##Play(id, filename, volume, pitch, pos); ) \
shState->audio().entity##Play(id, filename, volume, pitch, pos); \
return Qnil; \
} \
RB_METHOD_GUARD_END \
RB_METHOD(audio_##entity##Stop) \
{ \
unsigned int id; \
Expand Down Expand Up @@ -289,7 +292,7 @@ RB_METHOD(audio_##entity##Fade) \

// does nothing
#define DEF_CROSSFADE(entity) \
RB_METHOD(audio_##entity##Crossfade) \
RB_METHOD_GUARD(audio_##entity##Crossfade) \
{ \
RB_UNUSED_PARAM; \
const char *filename; \
Expand All @@ -299,7 +302,8 @@ RB_METHOD(audio_##entity##Crossfade) \
double pos = -1.0; \
rb_get_args(argc, argv, "z|fiif", &filename, &time, &volume, &pitch, &pos RB_ARG_END); \
return Qnil; \
}
} \
RB_METHOD_GUARD_END

#define DEF_AUD_PROP_I(PropName) \
RB_METHOD(audio##Get##PropName) \
Expand Down
Loading

0 comments on commit 9d39095

Please sign in to comment.