Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Rozszerzenie okna wiadomości
Autor Wiadomość
Loki 




Preferowany:
RPG Maker VX

Pomógł: 12 razy
Dołączył: 25 Kwi 2012
Posty: 162
Wysłany: Czw 28 Cze, 2012 11:51
Rozszerzenie okna wiadomości
~ Resolution Ace ~


Krótki opis:
Rozszerza okno wiadomości na długość całego okna gry.

Autor:
Rukiri

Kompatybilność:
RPG Maker VX Ace

Skrypt:
Spoiler:

Kod:
#==============================================================================
# ■ Game_Resolution
#------------------------------------------------------------------------------
# Change the game window to whatever you want!
# Keep the width and height a multiple of 32.
#==============================================================================

module Resolution
  $game_screen_width = 640
  $game_screen_height = 480
  $game_tiles_width = 20
  $game_tiles_height = 15
  #======================================
  # Resize the window
  #======================================
  def self.resize(w,h)
        Graphics.resize_screen(w,h)
        $game_screen_width = w
        $game_screen_height = h
        $game_tiles_width = w / 32
        $game_tiles_height = h / 32
  end
end
#==============================================================================
# ■ Sprite_Timer
#------------------------------------------------------------------------------
# Timer for display sprites. Monitor the $ game_timer, the state of the Sprite
# To change automatically.
#==============================================================================
class Sprite_Timer
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def initialize(viewport)
        super(viewport)
        create_bitmap
        update
  end
  #--------------------------------------------------------------------------
  # ● Create bitmap
  #--------------------------------------------------------------------------
  def create_bitmap
        self.bitmap = Bitmap.new(96, 48)
        self.bitmap.font.size = 32
        self.bitmap.font.color.set(255, 255, 255)
  end
   #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------
  def update
        super
        update_bitmap
        update_position
        update_visibility
  end
  #--------------------------------------------------------------------------
  # ● Update position
  #--------------------------------------------------------------------------
  def update_position
        self.x = $game_screen_width - self.bitmap.width
        self.y = 0
        self.z = 200
  end
end
#==============================================================================
# ■ Game_Map
#------------------------------------------------------------------------------
# A class to handle the map. It has features such as scrolling and passable determining.
# Instance of this class is referenced by $ game_map.
#==============================================================================

class Game_Map
  def update(main = false)
        refresh if @need_refresh
        update_interpreter if main
        update_scroll
        update_events
        update_vehicles
        update_parallax
        @screen.update
  end
  #--------------------------------------------------------------------------
  # ● Setup Scroll
  #--------------------------------------------------------------------------
  def setup_scroll
        @scroll_direction = 2
        @scroll_rest = 0
        @scroll_speed = 4
  end
  #--------------------------------------------------------------------------
  # ● Set display position
  #--------------------------------------------------------------------------
  def set_display_pos(x, y)
        x = [0, [x, $game_screen_width - $game_tiles_width].min].max unless loop_horizontal?
        y = [0, [y, $game_screen_height - $game_tiles_height].min].max unless loop_vertical?
        @display_x = (x + $game_screen_width) % $game_screen_width
        @display_y = (y + $game_screen_height) % $game_screen_height
        @parallax_x = x
        @parallax_y = y
  end
  #--------------------------------------------------------------------------
  # ● Parallax X check
  #--------------------------------------------------------------------------
  def parallax_ox(bitmap)
        if @parallax_loop_x
          @parallax_x * 16
        else
          w1 = [bitmap.width - $game_screen_width, 0].max
          w2 = [$game_screen_width * 32 - $game_screen_width, 1].max
          @parallax_x * 16 * w1 / w2
        end
  end

  #--------------------------------------------------------------------------
  # ● Adjust X
  #--------------------------------------------------------------------------
  def adjust_x(x)
        if loop_horizontal? && x < @display_x - ($game_screen_width - $game_tiles_width) / 2
          x - @display_x + $game_screen_width
        else
          x - @display_x
        end
  end
  #--------------------------------------------------------------------------
  # &#9679; Adjust Y
  #--------------------------------------------------------------------------
  def adjust_y(y)
        if loop_vertical? && y < @display_y - ($game_screen_height - $game_tiles_height) / 2
          y - @display_y + $game_screen_height
        else
          y - @display_y
        end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12523;&#12540;&#12503;&#35036;&#27491;&#24460;&#12398; X &#24231;&#27161;&#35336;&#31639;
  #--------------------------------------------------------------------------
  def round_x(x)
        loop_horizontal? ? (x + $game_screen_width) % $game_screen_width : x
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12523;&#12540;&#12503;&#35036;&#27491;&#24460;&#12398; Y &#24231;&#27161;&#35336;&#31639;
  #--------------------------------------------------------------------------
  def round_y(y)
        loop_vertical? ? (y + $game_screen_height) % $game_screen_height : y
  end
  #--------------------------------------------------------------------------
  # &#9679; &#19978;&#12395;&#12473;&#12463;&#12525;&#12540;&#12523;
  #--------------------------------------------------------------------------
  def scroll_up(distance)
        if loop_vertical?
          @display_y += @map.height - distance
          @display_y %= @map.height
          @parallax_y -= distance if @parallax_loop_y
        else
          last_y = @display_y
          @display_y = [@display_y - distance, 0].max
          @parallax_y += @display_y - last_y
        end
  end
end
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # &#9679; &#30011;&#38754;&#20013;&#22830;&#12398; X &#24231;&#27161;
  #--------------------------------------------------------------------------
  def center_x
        if $game_screen_width == 640
          ($game_screen_width / 32 - 1) / 1.0
          else
        ($game_screen_width / 32 - 1) / 2.0
        end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#30011;&#38754;&#20013;&#22830;&#12398; Y &#24231;&#27161;
  #--------------------------------------------------------------------------
  def center_y
        if $game_screen_height == 480
        ($game_screen_height / 32 - 1) / 1.0
  else
        ($game_screen_height / 32 - 1) / 2.0
        end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#30011;&#38754;&#20013;&#22830;&#12395;&#26469;&#12427;&#12424;&#12358;&#12395;&#12510;&#12483;&#12503;&#12398;&#34920;&#31034;&#20301;&#32622;&#12434;&#35373;&#23450;
  #--------------------------------------------------------------------------
  def center(x, y)
        $game_map.set_display_pos(x - center_x, y - center_y)
  end
        #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12524;&#12540;&#12512;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update
        last_real_x = @real_x
        last_real_y = @real_y
        last_moving = moving?
        move_by_input
        super
        update_scroll(last_real_x, last_real_y)
        update_vehicle
        update_nonmoving(last_moving) unless moving?
        @followers.update
  end
end

class Window_Base
  #--------------------------------------------------------------------------
  # &#9679; &#12473;&#12486;&#12540;&#12488;&#12362;&#12424;&#12403;&#24375;&#21270;/&#24369;&#20307;&#12398;&#12450;&#12452;&#12467;&#12531;&#12434;&#25551;&#30011;
  #--------------------------------------------------------------------------
  def draw_actor_icons(actor, x, y, width = 96)
        icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
  end
end


Screeny:
Spoiler:


 
 
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene