mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Demo tweaks
This commit is contained in:
parent
c37867b8ef
commit
77ba08415b
10 changed files with 39 additions and 18 deletions
|
|
@ -5,6 +5,7 @@ module Item
|
||||||
[32, 36] => 33, # button + magnets => magnetized button
|
[32, 36] => 33, # button + magnets => magnetized button
|
||||||
[37, 38] => 32, # tin + scissors => button
|
[37, 38] => 32, # tin + scissors => button
|
||||||
[36, 37] => 100, # tin + magnets => can't combine
|
[36, 37] => 100, # tin + magnets => can't combine
|
||||||
|
[41, 43] => 42, # clippers + oil => oiled clippers
|
||||||
}
|
}
|
||||||
|
|
||||||
def self.combine(item_a, item_b)
|
def self.combine(item_a, item_b)
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ class Game_Map
|
||||||
attr_accessor :clamped_x # panorama is horizontally clamped?
|
attr_accessor :clamped_x # panorama is horizontally clamped?
|
||||||
attr_accessor :clamped_y # panorama is vertically clamped?
|
attr_accessor :clamped_y # panorama is vertically clamped?
|
||||||
attr_accessor :wrapping # map is wrapping?
|
attr_accessor :wrapping # map is wrapping?
|
||||||
|
attr_accessor :pan_offset_y # offset of y-coord of panorama
|
||||||
attr_accessor :ambient # ambient light
|
attr_accessor :ambient # ambient light
|
||||||
attr_reader :passages # passage table
|
attr_reader :passages # passage table
|
||||||
attr_reader :priorities # prioroty table
|
attr_reader :priorities # prioroty table
|
||||||
|
|
@ -139,6 +140,7 @@ class Game_Map
|
||||||
end
|
end
|
||||||
# Unwrap map
|
# Unwrap map
|
||||||
@wrapping = false
|
@wrapping = false
|
||||||
|
@pan_offset_y = 0
|
||||||
# Full bright ambient light
|
# Full bright ambient light
|
||||||
@ambient = Tone.new(0, 0, 0, 0)
|
@ambient = Tone.new(0, 0, 0, 0)
|
||||||
|
|
||||||
|
|
@ -306,11 +308,11 @@ class Game_Map
|
||||||
end
|
end
|
||||||
# Loop searches in order from top of layer
|
# Loop searches in order from top of layer
|
||||||
blank = 0
|
blank = 0
|
||||||
for i in [2, 1, 0]
|
[2, 1, 0].each do |i|
|
||||||
# Get tile ID
|
# Get tile ID
|
||||||
tile_id = data[x, y, i]
|
tile_id = data[x, y, i]
|
||||||
# Tile ID acquistion failure
|
# Tile ID acquistion failure
|
||||||
return false if tile_id == nil
|
next if tile_id == nil
|
||||||
|
|
||||||
# Only handle blank if all three layers are blank
|
# Only handle blank if all three layers are blank
|
||||||
if tile_id < 48 && i > 0
|
if tile_id < 48 && i > 0
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class Game_System
|
||||||
def bgm_play(bgm)
|
def bgm_play(bgm)
|
||||||
@playing_bgm = bgm
|
@playing_bgm = bgm
|
||||||
if bgm != nil and bgm.name != ""
|
if bgm != nil and bgm.name != ""
|
||||||
Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
|
Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume * 0.8, bgm.pitch)
|
||||||
else
|
else
|
||||||
Audio.bgm_stop
|
Audio.bgm_stop
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,9 @@ class Scene_Map
|
||||||
# Set debug calling flag
|
# Set debug calling flag
|
||||||
$game_temp.debug_calling = true
|
$game_temp.debug_calling = true
|
||||||
end
|
end
|
||||||
|
if $GDC && Input.press?(Input::F8)
|
||||||
|
$game_temp.to_title = true
|
||||||
|
end
|
||||||
# If player is not moving
|
# If player is not moving
|
||||||
unless $game_player.moving?
|
unless $game_player.moving?
|
||||||
# Run calling of each screen
|
# Run calling of each screen
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ class Scene_Title
|
||||||
# Make title graphic
|
# Make title graphic
|
||||||
@sprite = Sprite.new
|
@sprite = Sprite.new
|
||||||
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
||||||
|
@sprite.zoom_x = 2.0
|
||||||
|
@sprite.zoom_y = 2.0
|
||||||
# Create/render menu options
|
# Create/render menu options
|
||||||
@menu = Sprite.new
|
@menu = Sprite.new
|
||||||
@menu.z += 1
|
@menu.z += 1
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,10 @@ def wrap_map
|
||||||
$game_map.wrapping = true
|
$game_map.wrapping = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def pan_offset_y(val)
|
||||||
|
$game_map.pan_offset_y = val
|
||||||
|
end
|
||||||
|
|
||||||
# Map specific settings
|
# Map specific settings
|
||||||
def green_ambient
|
def green_ambient
|
||||||
ambient -50, -50, -50
|
ambient -50, -50, -50
|
||||||
|
|
@ -171,3 +175,9 @@ end
|
||||||
def quit
|
def quit
|
||||||
$scene = nil
|
$scene = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def activate_balcony?(ypos)
|
||||||
|
$game_player.y == ypos &&
|
||||||
|
$game_player.direction == 8 &&
|
||||||
|
Input.trigger?(Input::ACTION)
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ class Spriteset_Map
|
||||||
y = ($game_player.real_y.to_f / (($game_map.height - 1) * 128)) * (@panorama.bitmap.height - 480)
|
y = ($game_player.real_y.to_f / (($game_map.height - 1) * 128)) * (@panorama.bitmap.height - 480)
|
||||||
@panorama.oy = y < 0.0 ? 0.0 : y
|
@panorama.oy = y < 0.0 ? 0.0 : y
|
||||||
else
|
else
|
||||||
@panorama.oy = $game_map.display_y / 8
|
@panorama.oy = $game_map.pan_offset_y + $game_map.display_y / 8
|
||||||
end
|
end
|
||||||
# Update fog plane
|
# Update fog plane
|
||||||
@fog.zoom_x = $game_map.fog_zoom / 100.0
|
@fog.zoom_x = $game_map.fog_zoom / 100.0
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,12 @@ class Window_Item < Window_Selectable
|
||||||
# If item count is not 0, make a bit map and draw all items
|
# If item count is not 0, make a bit map and draw all items
|
||||||
@item_max = @data.size
|
@item_max = @data.size
|
||||||
if @item_max > 0
|
if @item_max > 0
|
||||||
self.index = 0 if self.index == -1
|
|
||||||
self.contents = Bitmap.new(width - 32, row_max * 32)
|
self.contents = Bitmap.new(width - 32, row_max * 32)
|
||||||
for i in 0...@item_max
|
for i in 0...@item_max
|
||||||
draw_item(i)
|
draw_item(i)
|
||||||
end
|
end
|
||||||
|
self.index = 0 if self.index == -1
|
||||||
|
self.index = @item_max - 1 if self.index >= @item_max
|
||||||
else
|
else
|
||||||
self.index = -1
|
self.index = -1
|
||||||
end
|
end
|
||||||
|
|
@ -129,7 +130,7 @@ class Window_Item < Window_Selectable
|
||||||
end
|
end
|
||||||
|
|
||||||
# Don't do anything if not active
|
# Don't do anything if not active
|
||||||
if !self.active
|
if !self.active || $game_system.map_interpreter.running?
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ class Window_MainMenu < Window_Selectable
|
||||||
# Update
|
# Update
|
||||||
def update
|
def update
|
||||||
super
|
super
|
||||||
|
|
||||||
# Handle fade-in effect
|
# Handle fade-in effect
|
||||||
if @fade_in
|
if @fade_in
|
||||||
if Input.trigger?(Input::ITEMS)
|
if Input.trigger?(Input::ITEMS)
|
||||||
|
|
@ -98,7 +99,7 @@ class Window_MainMenu < Window_Selectable
|
||||||
end
|
end
|
||||||
|
|
||||||
# Don't do anything if not active
|
# Don't do anything if not active
|
||||||
if !self.active
|
if !self.active || $game_system.map_interpreter.running?
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -108,17 +109,18 @@ class Window_MainMenu < Window_Selectable
|
||||||
self.opacity = 127
|
self.opacity = 127
|
||||||
case @index
|
case @index
|
||||||
when 0
|
when 0
|
||||||
if Input.trigger?(Input::ACTION)
|
if $game_fasttravel.enabled?
|
||||||
if $game_fasttravel.enabled?
|
$game_system.se_play($data_system.decision_se)
|
||||||
$game_system.se_play($data_system.decision_se)
|
$game_temp.travel_menu_calling = true
|
||||||
$game_temp.travel_menu_calling = true
|
@fade_out = true
|
||||||
@fade_out = true
|
else
|
||||||
else
|
$game_system.se_play($data_system.buzzer_se)
|
||||||
$game_system.se_play($data_system.buzzer_se)
|
$game_temp.message_ed_text = tr("You cannot fast travel right now.")
|
||||||
$game_temp.message_ed_text = tr("You cannot fast travel right now.")
|
$game_temp.message_proc = Proc.new { self.active = true; self.opacity = 255 }
|
||||||
$game_temp.message_proc = Proc.new { self.active = true; self.opacity = 255 }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
when 1
|
||||||
|
$game_temp.common_event_id = 15
|
||||||
|
@fade_out = true
|
||||||
else
|
else
|
||||||
$game_system.se_play($data_system.buzzer_se)
|
$game_system.se_play($data_system.buzzer_se)
|
||||||
self.active = true
|
self.active = true
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ class Window_Message < Window_Selectable
|
||||||
self.pause = true
|
self.pause = true
|
||||||
|
|
||||||
# Advance/Close message
|
# Advance/Close message
|
||||||
if Input.trigger?(Input::ACTION)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL)
|
||||||
terminate_message
|
terminate_message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue