#ifndef STARRY_MAC_H
#define STARRY_MAC_H

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

enum { SCREEN_WIDTH = 640, SCREEN_HEIGHT = 480 };

typedef enum {
    STARRY_RUNNING,
    STARRY_YIELDED,
    STARRY_COMPLETE,
    STARRY_FAULT
} StepResult;

/* Boot one projected After Dark 2.0 Starry Night resource fork. */
bool starry_boot(const char *resource_path);

/* Start or resume one After Dark DrawFrame message. */
StepResult starry_step(void);

/* Opaque RGBA pixels, SCREEN_WIDTH * SCREEN_HEIGHT * 4 bytes. */
const uint8_t *starry_rgba(void);

const char *starry_error(void);
uint32_t starry_completed_frames(void);
size_t starry_lit_pixels(void);
void starry_shutdown(void);

#endif
