1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/lxdream.h Wed Oct 31 11:53:35 2007 +0000
1.5 + * $Id: lxdream.h,v 1.1 2007-10-31 09:10:23 nkeynes Exp $
1.7 + * Common type definitions and forward declarations
1.9 + * Copyright (c) 2005 Nathan Keynes.
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.22 +#ifndef lxdream_common_H
1.23 +#define lxdream_common_H 1
1.25 +#include <stdint.h>
1.26 +#include <glib/gtypes.h>
1.32 +#define APP_NAME "lxDream"
1.33 +#define APP_VERSION "0.8"
1.35 +#define MB *1024*1024
1.39 +#define max(a,b) ( (a) > (b) ? (a) : (b) )
1.43 +typedef uint32_t sh4addr_t;
1.45 +/******************* Forward type declarations ******************/
1.47 +typedef struct render_buffer *render_buffer_t;
1.48 +typedef struct frame_buffer *frame_buffer_t;
1.50 +/*************************** Logging ****************************/
1.52 +#define EMIT_FATAL 0
1.54 +#define EMIT_WARN 2
1.55 +#define EMIT_INFO 3
1.56 +#define EMIT_DEBUG 4
1.57 +#define EMIT_TRACE 5
1.60 +#define MODULE_NAME MODULE.name
1.62 +#define MODULE_NAME "*****"
1.65 +void log_message( void *, int level, const char *source, const char *msg, ... );
1.67 +#define FATAL( ... ) log_message( NULL, EMIT_FATAL, MODULE_NAME, __VA_ARGS__ )
1.68 +#define ERROR( ... ) log_message( NULL, EMIT_ERR, MODULE_NAME, __VA_ARGS__ )
1.69 +#define WARN( ... ) log_message( NULL, EMIT_WARN, MODULE_NAME, __VA_ARGS__ )
1.70 +#define INFO( ... ) log_message( NULL, EMIT_INFO, MODULE_NAME, __VA_ARGS__ )
1.71 +#define DEBUG( ... ) log_message( NULL, EMIT_DEBUG, MODULE_NAME, __VA_ARGS__ )
1.72 +#define TRACE( ... ) log_message( NULL, EMIT_TRACE, MODULE_NAME, __VA_ARGS__ )
1.80 +#endif /* !lxdream_common_H */