/***************************************************************************** * 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; char *language = "E\x00n\x00g\x00l\x00i\x00s\x00h\x00\x00"; buffTitle = (char*)malloc(0x200); buffMsg = (char*)malloc(0x800); ascii2utf16(buffTitle, title, 0x80); ascii2utf16(buffMsg, msg, 0x200); show_dialog_box2( buffTitle, msg, (const char*)&language[0]); free(buffTitle); free(buffMsg); } void showSimpleDialogBox(const char* title, const char* msg) { char* buffTitle; char* buffMsg; char *language = "E\x00n\x00g\x00l\x00i\x00s\x00h\x00\x00"; buffTitle = (char*)malloc(0x200); buffMsg = (char*)malloc(0x800); ascii2utf16(buffTitle, title, 0x80); ascii2utf16(buffMsg, msg, 0x200); show_dialog_box2( buffTitle, buffMsg, (const char*)&language[0]); free(buffTitle); free(buffMsg); } int showEntrydialogBox(const char* title, const char* Label, const char* defentry){ char *buffTitle; char *buffLabel; char *bufentry; int ans; buffTitle = (char*)malloc(0x80); buffLabel = (char*)malloc(0x80); bufentry = (char*)malloc(0x100); ascii2utf16(buffTitle, title, 0x80); ascii2utf16(buffLabel, Label, 0x80); ascii2utf16(bufentry, defentry, 0x100); ans = show_Entrydialog_box(0,bufentry); // The only used prameter is bufentry memcpy((void*)defentry,(void*)bufentry,0x200); if (ans == 0x13f1){ memcpy((void*)defentry,(void*)bufentry,0x200); free(buffTitle); free(buffLabel); free(bufentry); return ans; } free(buffTitle); free(buffLabel); free(bufentry); return ans; }