bruh
This commit is contained in:
parent
f2da37648b
commit
1024638043
|
|
@ -21,9 +21,11 @@
|
||||||
|
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
#include "sharedstate.h"
|
#include "sharedstate.h"
|
||||||
|
#include "eventthread.h"
|
||||||
#include "binding-util.h"
|
#include "binding-util.h"
|
||||||
#include "binding-types.h"
|
#include "binding-types.h"
|
||||||
#include "exception.h"
|
#include "exception.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
RB_METHOD(graphicsUpdate){
|
RB_METHOD(graphicsUpdate){
|
||||||
RB_UNUSED_PARAM;
|
RB_UNUSED_PARAM;
|
||||||
|
|
@ -186,7 +188,6 @@ DEF_GRA_PROP_B(Frameskip)
|
||||||
|
|
||||||
void graphicsBindingInit(){
|
void graphicsBindingInit(){
|
||||||
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);
|
||||||
_rb_define_module_function(module, "freeze", graphicsFreeze);
|
_rb_define_module_function(module, "freeze", graphicsFreeze);
|
||||||
_rb_define_module_function(module, "transition", graphicsTransition);
|
_rb_define_module_function(module, "transition", graphicsTransition);
|
||||||
|
|
@ -199,6 +200,8 @@ void graphicsBindingInit(){
|
||||||
|
|
||||||
_rb_define_module_function(module, "width", graphicsWidth);
|
_rb_define_module_function(module, "width", graphicsWidth);
|
||||||
_rb_define_module_function(module, "height", graphicsHeight);
|
_rb_define_module_function(module, "height", graphicsHeight);
|
||||||
|
const Config &conf = shState->rtData().config;
|
||||||
|
rb_define_const(module, "ASPECT", rb_str_new_cstr(conf.AspectPreset.c_str()));
|
||||||
_rb_define_module_function(module, "wait", graphicsWait);
|
_rb_define_module_function(module, "wait", graphicsWait);
|
||||||
_rb_define_module_function(module, "fadeout", graphicsFadeout);
|
_rb_define_module_function(module, "fadeout", graphicsFadeout);
|
||||||
_rb_define_module_function(module, "fadein", graphicsFadein);
|
_rb_define_module_function(module, "fadein", graphicsFadein);
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,13 @@ printFPS=false
|
||||||
# as opposed to stretch-to-fill
|
# as opposed to stretch-to-fill
|
||||||
fixedAspectRatio=true
|
fixedAspectRatio=true
|
||||||
|
|
||||||
# 16:9 support
|
# Set Monitor Aspect preset
|
||||||
EnableSixteenByNine=false
|
# Aviable:
|
||||||
|
# _4_3 (default)
|
||||||
|
# _16_9
|
||||||
|
# _16_10
|
||||||
|
# _2_3
|
||||||
|
AspectPreset="_4_3"
|
||||||
|
|
||||||
# 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.
|
||||||
|
|
|
||||||
|
|
@ -71,9 +71,9 @@ void Config::read(int argc, char *argv[]){
|
||||||
PO_DESC(debugMode, bool, false) \
|
PO_DESC(debugMode, bool, false) \
|
||||||
PO_DESC(screenMode, bool, false) \
|
PO_DESC(screenMode, bool, false) \
|
||||||
PO_DESC(printFPS, bool, false) \
|
PO_DESC(printFPS, bool, false) \
|
||||||
PO_DESC(EnableSixteenByNine, bool, false) \
|
|
||||||
PO_DESC(fullscreen, bool, false) \
|
PO_DESC(fullscreen, bool, false) \
|
||||||
PO_DESC(fixedAspectRatio, bool, true) \
|
PO_DESC(fixedAspectRatio, bool, true) \
|
||||||
|
PO_DESC(AspectPreset, std::string, "_4_3") \
|
||||||
PO_DESC(smoothScaling, bool, false) \
|
PO_DESC(smoothScaling, bool, false) \
|
||||||
PO_DESC(vsync, bool, true) \
|
PO_DESC(vsync, bool, true) \
|
||||||
PO_DESC(defScreenW, int, 640) \
|
PO_DESC(defScreenW, int, 640) \
|
||||||
|
|
@ -177,13 +177,6 @@ void Config::read(int argc, char *argv[]){
|
||||||
game.title = "OneShot: Sunshine";
|
game.title = "OneShot: Sunshine";
|
||||||
game.scripts = "Data/xScripts.rxdata";
|
game.scripts = "Data/xScripts.rxdata";
|
||||||
|
|
||||||
if(defScreenW == 640 || defScreenH == 480){
|
|
||||||
if (EnableSixteenByNine){
|
|
||||||
defScreenW = 1280;
|
|
||||||
defScreenH = 720;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef STEAM
|
#ifdef STEAM
|
||||||
/* Override fullscreen config if Big Picture */
|
/* Override fullscreen config if Big Picture */
|
||||||
if (const char *env = SDL_getenv("SteamTenfoot")){
|
if (const char *env = SDL_getenv("SteamTenfoot")){
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ struct Config{
|
||||||
bool Windows_AllocConsole;
|
bool Windows_AllocConsole;
|
||||||
bool smoothScaling;
|
bool smoothScaling;
|
||||||
bool vsync;
|
bool vsync;
|
||||||
bool EnableSixteenByNine;
|
|
||||||
int defScreenW;
|
int defScreenW;
|
||||||
int defScreenH;
|
int defScreenH;
|
||||||
std::string windowTitle;
|
std::string windowTitle;
|
||||||
|
|
@ -51,6 +50,7 @@ struct Config{
|
||||||
int maxTextureSize;
|
int maxTextureSize;
|
||||||
|
|
||||||
std::string gameFolder;
|
std::string gameFolder;
|
||||||
|
std::string AspectPreset;
|
||||||
bool allowSymlinks;
|
bool allowSymlinks;
|
||||||
bool pathCache;
|
bool pathCache;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue