This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Save script as asm/maps/compare.py | |
| # Then run | |
| # python compare.py map0_s01 map0_s02 0 | |
| # This will compare line count between files in each maps nonmatchings folder | |
| # For each pair that matches it removes comments & data/func refs and uses Levenshtein to compare them | |
| # Last param is max distance to show, use 0 to get exact matches, but can tweak it to find others if wanted. | |
| # (since this only works with asm files in nonmatchings folder, it can't compare map0_s00 since we've matched some of them) | |
| import os | |
| import re | |
| import Levenshtein |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Save script as asm/maps/compare.py | |
| # Then run | |
| # python compare.py map0_s01 map0_s02 | |
| # This compares matching funcs in first maps matchings folder against nonmatchings in the second map | |
| # For each pair that matches it removes comments & data/func refs and uses Levenshtein to compare them | |
| # Funcs with distance 0 Levenshtein score will then be printed, along with lines to use in symbols.txt & #include lines to add to .c | |
| import os | |
| import re | |
| import Levenshtein |
OlderNewer