From 7034843632a6dfda3020697317ba41dbaecc8dca Mon Sep 17 00:00:00 2001 From: ZakatTeamI2P Date: Fri, 8 May 2026 20:08:24 +0400 Subject: [PATCH] MMMMMMMMMMMMEEEOW --- binding-mri/binding-mri.cpp | 3 +-- binding-mri/binding-util.h | 3 +-- binding-mri/bitmap-binding.cpp | 3 +-- binding-mri/chroma-binding.cpp | 1 - oneshot.conf | 6 +++--- scripts-test/Main.rb | 3 +++ shader/flashMap.frag | 3 +-- shader/flatColor.frag | 3 +-- shader/gray.frag | 3 +-- shader/hue.frag | 9 +++------ shader/minimal.vert | 3 +-- shader/obscured.frag | 3 +-- shader/plane.frag | 3 +-- shader/simple.frag | 3 +-- shader/simple.vert | 3 +-- shader/simpleAlpha.frag | 3 +-- shader/simpleAlphaUni.frag | 3 +-- shader/simpleColor.frag | 3 +-- shader/simpleColor.vert | 3 +-- shader/simpleMatrix.vert | 3 +-- shader/sprite.frag | 3 +-- shader/sprite.vert | 3 +-- shader/tilemap.vert | 3 +-- shader/trans.frag | 3 +-- shader/transSimple.frag | 3 +-- 25 files changed, 30 insertions(+), 52 deletions(-) diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp index 81cf275..408050d 100644 --- a/binding-mri/binding-mri.cpp +++ b/binding-mri/binding-mri.cpp @@ -552,7 +552,6 @@ static void mriBindingExecute(){ char **argv = 0; char options_argv1[] = "oneshot", options_argv2[] = "-evd", options_argv3[] = "--jit"; char* options_argv[] = {options_argv1, options_argv2, options_argv3, NULL}; - printf("[mriBindingExecute] %s %s %s\n", options_argv1, options_argv2, options_argv3); ruby_setup(); ruby_sysinit(&argc, &argv); rb_enc_set_default_external(rb_enc_from_encoding(rb_utf8_encoding())); @@ -590,7 +589,7 @@ static void mriBindingExecute(){ } static void mriBindingTerminate(){ - printf("[mriBindingTerminate] Terminating binding...\n"); + printf("[mriBindingTerminate] Terminating bindings...\n"); rb_raise(rb_eSystemExit, " "); #ifdef __linux__ wallpaperBindingTerminate(); diff --git a/binding-mri/binding-util.h b/binding-mri/binding-util.h index 823f43a..d8d6bd5 100644 --- a/binding-mri/binding-util.h +++ b/binding-mri/binding-util.h @@ -404,8 +404,7 @@ static inline VALUE rb_str_catf(VALUE obj, const char *fmt, ...) { return rb_str_new2("Finish me! rb_str_catf()"); // TODO } static inline VALUE rb_file_open_str(VALUE filename, const char *mode) { - return rb_funcall(rb_cFile, rb_intern("open"), 2, filename, - rb_str_new2(mode)); + return rb_funcall(rb_cFile, rb_intern("open"), 2, filename, rb_str_new2(mode)); } #endif #endif diff --git a/binding-mri/bitmap-binding.cpp b/binding-mri/bitmap-binding.cpp index b8c6207..bd01026 100644 --- a/binding-mri/bitmap-binding.cpp +++ b/binding-mri/bitmap-binding.cpp @@ -338,8 +338,7 @@ RB_METHOD(bitmapClearRect){ rect = getPrivateDataCheck(rectObj, RectType); GUARD_EXC( b->clearRect(rect->toIntRect()); ); - } - else{ + }else{ int x, y, width, height; rb_get_args(argc, argv, "iiii", &x, &y, &width, &height RB_ARG_END); diff --git a/binding-mri/chroma-binding.cpp b/binding-mri/chroma-binding.cpp index 4743cac..32f5a58 100644 --- a/binding-mri/chroma-binding.cpp +++ b/binding-mri/chroma-binding.cpp @@ -21,7 +21,6 @@ PluginUninit _pluginUninit = NULL; int lastAnimId = -1; - void _attemptLinkSdk() { Debug() << "[_attempLinkSdk] Attempting to bind Chroma SDK"; #ifdef _WIN32 diff --git a/oneshot.conf b/oneshot.conf index 67e4adf..fa23e69 100644 --- a/oneshot.conf +++ b/oneshot.conf @@ -35,13 +35,13 @@ # is upscaled # (default: disabled) # -# smoothScaling=false +smoothScaling=false # Sync screen redraws to the monitor refresh rate # (default: enabled) # -# vsync=true +vsync=true # Enforce a static frame rate # (0 = disabled) @@ -131,7 +131,7 @@ # (emulates windows case insensitivity) # (default: enabled) # -# pathCache=true +pathCache=true # Add 'rtp1', 'rtp2.zip' and 'game.rgssad' to the diff --git a/scripts-test/Main.rb b/scripts-test/Main.rb index c1089db..b822c78 100644 --- a/scripts-test/Main.rb +++ b/scripts-test/Main.rb @@ -1,3 +1,6 @@ begin + $console = Graphics.fullscreen + Graphics.frame_rate = 60 + Font.default_size = 20 print("Oneshot: sunshine TEST xScripts.rxdata\nRuby version: #{RUBY_VERSION}\nSDL version: #{Sunshine::SDLVersion_major}.#{Sunshine::SDLVersion_minor}.#{Sunshine::SDLVersion_micro}") end diff --git a/shader/flashMap.frag b/shader/flashMap.frag index 34ed06b..e98342e 100644 --- a/shader/flashMap.frag +++ b/shader/flashMap.frag @@ -3,7 +3,6 @@ uniform lowp float alpha; varying lowp vec4 v_color; -void main() -{ +void main(){ gl_FragColor = vec4(v_color.rgb * alpha, 1); } diff --git a/shader/flatColor.frag b/shader/flatColor.frag index 985f5dc..711994e 100644 --- a/shader/flatColor.frag +++ b/shader/flatColor.frag @@ -1,7 +1,6 @@ uniform lowp vec4 color; -void main() -{ +void main(){ gl_FragColor = color; } diff --git a/shader/gray.frag b/shader/gray.frag index c4cb982..c25adc8 100644 --- a/shader/gray.frag +++ b/shader/gray.frag @@ -6,8 +6,7 @@ varying vec2 v_texCoord; const vec3 lumaF = vec3(.299, .587, .114); -void main() -{ +void main(){ /* Sample source color */ vec4 frag = texture2D(texture, v_texCoord); diff --git a/shader/hue.frag b/shader/hue.frag index 61143ac..39b49a3 100644 --- a/shader/hue.frag +++ b/shader/hue.frag @@ -5,8 +5,7 @@ uniform mediump float hueAdjust; varying vec2 v_texCoord; /* Source: gamedev.stackexchange.com/a/59808/24839 */ -vec3 rgb2hsv(vec3 c) -{ +vec3 rgb2hsv(vec3 c){ const vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); @@ -21,15 +20,13 @@ vec3 rgb2hsv(vec3 c) return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + eps)), d / (q.x + eps), q.x); } -vec3 hsv2rgb(vec3 c) -{ +vec3 hsv2rgb(vec3 c){ const vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); } -void main () -{ +void main (){ vec4 color = texture2D (texture, v_texCoord.xy); vec3 hsv = rgb2hsv(color.rgb); diff --git a/shader/minimal.vert b/shader/minimal.vert index cccadc1..cb767e2 100644 --- a/shader/minimal.vert +++ b/shader/minimal.vert @@ -2,7 +2,6 @@ uniform mat4 projMat; attribute vec2 position; -void main() -{ +void main(){ gl_Position = projMat * vec4(position, 0, 1); } diff --git a/shader/obscured.frag b/shader/obscured.frag index 84ad5b1..db21009 100644 --- a/shader/obscured.frag +++ b/shader/obscured.frag @@ -4,8 +4,7 @@ uniform sampler2D obscured; varying vec2 v_texCoord; -void main() -{ +void main(){ vec4 color = texture2D(texture, v_texCoord); color.a *= texture2D(obscured, v_texCoord).r; gl_FragColor = color; diff --git a/shader/plane.frag b/shader/plane.frag index 14b52c5..efb4d79 100644 --- a/shader/plane.frag +++ b/shader/plane.frag @@ -11,8 +11,7 @@ varying vec2 v_texCoord; const vec3 lumaF = vec3(.299, .587, .114); -void main() -{ +void main(){ /* Sample source color */ vec4 frag = texture2D(texture, v_texCoord); diff --git a/shader/simple.frag b/shader/simple.frag index e00b11c..c21d0f4 100644 --- a/shader/simple.frag +++ b/shader/simple.frag @@ -3,7 +3,6 @@ uniform sampler2D texture; varying vec2 v_texCoord; -void main() -{ +void main(){ gl_FragColor = texture2D(texture, v_texCoord); } diff --git a/shader/simple.vert b/shader/simple.vert index ad16d47..fef7d33 100644 --- a/shader/simple.vert +++ b/shader/simple.vert @@ -9,8 +9,7 @@ attribute vec2 texCoord; varying vec2 v_texCoord; -void main() -{ +void main(){ gl_Position = projMat * vec4(position + translation, 0, 1); v_texCoord = texCoord * texSizeInv; diff --git a/shader/simpleAlpha.frag b/shader/simpleAlpha.frag index 163bca9..025be63 100644 --- a/shader/simpleAlpha.frag +++ b/shader/simpleAlpha.frag @@ -4,8 +4,7 @@ uniform sampler2D texture; varying vec2 v_texCoord; varying lowp vec4 v_color; -void main() -{ +void main(){ gl_FragColor = texture2D(texture, v_texCoord); gl_FragColor.a *= v_color.a; } diff --git a/shader/simpleAlphaUni.frag b/shader/simpleAlphaUni.frag index cc0cac3..d48e86c 100644 --- a/shader/simpleAlphaUni.frag +++ b/shader/simpleAlphaUni.frag @@ -4,8 +4,7 @@ uniform lowp float alpha; varying vec2 v_texCoord; -void main() -{ +void main(){ gl_FragColor = texture2D(texture, v_texCoord); gl_FragColor.a *= alpha; } diff --git a/shader/simpleColor.frag b/shader/simpleColor.frag index da3a77f..c67a370 100644 --- a/shader/simpleColor.frag +++ b/shader/simpleColor.frag @@ -1,7 +1,6 @@ varying lowp vec4 v_color; -void main() -{ +void main(){ gl_FragColor = v_color; } diff --git a/shader/simpleColor.vert b/shader/simpleColor.vert index aed5cad..6a16567 100644 --- a/shader/simpleColor.vert +++ b/shader/simpleColor.vert @@ -11,8 +11,7 @@ attribute lowp vec4 color; varying vec2 v_texCoord; varying lowp vec4 v_color; -void main() -{ +void main(){ gl_Position = projMat * vec4(position + translation, 0, 1); v_texCoord = texCoord * texSizeInv; diff --git a/shader/simpleMatrix.vert b/shader/simpleMatrix.vert index d439dbd..4cb45bd 100644 --- a/shader/simpleMatrix.vert +++ b/shader/simpleMatrix.vert @@ -11,8 +11,7 @@ attribute lowp vec4 color; varying vec2 v_texCoord; varying lowp vec4 v_color; -void main() -{ +void main(){ gl_Position = projMat * matrix * vec4(position, 0, 1); v_texCoord = texCoord * texSizeInv; diff --git a/shader/sprite.frag b/shader/sprite.frag index 93c35f3..bb94824 100644 --- a/shader/sprite.frag +++ b/shader/sprite.frag @@ -13,8 +13,7 @@ varying vec2 v_texCoord; const vec3 lumaF = vec3(.299, .587, .114); -void main() -{ +void main(){ /* Sample source color */ vec4 frag = texture2D(texture, v_texCoord); diff --git a/shader/sprite.vert b/shader/sprite.vert index a048ae5..fca7939 100644 --- a/shader/sprite.vert +++ b/shader/sprite.vert @@ -10,8 +10,7 @@ attribute vec2 texCoord; varying vec2 v_texCoord; -void main() -{ +void main(){ gl_Position = projMat * spriteMat * vec4(position, 0, 1); v_texCoord = texCoord * texSizeInv; } diff --git a/shader/tilemap.vert b/shader/tilemap.vert index 05c5f72..8a11f2b 100644 --- a/shader/tilemap.vert +++ b/shader/tilemap.vert @@ -15,8 +15,7 @@ const float atAreaW = 96.0; const float atAreaH = 128.0*7.0; const float atAniOffset = 32.0*3.0; -void main() -{ +void main(){ vec2 tex = texCoord; lowp float pred = float(tex.x <= atAreaW && tex.y <= atAreaH); diff --git a/shader/trans.frag b/shader/trans.frag index 9023aed..ad57610 100644 --- a/shader/trans.frag +++ b/shader/trans.frag @@ -10,8 +10,7 @@ uniform float vague; varying vec2 v_texCoord; -void main() -{ +void main(){ float transV = texture2D(transMap, v_texCoord).r; float cTransV = clamp(transV, prog, prog+vague); lowp float alpha = (cTransV - prog) / vague; diff --git a/shader/transSimple.frag b/shader/transSimple.frag index a5aac7d..42938ca 100644 --- a/shader/transSimple.frag +++ b/shader/transSimple.frag @@ -7,8 +7,7 @@ uniform float prog; varying vec2 v_texCoord; -void main() -{ +void main(){ vec4 newPixel = texture2D(currentScene, v_texCoord); vec4 oldPixel = texture2D(frozenScene, v_texCoord);