feat: cluster implemented
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -18,7 +18,7 @@
|
|||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "selection_menu.h"
|
||||||
|
|
||||||
#define MAX_PATH_LEN 256
|
#define MAX_PATH_LEN 256
|
||||||
EZ_DRAWABLE* main_menu_drawables[12];
|
EZ_DRAWABLE* main_menu_drawables[12];
|
||||||
@ -74,8 +74,10 @@ void button_action_switch(EZ_button* tmp)
|
|||||||
{
|
{
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
loaded_image= rotate_pixels(loaded_image, rotation);
|
loaded_image= rotate_pixels(loaded_image, rotation);
|
||||||
|
on_selection_menu_load();
|
||||||
EZ_select_menu(1);
|
EZ_select_menu(1);
|
||||||
selection_menu_enter();
|
selection_menu_enter();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_image(EZ_text_input* tmp)
|
void load_image(EZ_text_input* tmp)
|
||||||
|
@ -21,6 +21,11 @@ EZ_INTERACTIBLE* selection_menu_interactibles[6];
|
|||||||
|
|
||||||
void* selection_menu_objects[14];
|
void* selection_menu_objects[14];
|
||||||
|
|
||||||
|
pixel_cluster** cluster_splitting;
|
||||||
|
size_t linkage_length;
|
||||||
|
size_t* array_length;
|
||||||
|
|
||||||
|
|
||||||
EZ_MENU selection_menu;
|
EZ_MENU selection_menu;
|
||||||
|
|
||||||
void unload_selection_menu(void)
|
void unload_selection_menu(void)
|
||||||
@ -30,7 +35,10 @@ void unload_selection_menu(void)
|
|||||||
free(selection_menu_objects[i]);
|
free(selection_menu_objects[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void on_selection_menu_load()
|
||||||
|
{
|
||||||
|
cluster_splitting= get_main_linkages(loaded_image, &linkage_length, &array_length);
|
||||||
|
}
|
||||||
void selection_menu_process_events(SDL_Window* window, SDL_Renderer* renderer, SDL_Event* event, EZ_MENU* current_menu) //exectuted each frame with all avaliable events
|
void selection_menu_process_events(SDL_Window* window, SDL_Renderer* renderer, SDL_Event* event, EZ_MENU* current_menu) //exectuted each frame with all avaliable events
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,4 +9,5 @@ void load_selection_menu(SDL_Renderer* renderer);
|
|||||||
|
|
||||||
void selection_menu_enter(void);
|
void selection_menu_enter(void);
|
||||||
|
|
||||||
|
void on_selection_menu_load();
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user