1 Commits

Author SHA1 Message Date
dependabot[bot]
4c3c549f27 Bump nokogiri from 1.14.0.rc1 to 1.14.3
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.14.0.rc1 to 1.14.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.14.0.rc1...v1.14.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-20 21:15:06 +00:00
7 changed files with 96 additions and 68 deletions

View File

@@ -1,9 +1,11 @@
GIT GIT
remote: https://github.com/cyberarm/cyberarm_engine remote: https://github.com/cyberarm/cyberarm_engine
revision: 9694cc2270198005bc2388fc6dacddfbb9629f60 revision: 72037efc735089cf1ff4b56ec57eb793699b27c6
specs: specs:
cyberarm_engine (0.24.4) cyberarm_engine (0.23.0)
excon (~> 0.88)
gosu (~> 1.1) gosu (~> 1.1)
gosu_more_drawables (~> 0.3)
GIT GIT
remote: https://github.com/gosu/releasy.git remote: https://github.com/gosu/releasy.git
@@ -18,20 +20,21 @@ GIT
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
concurrent-ruby (1.2.3) concurrent-ruby (1.2.2)
cri (2.1.0) cri (2.1.0)
excon (0.110.0) excon (0.99.0)
gosu (1.4.6) gosu (1.4.5)
i18n (1.14.4) gosu_more_drawables (0.3.1)
i18n (1.12.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
mini_portile2 (2.8.5) mini_portile2 (2.8.1)
nokogiri (1.16.3) nokogiri (1.14.3)
mini_portile2 (~> 2.8.2) mini_portile2 (~> 2.8.0)
racc (~> 1.4) racc (~> 1.4)
ocra (1.3.11) ocra (1.3.11)
opengl-bindings (1.6.14) opengl-bindings (1.6.13)
racc (1.7.3) racc (1.6.2)
rake (13.2.1) rake (13.0.6)
rubyzip (2.3.2) rubyzip (2.3.2)
PLATFORMS PLATFORMS

View File

@@ -21,6 +21,31 @@ class IMICFPS
Gosu.draw_rect(2, 2, width - 4, (@text.height + 4) - 4, Gosu::Color.rgba(100, 100, 100, 100)) Gosu.draw_rect(2, 2, width - 4, (@text.height + 4) - 4, Gosu::Color.rgba(100, 100, 100, 100))
@text.draw @text.draw
sample_points = 256
frame_stats = CyberarmEngine::Stats.frames.select(&:complete?)
return if frame_stats.empty?
right_origin = CyberarmEngine::Vector.new(10, 128)
nodes = Array.new(sample_points) { [] }
slice = 0
frame_stats.each_slice((CyberarmEngine::Stats.max_frame_history / sample_points.to_f).ceil) do |bucket|
bucket.each do |frame|
nodes[slice] << frame.frame_timing.duration
end
slice += 1
end
points = []
nodes.each_with_index do |cluster, i|
break if cluster.empty?
points << CyberarmEngine::Vector.new(right_origin.x + 1 * i, right_origin.y - cluster.max)
end
Gosu.draw_path(points, Gosu::Color::WHITE, Float::INFINITY) if points.size > 1
end end
def update def update

View File

@@ -23,10 +23,10 @@ class IMICFPS
@camera = PerspectiveCamera.new(aspect_ratio: window.aspect_ratio, position: Vector.new(0, 1.5, 5), orientation: Vector.forward) @camera = PerspectiveCamera.new(aspect_ratio: window.aspect_ratio, position: Vector.new(0, 1.5, 5), orientation: Vector.forward)
@camera_controller = CameraController.new(camera: @camera, entity: nil, mode: :fpv) @camera_controller = CameraController.new(camera: @camera, entity: nil, mode: :fpv)
banner @manifest.name, text_size: 50, text_border: true, text_border_color: Gosu::Color::BLACK label @manifest.name, text_size: 50, text_border: true, text_border_color: Gosu::Color::BLACK
tagline @manifest.model, text_border: true, text_border_color: Gosu::Color::BLACK label @manifest.model, text_border: true, text_border_color: Gosu::Color::BLACK
@camera_position = tagline "", text_border: true, text_border_color: Gosu::Color::BLACK @camera_position = label "", text_border: true, text_border_color: Gosu::Color::BLACK
@camera_orientation = tagline "", text_border: true, text_border_color: Gosu::Color::BLACK @camera_orientation = label "", text_border: true, text_border_color: Gosu::Color::BLACK
button "Back" do button "Back" do
pop_state pop_state

View File

@@ -32,7 +32,7 @@ class IMICFPS
button "New Map", width: 0.64 button "New Map", width: 0.64
end end
banner "Edit Map", width: 1.0, text_align: :center, text_size: 50 label "Edit Map", width: 1.0, text_align: :center, text_size: 50
flow(width: 1.0, height: 1.0) do flow(width: 1.0, height: 1.0) do
@maps.each do |map| @maps.each do |map|
button map.metadata.name do button map.metadata.name do

View File

@@ -25,30 +25,30 @@ class IMICFPS
image "#{GAME_ROOT_PATH}/static/logo.png", width: 64 image "#{GAME_ROOT_PATH}/static/logo.png", width: 64
stack do stack do
tagline "[Clan TAG] Username", text_size: 36 label "[Clan TAG] Username", text_size: 36
tagline "\"Title Badge Thingy\"" label "\"Title Badge Thingy\""
end end
end end
flow(margin_top: 4, width: 1.0) do flow(margin_top: 4) do
stack do stack do
tagline "Kiil/Death Ratio" label "Kiil/Death Ratio"
tagline "Kills" label "Kills"
tagline "Deaths" label "Deaths"
tagline "Assists" label "Assists"
tagline "Buildings Destroyed" label "Buildings Destroyed"
tagline "Vehicles Destroyed" label "Vehicles Destroyed"
tagline "Repair Points" label "Repair Points"
end end
stack margin_left: 16 do stack margin_left: 16 do
tagline "0.75" label "0.75"
tagline "21" label "21"
tagline "28" label "28"
tagline "14" label "14"
tagline "111" label "111"
tagline "41" label "41"
tagline "4,451" label "4,451"
end end
end end
end end

View File

@@ -55,29 +55,29 @@ class IMICFPS
background i.even? ? 0x55000000 : 0x55ff5500 background i.even? ? 0x55000000 : 0x55ff5500
flow width: 0.1 do flow width: 0.1 do
tagline game[:game_type], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT label game[:game_type], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
end end
flow width: 0.3 do flow width: 0.3 do
tagline game[:host], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT label game[:host], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
end end
flow width: 0.3 do flow width: 0.3 do
tagline game[:map], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT label game[:map], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
end end
flow width: 0.1 do flow width: 0.1 do
tagline game[:players], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT label game[:players], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
end end
flow width: 0.1 do flow width: 0.1 do
tagline game[:ping], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT label game[:ping], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
end end
flow width: 0.1 do flow width: 0.1 do
tagline game[:source], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT label game[:source], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
end end
end end
end end
end end
flow width: 1.0, height: 0.25 do flow width: 1.0, height: 0.25 do
tagline "Name" label "Name"
name = edit_line "", margin_right: 20 name = edit_line "", margin_right: 20
button "Join", width: 0.25 do button "Join", width: 0.25 do
pp name.value pp name.value

View File

@@ -93,16 +93,16 @@ class IMICFPS
end end
def page_display def page_display
banner "Display", text_size: 50 label "Display", text_size: 50
stack(width: 1.0, height: 128) do stack(width: 1.0, height: 128) do
flow(width: 1.0) do flow(width: 1.0) do
tagline "Width", width: 96 label "Width", width: 96
edit_line window.width.to_s, fill: true edit_line window.width.to_s, fill: true
end end
flow(width: 1.0) do flow(width: 1.0) do
tagline "Height", width: 96 label "Height", width: 96
edit_line window.height.to_s, fill: true edit_line window.height.to_s, fill: true
end end
end end
@@ -111,36 +111,36 @@ class IMICFPS
stack(width: 1.0, height: 128, margin_top: 20) do stack(width: 1.0, height: 128, margin_top: 20) do
flow(width: 1.0, fill: true) do flow(width: 1.0, fill: true) do
tagline "Gamma Correction", width: 256 label "Gamma Correction", width: 256
@display_gamma_correction = slider range: 0.0..1.0, value: 0.5, fill: true @display_gamma_correction = slider range: 0.0..1.0, value: 0.5, fill: true
@display_gamma_correction.subscribe(:changed) do |_sender, value| @display_gamma_correction.subscribe(:changed) do |_sender, value|
@display_gamma_correction_label.value = value.round(1).to_s @display_gamma_correction_label.value = value.round(1).to_s
end end
@display_gamma_correction_label = tagline "0.0" @display_gamma_correction_label = label "0.0"
end end
flow(width: 1.0, fill: true) do flow(width: 1.0, fill: true) do
tagline "Brightness", width: 256 label "Brightness", width: 256
@display_brightness = slider range: 0.0..1.0, value: 0.5, fill: true @display_brightness = slider range: 0.0..1.0, value: 0.5, fill: true
@display_brightness.subscribe(:changed) do |_sender, value| @display_brightness.subscribe(:changed) do |_sender, value|
@display_brightness_label.value = value.round(1).to_s @display_brightness_label.value = value.round(1).to_s
end end
@display_brightness_label = tagline "0.0" @display_brightness_label = label "0.0"
end end
flow(width: 1.0, fill: true) do flow(width: 1.0, fill: true) do
tagline "Contrast", width: 256 label "Contrast", width: 256
@display_contrast = slider range: 0.0..1.0, value: 0.5, fill: true @display_contrast = slider range: 0.0..1.0, value: 0.5, fill: true
@display_contrast.subscribe(:changed) do |_sender, value| @display_contrast.subscribe(:changed) do |_sender, value|
@display_contrast_label.value = value.round(1).to_s @display_contrast_label.value = value.round(1).to_s
end end
@display_contrast_label = tagline "0.0" @display_contrast_label = label "0.0"
end end
end end
end end
def page_audio def page_audio
tagline "Audio", text_size: 50 label "Audio", text_size: 50
volumes = %i[master sound_effects music dialogue] volumes = %i[master sound_effects music dialogue]
stack(width: 1.0, height: 48 * volumes.count) do stack(width: 1.0, height: 48 * volumes.count) do
@@ -148,7 +148,7 @@ class IMICFPS
config_value = window.config.get(:options, :audio, :"volume_#{volume}") config_value = window.config.get(:options, :audio, :"volume_#{volume}")
flow(width: 1.0, fill: true, margin_bottom: 10) do flow(width: 1.0, fill: true, margin_bottom: 10) do
tagline volume.to_s.split("_").map(&:capitalize).join(" "), width: 172 label volume.to_s.split("_").map(&:capitalize).join(" "), width: 172
instance_variable_set(:"@volume_#{volume}", slider(range: 0.0..1.0, value: config_value, fill: true)) instance_variable_set(:"@volume_#{volume}", slider(range: 0.0..1.0, value: config_value, fill: true))
instance_variable_get(:"@volume_#{volume}").subscribe(:changed) do |_sender, value| instance_variable_get(:"@volume_#{volume}").subscribe(:changed) do |_sender, value|
@@ -156,18 +156,18 @@ class IMICFPS
window.config[:options, :audio, :"volume_#{volume}"] = value window.config[:options, :audio, :"volume_#{volume}"] = value
end end
instance_variable_set(:"@volume_#{volume}_label", tagline(format("%03.2f%%", config_value * 100.0), width: 96, text_align: :right)) instance_variable_set(:"@volume_#{volume}_label", label(format("%03.2f%%", config_value * 100.0), width: 96, text_align: :right))
end end
end end
end end
end end
def page_controls def page_controls
tagline "Controls", text_size: 50 label "Controls", text_size: 50
InputMapper.keymap.each do |key, values| InputMapper.keymap.each do |key, values|
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline key.to_s, width: 0.5, max_width: 312 label key.to_s, width: 0.5, max_width: 312
[values].flatten.each do |value| [values].flatten.each do |value|
unless (name = Gosu.button_name(value)) unless (name = Gosu.button_name(value))
@@ -182,21 +182,21 @@ class IMICFPS
end end
def page_graphics def page_graphics
tagline "Graphics", text_size: 50 label "Graphics", text_size: 50
check_box "V-Sync (Not Disableable, Yet.)", checked: true, enabled: false, width: 1.0 check_box "V-Sync (Not Disableable, Yet.)", checked: true, enabled: false, width: 1.0
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Field of View", width: 128 label "Field of View", width: 128
@fov = slider range: 70.0..110.0, fill: true @fov = slider range: 70.0..110.0, fill: true
@fov.subscribe(:changed) do |_sender, value| @fov.subscribe(:changed) do |_sender, value|
@fov_label.value = value.round.to_s @fov_label.value = value.round.to_s
end end
@fov_label = tagline "90.0" @fov_label = label "90.0"
end end
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Detail", width: 128 label "Detail", width: 128
list_box items: %i[high medium low], fill: true list_box items: %i[high medium low], fill: true
end end
@@ -207,31 +207,31 @@ class IMICFPS
stack(width: 1.0, height: 64 * 7) do stack(width: 1.0, height: 64 * 7) do
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Geometry Detail", width: 312 label "Geometry Detail", width: 312
list_box items: %i[high medium low], fill: true list_box items: %i[high medium low], fill: true
end end
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Shadow Detail", width: 312 label "Shadow Detail", width: 312
list_box items: %i[high medium low off], fill: true list_box items: %i[high medium low off], fill: true
end end
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Texture Detail", width: 312 label "Texture Detail", width: 312
list_box items: %i[high medium low], fill: true list_box items: %i[high medium low], fill: true
end end
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Particle Detail", width: 312 label "Particle Detail", width: 312
list_box items: %i[high medium low off], fill: true list_box items: %i[high medium low off], fill: true
end end
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Surface Effect Detail", width: 312 label "Surface Effect Detail", width: 312
list_box items: %i[high medium low], fill: true list_box items: %i[high medium low], fill: true
end end
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Lighting Mode", width: 312 label "Lighting Mode", width: 312
list_box items: %i[per_pixel per_vertex], fill: true list_box items: %i[per_pixel per_vertex], fill: true
end end
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Texture Filtering", width: 312 label "Texture Filtering", width: 312
list_box items: [:none], fill: true list_box items: [:none], fill: true
end end
end end
@@ -244,10 +244,10 @@ class IMICFPS
end end
def page_multiplayer def page_multiplayer
tagline "Multiplayer", text_size: 50 label "Multiplayer", text_size: 50
flow(width: 1.0, height: 64) do flow(width: 1.0, height: 64) do
tagline "Player Name", width: 172 label "Player Name", width: 172
edit_line "player-#{SecureRandom.hex(2)}", fill: true edit_line "player-#{SecureRandom.hex(2)}", fill: true
end end