~ubuntu-branches/ubuntu/raring/simutrans/raring-proposed

« back to all changes in this revision

Viewing changes to dataobj/ribi.h

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2011-11-03 19:59:02 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20111103195902-uopgwf488mfctb75
Tags: 111.0-1
* New upstream release.
* debian/rules: Update get-orig-source target for new upstream release.
* Use xz compression for source and binary packages.
* Use override_* targets to simplify debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
        // Alle Abfragen �ber statische Tabellen wg. Performance
170
170
        // Ranges werden nicht gepr�ft!
171
171
        //
172
 
        static ribi doppelt(ribi x) { return doppelr[x]; }
173
 
        static ribi rueckwaerts(ribi x) { return rwr[x]; }
174
 
        static ribi get_forward(ribi x) { return fwrd[x]; }     // all ribis, that are in front of this thing
175
 
        static ribi rotate90(ribi x) { return ((x&8) ? 1|((x<<1)&0x0E) : x<<1); }
176
 
 
177
172
        static bool is_twoway(ribi x) { return (flags[x]&twoway)!=0; }
178
173
        static bool is_threeway(ribi x) { return (flags[x]&threeway)!=0; }
179
174
 
186
181
        static bool ist_gerade_ow(ribi x) { return (flags[x] & gerade_ow) != 0; }
187
182
        static bool ist_kreuzung(ribi x) { return x > 0 && flags[x] == 0; }
188
183
 
 
184
        static ribi doppelt(ribi x) { return doppelr[x]; }
 
185
        static ribi rueckwaerts(ribi x) { return rwr[x]; }
 
186
        static ribi get_forward(ribi x) { return fwrd[x]; }     // all ribis, that are in front of this thing
 
187
        static ribi rotate90(ribi x) { return ((x&8) ? 1|((x<<1)&0x0E) : x<<1); } // 90 to the right
 
188
        static ribi rotate90l(ribi x) { return ((x&1) ? 8|(x>>1) : x>>1); } // 90 to the left
 
189
        static ribi rotate45(ribi x) { return (ist_einfach(x) ? x|rotate90(x) : x&rotate90(x)); } // 45 to the right
 
190
        static ribi rotate45l(ribi x) { return (ist_einfach(x) ? x|rotate90l(x) : x&rotate90l(x)); } // 45 to the left
 
191
 
189
192
        static dir get_dir(ribi x) { return dirs[x]; }
190
193
};
191
194