Demo tweaks

This commit is contained in:
Mathew Velasquez 2016-03-08 16:05:06 -05:00
parent c37867b8ef
commit 77ba08415b
10 changed files with 39 additions and 18 deletions

View file

@ -5,6 +5,7 @@ module Item
[32, 36] => 33, # button + magnets => magnetized button
[37, 38] => 32, # tin + scissors => button
[36, 37] => 100, # tin + magnets => can't combine
[41, 43] => 42, # clippers + oil => oiled clippers
}
def self.combine(item_a, item_b)

View file

@ -31,6 +31,7 @@ class Game_Map
attr_accessor :clamped_x # panorama is horizontally clamped?
attr_accessor :clamped_y # panorama is vertically clamped?
attr_accessor :wrapping # map is wrapping?
attr_accessor :pan_offset_y # offset of y-coord of panorama
attr_accessor :ambient # ambient light
attr_reader :passages # passage table
attr_reader :priorities # prioroty table
@ -139,6 +140,7 @@ class Game_Map
end
# Unwrap map
@wrapping = false
@pan_offset_y = 0
# Full bright ambient light
@ambient = Tone.new(0, 0, 0, 0)
@ -306,11 +308,11 @@ class Game_Map
end
# Loop searches in order from top of layer
blank = 0
for i in [2, 1, 0]
[2, 1, 0].each do |i|
# Get tile ID
tile_id = data[x, y, i]
# Tile ID acquistion failure
return false if tile_id == nil
next if tile_id == nil
# Only handle blank if all three layers are blank
if tile_id < 48 && i > 0

View file

@ -44,7 +44,7 @@ class Game_System
def bgm_play(bgm)
@playing_bgm = bgm
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
Audio.bgm_stop
end

View file

@ -193,6 +193,9 @@ class Scene_Map
# Set debug calling flag
$game_temp.debug_calling = true
end
if $GDC && Input.press?(Input::F8)
$game_temp.to_title = true
end
# If player is not moving
unless $game_player.moving?
# Run calling of each screen

View file

@ -40,6 +40,8 @@ class Scene_Title
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
@sprite.zoom_x = 2.0
@sprite.zoom_y = 2.0
# Create/render menu options
@menu = Sprite.new
@menu.z += 1

View file

@ -111,6 +111,10 @@ def wrap_map
$game_map.wrapping = true
end
def pan_offset_y(val)
$game_map.pan_offset_y = val
end
# Map specific settings
def green_ambient
ambient -50, -50, -50
@ -171,3 +175,9 @@ end
def quit
$scene = nil
end
def activate_balcony?(ypos)
$game_player.y == ypos &&
$game_player.direction == 8 &&
Input.trigger?(Input::ACTION)
end

View file

@ -205,7 +205,7 @@ class Spriteset_Map
y = ($game_player.real_y.to_f / (($game_map.height - 1) * 128)) * (@panorama.bitmap.height - 480)
@panorama.oy = y < 0.0 ? 0.0 : y
else
@panorama.oy = $game_map.display_y / 8
@panorama.oy = $game_map.pan_offset_y + $game_map.display_y / 8
end
# Update fog plane
@fog.zoom_x = $game_map.fog_zoom / 100.0

View file

@ -49,11 +49,12 @@ class Window_Item < Window_Selectable
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.index = 0 if self.index == -1
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
self.index = 0 if self.index == -1
self.index = @item_max - 1 if self.index >= @item_max
else
self.index = -1
end
@ -129,7 +130,7 @@ class Window_Item < Window_Selectable
end
# Don't do anything if not active
if !self.active
if !self.active || $game_system.map_interpreter.running?
return
end

View file

@ -70,6 +70,7 @@ class Window_MainMenu < Window_Selectable
# Update
def update
super
# Handle fade-in effect
if @fade_in
if Input.trigger?(Input::ITEMS)
@ -98,7 +99,7 @@ class Window_MainMenu < Window_Selectable
end
# Don't do anything if not active
if !self.active
if !self.active || $game_system.map_interpreter.running?
return
end
@ -108,17 +109,18 @@ class Window_MainMenu < Window_Selectable
self.opacity = 127
case @index
when 0
if Input.trigger?(Input::ACTION)
if $game_fasttravel.enabled?
$game_system.se_play($data_system.decision_se)
$game_temp.travel_menu_calling = true
@fade_out = true
else
$game_system.se_play($data_system.buzzer_se)
$game_temp.message_ed_text = tr("You cannot fast travel right now.")
$game_temp.message_proc = Proc.new { self.active = true; self.opacity = 255 }
end
if $game_fasttravel.enabled?
$game_system.se_play($data_system.decision_se)
$game_temp.travel_menu_calling = true
@fade_out = true
else
$game_system.se_play($data_system.buzzer_se)
$game_temp.message_ed_text = tr("You cannot fast travel right now.")
$game_temp.message_proc = Proc.new { self.active = true; self.opacity = 255 }
end
when 1
$game_temp.common_event_id = 15
@fade_out = true
else
$game_system.se_play($data_system.buzzer_se)
self.active = true

View file

@ -365,7 +365,7 @@ class Window_Message < Window_Selectable
self.pause = true
# Advance/Close message
if Input.trigger?(Input::ACTION)
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL)
terminate_message
end
end