RetroArch
Classes | Macros | Functions
rtga.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <retro_assert.h>
#include <retro_inline.h>
#include <formats/image.h>
#include <formats/rtga.h>
Include dependency graph for rtga.c:

Classes

struct  rtga
 
struct  rtga__context
 

Macros

#define RTGA_COMPUTE_Y(r, g, b)   ((uint8_t)((((r) * 77) + ((g) * 150) + (29 * (b))) >> 8))
 

Functions

static INLINE uint8_t rtga__get8 (rtga__context *s)
 
static void rtga__skip (rtga__context *s, int n)
 
static int rtga__getn (rtga__context *s, uint8_t *buffer, int n)
 
static int rtga__get16le (rtga__context *s)
 
static unsigned char * rtga__convert_format (unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y)
 
static uint8_trtga__tga_load (rtga__context *s, unsigned *x, unsigned *y, int *comp, int req_comp)
 
static uint8_trtga_load_from_memory (uint8_t const *buffer, int len, unsigned *x, unsigned *y, int *comp, int req_comp)
 
int rtga_process_image (rtga_t *rtga, void **buf_data, size_t size, unsigned *width, unsigned *height)
 
bool rtga_set_buf_ptr (rtga_t *rtga, void *data)
 
void rtga_free (rtga_t *rtga)
 
rtga_trtga_alloc (void)
 

Macro Definition Documentation

◆ RTGA_COMPUTE_Y

#define RTGA_COMPUTE_Y (   r,
  g,
  b 
)    ((uint8_t)((((r) * 77) + ((g) * 150) + (29 * (b))) >> 8))

Function Documentation

◆ rtga__convert_format()

static unsigned char* rtga__convert_format ( unsigned char *  data,
int  img_n,
int  req_comp,
unsigned int  x,
unsigned int  y 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtga__get16le()

static int rtga__get16le ( rtga__context s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtga__get8()

static INLINE uint8_t rtga__get8 ( rtga__context s)
static
Here is the caller graph for this function:

◆ rtga__getn()

static int rtga__getn ( rtga__context s,
uint8_t buffer,
int  n 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtga__skip()

static void rtga__skip ( rtga__context s,
int  n 
)
static
Here is the caller graph for this function:

◆ rtga__tga_load()

static uint8_t* rtga__tga_load ( rtga__context s,
unsigned *  x,
unsigned *  y,
int *  comp,
int  req_comp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtga_alloc()

rtga_t* rtga_alloc ( void  )
Here is the caller graph for this function:

◆ rtga_free()

void rtga_free ( rtga_t rtga)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtga_load_from_memory()

static uint8_t* rtga_load_from_memory ( uint8_t const buffer,
int  len,
unsigned *  x,
unsigned *  y,
int *  comp,
int  req_comp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtga_process_image()

int rtga_process_image ( rtga_t rtga,
void **  buf_data,
size_t  size,
unsigned *  width,
unsigned *  height 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtga_set_buf_ptr()

bool rtga_set_buf_ptr ( rtga_t rtga,
void data 
)
Here is the caller graph for this function: