GrafX2 2.9.3227
The ultimate 256-color painting program
mockloadsave.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "../loadsave.h"
#include "../global.h"
#include "../gfx2log.h"
+ Include dependency graph for mockloadsave.c:

Functions

void Pre_load (T_IO_Context *context, short width, short height, long file_size, int format, enum PIXEL_RATIO ratio, byte bpp)
 Generic allocation and similar stuff, done at beginning of image load, as soon as size is known. More...
 
byte Get_pixel (T_IO_Context *context, short x, short y)
 Query the color of a pixel (to save) More...
 
void Pixel_in_layer (int layer, word x, word y, byte color)
 put a pixel in a specific layer of Main Page More...
 
void Set_pixel (T_IO_Context *context, short x, short y, byte c)
 Set the color of a pixel (on load) More...
 
void Set_pixel_24b (T_IO_Context *context, short x, short y, byte r, byte g, byte b)
 Set the color of a 24bit pixel (on load) More...
 
void Fill_canvas (T_IO_Context *context, byte color)
 Fill the entire current layer/frame of an image being loaded with a color. More...
 
void Set_saving_layer (T_IO_Context *context, int layer)
 Function to call when need to switch layers. More...
 
void Set_loading_layer (T_IO_Context *context, int layer)
 Function to call when need to switch layers. More...
 
void Set_image_mode (T_IO_Context *context, enum IMAGE_MODES mode)
 Function to set a specific image mode. More...
 
enum IMAGE_MODES Get_image_mode (T_IO_Context *context)
 get the current image mode More...
 
void Set_frame_duration (T_IO_Context *context, int duration)
 Function to call when loading an image's duration. More...
 
int Get_frame_duration (T_IO_Context *context)
 Function to call to get an image's duration for saving. More...
 
int Get_palette_RGB_scale (void)
 

Function Documentation

◆ Pre_load()

void Pre_load ( T_IO_Context context,
short  width,
short  height,
long  file_size,
int  format,
enum PIXEL_RATIO  ratio,
byte  bpp 
)

◆ Get_pixel()

byte Get_pixel ( T_IO_Context context,
short  x,
short  y 
)

Query the color of a pixel (to save)

References T_IO_Context::Height, T_IO_Context::Pitch, T_IO_Context::Target_address, and T_IO_Context::Width.

◆ Pixel_in_layer()

void Pixel_in_layer ( int  layer,
word  x,
word  y,
byte  color 
)

put a pixel in a specific layer of Main Page

◆ Set_pixel()

void Set_pixel ( T_IO_Context context,
short  x,
short  y,
byte  c 
)

◆ Set_pixel_24b()

void Set_pixel_24b ( T_IO_Context context,
short  x,
short  y,
byte  r,
byte  g,
byte  b 
)

Set the color of a 24bit pixel (on load)

Set the color of a 24bit pixel (on load)

◆ Fill_canvas()

void Fill_canvas ( T_IO_Context context,
byte  color 
)

Fill the entire current layer/frame of an image being loaded with a color.

◆ Set_saving_layer()

void Set_saving_layer ( T_IO_Context context,
int  layer 
)

Function to call when need to switch layers.

◆ Set_loading_layer()

void Set_loading_layer ( T_IO_Context context,
int  layer 
)

Function to call when need to switch layers.

◆ Set_image_mode()

void Set_image_mode ( T_IO_Context context,
enum IMAGE_MODES  mode 
)

Function to set a specific image mode.

References mode.

◆ Get_image_mode()

enum IMAGE_MODES Get_image_mode ( T_IO_Context context)

get the current image mode

◆ Set_frame_duration()

void Set_frame_duration ( T_IO_Context context,
int  duration 
)

Function to call when loading an image's duration.

◆ Get_frame_duration()

int Get_frame_duration ( T_IO_Context context)

Function to call to get an image's duration for saving.

◆ Get_palette_RGB_scale()

int Get_palette_RGB_scale ( void  )