void pick_compatibility() { get_reg_data(); SetCursor(sword_curs); cd_create_dialog(1100,mainPtr); cd_set_led(1100,7,(party.stuff_done[SDF_COMPATIBILITY_LEGACY_DAY_REACHED]!= 0) ? 1: 0);// party.stuff_done[309][0] legacy_day_reached cd_set_led(1100,9,(party.stuff_done[SDF_COMPATIBILITY_LEGACY_KILL_NODE] != 0) ? 0 : 1);// party.stuff_done[309][1] legacy_kill_node cd_set_led(1100,11,(party.stuff_done[SDF_COMPATIBILITY_WORKING_TOWN_WATERFALL] != 0) ? 0 : 1);// party.stuff_done[309][2] town_waterfalls cd_set_led(1100,13,(party.stuff_done[SDF_COMPATIBILITY_FULL_TRIMS] != 0) ? 1 : 0);// party.stuff_done[309][3] display_grass_trims cd_set_led(1100,15,(party.stuff_done[SDF_COMPATIBILITY_SPECIALS_INTERRUPT_REST] != 0) ? 1 : 0);// party.stuff_done[309][4] special_interrupt cd_set_led(1100,17,(party.stuff_done[SDF_COMPATIBILITY_ANYTIME_STAIRWAY_NODES] != 0) ? 1 : 0);// party.stuff_done[309][5] stairway_everywhere cd_set_led(1100,19,(party.stuff_done[SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING] != 0) ? 1 : 0);// party.stuff_done[309][6] resting_checks_timers cd_set_led(1100,21,(party.stuff_done[SDF_COMPATIBILITY_TRIGGER_SPECIALS_ON_BOAT] != 0) ? 1 : 0);// party.stuff_done[309][7] trigger_special_on_boat /*if (party.help_received[70] == 0) { cd_initial_draw(1100); give_help(70,71,1100); }*/ while (dialog_not_toast) ModalDialog(); cd_kill_dialog(1100,0); //adjust_window_mode(); }
void pick_preferences() { get_reg_data(); cur_display_mode = display_mode; SetCursor(sword_curs); cd_create_dialog(1099,mainPtr); cd_set_led(1099,4 + cur_display_mode,1); cd_set_led(1099,18,(party.stuff_done[SFD_NO_MAPS] != 0) ? 1 : 0); cd_set_led(1099,20,(play_sounds == false) ? 1 : 0); cd_set_led(1099,22,(party.stuff_done[SDF_NO_FRILLS] != 0) ? 1 : 0); cd_set_led(1099,24,(party.stuff_done[SDF_ROOM_DESCS_AGAIN] != 0) ? 1 : 0); cd_set_led(1099,27,(party.stuff_done[SDF_NO_INSTANT_HELP] != 0) ? 1 : 0); cd_set_led(1099,38,(party.stuff_done[SDF_EASY_MODE] != 0) ? 1 : 0); cd_set_led(1099,40,(party.stuff_done[SDF_LESS_WANDER_ENC] != 0) ? 1 : 0); cd_set_led(1099,43,(party.stuff_done[SDF_NO_TER_ANIM] != 0) ? 1 : 0); cd_set_led(1099,45,(party.stuff_done[SDF_NO_SHORE_FRILLS] != 0) ? 1 : 0); cd_set_led(1099,50,(party.stuff_done[SDF_NO_TARGET_LINE] != 0) ? 1 : 0); cd_set_led(1099,52,(party.stuff_done[SDF_LESS_SOUND] != 0) ? 1 : 0); cd_set_led(1099,54,(play_startup != false) ? 1 : 0); cd_set_led(1099,56,(party.stuff_done[SDF_FASTER_BOOM_SPACES] != 0) ? 1 : 0); cd_set_led(1099,58,(party.stuff_done[SDF_USE_DARKER_GRAPHICS] != 0) ? 1 : 0); cd_set_led(1099,60,(party.stuff_done[SDF_ASK_ABOUT_TEXT_BOX] != 0) ? 1 : 0);// talk edit box appearing ? cd_set_flag(1099,3,1); if (PSD[SDF_GAME_SPEED] == 3) cd_set_led(1099,47,1); else cd_set_led(1099,32 + PSD[SDF_GAME_SPEED] * 2,1); if (party.help_received[55] == 0) { cd_initial_draw(1099); give_help(55,0,1099); } while (dialog_not_toast) ModalDialog(); cd_kill_dialog(1099,0); adjust_window_mode(); }
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmdShow) { MSG msg; WNDCLASS wndclass,wndclass2; short seed; if (!hPrevInstance) { wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(10)); wndclass.hCursor = NULL; wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = MAKEINTRESOURCE(1); wndclass.lpszClassName = szAppName; RegisterClass(&wndclass); wndclass2.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; wndclass2.lpfnWndProc = WndProc; wndclass2.cbClsExtra = 0; wndclass2.cbWndExtra = 0; wndclass2.hInstance = hInstance; wndclass2.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(10)); wndclass2.hCursor = NULL; wndclass2.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wndclass2.lpszMenuName = NULL; wndclass2.lpszClassName = szWinName; RegisterClass(&wndclass2); } mainPtr = CreateWindow (szAppName, "Classic Blades of Exile Character Editor", WS_OVERLAPPEDWINDOW, 0, 0, 536, 478, NULL, NULL, hInstance, NULL); if (!hPrevInstance) { // initialize Get_Path(file_path_name); //store the path to the executable store_hInstance = hInstance; accel = LoadAccelerators(hInstance, MAKEINTRESOURCE(1)); get_reg_data(); load_cursors(); seed = (short) GetCurrentTime(); srand(seed); max_window(mainPtr); Set_up_win (); font = CreateFont(-9,0,0,0,0, 0,0,0, 0,0, 0,0,0,"MS Sans Serif"); small_bold_font = CreateFont(12,0,0,0,700, 0,0,0, 0,0, 0,0,0,"MS Sans Serif"); italic_font = CreateFont(12,0,0,0,0, 1,0,0, 0,0, 0,0,0,"MS Sans Serif"); underline_font = CreateFont(12,0,0,0,0, 0,1,0, 0,0, 0,0,0,"MS Sans Serif"); bold_font = CreateFont(14,0,0,0,700, 0,0,0, 0,0, 0,0,0,"MS Sans Serif"); tiny_font = font; load_sounds(); ShowWindow(mainPtr,nCmdShow); init_main_buttons(); file_initialize(); check_colors(); cursor_stay(); update_item_menu(1); cd_init_dialogs(); FCD(900,0); } event_handled = FALSE; while(GetMessage(&msg,NULL,0,0)) { if (event_handled == FALSE) { if (!TranslateAccelerator(mainPtr, accel, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } } return msg.wParam; }
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmdShow) { MSG msg; WNDCLASS wndclass, wndclass2; RECT windRECT; HINSTANCE boeSoundsDLL; wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(10)); wndclass.hCursor = NULL; wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = MAKEINTRESOURCE(1); wndclass.lpszClassName = szAppName; RegisterClass(&wndclass); wndclass2.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; wndclass2.lpfnWndProc = WndProc; wndclass2.cbClsExtra = 0; wndclass2.cbWndExtra = 0; wndclass2.hInstance = hInstance; wndclass2.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(10)); wndclass2.hCursor = NULL; wndclass2.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wndclass2.lpszMenuName = NULL; wndclass2.lpszClassName = szWinName; RegisterClass(&wndclass2); mainPtr = CreateWindow (szAppName, "Classic Blades of Exile", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, 588, 478, NULL, NULL, hInstance, NULL); if (!hPrevInstance) { // initialize Get_Path(file_path_name); store_hInstance = hInstance; accel = LoadAccelerators(hInstance, MAKEINTRESOURCE(1)); boeSoundsDLL = LoadLibrary("./boesounds.dll"); if (!boeSoundsDLL) { MessageBox(mainPtr, "BOESOUNDS.DLL not found", "Error", MB_OK | MB_ICONEXCLAMATION); return (-1); } load_sounds(boeSoundsDLL); loadFonts(); loadCursors(); SetCursor(sword_curs); current_cursor = 124; /* cursors loaded */ data_store = new piles_of_stuff_dumping_type; data_store3 = new piles_of_stuff_dumping_type3; data_store4 = new piles_of_stuff_dumping_type4; data_store5 = new piles_of_stuff_dumping_type5; scen_item_list = new scen_item_data_type; srand(GetCurrentTime()); get_reg_data(); if (display_mode != 5) max_window(mainPtr); else { GetWindowRect(GetDesktopWindow(),&windRECT); MoveWindow(mainPtr,(windRECT.right - (588 + 10)) / 2, (windRECT.bottom - (425 + 52)) / 2 , 588 + 10,425 + 52,true); } shop_sbar = CreateWindow("scrollbar",NULL, WS_CHILD | WS_TABSTOP | SBS_VERT, shop_sbar_rect.left,shop_sbar_rect.top,shop_sbar_rect.right,shop_sbar_rect.bottom, mainPtr,(HMENU) 3, store_hInstance,NULL); lpsi.fMask = SIF_RANGE; lpsi.nMax = 16; SetScrollInfo(shop_sbar,SB_CTL,&lpsi,false); // SetScrollRange(shop_sbar,SB_CTL,0,16,false); ShowWindow(mainPtr, nCmdShow); plop_fancy_startup(); init_screen_locs(); FlushEvents(2); SetTimer(mainPtr,1,620,NULL); SetTimer(mainPtr,2,200,NULL); file_initialize(); if (GetDeviceCaps(main_dc,BITSPIXEL) * GetDeviceCaps(main_dc,PLANES) < 8) { MessageBox(mainPtr,"Blades of Exile is designed for 256 colors. The current graphics device is set for less. Exile 3 is playable with less colors, but will look somewhat odd." , "Not 256 colors!",MB_OK | MB_ICONEXCLAMATION); MessageBox(mainPtr,"For tips on how to get 256 colors, hit F1 for help, and then select 'Getting 256 Colors' from the table of contents." , "Not 256 colors!",MB_OK | MB_ICONEXCLAMATION); } menu_activate(0); cursor_stay(); showcursor(true); reset_text_bar(); adjust_window_mode(); cd_init_dialogs(); if (game_run_before == false) { FCD(986,0); WritePrivateProfileString("Blades of Exile", "game_run_before", "1", "./blades.ini"); } else if (give_intro_hint == true) tip_of_day(); } event_handled = false; while(GetMessage(&msg,NULL,0,0)) { if (event_handled == false) { if (!TranslateAccelerator(mainPtr, accel, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } } delete scen_item_list; delete data_store5; delete data_store4; delete data_store3; if(data_store2 != NULL) delete[] data_store2; if(scen_headers != NULL) delete[] scen_headers; delete data_store; lose_graphics(); FreeLibrary((HMODULE) boeSoundsDLL); return msg.wParam; }