filename | src/lxdream.h |
changeset | 477:9a373f2ff009 |
next | 502:c4ecae2b1b5e |
author | nkeynes |
date | Wed Oct 31 09:10:23 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Add save/restore of render buffers in save states Gzip memory blocks in save states Move front-buffer management back to pvr2 Add screenshot preview when loading save states Various minor fixes and cleanups |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/lxdream.h Wed Oct 31 09:10:23 2007 +00001.3 @@ -0,0 +1,77 @@1.4 +/**1.5 + * $Id: lxdream.h,v 1.1 2007-10-31 09:10:23 nkeynes Exp $1.6 + *1.7 + * Common type definitions and forward declarations1.8 + *1.9 + * Copyright (c) 2005 Nathan Keynes.1.10 + *1.11 + * This program is free software; you can redistribute it and/or modify1.12 + * it under the terms of the GNU General Public License as published by1.13 + * the Free Software Foundation; either version 2 of the License, or1.14 + * (at your option) any later version.1.15 + *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 of1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1.19 + * GNU General Public License for more details.1.20 + */1.21 +1.22 +#ifndef lxdream_common_H1.23 +#define lxdream_common_H 11.24 +1.25 +#include <stdint.h>1.26 +#include <glib/gtypes.h>1.27 +1.28 +#ifdef __cplusplus1.29 +extern "C" {1.30 +#endif1.31 +1.32 +#define APP_NAME "lxDream"1.33 +#define APP_VERSION "0.8"1.34 +1.35 +#define MB *1024*10241.36 +#define KB *10241.37 +1.38 +#ifndef max1.39 +#define max(a,b) ( (a) > (b) ? (a) : (b) )1.40 +#endif1.41 +1.42 +1.43 +typedef uint32_t sh4addr_t;1.44 +1.45 +/******************* Forward type declarations ******************/1.46 +1.47 +typedef struct render_buffer *render_buffer_t;1.48 +typedef struct frame_buffer *frame_buffer_t;1.49 +1.50 +/*************************** Logging ****************************/1.51 +1.52 +#define EMIT_FATAL 01.53 +#define EMIT_ERR 11.54 +#define EMIT_WARN 21.55 +#define EMIT_INFO 31.56 +#define EMIT_DEBUG 41.57 +#define EMIT_TRACE 51.58 +1.59 +#ifdef MODULE1.60 +#define MODULE_NAME MODULE.name1.61 +#else1.62 +#define MODULE_NAME "*****"1.63 +#endif1.64 +1.65 +void log_message( void *, int level, const char *source, const char *msg, ... );1.66 +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.73 +1.74 +1.75 +1.76 +#ifdef __cplusplus1.77 +}1.78 +#endif1.79 +1.80 +#endif /* !lxdream_common_H */
.