#include #include #include #include "gfx.h" #include // #include "sans.h" int main() { // why am i doing this? gfx_Begin(); fontlib_font_t* sans = fontlib_GetFontByIndex("SANSFONT", 0); if (!sans) { // cannot find font! gfx_SetMonospaceFont(8); gfx_SetTextFGColor(0); gfx_PrintStringXY("SANSFONT appvar not found or invalid.", 5, 5); gfx_PrintStringXY("transfer SANSFONT.8xv to this", 5, 15); gfx_PrintStringXY("calculator and try again.", 5, 25); while (!os_GetCSC()); gfx_End(); return 0; } gfx_SetPalette(global_palette, sizeof_global_palette, 0); gfx_FillScreen(1); gfx_Sprite_NoClip(sad, 25, 50); fontlib_SetWindowFullScreen(); fontlib_SetCursorPosition(25, 90); fontlib_SetColors(0, 1); fontlib_SetTransparency(true); fontlib_SetNewlineOptions(FONTLIB_ENABLE_AUTO_WRAP | FONTLIB_AUTO_CLEAR_TO_EOL | FONTLIB_PRECLEAR_NEWLINE); gfx_SetTextBGColor(1); gfx_SetTextFGColor(0); fontlib_SetFont(sans, 0); fontlib_DrawString("Your calculator ran into a"); fontlib_SetCursorPosition(25, 110); fontlib_DrawString("problem and needs to restart."); fontlib_SetCursorPosition(25, 130); fontlib_DrawString("We're collecting some error info,"); fontlib_SetCursorPosition(25, 150); fontlib_DrawString("then we'll restart for you."); // fontlib_SetCursorPosition(25, 170); // fontlib_DrawString("(0%% complete)"); // fontlib_SetCursorPosition(25, 190); // fontlib_DrawString("we'll restart for you."); /* gfx_SetMonospaceFont(8); gfx_SetColor(0); gfx_PrintStringXY("Your calculator ran into a", 25, 90); gfx_PrintStringXY("problem and needs to restart.", 25, 105); gfx_PrintStringXY("We're collecting some error info,", 25, 120); gfx_PrintStringXY("and then we'll restart for you.", 25, 135); */ while (true) { kb_Scan(); if (kb_IsDown(kb_KeyYequ) && kb_IsDown(kb_KeyZoom) && kb_IsDown(kb_KeyGraph)) { break; } } gfx_End(); return 0; }