Cerca nel Forum
Showing results for tags 'Screen tint'.
Trovato 1 risultato
-
Nome script: Screen tint[/color] Versione: Rgss[/color] Autore: Leon_Westbrooke[/color] Informazioni: Questo script permette tramite gioco di cambiare i settaggi di colorazione dello screen. Screenshoots: Istruzioni: Premete F8 per lanciare le opzioni di settaggio. Script: #------------------------------------------------------------------------------- # Screen Tint Debug Menu by Leon_Westbrooke #------------------------------------------------------------------------------- # Questo script permette di, in Debug mode, modificare la tinta dello schermo # fino a trovare una colorazione adatta. # NON imposterà automaticamente la tinta. Invece, bisognerà ricordare i numeri # ed usarli in un evento Cambia Screen Tone. Questo dovrebbe evitare # innumerevoli test per la colorazione adatta. # # Come usare: # Inserire lo script sopra Main e sotto gli altri script. # Per accedervi, andare in debug mode (F12) e premere F8. Apparirà la window di modifica. # Utilizzare le frecce direzionali per modificare le tinte. #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Game_Temp #------------------------------------------------------------------------------- class Game_Temp alias leon_stdm_gametemp_init initialize attr_accessor :tinttest_red attr_accessor :tinttest_green attr_accessor :tinttest_blue attr_accessor :tinttest_gray def initialize leon_stdm_gametemp_init @tinttest_red = 0 @tinttest_green = 0 @tinttest_blue = 0 @tinttest_gray = 0 end end #------------------------------------------------------------------------------- # END Game_Temp #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Spriteset_Map #------------------------------------------------------------------------------- class Spriteset_Map attr_accessor :viewport1 end class Game_Screen attr_accessor :tone end #------------------------------------------------------------------------------- # END Spriteset_Map #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Scene_Map #------------------------------------------------------------------------------- class Scene_Map alias leon_svcl_scenemap_update update def update leon_svcl_scenemap_update if $DEBUG and Input.press?(Input::F8) $scene = Scene_TintDebug.new end end end #------------------------------------------------------------------------------- # END Scene_Map #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Window_TintTest #------------------------------------------------------------------------------- class Window_TintTest < Window_Selectable def initialize super(0, 0, 192, 192) self.contents = Bitmap.new(width - 32, height - 32) @item_max = 5 self.index = 0 self.active = true refresh end def refresh self.contents.clear self.contents.draw_text(4, 0, 160, 32, "Rosso") self.contents.draw_text(4, 32, 160, 32, "Verde") self.contents.draw_text(4, 64, 160, 32, "Blu") self.contents.draw_text(4, 96, 160, 32, "Grigio") self.contents.draw_text(4, 128, 160, 32, "Esci") self.contents.draw_text(-4, 0, 160, 32, $game_temp.tinttest_red.to_s, 2) self.contents.draw_text(-4, 32, 160, 32, $game_temp.tinttest_green.to_s, 2) self.contents.draw_text(-4, 64, 160, 32, $game_temp.tinttest_blue.to_s, 2) self.contents.draw_text(-4, 96, 160, 32, $game_temp.tinttest_gray.to_s, 2) end end #------------------------------------------------------------------------------- # END Window_TintTest #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Scene_TintDebug #------------------------------------------------------------------------------- class Scene_TintDebug def main @spriteset = Spriteset_Map.new $game_temp.tinttest_red = @spriteset.viewport1.tone.red.to_i $game_temp.tinttest_green = @spriteset.viewport1.tone.green.to_i $game_temp.tinttest_blue = @spriteset.viewport1.tone.blue.to_i $game_temp.tinttest_gray = @spriteset.viewport1.tone.gray.to_i @window_tint = Window_TintTest.new Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @window_tint.dispose @spriteset.dispose end def update if Input.trigger?(Input:: $scene = Scene_Map.new end if @window_tint.active update_windowtint return end end def update_windowtint @window_tint.update case @window_tint.index when 0 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_red += 1 if $game_temp.tinttest_red >= 255 $game_temp.tinttest_red = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_red -= 1 if $game_temp.tinttest_red <= -255 $game_temp.tinttest_red = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_red += 5 if $game_temp.tinttest_red >= 255 $game_temp.tinttest_red = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_red -= 5 if $game_temp.tinttest_red <= -255 $game_temp.tinttest_red = -255 end end when 1 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_green += 1 if $game_temp.tinttest_green >= 255 $game_temp.tinttest_green = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_green -= 1 if $game_temp.tinttest_green <= -255 $game_temp.tinttest_green = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_green += 5 if $game_temp.tinttest_green >= 255 $game_temp.tinttest_green = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_green -= 5 if $game_temp.tinttest_green <= -255 $game_temp.tinttest_green = -255 end end when 2 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_blue += 1 if $game_temp.tinttest_blue >= 255 $game_temp.tinttest_blue = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_blue -= 1 if $game_temp.tinttest_blue <= -255 $game_temp.tinttest_blue = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_blue += 5 if $game_temp.tinttest_blue >= 255 $game_temp.tinttest_blue = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_blue -= 5 if $game_temp.tinttest_blue <= -255 $game_temp.tinttest_blue = -255 end end when 3 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_gray += 1 if $game_temp.tinttest_gray >= 255 $game_temp.tinttest_gray = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_gray -= 1 if $game_temp.tinttest_gray <= -255 $game_temp.tinttest_gray = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_gray += 5 if $game_temp.tinttest_gray >= 255 $game_temp.tinttest_gray = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_gray -= 5 if $game_temp.tinttest_gray <= -255 $game_temp.tinttest_gray = -255 end end when 4 if Input.trigger?(Input:: $scene = Scene_Map.new end end red = $game_temp.tinttest_red green = $game_temp.tinttest_green blue = $game_temp.tinttest_blue gray = $game_temp.tinttest_gray @spriteset.viewport1.tone = Tone.new(red, green, blue, gray) $game_screen.tone = Tone.new(red, green, blue, gray) @window_tint.refresh @spriteset.update end end #------------------------------------------------------------------------------- # * Scene_TintDebug #-------------------------------------------------------------------------------