-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRS_FaceImageForSaving.rb
49 lines (44 loc) · 1.59 KB
/
RS_FaceImageForSaving.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#================================================================
# The MIT License
# Copyright (c) 2020 biud436
# ---------------------------------------------------------------
# Free for commercial and non commercial use.
#================================================================
#==============================================================================
# ** RS_FaceImageForSaving
# Author : biud436
# Date : 2014.10.30
# Version : 1.0
# Update Log :
# 2017.04.18 :
# -dest_rect 수정
#==============================================================================
# ** Terms of Use
#==============================================================================
# Free for commercial and non-commercial use
#==============================================================================
$imported = {} if $imported.nil?
$imported["RS_FaceImageForSaving"] = true
class Window_SaveFile
def draw_face(face_name, face_index, x, y, enabled = true)
bitmap = Cache.face(face_name)
src_rect = Rect.new(face_index % 4 * 96,face_index / 4 * 96, 96, 96)
dest_rect = Rect.new(x, 0, 76, 76)
contents.stretch_blt(dest_rect, bitmap, src_rect)
bitmap.dispose
end
def draw_party_characters(x, y)
header = DataManager.load_header(@file_index)
return unless header
header[:characters].each_with_index do |data, i|
draw_face(data[0], data[1], x + i * 78, y)
end
end
end
class Game_Party
def characters_for_savefile
battle_members.collect do |actor|
[actor.face_name , actor.face_index]
end
end
end