mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-21 06:19:56 +00:00
a
This commit is contained in:
commit
0464354a2c
14 changed files with 561 additions and 369 deletions
27
README.md
27
README.md
|
|
@ -1,30 +1,5 @@
|
|||
# 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.
|
||||
|
||||
## 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
|
||||
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.
|
||||
|
||||
# Mirrors
|
||||
[Github](https://github.com/CatWindowTeam/mkxp-sunshine/tree/master)
|
||||
|
|
|
|||
20
arts/MeowCat.txt
Normal file
20
arts/MeowCat.txt
Normal file
|
|
@ -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
|
||||
30
arts/MeowingCat.txt
Normal file
30
arts/MeowingCat.txt
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
the code is my canvas..
|
||||
██████ ██████ ██
|
||||
████ ██ ████ ██ ████
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ████████
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██
|
||||
██ ████ ██ ██ ██
|
||||
██ ██ ██ ██
|
||||
██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██
|
||||
██ ██ ██ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ████ ████ ██ ████████████████ ████████ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ████ ██
|
||||
██ ██████ ████ ██ ██ ██
|
||||
██ ██ ██ ██ ████ ██ ██
|
||||
████ ████ ████ ██████ ██████
|
||||
████████████████████ ██████ ██ ██
|
||||
██ ██████ ████
|
||||
██
|
||||
████
|
||||
██
|
||||
██
|
||||
3
arts/README.md
Normal file
3
arts/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Arts
|
||||
|
||||
Just some random art drawn during a break from coding 🗦(^.ꞈ.^)🗧
|
||||
187
arts/WhiteCatWindow.txt
Normal file
187
arts/WhiteCatWindow.txt
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||
████████████ ██████████████████████████████████ ██████████████████████████████████████████████████████████ ████████ ██████
|
||||
██████████ ████████ ████████████ ████████████████ ██ ████████████████████████████████████████████████████████ ████ ██████
|
||||
████████ ████████████████ ██████ ██████████ ██████ ██████████████████████████████████████████████████████████ ████████
|
||||
████████ ██████████████ ██ ██ ████████ ████ ██████████████████████████████████████████████████████████████ ██████████
|
||||
████████ ██████████████ ██ ████ ████████████████████ ████████████████████████████████████████████████████████████ ██████████
|
||||
████████ ██████████████ ██ ████ ████████████████████ ██████████████████████████████████████████████████████████ ████████
|
||||
██████████ ████████ ██ ██ ████ ██ ████████ ██ ██ ████████████████████████████████████████████████████████ ████ ██████
|
||||
████████████ ██████ ██ ████ ██████████ ████ ██████████████████████████████████████████████████████████ ████████ ██████
|
||||
██████████████████████████████████████████████ ████████████████████████████████████████████████████████████████████████████████████████
|
||||
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||
████ ████
|
||||
████ ██████ ████
|
||||
████ ████████ ████
|
||||
████ ████████ ████
|
||||
████ ██████████ ████
|
||||
████ ██████████ ████
|
||||
████ ████████████ ████
|
||||
████ ██████████████ ████
|
||||
████ ██████████████ ████
|
||||
████ ████████████████ ████
|
||||
████ ████████████████ ██████ ████
|
||||
████ ██████████████████ ████████ ████
|
||||
████ ██████████████████ ████████████ ████
|
||||
████ ████████████████████ ████████████████ ████
|
||||
████ ██████████████████████ ████████████████████ ████
|
||||
████ ██████████████████████ ██████████████████████ ████
|
||||
████ ████████████████████████ ██████████████████████████ ████
|
||||
████ ████████████████████████ ████████████████████████████ ████
|
||||
████ ██████████████████████████ ████████████████████████████████ ████
|
||||
████ ████████████████████████ ████████████████████████████████ ████
|
||||
████ ██████████████████████████ ████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████ ██████ ████████████████████████████████████████████ ████
|
||||
████ ████████████████ ████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████ ██████ ██████ ████
|
||||
████ ██████████████████████████████████████████████ ████████ ████████ ████
|
||||
████ ██████████████████████████████████████████████ ████████ ████████ ████
|
||||
████ ██████████████████████████████████████████████ ████████ ████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████████ ██████ ██████████ ████
|
||||
████ ████████████████████████████████████████████████ ████ ██ ████████ ████
|
||||
████ ████████████████████████████████████████████████ ████████ ████
|
||||
████ ██████████████████████████████████████████████████ ████ ██████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████████████████████████████████████████████████████████████████████ ████
|
||||
████ ████ ██████████████████████████████████████████████████████████████████ ████
|
||||
████ ██████████ ████
|
||||
████ ██████████████ ████
|
||||
████ ██████████████ ████████████████████████████ ████
|
||||
████ ██████████████████ ████████████████████████████████████████████████████ ████
|
||||
████ ████████████████████ ████████████████████████████████████████████████████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████ ██ ████
|
||||
████ ██████████████████████ ████████████████████████████████████████████████████████ ████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████ ██████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████████████████ ██████ ████
|
||||
████ ████████████████████ ████████████████████████████████████████████████████████████████████ ████████ ████
|
||||
████ ████████████████████ ████████████████████████████████████████████████████████████████████ ██████ ████
|
||||
████ ████████████████████ ████████████████████████████████████████████████████████████████████████ ████████ ████
|
||||
████ ████████████████████ ████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||
████ ██████████████████ ████████████████████████████████████████████████████████████████████████████ ██████ ████
|
||||
████ ██████████████████ ██████████████████████████████████████████████████████████████████████████ ████████ ████
|
||||
████ ████████████████████ ████████████████████████████████████████████████████████████████████████ ██████████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████████████████████ ████████████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████████████████████████████████ ████████████████ ████
|
||||
████ ██████████████████ ██████████████████████████████████████████████████████████████████ ████████████████ ████
|
||||
████ ██████████████████ ████████████████████████████████████████████████████████████████ ████████████████████ ████
|
||||
████ ██████████████████ ██████████████████████████████████████████████████████████████ ████████████████████████ ████
|
||||
████ ██████████████████ ████████████████████████████████████████████████████████████ ██████████████████████████ ████
|
||||
████ ████████████████ ████████████████████████████ ██████████████████████████████ ████████████████████████████ ████
|
||||
████ ██████████████████ ████████████████████████████ ██████████████████████████████ ██████████████████ ██████ ████
|
||||
████ ██████████████████ ██████████████████████████ ████████████████████████████████ ████████████ ██████ ████
|
||||
████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██ ████████ ████
|
||||
████ ████████████████ ██████████████████████████ ██████████████████████████████ ████████████████████ ████
|
||||
████ ████████████████ ████████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||
████ ████████████████ ████████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||
████ ████████████████ ████████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████ ██████████████████████████████ ████████████████████████ ████
|
||||
████ ████████████████ ██████████████████████ ████████████████████████████████ ██████████████████████ ████
|
||||
████ ████████████████ ██████████████████████ ████████████████████████████████ ██████████████████████ ████
|
||||
████ ██████████████████ ██████████████████████ ████████████████████████████████ ██████████████████████ ████
|
||||
████ ████████████████████ ██████████████████████ ██████████████████████████████ ██████████████████████ ████
|
||||
████ ██████████████████ ██████████████████████ ████████████████████████████████ ██████████████████ ████
|
||||
████ ██████████████████ ██████████████████████ ████████████████████████████████ ████████████████ ████
|
||||
████ ████████████████ ██████████████████████ ██████████████████████████████████ ████████ ████
|
||||
████ ████████████████ ████████████████████████ ████████████████████████████████████ ██ ████
|
||||
████ ██████████████ ████████████████████████ ██████████████████████████████████ ██████ ████
|
||||
████ ████████████ ████████████████████████ ██████████████████████████████████████ ████ ████
|
||||
████ ██████████ ████████████████████████ ████████████████████████████████████████ ██ ████
|
||||
████ ████████ ██████████████████████ ████████████████████████████████████████ ██ ████
|
||||
████ ████████ ████████████████████ ██████████████████████████████████████████ ██████ ████
|
||||
████ ██████ ████████████████████ ██████████████████████████████████████████ ██████ ████
|
||||
████ ████ ████████████████████ ████████████████████████████████████████ ████████ ████
|
||||
████ ██ ████████████████████ ████████████████████████████████████████ ████████ ████
|
||||
████ ████████████████████ ████████████████████████████████████████ ██████████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████ ██████████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████ ██████████ ████
|
||||
████ ████████████████████ ██████████████████████████████████████████ ██████████ ████
|
||||
████ ████████████████████ ████████████████████████████ ██████████████ ██████ ████
|
||||
████ ██████████████████ ████████████████████████████ ██████████████ ██████ ████
|
||||
████ ██████████████████ ████████████████████████████ ██████████████ ████ ████
|
||||
████ ██████████████████ ████████████████████████████ ████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████ ██████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████ ██████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||
████ ████████████████ ██████████████████████████████ ████████████████ ████
|
||||
████ ██████████████ ██████████████████████████████ ████████████████ ████
|
||||
████ ██████████████ ████████████████████████████ ████████████████ ████
|
||||
████ ████████████████ ████████ ████████ ██████████████ ████
|
||||
████ ████████████████████ ████ ████ ████ ████ ██████████████ ████
|
||||
████ ██████████████████████ ██ ████ ████ ██ ██ ██████████████ ████
|
||||
████ ████████████████████████ ██ ██ ██ ██████████████ ████
|
||||
████ ██████████████████ ██ ██ ████ ██ ██ ██████████████ ████
|
||||
████ ████████████████ ██████ ████ ████ ████ ██████████████ ████
|
||||
████ ████████████████ ██████ ██ ██ ████████████ ████
|
||||
████ ████████████████ ██████ ████ ████ ████ ██████████ ████
|
||||
████ ████████████████ ██████ ██ ██ ████ ██ ██ ██████████ ████
|
||||
████ ██████████████████ ██ ████ ██ ██████████ ████
|
||||
████ ████████████████████████ ████ ████ ██ ██ ██████████ ████
|
||||
████ ██████████████████ ████ ████ ████ ████ ██████████ ████
|
||||
████ ██████████ ████████ ██████████ ████
|
||||
████ ████████████████████████████████████ ████████ ████
|
||||
████ ████████████████████████████████████ ████████ ████
|
||||
████ ████████████████████████████████████ ████████ ████
|
||||
████ ████████████████████████████████████ ████████ ████
|
||||
████ ██████████████████████████████████ ████████ ████
|
||||
████ ██████████████████████████████████ ████████ ████
|
||||
████ ████████████████████████████████ ████ ████
|
||||
████ ████████████████████████████████ ██████ ████
|
||||
████ ██████████████████████████████ ██████ ████
|
||||
████ ██████████████████████████████ ██████ ████
|
||||
████ ████████████████████████████ ██████ ████
|
||||
████ ██████████████████████████████ ██████ ████
|
||||
████ ██████████████████████████████ ██████ ████
|
||||
████ ██████████████████████████████ ████ ████
|
||||
████ ██████████████████████████████ ████ ████
|
||||
████ ████████████████████████████████ ██████ ████
|
||||
████ ████████████████████████████████ ██████ ████
|
||||
████ ██████████████████████████████ ██████ ████
|
||||
████ ██████████████████████████████ ██████ ████
|
||||
████ ████████████████████████████ ██████ ████
|
||||
████ ████████████████████████████ ████████ ████
|
||||
████ ██████████████████████████ ████████ ████
|
||||
████ ████████████████████████ ██████████ ████
|
||||
████ ████████████████████████ ████████ ████
|
||||
████ ██████████████████████ ██████████ ████
|
||||
████ ██████████████████████ ██████████ ████
|
||||
████ ████████████████████ ████████████ ████
|
||||
████ ████████████████████ ████████████ ████
|
||||
████ ██████████████████ ████████████ ████
|
||||
████ ████████████████████ ██████████████ ████
|
||||
████ ██████████████████ ██████████████ ████
|
||||
████ ██████████████████ ████████████████ ████
|
||||
████ ████████████████ ██████████████ ████
|
||||
████ ████████████████ ██████████████ ████
|
||||
████ ██████████████ ████████████ ████
|
||||
████ ██████████████ ████████████ ████
|
||||
████ ██████████████ ██████████████ ████
|
||||
████ ██████████████ ████████████████ ████
|
||||
████ ██████████████████ ████████████████████ ████
|
||||
████ ████████████████████ ████████████████████████ ████
|
||||
████ ██████████████████████████ ██████████████████████ ████
|
||||
████ ██████████████████████████████ ██████████████████████ ████
|
||||
████ ██████████████████████████████ ████
|
||||
████ ████
|
||||
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
||||
|
|
@ -6,37 +6,4 @@
|
|||
|
||||
extern void audioplayback_free(void* ptr);
|
||||
extern const rb_data_type_t audioplayback_type;
|
||||
extern VALUE audioplayback_klass;
|
||||
|
||||
/*
|
||||
the code is my canvas..
|
||||
██████ ██████ ██
|
||||
████ ██ ████ ██ ████
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ████████
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██
|
||||
██ ████ ██ ██ ██
|
||||
██ ██ ██ ██
|
||||
██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██
|
||||
██ ██ ██ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ████ ████ ██ ████████████████ ████████ ██
|
||||
██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██ ██ ████ ██
|
||||
██ ██████ ████ ██ ██ ██
|
||||
██ ██ ██ ██ ████ ██ ██
|
||||
████ ████ ████ ██████ ██████
|
||||
████████████████████ ██████ ██ ██
|
||||
██ ██████ ████
|
||||
██
|
||||
████
|
||||
██
|
||||
██
|
||||
*/
|
||||
extern VALUE audioplayback_klass;
|
||||
|
|
@ -306,7 +306,7 @@ void graphicsBindingInit(){
|
|||
_rb_define_module_function(module, "freeze", graphicsFreeze);
|
||||
_rb_define_module_function(module, "transition", graphicsTransition);
|
||||
_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);
|
||||
|
||||
// Variables
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@
|
|||
#include "meow.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);
|
||||
return v;
|
||||
}
|
||||
|
||||
static VALUE sunshine_set_wallpaper_mode(VALUE, VALUE v) {
|
||||
static VALUE sunshineSetWallpaperMode(VALUE, VALUE v) {
|
||||
std::string s(StringValueCStr(v));
|
||||
shState->config().wallpaperMode = s;
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
@ -48,9 +48,8 @@ static VALUE int_times(VALUE self) {
|
|||
|
||||
if (n <= 0) return self;
|
||||
|
||||
for (long i = 0; i < n; ++i) {
|
||||
for (long i = 0; i < n; ++i)
|
||||
rb_yield(LONG2NUM(i));
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
@ -68,19 +67,16 @@ void SunshineBindingInit(){
|
|||
#else
|
||||
rb_const_set(module, rb_intern("DEVBUILD"), Qfalse);
|
||||
#endif
|
||||
rb_define_singleton_method(module, "crashprivacy=", RUBY_METHOD_FUNC(sunshine_set_crash_privacy), 1);
|
||||
rb_define_singleton_method(module, "wallpapermode=", RUBY_METHOD_FUNC(sunshine_set_wallpaper_mode), 1);
|
||||
rb_define_singleton_method(module, "setSDLHint", RUBY_METHOD_FUNC(sunshine_set_hint), 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);
|
||||
}
|
||||
rb_define_singleton_method(module, "crash_privacy=", RUBY_METHOD_FUNC(sunshineSetCrashPrivacy), 1);
|
||||
rb_define_singleton_method(module, "wallpaper_mode=", RUBY_METHOD_FUNC(sunshineSetWallpaperMode), 1);
|
||||
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_cInteger, rb_intern("times")))
|
||||
rb_define_method(rb_cInteger, "times", RUBY_METHOD_FUNC(int_times), 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,11 +49,15 @@
|
|||
static bool hasPictureURIDark = false;
|
||||
// XFCE settings
|
||||
static XfconfChannel* bgchannel;
|
||||
static int defPictureStyle;
|
||||
static int defColorStyle;
|
||||
static GValue defColor = G_VALUE_INIT;
|
||||
static bool defColorExists;
|
||||
static std::string optionImage, optionColor, optionImageStyle, optionColorStyle;
|
||||
static std::vector<std::string> xfceMonitorPrefixes;
|
||||
static std::map<std::string, std::string> defXfcePictureURI;
|
||||
static std::map<std::string, int> defXfcePictureStyle;
|
||||
static std::map<std::string, int> defXfceColorStyle;
|
||||
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
|
||||
static std::map<std::string, std::string> defPlugins, defPictures, defColors, defModes;
|
||||
static std::map<std::string, bool> defBlurs;
|
||||
|
|
@ -190,15 +194,55 @@
|
|||
GError *xferror = NULL;
|
||||
if (xfconf_init(&xferror)) {
|
||||
bgchannel = xfconf_channel_get("xfce4-desktop");
|
||||
std::string optionPrefix = "/backdrop/screen0/monitor0/workspace0/";
|
||||
optionImage = optionPrefix + "last-image";
|
||||
optionColor = optionPrefix + "color1";
|
||||
optionImageStyle = optionPrefix + "image-style";
|
||||
optionColorStyle = optionPrefix + "color-style";
|
||||
defPictureURI = xfconf_channel_get_string(bgchannel, optionImage.c_str(), "");
|
||||
defPictureStyle = xfconf_channel_get_int(bgchannel, optionImageStyle.c_str(), -1);
|
||||
defColorExists = xfconf_channel_get_property(bgchannel, optionColor.c_str(), &defColor);
|
||||
defColorStyle = xfconf_channel_get_int(bgchannel, optionColorStyle.c_str(), -1);
|
||||
|
||||
GHashTable *props = xfconf_channel_get_properties(bgchannel, "/backdrop");
|
||||
if (props) {
|
||||
const std::string suffix = "/last-image";
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
g_hash_table_iter_init(&iter, props);
|
||||
while (g_hash_table_iter_next(&iter, &key, &value)) {
|
||||
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 {
|
||||
// Configuration failed to initialize, we won't set the wallpaper
|
||||
printf("[desktopEnvironmentInit] Configuration failed to initialize, we won't set the wallpaper\n");
|
||||
|
|
@ -456,49 +500,47 @@ end:
|
|||
unsigned int ub = b * 256 + b;
|
||||
unsigned int alpha = 65535;
|
||||
std::string concatPath(gameDirStr + path);
|
||||
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, optionImageStyle.c_str(), 4);
|
||||
GValue colorValue = G_VALUE_INIT;
|
||||
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;
|
||||
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_int(bgchannel, optionColorStyle.c_str(), 0);
|
||||
xfconf_channel_set_int(bgchannel, optionImageStyle.c_str(), 4);
|
||||
|
||||
GPtrArray *colorArr = g_ptr_array_sized_new(4);
|
||||
GValue *vr = g_new0(GValue, 1);
|
||||
GValue *vg = g_new0(GValue, 1);
|
||||
GValue *vb = g_new0(GValue, 1);
|
||||
GValue *va = g_new0(GValue, 1);
|
||||
g_value_init(vr, G_TYPE_UINT);
|
||||
g_value_init(vg, G_TYPE_UINT);
|
||||
g_value_init(vb, G_TYPE_UINT);
|
||||
g_value_init(va, G_TYPE_UINT);
|
||||
g_value_set_uint(vr, ur);
|
||||
g_value_set_uint(vg, ug);
|
||||
g_value_set_uint(vb, ub);
|
||||
g_value_set_uint(va, alpha);
|
||||
g_ptr_array_add(colorArr, vr);
|
||||
g_ptr_array_add(colorArr, vg);
|
||||
g_ptr_array_add(colorArr, vb);
|
||||
g_ptr_array_add(colorArr, va);
|
||||
if (!xfconf_channel_set_arrayv(bgchannel, optionColor.c_str(), colorArr)) {
|
||||
Debug() << "[wallpaperSet] WALLPAPER ERROR: xfconf_channel_set_arrayv failed for" << optionColor;
|
||||
}
|
||||
//}
|
||||
g_value_init(&colorValue, colorArrType);
|
||||
GValue *vr = g_new0(GValue, 1);
|
||||
GValue *vg = g_new0(GValue, 1);
|
||||
GValue *vb = g_new0(GValue, 1);
|
||||
GValue *va = g_new0(GValue, 1);
|
||||
g_value_init(vr, G_TYPE_UINT);
|
||||
g_value_init(vg, G_TYPE_UINT);
|
||||
g_value_init(vb, G_TYPE_UINT);
|
||||
g_value_init(va, G_TYPE_UINT);
|
||||
g_value_set_uint(vr, ur);
|
||||
g_value_set_uint(vg, ug);
|
||||
g_value_set_uint(vb, ub);
|
||||
g_value_set_uint(va, alpha);
|
||||
g_ptr_array_add(colorArr, vr);
|
||||
g_ptr_array_add(colorArr, vg);
|
||||
g_ptr_array_add(colorArr, vb);
|
||||
g_ptr_array_add(colorArr, va);
|
||||
g_value_set_boxed(&colorValue, colorArr);
|
||||
xfconf_channel_set_property(bgchannel, optionColor.c_str(), &colorValue);
|
||||
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") {
|
||||
std::stringstream command;
|
||||
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, "color-shading-type", defColorShading.c_str());
|
||||
} else if (desktop == "xfce") {
|
||||
if (defColorExists) {
|
||||
xfconf_channel_set_property(bgchannel, optionColor.c_str(), &defColor);
|
||||
} else {
|
||||
xfconf_channel_reset_property(bgchannel, optionColor.c_str(), false);
|
||||
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";
|
||||
|
||||
if (defXfceColorExists[prefix]) {
|
||||
xfconf_channel_set_property(bgchannel, optionColor.c_str(), &defXfceColor[prefix]);
|
||||
} else {
|
||||
xfconf_channel_reset_property(bgchannel, optionColor.c_str(), false);
|
||||
}
|
||||
if (defXfcePictureURI[prefix] == "") {
|
||||
xfconf_channel_reset_property(bgchannel, optionImage.c_str(), false);
|
||||
} else {
|
||||
xfconf_channel_set_string(bgchannel, optionImage.c_str(), defXfcePictureURI[prefix].c_str());
|
||||
}
|
||||
if (defXfcePictureStyle[prefix] == -1) {
|
||||
xfconf_channel_reset_property(bgchannel, optionImageStyle.c_str(), false);
|
||||
} else {
|
||||
xfconf_channel_set_int(bgchannel, optionImageStyle.c_str(), defXfcePictureStyle[prefix]);
|
||||
}
|
||||
if (defXfceColorStyle[prefix] == -1) {
|
||||
xfconf_channel_reset_property(bgchannel, optionColorStyle.c_str(), false);
|
||||
} else {
|
||||
xfconf_channel_set_int(bgchannel, optionColorStyle.c_str(), defXfceColorStyle[prefix]);
|
||||
}
|
||||
}
|
||||
if (defPictureURI == "") {
|
||||
xfconf_channel_reset_property(bgchannel, optionImage.c_str(), false);
|
||||
} else {
|
||||
xfconf_channel_set_string(bgchannel, optionImage.c_str(), defPictureURI.c_str());
|
||||
}
|
||||
if (defPictureStyle == -1) {
|
||||
xfconf_channel_reset_property(bgchannel, optionImageStyle.c_str(), false);
|
||||
} else {
|
||||
xfconf_channel_set_int(bgchannel, optionImageStyle.c_str(), defPictureStyle);
|
||||
}
|
||||
if (defColorStyle == -1) {
|
||||
xfconf_channel_reset_property(bgchannel, optionColorStyle.c_str(), false);
|
||||
} else {
|
||||
xfconf_channel_set_int(bgchannel, optionColorStyle.c_str(), defColorStyle);
|
||||
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") {
|
||||
std::stringstream command;
|
||||
command << "qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string:" <<
|
||||
|
|
|
|||
|
|
@ -2,133 +2,132 @@ module Settings
|
|||
class << self
|
||||
def reset!
|
||||
@data = {
|
||||
# Audio
|
||||
:master_volume => 100,
|
||||
:bgm_volume => 100,
|
||||
:sfx_volume => 100,
|
||||
:use_fight_crime_track => false,
|
||||
:use_old_self_contained_universe_reprise => false,
|
||||
# ------------ Audio ------------
|
||||
:master_volume => 100,
|
||||
:bgm_volume => 100,
|
||||
:sfx_volume => 100,
|
||||
:fight_crime_track => false,
|
||||
:old_reprise_song => false,
|
||||
|
||||
# Video
|
||||
:fullscreen => false,
|
||||
:resolution => 0,
|
||||
:colorblind => false,
|
||||
:frameskip => true,
|
||||
:twm_shader => true,
|
||||
:light => true,
|
||||
:fog => true,
|
||||
:scaling_mode => 0,
|
||||
:vsync => 0,
|
||||
:max_particle_count_firefly => 30,
|
||||
:footprints => true,
|
||||
:footsplashes => true,
|
||||
# ------------ Video ------------
|
||||
:fullscreen => false,
|
||||
:resolution => 0,
|
||||
:colorblind => false,
|
||||
:frameskip => true,
|
||||
:twm_shader => true,
|
||||
:light => true,
|
||||
:scaling_mode => 0,
|
||||
:vsync => 0,
|
||||
:max_firefly_count => 30,
|
||||
:footprints => true,
|
||||
:footsplashes => true,
|
||||
|
||||
# ------------- UI --------------
|
||||
:in_game_timer => false,
|
||||
:language => 0,
|
||||
:fasttravel_ui => 0,
|
||||
:mainmenu_background => 0,
|
||||
|
||||
# ---------- Gameplay -----------
|
||||
:movement => 0,
|
||||
:skip_text => false,
|
||||
:en_purple_messagebox => true,
|
||||
:enforce_april_fools => false,
|
||||
:true_memory_mode => false,
|
||||
:oneshot_mode => false,
|
||||
:twm_shader_footprint => true,
|
||||
:disable_api_puzzles => false, #disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already
|
||||
:wallpaper_mode => 0,
|
||||
|
||||
# ---------- Advanced -----------
|
||||
:crashlog_privacy => false,
|
||||
:streamer_privacy => false,
|
||||
:invalid_param_checks => false,
|
||||
|
||||
# UI
|
||||
:in_game_timer => false,
|
||||
:language => 0,
|
||||
:fasttravel_ui => 0,
|
||||
:mainmenu_background => 0,
|
||||
# ---------- Сontrols -----------
|
||||
:gamepad_type => -1,
|
||||
:gamepad_face_style => 0,
|
||||
:gamepad_led => true,
|
||||
:gamepad_deadzone => 5,
|
||||
|
||||
# Gameplay
|
||||
:movement => 0,
|
||||
:skip_text => false,
|
||||
:en_purple_messagebox => true,
|
||||
:enforce_april_fools => false,
|
||||
:true_memory_mode => false,
|
||||
:oneshot_mode => false,
|
||||
:twm_shader_footprint => true,
|
||||
:disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already => false,
|
||||
:wallpaper_mode => 0,
|
||||
|
||||
# Advanced
|
||||
:crashlog_privacy => false,
|
||||
:streamer_privacy => false,
|
||||
:SDL_HINT_INVALID_PARAM_CHECKS => false,
|
||||
|
||||
#controls
|
||||
:gamepad_type => -1,
|
||||
:gamepad_face_style => 0,
|
||||
:gamepad_led => true,
|
||||
:gamepad_deadzone => 5,
|
||||
|
||||
# Debug
|
||||
:debug => false,
|
||||
:debug_character => false,
|
||||
:debug_text_scene_title => true,
|
||||
:debug_text => false,
|
||||
:debug_picture_names => false,
|
||||
:debug_lightmap => false,
|
||||
:SDL_HINT_SHUTDOWN_DBUS_ON_QUIT => false,
|
||||
:profiler => false,
|
||||
# ------------ Debug ------------
|
||||
:debug => false,
|
||||
:debug_character => false,
|
||||
:debug_text_scene_title => true,
|
||||
:debug_text => false,
|
||||
:debug_picture_names => false,
|
||||
:debug_lightmap => false,
|
||||
:shutdown_dbus_on_quit => false,
|
||||
:profiler => false,
|
||||
}
|
||||
reset_controls!
|
||||
end
|
||||
|
||||
def reset_controls!
|
||||
@data.merge!({
|
||||
:controls_walk_down => [
|
||||
KeyBind.key(Input::key_from_name("Down")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftY"), KeyBind::Positive),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpDown"))
|
||||
],
|
||||
:controls_walk_left => [
|
||||
KeyBind.key(Input::key_from_name("Left")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftX"), KeyBind::Negative),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpLeft"))
|
||||
],
|
||||
:controls_walk_right => [
|
||||
KeyBind.key(Input::key_from_name("Right")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftX"), KeyBind::Positive),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpRight"))
|
||||
],
|
||||
:controls_walk_up => [
|
||||
KeyBind.key(Input::key_from_name("Up")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftY"), KeyBind::Negative),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpUp"))
|
||||
],
|
||||
:controls_run => [
|
||||
KeyBind.key(Input::key_from_name("Left Shift")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("righttrigger"), KeyBind::Positive),
|
||||
KeyBind.cbutton(Input::c_button_from_name("x"))
|
||||
],
|
||||
:controls_walk_down => [
|
||||
KeyBind.key(Input::key_from_name("Down")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftY"), KeyBind::Positive),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpDown"))
|
||||
],
|
||||
:controls_walk_left => [
|
||||
KeyBind.key(Input::key_from_name("Left")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftX"), KeyBind::Negative),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpLeft"))
|
||||
],
|
||||
:controls_walk_right => [
|
||||
KeyBind.key(Input::key_from_name("Right")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftX"), KeyBind::Positive),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpRight"))
|
||||
],
|
||||
:controls_walk_up => [
|
||||
KeyBind.key(Input::key_from_name("Up")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("LeftY"), KeyBind::Negative),
|
||||
KeyBind.cbutton(Input::c_button_from_name("DpUp"))
|
||||
],
|
||||
:controls_run => [
|
||||
KeyBind.key(Input::key_from_name("Left Shift")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("righttrigger"), KeyBind::Positive),
|
||||
KeyBind.cbutton(Input::c_button_from_name("x"))
|
||||
],
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
:controls_action => [
|
||||
KeyBind.key(Input::key_from_name("Z")),
|
||||
KeyBind.key(Input::key_from_name("Space")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("a")),
|
||||
],
|
||||
:controls_deactivate => [
|
||||
KeyBind.key(Input::key_from_name("Left Shift")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("back")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("lefttrigger"), KeyBind::Positive),
|
||||
],
|
||||
:controls_cancel => [
|
||||
KeyBind.key(Input::key_from_name("X")),
|
||||
KeyBind.key(Input::key_from_name("Escape")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("b")),
|
||||
],
|
||||
:controls_menu => [
|
||||
KeyBind.key(Input::key_from_name("A")),
|
||||
KeyBind.key(Input::key_from_name("Return")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("start")),
|
||||
],
|
||||
:controls_items => [
|
||||
KeyBind.key(Input::key_from_name("S")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("y")),
|
||||
],
|
||||
:controls_nav_left => [
|
||||
KeyBind.key(Input::key_from_name("Q")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("leftshoulder")),
|
||||
],
|
||||
:controls_nav_right => [
|
||||
KeyBind.key(Input::key_from_name("W")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("rightshoulder")),
|
||||
],
|
||||
:controls_action => [
|
||||
KeyBind.key(Input::key_from_name("Z")),
|
||||
KeyBind.key(Input::key_from_name("Space")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("a")),
|
||||
],
|
||||
:controls_deactivate => [
|
||||
KeyBind.key(Input::key_from_name("Left Shift")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("back")),
|
||||
KeyBind.caxis(Input::c_axis_from_name("lefttrigger"), KeyBind::Positive),
|
||||
],
|
||||
:controls_cancel => [
|
||||
KeyBind.key(Input::key_from_name("X")),
|
||||
KeyBind.key(Input::key_from_name("Escape")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("b")),
|
||||
],
|
||||
:controls_menu => [
|
||||
KeyBind.key(Input::key_from_name("A")),
|
||||
KeyBind.key(Input::key_from_name("Return")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("start")),
|
||||
],
|
||||
:controls_items => [
|
||||
KeyBind.key(Input::key_from_name("S")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("y")),
|
||||
],
|
||||
:controls_nav_left => [
|
||||
KeyBind.key(Input::key_from_name("Q")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("leftshoulder")),
|
||||
],
|
||||
:controls_nav_right => [
|
||||
KeyBind.key(Input::key_from_name("W")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("rightshoulder")),
|
||||
],
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
:controls_debug => [
|
||||
KeyBind.key(Input::key_from_name("Left Ctrl")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("rightstick")),
|
||||
],
|
||||
:controls_debug => [
|
||||
KeyBind.key(Input::key_from_name("Left Ctrl")),
|
||||
KeyBind.cbutton(Input::c_button_from_name("rightstick")),
|
||||
],
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
@ -185,13 +184,13 @@ class Window_Settings
|
|||
{
|
||||
:type => :bool,
|
||||
:name => "ITS TIME FOR FIGHT CRIME",
|
||||
:parameter => :use_fight_crime_track
|
||||
:parameter => :fight_crime_track
|
||||
},
|
||||
{
|
||||
:type => :bool,
|
||||
:name => "Use Old Self Contained Universe(Reprise) version",
|
||||
:icon => [1, 1],
|
||||
:parameter => :use_old_self_contained_universe_reprise
|
||||
:parameter => :old_reprise_song
|
||||
},
|
||||
],
|
||||
"Video" => [
|
||||
|
|
@ -246,7 +245,7 @@ class Window_Settings
|
|||
{
|
||||
:type => :slider,
|
||||
:name => "Density of glen fireflies",
|
||||
:parameter => :max_particle_count_firefly,
|
||||
:parameter => :max_firefly_count,
|
||||
:icon => [1, 1],
|
||||
:min => 0,
|
||||
:max => 30
|
||||
|
|
@ -337,7 +336,7 @@ class Window_Settings
|
|||
{
|
||||
:type => :bool,
|
||||
: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,
|
||||
|
|
@ -560,7 +559,7 @@ class Window_Settings
|
|||
:type => :bool,
|
||||
:name => "SDL_HINT_INVALID_PARAM_CHECKS",
|
||||
:icon => [1, 0],
|
||||
:parameter => :SDL_HINT_INVALID_PARAM_CHECKS
|
||||
:parameter => :invalid_param_checks
|
||||
},
|
||||
],
|
||||
"Debug" => [
|
||||
|
|
@ -603,7 +602,7 @@ class Window_Settings
|
|||
{
|
||||
:type => :bool,
|
||||
:name => "SDL_HINT_SHUTDOWN_DBUS_ON_QUIT",
|
||||
:parameter => :SDL_HINT_SHUTDOWN_DBUS_ON_QUIT,
|
||||
:parameter => :shutdown_dbus_on_quit,
|
||||
:icon => [1, 0],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -311,11 +311,6 @@ class Window_Settings
|
|||
@selection_sprite.opacity = value
|
||||
@screen_panel_selection_sprite.opacity = value
|
||||
@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
|
||||
|
||||
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
|
||||
super(settings_content, screen_id, position, name, icon, parameter, init_value)
|
||||
end
|
||||
end
|
||||
- end
|
||||
def callback(name, *args)
|
||||
original = proc { yield if block_given? }
|
||||
|
||||
|
|
|
|||
|
|
@ -7,23 +7,25 @@ module Settings
|
|||
# if you do not take the value from settings directly.
|
||||
|
||||
# name must be same as the parameter identifier
|
||||
|
||||
def crashlog_privacy(value)
|
||||
Sunshine.crashprivacy=value
|
||||
end
|
||||
|
||||
# ---------------------------------------------- Audio --------------------------------------------
|
||||
def master_volume(value)
|
||||
Audio.master_volume = value / 100.0
|
||||
end
|
||||
|
||||
def bgm_volume(value)
|
||||
Audio.bgm_volume = value
|
||||
end
|
||||
|
||||
def sfx_volume(value)
|
||||
Audio.sfx_volume = value
|
||||
end
|
||||
|
||||
# ---------------------------------------------- Video --------------------------------------------
|
||||
def fullscreen(value)
|
||||
Graphics.fullscreen = $console = value
|
||||
end
|
||||
|
||||
def resolution(value)
|
||||
if (!Graphics::RESOLUTION_OVERRIDDEN)
|
||||
res_data = Graphics::RESOLUTIONS&.[](value) || {:width => 480, :height => 640}
|
||||
|
|
@ -35,81 +37,70 @@ module Settings
|
|||
Graphics.resize_screen(new_width, new_height)
|
||||
end
|
||||
end
|
||||
|
||||
def scaling_mode(value)
|
||||
if value == 0
|
||||
Graphics.smooth = false
|
||||
else
|
||||
Graphics.smooth = true
|
||||
end
|
||||
end
|
||||
|
||||
def colorblind(value)
|
||||
$game_switches[252] = value
|
||||
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)
|
||||
Graphics.frameskip = value
|
||||
end
|
||||
|
||||
def SDL_HINT_INVALID_PARAM_CHECKS(value)
|
||||
if value
|
||||
Sunshine.setSDLHint("SDL_HINT_INVALID_PARAM_CHECKS", "1")
|
||||
else
|
||||
Sunshine.setSDLHint("SDL_HINT_INVALID_PARAM_CHECKS", "2")
|
||||
def scaling_mode(value)
|
||||
Graphics.smooth = value != 0
|
||||
end
|
||||
|
||||
VSYNC_MODES = [1, -1, 0]
|
||||
def vsync(value)
|
||||
Graphics.vsync_mode = VSYNC_MODES[value]
|
||||
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 vsync(value)
|
||||
if value == 0
|
||||
Graphics.setVsync(1)
|
||||
elsif value == 1
|
||||
Graphics.setVsync(-1)
|
||||
else
|
||||
Graphics.setVsync(0)
|
||||
end
|
||||
def language(value)
|
||||
$persistent.lang = Language::LANGUAGES[value]
|
||||
$scene&.redraw
|
||||
end
|
||||
|
||||
def SDL_HINT_SHUTDOWN_DBUS_ON_QUIT(value)
|
||||
if value
|
||||
Sunshine.setSDLHint("SDL_HINT_SHUTDOWN_DBUS_ON_QUIT", "1")
|
||||
else
|
||||
Sunshine.setSDLHint("SDL_HINT_SHUTDOWN_DBUS_ON_QUIT", "0")
|
||||
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
|
||||
|
||||
def profiler(value)
|
||||
Profiler.set(value)
|
||||
end
|
||||
|
||||
def wallpaper_mode(value)
|
||||
if value == 0
|
||||
Sunshine.wallpapermode="normal"
|
||||
elsif value == 1
|
||||
Sunshine.wallpapermode="fallback"
|
||||
else
|
||||
Sunshine.wallpapermode="disabled"
|
||||
end
|
||||
end
|
||||
|
||||
# --------------------------------------------- End :3 ---------------------------------------------
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ class Spriteset_Map
|
|||
case @particles_type
|
||||
when :fireflies
|
||||
klass = Particle_Firefly
|
||||
count = Settings[:max_particle_count_firefly]
|
||||
count = Settings[:max_firefly_count]
|
||||
layer = :front
|
||||
when :shrimp
|
||||
klass = Particle_Shrimp
|
||||
|
|
|
|||
|
|
@ -151,29 +151,4 @@ private:
|
|||
SharedStatePrivate *p;
|
||||
};
|
||||
|
||||
#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
|
||||
*/
|
||||
#endif // SHAREDSTATE_H
|
||||
Loading…
Reference in a new issue