diff --git a/mods/src/misc/tinting.cpp b/mods/src/misc/tinting.cpp index 82e8394b19..75926d6822 100644 --- a/mods/src/misc/tinting.cpp +++ b/mods/src/misc/tinting.cpp @@ -7,10 +7,12 @@ // Change Grass Color static int32_t get_color(LevelSource *level_source, int32_t x, int32_t z) { + // Get Biome const Biome *biome = level_source->getBiome(x, z); if (biome == nullptr) { return 0; } + // Return return biome->color; } #define BIOME_BLEND_SIZE 7 diff --git a/mods/src/textures/textures.cpp b/mods/src/textures/textures.cpp index 8b7fc18788..f1fbc75b67 100644 --- a/mods/src/textures/textures.cpp +++ b/mods/src/textures/textures.cpp @@ -26,7 +26,7 @@ static void Minecraft_tick_injection(const Minecraft *minecraft) { // Store Texture Sizes struct texture_data { - GLint id; + GLuint id; GLsizei width; GLsizei height; }; @@ -37,7 +37,7 @@ static std::vector &get_texture_data() { HOOK(glTexImage2D, void, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)) { // Store texture_data data = {}; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &data.id); + glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *) &data.id); data.width = width; data.height = height; get_texture_data().push_back(data); @@ -48,7 +48,7 @@ HOOK(glTexImage2D, void, (GLenum target, GLint level, GLint internalformat, GLsi HOOK(glDeleteTextures, void, (GLsizei n, const GLuint *textures)) { // Remove Old Data for (int i = 0; i < n; i++) { - const GLint id = textures[i]; + const GLuint id = textures[i]; std::vector::iterator it = get_texture_data().begin(); while (it != get_texture_data().end()) { const texture_data data = *it; @@ -63,7 +63,7 @@ HOOK(glDeleteTextures, void, (GLsizei n, const GLuint *textures)) { // Call Original Method real_glDeleteTextures()(n, textures); } -static void get_texture_size(const GLint id, GLsizei *width, GLsizei *height) { +static void get_texture_size(const GLuint id, GLsizei *width, GLsizei *height) { // Iterate std::vector::iterator it = get_texture_data().begin(); while (it != get_texture_data().end()) { diff --git a/symbols/src/level/Biome.def b/symbols/src/level/Biome.def index a35649ec79..1b212f3dee 100644 --- a/symbols/src/level/Biome.def +++ b/symbols/src/level/Biome.def @@ -15,6 +15,7 @@ virtual-method float getCreatureProbability() = 0x20; property int color = 0x2c; property int leaf_color = 0x34; +property std::string name = 0x28; // This is a Biome*[64x64], temp x humidity static-property Biome *map[4096] = 0x17c970; diff --git a/symbols/src/textures/Textures.def b/symbols/src/textures/Textures.def index 01a8312b4e..a23edb4fad 100644 --- a/symbols/src/textures/Textures.def +++ b/symbols/src/textures/Textures.def @@ -1,6 +1,7 @@ method void tick(bool param_1) = 0x531c4; -method int loadAndBindTexture(const std::string &name) = 0x539cc; -method int assignTexture(const std::string &name, uchar *data) = 0x5354c; +method uint loadAndBindTexture(const std::string &name) = 0x539cc; +method uint loadTexture(const std::string &name, bool param_1) = 0x53800; +method uint assignTexture(const std::string &name, uchar *data) = 0x5354c; method void addDynamicTexture(DynamicTexture *texture) = 0x534f8; method Texture *getTemporaryTextureData(uint id) = 0x53168;