A virtual currency betting bot for Twitch chat. https://ddark.net/better
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
1.3 KiB

#ifndef BETTER_FUNC_H
#define BETTER_FUNC_H
struct App;
struct UserInfo;
struct ost_node;
#define add_log(app, log_level, ...) _add_log(app, log_level, __FILE__, __LINE__, __VA_ARGS__)
void free_indirect(void** p);
bool is_digit(char c);
void make_lower(char* s);
bool str_contains(const char* const s, const char c);
void trim_whitespace(char* s);
void collapse_spaces(char* s);
char* into_utf8(const wchar_t* str);
FILE* base_open(App* app, const wchar_t* filename, const wchar_t* mode);
void copy_imgui_ini(App* app);
void _add_log(App* app, const u8 log_level, const char* src_file, const i32 src_line, const char* const fmt ...);
void open_url(const char* url);
void update_imgui_style(App* app);
void load_settings_from_disk(App* app);
void save_settings_to_disk(App* app);
void load_leaderboard_from_disk(App* app);
void save_leaderboard_to_disk(App* app);
u32 get_privmsg_interval(App* app);
void rebuild_fonts(App* app, ImGuiIO& io);
int tree_comp(UserInfo* k1, UserInfo* k2);
void* tree_alloc(size_t size);
void tree_free(void* ptr);
UserInfo* add_user(App* app, const char* name, u64 points);
void rebuild_leaderboard(App* app);
u32 get_leaderboard_rank(App* app, ost_node* node);
#if BETTER_DEBUG
void start_reading_spoof_messages(App* app);
void stop_reading_spoof_messages(App* app);
void read_spoof_messages(App* app);
#endif
#endif // BETTER_FUNC_H