#=============================================================================== # # Yanfly Engine RD - Bitmap Fix # Last Date Updated: 2009.06.02 # Level: Easy # # If any selectable window has more than 341 rows for whatever reason, the game # will crash with a "failed to create bitmap error" leaving the player curious # as to what just happened. This essentially means that you cannot have more # than 682 items in your item menu, skill menu, or equip menu at all without # risking a crash. This is because RGSS2, by default, can only create bitmaps # in size of up to 8192 pixels in width or height. # #=============================================================================== # Updates: # ---------------------------------------------------------------------------- # o 2009.06.02 - Started script and "finished" it. #=============================================================================== # Instructions #=============================================================================== # # Place this above Main somewhere. Note that this doesn't fix the problem by # allowing you to go past 8192 pixels, but rather, prevents crashing. As of # this point, I have no ideas on how to overcome this problem. # #=============================================================================== $imported = {} if $imported == nil $imported["BitmapFix"] = true #=============================================================================== # Editting anything past this point may potentially result in causing computer # damage, incontinence, explosion of user's head, coma, death, and/or halitosis. # Therefore, edit at your own risk. #=============================================================================== #=============================================================================== # Window_Selectable #=============================================================================== class Window_Selectable < Window_Base #-------------------------------------------------------------------------- # overwrite create_contents #-------------------------------------------------------------------------- def create_contents self.contents.dispose maxbitmap = 8192 dw = [width - 32, maxbitmap].min dh = [[height - 32, row_max * WLH].max, maxbitmap].min bitmap = Bitmap.new(dw, dh) self.contents = bitmap end end # Window_Selectable #=============================================================================== # # END OF FILE # #===============================================================================