private int MapCapnum(int capnum) { if (capnum == -1) return -1; if (_caps != null) return (int)_caps[capnum]; else return capnum; }