11
Jo Engine Wish List / Re: 3D Controller support
« Last post by mindslight on November 15, 2020, 08:02:31 pm »Ok 

#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;
}
ffmpeg -i title.wav -f s16be -ar 8000 -ac 1 ../../cd/TITLE.PCM
ffplay -f s16be -ar 8000 -ac 1 ../../cd/TITLE.PCM