source: abuse/trunk/src/imlib/macs.h @ 494

Last change on this file since 494 was 494, checked in by Sam Hocevar, 10 years ago

style: remove trailing spaces, fix copyright statements.

  • Property svn:keywords set to Id
File size: 997 bytes
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com or
8 *  Jonathan Clark.
9 */
10
11#ifndef MACS__
12#define MACS__
13#include "system.h"
14#include <stdio.h>
15#define ERROR(x,st) { if (!(x)) \
16   { printf("Error on line %d of %s : %s\n", \
17     __LINE__,__FILE__,st); exit(1); } }
18
19// These macros should be removed for the non-debugging version
20#ifdef NO_CHECK
21#define CONDITION(x,st)
22#define CHECK(x)
23#else
24#define CONDITION(x,st) ERROR(x,st)
25#define CHECK(x) CONDITION(x,"Check stop");
26#endif
27
28static inline int Min(int a, int b) { return a < b ? a : b; }
29static inline int Max(int a, int b) { return a > b ? a : b; }
30static inline float Min(float a, float b) { return a < b ? a : b; }
31static inline float Max(float a, float b) { return a > b ? a : b; }
32
33#endif
Note: See TracBrowser for help on using the repository browser.