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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
| #Texte
CREDITS_FONT = "Times New Roman"# Mettre à la place de "Times new Roman" le nom de la police d'écriture.
CREDITS_SIZE = 24#Taille du texte
CREDITS_OUTLINE = Color.new(0,0,127, 255)#Couleur ligne
CREDITS_SHADOW = Color.new(0,0,0, 100)#Couleur de l'ombre ?
CREDITS_FILL = Color.new(255,255,255, 255)#Couleur des files ?
#==============================================================================
# ¦ Scene_Credits
#------------------------------------------------------------------------------
# Ce script est une modification d'un script pour RPG maker XP
#------------------------------------------------------------------------------
# It now uses pictures from the pictures folder instead of titles from the
# titles folder.
#------------------------------------------------------------------------------
# This script might need the RMXP to RMVX Compatibility Patch avialble at RPG
# Maker.net
#------------------------------------------------------------------------------
# Edité par Mac Malone (Dr.?)
# XP Version: Oringinal Author unknow, but edidted by MiDas Mike so it doesn't
# play over the Title, but runs by calling the following:
# $scene = Scene_Credits.new
#==============================================================================
class Scene_Credits
# This next piece of code is the credits.
#Start Editing
CREDIT=<<_END_
NOM DU PROJET
Directeur
---------------
Scripts
---------------
Graphistes
---------------
Musiques et effets sonores
---------------
Mapping
---------------
Scénario
---------------
Testeur de la version Beta
---------------
Remerciements spéciaux
---------------
---------------
_END_
#Stop Editing
def main
#-------------------------------
# Animated Background Setup
#-------------------------------
@sprite = Sprite.new
#@sprite.bitmap = Cache.picture($data_system.title_name)
@backgroundList = ["001-Title01"] #Edit this to the picture(s) you wish to show in the background. They do repeat.
@backgroundGameFrameCount = 0
# Number of game frames per background frame.
@backgroundG_BFrameCount = 3.4
@sprite.bitmap = Cache.picture(@backgroundList[0])
#------------------
# Credits Setup
#------------------
credit_lines = CREDIT.split(/§/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
credit_bitmap.font.name = CREDITS_FONT
credit_bitmap.font.size = CREDITS_SIZE
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
#--------
# Setup
#--------
# ME?BGS ??????
Audio.me_stop
Audio.bgs_stop
Audio.se_stop
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end
#Checks if credits bitmap has reached it's ending point
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count >= 300
$scene = Scene_Map.new
end
end
#Check if the credits should be cancelled
def cancel?
if Input.trigger?(Input::C)
$scene = Scene_Map.new
return true
end
return false
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
# Add current background frame to the end
@backgroundList = @backgroundList << @backgroundList[0]
# and drop it from the first position
@backgroundList.delete_at(0)
@sprite.bitmap = Cache.picture(@backgroundList[0])
end
return if cancel?
last if last?
@credit_sprite.oy += 1
end
end |