2005.12.09 02:04

Dunky`s answer !

閲覧数 428 推奨数 0 コメント 0
?

Shortcut

Prev前へ 書き込み

Next次へ 書き込み

Larger Font Smaller Font 上へ 下へ Go comment 印刷
?

Shortcut

Prev前へ 書き込み

Next次へ 書き込み

Larger Font Smaller Font 上へ 下へ Go comment 印刷
window_savefile섹터의 내용을 지우고 대신 넣으세요.

#==============================================================================
# ■ Window_SaveFile
#------------------------------------------------------------------------------
#  セーブ画面およびロード画面で表示する、セーブファイルのウィンドウです。
#==============================================================================

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_reader   :filename                 # ファイル名
  attr_reader   :selected                 # 選択状態
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     file_index : セーブファイルのインデックス (0~3)
  #     filename   : ファイル名
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    super(0, 64 + file_index % 4 * 104, 640, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # ファイル番号を描画
    self.contents.font.color = normal_color
    name = "~파일 #{@file_index + 1}"
    self.contents.draw_text(4, 0, 600, 32, name)
    @name_width = contents.text_size(name).width
    # セーブファイルが存在する場合
    if @file_exist
      # キャラクターを描画
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 300 - @characters.size * 32 + i * 64 - cw / 2
        self.contents.blt(x, 68 - ch, bitmap, src_rect)
      end
      # プレイ時間を描画
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 8, 600, 32, time_string, 2)
      # タイムスタンプを描画
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      self.contents.draw_text(4, 40, 600, 32, time_string, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 選択状態の設定
  #     selected : 新しい選択状態 (true=選択 false=非選択)
  #--------------------------------------------------------------------------
  def selected=(selected)
    @selected = selected
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # ● カーソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @selected
      self.cursor_rect.set(0, 0, @name_width + 8, 32)
    else
      self.cursor_rect.empty
    end
  end

end









scene_save 섹터의 내용을 지우고 넣으세요.

#==============================================================================
# ■ Scene_Save
#------------------------------------------------------------------------------
#  세이브 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super("세이브할 장소는?")
  end
  #--------------------------------------------------------------------------
  # ● 결정시의 처리
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # 세이브 SE 를 연주
    $game_system.se_play($data_system.save_se)
    # 세이브 데이터의 기입
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    # 이벤트로부터 불려 가고 있는 경우
    if $game_temp.save_calling
      # 세이브 호출 플래그를 클리어
      $game_temp.save_calling = false
      # 맵 화면으로 전환해
      $scene = Scene_Map.new
      return
    end
    # 메뉴 화면으로 전환해
    $scene = Scene_Menu.new(4)
  end
  #--------------------------------------------------------------------------
  # ● 캔슬시의 처리
  #--------------------------------------------------------------------------
  def on_cancel
    # 캔슬 SE 를 연주
    $game_system.se_play($data_system.cancel_se)
    # 이벤트로부터 불려 가고 있는 경우
    if $game_temp.save_calling
      # 세이브 호출 플래그를 클리어
      $game_temp.save_calling = false
      # 맵 화면으로 전환해
      $scene = Scene_Map.new
      return
    end
    # 메뉴 화면으로 전환해
    $scene = Scene_Menu.new(4)
  end
  #--------------------------------------------------------------------------
  # ● 세이브 데이터의 기입
  #     file : 기입용 파일 오브젝트 (오픈이 끝난 상태)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    # 세이브 파일 묘화용의 캐릭터 데이터를 작성
    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      characters.push([actor.character_name, actor.character_hue])
    end
    # 세이브 파일 묘화용의 캐릭터 데이터를 쓴다
    Marshal.dump(characters, file)
    # 플레이 시간 계측용의 프레임 카운트를 쓴다
    Marshal.dump(Graphics.frame_count, file)
    # 세이브 회수를 1 늘린다
    $game_system.save_count += 1
    # magic number-를 보존한다
    # (에디터로 보존할 때마다 랜덤인 값에 고쳐 쓸 수 있다)
    $game_system.magic_number = $data_system.magic_number
    # 각종 게임 오브젝트를 쓴다
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
  end
end







다음은 scene_load 섹터에 넣으세요. 기존의 내용은 지우세요.

#==============================================================================
# ■ Scene_Load
#------------------------------------------------------------------------------
#  ロード画面の処理を行うクラスです。
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    # テンポラリオブジェクトを再作成
    $game_temp = Game_Temp.new
    # タイムスタンプが最新のファイルを選択
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("어떤 데이터를 로드하겠습니까?")
  end
  #--------------------------------------------------------------------------
  # ● 決定時の処理
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # ファイルが存在しない場合
    unless FileTest.exist?(filename)
      # ブザー SE を演奏
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    # ロード SE を演奏
    $game_system.se_play($data_system.load_se)
    # セーブデータの書き込み
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # BGM、BGS を復帰
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # マップを更新 (並列イベント実行)
    $game_map.update
    # マップ画面に切り替え
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # ● キャンセル時の処理
  #--------------------------------------------------------------------------
  def on_cancel
    # キャンセル SE を演奏
    $game_system.se_play($data_system.cancel_se)
    # タイトル画面に切り替え
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # ● セーブデータの読み込み
  #     file : 読み込み用ファイルオブジェクト (オープン済み)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    # セーブファイル描画用のキャラクターデータを読み込む
    characters = Marshal.load(file)
    # プレイ時間計測用のフレームカウントを読み込む
    Graphics.frame_count = Marshal.load(file)
    # 各種ゲームオブジェクトを読み込む
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    # マジックナンバーがセーブ時と異なる場合
    # (エディタで編集が加えられている場合)
    if $game_system.magic_number != $data_system.magic_number
      # マップをリロード
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    # パーティメンバーをリフレッシュ
    $game_party.refresh
  end
end


?

  1. @brrsim_7텔레그램 선불유심내구제 급전 뽀로로통신 선불유심매입 뽀로로통신 선불유심현금화하는업체 선불유심구매 간편무서류소액급전

    Date2026.07.07 By선불유심내구제뽀로로통신 Views85
    Read More
  2. 선불유심내구제 텔레그램@brrsim_7 선불유심매입 선불유심구매 뽀로로통신 급전 대학생내구제 비상금 연체자바로소액급전 주말소액급전

    Date2026.07.07 By선불유심내구제뽀로로통신 Views115
    Read More
  3. @brrsim_7텔레그램 선불유심내구제 선불유심매입 선불폰내구제 뽀로로통신 급전 선불유심현금화하는업체 선불유심구매 무직신불자소액급전

    Date2026.07.07 By선불유심내구제뽀로로통신 Views86
    Read More
  4. 선불유심내구제 텔레그램@brrsim_7 급전 선불유심매입 뽀로로통신 청년비상금급전 내구제소액 소액급전 정식업체 선불유심구매

    Date2026.07.07 By선불유심내구제뽀로로통신 Views105
    Read More
  5. 선불유심내구제 텔레그램@brrsim_7 뽀로로통신 급전 선불유심매입 신불자소액내구제 연체자바로소액급전 선불유심구매 바로모바일급전

    Date2026.07.07 By선불유심내구제뽀로로통신 Views102
    Read More
  6. 선불유심삽니다 텔레그램@brrsim_7 선불유심내구제 뽀로로통신 선불유심매입 선불유심구매 소액내구제 급전 연체대납 바로소액급전 법인소액작업급전

    Date2026.07.07 By선불유심내구제뽀로로통신 Views110
    Read More
  7. @brrsim_7텔레그램 선불폰유심내구제 선불유심매입 뽀로로통신 급전 선불유심내구제 급전해결내구제 선불유심현금화하는업체 선불유심구매 바로무직자급전

    Date2026.07.07 By선불유심내구제뽀로로통신 Views87
    Read More
  8. 선불유심매입 텔레그램@brrsim_7 선불유심내구제 뽀로로통신 바로소액내구제급전 선불유심구매 급전 선불유심매입 바로소액급전 무서류무방문급전

    Date2026.07.07 By선불유심내구제뽀로로통신 Views109
    Read More
  9. @brrsim_7텔레그램 선불유심내구제 선불유심매입 뽀로로통신 급전 선불유심현금화하는업체 선불유심구매 백수바로급전내구제

    Date2026.07.07 By선불유심내구제뽀로로통신 Views111
    Read More
  10. 선불유심내구제 텔레그램@brrsim_7 선불유심매입 뽀로로통신 소액급전내구제 급전 연체자바로소액급전 선불유심구매 대학생용돈

    Date2026.07.07 By선불유심내구제뽀로로통신 Views104
    Read More
  11. @brrsim_7텔레그램 선불유심내구제 뽀로로통신 급전 선불유심매입 유심현금화하는업체 무직비상금바로급전 선불유심구매

    Date2026.07.07 By선불유심내구제뽀로로통신 Views89
    Read More
  12. 선불유심내구제 정식업체 텔레그램@brrsim_7선불유심매입 뽀로로통신 소상공인긴급생활안정자금 급전 선불유심구매 선불유심내구제 소액급전대출 바로신불급전가능

    Date2026.07.07 By선불유심내구제뽀로로통신 Views86
    Read More
  13. @brrsim_7텔레그램 선불유심매입 선불유심내구제 뽀로로통신 선불유심현금화하는업체 프리랜서소액급전 선불폰유심매입합니다 급전 선불유심구매 바로정산

    Date2026.07.07 By선불유심내구제뽀로로통신 Views102
    Read More
  14. @brrsim_7텔레그램 선불유심내구제 선불유심매입 뽀로로통신 급전 선불유심현금화하는업체 선불유심구매 백수바로급전내구제

    Date2026.07.06 By선불유심내구제뽀로로통신 Views139
    Read More
  15. 쯔꾸르 mv 게임을 apk 파일로 변환했는데...

    Date2023.01.14 By박하맛 Views2257
    Read More
  16. 쯔꾸르 젖소이야기 결혼 방법좀 알려주세요...

    Date2021.12.20 By백지씨 Views3711
    Read More
  17. apk포팅 승인 어케 하나요?

    Date2021.11.29 Bygame메이커xp Views2137
    Read More
  18. Yanfly님의 Action Sequence Pack 질문드립니다

    Date2021.07.15 ByNeuromancer Views2676
    Read More
  19. 싸게 MV 를 먼저? 아니면 돈을 더 들어서라도 MZ?

    Date2021.07.06 ByXatra Views2922
    Read More
  20. RMMV - 스탯창과 대화창 변견 관련 질문입니다. (초보입니다 도움좀 주세요 ㅜㅜ)

    Date2021.01.22 Byscribble Views2507
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 443 Next
/ 443