This commit is contained in:
whitecum1488 2026-07-19 02:04:34 +03:00
commit e0532b19b2
13 changed files with 149 additions and 146 deletions

View File

@ -1,37 +1,36 @@
<!-- markdownlint-disable MD033 --> <!-- markdownlint-disable MD033 -->
# Портирование | Porting
## Операционные системы | Operating Systems ## Операционные системы | Operating Systems
| Платформа<br>Platform | Завершено<br>Done % | Состояние<br>State | | Платформа<br>Platform | Завершено<br>Done % | Состояние<br>State |
| :--- | :---: | :--- | | :--- | :---: | :--- |
| Windows | 100% | Играбельно | | Windows | 100% | Играбельно |
| Linux | 91% | В работе, но уже играбельно<br>TODO:<br>&nbsp;\* Fix Wallpaper manager | | Linux | 91% | В работе, но уже играбельно<br>TODO:<br>&nbsp;\* Fix Wallpaper manager
| *BSD | 15% | в работе | | *BSD | 15% | не в работе |
| GNU/Hurd | 1% | В работе | | GNU/Hurd | 1% | не в работе |
| Solaris/OpenSolaris | 1% | В работе | | Solaris/OpenSolaris | 1% | не в работе |
| RedoxOS | 0% | Не хватает библеотек | | RedoxOS | 0% | Не хватает библеотек |
| Android | 4% | В работе | | Android | 4% | В работе |
| PS Vita | 1% | В работе | | PS Vita | 1% | не в работе |
| PSP | 1% | В работе | | PSP | 1% | не в работе |
| Emspritein(web) | 11% | Нет хватает библеотек<br>&nbsp;\* Нужно написать порт библеотеки libsigc++2<br>(А лучше 3 и переписать движок)<br>&nbsp;\* Проблемы с компиляцией и зависимостями | | Emspritein(web) | 11% | Нет хватает библеотек<br>&nbsp;\* Нужно написать порт библеотеки libsigc++2<br>(А лучше 3 и переписать движок)<br>&nbsp;\* Проблемы с компиляцией и зависимостями |
| HaikuOS | 1% | В работе | | HaikuOS | 1% | не в работе |
| DOS | 1% | Не в работе | | DOS | 1% | Не в работе |
| Ubuntu Touch | 61% | Будет почти готово тогда когда Linux порт будет доведён до ума | | Ubuntu Touch | 60% | Будет почти готово тогда когда Linux порт будет доведён до ума |
| Аврора ОС | 0% | Возможно, но пока не в работе | | Аврора ОС | 0% | не в работе |
| ChromeOS/ChromiumOS | 0.4% | Неизвестное | | ChromeOS/ChromiumOS | 0.4% | Неизвестное |
| MacOS | 10.5% | Неизвестное, но работа ведётся | | MacOS | 10.5% | Неизвестное, но работа ведётся |
| Kyronix | 10% | В работе сторонней командой разработчиков|
## Окружения рабочего стола | Desktop Environments ## Окружения рабочего стола | Desktop Environments
| Окружение<br>Environments | Завершено<br>Done % | | Окружение<br>Environments | Завершено<br>Done % |
| :--- | :---: | | :--- | :---: |
| X11 standalone window managers | 0% |
| Wayland standalone window managers | 0% |
| LXDE | 100% | | LXDE | 100% |
| XFCE | 10% | | XFCE | 10% |
| GNOME | 10% | | GNOME | 10% |
| KDE | 10% | | KDE | 10% |
| LXQt | 0% | | LXQT | 0% |
| MATE | 0% | | MATE | 10% |
| Cinnamon | 10% | | Cinnamon | 10% |
| Budgie | 0% | | Budgie | 0% |
| Deepin | 10% | | Deepin | 10% |
@ -42,28 +41,7 @@
| Sugar Desktop | 0% | | Sugar Desktop | 0% |
| ROX Desktop | 0% | | ROX Desktop | 0% |
| Fluxbox | 0% | | Fluxbox | 0% |
| Openbox | 0% |
| Trinity | 0% | | Trinity | 0% |
| Blackbox | 0% |
| AwesomeWM | 0% |
| DWM | 0% |
| hyperland | 0% |
| niri | 0% |
| Fish | 0% | | Fish | 0% |
| Lumina | 0% | | Lumina | 0% |
| IceWM | 0% | | IceWM | 0% |
| Window Maker | 0% |
| I3 | 0% |
| Sway | 0% |
| Wayfire | 0% |
| bspwm | 0% |
| herbstluftwm | 0% |
| xmonad | 0% |
| qtile | 0% |
| CDE | 0% |
| Fvwm95 | 0% |
| OpenWindows | 0% |
| Dt | 0% |
| 9wm | 0% |
| Twm | 0% |
| WindowLab | 0% |

View File

@ -74,3 +74,8 @@ Extended Office location
Reworked Refuge(WIP) Reworked Refuge(WIP)
Updated Game quit common event Updated Game quit common event
Solstice credits updated Solstice credits updated
Removed text size limit in Ed Message
Rewrited Linux build scripts
Deleted unused maps
Game maps size fixed
Big performance fix

View File

@ -1,28 +1,19 @@
#!/bin/sh #!/bin/bash
set -euo pipefail set -euo pipefail
cd `dirname $0` cd "dirname $0"
# User-configurable variables. # User-configurable variables.
oneshot_id=420530 oneshot_id=420530
STEAMWORKS_PATH=$(realpath ..)/steamworks STEAMWORKS_PATH=$(realpath ..)/steamworks
# Colors.
white="\033[0;37m" # White - Regular
bold="\033[1;37m" # White - Bold
cyan="\033[1;36m" # Cyan - Bold
green="\033[1;32m" # Green - Bold
color_reset="\033[0m" # Reset Colors
echo -e "Compiling ${bold}Sunshine Bandle for Linux...${color_reset}\n"
cmake . -B build/ cmake . -B build/
cd build cd build
make make -j$(nproc)
cd .. cd ..
mkdir build/bandle mkdir build/bandle
mkdir build/bandle/Sunshine mkdir build/bandle
mkdir build/bandle/Sunshine/Data mkdir build/bandle/Data
# Compile steamshim. # Compile steamshim.
#echo -e "-> ${cyan}Compile steamshim...${color_reset}" #echo -e "-> ${cyan}Compile steamshim...${color_reset}"
@ -33,41 +24,30 @@ mkdir build/bandle/Sunshine/Data
#cp "$STEAMWORKS_PATH/redistributable_bin/linux64/libsteam_api.so" . #cp "$STEAMWORKS_PATH/redistributable_bin/linux64/libsteam_api.so" .
#make -j${make_threads} > steamshim.make.out #make -j${make_threads} > steamshim.make.out
#cd ../.. #cd ../..
# Compile Journal.
echo -e "-> ${cyan}Compile journal...${color_reset}"
pyinstaller journal/unix/journal.spec #--windowed pyinstaller journal/unix/journal.spec #--windowed
ruby rpgscript.rb scripts/ build/bandle/
# Compile scripts. cp -r dist/_______/* build/bandle/
echo -e "-> ${cyan}Compile xScripts.rxdata...${color_reset}" cp build/oneshot build/bandle/
ruby rpgscript.rb scripts/ build/bandle/Sunshine/
# Copy results.
echo -e "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
yes | cp -r dist/_______/* build/bandle/Sunshine/
yes | cp build/oneshot build/bandle/Sunshine
#yes | cp steamshim_parent/build/steamshim "$ONESHOT_PATH" #yes | cp steamshim_parent/build/steamshim "$ONESHOT_PATH"
#echo "$oneshot_id" > "$ONESHOT_PATH/steam_appid.txt" #echo "$oneshot_id" > "$ONESHOT_PATH/steam_appid.txt"
# Copy libraries. # Copy libraries.
echo -e "-> ${cyan}Install OneShot libraries to Steam directory...${color_reset}"
mkdir libs mkdir libs
ldd build/oneshot | ruby libraries.rb ldd build/oneshot | ruby libraries.rb
#ldd steamshim_parent/build/steamshim | ruby libraries.rb #ldd steamshim_parent/build/steamshim | ruby libraries.rb
yes | cp libs/* build/bandle/Sunshine cp libs/* build/bandle
yes | cp build/oneshot build/bandle/Sunshine cp build/oneshot build/bandle
cp installer/installer.sh build/bandle/ cp -r ../SunshineAssets/* build/bandle
cp -r ../SunshineAssets/* build/bandle/Sunshine cp oneshot.conf build/bandle
cp oneshot.conf build/bandle/Sunshine
cd build cd build
zip -r OneshotSunshine.zip bandle/* zip -r OneshotSunshine.zip bandle/*
cd .. cd ..
# Cleanup. # Cleanup.
echo -e "-> ${cyan}Cleanup files...${color_reset}"
rm -rf journal/unix/__pycache__ rm -rf journal/unix/__pycache__
#rm -rf build/* #rm -rf build/*
rm -rf dist rm -rf dist

View File

@ -26,9 +26,6 @@ module Settings
:en_purple_messagebox => true, :en_purple_messagebox => true,
:enforce_april_fools => false, :enforce_april_fools => false,
:true_memory_mode => false, :true_memory_mode => false,
:pre_solstice_update_content => false,
:dejavu_mode => false,
:demo => false,
:oneshot_mode => false, :oneshot_mode => false,
# Advanced # Advanced
@ -138,11 +135,6 @@ class Window_Settings
}, },
], ],
tr("Video") => [ tr("Video") => [
{
:type => :bool,
:name => tr('Fullscreen'),
:parameter => :fullscreen
},
{ {
:type => :enum, :type => :enum,
:name => tr('Resolution'), :name => tr('Resolution'),
@ -150,6 +142,11 @@ class Window_Settings
:parameter => Graphics::RESOLUTION_OVERRIDDEN ? nil : :resolution, :parameter => Graphics::RESOLUTION_OVERRIDDEN ? nil : :resolution,
:values => Graphics::RESOLUTION_OVERRIDDEN ? ["Resolution is redefined via config"] : Graphics.resolutions_names_list :values => Graphics::RESOLUTION_OVERRIDDEN ? ["Resolution is redefined via config"] : Graphics.resolutions_names_list
}, },
{
:type => :bool,
:name => tr('Fullscreen'),
:parameter => :fullscreen
},
{ {
:type => :bool, :type => :bool,
:name => tr('Colorblind mode'), :name => tr('Colorblind mode'),
@ -171,11 +168,6 @@ class Window_Settings
:name => tr('Dynamic Light'), :name => tr('Dynamic Light'),
:parameter => :light, :parameter => :light,
}, },
#{
# :type => :bool,
# :name => tr('Shadows'),
# :parameter => :light_shadows
#},
], ],
tr("UI") => [ tr("UI") => [
{ {
@ -193,10 +185,16 @@ class Window_Settings
:type => :enum, :type => :enum,
:name => tr('FastTravel UI'), :name => tr('FastTravel UI'),
:parameter => :fasttravel_ui, :parameter => :fasttravel_ui,
:values => [tr("Original"), tr("WME")] :values => [tr("Original"), tr("WME (WIP)")]
}, },
], ],
tr("Gameplay") => [ tr("Gameplay") => [
{
:type => :enum,
:name => tr('Default movement'),
:parameter => :movement,
:values => [tr("Walk"), tr("Run")]
},
{ {
:type => :bool, :type => :bool,
:name => tr('Skip Text (R)'), :name => tr('Skip Text (R)'),
@ -204,37 +202,22 @@ class Window_Settings
}, },
{ {
:type => :bool, :type => :bool,
:name => tr('Purple message box for Entity(WIP)'), :name => tr('Purple message box for Entity(Not implemented)'),
:parameter => :en_purple_messagebox :parameter => :en_purple_messagebox
}, },
{ {
:type => :bool, :type => :bool,
:name => tr('Enforce april fools(WIP)'), :name => tr('Enforce april fools'),
:parameter => :enforce_april_fools :parameter => :enforce_april_fools
}, },
{ {
:type => :bool, :type => :bool,
:name => tr('True Memory Mode(WIP)'), :name => tr('True Memory Mode(Not implemented)'),
:parameter => :true_memory_mode :parameter => :true_memory_mode
}, },
{ {
:type => :bool, :type => :bool,
:name => tr('Enable Pre-Solstice update content(WIP)'), :name => tr('Freeware Mode(!, WIP)'),
:parameter => :pre_solstice_update_content
},
{
:type => :bool,
:name => tr('Dejavu mode(WIP)'),
:parameter => :dejavu_mode
},
{
:type => :bool,
:name => tr('Demo mode(WIP)'),
:parameter => :demo
},
{
:type => :bool,
:name => tr('Freeware Mode(!)'),
:parameter => :oneshot_mode :parameter => :oneshot_mode
}, },
], ],
@ -244,13 +227,6 @@ class Window_Settings
:name => tr('Control LED lighting on gamepads'), :name => tr('Control LED lighting on gamepads'),
:parameter => :gamepad_led :parameter => :gamepad_led
}, },
#{
# :type => :slider,
# :name => tr("Gamepad deadzone"),
# :parameter => :gamepad_deadzone,
# :min => 0,
# :max => 10
#},
{ :type => :sep, :name => tr("Walk") }, { :type => :sep, :name => tr("Walk") },
{ {
:type => :key, :type => :key,

View File

@ -318,7 +318,7 @@ class Window_Settings
end end
def value def value
if (Settings.has?(@parameter)) if @parameter && Settings.has?(@parameter)
@value = Settings[@parameter] @value = Settings[@parameter]
end end
@value @value

View File

@ -1,19 +1,19 @@
# Displays Ed message boxes # Displays Ed message boxes
class Ed_Message class Ed_Message
HEIGHT = 160
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Object Initialization # * Object Initialization
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def initialize def initialize
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@sprite_bg = Sprite.new(@viewport) @sprite_bg = Sprite.new(@viewport)
@sprite_bg.bitmap = Bitmap.new(Graphics.width, Graphics.height) @sprite_bg.bitmap = Bitmap.new(1, 1)
@sprite_bg.bitmap.fill_rect(0, 0, Graphics.width, Graphics.height, Color.new(0, 0, 0, 128)) @sprite_bg.bitmap.fill_rect(0, 0, 1, 1, Color.new(0, 0, 0, 128))
@sprite_bg.zoom_x = Graphics.width
@sprite_bg.zoom_y = Graphics.height
@sprite_text = Sprite.new(@viewport) @sprite_text = Sprite.new(@viewport)
@contents = Bitmap.new(Graphics.width, HEIGHT) @contents = Bitmap.new(Graphics.width, Graphics.height)
Language.register_text_sprite(self.class.name + "_contents", @contents) Language.register_text_sprite(self.class.name + "_contents", @contents)
@sprite_text.bitmap = @contents @sprite_text.bitmap = @contents
@sprite_text.y = (Graphics.height - HEIGHT) / 2
@sprite_bg.z = 0 @sprite_bg.z = 0
@sprite_text.z = 1 @sprite_text.z = 1
@viewport.z = 9999 @viewport.z = 9999
@ -28,12 +28,26 @@ class Ed_Message
@fade_out = false @fade_out = false
@fade_in_text = false @fade_in_text = false
@fade_out_text = false @fade_out_text = false
@resize_connection = Graphics.viewport_resized do |w, h|
@viewport.rect.width = w
@viewport.rect.height = h
@sprite_bg.zoom_x = w
@sprite_bg.zoom_y = h
@contents.dispose
@contents = Bitmap.new(w, h)
@sprite_text.bitmap = @contents
end
RPG::Mod.exec_hooks("hooks/Ed_Message/init", binding) RPG::Mod.exec_hooks("hooks/Ed_Message/init", binding)
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Dispose # * Dispose
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def dispose def dispose
@resize_connection.disconnect
terminate_message terminate_message
$game_temp.message_window_showing = false $game_temp.message_window_showing = false
@contents.dispose @contents.dispose
@ -93,7 +107,7 @@ class Ed_Message
widths << x widths << x
x = 0 x = 0
y += 1 y += 1
break if y >= 4 #break if y >= 4
else else
newline = true newline = true
end end
@ -105,7 +119,7 @@ class Ed_Message
widths << x widths << x
x = 0 x = 0
y += 1 y += 1
break if y >= 4 #break if y >= 4
end end
# Append word to list # Append word to list
@ -116,14 +130,14 @@ class Ed_Message
end end
x += width + spacewidth x += width + spacewidth
end end
break if y >= 4 #break if y >= 4
end end
widths << x if y < 4 widths << x# if y < 4
# Prepare renderer # Prepare renderer
@contents.clear @contents.clear
@contents.font.color = Color.new(255, 255, 255, 255) @contents.font.color = Color.new(255, 255, 255, 255)
y_top = (HEIGHT - widths.length * 24) / 2 y_top = (Graphics.height - widths.length * 24) / 2
x = (Graphics.width - widths[0]) / 2 x = (Graphics.width - widths[0]) / 2
y = 0 y = 0

View File

@ -23,6 +23,12 @@ class Game_Map
attr_accessor :battleback_name # battleback file name attr_accessor :battleback_name # battleback file name
attr_accessor :display_x # display x-coordinate * 128 attr_accessor :display_x # display x-coordinate * 128
attr_accessor :display_y # display y-coordinate * 128 attr_accessor :display_y # display y-coordinate * 128
attr_accessor :display_clip_bottom
attr_accessor :display_clip_left
attr_accessor :display_clip_right
attr_accessor :display_clip_top
attr_accessor :display_x_fix
attr_accessor :display_y_fix
attr_accessor :wrap_x # display x-coordinate * 128 for wrap attr_accessor :wrap_x # display x-coordinate * 128 for wrap
attr_accessor :wrap_y # display y-coordinate * 128 for wrap attr_accessor :wrap_y # display y-coordinate * 128 for wrap
attr_accessor :need_refresh # refresh request flag attr_accessor :need_refresh # refresh request flag
@ -83,6 +89,12 @@ class Game_Map
@map_id = 0 @map_id = 0
@display_x = 0 @display_x = 0
@display_y = 0 @display_y = 0
@display_clip_bottom = 999999
@display_clip_left = 0
@display_clip_right = 999999
@display_clip_top = 0
@display_x_fix = nil
@display_y_fix = nil
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Setup # * Setup
@ -118,6 +130,12 @@ class Game_Map
# Initialize displayed coordinates # Initialize displayed coordinates
@display_x = 0 @display_x = 0
@display_y = 0 @display_y = 0
@display_clip_bottom = 999999
@display_clip_left = 0
@display_clip_right = 999999
@display_clip_top = 0
@display_x_fix = nil
@display_y_fix = nil
@wrap_x = 0 @wrap_x = 0
@wrap_y = 0 @wrap_y = 0
# Clear refresh request flag # Clear refresh request flag
@ -263,36 +281,40 @@ class Game_Map
# distance : scroll distance # distance : scroll distance
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def scroll_down(distance) def scroll_down(distance)
if self.height < Graphics.height / 28 return if @display_y_fix
@display_y = self.height / 2
else @display_y = [@display_y + distance, (self.height - Graphics.height / 32 - 1) * 128].min
@display_y = [@display_y + distance, (self.height - Graphics.height / 28) * 128].min @display_y = @display_y.clamp((@display_clip_top * 128.0).to_i, (@display_clip_bottom * 128.0).to_i - Graphics.height * 4)
end
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Scroll Left # * Scroll Left
# distance : scroll distance # distance : scroll distance
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def scroll_left(distance) def scroll_left(distance)
return if @display_x_fix
@display_x = [@display_x - distance, 0].max @display_x = [@display_x - distance, 0].max
@display_x = @display_x.clamp((@display_clip_left * 128.0).to_i, (@display_clip_right * 128.0).to_i - Graphics.width * 4)
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Scroll Right # * Scroll Right
# distance : scroll distance # distance : scroll distance
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def scroll_right(distance) def scroll_right(distance)
return if @display_x_fix
@display_x = [@display_x + distance, (self.width - (Graphics.width / 32)) * 128].min @display_x = [@display_x + distance, (self.width - (Graphics.width / 32)) * 128].min
@display_x = @display_x.clamp((@display_clip_left * 128.0).to_i, (@display_clip_right * 128.0).to_i - Graphics.width * 4)
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Scroll Up # * Scroll Up
# distance : scroll distance # distance : scroll distance
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def scroll_up(distance) def scroll_up(distance)
if self.height < Graphics.height / 28 return if @display_y_fix
@display_y = self.height / 2
else
@display_y = [@display_y - distance, 0].max @display_y = [@display_y - distance, 0].max
end @display_y = @display_y.clamp((@display_clip_top * 128.0).to_i, (@display_clip_bottom * 128.0).to_i - Graphics.height * 4)
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Determine Valid Coordinates # * Determine Valid Coordinates
@ -486,6 +508,11 @@ class Game_Map
# * Frame Update # * Frame Update
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def update def update
@display_clip_top = @display_clip_top || 0
@display_clip_left = @display_clip_left || 0
@display_clip_right = @display_clip_right || 999999
@display_clip_bottom = @display_clip_bottom || 999999
# Refresh map if necessary # Refresh map if necessary
if $game_map.need_refresh if $game_map.need_refresh
refresh refresh
@ -535,6 +562,17 @@ class Game_Map
@fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
@fog_opacity_duration -= 1 @fog_opacity_duration -= 1
end end
if @display_x_fix
@display_x = (@display_x_fix * 128.0).to_i - Graphics.width * 2
else
@display_x = @display_x.clamp((@display_clip_left * 128.0).to_i, (@display_clip_right * 128.0).to_i - Graphics.width * 4)
end
if @display_y_fix
@display_y = (@display_y_fix * 128.0).to_i - Graphics.height * 2
else
@display_y = @display_y.clamp((@display_clip_top * 128.0).to_i, (@display_clip_bottom * 128.0).to_i - Graphics.height * 4)
end
end end
def set_tile(x, y, z, tile) def set_tile(x, y, z, tile)

View File

@ -60,7 +60,6 @@ class Scene_Map
@blackfade.z = 9999 @blackfade.z = 9999
color = GamepadMapColors::COLORS[$game_map.map_id] || GamepadMapColors::SUN color = GamepadMapColors::COLORS[$game_map.map_id] || GamepadMapColors::SUN
Input.set_led(color.red, color.green, color.blue) Input.set_led(color.red, color.green, color.blue)
RPG::Mod.exec_hooks("hooks/Scene_Map/main", binding)
# Transition run # Transition run
Graphics.transition Graphics.transition

View File

@ -115,7 +115,7 @@ class Scene_Title
@cursor.zoom_x = @cursor.zoom_y = 2 @cursor.zoom_x = @cursor.zoom_y = 2
@cursor.z += 2 @cursor.z += 2
@cursor.x = Graphics.width - MENU_X - 12 @cursor.x = Graphics.width - MENU_X - 12
@cursor.y = Graphics.height - MENU_Y + (ENTRY_HEIGHT - @cursor.bitmap.height) / 2 - 2 @cursor.y = Graphics.height - MENU_Y + (ENTRY_HEIGHT - @cursor.bitmap.height) / 2 - 3
# Initialize cursor position # Initialize cursor position
@cursor_pos = 0.0 @cursor_pos = 0.0
@ -127,7 +127,7 @@ class Scene_Title
@menu.x = w - MENU_X @menu.x = w - MENU_X
@menu.y = h - MENU_Y @menu.y = h - MENU_Y
@cursor.x = w - MENU_X - 12 @cursor.x = w - MENU_X - 12
@cursor.y = ((h - MENU_Y).to_f + (ENTRY_HEIGHT - @cursor.bitmap.height) / 2.0 + ENTRY_HEIGHT * @cursor_pos - 2) @cursor.y = ((h - MENU_Y).to_f + (ENTRY_HEIGHT - @cursor.bitmap.height) / 2.0 + ENTRY_HEIGHT * @cursor_pos - 3)
@sprite.x = w / 2 @sprite.x = w / 2
@sprite.y = h / 2 @sprite.y = h / 2
@ -198,7 +198,7 @@ class Scene_Title
# Handle cursor movement # Handle cursor movement
if !@window_settings_title.visible if !@window_settings_title.visible
@cursor.y = ((Graphics.height - MENU_Y).to_f + (ENTRY_HEIGHT - @cursor.bitmap.height) / 2.0 + ENTRY_HEIGHT * @cursor_pos - 2) * 0.65 + @cursor.y.to_f * 0.35 @cursor.y = ((Graphics.height - MENU_Y).to_f + (ENTRY_HEIGHT - @cursor.bitmap.height) / 2.0 + ENTRY_HEIGHT * @cursor_pos - 3) * 0.65 + @cursor.y.to_f * 0.35
update_cursor = false update_cursor = false
if Input.trigger?(Input::UP) if Input.trigger?(Input::UP)
if @cursor_pos > 0 if @cursor_pos > 0

View File

@ -203,7 +203,7 @@ class Spriteset_Map
else else
if @panorama_name == "dark_water" if @panorama_name == "dark_water"
@panorama.shader = Shader::Water @panorama.shader = Shader::Water
@panorama.color.set(0, 0, 127, 0) @panorama.color.set(0, 0, 255, 0)
@panorama.tone.set(0, 0, 255, 63) @panorama.tone.set(0, 0, 255, 63)
@panorama.blend_type = 1 @panorama.blend_type = 1
elsif @panorama_name == "green_water" elsif @panorama_name == "green_water"

View File

@ -78,7 +78,7 @@ class Window_Settings
@content.add_parameter(screen_title, BoolParameter.new(@content, screen_index, parameter_index, @content.add_parameter(screen_title, BoolParameter.new(@content, screen_index, parameter_index,
parameter_info[:name], parameter_info[:parameter], parameter_info[:default])) parameter_info[:name], parameter_info[:parameter], parameter_info[:default]))
when :switch when :switch
@content.add_parameter(screen_title, BoolParameter.new(@content, screen_index, parameter_index, @content.add_parameter(screen_title, SwitchPatameter.new(@content, screen_index, parameter_index,
parameter_info[:name], parameter_info[:parameter], parameter_info[:default], parameter_info[:switch], parameter_info[:invert])) parameter_info[:name], parameter_info[:parameter], parameter_info[:default], parameter_info[:switch], parameter_info[:invert]))
when :int when :int
@content.add_parameter(screen_title, IntParameter.new(@content, screen_index, parameter_index, @content.add_parameter(screen_title, IntParameter.new(@content, screen_index, parameter_index,
@ -91,7 +91,7 @@ class Window_Settings
parameter_info[:name], parameter_info[:parameter], parameter_info[:default], parameter_info[:step], parameter_info[:min], parameter_info[:max])) parameter_info[:name], parameter_info[:parameter], parameter_info[:default], parameter_info[:step], parameter_info[:min], parameter_info[:max]))
when :enum when :enum
@content.add_parameter(screen_title, EnumParameter.new(@content, screen_index, parameter_index, @content.add_parameter(screen_title, EnumParameter.new(@content, screen_index, parameter_index,
parameter_info[:name], parameter_info[:parameter], 0, parameter_info[:values])) parameter_info[:name], parameter_info[:parameter], parameter_info[:default], parameter_info[:values]))
when :sep when :sep
@content.add_parameter(screen_title, Separator.new(@content, screen_index, parameter_index, @content.add_parameter(screen_title, Separator.new(@content, screen_index, parameter_index,
parameter_info[:name])) parameter_info[:name]))

View File

@ -301,6 +301,8 @@ void DynamicLightShader::setWallMapResolution(int x, int y){
} }
void DynamicLightShader::setCameraPosition(int x, int y){ void DynamicLightShader::setCameraPosition(int x, int y){
cameraPositionCache.x = x;
cameraPositionCache.y = y;
gl.Uniform2f(u_cameraPosition, x, y); gl.Uniform2f(u_cameraPosition, x, y);
} }
@ -310,21 +312,31 @@ void DynamicLightShader::setTileMapOffset(int x, int y){
void DynamicLightShader::setLightSources(std::vector<LightSource> sources){ void DynamicLightShader::setLightSources(std::vector<LightSource> sources){
int count = 0; int count = 0;
for(int i = 0; i < sources.size(); i++) { int screenWidth = shState->graphics().width();
int screenHeight = shState->graphics().height();
for(int i = 0; i < sources.size(); ++i) {
if (count < 64) { if (count < 64) {
if (!sources[i].hasEffect()) LightSource source = sources[i];
if (!source.hasEffect())
continue; continue;
if (source.x * 32 < cameraPositionCache.x - source.radius * 32
|| source.y * 32 < cameraPositionCache.y - source.radius * 32
|| source.x * 32 > cameraPositionCache.x + source.radius * 32 + screenWidth
|| source.y * 32 > cameraPositionCache.y + source.radius * 32 + screenHeight
) continue;
gl.Uniform4f(u_lightSources + count, gl.Uniform4f(u_lightSources + count,
sources[i].x, source.x,
sources[i].y, source.y,
sources[i].power, source.power,
sources[i].radius source.radius
); );
gl.Uniform4f(u_lightSourcesColors + count, gl.Uniform4f(u_lightSourcesColors + count,
sources[i].color.red / 255.0, source.color.red / 255.0,
sources[i].color.green / 255.0, source.color.green / 255.0,
sources[i].color.blue / 255.0, source.color.blue / 255.0,
sources[i].color.alpha / 255.0 source.color.alpha / 255.0
); );
count++; count++;
} }

View File

@ -117,6 +117,7 @@ public:
private: private:
GLint u_wallMapTexture, u_wallMapResolution, u_cameraPosition, u_tileMapOffset, u_lightSources, u_lightSourcesCount, u_lightSourcesColors, u_ambientLight; GLint u_wallMapTexture, u_wallMapResolution, u_cameraPosition, u_tileMapOffset, u_lightSources, u_lightSourcesCount, u_lightSourcesColors, u_ambientLight;
Vec2i cameraPositionCache;
}; };
class SimpleColorShader : public ShaderBase{ class SimpleColorShader : public ShaderBase{