赞 | 17 |
VIP | 0 |
好人卡 | 0 |
积分 | 62 |
经验 | 0 |
最后登录 | 2024-11-1 |
在线时间 | 793 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 6160
- 在线时间
- 793 小时
- 注册时间
- 2019-1-20
- 帖子
- 204
|
本帖最后由 srwjrevenger 于 2021-2-25 11:49 编辑
你如果不介意上面红圈的东西去掉了,可以用这个
中间是
WW=0.8 HH=0.6 WHRATE=1.0
后面的是你想要的
WW=1.0 HH=1.0 WHRATE=0.25
之所以会去掉红圈的字,
是因为这个改法会缩小模糊文字,
即使放大字体也是一样,
要是有其他人会改这里当然是最好了... ...
- #==============================================================================
- # ■ スクリーンショット式セーブ画面 2018/10/18 by 莞爾の草 ver.0.02
- #==============================================================================
- =begin
- 【必要スクリプト素材】
- ?BitmapSave
- ([url]https://drive.google.com/drive/folders/1RhqfpUm0A3Dw6J74LCZRdud5g1_et65s[/url])
- 【対応を確認している他のスクリプト素材】
- ?RGSS3/セーブデータ上限解除(コミュ太郎氏)
- あまり複雑なことはしてないのでだいたいの素材とは競合
- しないんじゃないかと 思います←ここ重要
- =end
- module KNS
- module SaveFileVocab
- CurrentMap = "現在地"
- Money = "所持金"
-
- WW=0.8 ### 图片对应方向的显示比例
- HH=0.6 ###
- IMAGE_WH =[Graphics.width*WW,Graphics.height*HH] ###
- WHRATE=1.0 ### 图片的缩放比例
-
- ArrowSprite = nil #セーブファイルを指す下向き矢印の画像名です。
- #"画像名"と入れるとGraphics/systemに入っている画像名の
- #画像が読み込まれ、nilを入れると自動生成されます。
- end
- end
- ($imported ||= {})[:kanji_screenshot_save] = true
- module DataManager
- #--------------------------------------------------------------------------
- # ● セーブファイルの最大数
- #--------------------------------------------------------------------------
- if $imported[:cs_save_free]
- #コミュ太郎氏のセーブデータ上限解除がある場合用です
- def self.savefile_max
- return 40
- end
- end
- #--------------------------------------------------------------------------
- # ● セーブヘッダの作成?拡張
- #--------------------------------------------------------------------------
- def self.make_save_header
- header = {}
- header[:characters] = $game_party.characters_for_savefile
- header[:playtime_s] = $game_system.playtime_s
- header[:map_name] = $game_map.display_name
- header[:party_gold] = $game_party.gold
- header[:screenshot] = $game_temp.save_screenshot.is_a?(Bitmap) ?
- Cache.ss_into_hash($game_temp.save_screenshot) : nil
- header
- end
- end
- module Cache
- #--------------------------------------------------------------------------
- # ● スクリーンショットの名前
- #--------------------------------------------------------------------------
- def self.savefile_name(index)
- return "\\savefileno#{index}"
- end
- #--------------------------------------------------------------------------
- # ● キャッシュを削除
- #--------------------------------------------------------------------------
- def self.delete_cache(path)
- @cache[path] = nil
- end
- #--------------------------------------------------------------------------
- # ● ハッシュをビットマップに復元する
- #--------------------------------------------------------------------------
- def self.bitmap_save_ss(hash,index)
- @cache ||= {}
- return @cache[savefile_name(index)] = Bitmap.by_hash(hash)
- end
- def self.no_data_bitmap
- key = "\\ss_no_data"
- @cache ||= {}
- if !@cache[key] || @cache[key].disposed?
- sp = Bitmap.new(*save_ss_wh)
- sp.gradient_fill_rect(sp.rect, Color.new(*[80]*3), Color.new(*[20]*3), true)
- sp.draw_text(sp.rect,"", 1)###
- @cache[key] = sp
- end
- return @cache[key]
- end
- def self.save_ss_wh
- return KNS::SaveFileVocab::IMAGE_WH
- end
- #--------------------------------------------------------------------------
- # ● SSをハッシュにコンバートする
- #--------------------------------------------------------------------------
- def self.ss_into_hash(bitmap)
- return bitmap.data_to_hash
- end
- end
- class Game_Temp
- attr_accessor :save_screenshot
- #--------------------------------------------------------------------------
- # ● セーブプレビュー用BMP
- #--------------------------------------------------------------------------
- def create_save_preview
- w, h = Cache.save_ss_wh
- @save_screenshot.dispose if @save_screenshot
- @save_screenshot = Bitmap.new(w, h)
- @black_color ||= Color.new(0,0,0)
- @save_screenshot.fill_rect(@save_screenshot.rect, @black_color)
- rect = Rect.new($game_player.screen_x - w/2, $game_player.screen_y - h/2 - 16, w, h)
- @save_screenshot.blt(0, 0, Graphics.snap_to_bitmap, rect)
- end
- end
- class Scene_Map
- #--------------------------------------------------------------------------
- # ◎ 終了処理
- #--------------------------------------------------------------------------
- alias kns_terminate terminate
- def terminate
- $game_temp.create_save_preview
- kns_terminate
- end
- end
- class Game_Party
- #--------------------------------------------------------------------------
- # ● セーブファイル表示用のキャラクター画像情報
- #--------------------------------------------------------------------------
- def characters_for_savefile
- battle_members[0..3].collect do |actor|
- [actor.character_name, actor.character_index,
- actor.face_name, actor.face_index, actor.name, actor.level]
- end
- end
- end
- class Window_SaveStatus < Window_Base
- include KNS::SaveFileVocab
- #--------------------------------------------------------------------------
- # ● 水平線の描画
- #--------------------------------------------------------------------------
- def draw_horz_line(y)
- line_y = y + line_height / 2 - 1
- contents.fill_rect(0, line_y, contents_width, 2, line_color)
- end
- #--------------------------------------------------------------------------
- # ● 水平線の色を取得
- #--------------------------------------------------------------------------
- def line_color
- color = normal_color
- color.alpha = 48
- color
- end
- def refresh(index)
- contents.clear
- draw_text_o(4, 0, Vocab::File + " #{index + 1}")
- draw_horz_line(14)
- header = DataManager.load_header(index)
- return unless header
- begin
- draw_text_o(0, 0, header[:playtime_s], 2)
- party = header[:characters]
- y = 32
- party.each_with_index {|a, i| draw_character(*a[0..1], 48 * i+128, 120) if a}
- if a = party[0]
- draw_face(*a[2..3], 0, y)
- draw_text_o(104, y, a[4])
- draw_level(a[5], 232, y)
- end
- size = contents.text_size(Vocab.currency_unit)
- draw_text_o(-size.width-4, y + line_height, header[:party_gold], 2)
- draw_text_o(0, y + line_height * 3, header[:map_name], 2)
- x = 320
- change_color(system_color)
- draw_text_o(0, y + line_height, Vocab.currency_unit, 2)
- draw_text(x, y, contents_width-x, line_height, Money)
- draw_text(x, y + line_height * 2, contents_width-x, line_height, CurrentMap)
- change_color(normal_color)
- rescue
- end
- end
- def draw_text_o(x, y, text, align=0)
- draw_text(x, y, contents_width, line_height, text, align)
- end
- def draw_level(level, x, y)
- change_color(system_color)
- draw_text(x, y, 32, line_height, Vocab::level_a)
- change_color(normal_color)
- draw_text(x + 32, y, 24, line_height, level, 2)
- end
- end
- class Sprite_SaveFile < Sprite
- attr_accessor :t_x, :t_y, :t_zoom, :t_opacity, :count
- def initialize(viewport=nil, index)
- super(viewport)
- @file_index = index
- self.bitmap = Bitmap.new(*Cache.save_ss_wh)
- self.y = @t_y = 120
- self.x = Graphics.width / 2
- self.ox, self.oy = Cache.save_ss_wh[0] / 2, Cache.save_ss_wh[1] / 2
- @t_x = 0
- @t_zoom = 1
- @t_opacity = 255
- @count = 0
- refresh
- end
- def count_max
- return 9
- end
- def update
- unless @count == count_max
- @count += 1
- rate = @count / count_max.to_f
- self.x = (@t_x - self.x) * rate + self.x
- self.y = (@t_y - self.y) * rate + self.y
- self.zoom_x = self.zoom_y = (@t_zoom - self.zoom_x) * rate + self.zoom_x
- self.zoom_x=self.zoom_y *=KNS::SaveFileVocab::WHRATE###
- self.opacity = (@t_opacity - self.opacity) * rate + self.opacity
- end
- super
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.bitmap.clear
- black = Color.new(0,0,0)
- self.bitmap.font.out_color = black
- draw_ss_image
- self.bitmap.draw_text(4, 0, 200, 24, "")###
- draw_playtime(0, self.bitmap.height - 24, self.bitmap.width - 4, 2)
- draw_line_image(black)
- end
- def draw_ss_image
- header = DataManager.load_header(@file_index)
- bmp = Bitmap.by_hash(header[:screenshot]) rescue Cache.no_data_bitmap
- self.bitmap.blt(0, 0, bmp, bmp.rect)
- end
- #--------------------------------------------------------------------------
- # ● プレイ時間の描画
- #--------------------------------------------------------------------------
- def draw_playtime(x, y, width, align)
- header = DataManager.load_header(@file_index)
- return unless header
- self.bitmap.draw_text(x, y, width, 24, "", 2)###
- end
- def draw_line_image(color)
- rect = Rect.new(0,0,self.bitmap.width, 1)
- self.bitmap.fill_rect(rect, color)
- rect.y = self.bitmap.height - 1
- self.bitmap.fill_rect(rect, color)
- rect.y = 0
- rect.width = 1
- rect.height = self.bitmap.height
- self.bitmap.fill_rect(rect, color)
- rect.x = self.bitmap.width - 1
- self.bitmap.fill_rect(rect, color)
- end
- end
- #==============================================================================
- # ■ Scene_File
- #------------------------------------------------------------------------------
- # セーブ画面とロード画面の共通処理を行うクラスです。
- #==============================================================================
- class Scene_File
- #--------------------------------------------------------------------------
- # ● セーブファイルビューポートの作成
- #--------------------------------------------------------------------------
- def create_savefile_viewport
- @savefile_viewport = Viewport.new
- @savefile_viewport.z = 500
- h = 148
- @save_status = Window_SaveStatus.new(0,Graphics.height - h, Graphics.width, h)
- end
- #--------------------------------------------------------------------------
- # ● セーブファイル選択の更新
- #--------------------------------------------------------------------------
- def update
- super
- update_savefile_selection
- @savefile_sprites.each {|sprite| sprite.update }
- @a_now = (@a_now + 1) % a_max
- @arrow_sprite.y = @a_base_y + 5*Math.cos(Math::PI * @a_now / a_max.to_f * 2)
- end
- #--------------------------------------------------------------------------
- # ● カーソル位置が画面内になるようにスクロール
- #--------------------------------------------------------------------------
- def ensure_cursor_visible
- w = Graphics.width / 2
- @savefile_sprites.each_with_index do |sprite, i|
- j = -(@index - i)
- k = Math::PI * j / item_max.to_f * 2
- sprite.t_x = w * Math.sin(k) + w
- sprite.t_y = 40 * Math.cos(k) + 150
- n = item_max/2
- sprite.z = (n-(i - @index).abs).abs
- sprite.t_zoom = 1 + (sprite.z - n) / 15.0
- sprite.t_opacity = 255 * sprite.t_zoom
- sprite.count = 0
- end
- end
- #--------------------------------------------------------------------------
- # ● セーブファイルウィンドウの作成
- #--------------------------------------------------------------------------
- def create_savefile_windows
- create_arrow_sprite
- @savefile_sprites = Array.new(item_max) {|i| Sprite_SaveFile.new(@savefile_viewport, i) }
- end
- def create_arrow_sprite
- @a_now = 0
- @a_base_y = 80
- @arrow_sprite = Sprite.new(@savefile_viewport)
- @arrow_sprite.y = @a_base_y
- @arrow_sprite.z = 200
- name = KNS::SaveFileVocab::ArrowSprite
- if name
- @arrow_sprite.bitmap = Cache.system(name)
- w = @arrow_sprite.bitmap.width
- else
- w = 26
- @arrow_sprite.bitmap = Bitmap.new(w, w*2)
- red = Color.new(255, 255, 0)
- rect = Rect.new(0,0,0,2)
- w.times do |y|
- rect.x = y
- rect.y = y*2
- rect.width = w - y * 2
- @arrow_sprite.bitmap.fill_rect(rect,red)
- end
- end
- @arrow_sprite.x = (Graphics.width - w) / 2
- end
- def a_max
- return 180
- end
- #--------------------------------------------------------------------------
- # ● 選択状態の初期化
- #--------------------------------------------------------------------------
- def init_selection
- @index = first_savefile_index
- @save_status.refresh(@index)
- ensure_cursor_visible
- end
- #--------------------------------------------------------------------------
- # ● カーソルの更新
- #--------------------------------------------------------------------------
- def update_cursor
- last_index = @index
- cursor_down if Input.repeat?(:RIGHT)
- cursor_up if Input.repeat?(:LEFT)
- cursor_pagedown if Input.trigger?(:R)
- cursor_pageup if Input.trigger?(:L)
- if @index != last_index
- Sound.play_cursor
- @save_status.refresh(@index)
- ensure_cursor_visible
- end
- end
- #--------------------------------------------------------------------------
- # ● 終了処理
- #--------------------------------------------------------------------------
- def terminate
- super
- @arrow_sprite.bitmap.dispose
- @arrow_sprite.dispose
- @savefile_sprites.each do |sprite|
- sprite.bitmap.dispose
- sprite.dispose
- end
- end
- #--------------------------------------------------------------------------
- # ● カーソルを下に移動
- #--------------------------------------------------------------------------
- def cursor_down
- @index = (@index + 1) % item_max
- end
- #--------------------------------------------------------------------------
- # ● カーソルを上に移動
- #--------------------------------------------------------------------------
- def cursor_up
- @index = (@index - 1 + item_max) % item_max
- end
- #--------------------------------------------------------------------------
- # ● カーソルを 1 ページ後ろに移動
- #--------------------------------------------------------------------------
- def cursor_pagedown
- @index = (@index + item_max/2) % item_max
- end
- #--------------------------------------------------------------------------
- # ● カーソルを 1 ページ前に移動
- #--------------------------------------------------------------------------
- def cursor_pageup
- @index = (@index - item_max/2) % item_max
- end
- end
复制代码
|
评分
-
查看全部评分
|