mirror of
https://github.com/joel16/PSP-Everest.git
synced 2024-11-26 21:10:39 +00:00
app: Consistent function naming schemes
This commit is contained in:
parent
d59a98a161
commit
a183a4c8e0
@ -2,7 +2,7 @@
|
||||
|
||||
#include "vlf.h"
|
||||
|
||||
int GetRegistryValue(const char *dir, const char *name, void *buf, int bufsize, int inttype);
|
||||
int Random(int min, int max);
|
||||
int pspGetRegistryValue(const char *dir, const char *name, void *buf, int bufsize, int inttype);
|
||||
int random(int min, int max);
|
||||
int utf82unicode(wchar_t *dest, char *src);
|
||||
VlfText pspEverestPrintf(int x, int y, const char *text, ...);
|
||||
|
@ -310,11 +310,11 @@ void SystemInfo(void) {
|
||||
vlfGuiSetPictureXY(pic_button_assign, 131, 68);
|
||||
|
||||
char unicode_username[26];
|
||||
utf82unicode((wchar_t *)unicode_username, (char *)GetRegistryValue("/CONFIG/SYSTEM", "owner_name", &username, sizeof(username), 0));
|
||||
utf82unicode((wchar_t *)unicode_username, (char *)pspGetRegistryValue("/CONFIG/SYSTEM", "owner_name", &username, sizeof(username), 0));
|
||||
|
||||
text_system[2] = pspEverestPrintf(237, 45, trans->system.username);
|
||||
text_system[3] = vlfGuiAddTextW(language == PSP_SYSTEMPARAM_LANGUAGE_RUSSIAN ? 337 : 327, 45, (u16 *)unicode_username);
|
||||
text_system[4] = pspEverestPrintf(237, 65, trans->system.password, GetRegistryValue("/CONFIG/SYSTEM/LOCK", "password", &password, sizeof(password), 0));
|
||||
text_system[4] = pspEverestPrintf(237, 65, trans->system.password, pspGetRegistryValue("/CONFIG/SYSTEM/LOCK", "password", &password, sizeof(password), 0));
|
||||
text_system[5] = pspEverestPrintf(10, 120, "version.txt:");
|
||||
|
||||
if (vertxt != NULL)
|
||||
@ -413,7 +413,7 @@ int app_main(int argc, char *argv[]) {
|
||||
pspGetInitialFW(initial_fw);
|
||||
pspChkregGetPsCode(&pscode);
|
||||
sceOpenPSIDGetOpenPSID(&psid);
|
||||
GetRegistryValue("/CONFIG/SYSTEM/XMB", "button_assign", &button_assign, 4, 1);
|
||||
pspGetRegistryValue("/CONFIG/SYSTEM/XMB", "button_assign", &button_assign, 4, 1);
|
||||
vertxt = pspGetVersionTxt();
|
||||
|
||||
vlfGuiSystemSetup(1, 1, 1);
|
||||
@ -436,7 +436,7 @@ int app_main(int argc, char *argv[]) {
|
||||
vlfGuiAddEventHandler(PSP_CTRL_LTRIGGER, -1, OnBackgroundMinus, NULL);
|
||||
|
||||
max_background_number = backgrounds_bmp_size / 6176 - 1;
|
||||
background_number = Random(0, max_background_number);
|
||||
background_number = random(0, max_background_number);
|
||||
|
||||
SetBackground();
|
||||
MainMenu(0);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "main.h"
|
||||
#include "vlf.h"
|
||||
|
||||
int GetRegistryValue(const char *dir, const char *name, void *buf, int bufsize, int inttype) {
|
||||
int pspGetRegistryValue(const char *dir, const char *name, void *buf, int bufsize, int inttype) {
|
||||
int ret = 0;
|
||||
struct RegParam reg;
|
||||
REGHANDLE h;
|
||||
@ -44,11 +44,11 @@ int GetRegistryValue(const char *dir, const char *name, void *buf, int bufsize,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Random(int min, int max) {
|
||||
u64 tick;
|
||||
SceKernelUtilsMt19937Context ctx;
|
||||
int random(int min, int max) {
|
||||
u64 tick = 0;
|
||||
SceKernelUtilsMt19937Context ctx = { 0 };
|
||||
sceRtcGetCurrentTick(&tick);
|
||||
sceKernelUtilsMt19937Init(&ctx, (u32)tick);
|
||||
sceKernelUtilsMt19937Init(&ctx, tick);
|
||||
return min + (sceKernelUtilsMt19937UInt(&ctx) % max);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user