equal
deleted
inserted
replaced
129 |
129 |
130 static uint SlGetGammaLength(uint i) { |
130 static uint SlGetGammaLength(uint i) { |
131 return (i>=0x80) ? 2 : 1; |
131 return (i>=0x80) ? 2 : 1; |
132 } |
132 } |
133 |
133 |
134 inline int SlReadSparseIndex(void) |
134 static inline int SlReadSparseIndex(void) |
135 { |
135 { |
136 return SlReadSimpleGamma(); |
136 return SlReadSimpleGamma(); |
137 } |
137 } |
138 |
138 |
139 inline void SlWriteSparseIndex(uint index) |
139 static inline void SlWriteSparseIndex(uint index) |
140 { |
140 { |
141 SlWriteSimpleGamma(index); |
141 SlWriteSimpleGamma(index); |
142 } |
142 } |
143 |
143 |
144 inline int SlReadArrayLength(void) |
144 static inline int SlReadArrayLength(void) |
145 { |
145 { |
146 return SlReadSimpleGamma(); |
146 return SlReadSimpleGamma(); |
147 } |
147 } |
148 |
148 |
149 inline void SlWriteArrayLength(uint length) |
149 static inline void SlWriteArrayLength(uint length) |
150 { |
150 { |
151 SlWriteSimpleGamma(length); |
151 SlWriteSimpleGamma(length); |
152 } |
152 } |
153 |
153 |
154 void SlSetArrayIndex(uint index) |
154 void SlSetArrayIndex(uint index) |
239 length--; |
239 length--; |
240 } |
240 } |
241 } |
241 } |
242 } |
242 } |
243 |
243 |
244 void SlSkipBytes(size_t length) |
244 static void SlSkipBytes(size_t length) |
245 { |
245 { |
246 while (length) { |
246 while (length) { |
247 SlReadByte(); |
247 SlReadByte(); |
248 length--; |
248 length--; |
249 } |
249 } |
923 } |
923 } |
924 |
924 |
925 return 0; |
925 return 0; |
926 } |
926 } |
927 |
927 |
928 void *IntToReference(uint r, uint t) |
928 static void *IntToReference(uint r, uint t) |
929 { |
929 { |
930 /* From version 4.3 REF_VEHICLE_OLD is saved as REF_VEHICLE, and should be loaded |
930 /* From version 4.3 REF_VEHICLE_OLD is saved as REF_VEHICLE, and should be loaded |
931 like that */ |
931 like that */ |
932 if (t == REF_VEHICLE_OLD && |
932 if (t == REF_VEHICLE_OLD && |
933 _sl.full_version >= 0x404) |
933 _sl.full_version >= 0x404) |