This commit is contained in:
TheBrokenRail 2022-04-23 18:49:08 -04:00
parent 82b6252927
commit 3ebdffd396
3 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@
// Read Asset File
static AppPlatform_readAssetFile_return_value AppPlatform_readAssetFile_injection(__attribute__((unused)) unsigned char *app_platform, std::string const& path) {
// Read File
std::string full_path("./data/");
std::string full_path("data/");
full_path.append(path);
std::ifstream stream(full_path);
std::string str((std::istreambuf_iterator<char>(stream)), std::istreambuf_iterator<char>());

View File

@ -32,8 +32,8 @@ static int32_t Button_hovered_injection(__attribute__((unused)) unsigned char *b
}
static void LargeImageButton_render_GuiComponent_drawCenteredString_injection(unsigned char *component, unsigned char *font, std::string const& text, int32_t x, int32_t y, int32_t color) {
// Change Color On Hover
if (Button_hovered_injection(component, NULL, 0, 0)) {
color = 0x000ffffa0;
if (color == 0xe0e0e0 && Button_hovered_injection(component, NULL, 0, 0)) {
color = 0xffffa0;
}
// Call Original Method

View File

@ -469,7 +469,7 @@ static uint32_t FurnaceTileEntity_getItem_vtable_offset = 0x2c;
// GuiComponent
typedef void (*GuiComponent_blit_t)(unsigned char *component, int32_t param_1, int32_t param_2, int32_t param_3, int32_t param_4, int32_t param_5, int32_t param_6, int32_t param_7, int32_t param_8);
typedef void (*GuiComponent_blit_t)(unsigned char *component, int32_t x_dest, int32_t y_dest, int32_t x_src, int32_t y_src, int32_t width_dest, int32_t height_dest, int32_t width_src, int32_t height_src);
static GuiComponent_blit_t GuiComponent_blit = (GuiComponent_blit_t) 0x282a4;
// Screen