Welcome to this forum, please register and share your experience
#ifndef __VARS_H__#define __VARS_H__typedef struct{ int test; } _vars;extern _vars vars;#endif
#include <jo/jo.h>#include "vars.h"void draw_screen(void){ jo_clear_screen(); if(vars.test == 1) { jo_printf_with_color(15, 5, JO_COLOR_INDEX_White, "test 1"); } if(vars.test == 2) { jo_printf_with_color(15, 5, JO_COLOR_INDEX_White, "test 2"); }}void initialize(void){ jo_core_init(JO_COLOR_Black); jo_core_add_callback(draw_screen); jo_core_run();}void jo_main(void){ initialize(); vars.test = 2;}