aboutsummaryrefslogtreecommitdiff
path: root/plat.h
blob: 84e4d1e9a8a62674370ba9a9a21e3c0a9330c2ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __PLAT_H__
#define __PLAT_H__

#include "libpicofe/plat.h"

struct audio_frame {
	int16_t left;
	int16_t right;
};

#define HUD_LEN 41

int  plat_init(void);
int  plat_reinit(void);
void plat_finish(void);
void plat_minimize(void);

void *plat_prepare_screenshot(int *w, int *h, int *bpp);
int plat_dump_screen(const char *filename);
int plat_load_screen(const char *filename, void *buf, size_t buf_size, int *w, int *h, int *bpp);

void plat_video_open(void);
void plat_video_set_msg(const char *new_msg, unsigned priority, unsigned msec);
void plat_video_process(const void *data, unsigned width, unsigned height, size_t pitch);
void plat_video_flip(void);
void plat_video_close(void);

unsigned plat_cpu_ticks(void);

int plat_sound_occupancy(void);
extern void (*plat_sound_write)(const struct audio_frame *data, int frames);
void plat_sound_resize_buffer(void);

#endif /* __PLAT_H__ */