Vignette
This commit is contained in:
parent
463ede508e
commit
73b3cd10af
@ -13,15 +13,13 @@ install(
|
||||
RENAME "titleBG.png"
|
||||
)
|
||||
|
||||
# Chest Model
|
||||
# Mojang Textures
|
||||
install(
|
||||
FILES "chest.png"
|
||||
FILES "mojang/chest.png"
|
||||
DESTINATION "${MCPI_INSTALL_DIR}/data/images/item"
|
||||
)
|
||||
|
||||
# Entity Shadow
|
||||
install(
|
||||
FILES "shadow.png"
|
||||
FILES "mojang/shadow.png" "mojang/vignette.png"
|
||||
DESTINATION "${MCPI_INSTALL_DIR}/data/images/misc"
|
||||
)
|
||||
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 868 B |
BIN
images/mojang/vignette.png
Normal file
BIN
images/mojang/vignette.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@ -111,3 +111,4 @@ TRUE Fix Crash When Generating Certain Seeds
|
||||
TRUE Click Buttons On Mouse Down
|
||||
TRUE 3D Dropped Items
|
||||
TRUE Render Entity Shadows
|
||||
TRUE Render Vignette
|
@ -15,7 +15,7 @@ __attribute__((visibility("internal"))) void _add_handler(unsigned char id, hand
|
||||
} \
|
||||
static uint32_t _run_##name(__attribute__((unused)) trampoline_writer_t writer, const unsigned char *raw_args) { \
|
||||
__attribute__((unused)) TrampolineArguments args(raw_args); \
|
||||
static typeof(name) *func = name;
|
||||
static constexpr typeof(name) *func = name;
|
||||
|
||||
// Arguments
|
||||
struct TrampolineArguments {
|
||||
|
@ -455,6 +455,18 @@ static void ItemRenderer_render_injection(ItemRenderer_render_t original, ItemRe
|
||||
}
|
||||
}
|
||||
|
||||
// Vignette
|
||||
static void Gui_renderProgressIndicator_injection(Gui_renderProgressIndicator_t original, Gui *self, const bool is_touch, int width, int height, float a) {
|
||||
// Render
|
||||
glEnable(GL_BLEND);
|
||||
self->minecraft->textures->blur = true;
|
||||
self->renderVignette(self->minecraft->player->getBrightness(a), width, height);
|
||||
self->minecraft->textures->blur = false;
|
||||
glDisable(GL_BLEND);
|
||||
// Call Original Method
|
||||
original(self, is_touch, width, height, a);
|
||||
}
|
||||
|
||||
// Init
|
||||
void _init_misc_graphics() {
|
||||
// Disable V-Sync
|
||||
@ -554,6 +566,11 @@ void _init_misc_graphics() {
|
||||
overwrite_call((void *) 0x4bf34, (void *) ItemInHandRenderer_renderItem_glTranslatef_injection);
|
||||
}
|
||||
|
||||
// Vignette
|
||||
if (feature_has("Render Vignette", server_disabled)) {
|
||||
overwrite_calls(Gui_renderProgressIndicator, Gui_renderProgressIndicator_injection);
|
||||
}
|
||||
|
||||
// Don't Render Game In Headless Mode
|
||||
if (reborn_is_headless()) {
|
||||
overwrite_calls(GameRenderer_render, nop<GameRenderer_render_t, GameRenderer *, float>);
|
||||
|
@ -15,6 +15,8 @@ method void renderSlotText(const ItemInstance *item, float x, float y, bool fini
|
||||
method void handleKeyPressed(int key) = 0x25a08;
|
||||
method void renderHearts() = 0x2641c;
|
||||
method void renderDebugInfo() = 0x26958;
|
||||
method void renderProgressIndicator(bool is_touch, int width, int height, float a) = 0x26098;
|
||||
method void renderVignette(float param_1, int width, int height) = 0x25b0c;
|
||||
|
||||
property Minecraft *minecraft = 0x9f4;
|
||||
property float selected_item_text_timer = 0x9fc;
|
||||
|
@ -3,3 +3,5 @@ method int loadAndBindTexture(const std::string &name) = 0x539cc;
|
||||
method int assignTexture(const std::string &name, uchar *data) = 0x5354c;
|
||||
method void addDynamicTexture(DynamicTexture *texture) = 0x534f8;
|
||||
method Texture *getTemporaryTextureData(uint id) = 0x53168;
|
||||
|
||||
property bool blur = 0x39;
|
Loading…
Reference in New Issue
Block a user