Tachyon (current)
Current Main Branch
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "tachyon.h"
#include "util.h"
#include "ui.h"
#include "imageio.h"
#include "tgafile.h"
Go to the source code of this file.
Data Structures | |
struct | tgahandle |
Macros | |
#define | TACHYON_INTERNAL 1 |
Functions | |
int | createtgafile (char *name, unsigned short width, unsigned short height) |
void * | opentgafile (char *filename) |
void | writetgaregion (void *voidhandle, int startx, int starty, int stopx, int stopy, unsigned char *buffer) |
void | closetgafile (void *voidhandle) |
int | readtga (char *name, int *xres, int *yres, unsigned char **imgdata) |
int | writetga (char *name, int xres, int yres, unsigned char *imgdata) |
void closetgafile | ( | void * | voidhandle | ) |
int createtgafile | ( | char * | name, |
unsigned short | width, | ||
unsigned short | height | ||
) |
Definition at line 29 of file tgafile.c.
References IMAGENOERR, IMAGEWRITEERR, MSG_ABORT, MSG_ERR, and rt_ui_message().
Referenced by writetga().
void* opentgafile | ( | char * | filename | ) |
Definition at line 75 of file tgafile.c.
References tgahandle::height, MSG_ABORT, MSG_ERR, tgahandle::ofp, rt_ui_message(), and tgahandle::width.
Referenced by writetga().
int readtga | ( | char * | name, |
int * | xres, | ||
int * | yres, | ||
unsigned char ** | imgdata | ||
) |
Definition at line 182 of file tgafile.c.
References IMAGEBADFILE, IMAGENOERR, IMAGEREADERR, and IMAGEUNSUP.
Referenced by readimage().
int writetga | ( | char * | name, |
int | xres, | ||
int | yres, | ||
unsigned char * | imgdata | ||
) |
Definition at line 260 of file tgafile.c.
References closetgafile(), createtgafile(), IMAGENOERR, IMAGEWRITEERR, opentgafile(), and writetgaregion().
Referenced by writeimage().
void writetgaregion | ( | void * | voidhandle, |
int | startx, | ||
int | starty, | ||
int | stopx, | ||
int | stopy, | ||
unsigned char * | buffer | ||
) |
Definition at line 97 of file tgafile.c.
References tgahandle::height, MSG_ERR, tgahandle::ofp, rt_ui_message(), and tgahandle::width.
Referenced by writetga().