LIExtModule* liext_heightmap_new ( LIMaiProgram* program) { LIExtModule* self; int i; /* Allocate self. */ self = lisys_calloc (1, sizeof (LIExtModule)); if (self == NULL) return NULL; self->program = program; for (i=0; i<HEIGHTMAP_MAX_TEXTURES; i++) self->materials[i] = 0; /* Prepare images */ self->file1[0] = 0; self->file2[0] = 0; self->data1 = NULL; self->data2 = NULL; /* Register classes. */ liscr_script_set_userdata (program->script, LIEXT_SCRIPT_HEIGHTMAP, self); liext_script_heightmap (program->script); printf("heightmap initialized"); return self; }
LIExtModule* liext_heightmap_new ( LIMaiProgram* program) { LIExtModule* self; /* Allocate self. */ self = lisys_calloc (1, sizeof (LIExtModule)); if (self == NULL) return NULL; self->program = program; /* Allocate paths */ //self->paths = lipth_paths_new (NULL, LIEXT_SCRIPT_HEIGHTMAP); /* Register classes. */ liscr_script_set_userdata (program->script, LIEXT_SCRIPT_HEIGHTMAP, self); liext_script_heightmap (program->script); printf("heightmap initialized"); return self; }