-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcefiveconfig.h
More file actions
131 lines (100 loc) · 3.96 KB
/
cefiveconfig.h
File metadata and controls
131 lines (100 loc) · 3.96 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* File: cefiveconfig.h
* Author: Sir Gee of Five
*
* Created on September 26, 2010, 2:36 PM
*/
#ifndef CEFIVECONFIG_H
#define CEFIVECONFIG_H
#include <stdio.h>
#include <string.h>
#include <pspiofilemgr.h>
#include <pspkerneltypes.h>
#include "appletconfig.h"
#include "colorconfig.h"
#include "cursorpos.h"
#include "dimension.h"
#include "panelconfig.h"
/** Indicates success. */
#define CEFIVECONFIG_SUCCESS (0)
/** Indicates failure. */
#define CEFIVECONFIG_FAILURE (-1)
/** Indicates a memory error. */
#define CEFIVECONFIG_MEMORY (-2)
/** Indicates a NULL pointer. */
#define CEFIVECONFIG_NULLPTR (-3)
/** Indicates an I/O error. */
#define CEFIVECONFIG_IOERROR (-4)
#define CEFIVE_DIR_MAX (64)
#define CEFIVE_GAMEID_LEN (10)
#define CEFIVE_PATH_MAX (256)
#define CEFIVE_DEF_BG ((u32)0xFFC0C0C0)
#define CEFIVE_DEF_TEXT ((u32)0xFF000000)
#define CEFIVE_CURSOR_BG ((u32)0xFFFF0000)
#define CEFIVE_CURSOR_TEXT ((u32)0xFFFFFFFF)
#define CEFIVE_EDIT_BG ((u32)0xFF808080)
#define CEFIVE_EDIT_TEXT ((u32)0xFF00FFFF)
#define CEFIVE_STATUS_BG ((u32)0xFF909090)
#define CEFIVE_STATUS_TEXT ((u32)0xFF000000)
#define CEFIVE_TITLE_BG ((u32)0xFF0000A0)
#define CEFIVE_TITLE_TEXT ((u32)0xFFFFFFFF)
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _CEFiveConfig {
char plugins_dir[CEFIVE_DIR_MAX];
char cefive_dir[CEFIVE_DIR_MAX];
char screenshot_path[CEFIVE_PATH_MAX];
char cheatfile_path[CEFIVE_PATH_MAX];
char game_id[CEFIVE_GAMEID_LEN + 1];
int pause_during_ui;
AppletConfig rAppletConfig;
}CEFiveConfig;
/** Copy a CeFive Configuration.
*
* @param prDest Pointer to a CEFiveConfig struct representing the
* destination.
* @param prSrc Pointer to a CEFiveConfig struct representing the source.
* @return 0 indicates success, <0 indicates failure.
*/
int cefiveconfig_copy(CEFiveConfig* prDest, CEFiveConfig* prSrc);
/** Return a pointer to an AppletConfig struct representing the CeFive
* Applet Configuration.
*
* @param prConfig Pointer to a CEFiveConfig struct representing the CeFive
* Configuration.
* @return A pointer to an AppletConfig struct or NULL is returned.
*/
AppletConfig* cefiveconfig_get_appletconfig(CEFiveConfig* prConfig);
int cefiveconfig_get_cheatfilename(char* sDest, CEFiveConfig* prConfig);
ColorConfig* cefiveconfig_get_cursorcolor(CEFiveConfig* prConfig);
ColorConfig* cefiveconfig_get_editcolor(CEFiveConfig* prConfig);
ColorConfig* cefiveconfig_get_panelcolor(CEFiveConfig* prConfig);
PanelConfig* cefiveconfig_get_panelconfig(CEFiveConfig* prConfig);
ColorConfig* cefiveconfig_get_statuscolor(CEFiveConfig* prConfig);
ColorConfig* cefiveconfig_get_titlecolor(CEFiveConfig* prConfig);
int cefiveconfig_init(CEFiveConfig* prConfig);
int cefiveconfig_load(CEFiveConfig* prConfig, const char* sFilename);
int cefiveconfig_read(CEFiveConfig* prConfig, SceUID fd);
int cefiveconfig_save(CEFiveConfig* prConfig, const char* sFilename);
/** Assign the CEFive directory.
*
* @param prConfig Pointer to a CEFiveConfig struct representing the
* CEFive Configuration.
* @param sDir string containing the directory to assign.
* @return 0 indicates success, less than 0 indicates failure.
*/
int cefiveconfig_set_cefivedir(CEFiveConfig* prConfig, const char* sDir);
/** Assign the CFW plugins directory.
*
* @param prConfig Pointer to a CEFiveConfig struct representing the
* CEFive Configuration.
* @param sDir string containing the directory to assign.
* @return 0 indicates success, less than 0 indicates failure.
*/
int cefiveconfig_set_plugindir(CEFiveConfig* prConfig, const char* sDir);
int cefiveconfig_write(CEFiveConfig* prConfig, SceUID fd);
#ifdef __cplusplus
}
#endif
#endif /* CEFIVECONFIG_H */