mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
meow
This commit is contained in:
parent
1365577393
commit
c03282d892
35 changed files with 2958 additions and 2958 deletions
|
|
@ -7,7 +7,6 @@ option(STEAM "Build for Steam" OFF)
|
|||
option(DEBUG "Debug mode" OFF)
|
||||
option(FORCE32 "Force 32bit compile on 64bit OS" OFF) # from MKXP
|
||||
option(NATIVE "Use native instructions(for local use only)" OFF)
|
||||
option(PROFILE "Extra optimization" OFF)
|
||||
option(EXTRA_SECURITY "Extra security" OFF)
|
||||
|
||||
set(CMAKE_DISABLE_IN_SOURCE_BUILD TRUE)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ Artists:
|
|||
|
||||
* Issac332
|
||||
* Creature_of_steel1
|
||||
* Dess
|
||||
|
||||
Testers:
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ static void mriBindingInit(){
|
|||
_rb_define_module_function(rb_mKernel, "rgss_stop", mriRgssStop);
|
||||
_rb_define_module_function(rb_mKernel, "msgbox", mriPrint);
|
||||
_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, "p", mriP);
|
||||
rb_define_alias(rb_singleton_class(rb_mKernel), "_mkxp_kernel_caller_alias", "caller");
|
||||
|
|
@ -538,7 +537,6 @@ static void mriBindingExecute(){
|
|||
}
|
||||
|
||||
static void mriBindingTerminate(){
|
||||
printf("[mriBindingTerminate] Terminating bindings...\n");
|
||||
rb_raise(rb_eSystemExit, " ");
|
||||
#ifdef __linux__
|
||||
wallpaperBindingTerminate();
|
||||
|
|
|
|||
|
|
@ -369,7 +369,6 @@ RB_METHOD(bitmapInitializeCopy){
|
|||
|
||||
|
||||
void bitmapBindingInit(){
|
||||
printf("[bitmapBindingInit] Initializing Bitmap binding\n");
|
||||
VALUE klass = rb_define_class("Bitmap", rb_cObject);
|
||||
rb_define_alloc_func(klass, classAllocate<&BitmapType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ RB_METHOD(disposableIsDisposed){
|
|||
|
||||
template<class C>
|
||||
static void disposableBindingInit(VALUE klass){
|
||||
printf("[disposableBindingInit] Initialing disposable binding\n");
|
||||
_rb_define_method(klass, "dispose", disposableDispose<C>);
|
||||
_rb_define_method(klass, "disposed?", disposableIsDisposed<C>);
|
||||
|
||||
|
|
|
|||
|
|
@ -190,7 +190,6 @@ INITCOPY_FUN(Rect)
|
|||
{ RB_ATTR_R(Klass, Attr, attr); RB_ATTR_W(Klass, Attr, attr); }
|
||||
|
||||
void etcBindingInit(){
|
||||
printf("[etcBindingInit] Initializing etc binding\n");
|
||||
VALUE klass;
|
||||
|
||||
INIT_BIND(Color);
|
||||
|
|
|
|||
|
|
@ -192,7 +192,6 @@ RB_METHOD(_marshalLoad){
|
|||
}
|
||||
|
||||
void fileIntBindingInit(){
|
||||
printf("[fileIntBindingInit] Initializing filesystem binding...\n");
|
||||
VALUE klass = rb_define_class("FileInt", rb_cIO);
|
||||
rb_define_alloc_func(klass, classAllocate<&FileIntType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ RB_METHOD(flashableUpdate){
|
|||
|
||||
template<class C>
|
||||
static void flashableBindingInit(VALUE klass){
|
||||
printf("[flashableBindingInit] Initializing Flashable binding\n");
|
||||
_rb_define_method(klass, "flash", flashableFlash<C>);
|
||||
_rb_define_method(klass, "update", flashableUpdate<C>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,7 +233,6 @@ RB_METHOD(FontSetDefaultColor){
|
|||
}
|
||||
|
||||
void fontBindingInit(){
|
||||
printf("[fontBindingInit] Initializing Font binding\n");
|
||||
VALUE klass = rb_define_class("Font", rb_cObject);
|
||||
rb_define_alloc_func(klass, classAllocate<&FontType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ DEF_GRA_PROP_B(Frameskip)
|
|||
}
|
||||
|
||||
void graphicsBindingInit(){
|
||||
printf("[graphicsBindingInit] Initializing Graphics binding\n");
|
||||
VALUE module = rb_define_module("Graphics");
|
||||
|
||||
_rb_define_module_function(module, "update", graphicsUpdate);
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ RB_METHOD(journalActive){
|
|||
}
|
||||
|
||||
void journalBindingInit(){
|
||||
printf("[journalBindingInit] Initializing Journal binding\n");
|
||||
mutex = SDL_CreateMutex();
|
||||
memset((char*)lang_buffer, 0, BUFFER_SIZE);
|
||||
lang_buffer[0] = '_';
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "ruby/intern.h"
|
||||
#include "ruby/thread.h"
|
||||
#include "modloader.h"
|
||||
#include "config.h"
|
||||
#include <ruby.h>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
|
@ -58,7 +59,6 @@ static VALUE hooks(int argc, VALUE *argv, VALUE self) {
|
|||
}
|
||||
|
||||
void ModLoaderBindingInit(){
|
||||
Debug() << "[MODLOADER] initalizing binding...";
|
||||
VALUE klass = rb_define_module("ModLoader");
|
||||
rb_define_module_function(klass, "hooks", RUBY_METHOD_FUNC(hooks), -1);
|
||||
rb_define_const(klass, "IS_ENABLED", modloader_is_enabled ? Qtrue : Qfalse);
|
||||
|
|
|
|||
|
|
@ -46,10 +46,14 @@ module RPG
|
|||
self.load_bitmap("Graphics/Icons/", filename)
|
||||
end
|
||||
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
|
||||
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")
|
||||
else
|
||||
self.load_bitmap("Graphics/Pictures/", filename)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -195,7 +195,6 @@ RB_METHOD(nikoStart){
|
|||
}
|
||||
|
||||
void nikoBindingInit(){
|
||||
printf("[nikoBindingInit] Initializing Niko binding:3\n");
|
||||
mutex = SDL_CreateMutex();
|
||||
#if defined __linux
|
||||
mkfifo(NIKO_PIPE_PATH.c_str(), 0666);
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ RB_METHOD(oneshotCRC32){
|
|||
}
|
||||
|
||||
void oneshotBindingInit(){
|
||||
printf("[oneshotBindingInit] Initializing Oneshot binding\n");
|
||||
VALUE module = rb_define_module("Oneshot");
|
||||
VALUE msg = rb_define_module_under(module, "Msg");
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ DEF_PROP_F(Plane, ZoomY)
|
|||
|
||||
|
||||
void planeBindingInit(){
|
||||
printf("[planeBindingInit] Initializing Plane binding\n");
|
||||
VALUE klass = rb_define_class("Plane", rb_cObject);
|
||||
rb_define_alloc_func(klass, classAllocate<&PlaneType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ RB_METHOD(sceneElementSetVisible){
|
|||
|
||||
template<class C>
|
||||
void sceneElementBindingInit(VALUE klass){
|
||||
printf("[sceneElementBindingInit] Initialing SceneElement binding\n");
|
||||
_rb_define_method(klass, "z", sceneElementGetZ<C>);
|
||||
_rb_define_method(klass, "z=", sceneElementSetZ<C>);
|
||||
_rb_define_method(klass, "visible", sceneElementGetVisible<C>);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ RB_METHOD(screenSet){
|
|||
}
|
||||
|
||||
void screenBindingInit(){
|
||||
printf("[screenBindingInit] Initializing Screen binding\n");
|
||||
VALUE module = rb_define_module("Screen");
|
||||
_rb_define_module_function(module, "start", screenStart);
|
||||
_rb_define_module_function(module, "finish", screenFinish);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ static VALUE serializableDump(int, VALUE *, VALUE self){
|
|||
|
||||
template<class C>
|
||||
void serializableBindingInit(VALUE klass){
|
||||
printf("[serializableBindingInit] Initialing Binding binding\n");
|
||||
_rb_define_method(klass, "_dump", serializableDump<C>);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,10 @@
|
|||
VALUE rb_mShader;
|
||||
|
||||
void shaderBindingInit(){
|
||||
printf("[shaderBindingInit] Initializing Shaders binding\n");
|
||||
rb_mShader = rb_define_module("Shader");
|
||||
|
||||
#define DEFINE_RUBY_CONST(name, type, rb) \
|
||||
rb_define_const(rb_mShader, #rb, INT2NUM(ShaderType::SHADER_##name));
|
||||
SHADER_LIST(DEFINE_RUBY_CONST)
|
||||
#undef DEFINE_RUBY_CONST
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ RB_METHOD(spriteHeight){
|
|||
}
|
||||
|
||||
void spriteBindingInit(){
|
||||
printf("[spriteBindingInit] Initializing sprite binding\n");
|
||||
VALUE klass = rb_define_class("Sprite", rb_cObject);
|
||||
rb_define_alloc_func(klass, classAllocate<&SpriteType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void SunshineBindingInit(){
|
|||
}
|
||||
//сразу для всех обьектов
|
||||
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"))) {
|
||||
|
|
|
|||
|
|
@ -150,7 +150,6 @@ MARSH_LOAD_FUN(Table)
|
|||
INITCOPY_FUN(Table)
|
||||
|
||||
void tableBindingInit(){
|
||||
printf("[tableBindingInit] Initializing Table binding\n");
|
||||
VALUE klass = rb_define_class("Table", rb_cObject);
|
||||
rb_define_alloc_func(klass, classAllocate<&TableType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ DEF_PROP_I(Tilemap, OX)
|
|||
DEF_PROP_I(Tilemap, OY)
|
||||
|
||||
void tilemapBindingInit(){
|
||||
printf("[tilemapBindingInit] Initializing tilemap binding\n");
|
||||
VALUE klass = rb_define_class("TilemapAutotiles", rb_cObject);
|
||||
rb_define_alloc_func(klass, classAllocate<&TilemapAutotilesType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,9 +78,7 @@ DEF_PROP_OBJ_VAL(Viewport, Tone, Tone, "tone")
|
|||
DEF_PROP_I(Viewport, OX)
|
||||
DEF_PROP_I(Viewport, OY)
|
||||
|
||||
|
||||
void viewportBindingInit(){
|
||||
printf("[viewportBindingInit] Initializing viewport binding\n");
|
||||
VALUE klass = rb_define_class("Viewport", rb_cObject);
|
||||
rb_define_alloc_func(klass, classAllocate<&ViewportType>);
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@ static C *viewportElementInitialize(int argc, VALUE *argv, VALUE self){
|
|||
|
||||
template<class C>
|
||||
void viewportElementBindingInit(VALUE klass){
|
||||
printf("[viewportElementBindingInit] Initialing Viewport Element binding\n");
|
||||
sceneElementBindingInit<C>(klass);
|
||||
|
||||
_rb_define_method(klass, "viewport", viewportElementGetViewport<C>);
|
||||
|
|
|
|||
|
|
@ -27,9 +27,6 @@
|
|||
DEF_TYPE(Window);
|
||||
|
||||
RB_METHOD(windowInitialize){
|
||||
#ifdef DEBUG
|
||||
printf("[windowInitialize] Creating window\n");
|
||||
#endif
|
||||
Window *w = viewportElementInitialize<Window>(argc, argv, self);
|
||||
|
||||
setPrivateData(self, w);
|
||||
|
|
|
|||
|
|
@ -12,14 +12,12 @@ echo """[Desktop Entry]
|
|||
Type=Application
|
||||
Name=Oneshot: Sunshine
|
||||
Comment=Oneshot mod
|
||||
Exec=$install_path/oneshot.sh
|
||||
Exec=/bin/sh $install_path/oneshot.sh
|
||||
Icon=$install_path/icon.png
|
||||
Categories=Game;
|
||||
""" > $HOME/.local/share/applications/sunshine.desktop
|
||||
echo """
|
||||
#!/bin/bash
|
||||
LD_LIBRARY_PATH=$install_path\;$LD_LIBRARY_PATH $install_path/oneshot
|
||||
""" > $install_path/oneshot.sh
|
||||
set +u
|
||||
echo "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
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ set -e
|
|||
cd `dirname $0`
|
||||
|
||||
# User-configurable variables.
|
||||
linux_version="0.1.0"
|
||||
oneshot_id=420530
|
||||
STEAMWORKS_PATH=$(realpath ..)/steamworks
|
||||
|
||||
|
|
@ -15,11 +14,11 @@ cyan="\033[1;36m" # Cyan - Bold
|
|||
green="\033[1;32m" # Green - Bold
|
||||
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/
|
||||
cd build
|
||||
make -j${nproc}
|
||||
make
|
||||
cd ..
|
||||
|
||||
mkdir build/bandle
|
||||
|
|
@ -62,6 +61,7 @@ yes | cp build/oneshot build/bandle/Sunshine
|
|||
|
||||
cp installer/installer.sh build/bandle/
|
||||
cp -r ../SunshineAssets/* build/bandle/Sunshine
|
||||
cp oneshot.conf build/bandle/Sunshine
|
||||
|
||||
cd build
|
||||
zip -r OneshotSunshine.zip bandle/*
|
||||
|
|
|
|||
16
oneshot.conf
16
oneshot.conf
|
|
@ -31,8 +31,8 @@ EnableSixteenByNine=false
|
|||
# Controlling the resolution of the game window,
|
||||
# it is not recommended to change.
|
||||
# If you want to configure 16:9, use EnableSixteenByNine.
|
||||
defScreenW=0
|
||||
defScreenH=0
|
||||
# defScreenW=0
|
||||
# defScreenH=0
|
||||
|
||||
# Apply linear interpolation when game screen
|
||||
# is upscaled
|
||||
|
|
@ -46,7 +46,6 @@ vsync=true
|
|||
# (0 = disabled)
|
||||
fixedFramerate=0
|
||||
|
||||
|
||||
# Skip (don't draw) frames when behind
|
||||
# (default: enabled)
|
||||
frameSkip=true
|
||||
|
|
@ -84,7 +83,7 @@ enableBlitting=true
|
|||
maxTextureSize=0
|
||||
|
||||
# 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
|
||||
allowSymlinks=false
|
||||
|
|
@ -94,8 +93,8 @@ iconPath=/path/to/icon.png
|
|||
|
||||
# Define raw scripts to be executed before the
|
||||
# actual Scripts.rxdata execution starts
|
||||
# preloadScript=my_win32_wrapper.rb
|
||||
# preloadScript=ruby18_fixes.rb
|
||||
#preloadScript=my_win32_wrapper.rb
|
||||
#preloadScript=ruby18_fixes.rb
|
||||
|
||||
# Index all accesible assets via their lower case path
|
||||
# (emulates windows case insensitivity)
|
||||
|
|
@ -140,4 +139,7 @@ Windows_AllocConsole=false
|
|||
|
||||
# Mods directory path
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ void Config::read(int argc, char *argv[]){
|
|||
PO_DESC(defScreenW, int, 640) \
|
||||
PO_DESC(defScreenH, int, 480) \
|
||||
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(frameSkip, bool, true) \
|
||||
PO_DESC(syncToRefreshrate, bool, false) \
|
||||
|
|
@ -92,7 +92,8 @@ void Config::read(int argc, char *argv[]){
|
|||
PO_DESC(iconPath, std::string, "") \
|
||||
PO_DESC(SE.sourceCount, int, 6) \
|
||||
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
|
||||
#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);
|
||||
|
||||
commonDataPath = prefPath(".", "Oneshot");
|
||||
commonDataPath = prefPath(".", "Sunshine");
|
||||
|
||||
if(windowTitle == "")
|
||||
game.title = "OneShot: Sunshine";
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ struct Config{
|
|||
int defScreenW;
|
||||
int defScreenH;
|
||||
std::string windowTitle;
|
||||
std::string ModsDirPath;
|
||||
|
||||
|
||||
int fixedFramerate;
|
||||
bool frameSkip;
|
||||
bool syncToRefreshrate;
|
||||
|
|
@ -60,6 +59,11 @@ struct Config{
|
|||
struct{
|
||||
int sourceCount;
|
||||
} SE;
|
||||
|
||||
struct{
|
||||
std::string ModsDirPath;
|
||||
bool use_default_save_path;
|
||||
} Modloader;
|
||||
|
||||
bool useScriptNames;
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ std::string sha256_file(const std::string &fn) {
|
|||
}
|
||||
|
||||
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)) {
|
||||
Debug() << "[MODLOADER] Mods directory not found, skip.";
|
||||
return "";
|
||||
|
|
|
|||
2
test2
Normal file
2
test2
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
LD_LIBRARY_PATH=: /oneshot
|
||||
Loading…
Reference in a new issue