Mirai's Miscellaneous Misadventures

M30 / include / mimimi / chapters.h

// copyright 2022 zamfofex
// license: AGPLv3 or later

#ifndef MIMIMI_CHAPTERS_H
#define MIMIMI_CHAPTERS_H

struct mimimi_image;
struct mimimi_sprite;
struct mimimi_behavior;
struct mimimi_ground;
struct mimimi_size;
struct mimimi_allocator;
struct mimimi_engine;
struct mimimi_position;
struct mimimi_video_appearance;

struct mimimi_chapter
{
	struct mimimi_behavior *behavior;
	unsigned char left:1, right:1;
};

struct mimimi_sprite *mimimi_sprite(struct mimimi_ground *ground, int x, int y, int width, int height, struct mimimi_allocator *allocator);
struct mimimi_behavior *mimimi_display(struct mimimi_engine *engine, struct mimimi_position *camera, struct mimimi_sprite *sprite, struct mimimi_video_appearance *appearance, int *direction, int x, int y, struct mimimi_allocator *allocator);

int mimimi_measure_text(struct mimimi_image *glyphs, char *text);
int mimimi_text(struct mimimi_image *image, struct mimimi_image *glyphs, int x, int y, char *text);
struct mimimi_behavior *mimimi_background(struct mimimi_engine *engine, struct mimimi_position *camera, void *texture, int x, int y, int z, struct mimimi_allocator *allocator);
struct mimimi_behavior *mimimi_overlay(struct mimimi_engine *engine, void *texture, int x, int y, struct mimimi_allocator *allocator);

#endif