Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Easy Battle Back Stretching
#1
Easy Battle Back Stretching
Version: 2.0


Introduction
A Simple Plug and Play script that stretches all battlebacks to fit the whole screen (640 by 480 pixels). Also allows you to have 640 by 480 sized battlebacks


Screenshots
Ok Visualize the normal battlebacks only stretched to fit the whole screen. There's your screenshot.


Script
Code:
#==============================================================================
# ?? Easy Battle Back Stretching
#------------------------------------------------------------------------------
# Trickster (tricksterguy@hotmail.com)
# Version 2.0
# Date 5/31/07
# Goto rmxp.org for updates/support/bug reports
#------------------------------------------------------------------------------
# This script allows you to use 640x480 battle back images for the battle
# scene. It also stretches the images if they aren't 640 by 480.
#==============================================================================

#--------------------------------------------------------------------------
# Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Easy Battle Back Stretching', 'Trickster', 2.0, '5/31/07')

#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1, 2])

#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enabled?('Easy Battle Back Stretching')
  
class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias_method :trick_stretch_battle_init_viewport, :init_viewport
  def init_viewport
    # The Usual
    trick_stretch_battle_init_viewport
    # Setup Viewport Rectangle
    @viewport1.rect.set(0, 0, 640, 480)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update_battleback
    # If battleback file name is different from current one
    if @battleback_name != $game_temp.battleback_name
      # Set Battle Back
      @battleback_name = $game_temp.battleback_name
      # If Bitmap Defined
      if @battleback_sprite.bitmap != nil
        # Dispose Bitmap
        @battleback_sprite.bitmap.dispose
      end
      # Create Bitmap
      @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
      # Setup Source Rectangle
      @battleback_sprite.src_rect.set(0, 0, 640, 480)
      # If height is not 480 pixels
      if @battleback_sprite.bitmap.height != 480
        # Setup Zoom Y
        @battleback_sprite.zoom_y = 480.0 / @battleback_sprite.bitmap.height
      end
      # If width is not 640 pixels
      if @battleback_sprite.bitmap.width != 640
        # Setup Zoom X
        @battleback_sprite.zoom_x = 640.0 / @battleback_sprite.bitmap.width
      end
    end
  end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end


Instructions
Add in a new script above main


FAQ
Note: Permission granted by Trickster to post:
Quote:And if you post what you have now of my stuff then you don't have the latest versions. I'm too lazy/busy to post stuff.
As this is his material, it is deletable upon his request. Due to his current absense, no support is available. Please do not PM or eMail him for support.


Compatibility
SDK 2.x compliant


Terms and Conditions
Hey, I posted this publicly. You can use it. What do you expect? But if you do use it, I do expect you to spell my name correctly in your game. And yes you can use it in commercial games too.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Battle Item Count kyonides 4 1,629 02-04-2024, 05:49 AM
Last Post: kyonides
   Dalissa's Battle Cry DerVVulfman 2 7,027 05-09-2023, 03:07 AM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 2,403 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Actor Battle Items DerVVulfman 4 5,507 11-08-2020, 12:36 PM
Last Post: Melana
   Battle Report Raziel 1 6,624 05-29-2020, 02:27 AM
Last Post: Whisper
   ZLSL's Battle Portraits DerVVulfman 4 6,987 11-12-2019, 04:10 AM
Last Post: DerVVulfman
   ACBS - Atoa Custom Battle System 3.2 Victor Sant 150 243,406 03-02-2019, 04:47 AM
Last Post: dragonprincess44
   Mimi's Battle Music DerVVulfman 2 8,468 11-19-2018, 04:18 AM
Last Post: DerVVulfman
   ATOA Chanting Battle Animations DerVVulfman 9 16,789 01-12-2017, 01:46 PM
Last Post: Noctis
   Automatic Battle Actions Claihm 1 7,028 08-15-2016, 09:15 PM
Last Post: Melana



Users browsing this thread: