Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ■ Better Autoshadow Removal by Neonblack
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # This scriptlet removes your game's autoshadows that is also reflected on the
- # game editor itself! Just close your project and reopen after test playing your
- # game.
- #==============================================================================
- module MapInfo
- def self.begin
- return unless $TEST
- @mapinfo = mapinfo
- remove_autoshadows
- end
- def self.mapinfo
- load_data("Data/MapInfos.rvdata2")
- end
- def self.remove_autoshadows
- return unless @mapinfo
- @mapinfo.keys.each do |map_id|
- map = load_map(map_id)
- map.width.times do |x|
- map.height.times do |y|
- remove = map.data[x, y, 3] & 0b1111
- map.data[x, y, 3] -= remove
- end
- end
- save_map(map, map_id)
- end
- end
- def self.load_map(map_id)
- load_data(sprintf("Data/Map%03d.rvdata2", map_id))
- end
- def self.save_map(map, map_id)
- save_data(map, sprintf("Data/Map%03d.rvdata2", map_id))
- end
- end
- MapInfo.begin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement