3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
8 #include "codecutils.h"
13 int transform_mapping_or_direct(const int *mapping, unsigned map_size, int ch, bool reverse)
15 for(unsigned i=0; i<map_size*2; i+=2)
17 if(mapping[i+reverse]==ch)
18 return mapping[i+1-reverse];
19 else if(mapping[i+1-reverse]==ch)