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
| class Jour_heure < Window_Base
def initialize
super(440, 420, 200, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 150
@heure = 0
@ext_ton = true
self.visible = true
$exterieur = true
refresh
end
def refresh
if Input.trigger?(Input::L)
self.visible = ! self.visible
end
@horloge = Time.new
@seconde = @horloge.sec * Graphics.frame_rate
self.contents.clear
case @horloge.strftime("%A")
when "Monday"
jour = "Lundi"
when "Tuesday"
jour = "Mardi"
when "Wednesday"
jour = "Mercredi"
when "Thursday"
jour = "Jeudi"
when "Friday"
jour = "Vendredi"
when "Saturday"
jour = "Samedi"
when "Sunday"
jour = "Dimanche"
end
text = sprintf("%02d:%02d:%02d ",@horloge.hour, @horloge.min, @horloge.sec)
self.contents.draw_text(0, 0, 200, 24,text + jour)
@map = load_data(sprintf("Data/Map%03d.rxdata", $game_map.map_id))
end
def update
refresh
if @heure != @horloge.hour or @ext_ton != $exterieur
@ext_ton = $exterieur
@heure = @horloge.hour
changement_ton
end
end
def changement_ton
if $exterieur
case @horloge.hour
when 0
@tone = Tone.new(-100, -100, -100, 0)
$game_screen.start_tone_change(@tone,10)
when 1
@tone = Tone.new(-100, -100, -100, 0)
$game_screen.start_tone_change(@tone,10)
when 2
@tone = Tone.new(-100, -100, -100, 0)
$game_screen.start_tone_change(@tone,10)
when 3
@tone = Tone.new(-90, -90, -90, 0)
$game_screen.start_tone_change(@tone,10)
when 4
@tone = Tone.new(-80, -80, -80, 0)
$game_screen.start_tone_change(@tone,10)
when 5
@tone = Tone.new(-60, -60, -60, 0)
$game_screen.start_tone_change(@tone,10)
when 6
@tone = Tone.new(-30, -30, -30, 0)
$game_screen.start_tone_change(@tone,10)
when 7
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 8
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 9
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 10
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 11
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 12
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 13
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 14
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 15
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 16
@tone = Tone.new(50, 20, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 17
@tone = Tone.new(50, 30, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 18
@tone = Tone.new(50, 40, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 19
@tone = Tone.new(-5, -5, -5, 0)
$game_screen.start_tone_change(@tone,10)
when 20
@tone = Tone.new(-20, -20, -20, 0)
$game_screen.start_tone_change(@tone,10)
when 21
@tone = Tone.new(-40, -40, -40, 0)
$game_screen.start_tone_change(@tone,10)
when 22
@tone = Tone.new(-60, -60, -60, 0)
$game_screen.start_tone_change(@tone,10)
when 23
@tone = Tone.new(-80, -80, -80, 0)
$game_screen.start_tone_change(@tone,10)
end
else
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
end
end
end
class Scene_Save
alias old_write_save_data write_save_data
def write_save_data(file)
old_write_save_data(file)
Marshal.dump($exterieur, file)
end
end
class Scene_Load
alias old_read_save_data read_save_data
def read_save_data(file)
old_read_save_data(file)
$exterieur = Marshal.load(file)
end
end
class Scene_Map
alias old_main main
def main
@jh = Jour_heure.new
old_main
@jh.dispose
end
alias old_update update
def update
@jh.update
old_update
end
end |