From 30b3136398211c2a27af694f1ae803a398543285 Mon Sep 17 00:00:00 2001 From: DepressedTWM Date: Wed, 10 Jun 2026 13:10:26 -0400 Subject: [PATCH] issac meow --- CMakeLists.txt | 1 + oneshot.conf | 116 ++++++++++++++----------------------------------- src/config.cpp | 11 ++--- src/main.cpp | 3 ++ src/sunshine.h | 4 ++ 5 files changed, 44 insertions(+), 91 deletions(-) create mode 100644 src/sunshine.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 0095db7..45698f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,7 @@ set(MAIN_HEADERS src/i18n.h src/meow.h src/modloader.h + src/sunshine.h ) set(MAIN_SOURCE diff --git a/oneshot.conf b/oneshot.conf index 96fec66..d3c12d7 100644 --- a/oneshot.conf +++ b/oneshot.conf @@ -9,67 +9,47 @@ # relative to gameFolder and ignoring both RTPs and # encrypted archives. -# Debug mode # Enable reset on F12 press and other -# (default: disabled) -# -# debugMode=false +debugMode=false # Start game in fullscreen mode, -# i.e. Big Picture/console mode. -# (default: disabled) -# -# fullscreen=false +fullscreen=false -# screenMode # idk -# (default: disabled) -# screenMode=false +screenMode=false # Display current FPS in Window title -# (default: disabled) -# printFPS=false +printFPS=false # Preserve game screen aspect ratio, # as opposed to stretch-to-fill -# (default: enabled) -# -# fixedAspectRatio=true +fixedAspectRatio=true # 16:9 support -# Force Game work in 16:9. -# (default: disabled) -# -# EnableSixteenByNine=false +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 -# (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) -# -# fixedFramerate=0 +fixedFramerate=0 # Skip (don't draw) frames when behind # (default: enabled) -# -# frameSkip=true +frameSkip=true # Use a fixed framerate that is approx. equal to the # native screen refresh rate. This is different from @@ -77,30 +57,23 @@ # reported back to the game, ensuring correct timers. # If the screen refresh rate cannot be determined, # this option is force-disabled -# (default: disabled) -# -# syncToRefreshrate=false +syncToRefreshrate=false # Don't use alpha blending when rendering text # (default: disabled) -# -# solidFonts=false +solidFonts=false # Work around buggy graphics drivers which don't # properly synchronize texture access, most # apparent when text doesn't show up or the map # tileset doesn't render at all -# (default: disabled) -# -# subImageFix=false +subImageFix=false # Enable framebuffer blitting if the driver is # capable of it. Some drivers carry buggy # implementations of this functionality, so # disabling it can be used as a workaround -# (default: enabled) -# -# enableBlitting=true +enableBlitting=true # Limit the maximum size (width, height) of # most textures mkxp will create (exceptions are @@ -108,45 +81,31 @@ # If set to 0, the hardware maximum is used. # This is useful for recording traces that can # be played back on machines with lower specs. -# (default: 0) -# -# maxTextureSize=0 +maxTextureSize=0 # Set the base path of the game to '/path/to/game' -# (default: executable directory) -# -# gameFolder=/path/to/game +gameFolder=/path/to/game # Allow symlinks for game assets to be followed -# (default: disabled) -# -# allowSymlinks=false +allowSymlinks=false # Set the game window icon to 'path/to/icon.png' -# (default: none) -# -# iconPath=/path/to/icon.png +iconPath=/path/to/icon.png # Define raw scripts to be executed before the # actual Scripts.rxdata execution starts -# (default: none) -# # preloadScript=my_win32_wrapper.rb # preloadScript=ruby18_fixes.rb # Index all accesible assets via their lower case path # (emulates windows case insensitivity) -# (default: enabled) -# -# pathCache=true +pathCache=true # Add 'rtp1', 'rtp2.zip' and 'game.rgssad' to the # asset search path (multiple allowed) -# (default: none) -# -# RTP=/path/to/rtp1 -# RTP=/path/to/rtp2.zip -# RTP=/path/to/game.rgssad +#RTP=/path/to/rtp1 +#RTP=/path/to/rtp2.zip +#RTP=/path/to/game.rgssad # Font substitutions allow drop-in replacements of fonts # to be used without changing the RGSS scripts, @@ -157,11 +116,8 @@ # This is not connected to the built-in font, which is # always used when a non-existing font family is # requested by RGSS. -# (default: none) -# -# fontSub=Arial>Open Sans -# fontSub=Times New Roman>Liberation Serif - +#fontSub=Arial>Open Sans +#fontSub=Times New Roman>Liberation Serif # Because mkxp is usually distributed as a stand alone # build, no predefined load paths are initialized @@ -169,27 +125,19 @@ # they can be specified manually (eg. when using a system # libruby.so). It is however recommended to statically # link all required gems into libruby.so. -# (default: none) -# -# rubyLoadpath=/usr/lib64/ruby/ -# rubyLoadpath=/usr/local/share/ruby/site_ruby - +#rubyLoadpath=/usr/lib64/ruby/ +#rubyLoadpath=/usr/local/share/ruby/site_ruby # Number of OpenAL sources to allocate for SE playback. # If there are a lot of sounds playing at the same time # and audibly cutting each other off, try increasing # this number. Maximum: 64. -# -# SE.sourceCount=6 +SE.sourceCount=6 # [Windows only] Alloc console # Launch a console window with debug information along with the game. -# (default: false) -# -# Windows_AllocConsole=false +Windows_AllocConsole=false # Mods directory path -# Path to mods directory -# (default: "mods") -# -# ModsDirPath="mods" +# Path to mods directory +ModsDirPath="mods" diff --git a/src/config.cpp b/src/config.cpp index 61c7f49..b3b1f34 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -76,8 +76,8 @@ void Config::read(int argc, char *argv[]){ PO_DESC(fixedAspectRatio, bool, true) \ PO_DESC(smoothScaling, bool, false) \ PO_DESC(vsync, bool, true) \ - PO_DESC(defScreenW, int, 0) \ - PO_DESC(defScreenH, int, 0) \ + PO_DESC(defScreenW, int, 640) \ + PO_DESC(defScreenH, int, 480) \ PO_DESC(windowTitle, std::string, "") \ PO_DESC(ModsDirPath, std::string,"mods") \ PO_DESC(fixedFramerate, int, 0) \ @@ -172,16 +172,13 @@ void Config::read(int argc, char *argv[]){ game.title = "OneShot: Sunshine"; game.scripts = "Data/xScripts.rxdata"; - if(defScreenW == 0 || defScreenH == 0){ + if(defScreenW == 640 || defScreenH == 480){ if (EnableSixteenByNine){ defScreenW = 1280; defScreenH = 720; - }else{ - defScreenW = 640; - defScreenH = 480; } } - + #ifdef STEAM /* Override fullscreen config if Big Picture */ if (const char *env = SDL_getenv("SteamTenfoot")){ diff --git a/src/main.cpp b/src/main.cpp index 599449b..098bd00 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include "sharedstate.h" #include "eventthread.h" @@ -50,6 +51,7 @@ #include "i18n.h" #include "security.h" #include "modloader.h" +#include "sunshine.h" #include "meow.h" @@ -214,6 +216,7 @@ static void setGamePathInRegistry() { } int main(int argc, char *argv[]){ SecurityManagerInit(); + starttime = boost::chrono::high_resolution_clock::now(); loadLanguageMetadata(); //there will be a segfault on fclose if I don't move it here SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0"); diff --git a/src/sunshine.h b/src/sunshine.h new file mode 100644 index 0000000..3761076 --- /dev/null +++ b/src/sunshine.h @@ -0,0 +1,4 @@ +#include +//помойка ебаная +inline boost::chrono::high_resolution_clock::time_point starttime; +