OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
screen.h
Go to the documentation of this file.
1
13#ifndef SHARD_DASH_SCREEN_H
14#define SHARD_DASH_SCREEN_H
15
16#include <snes.h>
17
19#define SCREEN_VBLANK_BUDGET 3072
21#define SCREEN_LOAD_CHUNK 2048
22
27
29void screenSetPump(void (*fn)(void));
31void screenSetClose(void (*fn)(void));
33void screenFadeSkip(u16 on);
35void screenLoad(const u8 *src, u16 addr, u16 size, u16 step);
37void screenShow(void);
39void screenClose(void);
41void screenFrame(void);
43u16 screenPressed(u16 keys, u16 both);
45u16 screenWait(u16 frames);
46
47#endif
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:53
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:47
u16 screen_fade_skip
1: the fades are skipped (long tests). 0 by default. A test may poke it.
Definition screen.c:19
u16 screen_fade_frames
Images the last fade took (16 at speed 1), for the tests.
Definition screen.c:20
void screenClose(void)
Non-blocking fade-out, display off, then the close hook.
Definition screen.c:98
void screenLoad(const u8 *src, u16 addr, u16 size, u16 step)
Upload a block to VRAM through the queue, in pieces that keep to SCREEN_VBLANK_BUDGET.
Definition screen.c:69
void screenFrame(void)
One image of a lit screen: VBlank, queue flush, pump, pads.
Definition screen.c:62
void screenFadeSkip(u16 on)
1: skip the fades; 0: play them for real.
Definition screen.c:27
void screenShow(void)
Display on, non-blocking fade-in; a key already held does not count.
Definition screen.c:84
u16 screenPressed(u16 keys, u16 both)
Keys newly pressed this image, among keys; both also reads pad 2.
Definition screen.c:108
u16 screenWait(u16 frames)
Wait frames images or START; 1 if START cut it short.
Definition screen.c:114
void screenSetPump(void(*fn)(void))
Function run on EVERY image: fades, waits, loads and frames. No state is passed.
Definition screen.c:25
void screenSetClose(void(*fn)(void))
Hook run by screenClose(): undoes what the screen set up. One shot.
Definition screen.c:26
OpenSNES common-case master header.