From 51137b1fb6a8be693a3236ec6c18f3600e21e15d Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 28 Aug 2016 18:34:06 +0200 Subject: [PATCH] Add script to count globals in use --- scripts/stats/count-rct-globals.php | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 scripts/stats/count-rct-globals.php diff --git a/scripts/stats/count-rct-globals.php b/scripts/stats/count-rct-globals.php new file mode 100755 index 0000000000..5e28655580 --- /dev/null +++ b/scripts/stats/count-rct-globals.php @@ -0,0 +1,47 @@ +#!/usr/bin/env php + $c) { + printf("%s\t%d\t%s\n", $name, $c, implode(", ", array_unique($addressFiles[$name]))); + } + + echo "\n"; +} + + +printf("Found %d usages of RCT2_ADDRESS and RCT2_GLOBAL (%d distinct)\n", $totalCount, count($count));