Mirai's Miscellaneous Misadventures

M40 / include / mimimi / controls.h

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

#ifndef MIMIMI_CONTROLS_H
#define MIMIMI_CONTROLS_H

struct mimimi_behavior;
struct mimimi_chapter;
struct mimimi_walk;
struct mimimi_allocator;
struct mimimi_physics;
struct mimimi_position;

struct mimimi_history
{
	unsigned int left, right;
};

struct mimimi_controls
{
	struct mimimi_behavior *jump;
};

struct mimimi_behavior *mimimi_history(struct mimimi_history *history, struct mimimi_chapter *chapter, struct mimimi_allocator *allocator);

struct mimimi_behavior *mimimi_controls(struct mimimi_controls *controls, struct mimimi_walk *walk, struct mimimi_history *history, struct mimimi_allocator *allocator);
struct mimimi_behavior *mimimi_stationary(int *direction, int *position, int *target, struct mimimi_allocator *allocator);

#endif