/***************************************************************************** * Copyright (C) 2010 by ANNEHEIM Geoffrey * Contact: geoffrey.anneheim@gmail.com * * Original code by BoneSoft: * http://www.codeproject.com/KB/GDI-plus/FunWithGravity.aspx * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. * * RCSID $Id$ *****************************************************************************/ #include #include "utils.h" inline void clearScreen() { memset(SCREEN_BASE_ADDRESS, 0xFF, SCREEN_BYTES_SIZE); } void showSimpleDialogBox(const char* title, const char* msg) { char* buffTitle; char* buffMsg; buffTitle = (char*)malloc(0x200); buffMsg = (char*)malloc(0x800); ascii2utf16(buffTitle, title, 0x80); ascii2utf16(buffMsg, msg, 0x200); show_dialog_box2(0, buffTitle, buffMsg); free(buffTitle); free(buffMsg); } void errormsg(const char *message){ char *title; char *msg; title = (char*)malloc(0x200); msg = (char*)malloc(0x800); ascii2utf16(title, "Boot2 Flashing Tool", 0x80); ascii2utf16(msg, message, 0x200); show_dialog_box2(0, title, msg); free(title); free(msg); }