RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Battleback Stretch

0 Members and 1 Guest are viewing this topic.

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
Battleback Stretch
Version: 1.0
Author: TDS
Date: February 12, 2012

Version History


  • Version 1.0 2012.02.12 - Initial release.

Description


This script automatically stretches the battleback images when the screen size has changed.

Features

  • Changes the battleback images size to the size of the screen.

Screenshots

Normal


Stretched


Smaller Screen Stretch


Instructions

Just put the script in the materials area of the script editor and enjoy.

Script


Code: [Select]
#==============================================================================
# ** TDS Battleback Stretch
#    Ver: 1.0
#------------------------------------------------------------------------------
#  * Description:
#  This script automatically resizes the background images in battle into
#  the size of the screen.
#------------------------------------------------------------------------------
#  * Features:
#  Resizes battleback images into the size of the screen.
#------------------------------------------------------------------------------
#  * Instructions:
#  Just put it in your game and enjoy.
#------------------------------------------------------------------------------
#  * Notes:
#  None.
#------------------------------------------------------------------------------
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# If you really want to share my work please just post a link to the original
# site.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#   way from the consequenses.
#==============================================================================


#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Create Battleback 1 (Floor)
  #--------------------------------------------------------------------------
  def create_battleback1
    @back1_sprite = Sprite.new(@viewport1)
    @back1_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    # Get Background Bitmap
    background = battleback1_bitmap
    # Get Screen Size Rect
    screen = Rect.new(0, 0, Graphics.width, Graphics.height)
    # Stretch Battleback
    @back1_sprite.bitmap.stretch_blt(screen, background, background.rect)
    #battleback1_bitmap
    @back1_sprite.z = 0
    center_sprite(@back1_sprite)
  end
  #--------------------------------------------------------------------------
  # * Create Battleback 2 (Wall)
  #--------------------------------------------------------------------------
  def create_battleback2
    @back2_sprite = Sprite.new(@viewport1)
    @back2_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    # Get Background Bitmap
    background = battleback2_bitmap
    # Get Screen Size Rect
    screen = Rect.new(0, 0, Graphics.width, Graphics.height)
    # Stretch Battleback
    @back1_sprite.bitmap.stretch_blt(screen, background, background.rect)   
    @back2_sprite.z = 1
    center_sprite(@back2_sprite)
  end
end

Credit


  • TDS


Support


On this topic.

Known Compatibility Issues

None that I'm aware of so far.

Restrictions

Only for use in non-commercial games.

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - Story2014 Queen of RMRKProject of the Year 20142011 Best Newbie2014 Kindest Member2014 Best RPG Maker User - Creativity2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Neato! Thanks for writing it, TDS! :) I like this script, a lot! ;8
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


**
Rep: +0/-0Level 60
musician
That's exactly what I want. 10x

**
Rep:
Level 66
RMRK Junior
Great! Very Useful!