Search
lxdream.org :: lxdream/src/lxdream.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/lxdream.h
changeset 477:9a373f2ff009
next502:c4ecae2b1b5e
author nkeynes
date Wed Oct 31 09:10:23 2007 +0000 (13 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 +0000
1.2 +++ b/src/lxdream.h Wed Oct 31 09:10:23 2007 +0000
1.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 declarations
1.8 + *
1.9 + * Copyright (c) 2005 Nathan Keynes.
1.10 + *
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.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 of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.20 + */
1.21 +
1.22 +#ifndef lxdream_common_H
1.23 +#define lxdream_common_H 1
1.24 +
1.25 +#include <stdint.h>
1.26 +#include <glib/gtypes.h>
1.27 +
1.28 +#ifdef __cplusplus
1.29 +extern "C" {
1.30 +#endif
1.31 +
1.32 +#define APP_NAME "lxDream"
1.33 +#define APP_VERSION "0.8"
1.34 +
1.35 +#define MB *1024*1024
1.36 +#define KB *1024
1.37 +
1.38 +#ifndef max
1.39 +#define max(a,b) ( (a) > (b) ? (a) : (b) )
1.40 +#endif
1.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 0
1.53 +#define EMIT_ERR 1
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.58 +
1.59 +#ifdef MODULE
1.60 +#define MODULE_NAME MODULE.name
1.61 +#else
1.62 +#define MODULE_NAME "*****"
1.63 +#endif
1.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 __cplusplus
1.77 +}
1.78 +#endif
1.79 +
1.80 +#endif /* !lxdream_common_H */
.