Advertisement
vindaca510

V's Awesome Options v1.4

Mar 26th, 2013
9,081
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 60.20 KB | None | 0 0
  1.  
  2. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  3. #                                                                              #
  4. #                             V's  Awesome Options                             #
  5. #                                  Version 1.4                                 #
  6. #                                                                              #
  7. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  8. #                                Written By:  V                                #
  9. #                         Last Edited:   April 5, 2013                         #
  10. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  11. #                                                                              #
  12. #                            And A Special Thanks to                           #
  13. #                           ~==~==~==~==~==~==~==~==~                          #
  14. #                              Diamondandplatinum3                             #
  15. #                                  ShinGamix                                   #
  16. #                                                                              #
  17. #                                                                              #
  18. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  19.  
  20.  
  21. #==============================================================================#
  22. #------------------------------------------------------------------------------#
  23. # ** Disclaimer                                                                #
  24. #------------------------------------------------------------------------------#
  25. #                                                                              #
  26. # I do not mind sharing credit for this script if alterations to the script    #
  27. # are made. I am not making this script for commercial uses. If anyone wants   #
  28. # to use this script in one there games just give credit to any and everyone   #
  29. # who took part in creating it.                                                #
  30. #                                                                              #
  31. #------------------------------------------------------------------------------#
  32. # ** Description                                                               #
  33. #------------------------------------------------------------------------------#
  34. #                                                                              #
  35. #  v0.1                                                                        #
  36. # ~=~=~=~                                                                      #
  37. # -This script is still in the working. For now, this script allows you to     #
  38. #  change the backgrounds of the all the menus, the zoom and x/y placement     #
  39. #  of the background and it's opacity. There is also an option to use and      #
  40. #  change BGM while in the menu screen. It also allows you to display the      #
  41. #  actors sprite instead of or on top of the actor faces.                      #
  42. #                                                                              #
  43. #  v0.2                                                                        #
  44. # ~=~=~=~                                                                      #
  45. # -This script is still in the working. In v0.2 new features have been added   #
  46. #  to the Title Page and the Game over Screen. The Title Page Now has an option#
  47. #  for a third layer. All the layers (Background, Mid-ground, and Foreground)  #
  48. #  have the same functionality as the menu backgrounds. There is also an option#
  49. #  to change the BGM, I added this because I believe you can raise the pitch   #
  50. #  levels higher with this script then you can with the regular game options.  #
  51. #  The Game over screen also has options for background and BGM.               #
  52. #                                                                              #
  53. #  v0.3                                                                        #
  54. # ~=~=~=~                                                                      #
  55. # -This script is still in the working. In v0.3 new features have been added   #
  56. #  for all the game windows opacity and border opacity and options to change   #
  57. #  default font settings. I have also fixed a bug with the draw title option   #
  58. #  and added a style, size and font setting for the draw title.                #
  59. #                                                                              #
  60. #  v0.4                                                                        #
  61. # ~=~=~=~                                                                      #
  62. # -This script is still in the working. In v0.4 I fixed a few more bugs with   #
  63. #  the title menu                                                              #
  64. #                                                                              #
  65. #  v1.0                                                                        #
  66. # ~=~=~=~                                                                      #
  67. # -This script is still in the working. In v1.0 I added an option for a        #
  68. #  a vertical and horizontal command window for the title screen and options   #
  69. #  to change the x and y positions of both. I've also added an option to       #
  70. #  change the actors x and y position inside of the actors face windows.       #
  71. #                                                                              #
  72. #  v1.1                                                                        #
  73. # ~=~=~=~                                                                      #
  74. # -This script is still in the working. In v1.1 I fixed a few bugs with        #
  75. #  the horizontal title menu.                                                  #
  76. #                                                                              #
  77. #  v1.2                                                                        #
  78. # ~=~=~=~                                                                      #
  79. # -This script is still in the working. In v1.2 I have added x and y position  #
  80. #  options for the End Game scene command window. I have also add a center     #
  81. #  command window text for the title and End Game Scene.                       #
  82. #                                                                              #
  83. #  v1.3                                                                        #
  84. # ~=~=~=~                                                                      #
  85. # -This script is still in the working. In v1.3 I have added an option to add  #
  86. #  Draw Game Over Text and change the x and y value of it. I have also added   #
  87. #  two additional layers to the Game Over Screen with the same funtions as the #
  88. #  Title backgrounds. I've also worked out a few more bugs.                    #
  89. #                                                                              #
  90. #  v1.4                                                                        #
  91. # ~=~=~=~                                                                      #
  92. # -This script is basically done with a few more additions in my sights.       #
  93. #  In v1.4 I have added an option to play an Intro Movie before the title      #
  94. #  page. I have also added two features that I got from D&P3's youtube channel #
  95. #  for Balloon SE's and Collision SE, I figured they were releavent.           #
  96. #                                                                              #
  97. #------------------------------------------------------------------------------#
  98. #==============================================================================#
  99.  
  100.  
  101.  
  102.  
  103.  
  104. #==============================================================================
  105. # ** V's Awesome Options Module
  106. #------------------------------------------------------------------------------
  107. #  This module manages customizable features and methods.
  108. #==============================================================================
  109.  
  110. module V_OPTS
  111. module Specs
  112.  
  113.  
  114.  
  115.  
  116.  
  117. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  118. #                                                                              #
  119. #                           Start Customizable Area.                           #
  120. #                                                                              #
  121. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  122. #                                                                              #
  123. #                      ONLY EDIT AFTER THE EQUALS SYMBOL.                      #
  124. #                                                                              #
  125. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  126.  
  127.  
  128.  
  129.   #============================================================================
  130.   # Movie Intro Options
  131.   #----------------------------------------------------------------------------
  132.   # **The movie has to be .ogg format and imported into your movie folder.
  133.   # ** Keep in mind that you CAN NOT stop the movie still. So try not to bore
  134.   #    the player with an extremely long intro.
  135.   #============================================================================
  136.  
  137.   Play_Movie_Intro = false
  138.  
  139.   Movie_Name = "Flow_Animation"
  140.  
  141.   #============================================================================
  142.   # Title Background Options
  143.   #============================================================================
  144.  
  145.   Use_Mid_Layer                      = true         # Set both options to false
  146.                                                    # to use default background
  147.                                                  
  148.   Title_BG_File_Name                 = "Relic Title BG"           # Import the desired BG image  
  149.   Title_MG_File_Name                 = ""           # into the Graphics/Pictures
  150.   Title_FG_File_Name                 = ""           # folder in the Resource Manager
  151.                                                    # If you just want to use one layer
  152.                                                    # Leave the mid-ground and foreground
  153.                                                    #blank
  154.  
  155.   Title_BG_Opacity                   = 255        
  156.   Title_MG_Opacity                   = 200        
  157.   Title_FG_Opacity                   = 120        
  158.  
  159.   Title_BG_x_position                = 0
  160.   Title_MG_x_position                = 0
  161.   Title_FG_x_position                = 0
  162.  
  163.   Title_BG_y_position                = 0
  164.   Title_MG_y_position                = 0
  165.   Title_FG_y_position                = 0
  166.  
  167.   Title_BG_Zoom                      = 100         # Scaled with %, meaning %100
  168.                                                    # is full screen
  169.   Title_MG_Zoom                      = 100      
  170.                                              
  171.   Title_FG_Zoom                      = 100        
  172.  
  173.  
  174.   #============================================================================
  175.   # Title Command Window Options
  176.   #============================================================================
  177.  
  178.   Use_Horizontal_Command_Window      = true
  179.  
  180.   Center_Title_Cmmd_Window_Text      = true
  181.  
  182.   Command_Window_x_position          = 8
  183.   Command_Window_y_position          = 378
  184.  
  185.   #============================================================================
  186.   # Draw Title Options
  187.   #============================================================================
  188.  
  189.   Use_Draw_Title                     = false        # If you want the system to draw
  190.                                                     # the title set to true  
  191.   Draw_Title_Font_Size               = 16  
  192.  
  193.   Draw_Title_Font                    = ["Times New Roman"]
  194.  
  195.   Draw_Title_x_position              = 217
  196.   Draw_Title_y_position              = 350
  197.  
  198.   #============================================================================
  199.   # Title BGM Options
  200.   #============================================================================
  201.  
  202.   Use_Title_BGM                      = true
  203.                                    #["BGM', Volume, Pitch]
  204.   Title_BGM                          = ["Town1", 70, 100]
  205.      
  206.   #============================================================================
  207.   # Menu Options
  208.   #============================================================================
  209.  
  210.   Center_Menu_Cmmd_Window_Text       = true    
  211.  
  212.   Background_File_Name               = "Relic Title BG"         # Import the desired BG image  
  213.                                                   # into the Graphics/Pictures
  214.                                                   # folder in the Resource Manager
  215.   Background_Opacity                 = 75        
  216.   Background_x_position              = 0
  217.   Background_y_position              = 0
  218.   Background_Zoom                    = 110        # Scaled with %, meaning %100
  219.                                                   # is full screen
  220.  
  221.   #============================================================================
  222.   # Menu BGM Options
  223.   #============================================================================
  224.  
  225.   Use_BGM                            = true
  226.                                     #["BGM', Volume, Pitch]
  227.   Background_BGM                     = ["Town4", 70, 100]
  228.          
  229.   #============================================================================
  230.   # Menu Actor Face / Actor Graphic Options
  231.   #============================================================================
  232.                                                                                                  
  233.   Display_Actor_Graphic_With_Face    = true       # If you do not want to display
  234.                                                   # the face behind the character
  235.                                                   # graphic set the actors face
  236.                                                   # to "none" in the Database.
  237.                                                  
  238.    Actor_Graphic_x_position          = 48          # 0 is the center of the face
  239.    Actor_Graphic_y_position          = 20
  240.    
  241.   #============================================================================
  242.   # End Game Command Scene Options
  243.   #============================================================================
  244.  
  245.   Center_EndGame_Cmmd_Window_Text    = false
  246.  
  247.   End_Game_Cmmd_Window_x_position    = 0
  248.   End_Game_Cmmd_Window_y_position    = 330
  249.  
  250.   #============================================================================
  251.   # Game Over Options
  252.   #============================================================================
  253.  
  254.   Use_Game_Over_Foreground          = true
  255.   Use_Game_Over_Midground           = true
  256.  
  257.   Game_Over_BG_File_Name            = "Relic Title BG"  # Import the desired BG image  
  258.                                                     # into the Graphics/Pictures
  259.                                                     # folder in the Resource Manager
  260.   Game_Over_BG_Opacity              = 100        
  261.   Game_Over_BG_x_position           = 0
  262.   Game_Over_BG_y_position           = 0
  263.   Game_Over_BG_Zoom                 = 100         # Scaled with %, meaning %100
  264.                                                   # is full screen
  265.                                                  
  266.   #============================================================================
  267.   # Game Over Mid-ground Options
  268.   #============================================================================
  269.  
  270.   Game_Over_MG_File_Name            = ""  # Import the desired BG image  
  271.                                                        # into the Graphics/Pictures
  272.                                                        # folder in the Resource Manager
  273.   Game_Over_MG_Opacity              = 200        
  274.   Game_Over_MG_x_position           = 0
  275.   Game_Over_MG_y_position           = 0
  276.   Game_Over_MG_Zoom                 = 100          # Scaled with %, meaning %100
  277.                                                       # is full screen
  278.  
  279.   #============================================================================
  280.   # Game Over Foreground Options
  281.   #============================================================================
  282.  
  283.   Game_Over_FG_File_Name            = ""  # Import the desired BG image  
  284.                                                        # into the Graphics/Pictures
  285.                                                        # folder in the Resource Manager
  286.   Game_Over_FG_Opacity              = 255        
  287.   Game_Over_FG_x_position           = 0
  288.   Game_Over_FG_y_position           = 0
  289.   Game_Over_FG_Zoom                 = 100           # Scaled with %, meaning %100
  290.                                                       # is full screen
  291.  
  292.   #============================================================================
  293.   # Draw Game Over Text Options
  294.   #============================================================================
  295.  
  296.   Use_Draw_Game_Over                = true        # If you want the system to draw
  297.                                                      # the title set to true  
  298.   Draw_Game_Over_Vocab              = "You Died!"
  299.  
  300.   Draw_Game_Over_Font_Size          = 90  
  301.                                   #red, green, blue
  302.   Draw_Game_Over_Font_Color         = 100, 25, 25
  303.  
  304.   Draw_Game_Over_Font               = ["Times New Roman"]
  305.  
  306.   Draw_Game_Over_Bold               = true
  307.   Draw_Game_Over_Italic             = true
  308.   Draw_Game_Over_Shadow             = true
  309.  
  310.   Draw_Game_Over_x_position         = 0
  311.   Draw_Game_Over_y_position         = -25
  312.  
  313.   #============================================================================
  314.   # Game Over BGM Options
  315.   #============================================================================
  316.  
  317.   Use_Game_Over_BGM                 = true
  318.                                     #["BGM', Volume, Pitch]
  319.   Game_Over_BGM                     = ["Dungeon5", 80, 70]
  320.                                                  
  321.   #============================================================================
  322.   # Window Opacity And Boarder Options
  323.   #============================================================================
  324.  
  325.   Affect_Window_Boarders            = true
  326.   Window_Opacity                    = 0
  327.  
  328.   #============================================================================
  329.   # Default Font Options
  330.   #============================================================================
  331.  
  332.   Default_Font_Size                 = 20
  333.   Default_Font_Name                 = ["Times New Roman"]
  334.   Default_Font_Bold                 = false
  335.   Default_Font_Italic               = true
  336.   Use_Font_Shadow                   = true
  337.  
  338.   #--------------------------------------------------------------------------
  339.   # * Collision SE
  340.   #--------------------------------------------------------------------------
  341.  
  342.   Use_Collision_SE = true
  343.  
  344.   #Collision_SE         = ["SoundName", Volume, Pitch]
  345.   Collision_SE         = ["Blow2", 100, 60]
  346.  
  347.  
  348.   Collision_Wait_Timer = 45                     # Wait time is set in frames
  349.  
  350.   #============================================================================
  351.   # Balloon SE
  352.   #============================================================================
  353.  
  354.   #Used in game to turn on and off sounds
  355.   Event_Switch = 21
  356.  
  357.  
  358.   Exclamation_SE          = ["Cursor2",   80,  100]
  359.   Question_SE             = ["Load",      80,  100]
  360.   Music_Note_SE           = ["Starlight", 80,  100]
  361.   Heart_SE                = ["Saint5",    80,  100]
  362.   Anger_SE                = ["Monster1",  80,  100]
  363.   Sweat_SE                = ["Heal5",     80,  100]
  364.   Cobweb_SE               = ["Equip2",    80,  100]
  365.   Silence_SE              = [nil,         80,  100]
  366.   Lightbulb_SE            = ["Magic5",    80,  100]
  367.   Zzz_SE                  = ["Saint1",    80,  100]
  368.  
  369. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  370. #                                                                              #
  371. #                            End Customizable Area.                            #
  372. #                                                                              #
  373. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  374. #                                                                              #
  375. #         DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOUR DOING.         #
  376. #                                                                              #
  377. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.   end
  397. end
  398.  
  399.  
  400.  
  401. #------------------------------------------------------------------------------
  402. #  This class handles the player. It includes event starting determinants and
  403. # map scrolling functions. The instance of this class is referenced by
  404. # $game_player.
  405. #==============================================================================
  406.  
  407. class Game_Player < Game_Character
  408.  
  409.   #--------------------------------------------------------------------------
  410.   # * For Aliasing
  411.   #--------------------------------------------------------------------------
  412.  
  413.   alias v_collisionsound_gameplayer_update_jh21     update
  414.  
  415.   #--------------------------------------------------------------------------
  416.   # * Frame Update
  417.   #--------------------------------------------------------------------------
  418.  
  419.   def update
  420.     v_collisionsound_gameplayer_update_jh21()
  421.    
  422.     if V_OPTS::Specs::Use_Collision_SE
  423.       @collision_sound_timer = 0 unless @collision_sound_timer
  424.       @collision_sound_timer -= 1 unless @collision_sound_timer == 0
  425.     end
  426.    
  427.   end
  428.  
  429.   #--------------------------------------------------------------------------
  430.   # * For Aliasing
  431.   #--------------------------------------------------------------------------
  432.  
  433.   alias v_collisionsound_gameplayer_passable_jh21     passable?
  434.  
  435.   #--------------------------------------------------------------------------
  436.   # * Determine if Passable
  437.   #--------------------------------------------------------------------------
  438.  
  439.   def passable?( *args )
  440.     passable = v_collisionsound_gameplayer_passable_jh21( *args )
  441.    
  442.     unless passable || @collision_sound_timer > 0
  443.       RPG::SE.new(*V_OPTS::Specs::Collision_SE).play
  444.       @collision_sound_timer = V_OPTS::Specs::Collision_Wait_Timer
  445.     end
  446.    
  447.     return passable
  448.   end
  449.  
  450. end
  451. #==============================================================================
  452. # ** Window_Base
  453. #------------------------------------------------------------------------------
  454. #  This is a super class of all windows within the game.
  455. #==============================================================================
  456.  
  457. class Window_Base < Window
  458.  
  459.   #--------------------------------------------------------------------------
  460.   # * For Creating An Alias
  461.   #--------------------------------------------------------------------------
  462.  
  463.   alias v_menuoptioss_winbase_initialize_34864                     initialize
  464.  
  465.   #--------------------------------------------------------------------------
  466.   # * Object Initialization
  467.   #--------------------------------------------------------------------------
  468.  
  469.   def initialize(x, y, width, height)
  470.     super
  471.     @usewinboarders = V_OPTS::Specs::Affect_Window_Boarders
  472.     Font.default_size = V_OPTS::Specs::Default_Font_Size                      
  473.     Font.default_name = V_OPTS::Specs::Default_Font_Name  
  474.     Font.default_bold = V_OPTS::Specs::Default_Font_Bold                
  475.     Font.default_italic = V_OPTS::Specs::Default_Font_Italic            
  476.     Font.default_shadow = V_OPTS::Specs::Use_Font_Shadow    
  477.     self.windowskin = Cache.system("Window")
  478.    
  479.     if @usewinboarders
  480.       then self.opacity = V_OPTS::Specs::Window_Opacity
  481.     else self.back_opacity = V_OPTS::Specs::Window_Opacity
  482.     end
  483.    
  484.     update_padding
  485.     update_tone
  486.     create_contents
  487.     @opening = @closing = false
  488.   end
  489.  
  490.   #--------------------------------------------------------------------------
  491.   # * For Creating An Alias
  492.   #--------------------------------------------------------------------------
  493.  
  494.   alias v_menuoptioss_winbase_drawactorface_32541             draw_actor_face
  495.  
  496.   #--------------------------------------------------------------------------
  497.   # * Draw Actor Face Or Graphic
  498.   #--------------------------------------------------------------------------
  499.  
  500.   def draw_actor_face(actor, x, y, enabled = true)
  501.     v_menuoptioss_winbase_drawactorface_32541(actor, x, y)
  502.     @draw_actor_face_or_graphic = V_OPTS::Specs::Display_Actor_Graphic_With_Face
  503.     @actorgraphicx = V_OPTS::Specs::Actor_Graphic_x_position
  504.     @actorgraphicy = V_OPTS::Specs::Actor_Graphic_y_position
  505.    
  506.     if @draw_actor_face_or_graphic
  507.       then draw_actor_graphic(actor, (x + 50 + @actorgraphicx), (y + 70 + @actorgraphicy))
  508.     else draw_face(actor.face_name, actor.face_index, x, y, enabled)
  509.     end
  510.    
  511.   end
  512.  
  513. end
  514.  
  515.  
  516.  
  517. #==============================================================================
  518. # ** HorzCmmdWin
  519. #------------------------------------------------------------------------------
  520. #  This class is for the horizontal command window option.
  521. #==============================================================================
  522.  
  523. class HorzCmmdWin < Window_Command
  524.  
  525.   #--------------------------------------------------------------------------
  526.   # * Object Initialization
  527.   #--------------------------------------------------------------------------
  528.  
  529.   def initialize
  530.   super(((Graphics.width - window_width) / 1), Graphics.height - window_height)
  531.   select_symbol :continue if continue_enabled
  532.   end
  533.  
  534.   #--------------------------------------------------------------------------
  535.   # * Get Window Width
  536.   #--------------------------------------------------------------------------
  537.  
  538.   def window_width
  539.   return (275- standard_padding) * 2
  540.   end
  541.  
  542.   #--------------------------------------------------------------------------
  543.   # * Create Command List
  544.   #--------------------------------------------------------------------------
  545.  
  546.   def make_command_list
  547.   add_command(Vocab::new_game, :new_game)
  548.   add_command(Vocab::continue, :continue, continue_enabled)
  549.   add_command(Vocab::shutdown, :shutdown)
  550.   end
  551.  
  552.   #--------------------------------------------------------------------------
  553.   # * Get Activation State of Continue
  554.   #--------------------------------------------------------------------------
  555.  
  556.   def continue_enabled
  557.   DataManager.save_file_exists?
  558.   end
  559.  
  560.   #--------------------------------------------------------------------------
  561.   # * Get Number of Items
  562.   #--------------------------------------------------------------------------
  563.  
  564.   def item_max
  565.     return 3
  566.   end
  567.  
  568.   #--------------------------------------------------------------------------
  569.   # * Get Digit Count
  570.   #--------------------------------------------------------------------------
  571.  
  572.   def col_max
  573.   return 3
  574.   end
  575.  
  576.   #--------------------------------------------------------------------------
  577.   # * Draw Item
  578.   #--------------------------------------------------------------------------
  579.  
  580.   def draw_item(index)
  581.     @center_text = V_OPTS::Specs::Center_Title_Cmmd_Window_Text
  582.     change_color(normal_color, command_enabled?(index))
  583.    
  584.     if @center_text
  585.       then draw_text(item_rect_for_text(index), command_name(index), alignment = 1)
  586.     else draw_text(item_rect_for_text(index), command_name(index), alignment = 0)
  587.     end
  588.          
  589.   end
  590.  
  591. end
  592.  
  593.  
  594.  
  595. #==============================================================================
  596. # ** Window_MenuCommand
  597. #------------------------------------------------------------------------------
  598. #  This command window appears on the menu screen.
  599. #==============================================================================
  600.  
  601. class Window_MenuCommand < Window_Command
  602.  
  603.   #--------------------------------------------------------------------------
  604.   # * Draw Item
  605.   #--------------------------------------------------------------------------
  606.  
  607.   def draw_item(index)
  608.     @center_text = V_OPTS::Specs::Center_Menu_Cmmd_Window_Text
  609.     change_color(normal_color, command_enabled?(index))
  610.    
  611.     if @center_text
  612.       then draw_text(item_rect_for_text(index), command_name(index), alignment = 1)
  613.     else draw_text(item_rect_for_text(index), command_name(index), alignment = 0)
  614.     end
  615.          
  616.   end
  617.  
  618. end  
  619.  
  620.  
  621.  
  622. #==============================================================================
  623. # ** Window_TitleCommand
  624. #------------------------------------------------------------------------------
  625. #  This window is for selecting New Game/Continue on the title screen.
  626. #==============================================================================
  627.  
  628. class Window_TitleCommand < Window_Command
  629.  
  630.   #--------------------------------------------------------------------------
  631.   # * Draw Item
  632.   #--------------------------------------------------------------------------
  633.  
  634.   def draw_item(index)
  635.     @center_text = V_OPTS::Specs::Center_Title_Cmmd_Window_Text
  636.     change_color(normal_color, command_enabled?(index))
  637.    
  638.     if @center_text
  639.       then draw_text(item_rect_for_text(index), command_name(index), alignment = 1)
  640.     else draw_text(item_rect_for_text(index), command_name(index), alignment = 0)
  641.     end
  642.          
  643.   end
  644.  
  645. end
  646.  
  647.  
  648.  
  649. #==============================================================================
  650. # ** Window_GameEnd
  651. #------------------------------------------------------------------------------
  652. #  This window is for selecting Go to Title/Shut Down on the game over screen.
  653. #==============================================================================
  654.  
  655. class Window_GameEnd < Window_Command
  656.  
  657.   #--------------------------------------------------------------------------
  658.   # * Object Initialization
  659.   #--------------------------------------------------------------------------
  660.  
  661.   def initialize
  662.     super(0, 0)
  663.     update_placement
  664.     self.openness = 0
  665.     open
  666.   end
  667.  
  668.   #--------------------------------------------------------------------------
  669.   # * Get Window Width
  670.   #--------------------------------------------------------------------------
  671.  
  672.   def window_width
  673.     return 160
  674.   end
  675.  
  676.   #--------------------------------------------------------------------------
  677.   # * Update Window Position
  678.   #--------------------------------------------------------------------------
  679.  
  680.   def update_placement
  681.     self.x = (Graphics.width - width) / 2
  682.     self.y = (Graphics.height - height) / 2
  683.   end
  684.  
  685.   #--------------------------------------------------------------------------
  686.   # * Create Command List
  687.   #--------------------------------------------------------------------------
  688.  
  689.   def make_command_list
  690.     add_command(Vocab::to_title, :to_title)
  691.     add_command(Vocab::shutdown, :shutdown)
  692.     add_command(Vocab::cancel,   :cancel)
  693.   end
  694.  
  695.   #--------------------------------------------------------------------------
  696.   # * Draw Item
  697.   #--------------------------------------------------------------------------
  698.  
  699.   def draw_item(index)
  700.     @center_text = V_OPTS::Specs::Center_EndGame_Cmmd_Window_Text
  701.     change_color(normal_color, command_enabled?(index))
  702.    
  703.     if @center_text
  704.       then draw_text(item_rect_for_text(index), command_name(index), alignment = 1)
  705.     else draw_text(item_rect_for_text(index), command_name(index), alignment = 0 )
  706.     end
  707.          
  708.   end
  709.  
  710. end
  711.  
  712.  
  713.  
  714. #==============================================================================
  715. # ** Scene_Title
  716. #------------------------------------------------------------------------------
  717. #  This class performs the title screen processing.
  718. #==============================================================================
  719.  
  720. class Scene_Title < Scene_Base
  721.  
  722.   #--------------------------------------------------------------------------
  723.   # * Start Processing
  724.   #--------------------------------------------------------------------------
  725.  
  726.   def start
  727.     super
  728.    
  729.     if  V_OPTS::Specs::Play_Movie_Intro
  730.       movie_intro
  731.     end
  732.    
  733.     @usehrzcmmdwin = V_OPTS::Specs::Use_Horizontal_Command_Window
  734.     @usedrawtitle = V_OPTS::Specs::Use_Draw_Title
  735.     SceneManager.clear
  736.     Graphics.freeze
  737.    
  738.     if @usehrzcmmdwin
  739.       then create_horizontal_command_window
  740.     else create_command_window
  741.     end
  742.          
  743.     create_background
  744.     determine_use_MG
  745.    
  746.     if @usedrawtitle
  747.       then create_foreground_with_title
  748.       else create_foreground
  749.     end
  750.    
  751.     play_title_music
  752.      
  753.   end
  754.  
  755.   #--------------------------------------------------------------------------
  756.   # * Movie Intro
  757.   #--------------------------------------------------------------------------
  758.  
  759.   def movie_intro
  760.     name = V_OPTS::Specs::Movie_Name
  761.     Graphics.play_movie('Movies/' + name) unless name.empty?
  762.   end
  763.  
  764.   #--------------------------------------------------------------------------
  765.   # * Determines If Midground Is True
  766.   #--------------------------------------------------------------------------
  767.  
  768.   def determine_use_MG
  769.     @usemidground = V_OPTS::Specs::Use_Mid_Layer
  770.  
  771.     if @usemidground
  772.       then create_midground
  773.     end
  774.    
  775.   end
  776.  
  777.   #--------------------------------------------------------------------------
  778.   # * Termination Processing
  779.   #--------------------------------------------------------------------------
  780.  
  781.   def hrz_terminate
  782.   end
  783.  
  784.   #--------------------------------------------------------------------------
  785.   # * Termination Processing
  786.   #--------------------------------------------------------------------------
  787.  
  788.   def terminate
  789.     super
  790.     SceneManager.snapshot_for_background
  791.     dispose_background
  792.     usemidground = V_OPTS::Specs::Use_Mid_Layer
  793.  
  794.     if usemidground
  795.       then dispose_midground
  796.     end
  797.    
  798.     dispose_foreground
  799.   end
  800.  
  801.   #--------------------------------------------------------------------------
  802.   # * Create Background
  803.   #--------------------------------------------------------------------------
  804.  
  805.   def create_background    
  806.     @title_sprite1 = Sprite.new
  807.     @title_sprite1.bitmap = Cache.picture(V_OPTS::Specs::Title_BG_File_Name)
  808.     @title_sprite1.x = V_OPTS::Specs::Title_BG_x_position
  809.     @title_sprite1.y = V_OPTS::Specs::Title_BG_y_position
  810.     @title_sprite1.zoom_x= Graphics.width.to_f / @title_sprite1.width / 100 * V_OPTS::Specs::Title_BG_Zoom
  811.     @title_sprite1.zoom_y = Graphics.height.to_f / @title_sprite1.height / 100 * V_OPTS::Specs::Title_BG_Zoom
  812.     @title_sprite1.opacity = V_OPTS::Specs::Title_BG_Opacity
  813.     @title_sprite1.visible = true
  814.   end
  815.  
  816.   #--------------------------------------------------------------------------
  817.   # * Create Midground
  818.   #--------------------------------------------------------------------------
  819.  
  820.   def create_midground
  821.     @title_sprite2 = Sprite.new
  822.     @title_sprite2.bitmap = Cache.picture(V_OPTS::Specs::Title_MG_File_Name)
  823.     @title_sprite2.x = V_OPTS::Specs::Title_MG_x_position
  824.     @title_sprite2.y = V_OPTS::Specs::Title_MG_y_position
  825.     @title_sprite2.zoom_x= Graphics.width.to_f / @title_sprite2.width / 100 * V_OPTS::Specs::Title_MG_Zoom
  826.     @title_sprite2.zoom_y = Graphics.height.to_f / @title_sprite2.height / 100 * V_OPTS::Specs::Title_MG_Zoom
  827.     @title_sprite2.opacity = V_OPTS::Specs::Title_MG_Opacity
  828.     @title_sprite2.visible = true
  829.   end
  830.  
  831.   #--------------------------------------------------------------------------
  832.   # * Create Foreground With Title
  833.   #--------------------------------------------------------------------------
  834.  
  835.   def create_foreground_with_title
  836.     @title_sprite3 = Sprite.new
  837.     @title_sprite3.bitmap = Cache.picture(V_OPTS::Specs::Title_FG_File_Name)
  838.     @title_sprite3.x = V_OPTS::Specs::Title_FG_x_position
  839.     @title_sprite3.y = V_OPTS::Specs::Title_FG_y_position
  840.     @title_sprite3.zoom_x= Graphics.width.to_f / @title_sprite3.width / 100 * V_OPTS::Specs::Title_FG_Zoom
  841.     @title_sprite3.zoom_y = Graphics.height.to_f / @title_sprite3.height / 100 * V_OPTS::Specs::Title_FG_Zoom
  842.     @title_sprite3.opacity = V_OPTS::Specs::Title_FG_Opacity
  843.     @title_sprite3.visible = true
  844.     @title_sprite3.bitmap.font.size = V_OPTS::Specs::Draw_Title_Font_Size
  845.     rect_x = V_OPTS::Specs::Draw_Title_x_position
  846.     rect_y = V_OPTS::Specs::Draw_Title_y_position
  847.     rect = Rect.new(*rect_x, *rect_y, Graphics.width, Graphics.height / 2)
  848.     @title_sprite3.bitmap.draw_text(rect, $data_system.game_title, 1)
  849.   end
  850.  
  851.   #--------------------------------------------------------------------------
  852.   # * Create Foreground
  853.   #--------------------------------------------------------------------------
  854.  
  855.   def create_foreground
  856.     @title_sprite3 = Sprite.new
  857.     @title_sprite3.bitmap = Cache.picture(V_OPTS::Specs::Title_FG_File_Name)
  858.     @title_sprite3.x = V_OPTS::Specs::Title_FG_x_position
  859.     @title_sprite3.y = V_OPTS::Specs::Title_FG_y_position
  860.     @title_sprite3.zoom_x= Graphics.width.to_f / @title_sprite3.width / 100 * V_OPTS::Specs::Title_FG_Zoom
  861.     @title_sprite3.zoom_y = Graphics.height.to_f / @title_sprite3.height / 100 * V_OPTS::Specs::Title_FG_Zoom
  862.     @title_sprite3.opacity = V_OPTS::Specs::Title_FG_Opacity
  863.     @title_sprite3.visible = true
  864.   end
  865.  
  866.   #--------------------------------------------------------------------------
  867.   # * Free Background
  868.   #--------------------------------------------------------------------------
  869.  
  870.   def dispose_background
  871.     @title_sprite1.bitmap.dispose
  872.     @title_sprite1.dispose
  873.   end
  874.  
  875.   #--------------------------------------------------------------------------
  876.   # * Free Mid-ground
  877.   #--------------------------------------------------------------------------
  878.  
  879.   def dispose_midground
  880.     @title_sprite2.bitmap.dispose
  881.     @title_sprite2.dispose
  882.   end
  883.  
  884.   #--------------------------------------------------------------------------
  885.   # * Free Foreground
  886.   #--------------------------------------------------------------------------
  887.  
  888.   def dispose_foreground
  889.     @title_sprite3.bitmap.dispose
  890.     @title_sprite3.dispose
  891.   end
  892.  
  893.   #--------------------------------------------------------------------------
  894.   # * Create Horizontal Command List
  895.   #--------------------------------------------------------------------------
  896.  
  897.   def create_horizontal_command_window
  898.     @hrzcommand_window = HorzCmmdWin.new
  899.     @hrzcommand_window.x = V_OPTS::Specs::Command_Window_x_position
  900.     @hrzcommand_window.y = V_OPTS::Specs::Command_Window_y_position
  901.     Font.default_size = 20
  902.     @hrzcommand_window.set_handler(:new_game, method(:command_new_game))
  903.     @hrzcommand_window.set_handler(:continue, method(:command_continue))
  904.     @hrzcommand_window.set_handler(:shutdown, method(:command_shutdown))
  905.   end
  906.  
  907.   #--------------------------------------------------------------------------
  908.   # * Create Command List
  909.   #--------------------------------------------------------------------------
  910.  
  911.   def create_command_window
  912.     @command_window = Window_TitleCommand.new
  913.     @command_window.x = V_OPTS::Specs::Command_Window_x_position
  914.     @command_window.y = V_OPTS::Specs::Command_Window_y_position
  915.     Font.default_size = 20
  916.     @command_window.set_handler(:new_game, method(:command_new_game))
  917.     @command_window.set_handler(:continue, method(:command_continue))
  918.     @command_window.set_handler(:shutdown, method(:command_shutdown))
  919.   end
  920.  
  921.   #--------------------------------------------------------------------------
  922.   # * Close Command Window
  923.   #--------------------------------------------------------------------------
  924.  
  925.   def close_command_window
  926.     @usehrzcmmdwin = V_OPTS::Specs::Use_Horizontal_Command_Window
  927.    
  928.     if @usehrzcmmdwin
  929.       then @hrzcommand_window.close && update until @hrzcommand_window.close?
  930.     else
  931.       @command_window.close && update until @command_window.close?
  932.     end
  933.    
  934.     Font.default_size = V_OPTS::Specs::Default_Font_Size
  935.   end
  936.  
  937.   #--------------------------------------------------------------------------
  938.   # * [New Game] Command
  939.   #--------------------------------------------------------------------------
  940.  
  941.   def command_new_game
  942.     DataManager.setup_new_game
  943.     close_command_window
  944.     fadeout_all
  945.     $game_map.autoplay
  946.     SceneManager.goto(Scene_Map)
  947.   end
  948.  
  949.   #--------------------------------------------------------------------------
  950.   # * [Continue] Command
  951.   #--------------------------------------------------------------------------
  952.  
  953.   def command_continue
  954.     close_command_window
  955.     SceneManager.call(Scene_Load)
  956.   end
  957.  
  958.   #--------------------------------------------------------------------------
  959.   # * [Shut Down] Command
  960.   #--------------------------------------------------------------------------
  961.  
  962.   def command_shutdown
  963.     close_command_window
  964.     fadeout_all
  965.     SceneManager.exit
  966.   end
  967.  
  968.   #--------------------------------------------------------------------------
  969.   # * Play Title Screen Music
  970.   #--------------------------------------------------------------------------
  971.  
  972.   def play_title_music
  973.     @usetbgm = V_OPTS::Specs::Use_Title_BGM
  974.     tbgm = V_OPTS::Specs::Title_BGM
  975.    
  976.     if @usetbgm
  977.       then RPG::BGM.new(*tbgm).play
  978.     else $data_system.title_bgm.play
  979.     end
  980.    
  981.     RPG::BGS.stop
  982.     RPG::ME.stop
  983.   end
  984.  
  985. end
  986.  
  987.  
  988.  
  989. #==============================================================================
  990. # ** Scene_MenuBase
  991. #------------------------------------------------------------------------------
  992. #  This class performs basic processing related to the menu screen.
  993. #==============================================================================
  994.  
  995. class Scene_MenuBase < Scene_Base
  996.  
  997.   #--------------------------------------------------------------------------
  998.   # * For Creating An Alias
  999.   #--------------------------------------------------------------------------
  1000.  
  1001.   alias v_menuoptions_scenemenubase_start_32541                            start
  1002.  
  1003.   #--------------------------------------------------------------------------
  1004.   # * Start Processing
  1005.   #--------------------------------------------------------------------------
  1006.  
  1007.   def start
  1008.     v_menuoptions_scenemenubase_start_32541()
  1009.     play_menu_music if V_OPTS::Specs::Use_BGM
  1010.   end
  1011.  
  1012.   #--------------------------------------------------------------------------
  1013.   # * Play BGM Processing
  1014.   #--------------------------------------------------------------------------
  1015.  
  1016.   def play_menu_music
  1017.     @last_bgm = RPG::BGM.last
  1018.     bgm = V_OPTS::Specs::Background_BGM
  1019.     RPG::BGM.fade(60)
  1020.     RPG::BGM.new(*bgm).play
  1021.   end
  1022.  
  1023.   #--------------------------------------------------------------------------
  1024.   # * For Creating An Alias
  1025.   #--------------------------------------------------------------------------
  1026.  
  1027.   alias v_menuoptions_scenebase_terminate_5465                     terminate
  1028.  
  1029.   #--------------------------------------------------------------------------
  1030.   # * Termination Processing
  1031.   #--------------------------------------------------------------------------
  1032.  
  1033.   def terminate
  1034.     v_menuoptions_scenebase_terminate_5465()
  1035.    
  1036.     if V_OPTS::Specs::Use_BGM
  1037.       RPG::BGM.fade(60)
  1038.       @last_bgm.replay rescue nil
  1039.     end
  1040.    
  1041.   end
  1042.  
  1043.   #--------------------------------------------------------------------------
  1044.   # * Free Background
  1045.   #--------------------------------------------------------------------------
  1046.  
  1047.   def dispose_background
  1048.     @background_sprite.dispose
  1049.   end
  1050.  
  1051.   #--------------------------------------------------------------------------
  1052.   # * Create Background
  1053.   #--------------------------------------------------------------------------
  1054.  
  1055.   def create_background
  1056.     @background_sprite = Sprite.new
  1057.     @background_sprite.bitmap = Cache.picture(V_OPTS::Specs::Background_File_Name)
  1058.     @background_sprite.x = V_OPTS::Specs::Background_x_position
  1059.     @background_sprite.y = V_OPTS::Specs::Background_y_position
  1060.     @background_sprite.zoom_x= Graphics.width.to_f / @background_sprite.width / 100 * V_OPTS::Specs::Background_Zoom
  1061.     @background_sprite.zoom_y = Graphics.height.to_f / @background_sprite.height / 100 * V_OPTS::Specs::Background_Zoom
  1062.     @background_sprite.opacity = V_OPTS::Specs::Background_Opacity
  1063.     @background_sprite.visible = true
  1064.   end
  1065.  
  1066. end
  1067.  
  1068.  
  1069.  
  1070. #==============================================================================
  1071. # ** Scene_Menu
  1072. #------------------------------------------------------------------------------
  1073. #  This class performs the menu screen processing.
  1074. #==============================================================================
  1075.  
  1076. class Scene_Menu < Scene_MenuBase
  1077.  
  1078.   #--------------------------------------------------------------------------
  1079.   # * [Exit Game] Command
  1080.   #--------------------------------------------------------------------------
  1081.  
  1082.   def command_game_end
  1083.     SceneManager.call(V_Scene_End)
  1084.   end
  1085.  
  1086. end
  1087.  
  1088.  
  1089.  
  1090. #==============================================================================
  1091. # ** V_Scene_End
  1092. #------------------------------------------------------------------------------
  1093. #  This class performs V Game End Scene processing.
  1094. #==============================================================================
  1095.  
  1096. class V_Scene_End < Scene_MenuBase
  1097.  
  1098.   #--------------------------------------------------------------------------
  1099.   # * Start Processing
  1100.   #--------------------------------------------------------------------------
  1101.  
  1102.   def start
  1103.     super
  1104.     create_command_window
  1105.   end
  1106.  
  1107.   #--------------------------------------------------------------------------
  1108.   # * Pre-Termination Processing
  1109.   #--------------------------------------------------------------------------
  1110.  
  1111.   def pre_terminate
  1112.     super
  1113.     close_command_window
  1114.   end
  1115.  
  1116.   #--------------------------------------------------------------------------
  1117.   # * Create Command Window
  1118.   #--------------------------------------------------------------------------
  1119.  
  1120.   def create_command_window
  1121.     @command_window = Window_GameEnd.new
  1122.     @command_window.x = V_OPTS::Specs::End_Game_Cmmd_Window_x_position
  1123.     @command_window.y = V_OPTS::Specs::End_Game_Cmmd_Window_y_position
  1124.     @command_window.set_handler(:to_title, method(:command_to_title))
  1125.     @command_window.set_handler(:shutdown, method(:command_shutdown))
  1126.     @command_window.set_handler(:cancel,   method(:return_scene))
  1127.   end
  1128.  
  1129.   #--------------------------------------------------------------------------
  1130.   # * Close Command Window
  1131.   #--------------------------------------------------------------------------
  1132.  
  1133.   def close_command_window
  1134.     @command_window.close
  1135.     update until @command_window.close?
  1136.   end
  1137.  
  1138.   #--------------------------------------------------------------------------
  1139.   # * [Go to Title] Command
  1140.   #--------------------------------------------------------------------------
  1141.  
  1142.   def command_to_title
  1143.     close_command_window
  1144.     fadeout_all
  1145.     SceneManager.goto(Scene_Title)
  1146.   end
  1147.  
  1148.   #--------------------------------------------------------------------------
  1149.   # * [Shut Down] Command
  1150.   #--------------------------------------------------------------------------
  1151.  
  1152.   def command_shutdown
  1153.     close_command_window
  1154.     fadeout_all
  1155.     SceneManager.exit
  1156.   end
  1157.  
  1158. end
  1159.  
  1160.  
  1161.  
  1162. #==============================================================================
  1163. # ** Scene_Gameover
  1164. #------------------------------------------------------------------------------
  1165. #  This class performs game over screen processing.
  1166. #==============================================================================
  1167.  
  1168. class Scene_Gameover < Scene_Base
  1169.  
  1170.   #--------------------------------------------------------------------------
  1171.   # * Start Processing
  1172.   #--------------------------------------------------------------------------
  1173.   def start
  1174.     super
  1175.     play_gameover_music
  1176.     fadeout_frozen_graphics
  1177.     @uselayer = V_OPTS::Specs::Use_Game_Over_Midground || V_OPTS::Specs::Use_Game_Over_Foreground
  1178.    
  1179.     if @uselayer
  1180.       then
  1181.       determine_layers
  1182.       create_base_background
  1183.     else
  1184.       create_background
  1185.     end
  1186.    
  1187.   end
  1188.  
  1189.   #--------------------------------------------------------------------------
  1190.   # * Play Music on Game Over Screen
  1191.   #--------------------------------------------------------------------------
  1192.  
  1193.   def play_gameover_music
  1194.     @usegobgm = V_OPTS::Specs::Use_Game_Over_BGM
  1195.     @usegofg = V_OPTS::Specs::Use_Game_Over_Foreground
  1196.     gobgm = V_OPTS::Specs::Game_Over_BGM
  1197.     RPG::BGM.stop
  1198.     RPG::BGS.stop
  1199.    
  1200.     if @usegobgm
  1201.       then RPG::BGM.new(*gobgm).play
  1202.     else
  1203.       $data_system.gameover_me.play
  1204.     end
  1205.  
  1206.   end
  1207.  
  1208.   #--------------------------------------------------------------------------
  1209.   # * Determine if mg is used
  1210.   #--------------------------------------------------------------------------
  1211.  
  1212.   def determine_layers
  1213.     @usegomg = V_OPTS::Specs::Use_Game_Over_Midground
  1214.    
  1215.     if @usegomg
  1216.       then
  1217.       determine_top_layer
  1218.     else
  1219.       create_foreground
  1220.     end
  1221.        
  1222.   end
  1223.  
  1224.   #--------------------------------------------------------------------------
  1225.   # * Determine top layer
  1226.   #--------------------------------------------------------------------------
  1227.  
  1228.   def determine_top_layer
  1229.     @usegofg = V_OPTS::Specs::Use_Game_Over_Foreground
  1230.    
  1231.     if @usegofg
  1232.       then
  1233.       create_base_midground
  1234.       create_foreground
  1235.     else
  1236.       create_midground
  1237.     end
  1238.    
  1239.   end
  1240.  
  1241.   #--------------------------------------------------------------------------
  1242.   # * Create Base Background
  1243.   #--------------------------------------------------------------------------
  1244.  
  1245.   def create_base_background
  1246.     @gobackground_sprite = Sprite.new
  1247.     @gobackground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_BG_File_Name)
  1248.     @gobackground_sprite.x = V_OPTS::Specs::Game_Over_BG_x_position
  1249.     @gobackground_sprite.y = V_OPTS::Specs::Game_Over_BG_y_position
  1250.     @gobackground_sprite.zoom_x= Graphics.width.to_f / @gobackground_sprite.width / 100 * V_OPTS::Specs::Game_Over_BG_Zoom
  1251.     @gobackground_sprite.zoom_y = Graphics.height.to_f / @gobackground_sprite.height / 100 * V_OPTS::Specs::Game_Over_BG_Zoom
  1252.     @gobackground_sprite.opacity = V_OPTS::Specs::Game_Over_BG_Opacity
  1253.     @gobackground_sprite.visible = true
  1254.   end
  1255.    
  1256.   #--------------------------------------------------------------------------
  1257.   # * Create Base Mid-Ground
  1258.   #--------------------------------------------------------------------------
  1259.  
  1260.   def create_base_midground
  1261.     @gomidground_sprite = Sprite.new
  1262.     @gomidground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_MG_File_Name)
  1263.     @gomidground_sprite.x = V_OPTS::Specs::Game_Over_MG_x_position
  1264.     @gomidground_sprite.y = V_OPTS::Specs::Game_Over_MG_y_position
  1265.     @gomidground_sprite.z = 50
  1266.     @gomidground_sprite.zoom_x= Graphics.width.to_f / @gomidground_sprite.width / 100 * V_OPTS::Specs::Game_Over_MG_Zoom
  1267.     @gomidground_sprite.zoom_y = Graphics.height.to_f / @gomidground_sprite.height / 100 * V_OPTS::Specs::Game_Over_MG_Zoom
  1268.     @gomidground_sprite.opacity = V_OPTS::Specs::Game_Over_MG_Opacity
  1269.     @gomidground_sprite.visible = true
  1270.   end
  1271.    
  1272.   #--------------------------------------------------------------------------
  1273.   # * Create Foreground
  1274.   #--------------------------------------------------------------------------
  1275.  
  1276.   def create_foreground
  1277.     @gotext = V_OPTS::Specs::Draw_Game_Over_Vocab
  1278.     @textcolor = V_OPTS::Specs::Draw_Game_Over_Font_Color
  1279.     @usevgoscreen = V_OPTS::Specs::Use_Draw_Game_Over
  1280.     gotext = V_OPTS::Specs::Draw_Game_Over_Vocab
  1281.     textcolor = @textcolor
  1282.    
  1283.   if @usevgoscreen
  1284.     then
  1285.       @goforeground_sprite = Sprite.new
  1286.       @goforeground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_FG_File_Name)
  1287.       @goforeground_sprite.x = V_OPTS::Specs::Game_Over_FG_x_position
  1288.       @goforeground_sprite.y = V_OPTS::Specs::Game_Over_FG_y_position
  1289.       @goforeground_sprite.z = 100
  1290.       @goforeground_sprite.zoom_x= Graphics.width.to_f / @goforeground_sprite.width / 100 * V_OPTS::Specs::Game_Over_FG_Zoom
  1291.       @goforeground_sprite.zoom_y = Graphics.height.to_f / @goforeground_sprite.height / 100 * V_OPTS::Specs::Game_Over_FG_Zoom
  1292.       @goforeground_sprite.opacity = V_OPTS::Specs::Game_Over_FG_Opacity
  1293.       @goforeground_sprite.visible = true
  1294.       @goforeground_sprite.bitmap.font.size = V_OPTS::Specs::Draw_Game_Over_Font_Size
  1295.       @goforeground_sprite.bitmap.font.color.set(*textcolor)
  1296.       rect_x = V_OPTS::Specs::Draw_Game_Over_x_position
  1297.       rect_y = V_OPTS::Specs::Draw_Game_Over_x_position
  1298.       rect = Rect.new(*rect_x, *rect_y, Graphics.width, Graphics.height / 2)
  1299.       @goforeground_sprite.bitmap.draw_text(rect, *gotext, 1)
  1300.     else
  1301.       @goforeground_sprite = Sprite.new
  1302.       @goforeground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_FG_File_Name)
  1303.       @goforeground_sprite.x = V_OPTS::Specs::Game_Over_FG_x_position
  1304.       @goforeground_sprite.y = V_OPTS::Specs::Game_Over_FG_y_position
  1305.       @goforeground_sprite.z = 100
  1306.       @goforeground_sprite.zoom_x= Graphics.width.to_f / @goforeground_sprite.width / 100 * V_OPTS::Specs::Game_Over_FG_Zoom
  1307.       @goforeground_sprite.zoom_y = Graphics.height.to_f / @goforeground_sprite.height / 100 * V_OPTS::Specs::Game_Over_FG_Zoom
  1308.       @goforeground_sprite.opacity = V_OPTS::Specs::Game_Over_FG_Opacity
  1309.       @goforeground_sprite.visible = true
  1310.     end
  1311.    
  1312.   end
  1313.    
  1314.   #--------------------------------------------------------------------------
  1315.   # * Create Mid-Ground
  1316.   #--------------------------------------------------------------------------
  1317.  
  1318.   def create_mid_ground
  1319.     @gotext = V_OPTS::Specs::Draw_Game_Over_Vocab
  1320.     @textcolor = V_OPTS::Specs::Draw_Game_Over_Font_Color
  1321.     @usevgoscreen = V_OPTS::Specs::Use_Draw_Game_Over
  1322.     gotext = V_OPTS::Specs::Draw_Game_Over_Vocab
  1323.     textcolor = @textcolor
  1324.    
  1325.   if @usevgoscreen
  1326.     then
  1327.       @gomidground_sprite = Sprite.new
  1328.       @gomidground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_MG_File_Name)
  1329.       @gomidground_sprite.x = V_OPTS::Specs::Game_Over_MG_x_position
  1330.       @gomidground_sprite.y = V_OPTS::Specs::Game_Over_MG_y_position
  1331.       @gomidground_sprite.z = 50
  1332.       @gomidground_sprite.zoom_x= Graphics.width.to_f / @gomidground_sprite.width / 100 * V_OPTS::Specs::Game_Over_MG_Zoom
  1333.       @gomidground_sprite.zoom_y = Graphics.height.to_f / @gomidground_sprite.height / 100 * V_OPTS::Specs::Game_Over_MG_Zoom
  1334.       @gomidground_sprite.opacity = V_OPTS::Specs::Game_Over_MG_Opacity
  1335.       @gomidground_sprite.visible = true
  1336.       @gomidground_sprite.bitmap.font.size = V_OPTS::Specs::Draw_Game_Over_Font_Size
  1337.       @gomidground_sprite.bitmap.font.color.set(*textcolor)
  1338.       rect_x = V_OPTS::Specs::Draw_Game_Over_x_position
  1339.       rect_y = V_OPTS::Specs::Draw_Game_Over_x_position
  1340.       rect = Rect.new(*rect_x, *rect_y, Graphics.width, Graphics.height / 2)
  1341.       @gomidground_sprite.bitmap.draw_text(rect, *gotext, 1)
  1342.     else
  1343.       @gomidground_sprite = Sprite.new
  1344.       @gomidground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_MG_File_Name)
  1345.       @gomidground_sprite.x = V_OPTS::Specs::Game_Over_MG_x_position
  1346.       @gomidground_sprite.y = V_OPTS::Specs::Game_Over_MG_y_position
  1347.       @gomidground_sprite.z = 50
  1348.       @gomidground_sprite.zoom_x= Graphics.width.to_f / @gomidground_sprite.width / 100 * V_OPTS::Specs::Game_Over_MG_Zoom
  1349.       @gomidground_sprite.zoom_y = Graphics.height.to_f / @gomidground_sprite.height / 100 * V_OPTS::Specs::Game_Over_MG_Zoom
  1350.       @gomidground_sprite.opacity = V_OPTS::Specs::Game_Over_MG_Opacity
  1351.       @gomidground_sprite.visible = true
  1352.     end
  1353.    
  1354.   end
  1355.    
  1356.   #--------------------------------------------------------------------------
  1357.   # * Create Background
  1358.   #--------------------------------------------------------------------------
  1359.  
  1360.   def create_background
  1361.     @gotext = V_OPTS::Specs::Draw_Game_Over_Vocab
  1362.     @textcolor = V_OPTS::Specs::Draw_Game_Over_Font_Color
  1363.     @usevgoscreen = V_OPTS::Specs::Use_Draw_Game_Over
  1364.     gotext = V_OPTS::Specs::Draw_Game_Over_Vocab
  1365.     textcolor = @textcolor
  1366.    
  1367.     if @usevgoscreen
  1368.     then
  1369.       @gobackground_sprite = Sprite.new
  1370.       @gobackground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_BG_File_Name)
  1371.       @gobackground_sprite.x = V_OPTS::Specs::Game_Over_BG_x_position
  1372.       @gobackground_sprite.y = V_OPTS::Specs::Game_Over_BG_y_position
  1373.       @gobackground_sprite.zoom_x= Graphics.width.to_f / @gobackground_sprite.width / 100 * V_OPTS::Specs::Game_Over_BG_Zoom
  1374.       @gobackground_sprite.zoom_y = Graphics.height.to_f / @gobackground_sprite.height / 100 * V_OPTS::Specs::Game_Over_BG_Zoom
  1375.       @gobackground_sprite.opacity = V_OPTS::Specs::Game_Over_BG_Opacity
  1376.       @gobackground_sprite.visible = true
  1377.       @gobackground_sprite.bitmap.font.size = V_OPTS::Specs::Draw_Game_Over_Font_Size
  1378.       @gobackground_sprite.bitmap.font.color.set(*textcolor)
  1379.       @gobackground_sprite.bitmap.font.bold = V_OPTS::Specs::Draw_Game_Over_Font_Bold
  1380.       @gobackground_sprite.bitmap.font.italic = V_OPTS::Specs::Draw_Game_Over_Font_Italic
  1381.       @gobackground_sprite.bitmap.font.shadow = V_OPTS::Specs::Draw_Game_Over_Font_Shadow
  1382.       rect_x = V_OPTS::Specs::Draw_Game_Over_x_position
  1383.       rect_y = V_OPTS::Specs::Draw_Game_Over_x_position
  1384.       rect = Rect.new(*rect_x, *rect_y, Graphics.width, Graphics.height / 2)
  1385.       @gobackground_sprite.bitmap.draw_text(rect, *gotext, 1)
  1386.     else
  1387.       @gobackground_sprite = Sprite.new
  1388.       @gobackground_sprite.bitmap = Cache.picture(V_OPTS::Specs::Game_Over_BG_File_Name)
  1389.       @gobackground_sprite.x = V_OPTS::Specs::Game_Over_BG_x_position
  1390.       @gobackground_sprite.y = V_OPTS::Specs::Game_Over_BG_y_position
  1391.       @gobackground_sprite.zoom_x= Graphics.width.to_f / @gobackground_sprite.width / 100 * V_OPTS::Specs::Game_Over_BG_Zoom
  1392.       @gobackground_sprite.zoom_y = Graphics.height.to_f / @gobackground_sprite.height / 100 * V_OPTS::Specs::Game_Over_BG_Zoom
  1393.       @gobackground_sprite.opacity = V_OPTS::Specs::Game_Over_BG_Opacity
  1394.       @gobackground_sprite.visible = true
  1395.     end
  1396.  
  1397.   end
  1398.  
  1399.   #--------------------------------------------------------------------------
  1400.   # * Free Background
  1401.   #--------------------------------------------------------------------------
  1402.  
  1403.   def dispose_background
  1404.     @usegomg = V_OPTS::Specs::Use_Game_Over_Midground
  1405.     @usegofg = V_OPTS::Specs::Use_Game_Over_Foreground
  1406.    
  1407.    
  1408.     if @usegomg
  1409.       then
  1410.       @gomidground_sprite.bitmap.dispose
  1411.       @gomidground_sprite.dispose
  1412.     end
  1413.    
  1414.     if @usegofg
  1415.       then
  1416.       @goforeground_sprite.bitmap.dispose
  1417.       @goforeground_sprite.dispose
  1418.     end
  1419.    
  1420.     @gobackground_sprite.bitmap.dispose
  1421.     @gobackground_sprite.dispose
  1422.   end
  1423.  
  1424. end
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430. #==============================================================================
  1431. # ** Sprite_Character
  1432. #------------------------------------------------------------------------------
  1433. #  This sprite is used to display characters. It observes an instance of the
  1434. # Game_Character class and automatically changes sprite state.
  1435. #==============================================================================
  1436.  
  1437. class Sprite_Character < Sprite_Base
  1438.   #--------------------------------------------------------------------------
  1439.   # * For Aliasing
  1440.   #--------------------------------------------------------------------------
  1441.  
  1442.   alias v_seonballoon_sprite_chara_jh654                        start_balloon
  1443.  
  1444.   #--------------------------------------------------------------------------
  1445.   # * Start Balloon Icon Display
  1446.   #--------------------------------------------------------------------------
  1447.   def start_balloon
  1448.     unless $game_switches[V_OPTS::Specs::Event_Switch]
  1449.     case @balloon_id
  1450.     when 1
  1451.      RPG::SE.new(*V_OPTS::Specs::Exclamation_SE).play  if V_OPTS::Specs::Exclamation_SE[0]
  1452.     when 2
  1453.      RPG::SE.new(*V_OPTS::Specs::Question_SE).play     if V_OPTS::Specs::Question_SE[0]
  1454.     when 3
  1455.      RPG::SE.new(*V_OPTS::Specs::Music_Note_SE).play   if V_OPTS::Specs::Music_Note_SE[0]
  1456.     when 4
  1457.      RPG::SE.new(*V_OPTS::Specs::Heart_SE).play        if V_OPTS::Specs::Heart_SE[0]
  1458.     when 5
  1459.      RPG::SE.new(*V_OPTS::Specs::Anger_SE).play        if V_OPTS::Specs::Anger_SE[0]
  1460.     when 6
  1461.      RPG::SE.new(*V_OPTS::Specs::Sweat_SE).play        if V_OPTS::Specs::Sweat_SE[0]
  1462.     when 7
  1463.      RPG::SE.new(*V_OPTS::Specs::Cobweb_SE).play       if V_OPTS::Specs::Cobweb_SE[0]
  1464.     when 8
  1465.      RPG::SE.new(*V_OPTS::Specs::Silence_SE).play      if V_OPTS::Specs::Silence_SE[0]
  1466.     when 9
  1467.      RPG::SE.new(*V_OPTS::Specs::Lightbulb_SE).play    if V_OPTS::Specs::Lightbulb_SE[0]
  1468.     when 10
  1469.      RPG::SE.new(*V_OPTS::Specs::Zzz_SE).play          if V_OPTS::Specs::Zzz_SE[0]
  1470.     end
  1471.   end
  1472.   v_seonballoon_sprite_chara_jh654()
  1473.   end
  1474. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement