GrafX2 2.9.3227
The ultimate 256-color painting program
motoformats.c File Reference

Formats for the MO/TO Thomson machines. More...

#include <stdlib.h>
#include <string.h>
#include "struct.h"
#include "io.h"
#include "loadsave.h"
#include "loadsavefuncs.h"
#include "fileformats.h"
#include "oldies.h"
#include "input.h"
#include "engine.h"
#include "screen.h"
#include "windows.h"
#include "help.h"
#include "gfx2mem.h"
#include "gfx2log.h"
+ Include dependency graph for motoformats.c:

Functions

void Test_MOTO (T_IO_Context *context, FILE *file)
 Test for Thomson file. More...
 
void Load_MOTO (T_IO_Context *context)
 Load a picture for Thomson TO8/TO8D/TO9/TO9+/MO6. More...
 
unsigned int MOTO_MAP_pack (byte *packed, const byte *unpacked, unsigned int unpacked_len)
 Pack a stream of byte in the format used by Thomson MO/TO MAP files. More...
 
static int Save_MOTO_window (enum MOTO_Machine_Type *machine, int *format, enum MOTO_Graphic_Mode *mode)
 GUI window to choose Thomson MO/TO saving parameters. More...
 
void Save_MOTO (T_IO_Context *context)
 Save a picture in MAP or BIN Thomson MO/TO file format. More...
 

Variables

char Program_version []
 
const char SVN_revision []
 

Detailed Description

Formats for the MO/TO Thomson machines.

Function Documentation

◆ MOTO_MAP_pack()

unsigned int MOTO_MAP_pack ( byte packed,
const byte unpacked,
unsigned int  unpacked_len 
)

Pack a stream of byte in the format used by Thomson MO/TO MAP files.

  • 00 cc xx yy .. : encodes a "copy run" (cc = bytes to copy)
  • cc xx : encodes a "repeat run" (cc > 0 : count)

References GFX2_DEBUG, GFX2_ERROR, GFX2_Log(), and GFX2_malloc.

Referenced by Save_MOTO(), and Test_MOTO_MAP_pack().

◆ Save_MOTO_window()

static int Save_MOTO_window ( enum MOTO_Machine_Type machine,
int *  format,
enum MOTO_Graphic_Mode mode 
)
static

Variable Documentation

◆ Program_version

char Program_version[]
extern

Referenced by Save_MOTO().

◆ SVN_revision

const char SVN_revision[]
extern

Referenced by Save_MOTO().