class Game_Map
def batch_check_event(start_x, start_y, width, height)
end_x = start_x + width
end_y = start_y + height
if start_x > end_x
start_x = start_x^end_x
end_x = end_x^start_x
start_x = start_x^end_x
end
if start_y > end_y
start_y = start_y^end_y
end_y = end_y^start_y
start_y = start_y^end_y
end
for x in start_x .. end_x
for y in start_y .. end_y
return true if $game_map.check_event(x, y).is_a? Integer
end
end
return false
end
end
class Game_Map
def batch_check_event(start_x, start_y, width, height)
end_x = start_x + width
end_y = start_y + height
if start_x > end_x
start_x = start_x^end_x
end_x = end_x^start_x
start_x = start_x^end_x
end
if start_y > end_y
start_y = start_y^end_y
end_y = end_y^start_y
start_y = start_y^end_y
end
for x in start_x .. end_x
for y in start_y .. end_y
return true if $game_map.check_event(x, y).is_a? Integer
end
end
return false
end
end