#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 news * | news_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 |
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.
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] |
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().
void write_image | ( | char * | data, | |
int | width, | |||
int | height, | |||
unsigned char * | palette, | |||
int | anim_no, | |||
int | frame_no | |||
) |
char* basename = "" |
char* dirname = "." |
int do_overlay = 0 [static] |
uint8_t overlay[ovl_w *ovl_h][3] [static] |