This commit is contained in:
DepressedTWM 2026-06-12 07:12:36 -04:00
parent 1365577393
commit c03282d892
35 changed files with 2958 additions and 2958 deletions

View file

@ -7,7 +7,6 @@ option(STEAM "Build for Steam" OFF)
option(DEBUG "Debug mode" OFF) option(DEBUG "Debug mode" OFF)
option(FORCE32 "Force 32bit compile on 64bit OS" OFF) # from MKXP option(FORCE32 "Force 32bit compile on 64bit OS" OFF) # from MKXP
option(NATIVE "Use native instructions(for local use only)" OFF) option(NATIVE "Use native instructions(for local use only)" OFF)
option(PROFILE "Extra optimization" OFF)
option(EXTRA_SECURITY "Extra security" OFF) option(EXTRA_SECURITY "Extra security" OFF)
set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE) set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE)

View file

@ -8,6 +8,7 @@ Artists:
* Issac332 * Issac332
* Creature_of_steel1 * Creature_of_steel1
* Dess
Testers: Testers:

View file

@ -126,7 +126,6 @@ static void mriBindingInit(){
_rb_define_module_function(rb_mKernel, "rgss_stop", mriRgssStop); _rb_define_module_function(rb_mKernel, "rgss_stop", mriRgssStop);
_rb_define_module_function(rb_mKernel, "msgbox", mriPrint); _rb_define_module_function(rb_mKernel, "msgbox", mriPrint);
_rb_define_module_function(rb_mKernel, "msgbox_p", mriP); _rb_define_module_function(rb_mKernel, "msgbox_p", mriP);
rb_define_global_const("RGSS_VERSION", rb_str_new_cstr("3.0.1"));
_rb_define_module_function(rb_mKernel, "print", mriPrint); _rb_define_module_function(rb_mKernel, "print", mriPrint);
_rb_define_module_function(rb_mKernel, "p", mriP); _rb_define_module_function(rb_mKernel, "p", mriP);
rb_define_alias(rb_singleton_class(rb_mKernel), "_mkxp_kernel_caller_alias", "caller"); rb_define_alias(rb_singleton_class(rb_mKernel), "_mkxp_kernel_caller_alias", "caller");
@ -538,7 +537,6 @@ static void mriBindingExecute(){
} }
static void mriBindingTerminate(){ static void mriBindingTerminate(){
printf("[mriBindingTerminate] Terminating bindings...\n");
rb_raise(rb_eSystemExit, " "); rb_raise(rb_eSystemExit, " ");
#ifdef __linux__ #ifdef __linux__
wallpaperBindingTerminate(); wallpaperBindingTerminate();

View file

@ -369,7 +369,6 @@ RB_METHOD(bitmapInitializeCopy){
void bitmapBindingInit(){ void bitmapBindingInit(){
printf("[bitmapBindingInit] Initializing Bitmap binding\n");
VALUE klass = rb_define_class("Bitmap", rb_cObject); VALUE klass = rb_define_class("Bitmap", rb_cObject);
rb_define_alloc_func(klass, classAllocate<&BitmapType>); rb_define_alloc_func(klass, classAllocate<&BitmapType>);

View file

@ -86,7 +86,6 @@ RB_METHOD(disposableIsDisposed){
template<class C> template<class C>
static void disposableBindingInit(VALUE klass){ static void disposableBindingInit(VALUE klass){
printf("[disposableBindingInit] Initialing disposable binding\n");
_rb_define_method(klass, "dispose", disposableDispose<C>); _rb_define_method(klass, "dispose", disposableDispose<C>);
_rb_define_method(klass, "disposed?", disposableIsDisposed<C>); _rb_define_method(klass, "disposed?", disposableIsDisposed<C>);

View file

@ -190,7 +190,6 @@ INITCOPY_FUN(Rect)
{ RB_ATTR_R(Klass, Attr, attr); RB_ATTR_W(Klass, Attr, attr); } { RB_ATTR_R(Klass, Attr, attr); RB_ATTR_W(Klass, Attr, attr); }
void etcBindingInit(){ void etcBindingInit(){
printf("[etcBindingInit] Initializing etc binding\n");
VALUE klass; VALUE klass;
INIT_BIND(Color); INIT_BIND(Color);

View file

@ -192,7 +192,6 @@ RB_METHOD(_marshalLoad){
} }
void fileIntBindingInit(){ void fileIntBindingInit(){
printf("[fileIntBindingInit] Initializing filesystem binding...\n");
VALUE klass = rb_define_class("FileInt", rb_cIO); VALUE klass = rb_define_class("FileInt", rb_cIO);
rb_define_alloc_func(klass, classAllocate<&FileIntType>); rb_define_alloc_func(klass, classAllocate<&FileIntType>);

View file

@ -62,7 +62,6 @@ RB_METHOD(flashableUpdate){
template<class C> template<class C>
static void flashableBindingInit(VALUE klass){ static void flashableBindingInit(VALUE klass){
printf("[flashableBindingInit] Initializing Flashable binding\n");
_rb_define_method(klass, "flash", flashableFlash<C>); _rb_define_method(klass, "flash", flashableFlash<C>);
_rb_define_method(klass, "update", flashableUpdate<C>); _rb_define_method(klass, "update", flashableUpdate<C>);
} }

View file

@ -233,7 +233,6 @@ RB_METHOD(FontSetDefaultColor){
} }
void fontBindingInit(){ void fontBindingInit(){
printf("[fontBindingInit] Initializing Font binding\n");
VALUE klass = rb_define_class("Font", rb_cObject); VALUE klass = rb_define_class("Font", rb_cObject);
rb_define_alloc_func(klass, classAllocate<&FontType>); rb_define_alloc_func(klass, classAllocate<&FontType>);

View file

@ -185,7 +185,6 @@ DEF_GRA_PROP_B(Frameskip)
} }
void graphicsBindingInit(){ void graphicsBindingInit(){
printf("[graphicsBindingInit] Initializing Graphics binding\n");
VALUE module = rb_define_module("Graphics"); VALUE module = rb_define_module("Graphics");
_rb_define_module_function(module, "update", graphicsUpdate); _rb_define_module_function(module, "update", graphicsUpdate);

View file

@ -160,7 +160,6 @@ RB_METHOD(journalActive){
} }
void journalBindingInit(){ void journalBindingInit(){
printf("[journalBindingInit] Initializing Journal binding\n");
mutex = SDL_CreateMutex(); mutex = SDL_CreateMutex();
memset((char*)lang_buffer, 0, BUFFER_SIZE); memset((char*)lang_buffer, 0, BUFFER_SIZE);
lang_buffer[0] = '_'; lang_buffer[0] = '_';

View file

@ -9,6 +9,7 @@
#include "ruby/intern.h" #include "ruby/intern.h"
#include "ruby/thread.h" #include "ruby/thread.h"
#include "modloader.h" #include "modloader.h"
#include "config.h"
#include <ruby.h> #include <ruby.h>
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>
@ -58,7 +59,6 @@ static VALUE hooks(int argc, VALUE *argv, VALUE self) {
} }
void ModLoaderBindingInit(){ void ModLoaderBindingInit(){
Debug() << "[MODLOADER] initalizing binding...";
VALUE klass = rb_define_module("ModLoader"); VALUE klass = rb_define_module("ModLoader");
rb_define_module_function(klass, "hooks", RUBY_METHOD_FUNC(hooks), -1); rb_define_module_function(klass, "hooks", RUBY_METHOD_FUNC(hooks), -1);
rb_define_const(klass, "IS_ENABLED", modloader_is_enabled ? Qtrue : Qfalse); rb_define_const(klass, "IS_ENABLED", modloader_is_enabled ? Qtrue : Qfalse);

View file

@ -46,10 +46,14 @@ module RPG
self.load_bitmap("Graphics/Icons/", filename) self.load_bitmap("Graphics/Icons/", filename)
end end
def self.panorama(filename, hue) def self.panorama(filename, hue)
self.load_bitmap("Graphics/Panoramas/", filename, hue) if Graphics.width == 1280 && File.exist?("Graphics/Panoramas/" + filename + "_16.png")
self.load_bitmap("Graphics/Panoramas/", filename + "_16", hue)
else
self.load_bitmap("Graphics/Panoramas/", filename, hue)
end
end end
def self.picture(filename) def self.picture(filename)
if (Graphics.width == 1280 && File.exist?("Graphics/Pictures/" + filename + "_16.png")) if Graphics.width == 1280 && File.exist?("Graphics/Pictures/" + filename + "_16.png")
self.load_bitmap("Graphics/Pictures/", filename + "_16") self.load_bitmap("Graphics/Pictures/", filename + "_16")
else else
self.load_bitmap("Graphics/Pictures/", filename) self.load_bitmap("Graphics/Pictures/", filename)

File diff suppressed because it is too large Load diff

View file

@ -195,7 +195,6 @@ RB_METHOD(nikoStart){
} }
void nikoBindingInit(){ void nikoBindingInit(){
printf("[nikoBindingInit] Initializing Niko binding:3\n");
mutex = SDL_CreateMutex(); mutex = SDL_CreateMutex();
#if defined __linux #if defined __linux
mkfifo(NIKO_PIPE_PATH.c_str(), 0666); mkfifo(NIKO_PIPE_PATH.c_str(), 0666);

View file

@ -93,7 +93,6 @@ RB_METHOD(oneshotCRC32){
} }
void oneshotBindingInit(){ void oneshotBindingInit(){
printf("[oneshotBindingInit] Initializing Oneshot binding\n");
VALUE module = rb_define_module("Oneshot"); VALUE module = rb_define_module("Oneshot");
VALUE msg = rb_define_module_under(module, "Msg"); VALUE msg = rb_define_module_under(module, "Msg");

View file

@ -57,7 +57,6 @@ DEF_PROP_F(Plane, ZoomY)
void planeBindingInit(){ void planeBindingInit(){
printf("[planeBindingInit] Initializing Plane binding\n");
VALUE klass = rb_define_class("Plane", rb_cObject); VALUE klass = rb_define_class("Plane", rb_cObject);
rb_define_alloc_func(klass, classAllocate<&PlaneType>); rb_define_alloc_func(klass, classAllocate<&PlaneType>);

View file

@ -75,7 +75,6 @@ RB_METHOD(sceneElementSetVisible){
template<class C> template<class C>
void sceneElementBindingInit(VALUE klass){ void sceneElementBindingInit(VALUE klass){
printf("[sceneElementBindingInit] Initialing SceneElement binding\n");
_rb_define_method(klass, "z", sceneElementGetZ<C>); _rb_define_method(klass, "z", sceneElementGetZ<C>);
_rb_define_method(klass, "z=", sceneElementSetZ<C>); _rb_define_method(klass, "z=", sceneElementSetZ<C>);
_rb_define_method(klass, "visible", sceneElementGetVisible<C>); _rb_define_method(klass, "visible", sceneElementGetVisible<C>);

View file

@ -71,7 +71,6 @@ RB_METHOD(screenSet){
} }
void screenBindingInit(){ void screenBindingInit(){
printf("[screenBindingInit] Initializing Screen binding\n");
VALUE module = rb_define_module("Screen"); VALUE module = rb_define_module("Screen");
_rb_define_module_function(module, "start", screenStart); _rb_define_module_function(module, "start", screenStart);
_rb_define_module_function(module, "finish", screenFinish); _rb_define_module_function(module, "finish", screenFinish);

View file

@ -41,7 +41,6 @@ static VALUE serializableDump(int, VALUE *, VALUE self){
template<class C> template<class C>
void serializableBindingInit(VALUE klass){ void serializableBindingInit(VALUE klass){
printf("[serializableBindingInit] Initialing Binding binding\n");
_rb_define_method(klass, "_dump", serializableDump<C>); _rb_define_method(klass, "_dump", serializableDump<C>);
} }

View file

@ -9,11 +9,10 @@
VALUE rb_mShader; VALUE rb_mShader;
void shaderBindingInit(){ void shaderBindingInit(){
printf("[shaderBindingInit] Initializing Shaders binding\n");
rb_mShader = rb_define_module("Shader"); rb_mShader = rb_define_module("Shader");
#define DEFINE_RUBY_CONST(name, type, rb) \ #define DEFINE_RUBY_CONST(name, type, rb) \
rb_define_const(rb_mShader, #rb, INT2NUM(ShaderType::SHADER_##name)); rb_define_const(rb_mShader, #rb, INT2NUM(ShaderType::SHADER_##name));
SHADER_LIST(DEFINE_RUBY_CONST) SHADER_LIST(DEFINE_RUBY_CONST)
#undef DEFINE_RUBY_CONST #undef DEFINE_RUBY_CONST
} }

View file

@ -96,7 +96,6 @@ RB_METHOD(spriteHeight){
} }
void spriteBindingInit(){ void spriteBindingInit(){
printf("[spriteBindingInit] Initializing sprite binding\n");
VALUE klass = rb_define_class("Sprite", rb_cObject); VALUE klass = rb_define_class("Sprite", rb_cObject);
rb_define_alloc_func(klass, classAllocate<&SpriteType>); rb_define_alloc_func(klass, classAllocate<&SpriteType>);

View file

@ -47,7 +47,7 @@ void SunshineBindingInit(){
} }
//сразу для всех обьектов //сразу для всех обьектов
if (!rb_respond_to(rb_cObject, rb_intern("clone"))) { if (!rb_respond_to(rb_cObject, rb_intern("clone"))) {
rb_define_method(rb_cObject, "clone", RUBY_METHOD_FUNC(obj_clone), 0); 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"))) {

View file

@ -150,7 +150,6 @@ MARSH_LOAD_FUN(Table)
INITCOPY_FUN(Table) INITCOPY_FUN(Table)
void tableBindingInit(){ void tableBindingInit(){
printf("[tableBindingInit] Initializing Table binding\n");
VALUE klass = rb_define_class("Table", rb_cObject); VALUE klass = rb_define_class("Table", rb_cObject);
rb_define_alloc_func(klass, classAllocate<&TableType>); rb_define_alloc_func(klass, classAllocate<&TableType>);

View file

@ -136,7 +136,6 @@ DEF_PROP_I(Tilemap, OX)
DEF_PROP_I(Tilemap, OY) DEF_PROP_I(Tilemap, OY)
void tilemapBindingInit(){ void tilemapBindingInit(){
printf("[tilemapBindingInit] Initializing tilemap binding\n");
VALUE klass = rb_define_class("TilemapAutotiles", rb_cObject); VALUE klass = rb_define_class("TilemapAutotiles", rb_cObject);
rb_define_alloc_func(klass, classAllocate<&TilemapAutotilesType>); rb_define_alloc_func(klass, classAllocate<&TilemapAutotilesType>);

View file

@ -78,9 +78,7 @@ DEF_PROP_OBJ_VAL(Viewport, Tone, Tone, "tone")
DEF_PROP_I(Viewport, OX) DEF_PROP_I(Viewport, OX)
DEF_PROP_I(Viewport, OY) DEF_PROP_I(Viewport, OY)
void viewportBindingInit(){ void viewportBindingInit(){
printf("[viewportBindingInit] Initializing viewport binding\n");
VALUE klass = rb_define_class("Viewport", rb_cObject); VALUE klass = rb_define_class("Viewport", rb_cObject);
rb_define_alloc_func(klass, classAllocate<&ViewportType>); rb_define_alloc_func(klass, classAllocate<&ViewportType>);

View file

@ -85,7 +85,6 @@ static C *viewportElementInitialize(int argc, VALUE *argv, VALUE self){
template<class C> template<class C>
void viewportElementBindingInit(VALUE klass){ void viewportElementBindingInit(VALUE klass){
printf("[viewportElementBindingInit] Initialing Viewport Element binding\n");
sceneElementBindingInit<C>(klass); sceneElementBindingInit<C>(klass);
_rb_define_method(klass, "viewport", viewportElementGetViewport<C>); _rb_define_method(klass, "viewport", viewportElementGetViewport<C>);

View file

@ -27,9 +27,6 @@
DEF_TYPE(Window); DEF_TYPE(Window);
RB_METHOD(windowInitialize){ RB_METHOD(windowInitialize){
#ifdef DEBUG
printf("[windowInitialize] Creating window\n");
#endif
Window *w = viewportElementInitialize<Window>(argc, argv, self); Window *w = viewportElementInitialize<Window>(argc, argv, self);
setPrivateData(self, w); setPrivateData(self, w);

View file

@ -12,14 +12,12 @@ echo """[Desktop Entry]
Type=Application Type=Application
Name=Oneshot: Sunshine Name=Oneshot: Sunshine
Comment=Oneshot mod Comment=Oneshot mod
Exec=$install_path/oneshot.sh Exec=/bin/sh $install_path/oneshot.sh
Icon=$install_path/icon.png Icon=$install_path/icon.png
Categories=Game; Categories=Game;
""" > $HOME/.local/share/applications/sunshine.desktop """ > $HOME/.local/share/applications/sunshine.desktop
echo """ set +u
#!/bin/bash echo "LD_LIBRARY_PATH=$install_path:$LD_LIBRARY_PATH $install_path/oneshot" > $install_path/oneshot.sh
LD_LIBRARY_PATH=$install_path\;$LD_LIBRARY_PATH $install_path/oneshot
""" > $install_path/oneshot.sh
chmod +x $install_path/oneshot.sh chmod +x $install_path/oneshot.sh
chmod +x $install_path/oneshot chmod +x $install_path/oneshot

View file

@ -4,7 +4,6 @@ set -e
cd `dirname $0` cd `dirname $0`
# User-configurable variables. # User-configurable variables.
linux_version="0.1.0"
oneshot_id=420530 oneshot_id=420530
STEAMWORKS_PATH=$(realpath ..)/steamworks STEAMWORKS_PATH=$(realpath ..)/steamworks
@ -15,11 +14,11 @@ cyan="\033[1;36m" # Cyan - Bold
green="\033[1;32m" # Green - Bold green="\033[1;32m" # Green - Bold
color_reset="\033[0m" # Reset Colors color_reset="\033[0m" # Reset Colors
echo -e "${white}Compiling ${bold}SyngleChance v${linux_version} ${white}engine for Linux...${color_reset}\n" echo -e "Compiling ${bold}Sunshine Bandle for Linux...${color_reset}\n"
cmake . -B build/ cmake . -B build/
cd build cd build
make -j${nproc} make
cd .. cd ..
mkdir build/bandle mkdir build/bandle
@ -62,6 +61,7 @@ yes | cp build/oneshot build/bandle/Sunshine
cp installer/installer.sh build/bandle/ cp installer/installer.sh build/bandle/
cp -r ../SunshineAssets/* build/bandle/Sunshine cp -r ../SunshineAssets/* build/bandle/Sunshine
cp oneshot.conf build/bandle/Sunshine
cd build cd build
zip -r OneshotSunshine.zip bandle/* zip -r OneshotSunshine.zip bandle/*

View file

@ -31,8 +31,8 @@ EnableSixteenByNine=false
# Controlling the resolution of the game window, # Controlling the resolution of the game window,
# it is not recommended to change. # it is not recommended to change.
# If you want to configure 16:9, use EnableSixteenByNine. # If you want to configure 16:9, use EnableSixteenByNine.
defScreenW=0 # defScreenW=0
defScreenH=0 # defScreenH=0
# Apply linear interpolation when game screen # Apply linear interpolation when game screen
# is upscaled # is upscaled
@ -46,7 +46,6 @@ vsync=true
# (0 = disabled) # (0 = disabled)
fixedFramerate=0 fixedFramerate=0
# Skip (don't draw) frames when behind # Skip (don't draw) frames when behind
# (default: enabled) # (default: enabled)
frameSkip=true frameSkip=true
@ -84,7 +83,7 @@ enableBlitting=true
maxTextureSize=0 maxTextureSize=0
# Set the base path of the game to '/path/to/game' # Set the base path of the game to '/path/to/game'
gameFolder=/path/to/game # gameFolder=/path/to/game
# Allow symlinks for game assets to be followed # Allow symlinks for game assets to be followed
allowSymlinks=false allowSymlinks=false
@ -94,8 +93,8 @@ iconPath=/path/to/icon.png
# Define raw scripts to be executed before the # Define raw scripts to be executed before the
# actual Scripts.rxdata execution starts # actual Scripts.rxdata execution starts
# preloadScript=my_win32_wrapper.rb #preloadScript=my_win32_wrapper.rb
# preloadScript=ruby18_fixes.rb #preloadScript=ruby18_fixes.rb
# Index all accesible assets via their lower case path # Index all accesible assets via their lower case path
# (emulates windows case insensitivity) # (emulates windows case insensitivity)
@ -140,4 +139,7 @@ Windows_AllocConsole=false
# Mods directory path # Mods directory path
# Path to mods directory # Path to mods directory
ModsDirPath="mods" Modloader.ModsDirPath="mods"
# Use default path for saves and settings like if you run game
# without mods
Modloader.use_default_save_path=false

View file

@ -79,7 +79,7 @@ void Config::read(int argc, char *argv[]){
PO_DESC(defScreenW, int, 640) \ PO_DESC(defScreenW, int, 640) \
PO_DESC(defScreenH, int, 480) \ PO_DESC(defScreenH, int, 480) \
PO_DESC(windowTitle, std::string, "") \ PO_DESC(windowTitle, std::string, "") \
PO_DESC(ModsDirPath, std::string,"mods") \ PO_DESC(Modloader.ModsDirPath, std::string,"mods") \
PO_DESC(fixedFramerate, int, 0) \ PO_DESC(fixedFramerate, int, 0) \
PO_DESC(frameSkip, bool, true) \ PO_DESC(frameSkip, bool, true) \
PO_DESC(syncToRefreshrate, bool, false) \ PO_DESC(syncToRefreshrate, bool, false) \
@ -92,7 +92,8 @@ void Config::read(int argc, char *argv[]){
PO_DESC(iconPath, std::string, "") \ PO_DESC(iconPath, std::string, "") \
PO_DESC(SE.sourceCount, int, 6) \ PO_DESC(SE.sourceCount, int, 6) \
PO_DESC(pathCache, bool, true) \ PO_DESC(pathCache, bool, true) \
PO_DESC(Windows_AllocConsole, bool, false) PO_DESC(Windows_AllocConsole, bool, false) \
PO_DESC(Modloader.use_default_save_path, bool, false)
// Not gonna take your shit boost // Not gonna take your shit boost
#define GUARD_ALL( exp ) try { exp } catch(...) {} #define GUARD_ALL( exp ) try { exp } catch(...) {}
@ -166,7 +167,7 @@ void Config::read(int argc, char *argv[]){
SE.sourceCount = clamp(SE.sourceCount, 1, 64); SE.sourceCount = clamp(SE.sourceCount, 1, 64);
commonDataPath = prefPath(".", "Oneshot"); commonDataPath = prefPath(".", "Sunshine");
if(windowTitle == "") if(windowTitle == "")
game.title = "OneShot: Sunshine"; game.title = "OneShot: Sunshine";

View file

@ -39,8 +39,7 @@ struct Config{
int defScreenW; int defScreenW;
int defScreenH; int defScreenH;
std::string windowTitle; std::string windowTitle;
std::string ModsDirPath;
int fixedFramerate; int fixedFramerate;
bool frameSkip; bool frameSkip;
bool syncToRefreshrate; bool syncToRefreshrate;
@ -60,6 +59,11 @@ struct Config{
struct{ struct{
int sourceCount; int sourceCount;
} SE; } SE;
struct{
std::string ModsDirPath;
bool use_default_save_path;
} Modloader;
bool useScriptNames; bool useScriptNames;

View file

@ -95,7 +95,7 @@ std::string sha256_file(const std::string &fn) {
} }
std::string ModLoader(Config conf){ std::string ModLoader(Config conf){
std::string path = conf.ModsDirPath; std::string path = conf.Modloader.ModsDirPath;
if (!fs::exists(path) || !std::filesystem::is_directory(path)) { if (!fs::exists(path) || !std::filesystem::is_directory(path)) {
Debug() << "[MODLOADER] Mods directory not found, skip."; Debug() << "[MODLOADER] Mods directory not found, skip.";
return ""; return "";

2
test2 Normal file
View file

@ -0,0 +1,2 @@
LD_LIBRARY_PATH=: /oneshot