/* ** BETATRON high level library for platform and action arcade games. ** Copyright (C) 1997 Liouros Thanasis, liouros@hotmail.com ** ** DEFINES.H: This file is part of the BETATRON library and can be used ** and/or distributed only under the terms of the GNU Library ** General Public License. See doc/readme.1st for details. */ #ifndef pl_defines_h #define pl_defines_h #define ERRORSTRINGSNO 38 // always x must be a negative number #define ERRSTRING(x) pl_errorstrings[ ( (-(x))>ERRORSTRINGSNO?ERRORSTRINGSNO:(-(x)) )] // If x<0 prints the error code x and exits #define CHECK(x) { long ___err; if ((___err=(x))<0) { printf("ERR: %d, line %d, check '",___err,__LINE__); printf(#x); printf("'\nERR: '%s'\n",ERRSTRING(___err)); exit(1);}} #define swaplongs(a,b)\ { long ____w; ____w=(a); (a)=(b); (b)=____w; } // these values represent the scrolling limit in each direction // in powers of 2 and can take the values 2,3,4. Currently they are // set to 4 which mean 16 pixels/frame scrolling limit in each direction // A lower limit means lower overhead when a new part of the world has to // be drawn due to scrolling. #define SCROLLCOLLEN2 4 #define SCROLLROWHEI2 4 #define SCROLLCOLLEN (1<x21) x21= (x11);\ if ( (y11) >y21) y21= (y11);\ if ( (x12) x21) { x21= (x11); (res2)=0; };\ if ( (y11) >y21) { y21= (y11); (res2)=0; };\ if ( (x12)