# HG changeset patch # User Nomad # Date 1382535965 -7200 # Node ID 3eb0c4f3d89960e326898dfe89f748a38e731f80 # Parent f4d5082b4a39e7ee18b67239c215485a0ce241b8 Woops, debug stuff. diff -r f4d5082b4a39 -r 3eb0c4f3d899 OSAPI.cpp --- a/OSAPI.cpp Wed Oct 23 15:37:51 2013 +0200 +++ b/OSAPI.cpp Wed Oct 23 15:46:05 2013 +0200 @@ -6,53 +6,11 @@ OSVersion *pVersion = nullptr; -#include + //----- (00462C94) -------------------------------------------------------- int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd) { - auto cvt = [] (const char *filename) - { - char ico_filename[512]; - sprintf(ico_filename, "%s.ico", filename); - - char c_filename[512]; - sprintf(c_filename, "%s.c", filename); - auto file = fopen(ico_filename, "rb"); - { - auto o = fopen(c_filename, "w+t"); - fprintf(o, "unsigned char %s[] =\n{\n\t", filename); - - int position = 0; - bool once = true; - while (!feof(file)) - { - unsigned char c; - fread(&c, 1, 1, file); - - if (position == 7) - fprintf(o, ",\t"); - else if (position != 0) - fprintf(o, ", "); - - fprintf(o, "0x%02X", (unsigned int)c); - if (++position == 15) - { - fprintf(o, ",\n\t"); - position = 0; - } - } - - fprintf(o, "\n};"); - fclose(o); - } - fclose(file); - }; - - cvt("mm6_icon"); - cvt("mm7_icon"); - cvt("mm8_icon"); - Log::Initialize(); //if (HWND hMM7Window = FindWindowW(L"MM7", 0))