// -----------------------------------------------------------
// common.h - routines, tables and variables shared by the
// slides: screen clearing, text printing, big 3x5 block font
// -----------------------------------------------------------
#ifndef COMMON_H
#define COMMON_H

#include "defs.h"

// clear screen RAM, fill color RAM with white
void clear_screen(void);

// print a text line (screen codes, null terminated)
void print_text(char row, char col, char color, const char *txt);

// draw a text line with big 3x5 block letters: each letter is
// 3 cells wide + 1 gap, 5 cells tall
void draw_big(char row, char col, char color, const char *txt);

// row * 40 lookup table (25 rows)
extern const unsigned rowoff[25];

extern const char washtbl[16];       // gold glow ramp (cyclic)
extern const char pulsetbl[8];       // grey-white pulse (cyclic)
extern const char fadetbl[16];       // fade-to-black: color -> one shade darker

extern char framectr;                // frame counter, driven by the slide updates
extern char washphase;               // gold wash offset (slides 1 and 2)

#pragma compile("common.c")

#endif
