Small Changes
This commit is contained in:
parent
e7b0932f60
commit
d289f40a5e
@ -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
|
||||
|
@ -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<texture_data> &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<texture_data>::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<texture_data>::iterator it = get_texture_data().begin();
|
||||
while (it != get_texture_data().end()) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user