-
Notifications
You must be signed in to change notification settings - Fork 0
/
psp_danzeff.h
executable file
·69 lines (50 loc) · 2.09 KB
/
psp_danzeff.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef INCLUDED_KEYBOARDS_DANZEFF_H
#define INCLUDED_KEYBOARDS_DANZEFF_H
//danzeff is BSD licensed, if you do make a new renderer then please share it back and I can add it
//to the original distribution.
//Set which renderer target to build for (currently only SDL is available)
#define DANZEFF_SDL
//TODO #define DANZEFF_SCEGU etc etc ;)
#define DANZEFF_SELECT 1
#define DANZEFF_START 2
#define DANZEFF_LDIFF 3
#define DANZEFF_RDIFF 4
#define DANZEFF_PAUSE 5
#define DANZEFF_SEL 6
#define DANZEFF_RESET 7
//the SDL implementation needs the pspctrl_emu wrapper to convert
//a SDL_Joystick into a gp2xCtrlData
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
extern int psp_kbd_skin;
extern int psp_kbd_last_skin;
extern char *psp_kbd_skin_dir[];
//Initialization and de-init of the keyboard, provided as the keyboard uses alot of images, so if you aren't going to use it for a while, I'd recommend unloading it.
extern int danzeff_load(void);
extern void danzeff_free(void);
//returns true if the keyboard is initialized
extern int danzeff_isinitialized(void);
/** Attempts to read a character from the controller
* If no character is pressed then we return 0
* Other special values: 1 = move left, 2 = move right, 3 = select, 4 = start
* Every other value should be a standard ascii value.
* An unsigned int is returned so in the future we can support unicode input
*/
extern unsigned int danzeff_readInput(gp2xCtrlData pspctrl);
//Move the area the keyboard is rendered at to here
extern void danzeff_moveTo(const int newX, const int newY);
//Returns true if the keyboard that would be rendered now is different to the last time
//that the keyboard was drawn, this is altered by readInput/render.
extern int danzeff_dirty();
//draw the keyboard to the screen
extern void danzeff_render();
///Functions only for particular renderers:
#include <SDL/SDL.h>
//set the screen surface for rendering on.
extern void danzeff_set_screen(SDL_Surface* screen);
#ifdef __cplusplus
}
#endif
#endif //INCLUDED_KEYBOARDS_DANZEFF_H