Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Speak2Erase/osfm-mkxp-z into…
Browse files Browse the repository at this point in the history
… dev
  • Loading branch information
Speak2Erase committed Sep 24, 2024
2 parents 573c318 + 9d1429e commit d14743c
Show file tree
Hide file tree
Showing 56 changed files with 1,142 additions and 715 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
mingw-w64-ucrt-x86_64-egl-headers
mingw-w64-ucrt-x86_64-gles-headers
- name: Checkout repository
uses: actions/checkout@v3

Expand All @@ -56,7 +55,7 @@ jobs:
shell: msys2 {0}
run: |
source windows/vars.sh
meson build
meson setup build
cd build
ninja
strip ./oneshot.exe
Expand Down Expand Up @@ -136,7 +135,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 +146,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 +167,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 +288,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 d14743c

Please sign in to comment.