Simpler Smooth Lighting Patch
This commit is contained in:
parent
0eb10dea7c
commit
0d6db1e606
@ -408,12 +408,6 @@ HOOK(SDL_GetWMInfo, int, (SDL_SysWMinfo *info)) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force Smooth Shading In Smooth Lighting Mode
|
|
||||||
HOOK(glShadeModel, void, (GLenum mode)) {
|
|
||||||
ensure_glShadeModel();
|
|
||||||
(*real_glShadeModel)(extra_get_smooth_lighting() ? GL_SMOOTH : mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
// Use VirGL
|
// Use VirGL
|
||||||
|
@ -127,6 +127,7 @@ static char *get_username() {
|
|||||||
static int fancy_graphics;
|
static int fancy_graphics;
|
||||||
static int peaceful_mode;
|
static int peaceful_mode;
|
||||||
static int anaglyph;
|
static int anaglyph;
|
||||||
|
static int smooth_lighting;
|
||||||
// Configure Options
|
// Configure Options
|
||||||
static void Minecraft_init_injection(unsigned char *this) {
|
static void Minecraft_init_injection(unsigned char *this) {
|
||||||
// Call Original Method
|
// Call Original Method
|
||||||
@ -141,6 +142,8 @@ static void Minecraft_init_injection(unsigned char *this) {
|
|||||||
*(int32_t *) (options + 0xe8) = peaceful_mode ? 0 : 2;
|
*(int32_t *) (options + 0xe8) = peaceful_mode ? 0 : 2;
|
||||||
// 3D Anaglyph
|
// 3D Anaglyph
|
||||||
*(options + 0x15) = anaglyph;
|
*(options + 0x15) = anaglyph;
|
||||||
|
// Smooth Lighting
|
||||||
|
*(options + 0x18) = smooth_lighting;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is Dedicated Server
|
// Is Dedicated Server
|
||||||
@ -190,12 +193,6 @@ static int32_t Minecraft_isTouchscreen_injection(__attribute__((unused)) unsigne
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store Smooth Lighting
|
|
||||||
static int smooth_lighting;
|
|
||||||
int extra_get_smooth_lighting() {
|
|
||||||
return smooth_lighting;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Store Left Click (0 = Not Pressed, 1 = Pressed, 2 = Repeat)
|
// Store Left Click (0 = Not Pressed, 1 = Pressed, 2 = Repeat)
|
||||||
// This Is Set To Repeat After First Attempted Left-Click Build Interaction
|
// This Is Set To Repeat After First Attempted Left-Click Build Interaction
|
||||||
static int is_left_click = 0;
|
static int is_left_click = 0;
|
||||||
|
@ -18,8 +18,6 @@ void extra_third_person();
|
|||||||
|
|
||||||
void extra_set_is_left_click(int val);
|
void extra_set_is_left_click(int val);
|
||||||
|
|
||||||
int extra_get_smooth_lighting();
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user