// Header File // Created 30.07.2005; 23:29:45 /* This header file can be inlcuded in every project released under boolsoft. If you have included it, use the intro by calling BoolsoftIntro([mode]); at the beginning of your program, while [mode] has to be either TRUE or FALSE. If you pass TRUE, the letters will be white and the background will be black. If you pass FALSE, the letters will be black and the background will be white. ATTENTION: Grayscale graphics have to be turned off if you want call the intro! */ #include #include #include #include #include #include #include // Make the processor do something for a bit inline void BoolsoftWait(unsigned int delay) { unsigned int loop; for (loop = 0; loop < delay; loop++) { pokeIO(0x600005, 0b10111); } } // Intro for any boolsoft programs void BoolsoftIntro(BOOL mode) { const char *msg = "boolsoftpresents"; unsigned short i, x1, x2, y; ClrScr(); // Blackens the screen if (mode) memset(LCD_MEM, 0xFF, LCD_SIZE); y = (LCD_HEIGHT / 2) - 12; FontSetSys(F_8x10); // Title for (i = 0; i < 4; i++) { x1 = 0; x2 = LCD_WIDTH-8; // "Flying" loop do { x1++; x2--; // Change X-positions // Draw chars if (x1 < ((LCD_WIDTH / 2) - 36) + (i*9)) { DrawChar(x1, y, msg[i], A_XOR); DrawChar(x2, y, msg[7-i], A_XOR); } //Wait(150); BoolsoftWait(2); // Delete chars if (x1 < ((LCD_WIDTH / 2) - 36) + (i*9)) { DrawChar(x1, y, msg[i], A_XOR); DrawChar(x2, y, msg[7-i], A_XOR); } } while (x1 < ((LCD_WIDTH / 2) - 36) + (i*9)); DrawChar(x1, y, msg[i], A_XOR); DrawChar(x2, y, msg[7-i], A_XOR); } //Wait(5000); BoolsoftWait(67); // Line for (i = 0; i < 38; i++) { DrawPix((LCD_WIDTH / 2 - 20) + i, LCD_HEIGHT / 2, A_XOR); //Wait(500); BoolsoftWait(7); } FontSetSys(F_4x6); // Subtitle for (i = 0; i < 8; i++) { DrawChar((LCD_WIDTH / 2 - 24) + (i*6), y + 15, msg[i+8], A_XOR); //Wait(1000); BoolsoftWait(14); } //Wait(30000); BoolsoftWait(400); // Fade Lighter and Darker for (i = 0; i < 5; i++) { OSContrastDn(); if(HW_VERSION == 2) OSContrastDn(); //for (y = 0; y < 40000; y++); BoolsoftWait(20); } ClrScr(); for (i = 0; i < 5; i++) { OSContrastUp(); if(HW_VERSION == 2) OSContrastUp(); //for (y = 0; y < 40000; y++); BoolsoftWait(20); } }