#include #include #include #include #include #include #include "levels.h" // VIEWERS NOTE: I kinda have trouble with not spamming conditionals everywhere :P // Don't change these. int current_level = 0; int highlighted_bottle = 0; int selected_bottle = -1; int num_bottles = 4; int current_bottles[8][4] = {{0,0,1,1}, {0,0,1,1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}}; // The current bottle levels that can be changed at any time. int bottle_colors[7] = {0x94, 0xE0, 0x07, 0x18, 0xE3, 0xF8, 0x00}; // Colour of each level. int trunc_mod(int a, int b) { return ((a % b) + b) % b; // This does modulos on negative nums. } void draw() { gfx_FillScreen(0xFF); gfx_SetTextTransparentColor(0); gfx_SetTextBGColor(0xFF); gfx_SetTextFGColor(0x7F); gfx_SetTextScale(3,3); gfx_SetTextXY(42,20); gfx_PrintString("Liquid Sort!"); gfx_SetTextFGColor(0x98); gfx_SetTextScale(2,2); gfx_SetTextXY(32,200); gfx_PrintString("Current Level: "); gfx_SetTextXY(16*sizeof("Current Level: "),200); gfx_PrintInt(current_level, 1); int win_count = 0; num_bottles = 0; for (int i = 0; i<8; i++) { if (bottle_levels[current_level][i][0]!=-1) { num_bottles++; } } for (int i = 0; i