Search
lxdream.org :: lxdream/src/dream.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dream.h
changeset 477:9a373f2ff009
prev437:2c259474b474
next495:4db4702b0778
author nkeynes
date Sun Nov 04 05:07:49 2007 +0000 (16 years ago)
permissions -rw-r--r--
last change Test for presence of linux/cdrom.h at configure time, and only build the
linux driver if it's found successfully
file annotate diff log raw
1.1 --- a/src/dream.h Thu Oct 11 08:22:03 2007 +0000
1.2 +++ b/src/dream.h Sun Nov 04 05:07:49 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: dream.h,v 1.15 2007-10-11 08:22:03 nkeynes Exp $
1.6 + * $Id: dream.h,v 1.16 2007-10-31 09:10:23 nkeynes Exp $
1.7 *
1.8 * Miscellaneous application-wide declarations (mainly logging atm)
1.9 *
1.10 @@ -23,15 +23,12 @@
1.11 #include <stdlib.h>
1.12 #include <stdint.h>
1.13 #include <string.h>
1.14 -#include <glib/gtypes.h>
1.15 +#include "lxdream.h"
1.16
1.17 #ifdef __cplusplus
1.18 extern "C" {
1.19 #endif
1.20
1.21 -#define APP_NAME "lxDream"
1.22 -#define APP_VERSION "0.8"
1.23 -
1.24 /************************ Modules ********************************/
1.25 /**
1.26 * Basic module structure defining the common operations across all
1.27 @@ -90,39 +87,16 @@
1.28 extern struct dreamcast_module eventq_module;
1.29 extern struct dreamcast_module unknown_module;
1.30
1.31 -/*************************** Logging **************************/
1.32 -
1.33 -#define EMIT_FATAL 0
1.34 -#define EMIT_ERR 1
1.35 -#define EMIT_WARN 2
1.36 -#define EMIT_INFO 3
1.37 -#define EMIT_DEBUG 4
1.38 -#define EMIT_TRACE 5
1.39 -
1.40 -#ifndef MODULE
1.41 -#define MODULE unknown_module
1.42 -#endif
1.43 -
1.44 -void log_message( void *, int level, const char *source, const char *msg, ... );
1.45 -
1.46 -#define FATAL( ... ) log_message( NULL, EMIT_FATAL, MODULE.name, __VA_ARGS__ )
1.47 -#define ERROR( ... ) log_message( NULL, EMIT_ERR, MODULE.name, __VA_ARGS__ )
1.48 -#define WARN( ... ) log_message( NULL, EMIT_WARN, MODULE.name, __VA_ARGS__ )
1.49 -#define INFO( ... ) log_message( NULL, EMIT_INFO, MODULE.name, __VA_ARGS__ )
1.50 -#define DEBUG( ... ) log_message( NULL, EMIT_DEBUG, MODULE.name, __VA_ARGS__ )
1.51 -#define TRACE( ... ) log_message( NULL, EMIT_TRACE, MODULE.name, __VA_ARGS__ )
1.52 -
1.53 void fwrite_string( const char *s, FILE *f );
1.54 int fread_string( char *s, int maxlen, FILE *f );
1.55 +void fwrite_gzip( void *p, size_t size, size_t num, FILE *f );
1.56 +int fread_gzip( void *p, size_t size, size_t num, FILE *f );
1.57 void fwrite_dump( unsigned char *buf, unsigned int length, FILE *f );
1.58 void fwrite_dump32( unsigned int *buf, unsigned int length, FILE *f );
1.59 void fwrite_dump32v( unsigned int *buf, unsigned int length, int wordsPerLine, FILE *f );
1.60
1.61 -typedef uint32_t sh4addr_t;
1.62 -
1.63 -#ifndef max
1.64 -#define max(a,b) ( (a) > (b) ? (a) : (b) )
1.65 -#endif
1.66 +gboolean write_png_to_stream( FILE *f, frame_buffer_t );
1.67 +frame_buffer_t read_png_from_stream( FILE *f );
1.68
1.69 #ifdef __cplusplus
1.70 }
.