#include "bar.h" #include "choice.h" #include #include static struct Bar bars[BAR_TOTAL]; static struct Choice choice; static void main_draw(void); int main(void) { int i; /* init */ for (i = 0; i < BAR_TOTAL; i += 1) bars[i] = bar_init(i); choice = choice_init(); bar_change(&bars[BAR_CASH], 0.2); bar_change(&bars[BAR_SMILE], 0.4); main_draw(); getkey(); return 1; } static void main_draw(void) { extern bopti_image_t bimg_background; int i; /* draw background */ dimage(0, 0, &bimg_background); /* draw bars */ for (i = 0; i < BAR_TOTAL; i += 1) bar_draw(bars[i]); /* draw choice */ choice_draw(choice); dupdate(); }