]> rtime.felk.cvut.cz Git - CanFestival-3.git/blobdiff - objdictgen/node.py
Bug on map variable type changing and on comments with special characters corrected
[CanFestival-3.git] / objdictgen / node.py
index ddbe7683150a2902ab2130d062ce20fe3536afb2..b74578d0b647a4bdd0ce8b242e217b7a4b820e6d 100755 (executable)
@@ -582,6 +582,18 @@ class Node:
                     if (value & mask) == model:
                         self.Dictionary[i][j] = 0
     
+    def UpdateMapVariable(self, index, subIndex, size):
+        model = index << 16
+        mask = 0xFFFF << 16
+        if subIndex:
+            model += subIndex << 8
+            mask = 0xFF << 8
+        for i in self.Dictionary.iterkeys():
+            if 0x1600 <= i <= 0x17FF or 0x1A00 <= i <= 0x1BFF:
+                for j,value in enumerate(self.Dictionary[i]):
+                    if (value & mask) == model:
+                        self.Dictionary[i][j] = model + size
+    
     def RemoveLine(self, index, max, incr = 1):
         i = index
         while i < max and self.IsEntry(i + incr):