4 * Common type definitions and forward declarations
6 * Copyright (c) 2005 Nathan Keynes.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
19 #ifndef lxdream_common_H
20 #define lxdream_common_H 1
23 #include <glib/gtypes.h>
25 #include "../config.h"
31 #define APP_NAME "lxDream"
32 #define APP_VERSION "0.8.3"
38 #define max(a,b) ( (a) > (b) ? (a) : (b) )
42 * A 29-bit address in SH4 external address space
44 typedef uint32_t sh4addr_t;
47 * A 32-bit address in SH4 virtual address space.
49 typedef uint32_t sh4vma_t;
52 * A direct pointer into SH4 memory
54 typedef unsigned char *sh4ptr_t;
56 /******************* Forward type declarations ******************/
58 typedef struct render_buffer *render_buffer_t;
59 typedef struct frame_buffer *frame_buffer_t;
61 /*************************** Logging ****************************/
71 #define MODULE_NAME MODULE.name
73 #define MODULE_NAME "*****"
76 gboolean set_global_log_level( const gchar *level );
77 void log_message( void *, int level, const char *source, const char *msg, ... );
79 #define FATAL( ... ) log_message( NULL, EMIT_FATAL, MODULE_NAME, __VA_ARGS__ )
80 #define ERROR( ... ) log_message( NULL, EMIT_ERR, MODULE_NAME, __VA_ARGS__ )
81 #define WARN( ... ) log_message( NULL, EMIT_WARN, MODULE_NAME, __VA_ARGS__ )
82 #define INFO( ... ) log_message( NULL, EMIT_INFO, MODULE_NAME, __VA_ARGS__ )
83 #define DEBUG( ... ) log_message( NULL, EMIT_DEBUG, MODULE_NAME, __VA_ARGS__ )
84 #define TRACE( ... ) log_message( NULL, EMIT_TRACE, MODULE_NAME, __VA_ARGS__ )
92 #endif /* !lxdream_common_H */
.