Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
0.5.1 adjustments
  • Loading branch information
bucanero committed Mar 16, 2022
1 parent 7c09002 commit 1178a3b
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package metadata.
TITLE := GoldHEN Cheats Manager
VERSION := 0.50
VERSION := 0.51
TITLE_ID := GOLD00777
CONTENT_ID := IV0000-GOLD00777_00-GOLDCHEATS000PS4

Expand Down
6 changes: 1 addition & 5 deletions include/cheats.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,8 @@ enum char_flag_enum
enum code_type_enum
{
PATCH_NULL,
PATCH_GAMEGENIE = APOLLO_CODE_GAMEGENIE,
PATCH_BSD = APOLLO_CODE_BSD,
PATCH_VIEW,
PATCH_COMMAND,
PATCH_SFO,
PATCH_TROP_UNLOCK,
PATCH_TROP_LOCK,
};

typedef struct game_entry
Expand Down
2 changes: 1 addition & 1 deletion include/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ enum texture_index
#define APP_FONT_COLOR 0xFFFFFF00
#define APP_FONT_TAG_COLOR 0xFFFFFF00
#define APP_FONT_MENU_COLOR 0x00000000
#define APP_FONT_TITLE_COLOR 0xFFFFFF00
#define APP_FONT_TITLE_COLOR 0x00000000
#define APP_FONT_SIZE_TITLE 84, 72
#define APP_FONT_SIZE_SUBTITLE 68, 60
#define APP_FONT_SIZE_SUBTEXT 36, 36
Expand Down
4 changes: 2 additions & 2 deletions include/settings.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define GOLDCHEATS_VERSION "0.5.0" //GoldCheats PS4 version (about menu)
#define GOLDCHEATS_DATA_VERSION 1
#define GOLDCHEATS_VERSION "0.5.1" //GoldCheats PS4 version (about menu)
#define GOLDCHEATS_DATA_VERSION 2

#define MENU_TITLE_OFF 45 //Offset of menu title text from menu mini icon
#define MENU_ICON_OFF 105 //X Offset to start printing menu mini icon
Expand Down
3 changes: 0 additions & 3 deletions include/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
#include <stdint.h>
#include <stdlib.h>

#define APOLLO_CODE_GAMEGENIE 1
#define APOLLO_CODE_BSD 2

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
4 changes: 2 additions & 2 deletions source/cheats.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ int set_json_codes(game_entry_t* item)
if (!cJSON_IsString(mod_name) || !cJSON_IsString(mod_type))
continue;

cmd = _createCmdCode(PATCH_GAMEGENIE, mod_name->valuestring, CMD_CODE_NULL);
cmd = _createCmdCode(PATCH_VIEW, mod_name->valuestring, CMD_CODE_NULL);

const cJSON *mem = cJSON_GetObjectItemCaseSensitive(mod, "memory");
cmd->codes = cJSON_Print(mem);
Expand Down Expand Up @@ -305,7 +305,7 @@ int set_shn_codes(game_entry_t* item)

if (value)
{
cmd = _createCmdCode(PATCH_GAMEGENIE, mxmlElementGetAttr(node, "Text"), CMD_CODE_NULL);
cmd = _createCmdCode(PATCH_VIEW, mxmlElementGetAttr(node, "Text"), CMD_CODE_NULL);
cmd->codes = mxmlSaveAllocString(node, &xml_whitespace_cb);

LOG("Added '%s' (%d)", cmd->name, cmd->type);
Expand Down
10 changes: 3 additions & 7 deletions source/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,9 @@ void DrawHeader_Ani(int icon, const char * hdrTitle, const char * headerSubTitle

_drawListBackground(0, icon);
//------------- Menu Bar
/*
int cnt, cntMax = ((ani * div) > (SCREEN_WIDTH - 75)) ? (SCREEN_WIDTH - 75) : (ani * div);
for (cnt = MENU_ICON_OFF; cnt < cntMax; cnt++)
DrawTexture(&menu_textures[header_line_png_index], cnt, 40, 0, menu_textures[header_line_png_index].width, menu_textures[header_line_png_index].height / 2, 0xffffffff);
DrawTexture(&menu_textures[header_dot_png_index], cnt - 4, 40, 0, menu_textures[header_dot_png_index].width / 2, menu_textures[header_dot_png_index].height / 2, 0xffffff00 | icon_a);
*/
SetFontColor(0x000000 | icon_a, 0);
SetFontSize(APP_FONT_SIZE_SUBTITLE);
DrawStringMono(MENU_ICON_OFF + 10, 80, "\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4\xC4");

//header mini icon
DrawTextureCenteredX(&menu_textures[icon], MENU_ICON_OFF - 20, 32, 0, 96, 96, 0xffffff00 | icon_a);
Expand Down
19 changes: 9 additions & 10 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ png_texture * menu_textures; // png_texture array for main menu,

const char * menu_about_strings[] = { "Bucanero", "PS4 Cheats Manager",
"Ctn123", "Cheat Engine",
"ShininGami", "Cheat Engine",
"Shiningami", "Cheat Engine",
"SiSTRo", "GoldHEN, Cheat Menu",
"Kameleon", "QA Support",
"", "",
Expand Down Expand Up @@ -692,7 +692,7 @@ void doSaveMenu(save_list_t * save_list)
SetMenu(MENU_PATCHES);
return;
}
else if (pad_check_button(ORBIS_PAD_BUTTON_TRIANGLE) && save_list->UpdatePath)
else if (pad_check_button(ORBIS_PAD_BUTTON_TRIANGLE)) // && save_list->UpdatePath)
{
selected_entry = list_get_item(save_list->list, menu_sel);
if (selected_entry->type != FILE_TYPE_MENU)
Expand Down Expand Up @@ -952,25 +952,25 @@ void doPatchMenu()
selected_centry = list_get_item(selected_entry->codes, menu_sel);

if (selected_centry->type != PATCH_NULL)
selected_centry->activated = !selected_centry->activated;
// selected_centry->activated = !selected_centry->activated;

if (selected_centry->type == PATCH_COMMAND)
execCodeCommand(selected_centry, selected_centry->codes);

if (selected_centry->activated)
{
/*
// Only activate Required codes if a cheat is selected
if (selected_centry->type == PATCH_GAMEGENIE || selected_centry->type == PATCH_BSD)
{
code_entry_t* code;
list_node_t* node;
for (node = list_head(selected_entry->codes); (code = list_get(node)); node = list_next(node))
if (0)
// if (wildcard_match_icase(code->name, "*(REQUIRED)*"))
if (wildcard_match_icase(code->name, "*(REQUIRED)*"))
code->activated = 1;
}
/*
if (!selected_centry->options)
{
int size;
Expand Down Expand Up @@ -1007,8 +1007,7 @@ void doPatchMenu()
{
selected_centry = list_get_item(selected_entry->codes, menu_sel);

if (selected_centry->type == PATCH_GAMEGENIE || selected_centry->type == PATCH_BSD ||
selected_centry->type == PATCH_TROP_LOCK || selected_centry->type == PATCH_TROP_UNLOCK)
if (selected_centry->type == PATCH_VIEW)
{
SetMenu(MENU_PATCH_VIEW);
return;
Expand Down Expand Up @@ -1276,9 +1275,9 @@ s32 main(s32 argc, const char* argv[])
if (menu_pad_help[menu_id])
{
u8 alpha = 0xFF;
if (pad_data.idle > 80)
if (pad_data.idle > 0x800)
{
int dec = (pad_data.idle - 80) * 4;
int dec = (pad_data.idle - 0x800) * 2;
if (dec > alpha)
dec = alpha;
alpha -= dec;
Expand Down
4 changes: 2 additions & 2 deletions source/menu_cheats.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ int DrawCodes(code_entry_t* code, u8 alpha, int y_inc, int xOff, int selIndex)
SetFontSize(APP_FONT_SIZE_SELECTION);
//SetCurrentFont(font_comfortaa_regular);

if (code->file && (code->type == PATCH_BSD || code->type == PATCH_GAMEGENIE))
DrawFormatString(xOff + MENU_ICON_OFF + 20, 880, "Target File: %s", code->file);
if (code->file && (code->type == PATCH_VIEW))
DrawFormatString(xOff + MENU_ICON_OFF + 20, 880, "File: %s", code->file);

for (c = startDrawX; c < max; c++)
{
Expand Down

0 comments on commit 1178a3b

Please sign in to comment.