module GameTime
def self.init
$game_time = 0
$game_time_surface = $game_map.effect_surface
end
def self.tint(tint = 60)
if USE_TINT != true then return end
for i in NOTINTMAPS
if $game_map.map_id == i
$game_map.effect_surface.change_color(0,10,10,10,25)
return
end
end
if SceneManager::scene_is?(Scene_Map) then else return end
case $game_time
when PRESUNRISE_TIME .. SUNRISE_TIME
$game_map.effect_surface.change_color(tint,PRESUNRISE_TONE.red,PRESUNRISE_TONE.green,PRESUNRISE_TONE.blue,PRESUNRISE_TONE.gray)
when SUNRISE_TIME .. NOONSTART_TIME
$game_map.effect_surface.change_color(tint,SUNRISE_TONE.red,SUNRISE_TONE.green,SUNRISE_TONE.blue,SUNRISE_TONE.gray)
when NOONSTART_TIME .. NOONEND_TIME
$game_map.effect_surface.change_color(tint,NOONSTART_TONE.red,NOONSTART_TONE.green,NOONSTART_TONE.blue,NOONSTART_TONE.gray)
when NOONEND_TIME .. PRESUNSET_TIME
$game_map.effect_surface.change_color(tint,NOONEND_TONE.red,NOONEND_TONE.green,NOONEND_TONE.blue,NOONEND_TONE.gray)
when PRESUNSET_TIME .. SUNSET_TIME
$game_map.effect_surface.change_color(tint,PRESUNSET_TONE.red,PRESUNSET_TONE.green,PRESUNSET_TONE.blue,PRESUNSET_TONE.gray)
when SUNSET_TIME .. 1440
$game_map.effect_surface.change_color(tint,SUNSET_TONE.red,SUNSET_TONE.green,SUNSET_TONE.blue,SUNSET_TONE.gray)
when 0 .. MIDNIGHT_TIME
$game_map.effect_surface.change_color(tint,SUNSET_TONE.red,SUNSET_TONE.green,SUNSET_TONE.blue,SUNSET_TONE.gray)
when MIDNIGHT_TIME .. PRESUNRISE_TIME
$game_map.effect_surface.change_color(tint,MIDNIGHT_TONE.red,MIDNIGHT_TONE.green,MIDNIGHT_TONE.blue,MIDNIGHT_TONE.gray)
end
end
end