X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fmisc.c;fp=src%2Fmisc.c;h=e1badb59fd82a338d8ff30ff9836b400313f1342;hp=c32aa55515b13650e2ba97a7f21cdfd85c38def3;hb=36357e8399d0a42ac45a1cd096aee24a9008b5f5;hpb=8d46c5298f0fcce7bdb52f3835b2fbbdc403dfe0 diff --git a/src/misc.c b/src/misc.c index c32aa555..e1badb59 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1273,6 +1273,26 @@ void sortLevelDirInfo(struct LevelDirInfo **node_first, } } +inline void swap_numbers(int *i1, int *i2) +{ + int help = *i1; + + *i1 = *i2; + *i2 = help; +} + +inline void swap_number_pairs(int *x1, int *y1, int *x2, int *y2) +{ + int help_x = *x1; + int help_y = *y1; + + *x1 = *x2; + *x2 = help_x; + + *y1 = *y2; + *y2 = help_y; +} + /* ------------------------------------------------------------------------- */ /* the following is only for debugging purpose and normally not used */