utils/mknews.c File Reference

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <inttypes.h>
#include "gamedata.h"

Go to the source code of this file.

Data Structures

struct  news
struct  seqInfo

Enumerations

enum  {
  ovl_x = 240 - 4,
  ovl_w = 316 - 240,
  ovl_y = 4 - 4,
  ovl_h = 23 - 4
}

Functions

int main (int argc, char **argv)
void news_close (struct news *n)
int news_next_animation (struct news *n, int *x, int *y, int *w, int *h)
int news_next_frame (struct news *n, char *data)
struct newsnews_open (char *fname)
void pexit (const char *str)
int RLED (void *src_raw, void *dest_raw, unsigned int src_size)
void usage (int code)
void write_image (char *data, int width, int height, unsigned char *palette, int anim_no, int frame_no)

Variables

char * basename = ""
char * dirname = "."
static int do_overlay = 0
static uint8_t overlay [ovl_w *ovl_h][3]
static int vflag


Enumeration Type Documentation

anonymous enum

Enumerator:
ovl_x 
ovl_w 
ovl_y 
ovl_h 

Definition at line 18 of file mknews.c.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 653 of file mknews.c.

References basename, c, dirname, do_overlay, news_close(), news_next_animation(), news_next_frame(), news_open(), news::palette, usage(), write_image(), x, and y.

void news_close ( struct news n  ) 

Definition at line 566 of file mknews.c.

Referenced by main().

int news_next_animation ( struct news n,
int *  x,
int *  y,
int *  w,
int *  h 
)

Definition at line 504 of file mknews.c.

References news::anim_idx, news::anim_offsets, news::animations, news::fp, news::frame_idx, news::frames, seqInfo::frames, fread_SimpleHdr(), seqInfo::height, news::palette, pexit(), seqInfo::width, seqInfo::x_off, and seqInfo::y_off.

Referenced by main().

int news_next_frame ( struct news n,
char *  data 
)

Definition at line 538 of file mknews.c.

References news::anim_idx, news::anim_offsets, news::animations, news::fp, news::frame_idx, news::frames, seqInfo::frames, SimpleHdr::offset, pexit(), RLED(), and SimpleHdr::size.

Referenced by main().

struct news* news_open ( char *  fname  )  [read]

Definition at line 475 of file mknews.c.

References pexit().

Referenced by main().

void pexit ( const char *  str  ) 

Definition at line 446 of file mknews.c.

Referenced by news_next_animation(), news_next_frame(), news_open(), and write_image().

int RLED ( void src_raw,
void dest_raw,
unsigned int  src_size 
)

Definition at line 391 of file mknews.c.

References dest, and vflag.

void usage ( int  code  ) 

Definition at line 438 of file mknews.c.

void write_image ( char *  data,
int  width,
int  height,
unsigned char *  palette,
int  anim_no,
int  frame_no 
)

Definition at line 575 of file mknews.c.

References basename, dirname, do_overlay, news::fp, overlay, ovl_h, ovl_w, ovl_x, ovl_y, pexit(), and type.

Referenced by main().


Variable Documentation

char* basename = ""

Definition at line 572 of file mknews.c.

Referenced by main(), and write_image().

char* dirname = "."

Definition at line 571 of file mknews.c.

Referenced by main(), and write_image().

int do_overlay = 0 [static]

Definition at line 15 of file mknews.c.

Referenced by main(), and write_image().

uint8_t overlay[ovl_w *ovl_h][3] [static]

Definition at line 26 of file mknews.c.

Referenced by write_image().

int vflag [static]

Definition at line 9 of file mknews.c.


Generated on Fri Sep 28 00:35:47 2007 for raceintospace by  doxygen 1.5.3