prepared doxygen stuff

This commit is contained in:
zeromus 2006-07-31 05:41:13 +00:00
parent 45156a8ba6
commit 7fbbe82b03
5 changed files with 1257 additions and 10 deletions

1237
doxygen Normal file

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,7 @@ for flag in sdl_libflags.split(' '):
sdl_libflags_pipe.close(); sdl_libflags_pipe.close();
# add zlib # add zlib and sdl libs
env['LIBS'].append('z'); env['LIBS'].append('z');
env['LIBS'].extend(sdl_libs); env['LIBS'].extend(sdl_libs);

View File

@ -1,11 +1,16 @@
#include "types.h" /// \file
#include "fceu.h" /// \brief A poorly documented file.
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "types.h"
#include "fceu.h"
static char *aboutString = 0; static char *aboutString = 0;
///returns a string suitable for use in an aboutbox
char *FCEUI_GetAboutString() { char *FCEUI_GetAboutString() {
const char *aboutTemplate = const char *aboutTemplate =
FCEU_NAME_AND_VERSION"\n\ FCEU_NAME_AND_VERSION"\n\
@ -23,12 +28,11 @@ FCEUX\n\
\n\ \n\
"__TIME__" "__DATE__"\n"; "__TIME__" "__DATE__"\n";
char *compilerString = FCEUD_GetCompilerString(); char *compilerString = FCEUD_GetCompilerString();
//allocate the string and concatenate the template with the compiler string //allocate the string and concatenate the template with the compiler string
if(aboutString) free(aboutString); if(aboutString) free(aboutString);
aboutString = (char*)malloc(strlen(aboutTemplate) + strlen(compilerString) + 1); aboutString = (char*)malloc(strlen(aboutTemplate) + strlen(compilerString) + 1);
strcpy(aboutString,aboutTemplate); sprintf(aboutString,"%s%s",aboutTemplate,compilerString);
strcat(aboutString,compilerString);
return aboutString; return aboutString;
} }

View File

@ -18,14 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* Contains file I/O functions that write/read data */ /// \file
/* LSB first. */ /// \brief contains file I/O functions that write/read data LSB first.
#include <stdio.h> #include <stdio.h>
#include "types.h" #include "types.h"
#include "endian.h" #include "endian.h"
///endian-flips count bytes. count should be even and nonzero.
void FlipByteOrder(uint8 *src, uint32 count) void FlipByteOrder(uint8 *src, uint32 count)
{ {
uint8 *start=src; uint8 *start=src;
@ -45,6 +45,7 @@ void FlipByteOrder(uint8 *src, uint32 count)
} }
} }
///writes a little endian 16bit value to the specified file
int write16le(uint16 b, FILE *fp) int write16le(uint16 b, FILE *fp)
{ {
uint8 s[2]; uint8 s[2];
@ -53,6 +54,7 @@ int write16le(uint16 b, FILE *fp)
return((fwrite(s,1,2,fp)<2)?0:2); return((fwrite(s,1,2,fp)<2)?0:2);
} }
///writes a little endian 32bit value to the specified file
int write32le(uint32 b, FILE *fp) int write32le(uint32 b, FILE *fp)
{ {
uint8 s[4]; uint8 s[4];
@ -63,6 +65,7 @@ int write32le(uint32 b, FILE *fp)
return((fwrite(s,1,4,fp)<4)?0:4); return((fwrite(s,1,4,fp)<4)?0:4);
} }
///reads a little endian 32bit value from the specified file
int read32le(uint32 *Bufo, FILE *fp) int read32le(uint32 *Bufo, FILE *fp)
{ {
uint32 buf; uint32 buf;
@ -76,6 +79,7 @@ int read32le(uint32 *Bufo, FILE *fp)
return 1; return 1;
} }
///reads a little endian 16bit value from the specified file
int read16le(char *d, FILE *fp) int read16le(char *d, FILE *fp)
{ {
#ifdef LSB_FIRST #ifdef LSB_FIRST
@ -88,6 +92,7 @@ int read16le(char *d, FILE *fp)
#endif #endif
} }
///stores a 32bit value into the provided byte array in guaranteed little endian form
void FCEU_en32lsb(uint8 *buf, uint32 morp) void FCEU_en32lsb(uint8 *buf, uint32 morp)
{ {
buf[0]=morp; buf[0]=morp;
@ -96,6 +101,7 @@ void FCEU_en32lsb(uint8 *buf, uint32 morp)
buf[3]=morp>>24; buf[3]=morp>>24;
} }
///unpacks a 32bit little endian value from the provided byte array into host byte order
uint32 FCEU_de32lsb(uint8 *morp) uint32 FCEU_de32lsb(uint8 *morp)
{ {
return(morp[0]|(morp[1]<<8)|(morp[2]<<16)|(morp[3]<<24)); return(morp[0]|(morp[1]<<8)|(morp[2]<<16)|(morp[3]<<24));

View File

@ -867,7 +867,7 @@ void FCEU_DrawMovies(uint8 *XBuf)
{ {
int frameDisplayOn = current != 0 && frame_display; int frameDisplayOn = current != 0 && frame_display;
extern int howlong; extern int howlong;
#if MSVC #if MSVC
extern int32 fps_scale; extern int32 fps_scale;
#else #else
int32 fps_scale=256; int32 fps_scale=256;