This commit is contained in:
commit
0464354a2c
27
README.md
27
README.md
|
|
@ -1,30 +1,5 @@
|
||||||
# SunshineEngine
|
# SunshineEngine
|
||||||
It is a specialized fork of [mkxp-oneshot](https://github.com/elizagamedev/mkxp-oneshot) developed for the OneShot: Sunshine mod, aimed at optimization, running on old and new hardware, support for multiple platforms, and mod download security.
|
It is a specialized fork of [mkxp-oneshot](https://github.com/elizagamedev/mkxp-oneshot) developed for the OneShot: Sunshine mod, aimed at optimization, running on old and new hardware, support for multiple platforms, secure modloading.
|
||||||
|
|
||||||
## Build
|
|
||||||
1. Install required packages
|
|
||||||
* Cmake
|
|
||||||
* C/C++ compiler, GCC or MinG or Clang
|
|
||||||
* xxd
|
|
||||||
* Ruby 3.4+
|
|
||||||
* Boost
|
|
||||||
* SDL3
|
|
||||||
* pixman
|
|
||||||
* SDL3_image
|
|
||||||
* SDL3_ttf
|
|
||||||
* SDL3_mixer
|
|
||||||
* SDL3_net
|
|
||||||
* PhysFS
|
|
||||||
* sigc++-2.0
|
|
||||||
* GTK3(*NIX only!)
|
|
||||||
* libxfconf(*NIX only!)
|
|
||||||
* libseccomp(Linux only)
|
|
||||||
|
|
||||||
(*NIX - Linux,FreeBSD and other UNIX and UNIX-like systems.)
|
|
||||||
|
|
||||||
2. build
|
|
||||||
Use build scripts.
|
|
||||||
make-oneshot-(OS).sh -DCMAKE_TOOLCHAIN_FILE=toolchain/arch/(x86/arm/ia-64).cmake
|
|
||||||
|
|
||||||
# Mirrors
|
# Mirrors
|
||||||
[Github](https://github.com/CatWindowTeam/mkxp-sunshine/tree/master)
|
[Github](https://github.com/CatWindowTeam/mkxp-sunshine/tree/master)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
meow meow
|
||||||
|
meow meow
|
||||||
|
meow meow meow meow
|
||||||
|
meow meow meow meow
|
||||||
|
meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow
|
||||||
|
meow meow meow meow meow meow meow meow
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
the code is my canvas..
|
||||||
|
██████ ██████ ██
|
||||||
|
████ ██ ████ ██ ████
|
||||||
|
██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ████████
|
||||||
|
██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ██ ██
|
||||||
|
██ ████ ██ ██ ██
|
||||||
|
██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██
|
||||||
|
██ ████ ████ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ██
|
||||||
|
██ ████ ████ ██ ████████████████ ████████ ██
|
||||||
|
██ ██ ██ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ██ ████ ██
|
||||||
|
██ ██████ ████ ██ ██ ██
|
||||||
|
██ ██ ██ ██ ████ ██ ██
|
||||||
|
████ ████ ████ ██████ ██████
|
||||||
|
████████████████████ ██████ ██ ██
|
||||||
|
██ ██████ ████
|
||||||
|
██
|
||||||
|
████
|
||||||
|
██
|
||||||
|
██
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Arts
|
||||||
|
|
||||||
|
Just some random art drawn during a break from coding 🗦(^.ꞈ.^)🗧
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
████████████ ██████████████████████████████████ ██████████████████████████████████████████████████████████ ████████ ██████
|
||||||
|
██████████ ████████ ████████████ ████████████████ ██ ████████████████████████████████████████████████████████ ████ ██████
|
||||||
|
████████ ████████████████ ██████ ██████████ ██████ ██████████████████████████████████████████████████████████ ████████
|
||||||
|
████████ ██████████████ ██ ██ ████████ ████ ██████████████████████████████████████████████████████████████ ██████████
|
||||||
|
████████ ██████████████ ██ ████ ████████████████████ ████████████████████████████████████████████████████████████ ██████████
|
||||||
|
████████ ██████████████ ██ ████ ████████████████████ ██████████████████████████████████████████████████████████ ████████
|
||||||
|
██████████ ████████ ██ ██ ████ ██ ████████ ██ ██ ████████████████████████████████████████████████████████ ████ ██████
|
||||||
|
████████████ ██████ ██ ████ ██████████ ████ ██████████████████████████████████████████████████████████ ████████ ██████
|
||||||
|
██████████████████████████████████████████████ ████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
████ ████
|
||||||
|
████ ██████ ████
|
||||||
|
████ ████████ ████
|
||||||
|
████ ████████ ████
|
||||||
|
████ ██████████ ████
|
||||||
|
████ ██████████ ████
|
||||||
|
████ ████████████ ████
|
||||||
|
████ ██████████████ ████
|
||||||
|
████ ██████████████ ████
|
||||||
|
████ ████████████████ ████
|
||||||
|
████ ████████████████ ██████ ████
|
||||||
|
████ ██████████████████ ████████ ████
|
||||||
|
████ ██████████████████ ████████████ ████
|
||||||
|
████ ████████████████████ ████████████████ ████
|
||||||
|
████ ██████████████████████ ████████████████████ ████
|
||||||
|
████ ██████████████████████ ██████████████████████ ████
|
||||||
|
████ ████████████████████████ ██████████████████████████ ████
|
||||||
|
████ ████████████████████████ ████████████████████████████ ████
|
||||||
|
████ ██████████████████████████ ████████████████████████████████ ████
|
||||||
|
████ ████████████████████████ ████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████ ████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ██████ ████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████ ████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████ ██████ ██████ ████
|
||||||
|
████ ██████████████████████████████████████████████ ████████ ████████ ████
|
||||||
|
████ ██████████████████████████████████████████████ ████████ ████████ ████
|
||||||
|
████ ██████████████████████████████████████████████ ████████ ████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████ ██████ ██████████ ████
|
||||||
|
████ ████████████████████████████████████████████████ ████ ██ ████████ ████
|
||||||
|
████ ████████████████████████████████████████████████ ████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████ ████ ██████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ████ ██████████████████████████████████████████████████████████████████ ████
|
||||||
|
████ ██████████ ████
|
||||||
|
████ ██████████████ ████
|
||||||
|
████ ██████████████ ████████████████████████████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████ ██ ████
|
||||||
|
████ ██████████████████████ ████████████████████████████████████████████████████████ ████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████████████████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████████████████████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████████████████████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████ ██████████████████████████████████████████████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████████████████████████████████████████████████ ██████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████████████████████ ████████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████████████████████████████████ ████████████████ ████
|
||||||
|
████ ██████████████████ ██████████████████████████████████████████████████████████████████ ████████████████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████████████████████████████████████████ ████████████████████ ████
|
||||||
|
████ ██████████████████ ██████████████████████████████████████████████████████████████ ████████████████████████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████████████████████████████████████ ██████████████████████████ ████
|
||||||
|
████ ████████████████ ████████████████████████████ ██████████████████████████████ ████████████████████████████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████ ██████████████████████████████ ██████████████████ ██████ ████
|
||||||
|
████ ██████████████████ ██████████████████████████ ████████████████████████████████ ████████████ ██████ ████
|
||||||
|
████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██ ████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████ ██████████████████████████████ ████████████████████ ████
|
||||||
|
████ ████████████████ ████████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||||
|
████ ████████████████ ████████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||||
|
████ ████████████████ ████████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████ ████████████████████████████████ ██████████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████ ████████████████████████████████ ██████████████████████ ████
|
||||||
|
████ ██████████████████ ██████████████████████ ████████████████████████████████ ██████████████████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████ ██████████████████████████████ ██████████████████████ ████
|
||||||
|
████ ██████████████████ ██████████████████████ ████████████████████████████████ ██████████████████ ████
|
||||||
|
████ ██████████████████ ██████████████████████ ████████████████████████████████ ████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████ ██████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████ ████████████████████████ ████████████████████████████████████ ██ ████
|
||||||
|
████ ██████████████ ████████████████████████ ██████████████████████████████████ ██████ ████
|
||||||
|
████ ████████████ ████████████████████████ ██████████████████████████████████████ ████ ████
|
||||||
|
████ ██████████ ████████████████████████ ████████████████████████████████████████ ██ ████
|
||||||
|
████ ████████ ██████████████████████ ████████████████████████████████████████ ██ ████
|
||||||
|
████ ████████ ████████████████████ ██████████████████████████████████████████ ██████ ████
|
||||||
|
████ ██████ ████████████████████ ██████████████████████████████████████████ ██████ ████
|
||||||
|
████ ████ ████████████████████ ████████████████████████████████████████ ████████ ████
|
||||||
|
████ ██ ████████████████████ ████████████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████████████████ ██████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████ ██████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████ ██████████ ████
|
||||||
|
████ ████████████████████ ██████████████████████████████████████████ ██████████ ████
|
||||||
|
████ ████████████████████ ████████████████████████████ ██████████████ ██████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████ ██████████████ ██████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████ ██████████████ ████ ████
|
||||||
|
████ ██████████████████ ████████████████████████████ ████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████ ██████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████ ██████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||||
|
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||||
|
████ ██████████████ ██████████████████████████████ ████████████████ ████
|
||||||
|
████ ██████████████ ████████████████████████████ ████████████████ ████
|
||||||
|
████ ████████████████ ████████ ████████ ██████████████ ████
|
||||||
|
████ ████████████████████ ████ ████ ████ ████ ██████████████ ████
|
||||||
|
████ ██████████████████████ ██ ████ ████ ██ ██ ██████████████ ████
|
||||||
|
████ ████████████████████████ ██ ██ ██ ██████████████ ████
|
||||||
|
████ ██████████████████ ██ ██ ████ ██ ██ ██████████████ ████
|
||||||
|
████ ████████████████ ██████ ████ ████ ████ ██████████████ ████
|
||||||
|
████ ████████████████ ██████ ██ ██ ████████████ ████
|
||||||
|
████ ████████████████ ██████ ████ ████ ████ ██████████ ████
|
||||||
|
████ ████████████████ ██████ ██ ██ ████ ██ ██ ██████████ ████
|
||||||
|
████ ██████████████████ ██ ████ ██ ██████████ ████
|
||||||
|
████ ████████████████████████ ████ ████ ██ ██ ██████████ ████
|
||||||
|
████ ██████████████████ ████ ████ ████ ████ ██████████ ████
|
||||||
|
████ ██████████ ████████ ██████████ ████
|
||||||
|
████ ████████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████████████████████ ████████ ████
|
||||||
|
████ ██████████████████████████████████ ████████ ████
|
||||||
|
████ ██████████████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████████████████ ████ ████
|
||||||
|
████ ████████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████████████████ ████ ████
|
||||||
|
████ ██████████████████████████████ ████ ████
|
||||||
|
████ ████████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████████████████ ██████ ████
|
||||||
|
████ ██████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████████████ ██████ ████
|
||||||
|
████ ████████████████████████████ ████████ ████
|
||||||
|
████ ██████████████████████████ ████████ ████
|
||||||
|
████ ████████████████████████ ██████████ ████
|
||||||
|
████ ████████████████████████ ████████ ████
|
||||||
|
████ ██████████████████████ ██████████ ████
|
||||||
|
████ ██████████████████████ ██████████ ████
|
||||||
|
████ ████████████████████ ████████████ ████
|
||||||
|
████ ████████████████████ ████████████ ████
|
||||||
|
████ ██████████████████ ████████████ ████
|
||||||
|
████ ████████████████████ ██████████████ ████
|
||||||
|
████ ██████████████████ ██████████████ ████
|
||||||
|
████ ██████████████████ ████████████████ ████
|
||||||
|
████ ████████████████ ██████████████ ████
|
||||||
|
████ ████████████████ ██████████████ ████
|
||||||
|
████ ██████████████ ████████████ ████
|
||||||
|
████ ██████████████ ████████████ ████
|
||||||
|
████ ██████████████ ██████████████ ████
|
||||||
|
████ ██████████████ ████████████████ ████
|
||||||
|
████ ██████████████████ ████████████████████ ████
|
||||||
|
████ ████████████████████ ████████████████████████ ████
|
||||||
|
████ ██████████████████████████ ██████████████████████ ████
|
||||||
|
████ ██████████████████████████████ ██████████████████████ ████
|
||||||
|
████ ██████████████████████████████ ████
|
||||||
|
████ ████
|
||||||
|
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
|
@ -7,36 +7,3 @@
|
||||||
extern void audioplayback_free(void* ptr);
|
extern void audioplayback_free(void* ptr);
|
||||||
extern const rb_data_type_t audioplayback_type;
|
extern const rb_data_type_t audioplayback_type;
|
||||||
extern VALUE audioplayback_klass;
|
extern VALUE audioplayback_klass;
|
||||||
|
|
||||||
/*
|
|
||||||
the code is my canvas..
|
|
||||||
██████ ██████ ██
|
|
||||||
████ ██ ████ ██ ████
|
|
||||||
██ ██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ████████
|
|
||||||
██ ██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ██ ██
|
|
||||||
██ ████ ██ ██ ██
|
|
||||||
██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██
|
|
||||||
██ ████ ████ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ██
|
|
||||||
██ ████ ████ ██ ████████████████ ████████ ██
|
|
||||||
██ ██ ██ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ██ ████ ██
|
|
||||||
██ ██████ ████ ██ ██ ██
|
|
||||||
██ ██ ██ ██ ████ ██ ██
|
|
||||||
████ ████ ████ ██████ ██████
|
|
||||||
████████████████████ ██████ ██ ██
|
|
||||||
██ ██████ ████
|
|
||||||
██
|
|
||||||
████
|
|
||||||
██
|
|
||||||
██
|
|
||||||
*/
|
|
||||||
|
|
@ -306,7 +306,7 @@ void graphicsBindingInit(){
|
||||||
_rb_define_module_function(module, "freeze", graphicsFreeze);
|
_rb_define_module_function(module, "freeze", graphicsFreeze);
|
||||||
_rb_define_module_function(module, "transition", graphicsTransition);
|
_rb_define_module_function(module, "transition", graphicsTransition);
|
||||||
_rb_define_module_function(module, "frame_reset", graphicsFrameReset);
|
_rb_define_module_function(module, "frame_reset", graphicsFrameReset);
|
||||||
_rb_define_module_function(module, "setVsync", graphicsSetVsync);
|
_rb_define_module_function(module, "vsync_mode=", graphicsSetVsync);
|
||||||
_rb_define_module_function(module, "__reset__", graphicsReset);
|
_rb_define_module_function(module, "__reset__", graphicsReset);
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,18 @@
|
||||||
#include "meow.h"
|
#include "meow.h"
|
||||||
#include "sharedstate.h"
|
#include "sharedstate.h"
|
||||||
|
|
||||||
static VALUE sunshine_set_crash_privacy(VALUE, VALUE v) {
|
static VALUE sunshineSetCrashPrivacy(VALUE, VALUE v) {
|
||||||
is_privacy_crashdump_enabled = RTEST(v);
|
is_privacy_crashdump_enabled = RTEST(v);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE sunshine_set_wallpaper_mode(VALUE, VALUE v) {
|
static VALUE sunshineSetWallpaperMode(VALUE, VALUE v) {
|
||||||
std::string s(StringValueCStr(v));
|
std::string s(StringValueCStr(v));
|
||||||
shState->config().wallpaperMode = s;
|
shState->config().wallpaperMode = s;
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE sunshine_set_hint(VALUE, VALUE h, VALUE v) {
|
static VALUE sunshineSetHint(VALUE, VALUE h, VALUE v) {
|
||||||
return SDL_SetHint(StringValueCStr(h), StringValueCStr(v));
|
return SDL_SetHint(StringValueCStr(h), StringValueCStr(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,9 +48,8 @@ static VALUE int_times(VALUE self) {
|
||||||
|
|
||||||
if (n <= 0) return self;
|
if (n <= 0) return self;
|
||||||
|
|
||||||
for (long i = 0; i < n; ++i) {
|
for (long i = 0; i < n; ++i)
|
||||||
rb_yield(LONG2NUM(i));
|
rb_yield(LONG2NUM(i));
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
@ -68,19 +67,16 @@ void SunshineBindingInit(){
|
||||||
#else
|
#else
|
||||||
rb_const_set(module, rb_intern("DEVBUILD"), Qfalse);
|
rb_const_set(module, rb_intern("DEVBUILD"), Qfalse);
|
||||||
#endif
|
#endif
|
||||||
rb_define_singleton_method(module, "crashprivacy=", RUBY_METHOD_FUNC(sunshine_set_crash_privacy), 1);
|
rb_define_singleton_method(module, "crash_privacy=", RUBY_METHOD_FUNC(sunshineSetCrashPrivacy), 1);
|
||||||
rb_define_singleton_method(module, "wallpapermode=", RUBY_METHOD_FUNC(sunshine_set_wallpaper_mode), 1);
|
rb_define_singleton_method(module, "wallpaper_mode=", RUBY_METHOD_FUNC(sunshineSetWallpaperMode), 1);
|
||||||
rb_define_singleton_method(module, "setSDLHint", RUBY_METHOD_FUNC(sunshine_set_hint), 2);
|
rb_define_singleton_method(module, "set_sdl_hint", RUBY_METHOD_FUNC(sunshineSetHint), 2);
|
||||||
//если методы доступны то просто не перезаписываем их
|
|
||||||
if (!rb_respond_to(rb_cObject, rb_intern("class"))) {
|
|
||||||
rb_define_method(rb_cObject, "class", rb_obj_class, 0);
|
|
||||||
}
|
|
||||||
//сразу для всех обьектов
|
|
||||||
if (!rb_respond_to(rb_cObject, rb_intern("clone"))) {
|
|
||||||
rb_define_method(rb_cObject, "clone", RUBY_METHOD_FUNC(obj_clone), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!rb_respond_to(rb_cInteger, rb_intern("times"))) {
|
if (!rb_respond_to(rb_cObject, rb_intern("class")))
|
||||||
|
rb_define_method(rb_cObject, "class", rb_obj_class, 0);
|
||||||
|
|
||||||
|
if (!rb_respond_to(rb_cObject, rb_intern("clone")))
|
||||||
|
rb_define_method(rb_cObject, "clone", RUBY_METHOD_FUNC(obj_clone), 0);
|
||||||
|
|
||||||
|
if (!rb_respond_to(rb_cInteger, rb_intern("times")))
|
||||||
rb_define_method(rb_cInteger, "times", RUBY_METHOD_FUNC(int_times), 0);
|
rb_define_method(rb_cInteger, "times", RUBY_METHOD_FUNC(int_times), 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,15 @@
|
||||||
static bool hasPictureURIDark = false;
|
static bool hasPictureURIDark = false;
|
||||||
// XFCE settings
|
// XFCE settings
|
||||||
static XfconfChannel* bgchannel;
|
static XfconfChannel* bgchannel;
|
||||||
static int defPictureStyle;
|
static std::vector<std::string> xfceMonitorPrefixes;
|
||||||
static int defColorStyle;
|
static std::map<std::string, std::string> defXfcePictureURI;
|
||||||
static GValue defColor = G_VALUE_INIT;
|
static std::map<std::string, int> defXfcePictureStyle;
|
||||||
static bool defColorExists;
|
static std::map<std::string, int> defXfceColorStyle;
|
||||||
static std::string optionImage, optionColor, optionImageStyle, optionColorStyle;
|
static std::map<std::string, GValue> defXfceColor;
|
||||||
|
static std::map<std::string, bool> defXfceColorExists;
|
||||||
|
static bool xfceHasSingleWorkspaceProps = false;
|
||||||
|
static bool xfceSingleWorkspaceMode = false;
|
||||||
|
static int xfceSingleWorkspaceNumber = 0;
|
||||||
// KDE settings
|
// KDE settings
|
||||||
static std::map<std::string, std::string> defPlugins, defPictures, defColors, defModes;
|
static std::map<std::string, std::string> defPlugins, defPictures, defColors, defModes;
|
||||||
static std::map<std::string, bool> defBlurs;
|
static std::map<std::string, bool> defBlurs;
|
||||||
|
|
@ -190,15 +194,55 @@
|
||||||
GError *xferror = NULL;
|
GError *xferror = NULL;
|
||||||
if (xfconf_init(&xferror)) {
|
if (xfconf_init(&xferror)) {
|
||||||
bgchannel = xfconf_channel_get("xfce4-desktop");
|
bgchannel = xfconf_channel_get("xfce4-desktop");
|
||||||
std::string optionPrefix = "/backdrop/screen0/monitor0/workspace0/";
|
|
||||||
optionImage = optionPrefix + "last-image";
|
GHashTable *props = xfconf_channel_get_properties(bgchannel, "/backdrop");
|
||||||
optionColor = optionPrefix + "color1";
|
if (props) {
|
||||||
optionImageStyle = optionPrefix + "image-style";
|
const std::string suffix = "/last-image";
|
||||||
optionColorStyle = optionPrefix + "color-style";
|
GHashTableIter iter;
|
||||||
defPictureURI = xfconf_channel_get_string(bgchannel, optionImage.c_str(), "");
|
gpointer key, value;
|
||||||
defPictureStyle = xfconf_channel_get_int(bgchannel, optionImageStyle.c_str(), -1);
|
g_hash_table_iter_init(&iter, props);
|
||||||
defColorExists = xfconf_channel_get_property(bgchannel, optionColor.c_str(), &defColor);
|
while (g_hash_table_iter_next(&iter, &key, &value)) {
|
||||||
defColorStyle = xfconf_channel_get_int(bgchannel, optionColorStyle.c_str(), -1);
|
std::string propPath((const char*)key);
|
||||||
|
if (propPath.size() > suffix.size() &&
|
||||||
|
propPath.compare(propPath.size() - suffix.size(), suffix.size(), suffix) == 0) {
|
||||||
|
xfceMonitorPrefixes.push_back(propPath.substr(0, propPath.size() - suffix.size() + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_hash_table_destroy(props);
|
||||||
|
}
|
||||||
|
if (xfceMonitorPrefixes.empty()) {
|
||||||
|
xfceMonitorPrefixes.push_back("/backdrop/screen0/monitor0/workspace0/");
|
||||||
|
}
|
||||||
|
|
||||||
|
xfceHasSingleWorkspaceProps = xfconf_channel_has_property(bgchannel, "/backdrop/single-workspace-mode");
|
||||||
|
if (xfceHasSingleWorkspaceProps) {
|
||||||
|
xfceSingleWorkspaceMode = xfconf_channel_get_bool(bgchannel, "/backdrop/single-workspace-mode", true);
|
||||||
|
xfceSingleWorkspaceNumber = xfconf_channel_get_int(bgchannel, "/backdrop/single-workspace-number", 0);
|
||||||
|
}
|
||||||
|
if (xfceHasSingleWorkspaceProps && xfceSingleWorkspaceMode) {
|
||||||
|
std::vector<std::string> extraPrefixes;
|
||||||
|
for (const std::string &prefix : xfceMonitorPrefixes) {
|
||||||
|
std::size_t workspacePos = prefix.rfind("/workspace");
|
||||||
|
if (workspacePos == std::string::npos)
|
||||||
|
continue;
|
||||||
|
std::string monitorBase = prefix.substr(0, workspacePos + 1);
|
||||||
|
std::string activePrefix = monitorBase + "workspace" + std::to_string(xfceSingleWorkspaceNumber) + "/";
|
||||||
|
if (std::find(xfceMonitorPrefixes.begin(), xfceMonitorPrefixes.end(), activePrefix) == xfceMonitorPrefixes.end() &&
|
||||||
|
std::find(extraPrefixes.begin(), extraPrefixes.end(), activePrefix) == extraPrefixes.end()) {
|
||||||
|
extraPrefixes.push_back(activePrefix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xfceMonitorPrefixes.insert(xfceMonitorPrefixes.end(), extraPrefixes.begin(), extraPrefixes.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const std::string &prefix : xfceMonitorPrefixes) {
|
||||||
|
defXfcePictureURI[prefix] = xfconf_channel_get_string(bgchannel, (prefix + "last-image").c_str(), "");
|
||||||
|
defXfcePictureStyle[prefix] = xfconf_channel_get_int(bgchannel, (prefix + "image-style").c_str(), -1);
|
||||||
|
defXfceColorStyle[prefix] = xfconf_channel_get_int(bgchannel, (prefix + "color-style").c_str(), -1);
|
||||||
|
GValue colorVal = G_VALUE_INIT;
|
||||||
|
defXfceColorExists[prefix] = xfconf_channel_get_property(bgchannel, (prefix + "color1").c_str(), &colorVal);
|
||||||
|
defXfceColor[prefix] = colorVal;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Configuration failed to initialize, we won't set the wallpaper
|
// Configuration failed to initialize, we won't set the wallpaper
|
||||||
printf("[desktopEnvironmentInit] Configuration failed to initialize, we won't set the wallpaper\n");
|
printf("[desktopEnvironmentInit] Configuration failed to initialize, we won't set the wallpaper\n");
|
||||||
|
|
@ -456,31 +500,17 @@ end:
|
||||||
unsigned int ub = b * 256 + b;
|
unsigned int ub = b * 256 + b;
|
||||||
unsigned int alpha = 65535;
|
unsigned int alpha = 65535;
|
||||||
std::string concatPath(gameDirStr + path);
|
std::string concatPath(gameDirStr + path);
|
||||||
|
for (const std::string &prefix : xfceMonitorPrefixes) {
|
||||||
|
std::string optionImage = prefix + "last-image";
|
||||||
|
std::string optionColor = prefix + "color1";
|
||||||
|
std::string optionImageStyle = prefix + "image-style";
|
||||||
|
std::string optionColorStyle = prefix + "color-style";
|
||||||
|
|
||||||
xfconf_channel_set_string(bgchannel, optionImage.c_str(), concatPath.c_str());
|
xfconf_channel_set_string(bgchannel, optionImage.c_str(), concatPath.c_str());
|
||||||
xfconf_channel_set_int(bgchannel, optionColorStyle.c_str(), 0);
|
xfconf_channel_set_int(bgchannel, optionColorStyle.c_str(), 0);
|
||||||
xfconf_channel_set_int(bgchannel, optionImageStyle.c_str(), 4);
|
xfconf_channel_set_int(bgchannel, optionImageStyle.c_str(), 4);
|
||||||
GValue colorValue = G_VALUE_INIT;
|
|
||||||
GPtrArray *colorArr = g_ptr_array_sized_new(4);
|
GPtrArray *colorArr = g_ptr_array_sized_new(4);
|
||||||
GType colorArrType = g_type_from_name("GPtrArray_GValue_");
|
|
||||||
//TODO:fix later
|
|
||||||
//if (!colorArrType) {
|
|
||||||
std::stringstream colorCommand;
|
|
||||||
colorCommand << "xfconf-query -c xfce4-desktop -n -p " << optionColor
|
|
||||||
<< " -t uint -t uint -t uint -t uint -s " << ub
|
|
||||||
<< " -s " << ug << " -s " << ub << " -s " << alpha;
|
|
||||||
Debug() << "xfconf-query -c xfce4-desktop -n -p " << optionColor
|
|
||||||
<< " -t uint -t uint -t uint -t uint -s " << ub
|
|
||||||
<< " -s " << ug << " -s " << ub << " -s " << alpha;
|
|
||||||
int colorCommandRes = system(colorCommand.str().c_str());
|
|
||||||
defColorExists = xfconf_channel_get_property(bgchannel, optionColor.c_str(), &defColor);
|
|
||||||
colorArrType = g_type_from_name("GPtrArray_GValue_");
|
|
||||||
if (!colorArrType) {
|
|
||||||
// Let's do some debug output here and skip changing the color
|
|
||||||
Debug() << "[wallpaperSet] WALLPAPER ERROR: xfconf-query call returned" << colorCommandRes;
|
|
||||||
return Qnil;
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
g_value_init(&colorValue, colorArrType);
|
|
||||||
GValue *vr = g_new0(GValue, 1);
|
GValue *vr = g_new0(GValue, 1);
|
||||||
GValue *vg = g_new0(GValue, 1);
|
GValue *vg = g_new0(GValue, 1);
|
||||||
GValue *vb = g_new0(GValue, 1);
|
GValue *vb = g_new0(GValue, 1);
|
||||||
|
|
@ -497,8 +527,20 @@ end:
|
||||||
g_ptr_array_add(colorArr, vg);
|
g_ptr_array_add(colorArr, vg);
|
||||||
g_ptr_array_add(colorArr, vb);
|
g_ptr_array_add(colorArr, vb);
|
||||||
g_ptr_array_add(colorArr, va);
|
g_ptr_array_add(colorArr, va);
|
||||||
g_value_set_boxed(&colorValue, colorArr);
|
if (!xfconf_channel_set_arrayv(bgchannel, optionColor.c_str(), colorArr)) {
|
||||||
xfconf_channel_set_property(bgchannel, optionColor.c_str(), &colorValue);
|
Debug() << "[wallpaperSet] WALLPAPER ERROR: xfconf_channel_set_arrayv failed for" << optionColor;
|
||||||
|
}
|
||||||
|
g_value_unset(vr);
|
||||||
|
g_value_unset(vg);
|
||||||
|
g_value_unset(vb);
|
||||||
|
g_value_unset(va);
|
||||||
|
g_free(vr);
|
||||||
|
g_free(vg);
|
||||||
|
g_free(vb);
|
||||||
|
g_free(va);
|
||||||
|
g_ptr_array_free(colorArr, TRUE);
|
||||||
|
}
|
||||||
|
system("xfdesktop --reload &");
|
||||||
} else if (desktop == "kde") {
|
} else if (desktop == "kde") {
|
||||||
std::stringstream command;
|
std::stringstream command;
|
||||||
std::string concatPath(gameDirStr + path);
|
std::string concatPath(gameDirStr + path);
|
||||||
|
|
@ -621,26 +663,38 @@ RB_METHOD(wallpaperReset){
|
||||||
g_settings_set_string(bgsetting, "primary-color", defPrimaryColor.c_str());
|
g_settings_set_string(bgsetting, "primary-color", defPrimaryColor.c_str());
|
||||||
g_settings_set_string(bgsetting, "color-shading-type", defColorShading.c_str());
|
g_settings_set_string(bgsetting, "color-shading-type", defColorShading.c_str());
|
||||||
} else if (desktop == "xfce") {
|
} else if (desktop == "xfce") {
|
||||||
if (defColorExists) {
|
for (const std::string &prefix : xfceMonitorPrefixes) {
|
||||||
xfconf_channel_set_property(bgchannel, optionColor.c_str(), &defColor);
|
std::string optionImage = prefix + "last-image";
|
||||||
|
std::string optionColor = prefix + "color1";
|
||||||
|
std::string optionImageStyle = prefix + "image-style";
|
||||||
|
std::string optionColorStyle = prefix + "color-style";
|
||||||
|
|
||||||
|
if (defXfceColorExists[prefix]) {
|
||||||
|
xfconf_channel_set_property(bgchannel, optionColor.c_str(), &defXfceColor[prefix]);
|
||||||
} else {
|
} else {
|
||||||
xfconf_channel_reset_property(bgchannel, optionColor.c_str(), false);
|
xfconf_channel_reset_property(bgchannel, optionColor.c_str(), false);
|
||||||
}
|
}
|
||||||
if (defPictureURI == "") {
|
if (defXfcePictureURI[prefix] == "") {
|
||||||
xfconf_channel_reset_property(bgchannel, optionImage.c_str(), false);
|
xfconf_channel_reset_property(bgchannel, optionImage.c_str(), false);
|
||||||
} else {
|
} else {
|
||||||
xfconf_channel_set_string(bgchannel, optionImage.c_str(), defPictureURI.c_str());
|
xfconf_channel_set_string(bgchannel, optionImage.c_str(), defXfcePictureURI[prefix].c_str());
|
||||||
}
|
}
|
||||||
if (defPictureStyle == -1) {
|
if (defXfcePictureStyle[prefix] == -1) {
|
||||||
xfconf_channel_reset_property(bgchannel, optionImageStyle.c_str(), false);
|
xfconf_channel_reset_property(bgchannel, optionImageStyle.c_str(), false);
|
||||||
} else {
|
} else {
|
||||||
xfconf_channel_set_int(bgchannel, optionImageStyle.c_str(), defPictureStyle);
|
xfconf_channel_set_int(bgchannel, optionImageStyle.c_str(), defXfcePictureStyle[prefix]);
|
||||||
}
|
}
|
||||||
if (defColorStyle == -1) {
|
if (defXfceColorStyle[prefix] == -1) {
|
||||||
xfconf_channel_reset_property(bgchannel, optionColorStyle.c_str(), false);
|
xfconf_channel_reset_property(bgchannel, optionColorStyle.c_str(), false);
|
||||||
} else {
|
} else {
|
||||||
xfconf_channel_set_int(bgchannel, optionColorStyle.c_str(), defColorStyle);
|
xfconf_channel_set_int(bgchannel, optionColorStyle.c_str(), defXfceColorStyle[prefix]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (xfceHasSingleWorkspaceProps && xfceSingleWorkspaceMode) {
|
||||||
|
xfconf_channel_set_bool(bgchannel, "/backdrop/single-workspace-mode", false);
|
||||||
|
xfconf_channel_set_bool(bgchannel, "/backdrop/single-workspace-mode", true);
|
||||||
|
}
|
||||||
|
system("xfdesktop --reload &");
|
||||||
} else if (desktop == "kde") {
|
} else if (desktop == "kde") {
|
||||||
std::stringstream command;
|
std::stringstream command;
|
||||||
command << "qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string:" <<
|
command << "qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string:" <<
|
||||||
|
|
|
||||||
|
|
@ -2,34 +2,33 @@ module Settings
|
||||||
class << self
|
class << self
|
||||||
def reset!
|
def reset!
|
||||||
@data = {
|
@data = {
|
||||||
# Audio
|
# ------------ Audio ------------
|
||||||
:master_volume => 100,
|
:master_volume => 100,
|
||||||
:bgm_volume => 100,
|
:bgm_volume => 100,
|
||||||
:sfx_volume => 100,
|
:sfx_volume => 100,
|
||||||
:use_fight_crime_track => false,
|
:fight_crime_track => false,
|
||||||
:use_old_self_contained_universe_reprise => false,
|
:old_reprise_song => false,
|
||||||
|
|
||||||
# Video
|
# ------------ Video ------------
|
||||||
:fullscreen => false,
|
:fullscreen => false,
|
||||||
:resolution => 0,
|
:resolution => 0,
|
||||||
:colorblind => false,
|
:colorblind => false,
|
||||||
:frameskip => true,
|
:frameskip => true,
|
||||||
:twm_shader => true,
|
:twm_shader => true,
|
||||||
:light => true,
|
:light => true,
|
||||||
:fog => true,
|
|
||||||
:scaling_mode => 0,
|
:scaling_mode => 0,
|
||||||
:vsync => 0,
|
:vsync => 0,
|
||||||
:max_particle_count_firefly => 30,
|
:max_firefly_count => 30,
|
||||||
:footprints => true,
|
:footprints => true,
|
||||||
:footsplashes => true,
|
:footsplashes => true,
|
||||||
|
|
||||||
# UI
|
# ------------- UI --------------
|
||||||
:in_game_timer => false,
|
:in_game_timer => false,
|
||||||
:language => 0,
|
:language => 0,
|
||||||
:fasttravel_ui => 0,
|
:fasttravel_ui => 0,
|
||||||
:mainmenu_background => 0,
|
:mainmenu_background => 0,
|
||||||
|
|
||||||
# Gameplay
|
# ---------- Gameplay -----------
|
||||||
:movement => 0,
|
:movement => 0,
|
||||||
:skip_text => false,
|
:skip_text => false,
|
||||||
:en_purple_messagebox => true,
|
:en_purple_messagebox => true,
|
||||||
|
|
@ -37,28 +36,28 @@ module Settings
|
||||||
:true_memory_mode => false,
|
:true_memory_mode => false,
|
||||||
:oneshot_mode => false,
|
:oneshot_mode => false,
|
||||||
:twm_shader_footprint => true,
|
:twm_shader_footprint => true,
|
||||||
:disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already => false,
|
:disable_api_puzzles => false, #disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already
|
||||||
:wallpaper_mode => 0,
|
:wallpaper_mode => 0,
|
||||||
|
|
||||||
# Advanced
|
# ---------- Advanced -----------
|
||||||
:crashlog_privacy => false,
|
:crashlog_privacy => false,
|
||||||
:streamer_privacy => false,
|
:streamer_privacy => false,
|
||||||
:SDL_HINT_INVALID_PARAM_CHECKS => false,
|
:invalid_param_checks => false,
|
||||||
|
|
||||||
#controls
|
# ---------- Сontrols -----------
|
||||||
:gamepad_type => -1,
|
:gamepad_type => -1,
|
||||||
:gamepad_face_style => 0,
|
:gamepad_face_style => 0,
|
||||||
:gamepad_led => true,
|
:gamepad_led => true,
|
||||||
:gamepad_deadzone => 5,
|
:gamepad_deadzone => 5,
|
||||||
|
|
||||||
# Debug
|
# ------------ Debug ------------
|
||||||
:debug => false,
|
:debug => false,
|
||||||
:debug_character => false,
|
:debug_character => false,
|
||||||
:debug_text_scene_title => true,
|
:debug_text_scene_title => true,
|
||||||
:debug_text => false,
|
:debug_text => false,
|
||||||
:debug_picture_names => false,
|
:debug_picture_names => false,
|
||||||
:debug_lightmap => false,
|
:debug_lightmap => false,
|
||||||
:SDL_HINT_SHUTDOWN_DBUS_ON_QUIT => false,
|
:shutdown_dbus_on_quit => false,
|
||||||
:profiler => false,
|
:profiler => false,
|
||||||
}
|
}
|
||||||
reset_controls!
|
reset_controls!
|
||||||
|
|
@ -185,13 +184,13 @@ class Window_Settings
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "ITS TIME FOR FIGHT CRIME",
|
:name => "ITS TIME FOR FIGHT CRIME",
|
||||||
:parameter => :use_fight_crime_track
|
:parameter => :fight_crime_track
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Use Old Self Contained Universe(Reprise) version",
|
:name => "Use Old Self Contained Universe(Reprise) version",
|
||||||
:icon => [1, 1],
|
:icon => [1, 1],
|
||||||
:parameter => :use_old_self_contained_universe_reprise
|
:parameter => :old_reprise_song
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"Video" => [
|
"Video" => [
|
||||||
|
|
@ -246,7 +245,7 @@ class Window_Settings
|
||||||
{
|
{
|
||||||
:type => :slider,
|
:type => :slider,
|
||||||
:name => "Density of glen fireflies",
|
:name => "Density of glen fireflies",
|
||||||
:parameter => :max_particle_count_firefly,
|
:parameter => :max_firefly_count,
|
||||||
:icon => [1, 1],
|
:icon => [1, 1],
|
||||||
:min => 0,
|
:min => 0,
|
||||||
:max => 30
|
:max => 30
|
||||||
|
|
@ -337,7 +336,7 @@ class Window_Settings
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Disable System API Dependent Puzzles(For wayland users)",
|
:name => "Disable System API Dependent Puzzles(For wayland users)",
|
||||||
:parameter => :disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already
|
:parameter => :disable_api_puzzles
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :enum,
|
:type => :enum,
|
||||||
|
|
@ -560,7 +559,7 @@ class Window_Settings
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "SDL_HINT_INVALID_PARAM_CHECKS",
|
:name => "SDL_HINT_INVALID_PARAM_CHECKS",
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
:parameter => :SDL_HINT_INVALID_PARAM_CHECKS
|
:parameter => :invalid_param_checks
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"Debug" => [
|
"Debug" => [
|
||||||
|
|
@ -603,7 +602,7 @@ class Window_Settings
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "SDL_HINT_SHUTDOWN_DBUS_ON_QUIT",
|
:name => "SDL_HINT_SHUTDOWN_DBUS_ON_QUIT",
|
||||||
:parameter => :SDL_HINT_SHUTDOWN_DBUS_ON_QUIT,
|
:parameter => :shutdown_dbus_on_quit,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -311,11 +311,6 @@ class Window_Settings
|
||||||
@selection_sprite.opacity = value
|
@selection_sprite.opacity = value
|
||||||
@screen_panel_selection_sprite.opacity = value
|
@screen_panel_selection_sprite.opacity = value
|
||||||
@switch_panels_hint_right.opacity = @switch_panels_hint_left.opacity = (value * 127) / 255
|
@switch_panels_hint_right.opacity = @switch_panels_hint_left.opacity = (value * 127) / 255
|
||||||
@parameters.each do |screen_name, screen_parameters|
|
|
||||||
screen_parameters.each do |parameter|
|
|
||||||
parameter.update
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def waiting_for_key=(value)
|
def waiting_for_key=(value)
|
||||||
|
|
@ -896,7 +891,7 @@ class Window_Settings
|
||||||
callback(:init, settings_content, screen_id, position, name, icon, parameter, init_value, callbacks) do
|
callback(:init, settings_content, screen_id, position, name, icon, parameter, init_value, callbacks) do
|
||||||
super(settings_content, screen_id, position, name, icon, parameter, init_value)
|
super(settings_content, screen_id, position, name, icon, parameter, init_value)
|
||||||
end
|
end
|
||||||
end
|
- end
|
||||||
def callback(name, *args)
|
def callback(name, *args)
|
||||||
original = proc { yield if block_given? }
|
original = proc { yield if block_given? }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,22 +8,24 @@ module Settings
|
||||||
|
|
||||||
# name must be same as the parameter identifier
|
# name must be same as the parameter identifier
|
||||||
|
|
||||||
def crashlog_privacy(value)
|
# ---------------------------------------------- Audio --------------------------------------------
|
||||||
Sunshine.crashprivacy=value
|
|
||||||
end
|
|
||||||
def master_volume(value)
|
def master_volume(value)
|
||||||
Audio.master_volume = value / 100.0
|
Audio.master_volume = value / 100.0
|
||||||
end
|
end
|
||||||
|
|
||||||
def bgm_volume(value)
|
def bgm_volume(value)
|
||||||
Audio.bgm_volume = value
|
Audio.bgm_volume = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def sfx_volume(value)
|
def sfx_volume(value)
|
||||||
Audio.sfx_volume = value
|
Audio.sfx_volume = value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# ---------------------------------------------- Video --------------------------------------------
|
||||||
def fullscreen(value)
|
def fullscreen(value)
|
||||||
Graphics.fullscreen = $console = value
|
Graphics.fullscreen = $console = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def resolution(value)
|
def resolution(value)
|
||||||
if (!Graphics::RESOLUTION_OVERRIDDEN)
|
if (!Graphics::RESOLUTION_OVERRIDDEN)
|
||||||
res_data = Graphics::RESOLUTIONS&.[](value) || {:width => 480, :height => 640}
|
res_data = Graphics::RESOLUTIONS&.[](value) || {:width => 480, :height => 640}
|
||||||
|
|
@ -36,80 +38,69 @@ module Settings
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def scaling_mode(value)
|
|
||||||
if value == 0
|
|
||||||
Graphics.smooth = false
|
|
||||||
else
|
|
||||||
Graphics.smooth = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def colorblind(value)
|
def colorblind(value)
|
||||||
$game_switches[252] = value
|
$game_switches[252] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
# UI
|
|
||||||
def in_game_timer(value)
|
|
||||||
$game_temp.igt_timer_visible = value
|
|
||||||
if $scene.is_a?(Scene_Map) && $scene&.in_game_timer
|
|
||||||
$scene.in_game_timer.visible = $game_temp.igt_timer_visible
|
|
||||||
end
|
|
||||||
end
|
|
||||||
def language(value)
|
|
||||||
$persistent.lang = Language::LANGUAGES[value]
|
|
||||||
$scene&.redraw
|
|
||||||
end
|
|
||||||
|
|
||||||
def movement(value)
|
|
||||||
$game_switches[251] = value != 0
|
|
||||||
end
|
|
||||||
def skip_text(value)
|
|
||||||
$game_switches[253] = value != 0
|
|
||||||
end
|
|
||||||
|
|
||||||
def frameskip(value)
|
def frameskip(value)
|
||||||
Graphics.frameskip = value
|
Graphics.frameskip = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def SDL_HINT_INVALID_PARAM_CHECKS(value)
|
def scaling_mode(value)
|
||||||
if value
|
Graphics.smooth = value != 0
|
||||||
Sunshine.setSDLHint("SDL_HINT_INVALID_PARAM_CHECKS", "1")
|
|
||||||
else
|
|
||||||
Sunshine.setSDLHint("SDL_HINT_INVALID_PARAM_CHECKS", "2")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
VSYNC_MODES = [1, -1, 0]
|
||||||
def vsync(value)
|
def vsync(value)
|
||||||
if value == 0
|
Graphics.vsync_mode = VSYNC_MODES[value]
|
||||||
Graphics.setVsync(1)
|
end
|
||||||
elsif value == 1
|
|
||||||
Graphics.setVsync(-1)
|
# ----------------------------------------------- UI -----------------------------------------------
|
||||||
else
|
def in_game_timer(value)
|
||||||
Graphics.setVsync(0)
|
$game_temp.igt_timer_visible = value
|
||||||
|
if $scene.is_a?(Scene_Map) && $scene&.in_game_timer
|
||||||
|
$scene.in_game_timer.visible = $game_temp.igt_timer_visible
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def SDL_HINT_SHUTDOWN_DBUS_ON_QUIT(value)
|
def language(value)
|
||||||
if value
|
$persistent.lang = Language::LANGUAGES[value]
|
||||||
Sunshine.setSDLHint("SDL_HINT_SHUTDOWN_DBUS_ON_QUIT", "1")
|
$scene&.redraw
|
||||||
else
|
|
||||||
Sunshine.setSDLHint("SDL_HINT_SHUTDOWN_DBUS_ON_QUIT", "0")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# -------------------------------------------- Gameplay --------------------------------------------
|
||||||
|
def movement(value)
|
||||||
|
$game_switches[251] = value != 0
|
||||||
|
end
|
||||||
|
|
||||||
|
def skip_text(value)
|
||||||
|
$game_switches[253] = value != 0
|
||||||
|
end
|
||||||
|
|
||||||
|
WALLPAPER_MODES = ["normal", "fallback", "disbled"]
|
||||||
|
def wallpaper_mode(value)
|
||||||
|
Sunshine.wallpaper_mode = WALLPAPER_MODES[value]
|
||||||
|
end
|
||||||
|
|
||||||
|
# -------------------------------------------- Advanced --------------------------------------------
|
||||||
|
def crashlog_privacy(value)
|
||||||
|
Sunshine.crash_privacy = value
|
||||||
|
end
|
||||||
|
|
||||||
|
def invalid_param_checks(value)
|
||||||
|
Sunshine.set_sdl_hint("SDL_HINT_INVALID_PARAM_CHECKS", value ? "1" : "2")
|
||||||
|
end
|
||||||
|
|
||||||
|
# --------------------------------------------- Debug ----------------------------------------------
|
||||||
|
def shutdown_dbus_on_quit(value)
|
||||||
|
Sunshine.set_sdl_hint("SDL_HINT_SHUTDOWN_DBUS_ON_QUIT", value ? "1" : "0")
|
||||||
end
|
end
|
||||||
|
|
||||||
def profiler(value)
|
def profiler(value)
|
||||||
Profiler.set(value)
|
Profiler.set(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
def wallpaper_mode(value)
|
# --------------------------------------------- End :3 ---------------------------------------------
|
||||||
if value == 0
|
|
||||||
Sunshine.wallpapermode="normal"
|
|
||||||
elsif value == 1
|
|
||||||
Sunshine.wallpapermode="fallback"
|
|
||||||
else
|
|
||||||
Sunshine.wallpapermode="disabled"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ class Spriteset_Map
|
||||||
case @particles_type
|
case @particles_type
|
||||||
when :fireflies
|
when :fireflies
|
||||||
klass = Particle_Firefly
|
klass = Particle_Firefly
|
||||||
count = Settings[:max_particle_count_firefly]
|
count = Settings[:max_firefly_count]
|
||||||
layer = :front
|
layer = :front
|
||||||
when :shrimp
|
when :shrimp
|
||||||
klass = Particle_Shrimp
|
klass = Particle_Shrimp
|
||||||
|
|
|
||||||
|
|
@ -152,28 +152,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHAREDSTATE_H
|
#endif // SHAREDSTATE_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* this is not part of mkxp :|
|
|
||||||
meow meow
|
|
||||||
meow meow
|
|
||||||
meow meow meow meow
|
|
||||||
meow meow meow meow
|
|
||||||
meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow
|
|
||||||
meow meow meow meow meow meow meow meow
|
|
||||||
*/
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue