/* * games/_shared/ - shared routines for games * * macros.h - basic macros definition * ____________________________________________________________ * * Developed by Ondrej Jombik * Copyright (c) 1997-2000 Condy software inc. * Copyright (c) 2001-2004 Platon SDG, http://platon.sk/ * All rights reserved. * * See README file for more information about this software. * See COPYING file for license information. * * Download the latest version from * http://platon.sk/projects/games/ */ /* $Platon: games/_shared/macros.h,v 1.2 2003/05/21 13:56:44 nepto Exp $ */ #ifndef __MACROS_H #define __MACROS_H /* INCLUDE */ /* TYPEDEF */ /* DEFINE */ #ifndef _abc_macros # define _abc_macros # ifndef max # define max(a,b) (((a)>(b))?(a):(b)) # endif # ifndef min # define min(a,b) (((a)<(b))?(a):(b)) # endif # define swap(a,b) {a+=b;b=a-b;a-=b;} # define putchxy(x,y,c) {gotoxy(x,y);putch(c);} # define putcharxy(x,y,c) {gotoxy(x,y);putchar(c);} # define putsxy(x,y,s) {gotoxy(x,y);puts(s);} # define cputsxy(x,y,s) {gotoxy(x,y);cputs(s);} #endif /* INTERFACE */ #endif