From 034d98713f7869a75b055e66ef3d22e54fafd1c7 Mon Sep 17 00:00:00 2001 From: Chokboyz Date: Mon, 29 Jun 2009 15:43:59 +0000 Subject: [PATCH] Classic Blades of Exile Beta 2 initial upload. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog (without any order) : Bug Fixes : - Giant Strength ability and Skill ability now use the ability strength rather than the item level to calculate effect. - Won't take damage when moving boats over damaging terrains (fire, cold, magic, poison, disease) anymore. - Won't take damage when horses refuses to enter a damaging terrain (fire, cold, magic) anymore. - Horses won't enter damaging terrains (fire, cold, magic) or "horse blocking" terrains when outdoors anymore. - Boom effects won't be displayed at random places when being damaged outdoors anymore. - Damage won't be displayed in boom animation when attacking invulnerable monsters, when they are, in fact, unharmed ... - The first pc won't become active with 0 AP anymore when a pc get killed by backshots. - Fixed the town loading behavior so that Empties won't appear in Place Town Encounters anymore. - Cleaned the ressource file (smaller executable). - Changed the "force place monster" function to preferably flush a summoned monster if flushing is needed. Also prevent a potential infinite loop if trying to force place a monster and all the 60 monsters of a town have a life flag. - Tweaked exploding arrows firing animation to be smoother (arrow fired, then explosion). - The spell usable Stinking Cloud ability was protecting against acid instead of the Protection from Acid ability. Fixed. - The Protection from Disease item ability should now works to the full extent. - Removed a check on the item graphic when deciding whether to play the"swallow" sound; now checks only for item variety. (Celtic Minstrel) - Corrected the code so that the party cannot be split again if already split. - Various messages code cleaning/fixing (Celtic Minstrel) - Removed the 50 node limit. To prevent infinite loop an interrupt sequence has been implemented (Ctrl-C). - Cave Bridges battlefield should now appears instead of basic cave floor. - Wall trims are now working. - Slowdowns due to trims drawing (animated water, ...) should be fixed now. - Scenarios in subfolders (under Scenarios/) are now found. - No more limit for the number of listed scenarios. - Clicking '?' icon on shopping and talk mode now gives help, even if in 'No instant help' mode. Changes : - All terrains and monsters sheets now loaded in memory to bypass storage sheet. That should speed up the game and fix some graphical oddities. Mac and Windows graphics can now be swapped on the fly (i.e without restarting the game). That also removes any graphical limitation in the game. - In the same way, PC graphics will now be drawn directly to the game gworld. - You can't end the scenario via a special node if the party is dead anymore (prevent saving an "all dead" party) - Added a safety check to monsters with Absorb Spells ability to prevent negative health. - Jobs dialog reimplemented (not useable for now). - 'Burma Shave' Easter Egg readded. - Debug Mode : ghost mode implemented. Classic Scenario Editor Beta 2 : - Dumping functions won't change current town/outdoor section anymore. - Finished porting the file IO functions to 32 bits. - Added a rudimentary custom intro picture behavior : if the intro picture is set to 100, the first icon on the custom sheet will be displayed in the scenario selection menu. Scenario intro pics must be drawn on the same scale as talk icons. - Whenever the “Place Random Items” function is used, the editor will inform the user that it could not place all items because the town item # limit has been reached, regardless of how many items are actually in the town. That has been fixed (the message now displays only if the max number of items is indeed reached). - Cleaned the ressources (smaller executable). - Added a Monster data dumping function (dumps all info about monsters : wandering/special enc/town monsters details ...) - Added a Specials data dumping function (dumps all info about specials : number, types, variables, ...) - Town Room/Outdoors Info rectangles are now initialized at ((-1,-1),(-1,-1)) freeing the 0 coordinate and fixing the "Rectangle X" description at (0,0) in the game. - Cleanse Rectangle SDF1 info rewritten to match actual behavior (0 leave force/fire/webs/crate/barrel, 1 cleans all). - Corrected the Do SFX Burst info text (1 - telep., 2 - elec.) - When placing an item with a custom graphic in a town, the editor will display the graphic in the upper-left corner of the space it is placed on. Fixed - If you edit a monster’s abilities and click Cancel, the ability of that monster will be removed. Fixed. - If you edit a item's ability, all previously unsaved modifications are erased. Fixed. - Disappearences of right scroll bar fixed. Chokboyz git-svn-id: http://openexile.googlecode.com/svn/trunk@104 4ebdad44-0ea0-11de-aab3-ff745001d230 --- ...Blades_of_Exile_Character_Editor_private.h | 23 - ...lades_of_Exile_Character_Editor_private.rc | 5 - .../Blades of Exile Char Editor/GRAPHICS.CPP | 13 +- Win32/Blades of Exile/ACTIONS.CPP | 150 +- Win32/Blades of Exile/BLADES.CPP | 51 +- .../Blades of Exile/Blades_of_Exile_private.h | 23 - Win32/Blades of Exile/COMBAT.CPP | 15 +- Win32/Blades of Exile/CONSTS.H | 220 ++- Win32/Blades of Exile/DLGUTILS.CPP | 41 +- Win32/Blades of Exile/DLOGTOOL.CPP | 21 +- Win32/Blades of Exile/EXLSOUND.CPP | 7 +- Win32/Blades of Exile/FILEIO.CPP | 118 +- Win32/Blades of Exile/FILEIO.H | 1 + Win32/Blades of Exile/GAMEDLOG.RC | 23 +- Win32/Blades of Exile/GAMESTR.RC | 1430 +---------------- Win32/Blades of Exile/GLOBAL.H | 7 +- Win32/Blades of Exile/GLOBVAR.CPP | 24 +- Win32/Blades of Exile/GLOBVAR.H | 19 +- Win32/Blades of Exile/GRAPHICS.CPP | 90 +- Win32/Blades of Exile/GRAPHICS.H | 1 - Win32/Blades of Exile/GRAPHUTL.CPP | 2 +- Win32/Blades of Exile/GUTILS.CPP | 39 +- Win32/Blades of Exile/INFODLGS.CPP | 17 +- Win32/Blades of Exile/ITEMDATA.CPP | 2 +- Win32/Blades of Exile/ITEMS.CPP | 6 +- Win32/Blades of Exile/LOCUTILS.CPP | 2 +- Win32/Blades of Exile/MONSTER.CPP | 39 +- Win32/Blades of Exile/NEWGRAPH.CPP | 29 +- Win32/Blades of Exile/PARTY.CPP | 44 +- Win32/Blades of Exile/PARTY.H | 2 +- Win32/Blades of Exile/PC.CPP | 2 +- Win32/Blades of Exile/SPECIALS.CPP | 95 +- Win32/Blades of Exile/SPECIALS.H | 2 +- Win32/Blades of Exile/TEXT.CPP | 69 +- Win32/Blades of Exile/TOWN.CPP | 21 +- Win32/Scenarios Editor/BLSCENED.CPP | 71 +- Win32/Scenarios Editor/BLSCENED.RC | 3 + Win32/Scenarios Editor/BUTTONMG.CPP | 15 +- Win32/Scenarios Editor/DLOGTOOL.CPP | 12 +- Win32/Scenarios Editor/GAMEDLOG.RC | 24 +- Win32/Scenarios Editor/GLOBAL.H | 2 + Win32/Scenarios Editor/GRAPHICS.CPP | 12 +- Win32/Scenarios Editor/KEYDLGS.CPP | 5 +- Win32/Scenarios Editor/SCENARIO.CPP | 66 +- Win32/Scenarios Editor/STRINGS.RC | 2 +- Win32/Scenarios Editor/TACTIONS.CPP | 83 +- Win32/Scenarios Editor/TFILEIO.CPP | 463 +++++- Win32/Scenarios Editor/TFILEIO.H | 2 + Win32/Scenarios Editor/townout.cpp | 12 +- 49 files changed, 1441 insertions(+), 1984 deletions(-) delete mode 100644 Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.h delete mode 100644 Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.rc delete mode 100644 Win32/Blades of Exile/Blades_of_Exile_private.h diff --git a/Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.h b/Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.h deleted file mode 100644 index a07a6822..00000000 --- a/Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.h +++ /dev/null @@ -1,23 +0,0 @@ -/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ -/* DO NOT EDIT ! */ - -#ifndef BLADES_OF_EXILE_CHARACTER_EDITOR_PRIVATE_H -#define BLADES_OF_EXILE_CHARACTER_EDITOR_PRIVATE_H - -/* VERSION DEFINITIONS */ -#define VER_STRING "0.1.1.1" -#define VER_MAJOR 0 -#define VER_MINOR 1 -#define VER_RELEASE 1 -#define VER_BUILD 1 -#define COMPANY_NAME "" -#define FILE_VERSION "" -#define FILE_DESCRIPTION "Developed using the Dev-C++ IDE" -#define INTERNAL_NAME "" -#define LEGAL_COPYRIGHT "" -#define LEGAL_TRADEMARKS "" -#define ORIGINAL_FILENAME "" -#define PRODUCT_NAME "" -#define PRODUCT_VERSION "" - -#endif /*BLADES_OF_EXILE_CHARACTER_EDITOR_PRIVATE_H*/ diff --git a/Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.rc b/Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.rc deleted file mode 100644 index 351b789b..00000000 --- a/Win32/Blades of Exile Char Editor/Blades_of_Exile_Character_Editor_private.rc +++ /dev/null @@ -1,5 +0,0 @@ -/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ -/* DO NOT EDIT! */ - -#include "BLADPCED.RC" - diff --git a/Win32/Blades of Exile Char Editor/GRAPHICS.CPP b/Win32/Blades of Exile Char Editor/GRAPHICS.CPP index fe63cb66..074a803b 100644 --- a/Win32/Blades of Exile Char Editor/GRAPHICS.CPP +++ b/Win32/Blades of Exile Char Editor/GRAPHICS.CPP @@ -477,16 +477,21 @@ void display_party(short,short clear_first) sprintf(buffer,"In Town : %s ",town_strs[0]); char_win_draw_string(main_dc,from_rect,buffer,0,10);*/ - from_rect = pc_info_rect; + from_rect = title_from; + from_rect.bottom += 385; from_rect.top = from_rect.bottom - 14; - from_rect.left += 3; + from_rect.left -= 40; + from_rect.right = from_rect.left + 604; if (party_in_scen == FALSE) - char_win_draw_string(main_dc,from_rect,"Party not in a scenario.",0,10); + char_win_draw_string(main_dc,from_rect," Party not in a scenario.",0,10); else { char buf[256]; - sprintf(buf,"Party is in : %s.",party.scen_name); + sprintf(buf," Party is in : %s.",party.scen_name); char_win_draw_string(main_dc,from_rect,buf,0,10); } + from_rect.left -= 1; + from_rect.top -= 1; + frame_dlog_rect(mainPtr,from_rect,0); for (i = 0; i < 6; i++) { if (i == current_active_pc) diff --git a/Win32/Blades of Exile/ACTIONS.CPP b/Win32/Blades of Exile/ACTIONS.CPP index cefd0889..1634ce65 100644 --- a/Win32/Blades of Exile/ACTIONS.CPP +++ b/Win32/Blades of Exile/ACTIONS.CPP @@ -29,6 +29,7 @@ #include "globvar.h" extern short store_flags[3]; +//extern BOOL timed_special_happened; void init_screen_locs() { @@ -349,6 +350,10 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) i = 200; add_string_to_buf(" Monsters nearby."); } + if(timed_special_happened){ + i=200; + add_string_to_buf(" Rest interrupted."); + } else i++; } put_pc_screen(); @@ -1076,7 +1081,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) else add_string_to_buf("Alchemy: Only in town."); } - // Wait 40 spaces (town only) + // Wait 80 spaces (town only) if (the_point.x == 1001) { need_reprint = TRUE; need_redraw = TRUE; @@ -1103,6 +1108,11 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) j = get_ran(1,1,160 - c_town.difficulty); if (j == 10) create_wand_monst(); + if(timed_special_happened){ + i = 200; + add_string_to_buf(" Waiting interrupted."); + } + else{ for (j = 0; j < 6; j++) if (adven[j].cur_health < store_sp[j]) { i = 200; @@ -1115,6 +1125,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) } else i++; } + } put_pc_screen(); } @@ -1215,6 +1226,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) reload_startup(); in_startup_mode = TRUE; in_scen_debug=FALSE; + ghost_mode = FALSE; draw_startup(0); menu_activate(1); if (FCD(901,0) == 2) save_file(1); @@ -1486,6 +1498,10 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) if (overall_mode == MODE_TALKING) { if (chr == ' ') chr = 'g'; + if (chr == '?') { + party.help_received[5] = 0; + give_help(205,6,0); + } for (i = 0; i < 9; i++) if (chr == talk_chars[i]) { pass_point.x = preset_words[i].word_rect.left + 9; @@ -1495,6 +1511,10 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) } } else if (overall_mode == MODE_SHOPPING) { // shopping keystrokes + if (chr == '?') { + party.help_received[26] = 0; + give_help(226,27,0); + } for (i = 0; i < 8; i++) if (chr == 97 + i) { pass_point.x = shopping_rects[i][1].left + 9; @@ -1508,23 +1528,7 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) for (k = 0; k < (short) LOWORD(lParam); k++) switch(chr) - { - case '&': - add_string_to_buf("If Valorim ..."); - print_buf(); - break; - case '*': - add_string_to_buf("You want to save ..."); - print_buf(); - break; - case '(': - add_string_to_buf("Back up your save files ..."); - print_buf(); - break; - case ')': - add_string_to_buf("Burma Shave."); - print_buf(); - break; + { case 'D': if (in_scen_debug) { @@ -1538,20 +1542,36 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) } print_buf(); break; + case '&': + add_string_to_buf("If Valorim ..."); + print_buf(); + break; + case '*': + add_string_to_buf("You want to save ..."); + print_buf(); + break; + case '(': + add_string_to_buf("Back up your save files ..."); + print_buf(); + break; + case ')': + add_string_to_buf("Burma Shave."); + print_buf(); + break; + case '?': - if (overall_mode == MODE_SHOPPING) { - univ.party.help_received[26] = 0; - give_help(226,27,0); - break; - } - if (overall_mode == MODE_TALKING) { - univ.party.help_received[5] = 0; - give_help(205,6,0); - break; - } - if (is_out()) FCD(1079,0); - if (is_town()) FCD(1080,0); - if (is_combat()) FCD(1081,0); + if (is_out()){ + FCD(1079,0); + break; + } + if (is_town()){ + FCD(1080,0); + break; + } + if (is_combat()){ + FCD(1081,0); + break; + } break; case '1': case '2': case '3': case '4': case '5': case '6': @@ -1620,7 +1640,10 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) // case 'A': Alchemy case 'B': // Leave town if (in_scen_debug) { - party.stuff_done[304][0] = 0; + party.stuff_done[304][0] = 0; + for(i=0;i<6;i++) + if(adven[i].main_status > 9) + adven[i].main_status -= 10; if(overall_mode == MODE_OUTDOORS){ add_string_to_buf("Debug - Leave Town: You're not in town !"); print_buf(); @@ -1680,6 +1703,19 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) print_buf(); } break; + case 'G': //Ghost Mode + if(in_scen_debug){ + if(ghost_mode){ + ghost_mode = FALSE; + ASB("Debug: Ghost mode OFF."); + } + else{ + ghost_mode = TRUE; + ASB("Debug: Ghost mode ON."); + } + print_buf(); + } + break; case 'H': // Heal PCs and restore their SP if (in_scen_debug) { party.gold += 100; @@ -1717,6 +1753,7 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) reload_startup(); in_startup_mode = TRUE; in_scen_debug=FALSE; + ghost_mode = FALSE; draw_startup(0); menu_activate(1); if (FCD(901,0) == 2) save_file(1); @@ -1739,11 +1776,12 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) break; // case 'P': repeat Priest spell case 'I': //debug info -/* char buf[256]; //event timer off debug info + char buf[256]; //event timer off debug info sprintf(buf,"Party Age : %d", party.age); - give_error(buf,"",0);*/ - clear_map(); - break; + give_error(buf,"",0); +/* char buf[256]; + sprintf(buf,"Scen name = %s",party.scen_name);*/ + break; case 'Q': // Magic map if (in_scen_debug) { if (overall_mode == MODE_OUTDOORS) { @@ -1763,22 +1801,24 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) break; case 'R': // Return to Start if (in_scen_debug) { - if (party.in_boat >= 0) { - add_string_to_buf(" Not while in boat. "); - break; - } - if (party.in_horse >= 0) { - add_string_to_buf(" Not while on horse. "); - break; + if (party.in_boat >= 0) { + add_string_to_buf(" Not while in boat. "); + print_buf(); + break; } - force_town_enter(scenario.which_town_start,scenario.where_start); - start_town_mode(scenario.which_town_start,9); - position_party(scenario.out_sec_start.x,scenario.out_sec_start.y, - scenario.out_start.x,scenario.out_start.y); - center = c_town.p_loc = scenario.where_start; - redraw_screen(0); - add_string_to_buf("Debug: You are moved... "); - print_buf(); + if (party.in_horse >= 0) { + add_string_to_buf(" Not while on horse. "); + print_buf(); + break; + } + force_town_enter(scenario.which_town_start,scenario.where_start); + start_town_mode(scenario.which_town_start,9); + position_party(scenario.out_sec_start.x,scenario.out_sec_start.y, + scenario.out_start.x,scenario.out_start.y); + center = c_town.p_loc = scenario.where_start; + redraw_screen(0); + add_string_to_buf("Debug: You are moved... "); + print_buf(); } break; case 'S': // Set a SDF <= can't set the SDF 0 (it's the default return value if the first character of the string is not a number) @@ -1849,6 +1889,7 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam) ASB(" D: Toggle Debug mode"); ASB(" E: Sanctuary, Detect, Lavawalk"); ASB(" F: Flight"); + ASB(" G: Ghost Mode"); ASB(" H: Heal"); ASB(" K: Kill things"); ASB(" N: End Scenario"); @@ -2040,7 +2081,6 @@ void post_load() adjust_spell_menus(); adjust_monst_menu(); - cartoon_happening = FALSE; } void do_save(short mode) //mode 0 - normal 1 - save as @@ -2263,7 +2303,7 @@ void increase_age() } dump_gold(1); - special_increase_age(); + timed_special_happened = special_increase_age(); push_things(); if (is_town()) process_fields(); @@ -2425,7 +2465,7 @@ Boolean outd_move_party(location destination,Boolean forced) keep_going = check_special_terrain(destination,0,0,&spec_num,&check_f); if (check_f == TRUE) forced = TRUE; - if (debug_on == TRUE) forced = TRUE; + if (in_scen_debug && ghost_mode) forced = TRUE; if (spec_num == 50) forced = TRUE; // If not blocked and not put in town by a special, process move @@ -2630,7 +2670,7 @@ Boolean town_move_party(location destination,short forced) unsigned char ter; Boolean check_f = FALSE; - if (debug_on == TRUE) forced = TRUE; + if (in_scen_debug && ghost_mode) forced = TRUE; if (monst_there(destination) > T_M) keep_going = check_special_terrain(destination,1,0,&spec_num,&check_f); if (check_f == TRUE) forced = TRUE; diff --git a/Win32/Blades of Exile/BLADES.CPP b/Win32/Blades of Exile/BLADES.CPP index 6ebf6d51..66189bf9 100644 --- a/Win32/Blades of Exile/BLADES.CPP +++ b/Win32/Blades of Exile/BLADES.CPP @@ -92,12 +92,14 @@ Boolean handle_startup_press(POINT the_point) break; } scen = pick_a_scen(); // return a short to scen specifying the chosen scenario - if (scen_headers[scen].prog_make_ver[0] >= 2) { + +/* if (scen_headers[scen].prog_make_ver[0] >= 2) { => warning if scen = -1 (no scenarios in directory), then it will crash !!! FCD(912,0); break; - } - if (scen >= 0) { - sprintf(party.scen_name,"%s",data_store2->scen_names[scen]); //put scenario filename in party.scen_name retrieving it using scen + }*/ + + if (scen >= 0) { + sprintf(party.scen_name,"%s",data_store2[scen].scen_names); //put scenario filename in party.scen_name retrieving it using scen put_party_in_scen(); //put the party in the scenario and begin the game } @@ -174,7 +176,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmd RegisterClass(&wndclass2); - mainPtr = CreateWindow (szAppName, "Classic Blades of Exile Beta 1.1", + mainPtr = CreateWindow (szAppName, "Classic Blades of Exile Beta 2", WS_OVERLAPPEDWINDOW, 0, 0, @@ -209,10 +211,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmd /* cursors loaded */ data_store = new piles_of_stuff_dumping_type; - data_store2 = new piles_of_stuff_dumping_type2; 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()); @@ -230,7 +232,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmd 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); - SetScrollRange(shop_sbar,SB_CTL,0,16,FALSE); + 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); @@ -283,10 +288,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmd } } - delete data_store5; + delete scen_item_list; + delete data_store5; delete data_store4; delete data_store3; - delete data_store2; + if(data_store2 != NULL) + delete[] data_store2; + if(scen_headers != NULL) + delete[] scen_headers; delete data_store; lose_graphics(); @@ -516,8 +525,12 @@ long CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; } if (sbar_pos < 0) sbar_pos = 0; - if (sbar_pos > 58) sbar_pos = 58; - SetScrollPos(text_sbar,SB_CTL,sbar_pos,TRUE); + if (sbar_pos > 58) sbar_pos = 58;{ +// SetScrollPos(text_sbar,SB_CTL,sbar_pos,TRUE); + lpsi.nPos = sbar_pos; + lpsi.fMask = SIF_POS; + SetScrollInfo(text_sbar,SB_CTL,&lpsi,TRUE); + } string_added = TRUE; print_buf(); break; @@ -537,8 +550,12 @@ long CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; } if (sbar_pos < 0) sbar_pos = 0; - if (sbar_pos > smax) sbar_pos = smax; - SetScrollPos(item_sbar,SB_CTL,sbar_pos,TRUE); + if (sbar_pos > smax) sbar_pos = smax;{ +// SetScrollPos(item_sbar,SB_CTL,sbar_pos,TRUE); + lpsi.nPos = sbar_pos; + lpsi.fMask = SIF_POS; + SetScrollInfo(item_sbar,SB_CTL,&lpsi,TRUE); + } if (sbar_pos != old_setting) put_item_screen(stat_window,1); break; @@ -558,8 +575,12 @@ long CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; } if (sbar_pos < 0) sbar_pos = 0; - if (sbar_pos > smax) sbar_pos = smax; - SetScrollPos(shop_sbar,SB_CTL,sbar_pos,TRUE); + if (sbar_pos > smax) sbar_pos = smax;{ +// SetScrollPos(shop_sbar,SB_CTL,sbar_pos,TRUE); + lpsi.nPos = sbar_pos; + lpsi.fMask = SIF_POS; + SetScrollInfo(shop_sbar,SB_CTL,&lpsi,TRUE); + } if (sbar_pos != old_setting) draw_shop_graphics(0,shop_sbar_rect); break; diff --git a/Win32/Blades of Exile/Blades_of_Exile_private.h b/Win32/Blades of Exile/Blades_of_Exile_private.h deleted file mode 100644 index 34f06438..00000000 --- a/Win32/Blades of Exile/Blades_of_Exile_private.h +++ /dev/null @@ -1,23 +0,0 @@ -/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ -/* DO NOT EDIT ! */ - -#ifndef BLADES_OF_EXILE_PRIVATE_H -#define BLADES_OF_EXILE_PRIVATE_H - -/* VERSION DEFINITIONS */ -#define VER_STRING "0.1.1.1" -#define VER_MAJOR 0 -#define VER_MINOR 1 -#define VER_RELEASE 1 -#define VER_BUILD 1 -#define COMPANY_NAME "" -#define FILE_VERSION "" -#define FILE_DESCRIPTION "Developed using the Dev-C++ IDE" -#define INTERNAL_NAME "" -#define LEGAL_COPYRIGHT "" -#define LEGAL_TRADEMARKS "" -#define ORIGINAL_FILENAME "" -#define PRODUCT_NAME "" -#define PRODUCT_VERSION "" - -#endif /*BLADES_OF_EXILE_PRIVATE_H*/ diff --git a/Win32/Blades of Exile/COMBAT.CPP b/Win32/Blades of Exile/COMBAT.CPP index 6285e2ed..64080987 100644 --- a/Win32/Blades of Exile/COMBAT.CPP +++ b/Win32/Blades of Exile/COMBAT.CPP @@ -151,8 +151,11 @@ Boolean pc_combat_move(location destination) if (check_f == TRUE) forced = TRUE; + if (in_scen_debug && ghost_mode) + forced = TRUE; + if (spec_num == 50) - forced = TRUE; + forced = TRUE; if (keep_going == TRUE) { @@ -1200,8 +1203,12 @@ void fire_missile(location target) add_string_to_buf(" The arrow explodes! "); /* run_a_missile(pc_pos[current_pc],target,2,1,5, 0,0,100);*/ - run_a_missile(pc_pos[current_pc],target,2,1,5, + run_a_missile(pc_pos[current_pc],target,2,1,(overall_mode == 12) ? 12 : 14, 0,0,100); + if(PSD[306][6] == 0) + pause(dist(pc_pos[current_pc],target)); + else + pause(dist(pc_pos[current_pc],target)*5); start_missile_anim(); add_missile(target,2,1, 0, 0); // do_missile_anim(100,pc_pos[current_pc], 5); <= redundant missile anim @@ -1434,7 +1441,7 @@ void combat_run_monst() } - special_increase_age(); + timed_special_happened = special_increase_age(); push_things(); if (party.age % 2 == 0) do_poison(); @@ -3575,7 +3582,7 @@ void handle_disease() r1 = get_ran(1,0,7); if (adven[i].traits[6] == TRUE) r1 -= 2; - if ((get_ran(1,0,7) <= 0) || (adven[i].hasAbilEquip(67) < 24)) + if ((get_ran(1,0,7) <= 0) || (adven[i].hasAbilEquip(62) < 24)) move_to_zero(adven[i].status[7]); } put_pc_screen(); diff --git a/Win32/Blades of Exile/CONSTS.H b/Win32/Blades of Exile/CONSTS.H index 50d9664a..bd31f6cb 100644 --- a/Win32/Blades of Exile/CONSTS.H +++ b/Win32/Blades of Exile/CONSTS.H @@ -48,7 +48,8 @@ #define MODE_LOOK_TOWN 36 #define MODE_LOOK_COMBAT 37 #define MODE_STARTUP 45 - #define MODE_REDRAW 50 + #define MODE_REDRAW 50 + #define MODE_CUTSCENE 51 /* adven[i].main_status */ //complete #define MAIN_STATUS_ABSENT 0 // absent, empty slot @@ -466,7 +467,7 @@ #define TER_SPEC_CAN_BE_USED 22 #define TER_SPEC_CALL_SPECIAL_WHEN_USED 23 -/*//stuff used in actions.cpp +//stuff used in actions.cpp //Startup button rects (also used in blades.cpp) #define STARTBTN_LOAD 0 @@ -529,7 +530,7 @@ #define SDF_LESS_WANDER_ENC 306][8 #define SDF_NO_TER_ANIM 306][9 #define SDF_HIDDEN_MAP 308][0 -#define SDF_LEGACY_SCENARIO 305][8*/ //0 is new scenario, 1 is legacy +#define SDF_LEGACY_SCENARIO 305][8 //0 is new scenario, 1 is legacy /* Monsters Attitudes : 0 - Friendly, Docile @@ -537,5 +538,218 @@ 2 - Friendly, Will fight 3 - Hostile, Type B */ + +//Specials and Talks + +//eSpecContext + +#define SPEC_OUT_MOVE 0 +#define SPEC_TOWN_MOVE 1 +#define SPEC_COMBAT_MOVE 2 +#define SPEC_OUT_LOOK 3 +#define SPEC_TOWN_LOOK 4 +#define SPEC_ENTER_TOWN 5 +#define SPEC_LEAVE_TOWN 6 +#define SPEC_TALK 7 +#define SPEC_USE_SPEC_ITEM 8 +#define SPEC_TOWN_TIMER 9 +#define SPEC_SCEN_TIMER 10 +#define SPEC_PARTY_TIMER 11 +#define SPEC_KILL_MONST 12 +#define SPEC_OUTDOOR_ENC 13 +#define SPEC_WIN_ENCOUNTER 14 +#define SPEC_FLEE_ENCOUNTER 15 +#define SPEC_TARGET 16 +#define SPEC_USE_SPACE 17 +#define SPEC_SEE_MONST 18 + +//eSpecNodeType + +#define SPEC_NULL 0 +#define SPEC_SET_SDF 1 +#define SPEC_INC_SDF 2 +#define SPEC_DISPLAY_MSG 3 +#define SPEC_SECRET_PASSAGE 4 +#define SPEC_DISPLAY_SM_MSG 5 +#define SPEC_FLIP_SDF 6 +#define SPEC_OUT_BLOCK 7 +#define SPEC_TOWN_BLOCK 8 +#define SPEC_FIGHT_BLOCK 9 +#define SPEC_LOOK_BLOCK 10 +#define SPEC_CANT_ENTER 11 +#define SPEC_CHANGE_TIME 12 +#define SPEC_SCEN_TIMER_START 13 +#define SPEC_PLAY_SOUND 14 +#define SPEC_CHANGE_HORSE_OWNER 15 +#define SPEC_CHANGE_BOAT_OWNER 16 +#define SPEC_SET_TOWN_VISIBILITY 17 +#define SPEC_MAJOR_EVENT_OCCURRED 18 +#define SPEC_FORCED_GIVE 19 +#define SPEC_BUY_ITEMS_OF_TYPE 20 +#define SPEC_CALL_GLOBAL 21 +#define SPEC_SET_SDF_ROW 22 +#define SPEC_COPY_SDF 23 +#define SPEC_SANCTIFY 24 +#define SPEC_REST 25 +#define SPEC_WANDERING_WILL_FIGHT 26 +#define SPEC_END_SCENARIO 27 +#define SPEC_ONCE_GIVE_ITEM = 50 +#define SPEC_ONCE_GIVE_SPEC_ITEM 51 +#define SPEC_ONCE_NULL 52 +#define SPEC_ONCE_SET_SDF 53 +#define SPEC_ONCE_DISPLAY_MSG 54 +#define SPEC_ONCE_DIALOG 55 +#define SPEC_ONCE_DIALOG_TERRAIN 56 +#define SPEC_ONCE_DIALOG_MONSTER 57 +#define SPEC_ONCE_GIVE_ITEM_DIALOG 58 +#define SPEC_ONCE_GIVE_ITEM_TERRAIN 59 +#define SPEC_ONCE_GIVE_ITEM_MONSTER 60 +#define SPEC_ONCE_OUT_ENCOUNTER 61 +#define SPEC_ONCE_TOWN_ENCOUNTER 62 +#define SPEC_ONCE_TRAP 63 +#define SPEC_SELECT_PC 80 +#define SPEC_DAMAGE 81 +#define SPEC_AFFECT_HP 82 +#define SPEC_AFFECT_SP 83 +#define SPEC_AFFECT_XP 84 +#define SPEC_AFFECT_SKILL_PTS 85 +#define SPEC_AFFECT_DEADNESS 86 +#define SPEC_AFFECT_POISON 87 +#define SPEC_AFFECT_SPEED 88 +#define SPEC_AFFECT_INVULN 89 +#define SPEC_AFFECT_MAGIC_RES 90 +#define SPEC_AFFECT_WEBS 91 +#define SPEC_AFFECT_DISEASE 92 +#define SPEC_AFFECT_SANCTUARY 93 +#define SPEC_AFFECT_CURSE_BLESS 94 +#define SPEC_AFFECT_DUMBFOUND 95 +#define SPEC_AFFECT_SLEEP 96 +#define SPEC_AFFECT_PARALYSIS 97 +#define SPEC_AFFECT_STAT 98 +#define SPEC_AFFECT_MAGE_SPELL 99 +#define SPEC_AFFECT_PRIEST_SPELL 100 +#define SPEC_AFFECT_GOLD 101 +#define SPEC_AFFECT_FOOD 102 +#define SPEC_AFFECT_ALCHEMY 103 +#define SPEC_AFFECT_STEALTH 104 +#define SPEC_AFFECT_FIREWALK 105 +#define SPEC_AFFECT_FLIGHT 106 +#define SPEC_IF_SDF 130 +#define SPEC_IF_TOWN_NUM 131 +#define SPEC_IF_RANDOM 132 +#define SPEC_IF_HAVE_SPECIAL_ITEM 133 +#define SPEC_IF_SDF_COMPARE 134 +#define SPEC_IF_TOWN_TER_TYPE 135 +#define SPEC_IF_OUT_TER_TYPE 136 +#define SPEC_IF_HAS_GOLD 137 +#define SPEC_IF_HAS_FOOD 138 +#define SPEC_IF_ITEM_CLASS_ON_SPACE 139 +#define SPEC_IF_HAVE_ITEM_CLASS 140 +#define SPEC_IF_EQUIP_ITEM_CLASS 141 +#define SPEC_IF_HAS_GOLD_AND_TAKE 142 +#define SPEC_IF_HAS_FOOD_AND_TAKE 143 +#define SPEC_IF_ITEM_CLASS_ON_SPACE_AND_TAKE 144 +#define SPEC_IF_HAVE_ITEM_CLASS_AND_TAKE 145 +#define SPEC_IF_EQUIP_ITEM_CLASS_AND_TAKE 146 +#define SPEC_IF_DAY_REACHED 147 +#define SPEC_IF_BARRELS 148 +#define SPEC_IF_CRATES 149 +#define SPEC_IF_EVENT_OCCURRED 150 +#define SPEC_IF_HAS_CAVE_LORE 151 +#define SPEC_IF_HAS_WOODSMAN 152 +#define SPEC_IF_ENOUGH_MAGE_LORE 153 +#define SPEC_IF_TEXT_RESPONSE 154 +#define SPEC_IF_SDF_EQ 155 +#define SPEC_MAKE_TOWN_HOSTILE 170 +#define SPEC_TOWN_CHANGE_TER 171 +#define SPEC_TOWN_SWAP_TER 172 +#define SPEC_TOWN_TRANS_TER 173 +#define SPEC_TOWN_MOVE_PARTY 174 +#define SPEC_TOWN_HIT_SPACE 175 +#define SPEC_TOWN_EXPLODE_SPACE 176 +#define SPEC_TOWN_LOCK_SPACE 177 +#define SPEC_TOWN_UNLOCK_SPACE 178 +#define SPEC_TOWN_SFX_BURST 179 +#define SPEC_TOWN_CREATE_WANDERING 180 +#define SPEC_TOWN_PLACE_MONST 181 +#define SPEC_TOWN_DESTROY_MONST 182 +#define SPEC_TOWN_NUKE_MONSTS 183 +#define SPEC_TOWN_GENERIC_LEVER 184 +#define SPEC_TOWN_GENERIC_PORTAL 185 +#define SPEC_TOWN_GENERIC_BUTTON 186 +#define SPEC_TOWN_GENERIC_STAIR 187 +#define SPEC_TOWN_LEVER 188 +#define SPEC_TOWN_PORTAL 189 +#define SPEC_TOWN_STAIR 190 +#define SPEC_TOWN_RELOCATE 191 // Relocate outdoors +#define SPEC_TOWN_PLACE_ITEM 192 +#define SPEC_TOWN_SPLIT_PARTY 193 +#define SPEC_TOWN_REUNITE_PARTY 194 +#define SPEC_TOWN_TIMER_START 195 +#define SPEC_RECT_PLACE_FIRE 200 +#define SPEC_RECT_PLACE_FORCE 201 +#define SPEC_RECT_PLACE_ICE 202 +#define SPEC_RECT_PLACE_BLADE 203 +#define SPEC_RECT_PLACE_SCLOUD 204 +#define SPEC_RECT_PLACE_SLEEP 205 +#define SPEC_RECT_PLACE_QUICKFIRE 206 +#define SPEC_RECT_PLACE_FIRE_BARR 207 +#define SPEC_RECT_PLACE_FORCE_BARR 208 +#define SPEC_RECT_CLEANSE 209 +#define SPEC_RECT_PLACE_SFX 210 +#define SPEC_RECT_PLACE_OBJECT 211 // place barrels, etc +#define SPEC_RECT_MOVE_ITEMS 212 +#define SPEC_RECT_DESTROY_ITEMS 213 +#define SPEC_RECT_CHANGE_TER 214 +#define SPEC_RECT_SWAP_TER 215, +#define SPEC_RECT_TRANS_TER 216 +#define SPEC_RECT_LOCK 217 +#define SPEC_RECT_UNLOCK 218 +#define SPEC_OUT_MAKE_WANDER 225 +#define SPEC_OUT_CHANGE_TER 226 +#define SPEC_OUT_PLACE_ENCOUNTER 227 +#define SPEC_OUT_MOVE_PARTY 228 +#define SPEC_OUT_STORE 229 + + +// eTalkNodeType + +#define TALK_REGULAR 0 +#define TALK_DEP_ON_SDF 1 +#define TALK_SET_SDF 2 +#define TALK_INN 3 +#define TALK_DEP_ON_TIME 4 +#define TALK_DEP_ON_TIME_AND_EVENT 5 +#define TALK_DEP_ON_TOWN 6 +#define TALK_BUY_ITEMS 7 +#define TALK_TRAINING 8 +#define TALK_BUY_MAGE 9 +#define TALK_BUY_PRIEST 10 +#define TALK_BUY_ALCHEMY 11 +#define TALK_BUY_HEALING 12 +#define TALK_SELL_WEAPONS 13 +#define TALK_SELL_ARMOR 14 +#define TALK_SELL_ITEMS 15 +#define TALK_IDENTIFY 16 +#define TALK_ENCHANT 17 +#define TALK_BUY_INFO 18 +#define TALK_BUY_SDF 19 +#define TALK_BUY_SHIP 20 +#define TALK_BUY_HORSE 21 +#define TALK_BUY_SPEC_ITEM 22 +#define TALK_BUY_JUNK 23 +#define TALK_BUY_TOWN_LOC 24 +#define TALK_END_FORCE 25 +#define TALK_END_FIGHT 26 +#define TALK_END_ALARM 27 // Town hostile +#define TALK_END_DIE 28 +#define TALK_CALL_TOWN_SPEC 29 +#define TALK_CALL_SCEN_SPEC 30 + +/* Spells + +x : mage spells (x from 0 to 61) +100 + x : priest spells (x from 0 to 61) +*/ #endif diff --git a/Win32/Blades of Exile/DLGUTILS.CPP b/Win32/Blades of Exile/DLGUTILS.CPP index ac34e285..a446e580 100644 --- a/Win32/Blades of Exile/DLGUTILS.CPP +++ b/Win32/Blades of Exile/DLGUTILS.CPP @@ -114,7 +114,7 @@ void handle_shop_event(POINT p) if (PtInRect(&talk_help_rect,p)) { click_shop_rect(talk_help_rect); party.help_received[26] = 0; - give_help(26,27,0); + give_help(226,27,0); return; } if (PtInRect(&shop_done_rect, p)) { @@ -406,7 +406,10 @@ void set_up_shop_array() store_shop_costs[i] = (short) store_l; } i = max(0,shop_pos - 8); - SetScrollRange(shop_sbar,SB_CTL,0,i,TRUE); + lpsi.nMax = i; + lpsi.fMask = SIF_RANGE; + SetScrollInfo(shop_sbar,SB_CTL,&lpsi,FALSE); + //SetScrollRange(shop_sbar,SB_CTL,0,i,TRUE); } @@ -485,8 +488,9 @@ void handle_talk_event(POINT p) p.y -= 5; if (PtInRect(&talk_help_rect,p)) { + if (play_sounds == TRUE) play_sound(37); party.help_received[5] = 0; - give_help(5,6,0); + give_help(205,6,0); return; } @@ -729,8 +733,7 @@ void handle_talk_event(POINT p) strnum1 = -1; return; case 12: //healer - start_shop_mode(3,c_town.monst.dudes[store_m_num].monst_start.extra1, - c_town.monst.dudes[store_m_num].monst_start.extra2,a,(char *)place_string1); + start_shop_mode(3,0,0,a,(char *)place_string1); strnum1 = -1; return; break; @@ -1257,15 +1260,9 @@ void edit_party_event_filter (short item_hit) void edit_party() { - Boolean munch_pc_graphic = FALSE; SetCursor(sword_curs); - if (pcs_gworld == NULL) { - munch_pc_graphic = TRUE; - pcs_gworld = load_pict(902,main_dc); - } - cd_create_dialog(989,mainPtr); put_party_stats(); @@ -1277,11 +1274,6 @@ void edit_party() ModalDialog(); cd_kill_dialog(989,0); - if (munch_pc_graphic == TRUE) { - DeleteObject(pcs_gworld); - pcs_gworld = NULL; - } - if (adven[current_pc].isAlive() == false) current_pc = first_active_pc(); @@ -1357,9 +1349,9 @@ void put_scen_info() char *difficulty[] = {"Low","Medium","High","Very High"}; for (i = 0; i < 3; i++) - if (scen_headers[store_scen_page_on * 3 + i].flag1 != 0) { + if(store_scen_page_on * 3 + i < store_num_scen){ if(scen_headers[store_scen_page_on * 3 + i].intro_pic == 100){//custom intro pic - sprintf(place_str,"scenarios/%s",data_store2->scen_names[store_scen_page_on * 3 + i]); + sprintf(place_str,"scenarios/%s",data_store2[store_scen_page_on * 3 + i].scen_names); place_str[strlen(place_str)-3]='b'; place_str[strlen(place_str)-2]='m'; place_str[strlen(place_str)-1]='p'; @@ -1371,14 +1363,14 @@ void put_scen_info() cd_set_pict(947, 6 + i * 3,1600 + scen_headers[store_scen_page_on * 3 + i].intro_pic); sprintf((char *) place_str, "%s v%d.%d.%d - | Difficulty: %s, Rating: %s |%s |%s", - data_store2->scen_header_strs[store_scen_page_on * 3 + i][0], + data_store2[store_scen_page_on * 3 + i].scen_header_strs[0], (short) scen_headers[store_scen_page_on * 3 + i].ver[0], (short) scen_headers[store_scen_page_on * 3 + i].ver[1], (short) scen_headers[store_scen_page_on * 3 + i].ver[2], difficulty[scen_headers[store_scen_page_on * 3 + i].difficulty], ratings[scen_headers[store_scen_page_on * 3 + i].default_ground], - data_store2->scen_header_strs[store_scen_page_on * 3 + i][1], - data_store2->scen_header_strs[store_scen_page_on * 3 + i][2]); + data_store2[store_scen_page_on * 3 + i].scen_header_strs[1], + data_store2[store_scen_page_on * 3 + i].scen_header_strs[2]); csit(947,7 + i * 3,(char *) place_str); cd_activate_item(947,8 + i * 3,1); } @@ -1421,16 +1413,11 @@ void pick_a_scen_event_filter (short item_hit) short pick_a_scen() { - short i; build_scen_headers(); - store_num_scen = 0; - for (i = 0; i < 100; i++) - if (scen_headers[i].flag1 != 0) - store_num_scen++; store_scen_page_on = 0; - + if (store_num_scen == 0) { FCD(868,0); return -1; diff --git a/Win32/Blades of Exile/DLOGTOOL.CPP b/Win32/Blades of Exile/DLOGTOOL.CPP index e4e8adc4..263c1735 100644 --- a/Win32/Blades of Exile/DLOGTOOL.CPP +++ b/Win32/Blades of Exile/DLOGTOOL.CPP @@ -387,7 +387,7 @@ short cd_create_dialog(short dlog_num, HWND parent) } ShowWindow(dlgs[free_slot],SW_SHOW); - DestroyWindow(dlg); //Necesary? Dunno. + DestroyWindow(dlg); //Necessary? Dunno. if (dlg_parent[free_slot] != NULL) { @@ -1443,7 +1443,7 @@ void draw_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,s // 1500 - stat symbols help // 1600 + x - B&W maps // 1700 + x - anim graphic -// 10000 + x - custom graphic + { RECT from2 = {0,0,36,36},tiny_obj_rect = {0,0,18,18}; RECT from_rect = {0,0,28, 36}; @@ -1650,21 +1650,16 @@ void draw_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,s ,rect,0,draw_dest); break; case 8: // PC - if (pcs_gworld != NULL) - from_gworld = pcs_gworld; - else from_gworld = load_pict(902,main_dc); which_g -= 800; from_rect = calc_rect(2 * (which_g / 8), which_g % 8); old_brush = (HBRUSH)SelectObject(hdc,GetStockObject(BLACK_BRUSH)); Rectangle(hdc,rect.left,rect.top,rect.right,rect.bottom); SelectObject(hdc,old_brush); //PaintRect(&rect); - rect_draw_some_item(from_gworld,from_rect,(HBITMAP) ((win_or_gworld == 1) ? (HBITMAP)hDlg: (HBITMAP)hdc) + rect_draw_some_item(pcs_gworld,from_rect,(HBITMAP) ((win_or_gworld == 1) ? (HBITMAP)hDlg: (HBITMAP)hdc) ,rect,1,draw_dest); - if (pcs_gworld == NULL) - DeleteObject(from_gworld); break; - case 9: // B&W +/* case 9: // B&W => Exile III maps which_g -= 900; from_gworld = load_pict(875,main_dc); from_rect = bw_from; @@ -1673,16 +1668,14 @@ void draw_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,s rect_draw_some_item(from_gworld,from_rect,(HBITMAP) hDlg,rect,0,0); else rect_draw_some_item(from_gworld,from_rect,(HBITMAP)hdc,rect,0,draw_dest); DeleteObject(from_gworld); - break; + break;*/ case 10: // talk face which_g -= 1000; - from_gworld = load_pict(860,main_dc); from_rect = face_from; OffsetRect(&from_rect,32 * ((which_g - 1) % 10),32 * ((which_g - 1) / 10)); if (win_or_gworld == 1) - rect_draw_some_item(from_gworld,from_rect,(HBITMAP) hDlg,rect,0,0); - else rect_draw_some_item(from_gworld,from_rect,(HBITMAP)hdc,rect,0,draw_dest); - DeleteObject(from_gworld); + rect_draw_some_item(talking_portraits_gworld,from_rect,(HBITMAP) hDlg,rect,0,0); + else rect_draw_some_item(talking_portraits_gworld,from_rect,(HBITMAP)hdc,rect,0,draw_dest); break; case 11: // item info help from_rect = item_info_from; diff --git a/Win32/Blades of Exile/EXLSOUND.CPP b/Win32/Blades of Exile/EXLSOUND.CPP index 8dcd75a9..e3a22efc 100644 --- a/Win32/Blades of Exile/EXLSOUND.CPP +++ b/Win32/Blades of Exile/EXLSOUND.CPP @@ -224,9 +224,8 @@ void sound_pause(long len) { } void move_sound(unsigned char ter,short step) { - short pic,spec; + short spec; - pic = scenario.ter_types[ter].picture; spec = scenario.ter_types[ter].special; if ((monsters_going == FALSE) && (overall_mode < 10) && (party.in_boat >= 0)) { @@ -237,9 +236,9 @@ void move_sound(unsigned char ter,short step) else if ((monsters_going == FALSE) && (overall_mode < 10) && (party.in_horse >= 0)) {//// play_sound(85); } - else if(scenario.ter_types[ter].special == 5) //if poisoned land don't play squish sound : BoE legacy behavior, can be removed safely + else if(spec == 5) //if poisoned land don't play squish sound : BoE legacy behavior, can be removed safely return; -// else if(scenario.ter_types[ter].special == 6) //if diseased land do the same +// else if(spec == 6) //if diseased land do the same // return; else switch(scenario.ter_types[ter].step_sound){ case 0: diff --git a/Win32/Blades of Exile/FILEIO.CPP b/Win32/Blades of Exile/FILEIO.CPP index a15cbf0d..3adc65f8 100644 --- a/Win32/Blades of Exile/FILEIO.CPP +++ b/Win32/Blades of Exile/FILEIO.CPP @@ -45,6 +45,14 @@ void flip_rect(RECT16* s); Boolean load_scenario_header(char *filename,short header_entry); void oops_error(short error); +BOOL check_for_interrupt(){ + + if(((GetAsyncKeyState(VK_LCONTROL) & 32768) == 32768) && ((GetAsyncKeyState(0x43) & 32768) == 32768)) + return TRUE; + + return FALSE; + } + void Get_Path(char* path){ char file_path[256]=""; // initialization @@ -96,6 +104,12 @@ static char * szFilter[] = ofn.lCustData = 0L; ofn.lpfnHook = NULL; ofn.lpTemplateName = NULL; + + lpsi.cbSize = sizeof(SCROLLINFO); + lpsi.fMask = SIF_RANGE; + lpsi.nMin = 0; + lpsi.nMax = 0; + lpsi.nPos = 0; } void load_file() @@ -1784,7 +1798,7 @@ Boolean load_scenario() // OK } // item data - if (ReadFile(file_id, &(data_store2->scen_item_list), sizeof(scen_item_data_type), &dwByteRead, NULL) == FALSE) + if (ReadFile(file_id, scen_item_list, sizeof(scen_item_data_type), &dwByteRead, NULL) == FALSE) { CloseHandle(file_id); return FALSE; @@ -1845,45 +1859,101 @@ void oops_error(short error) sprintf((char *) error_str,"Giving the scenario editor more memory might also help. Be sure to back your scenario up often. Error number: %d.",error); give_error("The program encountered an error while loading/saving/creating the scenario. To prevent future problems, the program will now terminate. Trying again may solve the problem.",(char *) error_str,0); } + +void ListFiles(char *path, HWND listbox){ + + short len; + HANDLE find_file_id; + WIN32_FIND_DATA lpFindFileData; + char copy_str[256]; + + sprintf(copy_str,"scenarios/%s*.*",path); + + if((find_file_id = FindFirstFile(copy_str,&lpFindFileData)) == INVALID_HANDLE_VALUE){// is directory empty ? + FindClose(find_file_id); + return; + } + + do{ + len = strlen(lpFindFileData.cFileName); + if(((lpFindFileData.cFileName[len-1] == 's') ||( lpFindFileData.cFileName[len-1] == 'S')) + && ((lpFindFileData.cFileName[len-2] == 'x') || (lpFindFileData.cFileName[len-2] == 'X')) + && ((lpFindFileData.cFileName[len-3] == 'e') || (lpFindFileData.cFileName[len-3] == 'E'))){// is extension .exs ? + sprintf(copy_str,"%s%s",path,lpFindFileData.cFileName); + SendMessage(listbox,LB_ADDSTRING,0,(LPARAM) (LPCTSTR) copy_str); + } + else if((lpFindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY) && (strcmp(lpFindFileData.cFileName,".") != 0) && (strcmp(lpFindFileData.cFileName,"..") != 0)){ + sprintf(copy_str,"%s%s/",path,lpFindFileData.cFileName); + ListFiles(copy_str,listbox);//so list scenarios under the subdirectory + } + }while(FindNextFile(find_file_id,&lpFindFileData) != 0); + + FindClose(find_file_id); + +} + void build_scen_headers() { - short i; - short cur_entry = 0; + short i,current_entry = 0; HWND listbox; WORD count; char filename[256],filename2[256]; - for (i = 0; i < 100; i++) - scen_headers[i].flag1 = 0; - listbox = CreateWindow("listbox", NULL, WS_CHILDWINDOW, // 3 0,0,0,0, // 7 mainPtr, // 8 (HMENU) 1, // 9 (HINSTANCE) GetWindowLong(mainPtr, GWL_HINSTANCE), // 10 NULL); // 11 + + ListFiles("", listbox);//First list the scenarios under the scenarios folder - SendMessage(listbox,LB_DIR,0x0,(LPARAM) (LPCTSTR) "scenarios/*.exs"); +// SendMessage(listbox,LB_DIR,0x0,(LPARAM) (LPCTSTR) "scenarios/*.exs"); + count = (WORD) SendMessage(listbox,LB_GETCOUNT,0,0L); - count = min(count,100); + if(count == 0){ + store_num_scen = 0; + return; + } +// memory allocation (if there's an invalid file, the memory is allocated too, but unused) + if(data_store2 != NULL){ + delete[] data_store2; + data_store2 = NULL; + } + + data_store2 = new piles_of_stuff_dumping_type2[count]; + + if(scen_headers != NULL){ + delete[] scen_headers; + scen_headers = NULL; + } + + scen_headers = new scen_header_type[count]; +// end of memory allocation for (i = 0; i < count; i++) { SendMessage(listbox,LB_GETTEXT,i,(LONG) (LPSTR) filename2); - sprintf((char *) filename,"scenarios/%s",filename2); + sprintf(filename,"scenarios/%s",filename2); - if (load_scenario_header(filename,cur_entry) == TRUE) - { - // now we need to store the file name, first stripping any path that occurs - // before it - strcpy((char *) data_store2->scen_names[cur_entry],(char *) filename2); - cur_entry++; - } + if (load_scenario_header(filename,current_entry) == TRUE){ + // now we need to store the file name, first stripping any path that occurs + // before it + strcpy(data_store2[current_entry].scen_names, filename2); + current_entry++; + } } + store_num_scen = current_entry; //number of valid scenarios + + /*for (i = 0; i < count ; i++) + if (scen_headers[i].flag1 != 0) + store_num_scen++;*/ + DestroyWindow(listbox); + } // This is only called at startup, when bringing headers of active scenarios. @@ -1927,7 +1997,7 @@ Boolean load_scenario_header(char *filename,short header_entry) { scen_headers[header_entry].flag1 = 0; CloseHandle(file_id); - return FALSE; + return FALSE; } // So file is OK, so load in string data and close it. @@ -1953,7 +2023,7 @@ Boolean load_scenario_header(char *filename,short header_entry) if (i == 0) load_str[29] = 0; else load_str[59] = 0; - strcpy(data_store2->scen_header_strs[header_entry][i],(char *) load_str); + strcpy(data_store2[header_entry].scen_header_strs[i],load_str); } CloseHandle(file_id); @@ -2313,9 +2383,9 @@ void port_item_list() return; for (i = 0; i < 400; i++) { - flip_short(&(data_store2->scen_item_list.scen_items[i].variety)); - flip_short(&(data_store2->scen_item_list.scen_items[i].item_level)); - flip_short(&(data_store2->scen_item_list.scen_items[i].value)); + flip_short(&(scen_item_list->scen_items[i].variety)); + flip_short(&(scen_item_list->scen_items[i].item_level)); + flip_short(&(scen_item_list->scen_items[i].value)); } } @@ -2389,7 +2459,7 @@ void flip_short(short* s){ void flip_long(long *s) { - char store,*s1, *s2, *s3, *s4; +/* char store,*s1, *s2, *s3, *s4; s1 = (char *) s; s2 = s1 + 1; @@ -2400,7 +2470,9 @@ void flip_long(long *s) *s4 = store; store = *s2; *s2 = *s3; - *s3 = store; + *s3 = store;*/ + +*s=((*s&255)<<24)|(((*s>>8)&255) << 16)|(((*s>>16)&255) << 8)|((*s >> 24)&255); } diff --git a/Win32/Blades of Exile/FILEIO.H b/Win32/Blades of Exile/FILEIO.H index afe3563a..58dbbfe6 100644 --- a/Win32/Blades of Exile/FILEIO.H +++ b/Win32/Blades of Exile/FILEIO.H @@ -1,6 +1,7 @@ #ifndef _FILEIO_H #define _FILEIO_H +BOOL check_for_interrupt(); void Get_Path(char* path); void file_initialize(); void load_file(); diff --git a/Win32/Blades of Exile/GAMEDLOG.RC b/Win32/Blades of Exile/GAMEDLOG.RC index b03288d9..5148486c 100644 --- a/Win32/Blades of Exile/GAMEDLOG.RC +++ b/Win32/Blades of Exile/GAMEDLOG.RC @@ -1160,12 +1160,19 @@ STYLE WS_POPUP | WS_DLGFRAME 1062 DIALOG 10, 10, 529, 316 STYLE WS_POPUP | WS_DLGFRAME { - LTEXT "1_63", 1, 435, 299, 61, 20 +/* LTEXT "1_63", 1, 435, 299, 61, 20 LTEXT "5_716", 2, 6, 6, 36, 36 - LTEXT "Classic Blades of Exile Beta 1.1 | Copyright 1997, Spiderweb Software, Inc., All rights reserved.||Blades of Exile is distributed for free under GNU General Public License version 2.", 3, 50, 6, 420, 33 + LTEXT "Classic Blades of Exile Beta 2 | Copyright 1997, Spiderweb Software, Inc., All rights reserved.||Blades of Exile is distributed for free under GNU General Public License version 2.", 3, 50, 6, 420, 33 LTEXT "Comments? Questions? Bugs? Post them at the Blades section of the Irony Central Board: www.ironycentral.com/forum/", 5, 50, 226, 354, 32 LTEXT "Blades of Exile is brought to you by Spiderweb Software - | _Where our aberrations become your reality._ |_Blades of Exile_ and Spiderweb Software are trademarks of Spiderweb Software.", 7, 50, 160, 410, 51 - LTEXT "ORIGINAL CREDITS: | Concept, Design, Programming: Jeff Vogel | Graphics: Andrew Hunter (Wormius@aol.com) | Business Manager: Mariann Krizsan (krizsan@spidweb.com)| Title Screen: James Ernest (ernest@speakeasy.org)", 8, 50, 82, 434, 67 + LTEXT "ORIGINAL CREDITS: | Concept, Design, Programming: Jeff Vogel | Graphics: Andrew Hunter (Wormius@aol.com) | Business Manager: Mariann Krizsan (krizsan@spidweb.com)| Title Screen: James Ernest (ernest@speakeasy.org)", 8, 50, 82, 434, 67*/ + LTEXT "1_63", 1, 435, 295, 61, 20 + LTEXT "5_716", 2, 6, 6, 36, 36 + LTEXT "Classic Blades of Exile Beta 2 | Copyright 1997, Spiderweb Software, Inc., All rights reserved.||Blades of Exile is distributed for free under GNU General Public License version 2.", 3, 50, 6, 420, 33 + LTEXT "CONTRIBUTORS : Ormus, Ishad Nha, Celtic Minstrel, Niemand and all involved in the BoE community.", 4, 50, 227, 424, 33 + LTEXT "Comments? Questions? Bugs? Post them at the Blades section of the Irony Central Board: www.ironycentral.com/forum/", 5, 50, 271, 354, 32 + LTEXT "Blades of Exile was brought to you by Spiderweb Software - | _Where our aberrations become your reality._ |_Blades of Exile_ and Spiderweb Software are trademarks of Spiderweb Software.", 7, 50, 154, 410, 51 + LTEXT "ORIGINAL CREDITS: | Concept, Design, Programming: Jeff Vogel | Graphics: Andrew Hunter (Wormius@aol.com) | Business Manager: Mariann Krizsan (krizsan@spidweb.com)| Title Screen: James Ernest (ernest@speakeasy.org)", 8, 50, 82, 415, 51 } 1063 DIALOG 10, 10, 324, 58 @@ -1318,10 +1325,10 @@ STYLE WS_POPUP | WS_DLGFRAME LTEXT "5_724" 2, 6, 6, 36, 36 LTEXT "~Bugs and Stuff:" 3, 50, 6, 131, 18 LTEXT "Need a Hint?" 4, 50, 69, 84, 13 - LTEXT "To order Blades of Exile, click on How To Order on the title screen to get full ordering instructions." 5, 50, 139, 473, 28 - LTEXT "COMMENTS: |We LOVE to hear what you have to say. Comments, questions, complaints, etc. can be sent to the addresses on the About Blades of Exile page. Also, be sure to visit Spiderweb Software's web site: || http://www.spidweb.com" 6, 50, 174, 480, 65 - LTEXT "Alas, though we tried, we probably didn't get all the bugs and typos out of Blades of Exile. Should you find one, a bug report form is enclosed with the game. Also, an E-mail address for comments is on the About Blades of Exile page." 7, 50, 26, 475, 41 - LTEXT "Can't get into the School of Magery? The Valley plague getting you down? Can't get to the end of the Za-Khazi Run in time? Help is available! When you register, the documentation comes with a hint book for the 3 Blades of Exile scenarios!" 8, 50, 84, 474, 54 + LTEXT "Classic Blades of Exile is released under the GNU GPL 2 license." 5, 50, 139, 473, 28 + LTEXT "COMMENTS: |We LOVE to hear what you have to say. Comments, questions, complaints, etc. should be put on the forum on the About Blades of Exile page. Also, be sure to visit Spiderweb Software's web site: || http://www.spidweb.com" 6, 50, 174, 480, 65 + LTEXT "Alas, though we tried, we probably didn't get all the bugs and typos out of Blades of Exile. Should you find one, please report it to the Blades of Exile forum on the About Blades of Exile page." 7, 50, 26, 475, 41 + LTEXT "Can't get into the School of Magery? The Valley plague getting you down? Can't get to the end of the Za-Khazi Run in time? Help is available! The forementioned forum has lots of links to walkthroughs and hints; not to mention the community!" 8, 50, 84, 474, 54 } 1086 DIALOG 10, 10, 338, 76 @@ -1370,7 +1377,7 @@ STYLE WS_POPUP | WS_DLGFRAME LTEXT "During your adventures, you will come across mind-boggling quantities of stuff. To pick up some of it, move your party (or active PC) near it, and hit the get button (or 'g'). Then, on the Get Item window, click on the item to grab." 3, 63, 30, 423, 64 LTEXT "BLADES OF EXILE HELP: ITEM INFO SCREEN" 4, 53, 13, 235, 16 LTEXT "Once there, to equip (i.e. use) or unequip (take off) an item, click on its name. Other buttons will appear enabling you do to other things:" 5, 63, 131, 283, 57 - LTEXT "Items from slain monsters normally appear unidentified. To identify them, take them to a sage (such as Habecker in Fort Emergence). Also, buying Item Lore skill sometimes makes monster's treasure appear already identified." 6, 63, 274, 429, 50 + LTEXT "Items from slain monsters normally appear unidentified. To identify them, take them to a sage. Also, buying Item Lore skill sometimes makes monster's treasure appear already identified." 6, 63, 274, 429, 50 LTEXT "Once obtained, items show up in this window. Type '1'-'6' or click on the numbered button to bring up a character's inventory. " 7, 63, 95, 424, 33 LTEXT "5_1100" 8, 350, 136, 129, 132 LTEXT "The Sell, ID, and Enchant buttons only appear when talking to a person who can do these things. Many shopkeepers will buy your items, and certain sages can identify and even enchant them." 9, 63, 189, 281, 84 diff --git a/Win32/Blades of Exile/GAMESTR.RC b/Win32/Blades of Exile/GAMESTR.RC index c1b0c240..487abdf5 100644 --- a/Win32/Blades of Exile/GAMESTR.RC +++ b/Win32/Blades of Exile/GAMESTR.RC @@ -783,7 +783,7 @@ STRINGTABLE 3040, "Wearing armor with a total encumbrance of more that 1 spoils any mage spell you try to cast in combat. High defense skill sometimes prevents this from happening, but it will only go so far. If any single item has encumb. higher than 2, spells always fail." 3041, "One of your characters just learned a new magical spell. Before you can cast it, however, you need to get enough spell points and a Mage (or Priest) Spells skill as high as the level of the spell." 3042, "This person has looked over your items and maybe offered to buy some of them. Click on the 'Sell' button to sell it, for the amount to the right of the button. Some people only try to buy certain sorts of items." - 3043, "Merchants will only buy items that have been identified. If you want to sell something, you may need to find a sage to identify it (such as Habecker in Fort Emergence)." + 3043, "Merchants will only buy items that have been identified. If you want to sell something, you may need to find a sage to identify it." 3044, "This character will, for a fee, identify some of your items whose nature is, as yet, unknown to you. Click on the 'ID' button by the item to get it identified." 3045, "This merchant has offered to magically improve one of your weapons. Click on the 'Ench' button by the weapon to pay for this service. You can only augment identified weapons that aren't magic already." 3047, "You have just opened a door. To open any door, walk into it. Some walls have secret doors in them. To search a wall for secret doors, walk into it. Many special things are hidden in the dungeons." @@ -959,266 +959,6 @@ STRINGTABLE 6063, "Unused" 6064, "Unused" 6065, "Death triggers global special" - 6080, "Unused" - 6081, "Percentage chance (1-100%)" - 6082, "Percentage chance (1-100%)" - 6083, "Percentage chance (1-100%)" - 6084, "Percentage chance (1-100%)" - 6085, "Percentage chance (1-100%)" - 6086, "Percentage chance (1-100%)" - 6087, "Unused" - 6088, "Unused" - 6089, "Unused" - 6090, "Number of creature to summon" - 6091, "Number of creature to summon" - 6092, "Number of creature to summon" - 6093, "Unused" - 6094, "Unused" - 6095, "Number of special to call" - 6130, "Hits" - 6131, "Claws" - 6132, "Bites" - 6133, "Slimes" - 6134, "Punches" - 6135, "Stings" - 6136, "Clubs" - 6137, "Burns" - 6138, "Harms" - 6139, "Stabs" - 6150, "Human" - 6151, "Reptile" - 6152, "Beast" - 6153, "Important" - 6154, "Mage" - 6155, "Priest" - 6156, "Humanoid" - 6157, "Demon" - 6158, "Undead" - 6159, "Giant" - 6160, "Slime" - 6161, "Stone" - 6162, "Bug" - 6163, "Dragon" - 6164, "Magical Creature" - 6301, "None" - 6302, "Change when step on" - 6303, "Does fire damage" - 6304, "Does cold damage" - 6305, "Does magical damage" - 6306, "Poison land" - 6307, "Diseased land" - 6308, "Crumbling terrain" - 6309, "Lockable terrain" - 6310, "Unlockable terrain" - 6311, "Unlockable/bashable" - 6312, "Is a sign" - 6313, "Call local special" - 6314, "Call scenario special" - 6315, "Is a container" - 6316, "Waterfall" - 6317, "Conveyor (north)" - 6318, "Conveyor (east)" - 6319, "Conveyor (south)" - 6320, "Conveyor (west)" - 6321, "Blocked to monsters" - 6322, "Town entrance" - 6323, "Can be used" - 6324, "Call special when used" - 6340, "Unused" - 6341, "What to change to?" - 6342, "Amount of damage done" - 6343, "Amount of damage done" - 6344, "Amount of damage done" - 6345, "Strength (1-8)" - 6346, "Strength (1-8)" - 6347, "Unused" - 6348, "Terrain to change to when locked" - 6349, "Terrain to change to when unlocked" - 6350, "Terrain to change to when unlocked" - 6351, "Unused" - 6352, "Number of special to call" - 6353, "Number of special to call" - 6354, "Unused" - 6355, "Unused" - 6356, "Unused" - 6357, "Unused" - 6358, "Unused" - 6359, "Unused" - 6360, "Unused" - 6361, "Terrain type if hidden" - 6362, "Terrain to change to when used" - 6363, "Number of scenario spec. to call" - 6380, "Unused" - 6381, "Number of sound (200 - no sound)" - 6382, "Damage multiplier" - 6383, "Damage multiplier" - 6384, "Damage multiplier" - 6385, "Percentage chance (1-100)" - 6386, "Percentage chance (1-100)" - 6387, "Unused" - 6388, "Unused" - 6389, "Difficulty (0-10)" - 6390, "Difficulty (0-10)" - 6391, "Unused" - 6392, "Unused" - 6393, "Unused" - 6394, "Unused" - 6395, "Unused" - 6396, "Unused" - 6397, "Unused" - 6398, "Unused" - 6399, "Unused" - 6400, "Unused" - 6401, "Unused" - 6402, "Number of sound (200 - no sound)" - 6403, "Unused" - 6601, "No Special" - 6602, "Set Flag" - 6603, "Increment Flag" - 6604, "Display Message" - 6605, "Secret Passage" - 6606, "Display Small Message" - 6607, "Flip Flag" - 6608, "Out Block" - 6609, "Town Block" - 6610, "Combat Block" - 6611, "Looking Block" - 6612, "Can't Enter" - 6613, "Change Time" - 6614, "Start General Timer" - 6615, "Play a Sound" - 6616, "Change Horse Possession" - 6617, "Change Boat Possession" - 6618, "Show/Hide Town" - 6619, "Major Event Has Occured" - 6620, "Forced Give" - 6621, "Buy Items of Type" - 6622, "Call Global Special" - 6623, "Set Many Flags" - 6624, "Copy Flag" - 6625, "Ritual of Sanct. Block" - 6626, "Have a Rest" - 6627, "Wandering will fight" - 6651, "Give Item" - 6652, "Give Special Item" - 6653, "One-Time Do Nothing" - 6654, "One-Time and Set" - 6655, "One-Time Text Message" - 6656, "Display Dialog (Dialog pic)" - 6657, "Display Dialog (Terrain pic)" - 6658, "Display Dialog (Monster pic)" - 6659, "Give Item (Dialog pic)" - 6660, "Give Item (Terrain pic)" - 6661, "Give Item (Monster pic)" - 6662, "One-Time Place Outdoor Enc." - 6663, "One-Time Place Town Enc." - 6664, "Trap" - 6681, "Select a PC" - 6682, "Do Damage" - 6683, "Affect Health" - 6684, "Affect Spell Points" - 6685, "Affect Experience" - 6686, "Affect Skill Points" - 6687, "Kill/Raise Dead" - 6688, "Affect Poison" - 6689, "Affect Slow/Haste" - 6690, "Affect Invulnerability" - 6691, "Affect Magic Resistance" - 6692, "Affect Webs" - 6693, "Affect Disease" - 6694, "Affect Sanctuary" - 6695, "Affect Martyr's Shield" - 6696, "Affect Dumbfounding" - 6697, "Affect Sleep" - 6698, "Affect Paralysis" - 6699, "Affect Statistic" - 6700, "Give Mage Spell" - 6701, "Give Priest Spell" - 6702, "Affect Gold" - 6703, "Affect Food" - 6704, "Affect Alchemy" - 6705, "Affect Stealth" - 6706, "Affect Firewalk" - 6707, "Affect Flying" - 6731, "Stuff Done Flag?" - 6732, "Town Number?" - 6733, "Random Number?" - 6734, "Have Special Item?" - 6735, "Stuff Done Compare?" - 6736, "Terrain this type? (town)" - 6737, "Terrain this type? (out)" - 6738, "Has gold?" - 6739, "Has food?" - 6740, "Item Class on Space?" - 6741, "Have Item With Class?" - 6742, "Equipped Item With Class?" - 6743, "Has Gold? (+ take)" - 6744, "Has Food? (+ take)" - 6745, "Item Class on Space? (+ take)" - 6746, "Have Item With Class? (+ take)" - 6747, "Equip Item W. Class? (+ take)" - 6748, "Day Reached?" - 6749, "Any Barrels?" - 6750, "Any Crates?" - 6751, "Special Thing Happened?" - 6752, "Has Cave Lore?" - 6753, "Has Woodsman?" - 6754, "Has Enough Mage Lore?" - 6755, "Text Response?" - 6771, "Town Hostile" - 6772, "Change Terrain" - 6773, "Swap Terrain" - 6774, "Transform Terrain" - 6775, "Move Party" - 6776, "Hit Space" - 6777, "Explosion on Space" - 6778, "Lock Space" - 6779, "Unlock Space" - 6780, "Do sfx Burst" - 6781, "Make Wandering Monster" - 6782, "Place a Monster" - 6783, "Destroy Monster" - 6784, "Destroy All Monsters" - 6785, "Generic Lever" - 6786, "Generic Portal" - 6787, "Generic Button" - 6788, "Generic Stairway" - 6789, "Lever" - 6790, "Portal" - 6791, "Stairway" - 6792, "Relocate Outdoors" - 6793, "Place Item" - 6794, "Split Party" - 6795, "Reunite Party" - 6796, "Start General Timer" - 6797, "Unused" - 6798, "Unused" - 6799, "Unused" - 6800, "Unused" - 6801, "Place Fire Wall" - 6802, "Place Force Wall" - 6803, "Place Ice Wall" - 6804, "Place Blade Wall" - 6805, "Place Stinking Cloud" - 6806, "Place Sleep Field" - 6807, "Place Quickfire" - 6808, "Place Fire Barrier" - 6809, "Place Force Barrier" - 6810, "Cleanse Rectangle" - 6811, "Place SFX" - 6812, "Place Barrels, Etc." - 6813, "Move Items" - 6814, "Destroy Items" - 6815, "Change Rectange Terrain" - 6816, "Swap Rectangle Terrain" - 6817, "Transform Rectangle Terrain" - 6818, "Lock Rectangle" - 6819, "Unlock Rectangle" - 6826, "Make Outdoor Wandering" - 6827, "Change Out Terrain" - 6828, "Place Outdoor Encounter" - 6829, "Outdoor Move Party" - 6830, "Outdoor Store" 6901, "No ability" 6902, "Flaming Weapon" 6903, "Demon Slayer" @@ -1369,955 +1109,6 @@ STRINGTABLE 7530, "To poison a weapon, use it during combat. Your hand-to-hand weapon (the first one, if two are equipped) or arrows will become poisoned. Each time you attack, the level of poison decreases." 7531, "Don't poison a weapon too long before combat. It's effectiveness decreases with time. Also, switching weapons makes the poison disappear." 7532, "Poisoning an already poisoned weapon doesn't do much good. The weapon gets the maximum poison level of the poison being added or the poison already there, no more." - 9001, "Unused" - 9002, "Value to change to" - 9003, "Increase/Decrease by" - 9004, "Unused" - 9005, "Unused" - 9006, "Unused" - 9007, "Unused" - 9008, "0 - can enter, 1 - no enter" - 9009, "0 - can enter, 1 - no enter" - 9010, "0 - can enter, 1 - no enter" - 9011, "Unused" - 9012, "0 - can enter, 1 - no enter" - 9013, "Number of moves to set forward" - 9014, "Number of moves to set the timer" - 9015, "Which sound" - 9016, "Horse to set (0 .. 29)" - 9017, "Boat to set (0 .. 29)" - 9018, "Town to show/hide" - 9019, "Number of Special Event (0 .. 9)" - 9020, "Item To Give" - 9021, "Item Class to Take Away" - 9022, "Usused" - 9023, "Value to change the 10 flags to" - 9024, "Flag to change to Part A" - 9025, "Unused" - 9026, "Number of moves that pass" - 9027, "0 - no attack, 1 - attack" - 9051, "Item to give" - 9052, "Number of spec. item to give (0 .. 49)" - 9053, "Unused" - 9054, "Unused" - 9055, "Unused" - 9056, "Label of 2nd button (-1 - no button)" - 9057, "Label of 2nd button (-1 - no button)" - 9058, "Label of 2nd button (-1 - no button)" - 9059, "Item to give" - 9060, "Item to give" - 9061, "Item to give" - 9062, "Special outdoor enc. to place (0 .. 3)" - 9063, "Spec. encounter code to activate (0 .. 9)" - 9064, "Type of trap (see docs. for list)" - 9081, "0 - only living, 1 - any PC" - 9082, "Number of dice" - 9083, "Amount" - 9084, "Amount" - 9085, "Amount (0 .. 100)" - 9086, "Amount (0 .. 10)" - 9087, "0 - dead, 1 - dust, 2- stoned" - 9088, "Amount (0 .. 8)" - 9089, "Amount (0 .. 8)" - 9090, "Amount (0 .. 8)" - 9091, "Amount (0 .. 8)" - 9092, "Amount (0 .. 8)" - 9093, "Amount (0 .. 8)" - 9094, "Amount (0 .. 8)" - 9095, "Amount (0 .. 8)" - 9096, "Amount (0 .. 7)" - 9097, "Amount (0 .. 8)" - 9098, "Amount (0 .. 5000)" - 9099, "Amount (0 .. 10)" - 9100, "Amount (0 .. 61)" - 9101, "Amount (0 .. 61)" - 9102, "Amount (0 .. 25000)" - 9103, "Amount (0 .. 25000)" - 9104, "Amount (0 .. 19)" - 9105, "Amount (0 .. 250)" - 9106, "Amount (0 .. 250)" - 9107, "Amount (0 .. 250)" - 9131, "If at least this value ..." - 9132, "If in this town ..." - 9133, "If random # (1 - 100) less than ..." - 9134, "If has spec. item ..." - 9135, "Stuff Done flag 2 Part A" - 9136, "X coordinate of space" - 9137, "X coordinate of space" - 9138, "If party has this much gold ..." - 9139, "If party has this much food ..." - 9140, "X coordinate of space" - 9141, "If has item of this special class ..." - 9142, "If has equipped item of this special ..." - 9143, "If party has this much gold ..." - 9144, "If party has this much food ..." - 9145, "X coordinate of space" - 9146, "If has item of this special class ..." - 9147, "If has equipped item of this class ..." - 9148, "If this day has been reached ..." - 9149, "Unused" - 9150, "Unused" - 9151, "If this day has been reached ..." - 9152, "Unused" - 9153, "Unused" - 9154, "If the party has this much Mage Lore ..." - 9155, "Number of a SCENARIO special message" - 9171, "Unused" - 9172, "X coordinate of space" - 9173, "X coordinate of space" - 9174, "X coordinate of space" - 9175, "X coordinate of space" - 9176, "X coordinate of space" - 9177, "X coordinate of space" - 9178, "X coordinate of space" - 9179, "X coordinate of space" - 9180, "X coordinate of space" - 9181, "Unused" - 9182, "X coordinate of space to place" - 9183, "Type of creature to remove" - 9184, "0 - all, 1 - friendly, 2 - hostile" - 9185, "Unused" - 9186, "X coordinate to telep. to" - 9187, "Unused" - 9188, "X coordinate to go to " - 9189, "Unused" - 9190, "X coordinate to telep. to" - 9191, "X coordinate to place at" - 9192, "X coordinate of outdoor section" - 9193, "X coordinate to place at" - 9194, "X coordinate to place lone PC at" - 9195, "0 - no sound, 1 - teleport sound" - 9196, "Number of moves until event" - 9201, "Top of rectangle" - 9202, "Top of rectangle" - 9203, "Top of rectangle" - 9204, "Top of rectangle" - 9205, "Top of rectangle" - 9206, "Top of rectangle" - 9207, "Top of rectangle" - 9208, "Top of rectangle" - 9209, "Top of rectangle" - 9210, "Top of rectangle" - 9211, "Top of rectangle" - 9212, "Top of rectangle" - 9213, "Top of rectangle" - 9214, "Top of rectangle" - 9215, "Top of rectangle" - 9216, "Top of rectangle" - 9217, "Top of rectangle" - 9218, "Top of rectangle" - 9219, "Top of rectangle" - 9226, "Unused" - 9227, "X coordinate of space" - 9228, "Number of special encounter (0 .. 3)" - 9229, "X coordinate of space" - 9230, "Number of first item in store" - 9301, "Unused" - 9302, "Unused" - 9303, "0 - increase, 1 - decrease" - 9304, "Unused" - 9305, "Unused" - 9306, "Unused" - 9307, "Unused" - 9308, "Unused" - 9309, "Unused" - 9310, "Unused" - 9311, "Unused" - 9312, "Unused" - 9313, "Unused" - 9314, "Special to call when timer runs out" - 9315, "Unused" - 9316, "Unused" - 9317, "Unused" - 9318, "Unused" - 9319, "Unused" - 9320, "Unused" - 9321, "Special to call if no items taken" - 9322, "Unused" - 9323, "Unused" - 9324, "Flag to change to Part B" - 9325, "Special if not casting ritual" - 9326, "Health and spell pts. to give" - 9351, "Amount of gold to give" - 9352, "0 - give item, 1 - take away" - 9353, "Unused" - 9354, "Unused" - 9355, "Unused" - 9356, "Special if button 2 pressed" - 9357, "Special if button 2 pressed" - 9358, "Special if button 2 pressed" - 9359, "Amount of gold to give" - 9360, "Amount of gold to give" - 9361, "Amount of gold to give" - 9362, "Unused" - 9363, "Unused" - 9364, "Trap severity (0 .. 3)" - 9381, "Special if Cancel button pressed" - 9382, "Number of 'sides' on dice" - 9383, "0 - raise, 1 - lower" - 9384, "0 - raise, 1 - lower" - 9385, "0 - raise, 1 - lower" - 9386, "0 - raise, 1 - lower" - 9387, "0 - raise dead, 1 - hurt" - 9388, "0 - cure, 1 - inflict" - 9389, "0 - cure, 1 - inflict" - 9390, "0 - cure, 1 - inflict" - 9391, "0 - cure, 1 - inflict" - 9392, "0 - cure, 1 - inflict" - 9393, "0 - cure, 1 - inflict" - 9394, "0 - adds, 1 - removes" - 9395, "0 - adds, 1 - removes" - 9396, "0 - cure, 1 - inflict" - 9397, "0 - cure, 1 - inflict" - 9398, "0 - cure, 1 - inflict" - 9399, "0 - increase, 1 - decrease" - 9400, "Unused" - 9401, "Unused" - 9402, "0 - increase, 1 - decrease" - 9403, "0 - increase, 1 - decreaseUnused" - 9404, "Unused" - 9405, "Unused" - 9406, "Unused" - 9407, "Unused" - 9431, "Call this special ..." - 9432, "Call this special ..." - 9433, "Call this special ..." - 9434, "Call this special ..." - 9435, "Stuff Done flag 2 Part B" - 9436, "Y coordinate of space" - 9437, "Y coordinate of space" - 9438, "Call this special ..." - 9439, "Call this special ..." - 9440, "Y coordinate of space" - 9441, "Call this special ..." - 9442, "Call this special ..." - 9443, "Call this special ..." - 9444, "Call this special ..." - 9445, "Y coordinate of space" - 9446, "Call this special ..." - 9447, "Call this special ..." - 9448, "Call this special ..." - 9449, "If any barrels, call this special ..." - 9450, "If any crates, call this special ..." - 9451, "And this event didn't happen before it ..." - 9452, "If any Cave Lore, call this special ..." - 9453, "If any Woodsman, call this special ..." - 9454, "Call this special ..." - 9455, "If answer matches, call this special ..." - 9471, "Unused" - 9472, "Y coordinate of space" - 9473, "Y coordinate of space" - 9474, "Y coordinate of space" - 9475, "Y coordinate of space" - 9476, "Y coordinate of space" - 9477, "Y coordinate of space" - 9478, "Y coordinate of space" - 9479, "Y coordinate of space" - 9480, "Y coordinate of space" - 9481, "Unused" - 9482, "Y coordinate of space to place" - 9483, "Unused" - 9484, "Unused" - 9485, "If Pulled, call this special ..." - 9486, "Y coordinate to telep. to" - 9487, "If Pushed, call this special ..." - 9488, "Y coordinate to go to" - 9489, "If Pulled, call this special ..." - 9490, "Y coordinate to telep. to" - 9491, "Y coordinate to place at" - 9492, "Y coordinate of outdoor section" - 9493, "Y coordinate to place at" - 9494, "Y coordinate to place lone PC at" - 9495, "Unused" - 9496, "Call this special when time runs out ..." - 9501, "Left of rectangle" - 9502, "Left of rectangle" - 9503, "Left of rectangle" - 9504, "Left of rectangle" - 9505, "Left of rectangle" - 9506, "Left of rectangle" - 9507, "Left of rectangle" - 9508, "Left of rectangle" - 9509, "Left of rectangle" - 9510, "Left of rectangle" - 9511, "Left of rectangle" - 9512, "Left of rectangle" - 9513, "Left of rectangle" - 9514, "Left of rectangle" - 9515, "Left of rectangle" - 9516, "Left of rectangle" - 9517, "Left of rectangle" - 9518, "Left of rectangle" - 9519, "Left of rectangle" - 9526, "Unused" - 9527, "Y coordinate of space" - 9528, "Unused" - 9529, "Y coordinate of space" - 9530, "Store type (see docs. for list)" - 9601, "Unused" - 9602, "Unused" - 9603, "Unused" - 9604, "Unused" - 9605, "Unused" - 9606, "Unused" - 9607, "Unused" - 9608, "Unused" - 9609, "Unused" - 9610, "Unused" - 9611, "Unused" - 9612, "Unused" - 9613, "Unused" - 9614, "Unused" - 9615, "Unused" - 9616, "0 - becomes property, 1 - not property" - 9617, "0 - becomes property, 1 - not property" - 9618, "Unused" - 9619, "Unused" - 9620, "Unused" - 9621, "Amount to pay for each item" - 9622, "Unused" - 9623, "Unused" - 9624, "Unused" - 9625, "Unused" - 9626, "Unused" - 9651, "Amount of food to give" - 9652, "Unused" - 9653, "Unused" - 9654, "Unused" - 9655, "Unused" - 9656, "Label of 3rd button (-1 - no button)" - 9657, "Label of 3rd button (-1 - no button)" - 9658, "Label of 3rd button (-1 - no button)" - 9659, "Amount of food to give" - 9660, "Amount of food to give" - 9661, "Amount of food to give" - 9662, "Unused" - 9663, "Unused" - 9664, "Disarming penalty (0 .. 100, higher is harder)" - 9681, "Amount of extra damage" - 9682, "Unused" - 9683, "Unused" - 9684, "Unused" - 9685, "Unused" - 9686, "Unused" - 9687, "Unused" - 9688, "Unused" - 9689, "Unused" - 9690, "Unused" - 9691, "Unused" - 9692, "Unused" - 9693, "Unused" - 9694, "Unused" - 9695, "Unused" - 9696, "Unused" - 9697, "Unused" - 9698, "Unused" - 9699, "Stat. to adjust (see docs. for list)" - 9700, "Unused" - 9701, "Unused" - 9702, "Unused" - 9703, "Unused" - 9704, "Unused" - 9705, "Unused" - 9706, "Unused" - 9707, "Unused" - 9731, "If less than this ..." - 9732, "Unused" - 9733, "Unused" - 9734, "Unused" - 9735, "Unused" - 9736, "If space is this terrain type ..." - 9737, "If space is this terrain type ..." - 9738, "Unused" - 9739, "Unused" - 9740, "If item of this class on space ..." - 9741, "Unused" - 9742, "Unused" - 9743, "Unused" - 9744, "Unused" - 9745, "If item of this class on space ..." - 9746, "Unused" - 9747, "Unused" - 9748, "Unused" - 9749, "Unused" - 9750, "Unused" - 9751, "Unused" - 9752, "Unused" - 9753, "Unused" - 9754, "Unused" - 9755, "Number of a SCENARIO special message" - 9771, "Unused" - 9772, "Terrain to change to" - 9773, "Swap this terrain ..." - 9774, "Unused" - 9775, "0 - Just move, 1 - Teleport" - 9776, "Damage to inflict (0 .. 1000)" - 9777, "Damage to inflict (0 .. 1000)" - 9778, "Unused" - 9779, "Unused" - 9780, "0 - fire, 1 - elec., 2 - telep." - 9781, "Unused" - 9782, "Number of creature to place" - 9783, "Unused" - 9784, "Unused" - 9785, "Unused" - 9786, "Unused" - 9787, "Unused" - 9788, "Number of town to place party in" - 9789, "Unused" - 9790, "Unused" - 9791, "Number of town to place party in" - 9792, "X coordinate inside section " - 9793, "Item to place" - 9794, "0 - no telep. noise, 1 - play telep. noise" - 9795, "Unused" - 9796, "Unused" - 9801, "Bottom of rectangle" - 9802, "Bottom of rectangle" - 9803, "Bottom of rectangle" - 9804, "Bottom of rectangle" - 9805, "Bottom of rectangle" - 9806, "Bottom of rectangle" - 9807, "Bottom of rectangle" - 9808, "Bottom of rectangle" - 9809, "Bottom of rectangle" - 9810, "Bottom of rectangle" - 9811, "Bottom of rectangle" - 9812, "Bottom of rectangle" - 9813, "Bottom of rectangle" - 9814, "Bottom of rectangle" - 9815, "Bottom of rectangle" - 9816, "Bottom of rectangle" - 9817, "Bottom of rectangle" - 9818, "Bottom of rectangle" - 9819, "Bottom of rectangle" - 9826, "Unused" - 9827, "Terrain to change to" - 9828, "Special wand. enc. to place (0 .. 3)" - 9829, "Unused" - 9830, "Number of items in store (1 .. 40)" - 9901, "Unused" - 9902, "Unused" - 9903, "Unused" - 9904, "Unused" - 9905, "Unused" - 9906, "Unused" - 9907, "Unused" - 9908, "Unused" - 9909, "Unused" - 9910, "Unused" - 9911, "Unused" - 9912, "Unused" - 9913, "Unused" - 9914, "Unused" - 9915, "Unused" - 9916, "Unused" - 9917, "Unused" - 9918, "Unused" - 9919, "Unused" - 9920, "Special if item not given" - 9921, "Unused" - 9922, "Unused" - 9923, "Unused" - 9924, "Unused" - 9925, "Unused" - 9926, "Unused" - 9951, "Special if item not given" - 9952, "Unused" - 9953, "Unused" - 9954, "Unused" - 9955, "Unused" - 9956, "Special if button 3 pressed" - 9957, "Special if button 3 pressed" - 9958, "Special if button 3 pressed" - 9959, "Special if item IS taken" - 9960, "Special if item IS taken" - 9961, "Special if item IS taken" - 9962, "Unused" - 9963, "Unused" - 9964, "Unused" - 9965, "Unused" - 9981, "Unused" - 9982, "Type of damage (for list, see docs.)" - 9983, "Unused" - 9984, "Unused" - 9985, "Unused" - 9986, "Unused" - 9987, "Unused" - 9988, "Unused" - 9989, "Unused" - 9990, "Unused" - 9991, "Unused" - 9992, "Unused" - 9993, "Unused" - 9994, "Unused" - 9995, "Unused" - 9996, "Unused" - 9997, "Unused" - 9998, "Unused" - 9999, "Unused" - 10000, "Unused" - 10001, "Unused" - 10002, "Unused" - 10003, "Unused" - 10004, "Unused" - 10005, "Unused" - 10006, "Unused" - 10007, "Unused" - 10031, "Call this special ..." - 10032, "Unused" - 10033, "Unused" - 10034, "Unused" - 10035, "Call this special is 2nd flag lower ..." - 10036, "Call this special ..." - 10037, "Call this special ..." - 10038, "Unused" - 10039, "Unused" - 10040, "Call this special ..." - 10041, "Unused" - 10042, "Unused" - 10043, "Unused" - 10044, "Unused" - 10045, "Call this special ..." - 10046, "Unused" - 10047, "Unused" - 10048, "Unused" - 10049, "Unused" - 10050, "Unused" - 10051, "Call this special ..." - 10052, "Unused" - 10053, "Unused" - 10054, "Unused" - 10055, "If answer matches, call this special ..." - 10071, "Unused" - 10072, "Unused" - 10073, "With this terrain ..." - 10074, "Unused" - 10075, "Unused" - 10076, "Unused" - 10077, "Type of damage (for list, see docs.)" - 10078, "Unused" - 10079, "Unused" - 10080, "Unused" - 10081, "Unused" - 10082, "0 - don't force, 1 - force" - 10083, "Unused" - 10084, "Unused" - 10085, "Unused" - 10086, "Unused" - 10087, "Unused" - 10088, "What text? (see docs.)" - 10089, "Unused" - 10090, "Unused" - 10091, "Unused" - 10092, "Y coordinate inside section " - 10093, "Unused" - 10094, "Unused" - 10095, "Unused" - 10096, "Unused" - 10101, "Right of rectangle" - 10102, "Right of rectangle" - 10103, "Right of rectangle" - 10104, "Right of rectangle" - 10105, "Right of rectangle" - 10106, "Right of rectangle" - 10107, "Right of rectangle" - 10108, "Right of rectangle" - 10109, "Right of rectangle" - 10110, "Right of rectangle" - 10111, "Right of rectangle" - 10112, "Right of rectangle" - 10113, "Right of rectangle" - 10114, "Right of rectangle" - 10115, "Right of rectangle" - 10116, "Right of rectangle" - 10117, "Right of rectangle" - 10118, "Right of rectangle" - 10119, "Right of rectangle" - 10126, "Unused" - 10127, "Unused" - 10128, "Unused" - 10129, "Unused" - 10130, "Cost adjust (0 .. 6, lower = cheaper)" - 10501, "Scen name" - 10502, "Who wrote 1 " - 10503, "Who wrote 2" - 10504, "Contact info" - 10511, "Begin journal strs" - 10560, "End journal strs" - 10561, "Unused Special Item" - 10563, "Unused Special Item" - 10565, "Unused Special Item" - 10567, "Unused Special Item" - 10569, "Unused Special Item" - 10571, "Unused Special Item" - 10573, "Unused Special Item" - 10575, "Unused Special Item" - 10577, "Unused Special Item" - 10579, "Unused Special Item" - 10581, "Unused Special Item" - 10583, "Unused Special Item" - 10585, "Unused Special Item" - 10587, "Unused Special Item" - 10589, "Unused Special Item" - 10591, "Unused Special Item" - 10593, "Unused Special Item" - 10595, "Unused Special Item" - 10597, "Unused Special Item" - 10599, "Unused Special Item" - 10601, "Unused Special Item" - 10603, "Unused Special Item" - 10605, "Unused Special Item" - 10607, "Unused Special Item" - 10609, "Unused Special Item" - 10611, "Unused Special Item" - 10613, "Unused Special Item" - 10615, "Unused Special Item" - 10617, "Unused Special Item" - 10619, "Unused Special Item" - 10621, "Unused Special Item" - 10623, "Unused Special Item" - 10625, "Unused Special Item" - 10627, "Unused Special Item" - 10629, "Unused Special Item" - 10631, "Unused Special Item" - 10633, "Unused Special Item" - 10635, "Unused Special Item" - 10637, "Unused Special Item" - 10639, "Unused Special Item" - 10641, "Unused Special Item" - 10643, "Unused Special Item" - 10645, "Unused Special Item" - 10647, "Unused Special Item" - 10649, "Unused Special Item" - 10651, "Unused Special Item" - 10653, "Unused Special Item" - 10655, "Unused Special Item" - 10657, "Unused Special Item" - 10659, "Unused Special Item" - 10660, "End special item descs" - 10661, "*Begin special strs" - 10662, "*" - 10663, "*" - 10664, "*" - 10665, "*" - 10666, "*" - 10667, "*" - 10668, "*" - 10669, "*" - 10670, "*" - 10671, "*" - 10672, "*" - 10673, "*" - 10674, "*" - 10675, "*" - 10676, "*" - 10677, "*" - 10678, "*" - 10679, "*" - 10680, "*" - 10681, "*" - 10682, "*" - 10683, "*" - 10684, "*" - 10685, "*" - 10686, "*" - 10687, "*" - 10688, "*" - 10689, "*" - 10690, "*" - 10691, "*" - 10692, "*" - 10693, "*" - 10694, "*" - 10695, "*" - 10696, "*" - 10697, "*" - 10698, "*" - 10699, "*" - 10700, "*" - 10701, "*" - 10702, "*" - 10703, "*" - 10704, "*" - 10705, "*" - 10706, "*" - 10707, "*" - 10708, "*" - 10709, "*" - 10710, "*" - 10711, "*" - 10712, "*" - 10713, "*" - 10714, "*" - 10715, "*" - 10716, "*" - 10717, "*" - 10718, "*" - 10719, "*" - 10720, "*" - 10721, "*" - 10722, "*" - 10723, "*" - 10724, "*" - 10725, "*" - 10726, "*" - 10727, "*" - 10728, "*" - 10729, "*" - 10730, "*" - 10731, "*" - 10732, "*" - 10733, "*" - 10734, "*" - 10735, "*" - 10736, "*" - 10737, "*" - 10738, "*" - 10739, "*" - 10740, "*" - 10741, "*" - 10742, "*" - 10743, "*" - 10744, "*" - 10745, "*" - 10746, "*" - 10747, "*" - 10748, "*" - 10749, "*" - 10750, "*" - 10751, "*" - 10752, "*" - 10753, "*" - 10754, "*" - 10755, "*" - 10756, "*" - 10757, "*" - 10758, "*" - 10759, "*" - 10760, "*End special strs" - 10761, "From here on, reserved for furute use" - 10801, "Town name" - 10802, "Rectangle 1" - 10803, "Rectangle 2" - 10804, "Rectangle 3" - 10805, "Rectangle 4" - 10806, "Rectangle 5" - 10807, "Rectangle 6" - 10808, "Rectangle 7" - 10809, "Rectangle 8" - 10810, "Rectangle 9" - 10811, "Rectangle 10" - 10812, "Rectangle 11" - 10813, "Rectangle 12" - 10814, "Rectangle 13" - 10815, "Rectangle 14" - 10816, "Rectangle 15" - 10817, "Rectangle 16" - 10818, "Comment 1" - 10819, "Comment 2" - 10820, "Comment 3" - 10821, "*Begin special strs" - 10822, "*" - 10823, "*" - 10824, "*" - 10825, "*" - 10826, "*" - 10827, "*" - 10828, "*" - 10829, "*" - 10830, "*" - 10831, "*" - 10832, "*" - 10833, "*" - 10834, "*" - 10835, "*" - 10836, "*" - 10837, "*" - 10838, "*" - 10839, "*" - 10840, "*" - 10841, "*" - 10842, "*" - 10843, "*" - 10844, "*" - 10845, "*" - 10846, "*" - 10847, "*" - 10848, "*" - 10849, "*" - 10850, "*" - 10851, "*" - 10852, "*" - 10853, "*" - 10854, "*" - 10855, "*" - 10856, "*" - 10857, "*" - 10858, "*" - 10859, "*" - 10860, "*" - 10861, "*" - 10862, "*" - 10863, "*" - 10864, "*" - 10865, "*" - 10866, "*" - 10867, "*" - 10868, "*" - 10869, "*" - 10870, "*" - 10871, "*" - 10872, "*" - 10873, "*" - 10874, "*" - 10875, "*" - 10876, "*" - 10877, "*" - 10878, "*" - 10879, "*" - 10880, "*" - 10881, "*" - 10882, "*" - 10883, "*" - 10884, "*" - 10885, "*" - 10886, "*" - 10887, "*" - 10888, "*" - 10889, "*" - 10890, "*" - 10891, "*" - 10892, "*" - 10893, "*" - 10894, "*" - 10895, "*" - 10896, "*" - 10897, "*" - 10898, "*" - 10899, "*" - 10900, "*" - 10901, "*" - 10902, "*" - 10903, "*" - 10904, "*" - 10905, "*" - 10906, "*" - 10907, "*" - 10908, "*" - 10909, "*" - 10910, "*" - 10911, "*" - 10912, "*" - 10913, "*" - 10914, "*" - 10915, "*" - 10916, "*" - 10917, "*" - 10918, "*" - 10919, "*" - 10920, "*" - 11101, "Area name" - 11102, "Rectangle 1" - 11103, "Rectangle 2" - 11104, "Rectangle 3" - 11105, "Rectangle 4" - 11106, "Rectangle 5" - 11107, "Rectangle 6" - 11108, "Rectangle 7" - 11109, "Rectangle 8" - 11110, "Comment" - 11111, "*Begin special strs" - 11112, "*" - 11113, "*" - 11114, "*" - 11115, "*" - 11116, "*" - 11117, "*" - 11118, "*" - 11119, "*" - 11120, "*" - 11121, "*" - 11122, "*" - 11123, "*" - 11124, "*" - 11125, "*" - 11126, "*" - 11127, "*" - 11128, "*" - 11129, "*" - 11130, "*" - 11131, "*" - 11132, "*" - 11133, "*" - 11134, "*" - 11135, "*" - 11136, "*" - 11137, "*" - 11138, "*" - 11139, "*" - 11140, "*" - 11141, "*" - 11142, "*" - 11143, "*" - 11144, "*" - 11145, "*" - 11146, "*" - 11147, "*" - 11148, "*" - 11149, "*" - 11150, "*" - 11151, "*" - 11152, "*" - 11153, "*" - 11154, "*" - 11155, "*" - 11156, "*" - 11157, "*" - 11158, "*" - 11159, "*" - 11160, "*" - 11161, "*" - 11162, "*" - 11163, "*" - 11164, "*" - 11165, "*" - 11166, "*" - 11167, "*" - 11168, "*" - 11169, "*" - 11170, "*" - 11171, "*" - 11172, "*" - 11173, "*" - 11174, "*" - 11175, "*" - 11176, "*" - 11177, "*" - 11178, "*" - 11179, "*" - 11180, "*" - 11181, "*" - 11182, "*" - 11183, "*" - 11184, "*" - 11185, "*" - 11186, "*" - 11187, "*" - 11188, "*" - 11189, "*" - 11190, "*" - 11191, "*" - 11192, "*" - 11193, "*" - 11194, "*" - 11195, "*" - 11196, "*" - 11197, "*" - 11198, "*" - 11199, "*" - 11200, "*End of special strs" - 11209, "From here on, reserved for future use" 11401, "Poison" 11402, "Ice Bolt" 11403, "Slow Group" @@ -2382,7 +1173,7 @@ STRINGTABLE 11479, "Wall of Blades" 11480, "Word of Recall" 11481, "Major Cleansing" - 11500, "Weak Curing" + 11500, "Weak Curing" 11501, "Weak Healing" 11502, "Weak Poison" 11503, "Weak Speed" @@ -2402,221 +1193,4 @@ STRINGTABLE 11517, "Strong Strength" 11518, "Bliss" 11519, "Strong Power" - 12001, "Regular speech" - 12002, "Unused" - 12003, "Unused" - 12004, "Unused" - 12005, "Unused" - 12006, "First part of response ..." - 12007, "Second part of response ..." - 12008, "Response depends on flag" - 12009, "Stuff Done flag Pt. A" - 12010, "Stuff Done flag Pt. B" - 12011, "Value to compare to" - 12012, "Unused" - 12013, "Response if less than or equal to" - 12014, "Response if greater than" - 12015, "Set flag to 1" - 12016, "Stuff Done flag Pt. A" - 12017, "Stuff Done flag Pt. B" - 12018, "Unused" - 12019, "Unused" - 12020, "First part of response ..." - 12021, "Second part of response ..." - 12022, "Inn" - 12023, "Cost of Inn" - 12024, "Quality of Inn (0 .. 3)" - 12025, "Move party to X" - 12026, "Move party to Y" - 12027, "Response if can afford it ..." - 12028, "Response if not enough money ..." - 12029, "Depends on Day" - 12030, "Day when response changes" - 12031, "Unused" - 12032, "Unused" - 12033, "Unused" - 12034, "Response if day not reached ..." - 12035, "Response if day reached ..." - 12036, "Depends on time (and event)" - 12037, "If this day has been reached ..." - 12038, "And this event did not heppen before it ..." - 12039, "Unused" - 12040, "Unused" - 12041, "Respond with this ..." - 12042, "Otherwise respond with this ..." - 12043, "Depends on town" - 12044, "Town to check" - 12045, "Unused" - 12046, "Unused" - 12047, "Unused" - 12048, "Response if in this town ..." - 12049, "Otherwise respond ..." - 12050, "Buy Items" - 12051, "Cost adjustment (0 .. 6)" - 12052, "Number of first item in shop" - 12053, "Total number of items in shop" - 12054, "Unused" - 12055, "Name of shop" - 12056, "Unused" - 12057, "Receive Training" - 12058, "Unused" - 12059, "Unused" - 12060, "Unused" - 12061, "Unused" - 12062, "Unused" - 12063, "Unused" - 12064, "Mage Spell Shop" - 12065, "Cost adjustment (0 .. 6)" - 12066, "Number of first spell in shop" - 12067, "Total number of spells in shop" - 12068, "Unused" - 12069, "Name of shop" - 12070, "Unused" - 12071, "Priest Spell Shop" - 12072, "Cost adjustment (0 .. 6)" - 12073, "Number of first spell in shop" - 12074, "Total number of spells in shop" - 12075, "Unused" - 12076, "Name of shop" - 12077, "Unused" - 12078, "Alchemy Shop" - 12079, "Cost adjustment (0 .. 6)" - 12080, "Number of first recipe in shop" - 12081, "Total number of recipes in shop" - 12082, "Unused" - 12083, "Name of shop" - 12084, "Unused" - 12085, "Healer" - 12086, "Cost adjustment (0 .. 6)" - 12087, "Unused" - 12088, "Unused" - 12089, "Unused" - 12090, "Name of healer" - 12091, "Unused" - 12092, "Sell Weapons" - 12093, "Unused" - 12094, "Unused" - 12095, "Unused" - 12096, "Unused" - 12097, "Buyer's response" - 12098, "Unused" - 12099, "Sell Armor" - 12100, "Unused" - 12101, "Unused" - 12102, "Unused" - 12103, "Unused" - 12104, "Buyer's response" - 12105, "Unused" - 12106, "Sell All Items" - 12107, "Unused" - 12108, "Unused" - 12109, "Unused" - 12110, "Unused" - 12111, "Buyer's response" - 12112, "Unused" - 12113, "Identify Items" - 12114, "Cost to identify" - 12115, "Unused" - 12116, "Unused" - 12117, "Unused" - 12118, "Person identifying items says:" - 12119, "Unused" - 12120, "Enchant Weapons" - 12121, "Type of enchantment (See docs. for list)" - 12122, "Unused" - 12123, "Unused" - 12124, "Unused" - 12125, "Person augmenting items says:" - 12126, "Unused" - 12127, "Pay For Response" - 12128, "Amount of gold taken" - 12129, "Unused" - 12130, "Unused" - 12131, "Unused" - 12132, "Response if party has gold" - 12133, "Response if they don't" - 12134, "Buy response, Change Flag" - 12135, "Amount of gold taken" - 12136, "Stuff Done Flag, Pt. A" - 12137, "Stuff Done Flag, Pt. B" - 12138, "Change flag to" - 12139, "Response if party has gold" - 12140, "Response if they don't" - 12141, "Ship Shop" - 12142, "Cost of Boat" - 12143, "Number of first boat sold" - 12144, "Total number of boats sold" - 12145, "Unused" - 12146, "Response if party has gold" - 12147, "Response if they don't" - 12148, "Horse Shop" - 12149, "Cost of Horse" - 12150, "Number of first horse sold" - 12151, "Total number of horses sold" - 12152, "Unused" - 12153, "Response if party has gold" - 12154, "Response if they don't" - 12155, "Buy Special Item" - 12156, "Number of item being sold" - 12157, "Cost of item" - 12158, "Unused" - 12159, "Unused" - 12160, "Response if party buys it" - 12161, "Response if party can't afford it" - 12162, "Buy Stuff Done flag change" - 12163, "Amount of Gold taken" - 12164, "Stuff Done Flag, Pt. A" - 12165, "Stuff Done Flag, Pt. B" - 12166, "Value to change flag to" - 12167, "Response if party buys it" - 12168, "Response if party can't afford it" - 12169, "Reveal Town Location" - 12170, "Cost to know where town is" - 12171, "Number of town to reveal" - 12172, "Unused" - 12173, "Unused" - 12174, "Response if party can pay" - 12175, "Response if party can't afford it" - 12176, "Force Conversation End" - 12177, "Unused" - 12178, "Unused" - 12179, "Unused" - 12180, "Unused" - 12181, "First part of response" - 12182, "Second part of response" - 12183, "Hostile Conversation End" - 12184, "Unused" - 12185, "Unused" - 12186, "Unused" - 12187, "Unused" - 12188, "First part of response" - 12189, "Second part of response" - 12190, "Town Hostile Conv. End" - 12191, "Unused" - 12192, "Unused" - 12193, "Unused" - 12194, "Unused" - 12195, "First part of response" - 12196, "Second part of response" - 12197, "Eliminate Creature" - 12198, "Unused" - 12199, "Unused" - 12200, "Unused" - 12201, "Unused" - 12202, "First part of response" - 12203, "Second part of response" - 12204, "Call Town Special" - 12205, "Number of town special node to call" - 12206, "Unused" - 12207, "Unused" - 12208, "Unused" - 12209, "First part of response (if no other response given in special)" - 12210, "Second part of response (if no other response given in special)" - 12211, "Call Scenario Special" - 12212, "Number of scenario special node to call" - 12213, "Unused" - 12214, "Unused" - 12215, "Unused" - 12216, "First part of response (if no other response given in special)" - 12217, "Second part of response (if no other response given in special)" } diff --git a/Win32/Blades of Exile/GLOBAL.H b/Win32/Blades of Exile/GLOBAL.H index 5edf6061..a5a7dbc3 100644 --- a/Win32/Blades of Exile/GLOBAL.H +++ b/Win32/Blades of Exile/GLOBAL.H @@ -342,7 +342,7 @@ struct party_record_type { long age; unsigned short gold,food; - unsigned char stuff_done[310][10],item_taken[200][8]; //stuff_done[309] is compatibility switch + unsigned char stuff_done[310][10],item_taken[200][8]; //stuff_done[309] is compatibility switches short light_level; location outdoor_corner,i_w_c,p_loc,loc_in_sec; boat_record_type boats[30]; @@ -382,9 +382,8 @@ typedef struct { char town_maps[200][8][64]; } stored_town_maps_type; typedef struct { char town_strs[180][256]; } piles_of_stuff_dumping_type; typedef struct { - char scen_header_strs[100][3][80]; - char scen_names[100][256]; - scen_item_data_type scen_item_list; + char scen_header_strs[3][80]; + char scen_names[256]; } piles_of_stuff_dumping_type2; typedef struct { char talk_strs[170][256]; } piles_of_stuff_dumping_type3; diff --git a/Win32/Blades of Exile/GLOBVAR.CPP b/Win32/Blades of Exile/GLOBVAR.CPP index 39de47ba..5ee8fcf6 100644 --- a/Win32/Blades of Exile/GLOBVAR.CPP +++ b/Win32/Blades of Exile/GLOBVAR.CPP @@ -65,7 +65,6 @@ RECT sbar_rect = {545,284,562,421}; RECT shop_sbar_rect = {258,67,274,357}; RECT item_sbar_rect = {545,146,562,254}; int dialog_answer; -POINT store_anim_ul; Boolean All_Done = FALSE, dialog_not_toast = FALSE; Boolean in_startup_mode = TRUE; Boolean play_sounds; @@ -74,7 +73,7 @@ Boolean save_maps = TRUE,party_in_memory = FALSE,in_scen_debug = FALSE; Boolean window_in_front = FALSE; Boolean belt_present = FALSE; Boolean game_run_before = TRUE; -Boolean debug_on = FALSE, give_intro_hint = TRUE; +Boolean give_intro_hint = TRUE; short on_spell_menu[2][62]; short on_monst_menu[256]; short current_cursor = 120; @@ -94,7 +93,7 @@ short spec_item_array[60]; short overall_mode = 45,current_spell_range; Boolean first_update = TRUE,anim_onscreen = FALSE,frills_on = TRUE,suppress_stat_screen = FALSE; short stat_window = 0; -Boolean monsters_going = FALSE,boom_anim_active = FALSE,cartoon_happening = FALSE; +Boolean monsters_going = FALSE,boom_anim_active = FALSE; short give_delays = 0; Boolean modeless_exists[18] = {FALSE,FALSE,FALSE,FALSE,FALSE,FALSE, FALSE,FALSE,FALSE,FALSE,FALSE,FALSE, @@ -149,10 +148,12 @@ char file_path_name[256]; Boolean block_erase = FALSE; /* dynamically allocated */ piles_of_stuff_dumping_type *data_store; -piles_of_stuff_dumping_type2 *data_store2; +piles_of_stuff_dumping_type2 *data_store2 = NULL; piles_of_stuff_dumping_type3 *data_store3; piles_of_stuff_dumping_type4 *data_store4; piles_of_stuff_dumping_type5 *data_store5; +scen_item_data_type *scen_item_list; +scen_header_type *scen_headers = NULL; /* end of dynamically allocated */ char create_line[60]; short spell_being_cast; @@ -377,7 +378,6 @@ short heal_costs[9] = {50,30,80,100,250,500,1000,3000,100}; long cost_mult[7] = {5,7,10,13,16,20,25}; short cur_display_mode; short terrain_pic[256]; -scen_header_type scen_headers[100]; short store_scen_page_on,store_num_scen; #define ND 15 #define NI 500 @@ -543,6 +543,7 @@ void print_write_position (); char szFileName [128] = "blades.sav"; char szTitleName [128] = "blades.sav"; OPENFILENAME ofn; +SCROLLINFO lpsi; // Trying this to fix bug. Hope it works. tiny_tr_type tiny_t; ave_tr_type ave_t; @@ -577,7 +578,7 @@ HBITMAP terrain_screen_gworld,text_bar_gworld,orig_text_bar_gworld,buttons_gworl HBITMAP items_gworld,tiny_obj_gworld,fields_gworld; HBITMAP dlg_buttons_gworld,missiles_gworld,dlogpics_gworld,small_temp_gworld; HBITMAP dialog_pattern_gworld,pattern_gworld,status_pattern_gworld; -HBITMAP ter_anim_gworld, monsters_gworld[10], terrains_gworld[6]; +HBITMAP talking_portraits_gworld, frills_gworld, ter_anim_gworld, monsters_gworld[10], terrains_gworld[6]; // Startup graphics, will die when play starts HBITMAP startup_gworld; HRGN clip_region; @@ -708,7 +709,7 @@ short first_item_shown,store_get_mode,current_getting_pc,store_pcnum,total_items short item_array[130]; // NUM_TOWN_ITEMS + a bit char *store_str; short store_dnum; -char terrain_blocked[256] = {0,0,0,0,0,5,5,1,5,5, +char terrain_blocked[256];/* = {0,0,0,0,0,5,5,1,5,5, 1,5,5,1,5,5,1,5,5,5, 5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,0,0,0,0, @@ -733,7 +734,7 @@ char terrain_blocked[256] = {0,0,0,0,0,5,5,1,5,5, 2,2,2,2,2,2,2,2,5,5, 2,2,0,0,0,0,0,2,2,2, 2,2,2,2,2,0,0,0,0,0, - 0,0,4,4,4,3}; + 0,0,4,4,4,3};*/ short short_can_see(); Boolean combat_pt_in_light(); location which_party_sec; @@ -866,7 +867,7 @@ Boolean can_choose_caster; short store_skills[20],store_h,store_sp,i,store_skp,which_skill; long store_g; short store_train_mode,store_train_pc; -HBITMAP pcs_gworld,pc_gworld; +HBITMAP pcs_gworld; // Dialog vars short store_mage_store ; short store_priest_store ; @@ -976,5 +977,6 @@ word_rect_type preset_words[9] = {{"Look",{4,366,54,389}},{"Name",{70,366,130,38 {"Done",{210,389,270,412}},{"Go Back",{190,366,270,389}}, {"Ask About...",{4,343,134,366}}}; word_rect_type store_words[50]; -// Animation vars -short store_anim_type; +//Timer Special happened ? +BOOL timed_special_happened = FALSE; +BOOL ghost_mode = FALSE; diff --git a/Win32/Blades of Exile/GLOBVAR.H b/Win32/Blades of Exile/GLOBVAR.H index a76cab00..8771efba 100644 --- a/Win32/Blades of Exile/GLOBVAR.H +++ b/Win32/Blades of Exile/GLOBVAR.H @@ -58,7 +58,6 @@ extern RECT sbar_rect; extern RECT shop_sbar_rect; extern RECT item_sbar_rect; extern int dialog_answer; -extern POINT store_anim_ul; extern Boolean All_Done, dialog_not_toast; extern Boolean in_startup_mode ; extern Boolean play_sounds; @@ -67,7 +66,7 @@ extern Boolean save_maps ,party_in_memory ,in_scen_debug ; extern Boolean window_in_front ; extern Boolean belt_present ; extern Boolean game_run_before ; -extern Boolean debug_on , give_intro_hint ; +extern Boolean give_intro_hint ; extern short on_spell_menu[2][62]; extern short on_monst_menu[256]; extern short current_cursor; @@ -87,7 +86,7 @@ extern short spec_item_array[60]; extern short overall_mode,current_spell_range; extern Boolean first_update ,anim_onscreen ,frills_on ,sys_7_avail,suppress_stat_screen ; extern short stat_window,store_modifier; -extern Boolean monsters_going ,boom_anim_active ,cartoon_happening ; +extern Boolean monsters_going, boom_anim_active; extern short give_delays; extern Boolean modeless_exists[18]; extern short modeless_key[18]; @@ -160,6 +159,8 @@ extern piles_of_stuff_dumping_type2 *data_store2; extern piles_of_stuff_dumping_type3 *data_store3; extern piles_of_stuff_dumping_type4 *data_store4; extern piles_of_stuff_dumping_type5 *data_store5; +extern scen_item_data_type *scen_item_list; +extern scen_header_type *scen_headers; /* end of dynamically allocated */ extern char create_line[60]; @@ -252,8 +253,6 @@ extern short cur_display_mode; extern short terrain_pic[256]; -extern scen_header_type scen_headers[100]; - extern short store_scen_page_on,store_num_scen; #define ND 15 @@ -320,6 +319,7 @@ extern char szFileName [128]; extern char szTitleName [128]; extern OPENFILENAME ofn; extern OFSTRUCT save_dir,save_dir2; +extern SCROLLINFO lpsi; // Trying this to fix bug. Hope it works. extern tiny_tr_type tiny_t; @@ -357,7 +357,7 @@ extern HBITMAP mixed_gworld, pc_stats_gworld, item_stats_gworld, text_area_gworl extern HBITMAP terrain_screen_gworld,text_bar_gworld,orig_text_bar_gworld,buttons_gworld; extern HBITMAP items_gworld,tiny_obj_gworld,fields_gworld; extern HBITMAP dlg_buttons_gworld,missiles_gworld,dlogpics_gworld,small_temp_gworld; -extern HBITMAP ter_anim_gworld,monsters_gworld[10], terrains_gworld[6]; +extern HBITMAP talking_portraits_gworld, frills_gworld, ter_anim_gworld,monsters_gworld[10], terrains_gworld[6]; extern HBITMAP dialog_pattern_gworld,pattern_gworld,status_pattern_gworld; @@ -519,7 +519,7 @@ extern short store_skills[20],store_h,store_sp,i,store_skp,which_skill; extern long store_g; extern short store_train_mode,store_train_pc; -extern HBITMAP pcs_gworld,pc_gworld; +extern HBITMAP pcs_gworld; // Dialog vars extern short store_mage_store ; @@ -596,7 +596,8 @@ extern Boolean kludge_force_full_refresh ; extern word_rect_type preset_words[9]; extern word_rect_type store_words[50]; -// Animation vars -extern short store_anim_type; +//Timer Special happened ? +extern BOOL timed_special_happened; +extern BOOL ghost_mode; #endif diff --git a/Win32/Blades of Exile/GRAPHICS.CPP b/Win32/Blades of Exile/GRAPHICS.CPP index cb726caf..74044e05 100644 --- a/Win32/Blades of Exile/GRAPHICS.CPP +++ b/Win32/Blades of Exile/GRAPHICS.CPP @@ -14,6 +14,8 @@ #include "exlsound.h" #include "graphutl.h" +#include "infodlgs.h" + #include "globvar.h" BOOL fry_startup = FALSE; @@ -230,7 +232,7 @@ void draw_startup_stats() to_rect = party_from; // width = 28, height = 36 OffsetRect(&to_rect,pc_rect.left,pc_rect.top + 2); - rect_draw_some_item(pc_gworld,from_rect,NULL,to_rect,0,1); + rect_draw_some_item(pcs_gworld,from_rect,NULL,to_rect,0,1); InflateRect(&to_rect,1,1); OffsetRect(&to_rect,ulx,uly); FrameRect(main_dc,&to_rect,hbrush); @@ -405,9 +407,7 @@ void end_startup() void Set_up_win () { RECT map_rect = {0,0,384,384}; - RECT pc_rect = {0,0,113,216}; short i,j; - RECT r = {0,0,280,180}; /**/ RECT bg_from[9] = {{0,168,8,176},{23,206,31,214},{32,168,40,176},{102,174,110,182}, {173,191,181,199},{203,190,211,198},{273,183,281,191},{373,0,381,8}, {380,17,388,25}}; @@ -432,10 +432,14 @@ void Set_up_win () mixed_gworld = load_pict(903,main_dc); //let's load the remaining sheets in memory - pc_gworld = load_pict(902,main_dc); + pcs_gworld = load_pict(902,main_dc); ter_anim_gworld = load_pict(820, main_dc); - + + frills_gworld = load_pict(4000, main_dc); + + talking_portraits_gworld = load_pict(860,main_dc); + for(i=0;i<10;i++) monsters_gworld[i] = load_pict(1100+i, main_dc); @@ -511,8 +515,10 @@ void lose_graphics() DeleteObject(map_gworld); DeleteObject(small_temp_gworld); - DeleteObject(pc_gworld); + DeleteObject(pcs_gworld); DeleteObject(ter_anim_gworld); + DeleteObject(frills_gworld); + DeleteObject(talking_portraits_gworld); for(i=0;i<10;i++) DeleteObject(monsters_gworld[i]); @@ -632,11 +638,16 @@ void redraw_screen(short) text_sbar = CreateWindow("scrollbar",NULL, WS_CHILD | WS_TABSTOP | SBS_VERT | WS_VISIBLE, sbar_rect.left,sbar_rect.top,sbar_rect.right,sbar_rect.bottom, mainPtr,(HMENU) 1,store_hInstance,NULL); - SetScrollRange(text_sbar,SB_CTL,0,58,FALSE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax =58; + SetScrollInfo(text_sbar,SB_CTL,&lpsi,FALSE); +// SetScrollRange(text_sbar,SB_CTL,0,58,FALSE); item_sbar = CreateWindow("scrollbar",NULL, WS_CHILD | WS_TABSTOP | SBS_VERT | WS_VISIBLE, item_sbar_rect.left,item_sbar_rect.top,item_sbar_rect.right,item_sbar_rect.bottom, mainPtr,(HMENU) 2,store_hInstance,NULL); - SetScrollRange(item_sbar,SB_CTL,0,16,FALSE); + lpsi.nMax = 16; + SetScrollInfo(item_sbar,SB_CTL,&lpsi,FALSE); +// SetScrollRange(item_sbar,SB_CTL,0,16,FALSE); ShowScrollBar(text_sbar,SB_CTL,TRUE); ShowScrollBar(item_sbar,SB_CTL,TRUE); MoveWindow(text_sbar,ulx + 547,uly + 283,15,138,TRUE); @@ -892,11 +903,11 @@ Boolean is_nature(char x, char y) return TRUE; if ((pic >= 121) && (pic <= 122)) return TRUE; - if ((pic >= 179) && (pic <= 208)) + if ((pic >= 179) && (pic <= 207)) return TRUE; if ((pic >= 211) && (pic <= 212)) return TRUE; - if ((pic >= 217) && (pic <= 246)) + if ((pic >= 217) && (pic <= 245)) return TRUE; return FALSE; @@ -906,6 +917,8 @@ void swap_platform_graphics(){ int i,j; RECT map_from_orig = {372,0,380,8},map_from,brush_to = {0,0,8,8}; + DeleteObject(frills_gworld); + frills_gworld = load_pict(4000, main_dc); DeleteObject(ter_anim_gworld); ter_anim_gworld = load_pict(820, main_dc); DeleteObject(fields_gworld); @@ -1041,9 +1054,7 @@ void draw_terrain(short mode) else if (is_combat()) { spec_terrain = combat_terrain[where_draw.x][where_draw.y]; - if (cartoon_happening == TRUE) - can_draw = TRUE; - else can_draw = (((is_explored(where_draw.x,where_draw.y)) || + can_draw = (((is_explored(where_draw.x,where_draw.y)) || (which_combat_type == 0) || (monsters_going == TRUE) || (overall_mode != 10)) && (party_can_see(where_draw) < 6)) ? 1 : 0; @@ -1063,7 +1074,7 @@ void draw_terrain(short mode) if ((can_draw != 0) && (overall_mode != 50)) { // if can see, not a pit, and not resting - if ((is_combat()) && (cartoon_happening == FALSE)) { + if (is_combat()) { anim_ticks = 0; } @@ -1129,8 +1140,8 @@ void draw_terrain(short mode) default: if (short_spec_terrain < 2) current_ground = 0; - if ((short_spec_terrain == 2) || ( - (short_spec_terrain >= 22) && (short_spec_terrain <= 49))) + if (((short_spec_terrain >= 2) && (short_spec_terrain <= 4)) || + ((short_spec_terrain >= 22) && (short_spec_terrain <= 49))) current_ground = 2; draw_one_terrain_spot(q,r,short_spec_terrain,0); break; @@ -1142,7 +1153,7 @@ void draw_terrain(short mode) } if ((can_draw != 0) && (overall_mode != 50) && (frills_on == TRUE) - && (draw_trim == TRUE) && (cartoon_happening == FALSE)) { // Place the trim + && (draw_trim == TRUE)) { // Place the trim place_trim((short) q,(short) r,where_draw,spec_terrain); } } @@ -1196,15 +1207,12 @@ void draw_terrain(short mode) if (mode == 0) { redraw_terrain(); - if (cartoon_happening == FALSE) { draw_text_bar(0); if ((overall_mode > 9) && (overall_mode != 35) && (overall_mode != 36) && (overall_mode != 50)) draw_pcs(center,1); if (overall_mode == 14) draw_targets(center); - } - } @@ -1282,7 +1290,8 @@ void place_trim(short q,short r,location where,unsigned char ter_type) } - if (((ter_type >= 100) && (ter_type <= 137)) && (at_top == FALSE) && +// if (((ter_type >= 100) && (ter_type <= 137)) && (at_top == FALSE) && + if (((ter_type >= 122) && (ter_type <= 169)) && (at_top == FALSE) && (at_bot == FALSE) && (at_left == FALSE) && (at_right == FALSE)) { store = get_t_t(where.x - 1,where.y); store1 = get_t_t(where.x,where.y - 1); @@ -1292,7 +1301,8 @@ void place_trim(short q,short r,location where,unsigned char ter_type) && (is_wall(store1) == TRUE) && (is_ground(store2) == TRUE) && (is_ground(store3) == TRUE)) - draw_trim(q,r,3,6); + draw_trim(q,r,3,6); + if ((is_wall(store) == TRUE) && (is_wall(store3) == TRUE) && @@ -1351,14 +1361,10 @@ void draw_trim(short q,short r,short which_trim,short which_mode) //which_trim is 3 -> drawing wall trim -> might shift down if ground is grass //short which_mode; // 0 top 1 bottom 2 left 3 right 4 up left 5 up right 6 down right 7 down left { - HBITMAP from_file; RECT from_rect = {0,0,28,36},to_rect; - from_file = load_pict(4000,main_dc); - if (frills_on == FALSE) - return; - if (current_ground == 2 && PSD[309][3] == 0) + if ((frills_on == FALSE) || ((current_ground == 2) && (PSD[309][3] == 0))) return; terrain_there[q][r] = -1; @@ -1376,9 +1382,8 @@ void draw_trim(short q,short r,short which_trim,short which_mode) to_rect.bottom = to_rect.top + trim_rects[which_mode].bottom; to_rect.top = to_rect.top + trim_rects[which_mode].top; - rect_draw_some_item(from_file,from_rect,terrain_screen_gworld,to_rect,1,0); + rect_draw_some_item(frills_gworld,from_rect,terrain_screen_gworld,to_rect,1,0); - DeleteObject(from_file); } @@ -1469,11 +1474,11 @@ void pre_boom_space(location where,short mode,short type,short damage,short soun sound_key = type / 10; type = type % 10; - if ((cartoon_happening == FALSE) && ((mode != 100) && (party_can_see(where) == 6))) + if ((mode != 100) && (party_can_see(where) == 6)) return; if ((type < 0) || (type > 4)) return; if ((boom_anim_active == TRUE) && (type != 3)) return; - if ((cartoon_happening == FALSE) && (PSD[306][2] > 0) && (fast_bang == TRUE)) return; + if ((PSD[306][2] > 0) && (fast_bang == TRUE)) return; if (is_out()) return; // Redraw terrain in proper position @@ -1536,11 +1541,7 @@ void pre_boom_space(location where,short mode,short type,short damage,short soun //SectRect(&dest_rect,&big_to,&dest_rect); IntersectRect(&dest_rect,&dest_rect,&big_to); - if (cartoon_happening == FALSE) - OffsetRect(&dest_rect,win_to_rects[0].left,win_to_rects[0].top); - else if (store_anim_type == 0) - OffsetRect(&dest_rect,306,5); - else OffsetRect(&dest_rect,store_anim_ul.x,store_anim_ul.y); + OffsetRect(&dest_rect,win_to_rects[0].left,win_to_rects[0].top); OffsetRect(&source_rect,-1 * store_rect.left + 28 * type,-1 * store_rect.top); @@ -1549,7 +1550,7 @@ void pre_boom_space(location where,short mode,short type,short damage,short soun // rect_draw_some_item(fields_gworld,source_rect,mixed_gworld,mixed_square,1,0); rect_draw_some_item(fields_gworld,source_rect,mixed_gworld,dest_rect,1,1); - if ((cartoon_happening == FALSE) && (dest_rect.right - dest_rect.left >= 28) + if ((dest_rect.right - dest_rect.left >= 28) && (dest_rect.bottom - dest_rect.top >= 36)) { sprintf((char *) dam_str,"%d",damage); text_rect = dest_rect; @@ -1580,7 +1581,7 @@ void pre_boom_space(location where,short mode,short type,short damage,short soun } redraw_terrain(); - if ((cartoon_happening == FALSE) && (overall_mode > 9) && (overall_mode != 35) && (overall_mode != 36) && (overall_mode != 50)) + if ((overall_mode > 9) && (overall_mode != 35) && (overall_mode != 36) && (overall_mode != 50)) draw_pcs(center,1); } @@ -1607,18 +1608,7 @@ void draw_pointing_arrows() void redraw_terrain() { - RECT to_rect; - RECT ter_scrn_rect = {0,0,279,351}; - - if (cartoon_happening == FALSE) - to_rect = win_to_rects[0]; - else { - to_rect = ter_scrn_rect; - if (store_anim_type == 0) - OffsetRect(&to_rect,306,5); - else OffsetRect(&to_rect,store_anim_ul.x,store_anim_ul.y); - } - rect_draw_some_item (terrain_screen_gworld, win_from_rects[0], terrain_screen_gworld, to_rect, 0, 1); + rect_draw_some_item (terrain_screen_gworld, win_from_rects[0], terrain_screen_gworld, win_to_rects[0], 0, 1); // Now place arrows draw_pointing_arrows(); diff --git a/Win32/Blades of Exile/GRAPHICS.H b/Win32/Blades of Exile/GRAPHICS.H index 99e58a75..ababa287 100644 --- a/Win32/Blades of Exile/GRAPHICS.H +++ b/Win32/Blades of Exile/GRAPHICS.H @@ -44,7 +44,6 @@ void erase_spot(short i,short j); void draw_targeting_line(POINT where_curs); Boolean party_toast(); void redraw_partial_terrain(RECT redraw_rect); -void dump_gworld(); void final_process_dialog(short which_dlog); Boolean is_nature(char i, char j); void put_dialog_graphic(short graphic_num,short spec_g,RECT draw_rect); diff --git a/Win32/Blades of Exile/GRAPHUTL.CPP b/Win32/Blades of Exile/GRAPHUTL.CPP index c8c14a5b..8fda2d3f 100644 --- a/Win32/Blades of Exile/GRAPHUTL.CPP +++ b/Win32/Blades of Exile/GRAPHUTL.CPP @@ -299,7 +299,7 @@ HBITMAP load_pict(short pict_num,HDC) case 850: got_bitmap = ReadBMP("images/DLOGPICS.BMP"); break; case 851: got_bitmap = ReadBMP("images/SCENPICS.BMP"); break; case 860: got_bitmap = ReadBMP("images/TALKPORT.BMP"); break; - case 875: got_bitmap = ReadBMP("images/DLOGMAPS.BMP"); break; +// case 875: got_bitmap = ReadBMP("images/DLOGMAPS.BMP"); break; => Exile III maps case 880: got_bitmap = ReadBMP("images/MISSILES.BMP"); break; case 900: got_bitmap = ReadBMP("images/TINYOBJ.BMP"); break; case 901: got_bitmap = ReadBMP("images/OBJECTS.BMP"); break; diff --git a/Win32/Blades of Exile/GUTILS.CPP b/Win32/Blades of Exile/GUTILS.CPP index 1f20f470..5f4e1068 100644 --- a/Win32/Blades of Exile/GUTILS.CPP +++ b/Win32/Blades of Exile/GUTILS.CPP @@ -19,7 +19,7 @@ void draw_one_terrain_spot (short i,short j,short terrain_to_draw,short dest) //short dest; // 0 - terrain gworld 1 - screen // if terrain_to_draw is -1, do black -// if terrain_to_draw >= 1000, force to draw graphic which is terrain_to_draw - 1000 +// if terrain_to_draw >= 10000, force to draw graphic which is terrain_to_draw - 10000 { RECT where_draw; RECT source_rect; @@ -41,13 +41,13 @@ void draw_one_terrain_spot (short i,short j,short terrain_to_draw,short dest) where_draw = calc_rect(i,j); OffsetRect(&where_draw,13,13); if (terrain_to_draw == -1) { - if ((cartoon_happening == FALSE) && (terrain_there[i][j] == 300)) { + if (terrain_there[i][j] == 300) { return; } terrain_there[i][j] = 300; hdc = CreateCompatibleDC(main_dc); store_bmp = (HBITMAP) SelectObject(hdc,terrain_screen_gworld); - SelectObject(hdc,GetStockObject(BLACK_BRUSH)); + SelectObject(hdc,GetStockObject(BLACK_BRUSH)); Rectangle(hdc,where_draw.left,where_draw.top,where_draw.right,where_draw.bottom); SelectObject(hdc,store_bmp); if (!DeleteDC(hdc)) DebugQuit("Cannot release DC 24"); @@ -79,12 +79,11 @@ void draw_one_terrain_spot (short i,short j,short terrain_to_draw,short dest) anim_type = 0; } else { - if (cartoon_happening == FALSE) { - if (terrain_there[i][j] == terrain_pic[terrain_to_draw]) { - return; - } - terrain_there[i][j] = terrain_pic[terrain_to_draw]; - } + if (terrain_there[i][j] == terrain_pic[terrain_to_draw]) { + return; + } + terrain_there[i][j] = terrain_pic[terrain_to_draw]; + source_gworld = terrains_gworld[(terrain_pic[terrain_to_draw]) / 50]; source_rect = return_item_rect(terrain_pic[terrain_to_draw]); anim_type = -1; @@ -225,8 +224,7 @@ void draw_monsters() if (is_combat()) { for (i = 0; i < T_M; i++) if ((c_town.monst.dudes[i].active != 0) && (c_town.monst.dudes[i].m_d.spec_skill != 11)) - if (((point_onscreen(center,c_town.monst.dudes[i].m_loc) == TRUE) && (cartoon_happening == TRUE)) - || (party_can_see_monst(i) == TRUE)) { + if ((point_onscreen(center,c_town.monst.dudes[i].m_loc) == TRUE) && (party_can_see_monst(i) == TRUE)) { where_draw.x = c_town.monst.dudes[i].m_loc.x - center.x + 4; where_draw.y = c_town.monst.dudes[i].m_loc.y - center.y + 4; get_monst_dims(c_town.monst.dudes[i].number,&width,&height); @@ -285,12 +283,10 @@ void draw_pcs(location center,short mode) if (party_toast() == TRUE) return; // is party dead if (can_draw_pcs == FALSE) return; - if ((mode == 1) && (cartoon_happening == TRUE)) return; - for (i = 0; i < NUM_OF_PCS; i++) if (adven[i].isAlive()) - if (((point_onscreen(center, pc_pos[i])) == TRUE) && - ((cartoon_happening == TRUE) || (party_can_see(pc_pos[i]) < 6))){ + if ((point_onscreen(center, pc_pos[i]) == TRUE) && + (party_can_see(pc_pos[i]) < 6)){ where_draw.x = pc_pos[i].x - center.x + 4; where_draw.y = pc_pos[i].y - center.y + 4; source_rect = get_party_template_rect(i,(pc_dir[i] < 4) ? 0 : 1); @@ -298,7 +294,7 @@ void draw_pcs(location center,short mode) OffsetRect(&source_rect,280,0); if (mode == 0) - Draw_Some_Item(pc_gworld, source_rect, terrain_screen_gworld, where_draw, 1, 0); + Draw_Some_Item(pcs_gworld, source_rect, terrain_screen_gworld, where_draw, 1, 0); if ((current_pc == i) && (mode == 1) && (monsters_going == FALSE)) frame_space(pc_pos[current_pc],1,1,1); @@ -315,7 +311,7 @@ void draw_pcs(location center,short mode) OffsetRect(&source_rect,280,0); if (mode == 0) - Draw_Some_Item(pc_gworld, source_rect, terrain_screen_gworld, where_draw, 1, 0); + Draw_Some_Item(pcs_gworld, source_rect, terrain_screen_gworld, where_draw, 1, 0); } } @@ -337,8 +333,7 @@ void draw_items() (same_point(where_draw,ok_space[3]) == FALSE)) ; else if ((point_onscreen(center, t_i.items[i].item_loc) == TRUE) && - (t_i.items[i].isContained() == false) && - ((cartoon_happening == TRUE) || (party_can_see(t_i.items[i].item_loc) < 6))) { + (t_i.items[i].isContained() == false) && (party_can_see(t_i.items[i].item_loc) < 6)) { if (t_i.items[i].graphic_num >= 150) { source_rect = get_custom_rect(t_i.items[i].graphic_num - 150); dest_rect = coord_to_rect(where_draw.x,where_draw.y); @@ -543,7 +538,7 @@ void draw_party_symbol(location center) // now wedge in bed graphic if ((is_town()) && (scenario.ter_types[t_d.terrain[c_town.p_loc.x][c_town.p_loc.y]].picture == 143)) draw_one_terrain_spot((short) target.x,(short) target.y,10230,0); - else Draw_Some_Item(pc_gworld, source_rect, terrain_screen_gworld, target, 1, 0); + else Draw_Some_Item(pcs_gworld, source_rect, terrain_screen_gworld, target, 1, 0); } else if (party.in_boat >= 0) { source_rect = boat_rects[dir_array[party.direction]]; @@ -665,7 +660,7 @@ Boolean is_ground(unsigned char ter_type) if ((pic >= 121) && (pic <= 122)) return TRUE; if ((pic >= 179) && (pic <= 208)) return TRUE; if ((pic >= 211) && (pic <= 212)) return TRUE; - if ((pic >= 215) && (pic <= 246)) return TRUE; + if ((pic >= 215) && (pic <= 245)) return TRUE; return FALSE; } @@ -820,7 +815,7 @@ void adjust_monst_menu() for (i = 0; i < 256; i++) if (on_monst_menu[i] >= 0) { //GetIndString(monst_name, 2,on_monst_menu[i]); - sprintf((char *) monst_name,"%s",data_store2->scen_item_list.monst_names[on_monst_menu[i]]); if ((total_added % 24 == 0) && (total_added > 0)) + sprintf((char *) monst_name,"%s",scen_item_list->monst_names[on_monst_menu[i]]); if ((total_added % 24 == 0) && (total_added > 0)) InsertMenu(menu,599,MF_MENUBREAK | MF_BYCOMMAND | MF_ENABLED | MF_STRING, 600 + i, monst_name); else InsertMenu(menu,599,MF_BYCOMMAND | MF_ENABLED | MF_STRING, 600 + i, monst_name); total_added++; diff --git a/Win32/Blades of Exile/INFODLGS.CPP b/Win32/Blades of Exile/INFODLGS.CPP index 77b2d95f..027c2138 100644 --- a/Win32/Blades of Exile/INFODLGS.CPP +++ b/Win32/Blades of Exile/INFODLGS.CPP @@ -779,18 +779,25 @@ void display_pc_info() hit_adj -= 25; dam_adj = adven[pc].statAdj(0) + minmax(-8,8,(int)adven[pc].status[1]); - if ((skill_item = text_pc_has_abil_equip(pc,101)) < 24) { - hit_adj += 5 * (adven[pc].items[skill_item].item_level + 1); - dam_adj += adven[pc].items[skill_item].item_level; + + if ((skill_item = text_pc_has_abil_equip(pc,37)) < 24) { + hit_adj += 5 * (adven[pc].items[skill_item].ability_strength / 2 + 1); + dam_adj += adven[pc].items[skill_item].ability_strength / 2; + } + if ((skill_item = text_pc_has_abil_equip(pc,43)) < 24) { + dam_adj += adven[pc].items[skill_item].ability_strength; + hit_adj += adven[pc].items[skill_item].ability_strength * 2; } - if ((skill_item = text_pc_has_abil_equip(pc,96)) < 24) { +// hit_adj += 5 * (adven[pc].items[skill_item].item_level + 1); +// dam_adj += adven[pc].items[skill_item].item_level; +/* if ((skill_item = text_pc_has_abil_equip(pc,96)) < 24) { dam_adj += 2; hit_adj += 1; } if ((skill_item = text_pc_has_abil_equip(pc,97)) < 24) { hit_adj += 5; dam_adj += 3; - } + }*/ csit(1019,56,"No weapon."); csit(1019,57,""); diff --git a/Win32/Blades of Exile/ITEMDATA.CPP b/Win32/Blades of Exile/ITEMDATA.CPP index f0991481..7915f8f6 100644 --- a/Win32/Blades of Exile/ITEMDATA.CPP +++ b/Win32/Blades of Exile/ITEMDATA.CPP @@ -28,7 +28,7 @@ item_record_type get_stored_item(short which) return s_item; } - s_item = data_store2->scen_item_list.scen_items[which]; + s_item = scen_item_list->scen_items[which]; return s_item; } diff --git a/Win32/Blades of Exile/ITEMS.CPP b/Win32/Blades of Exile/ITEMS.CPP index 4ba3f37b..3122b434 100644 --- a/Win32/Blades of Exile/ITEMS.CPP +++ b/Win32/Blades of Exile/ITEMS.CPP @@ -475,8 +475,7 @@ short display_item(location from_loc,short pc_num, short mode, bool check_contai total_items_gettable++; } } - if (pcs_gworld == NULL) - pcs_gworld = load_pict(902,main_dc); + cd_create_dialog(987,mainPtr); if (check_container == true) @@ -501,9 +500,6 @@ short display_item(location from_loc,short pc_num, short mode, bool check_contai cd_kill_dialog(987,0); - DeleteObject(pcs_gworld); - pcs_gworld = NULL; - put_item_screen(stat_window,0); put_pc_screen(); diff --git a/Win32/Blades of Exile/LOCUTILS.CPP b/Win32/Blades of Exile/LOCUTILS.CPP index c905f0a4..bf693574 100644 --- a/Win32/Blades of Exile/LOCUTILS.CPP +++ b/Win32/Blades of Exile/LOCUTILS.CPP @@ -324,7 +324,7 @@ Boolean is_blocked(location to_check) // Keep away from marked specials during combat if ((is_combat()) && (gr <= 212) && (gr >= 207)) return TRUE; - if ((is_combat()) && (gr == 406)) + if ((is_combat()) && (gr == 406))//portal return TRUE; // Party there? diff --git a/Win32/Blades of Exile/MONSTER.CPP b/Win32/Blades of Exile/MONSTER.CPP index cf67c570..5373d324 100644 --- a/Win32/Blades of Exile/MONSTER.CPP +++ b/Win32/Blades of Exile/MONSTER.CPP @@ -10,6 +10,8 @@ #include "graphics.h" #include "newgraph.h" +#include "infodlgs.h" + #include "globvar.h" monster_record_type return_monster_template(unsigned char store) @@ -1065,16 +1067,35 @@ void forced_place_monster(unsigned char which,location where) Boolean free_spot = FALSE; short i = 0,r1; - while ((free_spot == FALSE) && (i < T_M)) { + while ((free_spot == FALSE) && (i < T_M)) {//is there already an available spot ? if (c_town.monst.dudes[i].active == 0) free_spot = TRUE; i++; } - do + + if (free_spot == FALSE){//is there any summoned monster to flush ? + i=0; + while ((free_spot == FALSE) && (i < T_M)) { + if (c_town.monst.dudes[i].summoned > 0){ + c_town.monst.dudes[i].active = 0;//flush the monster + free_spot = TRUE;//break the loop and say we've make a free spot + } + i++; + } + } + + if (free_spot == FALSE){//get a random monster that has no life flag or break after 1200 try. + i=0; + do{ r1 = get_ran(1,0,59); - while ((c_town.monst.dudes[r1].monst_start.spec1 != 0) || (c_town.monst.dudes[r1].monst_start.spec2 != 0)); - if (free_spot == FALSE) - c_town.monst.dudes[r1].active = 0; + i++; + } + while (((c_town.monst.dudes[r1].monst_start.spec1 != 0) || (c_town.monst.dudes[r1].monst_start.spec2 != 0)) && i < 1200); + if(i == 1200) + give_error("Couldn't force place the monster, make sure all monsters don't have a life flag.","",0); + else + c_town.monst.dudes[r1].active = 0; + } c_town.placeMonster(which,where); } @@ -1082,7 +1103,8 @@ void creature_data_type::adjustMagic(short *how_much) { if (m_d.spec_skill == 26) { *how_much = 0; - m_d.health += 3; + if(m_d.health + 3 < 32767) + m_d.health += 3; } if (m_d.immunities & 1) *how_much = *how_much / 2; if (m_d.immunities & 2) *how_much = 0; /* crash!! */ @@ -1287,16 +1309,13 @@ Boolean summon_monster(unsigned char which,location where,short duration,short g void current_town_type::activateMonsters(short code) { short i; - unsigned char which; - if (code == 0) return; - + for (i = 0; i < T_M; i++) if (monst.dudes[i].monst_start.spec_enc_code == code && party.stuff_done[monst.dudes[i].monst_start.spec1][monst.dudes[i].monst_start.spec2] == 0) { monst.dudes[i].monst_start.spec_enc_code = 0; monst.dudes[i].active = 2; - which = monst.dudes[i].number; monst.dudes[i].attitude = t_d.creatures[i].start_attitude; monst.dudes[i].summoned = 0; diff --git a/Win32/Blades of Exile/NEWGRAPH.CPP b/Win32/Blades of Exile/NEWGRAPH.CPP index c49e55cf..f2f23784 100644 --- a/Win32/Blades of Exile/NEWGRAPH.CPP +++ b/Win32/Blades of Exile/NEWGRAPH.CPP @@ -349,16 +349,9 @@ void do_missile_anim(short num_steps,location missile_origin,short sound_num) return; // initialize general data - if ((in_startup_mode == TRUE) && (store_anim_type == 0)) { - current_terrain_ul.x = 306; - current_terrain_ul.y = 5; - } - else if ((cartoon_happening == TRUE) && (store_anim_type > 0)) { - current_terrain_ul = store_anim_ul; - } - else { - current_terrain_ul.x = current_terrain_ul.y = 5; - } + + current_terrain_ul.x = current_terrain_ul.y = 5; + // make terrain_template contain current terrain all nicely draw_terrain(1); @@ -453,8 +446,7 @@ void do_missile_anim(short num_steps,location missile_origin,short sound_num) } if ((PSD[306][6] == 3) || ((PSD[306][6] == 1) && (t % 4 == 0)) || ((PSD[306][6] == 2) && (t % 3 == 0))) Delay(1,&delay_dummy); - if ((cartoon_happening == TRUE) && (t % 3 == 0) ) - Delay(1,&delay_dummy); + } // Exit gracefully, and clean up screen @@ -544,16 +536,7 @@ void do_explosion_anim(short, short special_draw) return; // initialize general data - if ((in_startup_mode == TRUE) && (store_anim_type == 0)) { - current_terrain_ul.x = 306; - current_terrain_ul.y = 5; - } - else if ((cartoon_happening == TRUE) && (store_anim_type > 0)) { - current_terrain_ul = store_anim_ul; - } - else { - current_terrain_ul.x = current_terrain_ul.y = 5; - } + current_terrain_ul.x = current_terrain_ul.y = 5; // make terrain_template contain current terrain all nicely @@ -643,8 +626,6 @@ void do_explosion_anim(short, short special_draw) } Delay(2 * (1 + PSD[306][6]),&delay_dummy); - if (cartoon_happening == TRUE) - Delay(1,&delay_dummy); } // Exit gracefully, and clean up screen diff --git a/Win32/Blades of Exile/PARTY.CPP b/Win32/Blades of Exile/PARTY.CPP index ea356309..a448fe77 100644 --- a/Win32/Blades of Exile/PARTY.CPP +++ b/Win32/Blades of Exile/PARTY.CPP @@ -48,8 +48,8 @@ void init_party(short mode) for (i = 0; i < 310; i++) for (j = 0; j < 10; j++) party.stuff_done[i][j] = 0; - if(scenario.prog_make_ver[0] < 2) PSD[305][8] = 1; //old scenario format ? so, no resurrection balm needed - else PSD[305][8] = 0; + if(scenario.prog_make_ver[0] < 2) PSD[SDF_LEGACY_SCENARIO] = 1; //old scenario format ? so, no resurrection balm needed + else PSD[SDF_LEGACY_SCENARIO] = 0; PSD[SDF_NO_INSTANT_HELP] = store_help; @@ -152,8 +152,8 @@ void init_party_scen_data() for (j = 0; j < 10; j++) party.stuff_done[i][j] = 0; PSD[SDF_NO_INSTANT_HELP] = store_help; - if(scenario.prog_make_ver[0] < 2) PSD[305][8] = 1; //old scenario format ? so, no resurrection balm needed - else PSD[305][8] = 0; + if(scenario.prog_make_ver[0] < 2) PSD[SDF_LEGACY_SCENARIO] = 1; //old scenario format ? so, no resurrection balm needed + else PSD[SDF_LEGACY_SCENARIO] = 0; party.light_level = 0; party.outdoor_corner.x = scenario.out_sec_start.x; @@ -1467,7 +1467,7 @@ void do_priest_spell(short pc_num,short spell_num) play_sound(52); sprintf ((char *) c_line," Your items glow. "); } - if (PSD[305][8] == 0 && ((spell_num == 40) || (spell_num == 56))){ + if (PSD[SDF_LEGACY_SCENARIO] == 0 && ((spell_num == 40) || (spell_num == 56))){ if ((item = adven[pc_num].hasAbil(160)) == 24) { sprintf(c_line," Need resurrection balm. "); spell_num = 500; @@ -1650,7 +1650,7 @@ void cast_town_spell(location where) break; case 108: // RItual - sanctify - sanctify_space(where); + check_spell_on_space(where,108); break; case 20: @@ -1706,10 +1706,11 @@ void cast_town_spell(location where) } } -void sanctify_space(location where) +void check_spell_on_space(location where, unsigned char spell) { short i,s1,s2,s3; + if(PSD[SDF_LEGACY_SCENARIO] == 1){ for (i = 0; i < 50; i++) if ((same_point(where,c_town.town.special_locs[i]) == TRUE) //GK && (c_town.town.spec_id[i] >= 0) @@ -1720,6 +1721,20 @@ void sanctify_space(location where) return; } add_string_to_buf(" Nothing happens."); + } + else{ + for (i = 0; i < 50; i++) + if ((same_point(where,c_town.town.special_locs[i]) == TRUE) + //GK && (c_town.town.spec_id[i] >= 0) + ) + { + if ((c_town.town.specials[c_town.town.spec_id[i]].type == 24) && (c_town.town.specials[c_town.town.spec_id[i]].ex1a == spell)) + run_special(16,2,c_town.town.spec_id[i],where,&s1,&s2,&s3); + return; + } + if(spell == 108) + add_string_to_buf(" Nothing happens."); + } } void do_mindduel(short pc_num,creature_data_type *monst) @@ -2469,7 +2484,6 @@ Boolean pick_pc_graphic(short pc_num,short mode,short parent_num) // mode ... 0 - create 1 - created { short i; - Boolean munch_pc_graphic = FALSE; store_graphic_pc_num = pc_num; store_graphic_mode = mode; @@ -2477,10 +2491,6 @@ Boolean pick_pc_graphic(short pc_num,short mode,short parent_num) SetCursor(sword_curs); - if (pcs_gworld == NULL) { - munch_pc_graphic = TRUE; - pcs_gworld = load_pict(902,main_dc); - } cd_create_dialog_parent_num(1050,parent_num); for (i = 41; i < 77; i++) @@ -2493,10 +2503,6 @@ Boolean pick_pc_graphic(short pc_num,short mode,short parent_num) while (dialog_not_toast) ModalDialog(); cd_kill_dialog(1050,0); - if (munch_pc_graphic == TRUE) { - DeleteObject(pcs_gworld); - pcs_gworld = NULL; - } return dialog_answer; } @@ -2738,11 +2744,11 @@ bool pc_record_type::damage(short how_much, short damage_type, short type_of_att if ((damage_type == DAMAGE_DEMON) && ((tlevel = getProtLevel(58)) > 0)) how_much /= ((tlevel >= 7) ? 4 : 2); - if ((type_of_attacker == 6) && ((tlevel = getProtLevel(59)) > 0)) + if ((type_of_attacker == 6) && ((tlevel = getProtLevel(59)) > 0))//protection from humanoids how_much /= ((tlevel >= 7) ? 4 : 2); - if ((type_of_attacker == 1) && ((tlevel = getProtLevel(60)) > 0)) + if ((type_of_attacker == 1) && ((tlevel = getProtLevel(60)) > 0))//protection from reptiles how_much /= ((tlevel >= 7) ? 4 : 2); - if ((type_of_attacker == 9) && ((tlevel = getProtLevel(61)) > 0)) + if ((type_of_attacker == 9) && ((tlevel = getProtLevel(61)) > 0))//protection from giants how_much /= ((tlevel >= 7) ? 4 : 2); diff --git a/Win32/Blades of Exile/PARTY.H b/Win32/Blades of Exile/PARTY.H index 598c118b..ea1af477 100644 --- a/Win32/Blades of Exile/PARTY.H +++ b/Win32/Blades of Exile/PARTY.H @@ -21,7 +21,7 @@ void give_party_spell(short which); void do_mage_spell(short pc_num,short spell_num); void do_priest_spell(short pc_num,short spell_num); void cast_town_spell(location where); -void sanctify_space(location where); +void check_spell_on_space(location where, unsigned char spell); void do_mindduel(short pc_num,creature_data_type *monst); void dispel_fields(short i,short j,short mode); Boolean pc_can_cast_spell(short pc_num,short type,short spell_num); diff --git a/Win32/Blades of Exile/PC.CPP b/Win32/Blades of Exile/PC.CPP index 93e57e96..b28f5e79 100644 --- a/Win32/Blades of Exile/PC.CPP +++ b/Win32/Blades of Exile/PC.CPP @@ -484,7 +484,7 @@ void pc_record_type::acid(short how_much) { if (!isAlive()) return; - if (hasAbilEquip(122) < 24) { + if (hasAbilEquip(36) < 24) { sprintf ((char *) c_line, " %s resists acid.",(char *) name); add_string_to_buf((char *) c_line); return; diff --git a/Win32/Blades of Exile/SPECIALS.CPP b/Win32/Blades of Exile/SPECIALS.CPP index bc824e6b..59b4f593 100644 --- a/Win32/Blades of Exile/SPECIALS.CPP +++ b/Win32/Blades of Exile/SPECIALS.CPP @@ -497,8 +497,8 @@ effect_pat_type s = {{{0,0,0,0,0,0,0,0,0}, else sprintf((char *) to_draw, "Use: %s",adven[pc].items[item].full_name); add_string_to_buf((char *) to_draw); - if ((adven[pc].items[item].variety == 7) && - (adven[pc].items[item].graphic_num >= 50) && (adven[pc].items[item].graphic_num <= 52)) + if ((adven[pc].items[item].variety == ITEM_TYPE_POTION))// && +// (adven[pc].items[item].graphic_num >= 50) && (adven[pc].items[item].graphic_num <= 52)) play_sound(56); str = adven[pc].items[item].ability_strength; @@ -762,7 +762,8 @@ effect_pat_type s = {{{0,0,0,0,0,0,0,0,0}, break; case 120: r1 = get_ran(6,1,4); - for (i = 0; i < get_ran(1,3,5); i++) + j = get_ran(1,3,5); + for (i = 0; i < j; i++) if (summon_monster(str,user_loc,r1,2) == FALSE) add_string_to_buf(" Summon failed."); break; @@ -924,6 +925,7 @@ Boolean use_space(location where) break; case 23: // call special run_special(17,0,scenario.ter_types[ter].flag1,where,&i,&i,&i); + return TRUE; break; } add_string_to_buf(" Nothing to use."); @@ -936,7 +938,7 @@ Boolean use_space(location where) // Can't get items out in combat. Boolean adj_town_look(location where) { - char terrain; + unsigned char terrain; Boolean can_open = TRUE,item_there = FALSE,got_special = FALSE; short i = 0, s1 = 0, s2 = 0, s3 = 0; @@ -962,16 +964,15 @@ Boolean adj_town_look(location where) if ((is_container(where)) && (item_there == TRUE) && (can_open == TRUE)) get_item(where,6,TRUE); - else switch (terrain) + else if (scenario.ter_types[terrain].special == 22 || scenario.ter_types[terrain].special == 23) { - case 22: case 23: add_string_to_buf(" (Use this space to do something"); add_string_to_buf(" with it.)"); - break; - default: - if (got_special == FALSE) add_string_to_buf(" Search: You don't find anything. "); - return FALSE; - } + + } + + else if (got_special == FALSE) add_string_to_buf(" Search: You don't find anything. "); + return FALSE; } @@ -1120,7 +1121,8 @@ Boolean damage_monst(short which_m, short who_hit, short how_much, short how_muc // Absorb damage? if (((dam_type == 1) || (dam_type == 3) || (dam_type == 5)) && (victim->m_d.spec_skill == 26)) { - victim->m_d.health += how_much; + if((victim->m_d.health + how_much) < 32767) + victim->m_d.health += how_much; ASB(" Magic absorbed."); return FALSE; } @@ -1424,10 +1426,11 @@ void push_things() } } -void special_increase_age() +BOOL special_increase_age() { short i,s1,s2,s3; Boolean redraw = FALSE,stat_area = FALSE; + BOOL to_return = FALSE; for (i = 0; i < 8; i++) if ((c_town.town.timer_spec_times[i] > 0) && (party.age % c_town.town.timer_spec_times[i] == 0) @@ -1436,6 +1439,7 @@ void special_increase_age() stat_area = TRUE; if (s3 > 0) redraw = TRUE; + to_return = TRUE; } for (i = 0; i < 20; i++) if ((scenario.scenario_timer_times[i] > 0) && (party.age % scenario.scenario_timer_times[i] == 0)) { @@ -1443,6 +1447,7 @@ void special_increase_age() stat_area = TRUE; if (s3 > 0) redraw = TRUE; + to_return = TRUE; } for (i = 0; i < 30; i++) if (party.party_event_timers[i] > 0) { @@ -1454,6 +1459,7 @@ void special_increase_age() stat_area = TRUE; if (s3 > 0) redraw = TRUE; + to_return = TRUE; } else party.party_event_timers[i]--; } @@ -1464,6 +1470,7 @@ void special_increase_age() if (redraw == TRUE) draw_terrain(0); +return to_return; } // This is the big painful one, the main special engine @@ -1494,12 +1501,12 @@ void run_special(short which_mode,short which_type,short start_spec,location spe { short cur_spec,cur_spec_type,next_spec,next_spec_type; special_node_type cur_node; - short num_nodes = 0; if (special_in_progress == TRUE) { give_error("The scenario called a special node while processing another special encounter. The second special will be ignored.","",0); return; } + special_in_progress = TRUE; next_spec = start_spec; next_spec_type = which_type; @@ -1509,7 +1516,7 @@ void run_special(short which_mode,short which_type,short start_spec,location spe special_in_progress = FALSE; return; } - + while (next_spec >= 0) { cur_spec = next_spec; @@ -1543,12 +1550,13 @@ void run_special(short which_mode,short which_type,short start_spec,location spe outdoor_spec(which_mode,cur_node,cur_spec_type,&next_spec,&next_spec_type,a,b,redraw); } - num_nodes++; - if (num_nodes >= 50) { - give_error("A special encounter can be at most 50 nodes long. The 50th node was just processed. The encounter will now end.","",0); - next_spec = -1; - } +// if(((GetAsyncKeyState(VK_LCONTROL) & 32768) == 32768) && ((GetAsyncKeyState(0x43) & 32768) == 32768)) {//Ctrl-C escape sequence check + if(check_for_interrupt()){ + give_error("The special encounter was interrupted. The scenario may be in an unexpected state; it is recommended that you reload from a saved game.","",0); +// give_error("A special encounter can be at most 50 nodes long. The 50th node was just processed. The encounter will now end.","",0); + next_spec = -1; } + } if (is_out()) erase_out_specials(); else erase_specials(); @@ -1742,7 +1750,13 @@ void general_spec(short which_mode,special_node_type cur_node,short cur_spec_typ *a = (spec.ex1a == 0) ? 1 : 0; break; case 27: - end_scenario = TRUE; + char count=0;//temporary fix, maybe we'll do a special "you lose" dialog. + for(i=0;i<6;i++) + if(adven[i].isAlive() == FALSE) + count++; + + if(count != 6) + end_scenario = TRUE; break; } if (check_mess == TRUE) { @@ -1934,7 +1948,10 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type spec = cur_node; *next_spec = cur_node.jumpto; - pc = current_pc_picked_in_spec_enc; + if((PSD[SDF_IS_PARTY_SPLIT] > 0) && (cur_node.type != SPEC_AFFECT_DEADNESS)) + pc = PSD[SDF_PARTY_SPLIT_PC]; + else pc = current_pc_picked_in_spec_enc; + if ((check_mess == TRUE) && (cur_node.type != 80)) { @@ -1971,19 +1988,13 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type break; case 82: for (i = 0; i < 6; i++) - if(PSD[304][0] > 0 && adven[i].main_status == MAIN_STATUS_ALIVE) //party split ? - adven[i].cur_health = minmax(0, (int)adven[i].max_health, - adven[i].cur_health + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); - else if (PSD[304][0] == 0 && ((pc < 0) || (pc == i))) + if ((pc < 0) || (pc == i)) adven[i].cur_health = minmax(0, (int)adven[i].max_health, adven[i].cur_health + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); break; case 83: for (i = 0; i < 6; i++){ - if(PSD[304][0] > 0 && adven[i].main_status == MAIN_STATUS_ALIVE) //party split ? - adven[i].cur_sp = minmax(0, (int)adven[i].max_sp, - adven[i].cur_sp + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); - else if (PSD[304][0] == 0 && ((pc < 0) || (pc == i))) + if ((pc < 0) || (pc == i)) adven[i].cur_sp = minmax(0, (int)adven[i].max_sp, adven[i].cur_sp + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); } @@ -1997,10 +2008,7 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type break; case 85: for (i = 0; i < 6; i++) - if(PSD[304][0] > 0 && adven[i].main_status == MAIN_STATUS_ALIVE) //party split ? - adven[i].skill_pts = minmax(0, 100, - adven[i].skill_pts + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); - else if (PSD[304][0] == 0 && ((pc < 0) || (pc == i))) + if ((pc < 0) || (pc == i)) adven[i].skill_pts = minmax(0, 100, adven[i].skill_pts + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); break; @@ -2100,10 +2108,7 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type break; } for (i = 0; i < 6; i++) - if(PSD[304][0] > 0 && adven[i].main_status == MAIN_STATUS_ALIVE && (get_ran(1,1,100) <= spec.pic)) //party split ? - adven[i].skills[spec.ex2a] = minmax(0, (int)skill_max[spec.ex2a], - adven[i].skills[spec.ex2a] + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); - else if (PSD[304][0] == 0 && ((pc < 0) || (pc == i)) && (get_ran(1,1,100) <= spec.pic)) + if (((pc < 0) || (pc == i)) && (get_ran(1,1,100) <= spec.pic)) adven[i].skills[spec.ex2a] = minmax(0, (int)skill_max[spec.ex2a], adven[i].skills[spec.ex2a] + spec.ex1a * ((spec.ex1b != 0) ? -1: 1)); break; @@ -2113,9 +2118,7 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type break; } for (i = 0; i < 6; i++) - if(PSD[304][0] > 0 && adven[i].main_status == MAIN_STATUS_ALIVE && (get_ran(1,1,100) <= spec.pic)) //party split ? - adven[i].mage_spells[spec.ex1a + 30] = TRUE; - else if (PSD[304][0] == 0 && ((pc < 0) || (pc == i))) + if ((pc < 0) || (pc == i)) adven[i].mage_spells[spec.ex1a + 30] = TRUE; break; case 100: @@ -2124,9 +2127,7 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type break; } for (i = 0; i < 6; i++) - if(PSD[304][0] > 0 && adven[i].main_status == MAIN_STATUS_ALIVE && (get_ran(1,1,100) <= spec.pic)) //party split ? - adven[i].priest_spells[spec.ex1a + 30] = TRUE; - else if (PSD[304][0] == 0 && ((pc < 0) || (pc == i))) + if ((pc < 0) || (pc == i)) adven[i].priest_spells[spec.ex1a + 30] = TRUE; break; case 101: @@ -2651,13 +2652,14 @@ void townmode_spec(short which_mode,special_node_type cur_node,short cur_spec_ty *next_spec = -1; check_mess = FALSE; } - if (party.stuff_done[304][0] > 0) { + else if (party.stuff_done[304][0] > 0) { ASB("Party is already split."); if (which_mode < 3) *a = 1; *next_spec = -1; check_mess = FALSE; } + else{ r1 = char_select_pc(1,0,"Which character goes?"); if (which_mode < 3) *a = 1; @@ -2666,7 +2668,8 @@ void townmode_spec(short which_mode,special_node_type cur_node,short cur_spec_ty *next_spec = -1; start_split(spec.ex1a,spec.ex1b,spec.ex2a); } - else check_mess = FALSE; + else check_mess = FALSE; + } break; case 194: if (is_combat()) { diff --git a/Win32/Blades of Exile/SPECIALS.H b/Win32/Blades of Exile/SPECIALS.H index 7ff09a3b..0767c3ac 100644 --- a/Win32/Blades of Exile/SPECIALS.H +++ b/Win32/Blades of Exile/SPECIALS.H @@ -13,7 +13,7 @@ void PSOE(short str1a,short str1b,short str2a,short str2b, short which_special,unsigned char *stuff_done_val,short where_put); Boolean damage_monst(short which_m, short who_hit, short how_much, short how_much_spec, short dam_type); void kill_monst(creature_data_type *which_m,short who_killed); -void special_increase_age(); +BOOL special_increase_age(); void out_move_party(char x,char y) ; void teleport_party(short x,short y,short mode); Boolean run_stone_circle(short which); diff --git a/Win32/Blades of Exile/TEXT.CPP b/Win32/Blades of Exile/TEXT.CPP index 8dbaeaa8..3db14475 100644 --- a/Win32/Blades of Exile/TEXT.CPP +++ b/Win32/Blades of Exile/TEXT.CPP @@ -82,14 +82,14 @@ void put_pc_screen() // Put food, gold, day SetTextColor(hdc,colors[5]); - sprintf((char *) to_draw, "%d", (short) party.gold); + sprintf(to_draw, "%d", party.gold); win_draw_string(hdc,small_erase_rects[1], to_draw,0,10); - sprintf((char *) to_draw, "%d", (short) party.food); + sprintf(to_draw, "%d", party.food); win_draw_string(hdc,small_erase_rects[0], to_draw,0,10); i = calc_day(); - sprintf((char *) to_draw, "%d", i); + sprintf(to_draw, "%d", i); win_draw_string(hdc,small_erase_rects[2], to_draw,0,10); SetTextColor(hdc,colors[0]); @@ -103,7 +103,7 @@ void put_pc_screen() SetTextColor(hdc,colors[4]); } - sprintf((char *) to_draw, "%d. %-20s ", i + 1, (char *) adven[i].name); + sprintf(to_draw, "%d. %-20s ", i + 1, adven[i].name); win_draw_string(hdc,pc_buttons[i][0], to_draw,0,10); SelectObject(hdc,small_bold_font); @@ -116,13 +116,13 @@ void put_pc_screen() if (adven[i].cur_health == adven[i].max_health) SetTextColor(hdc,colors[3]); else SetTextColor(hdc,colors[1]); - sprintf((char *) to_draw, "%-3d ",adven[i].cur_health); + sprintf(to_draw, "%-3d ",adven[i].cur_health); win_draw_string(hdc,pc_buttons[i][1], to_draw,0,10); if (adven[i].cur_sp == adven[i].max_sp) SetTextColor(hdc,colors[4]); else SetTextColor(hdc,colors[2]); - sprintf((char *) to_draw, "%-3d ",adven[i].cur_sp); + sprintf(to_draw, "%-3d ",adven[i].cur_sp); win_draw_string(hdc,pc_buttons[i][2], to_draw,0,10); SetTextColor(hdc,colors[0]); @@ -131,26 +131,26 @@ void put_pc_screen() SelectObject(hdc,pc_stats_gworld); break; case MAIN_STATUS_DEAD: - sprintf((char *) to_draw, "Dead"); + sprintf(to_draw, "Dead"); break; case MAIN_STATUS_DUST: - sprintf((char *) to_draw, "Dust"); + sprintf(to_draw, "Dust"); break; case MAIN_STATUS_STONE: - sprintf((char *) to_draw, "Stone"); + sprintf(to_draw, "Stone"); break; case MAIN_STATUS_FLED: - sprintf((char *) to_draw, "Fled"); + sprintf(to_draw, "Fled"); break; case MAIN_STATUS_SURFACE: - sprintf((char *) to_draw, "Surface"); + sprintf(to_draw, "Surface"); break; case MAIN_STATUS_WON: - sprintf((char *) to_draw, "Won"); + sprintf(to_draw, "Won"); break; case MAIN_STATUS_ABSENT: default: - sprintf((char *) to_draw, "Absent"); + sprintf(to_draw, "Absent"); break; } if (adven[i].isAlive() == false) @@ -285,6 +285,11 @@ void put_item_screen(short screen_num,short suppress_buttons) } break; case 7: // On jobs page + SelectObject(hdc,bold_font); + win_draw_string(hdc,upper_frame_rect,"Your current jobs:",0,10); +/* SelectObject(hdc,font); + SetTextColor(hdc,colors[0]); + win_draw_string(hdc,item_buttons[0][0],"Test",0,10);*/ break; default: // on an items page @@ -385,6 +390,7 @@ void place_buy_button(short position,short pc_num,short item_num,HDC hdc) RECT button_sources[3] = {{0,24,30,36},{30,24,60,36},{0,36,30,48}}; /**/ short val_to_place; short aug_cost[10] = {4,7,10,8, 15,15,10, 0,0,0}; + HBITMAP store_bmp; if (adven[pc_num].items[item_num].variety == 0) @@ -441,7 +447,10 @@ void place_buy_button(short position,short pc_num,short item_num,HDC hdc) (adven[pc_num].items[item_num].isMagic() == false)) { item_area_button_active[position][5] = TRUE; source_rect = button_sources[2]; - val_to_place = max(aug_cost[shop_identify_cost] * 100,adven[pc_num].items[item_num].value * (5 + aug_cost[shop_identify_cost])); + if(adven[pc_num].items[item_num].value <=1400) + val_to_place = max(aug_cost[shop_identify_cost] * 100,adven[pc_num].items[item_num].value * (5 + aug_cost[shop_identify_cost]));//original + else + val_to_place = 1400 * (5 + aug_cost[shop_identify_cost]) + (30000 - 1400 * (5 + aug_cost[shop_identify_cost]))* (adven[pc_num].items[item_num].value - 1400)/8600;//really smoothen the price curve } break; } @@ -535,7 +544,7 @@ void place_item_bottom_buttons() rect_draw_some_item (mixed_gworld, but_from_rect, item_stats_gworld, to_rect, 0, 0); pc_from_rect = get_party_template_rect(i,0); InsetRect(&to_rect,2,2); - rect_draw_some_item (pc_gworld, pc_from_rect, item_stats_gworld, to_rect, 0, 0); + rect_draw_some_item (pcs_gworld, pc_from_rect, item_stats_gworld, to_rect, 0, 0); // } } @@ -562,8 +571,10 @@ void set_stat_window(short new_stat) short i,array_pos = 0; stat_window = new_stat; + if ((stat_window < 6) && (adven[stat_window].isAlive() == false)) stat_window = first_active_pc(); + lpsi.fMask = SIF_RANGE; switch (stat_window) { case 6: for (i = 0; i < 60; i++) @@ -574,16 +585,25 @@ void set_stat_window(short new_stat) array_pos++; } array_pos = max(0,array_pos - 8); - SetScrollRange(item_sbar,SB_CTL,0,array_pos,FALSE); +// SetScrollRange(item_sbar,SB_CTL,0,array_pos,FALSE); + lpsi.nMax = array_pos; + SetScrollInfo(item_sbar,SB_CTL,&lpsi,FALSE); break; case 7: - SetScrollRange(item_sbar,SB_CTL,0,2,FALSE); +// SetScrollRange(item_sbar,SB_CTL,0,2,FALSE); + lpsi.nMax = 2; + SetScrollInfo(item_sbar,SB_CTL,&lpsi,FALSE); break; default: - SetScrollRange(item_sbar,SB_CTL,0,16,FALSE); +// SetScrollRange(item_sbar,SB_CTL,0,16,FALSE); + lpsi.nMax = 16; + SetScrollInfo(item_sbar,SB_CTL,&lpsi,FALSE); break; } - SetScrollPos(item_sbar,SB_CTL,0,TRUE); +// SetScrollPos(item_sbar,SB_CTL,0,TRUE); + lpsi.nPos = 0; + lpsi.fMask = SIF_POS; + SetScrollInfo(item_sbar,SB_CTL,&lpsi,TRUE); put_item_screen(stat_window,0); } @@ -1017,7 +1037,7 @@ void notify_out_combat_began(out_wandering_type encounter,short *nums) void get_m_name(char *str,unsigned char num) { - strcpy((char *) str,(char *) data_store2->scen_item_list.monst_names[num]); + strcpy( str, scen_item_list->monst_names[num]); } void get_ter_name(char *str,unsigned char num) { @@ -1027,7 +1047,7 @@ void get_ter_name(char *str,unsigned char num) if ((num == 90) && ((is_out()) || (is_town()) || ((is_combat()) && (which_combat_type == 1)))) sprintf((char *) store_name,"Pit"); else { - strcpy((char *) store_name,(char *) data_store2->scen_item_list.ter_names[num]); + strcpy(store_name, scen_item_list->ter_names[num]); } strcpy((char *) str,(char *) store_name); } @@ -1179,7 +1199,10 @@ short print_terrain(location space) void add_string_to_buf(char *string) { - SetScrollPos(text_sbar,SB_CTL,58,TRUE); +// SetScrollPos(text_sbar,SB_CTL,58,TRUE); + lpsi.nPos = 58; + lpsi.fMask = SIF_POS; + SetScrollInfo(text_sbar,SB_CTL,&lpsi,TRUE); string_added = TRUE; if (buf_pointer == mark_where_printing_long) { printing_long = TRUE; @@ -1379,7 +1402,7 @@ void win_draw_string(HDC dest_hdc,RECT dest_rect,char *str,short mode, short) short calc_day() { - return (short) ((party.age) / 3700) + 1; + return ((party.age) / 3700) + 1; } Boolean day_reached(unsigned char which_day, unsigned char which_event) diff --git a/Win32/Blades of Exile/TOWN.CPP b/Win32/Blades of Exile/TOWN.CPP index 6b377591..a6e43258 100644 --- a/Win32/Blades of Exile/TOWN.CPP +++ b/Win32/Blades of Exile/TOWN.CPP @@ -201,6 +201,7 @@ void start_town_mode(short which_town, short entry_dir) c_town.monst.dudes[i].number = 0; c_town.monst.dudes[i].monst_start.time_flag = 0; c_town.monst.dudes[i].m_loc.x = 80; + c_town.monst.dudes[i].monst_start.spec_enc_code = 0; } else { // First set up the values. @@ -708,7 +709,7 @@ void create_out_combat_terrain(short type,short num_walls) { short i,j,k,r1,ter_type; // 0 grass 1 cave 2 mntn 3 bridge 4 cave bridge 5 rubble cave 6 cave tree 7 cave mush -// 8 cave swamp 9 surface rocks 10 surf swamp 11 surface woods 12 s. shrub 13 stalags +// 8 cave swamp 9 surface rocks 10 surface swamp 11 surface woods 12 s. shrub 13 stalags short general_types[260] = {1,1,0,0,0,1,1,1,1,1, 1,1,1,1,1,1,1,1,2,2, 2,2,2,2,2,2,2,2,2,2, @@ -717,7 +718,7 @@ short general_types[260] = {1,1,0,0,0,1,1,1,1,1, 0,0,0,0,0,0,0,0,0,0,// 50 0,3,3,3,3,3,3,5,5,5, 6,6,7,7,1,1,8,9,10,11, -10,11,12,13,13,9,9,9,1,1, +11,11,12,13,13,9,9,9,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,// 100 1,1,1,1,1,1,1,1,1,1, @@ -728,15 +729,15 @@ short general_types[260] = {1,1,0,0,0,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,0,1,1,1,1,1,1,1,0, -0,0,0,0,1,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0, 0,0,1,0,2,0,0,1,1,1,// 200 -1,0,2,1,1,0,1,1,1,1, +1,0,2,1,1,1,0,1,1,1, 1,1,0,0,0,0,1,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1};// 250 short ter_base[14] = {2,0,36,50,71, 0,0,0,0,2, 2,2,2,0}; -short ground_type[14] = {2,0,36,50,71, 0,0,0,0,2, 2,2,2,0}; +//short ground_type[14] = {2,0,36,50,71, 0,0,0,0,2, 2,2,2,0}; location special_ter_locs[15] = { @@ -766,7 +767,9 @@ short terrain_odds[14][10] = {{3,80,4,40,115,20,114,10,112,1}, ter_type = scenario.ter_types[type].picture; - if (ter_type > 260) + if(ter_type == 401 || ter_type == 402) + ter_type = 4; + else if (ter_type > 260) ter_type = 1; else ter_type = general_types[ter_type]; @@ -793,7 +796,7 @@ short terrain_odds[14][10] = {{3,80,4,40,115,20,114,10,112,1}, for (j = 9; j < 35; j++) t_d.terrain[i][j] = 83; } - if ((type >= 79) && (type <= 81)) { + if (ter_type == 11) { t_d.terrain[0][0] = 82; for (i = 19; i < 23; i++) for (j = 9; j < 35; j++) @@ -836,7 +839,7 @@ short terrain_odds[14][10] = {{3,80,4,40,115,20,114,10,112,1}, } - if (ground_type[ter_type] == 0) { + if (ter_base[ter_type] == 0) { for (i = 0; i < num_walls; i++) { r1 = get_ran(1,0,3); for (j = 9; j < 35; j++) @@ -864,7 +867,7 @@ short terrain_odds[14][10] = {{3,80,4,40,115,20,114,10,112,1}, if ((t_d.terrain[8][20] == 9) && (t_d.terrain[17][35] == 12)) t_d.terrain[8][35] = 20; } - if (ground_type[ter_type] == 36) { + if (ter_base[ter_type] == 36) { for (i = 0; i < num_walls; i++) { r1 = get_ran(1,0,3); for (j = 9; j < 35; j++) diff --git a/Win32/Scenarios Editor/BLSCENED.CPP b/Win32/Scenarios Editor/BLSCENED.CPP index 4b70d501..eccc8bfb 100644 --- a/Win32/Scenarios Editor/BLSCENED.CPP +++ b/Win32/Scenarios Editor/BLSCENED.CPP @@ -167,7 +167,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR, int nCmd } mainPtr = CreateWindow (szAppName, - "Classic BoE Scenario Editor Beta 1.1", + "Classic BoE Scenario Editor Beta 2", WS_OVERLAPPEDWINDOW, 0, 0, @@ -218,9 +218,9 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR, int nCmd load_sounds(); right_sbar_rect.top = RIGHT_AREA_UL_Y; - right_sbar_rect.left = RIGHT_AREA_UL_X + RIGHT_AREA_WIDTH - 1 - 16; + right_sbar_rect.left = RIGHT_AREA_UL_X + RIGHT_AREA_WIDTH - 16 ; right_sbar_rect.bottom = RIGHT_AREA_UL_Y + RIGHT_AREA_HEIGHT; - right_sbar_rect.right = RIGHT_AREA_UL_X + RIGHT_AREA_WIDTH - 1; + right_sbar_rect.right = RIGHT_AREA_UL_X + RIGHT_AREA_WIDTH ; right_sbar = CreateWindow("scrollbar",NULL, WS_CHILD | WS_TABSTOP | SBS_VERT, right_sbar_rect.left + ulx,right_sbar_rect.top + uly, right_sbar_rect.right - right_sbar_rect.left, @@ -347,8 +347,10 @@ RECT r; } if(overall_mode == 62){ if(store_ter.picture >= 2000){ +// old_setting = custom_pic; custom_pic = 5; csp(813,14,store_ter.picture - 2000); +// custom_pic = old_setting; } else if (store_ter.picture >= 400 && store_ter.picture < 1000){ csp(813,14,store_ter.picture - 100); @@ -419,7 +421,12 @@ RECT r; sbar_pos = 0; if (sbar_pos > max) sbar_pos = max; - SetScrollPos(right_sbar,SB_CTL,sbar_pos,TRUE); + + lpsi.fMask = SIF_POS; + lpsi.nPos = sbar_pos; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollPos(right_sbar,SB_CTL,sbar_pos,TRUE); + if (sbar_pos != old_setting) draw_rb(); break; @@ -528,9 +535,18 @@ Boolean handle_menu (short item, HMENU menu) case 106: overall_mode = 47; set_string("Select party starting location.",""); break; - case 109: SetScrollPos(right_sbar,SB_CTL,0,TRUE); start_special_editing(0,0); break; + case 109: + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + //SetScrollPos(right_sbar,SB_CTL,0,TRUE); + start_special_editing(0,0); break; case 110: - SetScrollPos(right_sbar,SB_CTL,0,TRUE); start_string_editing(0,0); + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + //SetScrollPos(right_sbar,SB_CTL,0,TRUE); + start_string_editing(0,0); break; case 111: if (change_made == TRUE) { @@ -603,10 +619,17 @@ Boolean handle_menu (short item, HMENU menu) break; case 121: - if (fancy_choice_dialog(868,0) == 1) + if (fancy_choice_dialog(867,0) == 1) start_shopping_data_dump(); break; - + case 122: + if (fancy_choice_dialog(868,0) == 1) + start_monst_data_dump(); + break; + case 123: + if (fancy_choice_dialog(890,0) == 1) + start_spec_data_dump(); + break; // Town Menu case 201: edit_town_details(); break; case 202: edit_town_wand(); break; @@ -633,8 +656,18 @@ Boolean handle_menu (short item, HMENU menu) town.preset_items[i].item_code = -1; draw_terrain(); break; - case 213: SetScrollPos(right_sbar,SB_CTL,0,TRUE); start_special_editing(2,0); break; - case 214: SetScrollPos(right_sbar,SB_CTL,0,TRUE); start_string_editing(2,0); break; + case 213: + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + //SetScrollPos(right_sbar,SB_CTL,0,TRUE); + start_special_editing(2,0); break; + case 214: + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + //SetScrollPos(right_sbar,SB_CTL,0,TRUE); + start_string_editing(2,0); break; case 215: edit_advanced_town(); break; case 216: edit_town_events(); break; case 217: if (fancy_choice_dialog(872,0) == 2) // clear all monsters @@ -643,6 +676,10 @@ Boolean handle_menu (short item, HMENU menu) t_d.creatures[i].number = 0; t_d.creatures[i].start_loc.x = 0; t_d.creatures[i].start_loc.y = 0; + t_d.creatures[i].spec_enc_code = 0; + t_d.creatures[i].time_flag = 0; + t_d.creatures[i].spec1 = -1; + t_d.creatures[i].spec2 = -1; } break; case 218: if (fancy_choice_dialog(873,0) == 2) // clear all special encounters @@ -680,8 +717,18 @@ Boolean handle_menu (short item, HMENU menu) case 304: frill_up_terrain(); break; case 305: unfrill_terrain(); break; case 306: edit_out_strs(); break; - case 311: SetScrollPos(right_sbar,SB_CTL,0,TRUE); start_special_editing(1,0); break; - case 312: SetScrollPos(right_sbar,SB_CTL,0,TRUE); start_string_editing(1,0); break; + case 311: + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + //SetScrollPos(right_sbar,SB_CTL,0,TRUE); + start_special_editing(1,0); break; + case 312: + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + //SetScrollPos(right_sbar,SB_CTL,0,TRUE); + start_string_editing(1,0); break; case 313: if (fancy_choice_dialog(875,0) == 2) // clear all special encounters break; for (i = 0; i < 18; i++) { diff --git a/Win32/Scenarios Editor/BLSCENED.RC b/Win32/Scenarios Editor/BLSCENED.RC index 716575e6..1c3d0f0b 100644 --- a/Win32/Scenarios Editor/BLSCENED.RC +++ b/Win32/Scenarios Editor/BLSCENED.RC @@ -50,9 +50,12 @@ Exile MENU MENUITEM " Set Scenario Event Timers", 116 MENUITEM " Edit Item Placement Shortcuts", 117 MENUITEM " Delete Last Town", 118 + MENUITEM SEPARATOR MENUITEM " Write Data To Text File", 119 MENUITEM " Do Full Text Dump", 120 MENUITEM " Scenario Shopping Text Dump", 121 + MENUITEM " Scenario Monster Dump", 122 + MENUITEM " Scenario Specials Dump", 123 } POPUP "&Town" diff --git a/Win32/Scenarios Editor/BUTTONMG.CPP b/Win32/Scenarios Editor/BUTTONMG.CPP index 5d554298..4c843b4e 100644 --- a/Win32/Scenarios Editor/BUTTONMG.CPP +++ b/Win32/Scenarios Editor/BUTTONMG.CPP @@ -77,8 +77,14 @@ void init_rb() { short i; - SetScrollPos(right_sbar,SB_CTL,0,FALSE); - SetScrollRange(right_sbar,SB_CTL,0,0,TRUE); + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,FALSE); +// SetScrollPos(right_sbar,SB_CTL,0,FALSE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollRange(right_sbar,SB_CTL,0,0,TRUE); for (i = 0; i < NRS; i++) { right_button_status[i] = 0; sprintf((char *) data_store->strings_rs[i], ""); @@ -93,7 +99,10 @@ void reset_rb() right_button_status[i] = 0; } draw_rb(); - SetScrollPos(right_sbar,SB_CTL,0,FALSE); + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,FALSE); +// SetScrollPos(right_sbar,SB_CTL,0,FALSE); } // is slot >= 0, force that slot diff --git a/Win32/Scenarios Editor/DLOGTOOL.CPP b/Win32/Scenarios Editor/DLOGTOOL.CPP index d832771b..b476bb85 100644 --- a/Win32/Scenarios Editor/DLOGTOOL.CPP +++ b/Win32/Scenarios Editor/DLOGTOOL.CPP @@ -15,11 +15,13 @@ #include "dlogtool.h" #include "keydlgs.h" + extern Boolean play_sounds,cursor_shown,dialog_not_toast,block_erase,mouse_button_held; extern HBITMAP title_gworld,dlogpics_gworld,items_gworld,tiny_obj_gworld; extern HBITMAP dlg_buttons_gworld,mixed_gworld,monst_gworld[10],talkfaces_gworld; extern HFONT font,italic_font,underline_font,bold_font,tiny_font,small_bold_font; extern HWND mainPtr; +extern HWND right_sbar; extern HDC main_dc; extern HINSTANCE store_hInstance; long CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); @@ -291,7 +293,7 @@ short cd_create_dialog(short dlog_num,HWND parent) SetWindowText(dlgs[free_slot],"Blades of Exile Scenario Editor"); ShowWindow(dlgs[free_slot],SW_SHOW); - DestroyWindow(dlg); //Necesary? Dunno. + DestroyWindow(dlg); //Necessary? Dunno. if (dlg_parent[free_slot] != NULL) { EnableWindow(dlg_parent[free_slot],FALSE); @@ -575,7 +577,7 @@ short cd_kill_dialog(short dlog_num,short parent_message) SetWindowPos(dlg_parent[which_dlg],HWND_TOP,0,0,100,100, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW); cd_set_edit_focus((short)dlg_parent[which_dlg]); - } + } if (parent_message > 0) SendMessage(dlg_parent[which_dlg],WM_COMMAND,parent_message,0); @@ -1486,7 +1488,9 @@ void frame_dlog_rect(HWND hDlg, RECT rect, short val) } void draw_custom_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,short win_or_gworld){ -short picnum; + + short picnum; + RECT from1 = {0,0,36,28},from2 = {0,0,36,36},from3 = {0,0,72,72},tiny_obj_rect = {0,0,18,18}; RECT from_rect = {0,0,28, 36}; RECT face_from = {0,0,32,32}; @@ -1502,7 +1506,7 @@ short picnum; HDC hdc; HBRUSH old_brush; RECT small_monst_rect = {0,0,14,18}; - + if (win_or_gworld == 1) draw_dest = 0; diff --git a/Win32/Scenarios Editor/GAMEDLOG.RC b/Win32/Scenarios Editor/GAMEDLOG.RC index e48698d5..34cdf5a7 100644 --- a/Win32/Scenarios Editor/GAMEDLOG.RC +++ b/Win32/Scenarios Editor/GAMEDLOG.RC @@ -1775,7 +1775,7 @@ STYLE WS_POPUP | WS_DLGFRAME LTEXT "Lists of all the terrain types, monster types, and item types in your scenario are about to be put into a file called 'Scendata.txt' in the editor folder. You can then print out this file to act as a handy reference while designing your scenario.", 4, 49, 6, 271, 66 } -868 DIALOG 10, 10, 357, 114 +867 DIALOG 10, 10, 357, 114 STYLE WS_POPUP | WS_DLGFRAME { LTEXT "1_63", 1, 255, 89, 66, 20 @@ -1785,6 +1785,16 @@ STYLE WS_POPUP | WS_DLGFRAME } +868 DIALOG 10, 10, 357, 114 +STYLE WS_POPUP | WS_DLGFRAME +{ + LTEXT "1_63", 1, 255, 89, 66, 20 + LTEXT "0_5", 2, 190, 89, 65, 20 + LTEXT "5_716", 3, 6, 6, 36, 36 + LTEXT "This produces a list of all monster related things in your scenario and writes them into a file called 'Monstdata.txt' in the editor folder. Be warned though, that can take a long time...", 4, 49, 6, 271, 66 + +} + 869 DIALOG 10, 10, 340, 80 STYLE WS_POPUP | WS_DLGFRAME { @@ -1854,6 +1864,16 @@ STYLE WS_POPUP | WS_DLGFRAME LTEXT "5_716" 3, 6, 6, 36, 36 LTEXT "This option erases all preset stains in the town. Go ahead?" 4, 49, 6, 258, 32 } + +890 DIALOG 10, 10, 357, 114 +STYLE WS_POPUP | WS_DLGFRAME +{ + LTEXT "1_63", 1, 255, 89, 66, 20 + LTEXT "0_5", 2, 190, 89, 65, 20 + LTEXT "5_716", 3, 6, 6, 36, 36 + LTEXT "This produces a list of all specials related things in your scenario and writes them into a file called 'Specdata.txt' in the editor folder. Be warned though, that can take a long time...", 4, 49, 6, 271, 66 + +} 970 DIALOG 10, 10, 346, 167 STYLE WS_POPUP | WS_DLGFRAME @@ -1940,7 +1960,7 @@ STYLE WS_POPUP | WS_DLGFRAME { LTEXT "1_63", 1, 435, 295, 61, 20 LTEXT "5_716", 2, 6, 6, 36, 36 - LTEXT "Classic Blades of Exile Scenario Editor Beta 1.1 | Copyright 1997, Spiderweb Software, Inc., All rights reserved.||Blades of Exile is distributed for free under GNU General Public License version 2.", 3, 50, 6, 420, 33 + LTEXT "Classic Blades of Exile Scenario Editor Beta 2 | Copyright 1997, Spiderweb Software, Inc., All rights reserved.||Blades of Exile is distributed for free under GNU General Public License version 2.", 3, 50, 6, 420, 33 LTEXT "CREDITS : Initial coding/32-bit porting by Ormus . Aesthetic touches by Ishad Nha.", 4, 50, 227, 424, 33 LTEXT "Comments? Questions? Bugs? Post them at the Blades section of the Irony Central Board: www.ironycentral.com/forum/", 5, 50, 271, 354, 32 LTEXT "Blades of Exile was brought to you by Spiderweb Software - | _Where our aberrations become your reality._ |_Blades of Exile_ and Spiderweb Software are trademarks of Spiderweb Software.", 7, 50, 154, 410, 51 diff --git a/Win32/Scenarios Editor/GLOBAL.H b/Win32/Scenarios Editor/GLOBAL.H index 65614742..8e02465a 100644 --- a/Win32/Scenarios Editor/GLOBAL.H +++ b/Win32/Scenarios Editor/GLOBAL.H @@ -338,3 +338,5 @@ void SysBeep(short a); void Delay(short val,long *dummy); short minmax(short min,short max,short k); short abs(short x); + +extern SCROLLINFO lpsi; diff --git a/Win32/Scenarios Editor/GRAPHICS.CPP b/Win32/Scenarios Editor/GRAPHICS.CPP index 986422e4..53693e5a 100644 --- a/Win32/Scenarios Editor/GRAPHICS.CPP +++ b/Win32/Scenarios Editor/GRAPHICS.CPP @@ -43,6 +43,7 @@ extern RECT right_scrollbar_rect; extern RECT right_area_rect; extern unsigned char borders[4][50]; extern HWND right_sbar; +extern RECT right_sbar_rect; extern Boolean left_buttons_active,right_buttons_active; extern short left_button_status[NLS]; // 0 - clear, 1 - text, 2 - title text, +10 - button @@ -285,6 +286,12 @@ void draw_main_screen() draw_rb(); // redraw scroll bar here + lpsi.fMask = SIF_POS; + GetScrollInfo(right_sbar,SB_CTL,&lpsi);//ugly hack to redraw the bar + thumb + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + EnableScrollBar(right_sbar,SB_CTL,ESB_DISABLE_BOTH);//ugly hack to redraw the arrows + EnableScrollBar(right_sbar,SB_CTL,ESB_ENABLE_BOTH); +// SetScrollPos(right_sbar,SB_CTL,0,TRUE); } // draw terrain palette @@ -662,7 +669,7 @@ void draw_terrain() if (editing_town == TRUE) { // draw info rects for (i = 0; i < 16; i++) - if (t_d.room_rect[i].left > 0) { + if (t_d.room_rect[i].left > -1) { draw_rect.left = 22 + 28 * (t_d.room_rect[i].left - cen_x + 4); draw_rect.right = 22 + 28 * (t_d.room_rect[i].right - cen_x + 4); draw_rect.top = 24 + 36 * (t_d.room_rect[i].top - cen_y + 4); @@ -687,7 +694,7 @@ void draw_terrain() if (editing_town == FALSE) { // draw info rects for (i = 0; i < 8; i++) - if (current_terrain.info_rect[i].left > 0) { + if (current_terrain.info_rect[i].left > -1) { draw_rect.left = 22 + 28 * (current_terrain.info_rect[i].left - cen_x + 4); draw_rect.right = 22 + 28 * (current_terrain.info_rect[i].right - cen_x + 4); draw_rect.top = 24 + 36 * (current_terrain.info_rect[i].top - cen_y + 4); @@ -817,6 +824,7 @@ void draw_items(HDC hdc) if (pic_num >= 150) { source_rect = get_custom_rect(pic_num - 150); draw_rect = calc_rect(where_draw.x,where_draw.y); + OffsetRect(&draw_rect,8,8); rect_draw_some_item(spec_scen_g,source_rect, ter_draw_gworld, draw_rect, 1, 0); } else { diff --git a/Win32/Scenarios Editor/KEYDLGS.CPP b/Win32/Scenarios Editor/KEYDLGS.CPP index 77416244..18cef90b 100644 --- a/Win32/Scenarios Editor/KEYDLGS.CPP +++ b/Win32/Scenarios Editor/KEYDLGS.CPP @@ -118,7 +118,7 @@ char edit_pict_mess[256] = { 0,0,0,0,0,1,2,3,1,2, // 50 3,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0, + 0,7,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,4,0, 0,0,0,0,0,0,0,0,0,0, // 100 0,0,0,0,0,0,0,0,0,0, @@ -606,7 +606,7 @@ void put_spec_enc_in_dlog() switch (edit_spec_stuff_done_mess[store_spec_node.type]) { case 0: csit(822,20,"Unused."); csit(822,21,"Unused."); break; case 1: csit(822,20,"Stuff Done Flag Part A"); csit(822,21,"Stuff Done Flag Part B"); break; - case 2: csit(822,20,"Chance of placing (0 - 100)"); csit(822,21,"Unused"); break; + case 2: csit(822,20,"0 - partial cleaning, 1 - cleans all"); csit(822,21,"Unused"); break; case 3: csit(822,20,"Stuff Done Flag Part A"); csit(822,21,"Unused"); break; case 4: csit(822,20,"X of space to move to"); csit(822,21,"Y of space to move to"); break; case 5: csit(822,20,"Terrain to change to"); csit(822,21,"Chance of changing (0 - 100)"); break; @@ -642,6 +642,7 @@ void put_spec_enc_in_dlog() case 4: csit(822,24,"Chance of changing (0 - 100)"); cd_activate_item(822,46,0); break; case 5: csit(822,24,"Number of letters to match"); cd_activate_item(822,46,0); break; case 6: csit(822,24,"Radius of explosion"); cd_activate_item(822,46,0); break; + case 7: csit(822,24,"See help description."); cd_activate_item(822,46,0); break; } CDSN(822,7,store_spec_node.ex1a); diff --git a/Win32/Scenarios Editor/SCENARIO.CPP b/Win32/Scenarios Editor/SCENARIO.CPP index 9841c88a..84315fb1 100644 --- a/Win32/Scenarios Editor/SCENARIO.CPP +++ b/Win32/Scenarios Editor/SCENARIO.CPP @@ -1013,7 +1013,7 @@ Boolean save_ter_info() void edit_ter_type_event_filter (short item_hit) { char str[256]; - short i; + short i,store; switch (item_hit) { case 9: dialog_not_toast = FALSE; @@ -1040,8 +1040,9 @@ void edit_ter_type_event_filter (short item_hit) break; case 13: case 70: - if (item_hit == 13) // Pick Picture + if (item_hit == 13){ // Pick Picture i = choose_graphic(0,252,store_ter.picture,813); + } else { do_choose_anim = TRUE; i = choose_graphic(300,313,store_ter.picture,813); // Animated @@ -1058,16 +1059,17 @@ void edit_ter_type_event_filter (short item_hit) CDSN(813,5,store_ter.picture); if(store_ter.picture >= 2000){ - custom_pic = 5; csp(813,14,store_ter.picture-2000); } else if (store_ter.picture >= 1000) { custom_pic = 1; csp(813,14,store_ter.picture-1000); } - else if (store_ter.picture >= 400) - csp(813,14,store_ter.picture - 100); - else csp(813,14,store_ter.picture); + else { + if (store_ter.picture >= 400) + csp(813,14,store_ter.picture - 100); + else csp(813,14,store_ter.picture); + } break; default: @@ -1124,10 +1126,11 @@ void put_monst_info_in_dlog() { char str[256]; - if (store_monst.picture_num < 1000) + if (store_monst.picture_num < 1000){ csp(814,34,400 + store_monst.picture_num); + } else{ - custom_pic = store_monst.picture_num / 1000; + custom_pic = (store_monst.picture_num) / 1000; csp(814,34,store_monst.picture_num - custom_pic * 1000); } cdsin(814,33,store_which_monst); @@ -1250,25 +1253,27 @@ void edit_monst_type_event_filter (short item_hit) case 23: // abils if (save_monst_info() == FALSE) break; temp_monst = edit_monst_abil(store_monst,814); - if ((temp_monst.level >= 0) && (temp_monst.level < 255)) - store_monst = temp_monst; + store_monst = temp_monst; put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; - case 21: + case 21://previous monster if (save_monst_info() == FALSE) break; scenario.scen_monsters[store_which_monst] = store_monst; store_which_monst--; if (store_which_monst < 1) store_which_monst = 255; store_monst = scenario.scen_monsters[store_which_monst]; put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; - case 22: + case 22://next monster if (save_monst_info() == FALSE) break; scenario.scen_monsters[store_which_monst] = store_monst; store_which_monst++; if (store_which_monst > 255) store_which_monst = 1; store_monst = scenario.scen_monsters[store_which_monst]; put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; case 24: // picture if (save_monst_info() == FALSE) break; @@ -1276,34 +1281,42 @@ void edit_monst_type_event_filter (short item_hit) if (i >= 0) { store_monst.picture_num = i - 400; } - else break; + else{ + put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; + break; + } store_monst.x_width = m_pic_index_x[i-400]; store_monst.y_width = m_pic_index_y[i-400]; put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; case 25: // m type if (save_monst_info() == FALSE) break; i = choose_text_res(20,150,164,store_monst.m_type + 150,814,"Choose Monster Type:"); if (i >= 0) { store_monst.m_type = i - 150; - put_monst_info_in_dlog(); } + put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; case 26: // att type 1 if (save_monst_info() == FALSE) break; i = choose_text_res(20,130,139,store_monst.a1_type + 130,814,"Choose Attack 1 Type:"); if (i >= 0) { store_monst.a1_type = i - 130; - put_monst_info_in_dlog(); } + put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; case 27: // att type 23 if (save_monst_info() == FALSE) break; i = choose_text_res(20,130,139,store_monst.a23_type + 130,814,"Choose Attack 2 & 3 Type:"); if (i >= 0) { store_monst.a23_type = i - 130; - put_monst_info_in_dlog(); } + put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; case 28: // talk pic if (save_monst_info() == FALSE) break; @@ -1311,8 +1324,13 @@ void edit_monst_type_event_filter (short item_hit) if (i >= 0) { store_monst.default_facial_pic = i - 1000; } - else break; + else{ + put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; + break; + } put_monst_info_in_dlog(); + custom_pic = (store_monst.picture_num) / 1000; break; default: cd_hit_led_range(814,29,32,item_hit); @@ -1421,8 +1439,7 @@ void edit_monst_abil_event_filter (short item_hit) short i; switch (item_hit) { - case 8: store_monst2.level = -1; - dialog_not_toast = FALSE; break; + case 8: dialog_not_toast = FALSE; break; case 7: if (save_monst_abils() == TRUE) dialog_not_toast = FALSE; @@ -1503,7 +1520,9 @@ void put_item_info_in_dlog() custom_pic = 1; csp(818,49,store_item.graphic_num - 150); } - else csp(818,49,1800 + store_item.graphic_num); + else{ + csp(818,49,1800 + store_item.graphic_num); + } CDSN(818,4,store_item.graphic_num); cd_set_led_range(818,18,45,store_item.variety); CDSN(818,5,store_item.item_level); @@ -1608,8 +1627,8 @@ void edit_item_type_event_filter (short item_hit) if (i >= 0) { store_item.graphic_num = i - 1800; } - else break; put_item_info_in_dlog(); + custom_pic = (store_item.graphic_num >= 150) ? 1 : 0; break; case 69: if (store_item.variety == 0) { @@ -1620,9 +1639,12 @@ void edit_item_type_event_filter (short item_hit) give_error("Gold and Food cannot be given special abilities.","",818); break; } + if(save_item_info() == FALSE) break; temp_item = edit_item_abil(store_item,818); if (temp_item.variety != 0) store_item = temp_item; + put_item_info_in_dlog(); + custom_pic = (store_item.graphic_num >= 150) ? 1 : 0; break; default: cd_hit_led_range(818,18,45,item_hit); @@ -1717,7 +1739,7 @@ void edit_item_abil_event_filter (short item_hit) short i; switch (item_hit) { - case 4: store_item2.ability = 0; + case 4: dialog_not_toast = FALSE; break; case 3: if (save_item_abils() == TRUE) diff --git a/Win32/Scenarios Editor/STRINGS.RC b/Win32/Scenarios Editor/STRINGS.RC index 767d005a..392b5038 100644 --- a/Win32/Scenarios Editor/STRINGS.RC +++ b/Win32/Scenarios Editor/STRINGS.RC @@ -828,7 +828,7 @@ STRINGTABLE 9777, "Damage to inflict (0 .. 1000)" 9778, "Unused" 9779, "Unused" - 9780, "0 - fire, 1 - elec., 2 - telep." + 9780, "0 - fire, 1 - telep., 2 - elec." 9781, "Unused" 9782, "Number of creature to place" 9783, "Unused" diff --git a/Win32/Scenarios Editor/TACTIONS.CPP b/Win32/Scenarios Editor/TACTIONS.CPP index 63fbeddb..fee5d6a8 100644 --- a/Win32/Scenarios Editor/TACTIONS.CPP +++ b/Win32/Scenarios Editor/TACTIONS.CPP @@ -185,7 +185,10 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) set_up_main_screen(); break; case 6: - SetScrollPos(right_sbar,SB_CTL,0,TRUE); + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); + //SetScrollPos(right_sbar,SB_CTL,0,TRUE); start_string_editing(0,0); break; case 7: @@ -335,7 +338,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) } //draw_rb_slot(i + right_top,0); mouse_button_held = FALSE; - } + } } if ((overall_mode < 60) //&& (PtInRect (the_point, &world_screen)) && (the_point.x > world_screen.left + 8) && (the_point.x < world_screen.right - 8) @@ -420,21 +423,21 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) else { if (editing_town == TRUE) { for (x = 0; x < 16; x++) - if (t_d.room_rect[x].right == 0) { + if (t_d.room_rect[x].right == -1) { t_d.room_rect[x] = working_rect; sprintf(town_strs[x + 1],""); if (edit_area_rect_str(x,1) == FALSE) - t_d.room_rect[x].right = 0; + t_d.room_rect[x].right = -1; x = 500; } } if (editing_town == FALSE) { for (x = 0; x < 8; x++) - if (current_terrain.info_rect[x].right == 0) { + if (current_terrain.info_rect[x].right == -1) { current_terrain.info_rect[x] = working_rect; sprintf(data_store->out_strs[x + 1],""); if (edit_area_rect_str(x,0) == FALSE) - current_terrain.info_rect[x].right = 0; + current_terrain.info_rect[x].right = -1; x = 500; } @@ -790,6 +793,10 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) t_d.creatures[x].number = 0; t_d.creatures[x].start_loc.x = 0; t_d.creatures[x].start_loc.y = 0; + t_d.creatures[x].spec_enc_code = 0; + t_d.creatures[x].time_flag = 0; + t_d.creatures[x].spec1 = -1; + t_d.creatures[x].spec2 = -1; } set_cursor(0); overall_mode = 0; @@ -3262,7 +3269,6 @@ void set_up_main_screen() ShowScrollBar(right_sbar,SB_CTL,TRUE); shut_down_menus(4); shut_down_menus(3); - //DrawMenuBar(); redraw_screen(); //draw_main_screen(); } @@ -3333,7 +3339,7 @@ void shut_down_menus(short mode) { HMENU menu; short i; - short scen_items[18] = {101,103,104,105,106, 109,110,112,113,114, 115,116,117,118,119, 120,111, 121}; + short scen_items[20] = {101,103,104,105,106, 109,110,112,113,114, 115,116,117,118,119, 120,111,121,122,123}; short town_items[17] = {201,202,203,204,205, 206,208,209,210,213, 214,215,216, 217,218,219,220}; short out_items[10] = {301,302,303,304,305,306,308,311,312,313}; menu = GetMenu(mainPtr); @@ -3341,7 +3347,7 @@ void shut_down_menus(short mode) if (mode == 0) { EnableMenuItem(menu,2,MF_GRAYED | MF_BYCOMMAND); - for (i = 0; i < 18; i++) + for (i = 0; i < 20; i++) EnableMenuItem(menu,scen_items[i],MF_GRAYED | MF_BYCOMMAND); for (i = 0; i < 17; i++) EnableMenuItem(menu,town_items[i],MF_GRAYED | MF_BYCOMMAND); @@ -3361,7 +3367,7 @@ void shut_down_menus(short mode) EnableMenuItem(menu,2,MF_ENABLED | MF_BYCOMMAND); EnableMenuItem(menu,3,MF_ENABLED | MF_BYCOMMAND); EnableMenuItem(menu,5,MF_ENABLED | MF_BYCOMMAND); - for (i = 0; i < 18; i++) + for (i = 0; i < 20; i++) EnableMenuItem(menu,scen_items[i],MF_ENABLED | MF_BYCOMMAND); for (i = 0; i < 17; i++) EnableMenuItem(menu,town_items[i],MF_ENABLED | MF_BYCOMMAND); @@ -3427,10 +3433,16 @@ void start_monster_editing(short just_redo_text) if (just_redo_text == 0) { overall_mode = 60; ShowScrollBar(right_sbar,SB_CTL,TRUE); - SetScrollPos(right_sbar,SB_CTL,0,TRUE); + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollPos(right_sbar,SB_CTL,0,TRUE); reset_rb(); - SetScrollRange(right_sbar,SB_CTL,0,255 - NRSONPAGE,TRUE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax = 255 - NRSONPAGE; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollRange(right_sbar,SB_CTL,0,255 - NRSONPAGE,TRUE); } for (i = 0; i < 256; i++) { sprintf((char *) str,"%d - %s",i,(char *) scen_item_list.monst_names[i]); @@ -3473,10 +3485,16 @@ void start_item_editing(short just_redo_text) draw_full = TRUE; overall_mode = 60; ShowScrollBar(right_sbar,SB_CTL,TRUE); - SetScrollPos(right_sbar,SB_CTL,0,TRUE); + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollPos(right_sbar,SB_CTL,0,TRUE); reset_rb(); - SetScrollRange(right_sbar,SB_CTL,0,400 - NRSONPAGE,TRUE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax = 400 - NRSONPAGE; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollRange(right_sbar,SB_CTL,0,400 - NRSONPAGE,TRUE); } for (i = 0; i < 400; i++) { sprintf((char *) str,"%d - %s",i,(char *) scen_item_list.scen_items[i].full_name); @@ -3500,9 +3518,16 @@ void start_special_item_editing() if (overall_mode == 62) draw_full = TRUE; overall_mode = 60; - SetScrollPos(right_sbar,SB_CTL,0,TRUE); + + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollPos(right_sbar,SB_CTL,0,TRUE); - SetScrollRange(right_sbar,SB_CTL,0,50 - NRSONPAGE,TRUE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax = 50 - NRSONPAGE; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollRange(right_sbar,SB_CTL,0,50 - NRSONPAGE,TRUE); reset_rb(); for (i = 0; i < 50; i++) { sprintf((char *) str,"%d - %s",i,(char *) scen_strs[60 + i * 2]); @@ -3531,10 +3556,17 @@ void start_string_editing(short mode,short just_redo_text) draw_full = TRUE; overall_mode = 60; ShowScrollBar(right_sbar,SB_CTL,TRUE); - SetScrollPos(right_sbar,SB_CTL,0,TRUE); + + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollPos(right_sbar,SB_CTL,0,TRUE); reset_rb(); - SetScrollRange(right_sbar,SB_CTL,0,num_strs[mode] - NRSONPAGE,TRUE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax = num_strs[mode] - NRSONPAGE; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollRange(right_sbar,SB_CTL,0,num_strs[mode] - NRSONPAGE,TRUE); } for (i = 0; i < num_strs[mode]; i++) { @@ -3582,7 +3614,10 @@ void start_special_editing(short mode,short just_redo_text) ShowScrollBar(right_sbar,SB_CTL,TRUE); reset_rb(); - SetScrollRange(right_sbar,SB_CTL,0,num_specs[mode] - NRSONPAGE,TRUE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax = num_specs[mode] - NRSONPAGE; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollRange(right_sbar,SB_CTL,0,num_specs[mode] - NRSONPAGE,TRUE); } @@ -3628,9 +3663,15 @@ void start_dialogue_editing(short restoring) ShowScrollBar(right_sbar,SB_CTL,TRUE); if (restoring == 0) { - SetScrollPos(right_sbar,SB_CTL,0,TRUE); + lpsi.fMask = SIF_POS; + lpsi.nPos = 0; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollPos(right_sbar,SB_CTL,0,TRUE); reset_rb(); - SetScrollRange(right_sbar,SB_CTL,0,70 - NRSONPAGE,TRUE); + lpsi.fMask = SIF_RANGE; + lpsi.nMax = 70 - NRSONPAGE; + SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE); +// SetScrollRange(right_sbar,SB_CTL,0,70 - NRSONPAGE,TRUE); } for (i = 0; i < 10; i++) { sprintf((char *) str,"Personality %d - %s",i + cur_town * 10, diff --git a/Win32/Scenarios Editor/TFILEIO.CPP b/Win32/Scenarios Editor/TFILEIO.CPP index 85cdfefa..b7dd0714 100644 --- a/Win32/Scenarios Editor/TFILEIO.CPP +++ b/Win32/Scenarios Editor/TFILEIO.CPP @@ -58,7 +58,8 @@ char szFileName [128] = "newscen.exs"; char szFileName2 [128] = "tempscen.exs"; char szTitleName [128] = "newscen.exs"; OPENFILENAME ofn; - OFSTRUCT store; +SCROLLINFO lpsi; +OFSTRUCT store; Boolean suppress_load_file_name = FALSE; void print_write_position (); @@ -111,6 +112,13 @@ static char *szFilter[] = {"Blades of Exile Scenarios (*.EXS)","*.exs", ofn.lCustData = 0L; ofn.lpfnHook = NULL; ofn.lpTemplateName = NULL; + + lpsi.cbSize = sizeof(SCROLLINFO); + lpsi.fMask = SIF_RANGE; + lpsi.nMin = 0; + lpsi.nMax = 0; + lpsi.nPos = 0; + } // Here we go. this is going to hurt. @@ -1211,7 +1219,6 @@ void start_data_dump() char get_text[280]; HANDLE data_dump_file_id; DWORD dwByteRead; - long len; location out_sec,last_out = cur_out; data_dump_file_id = CreateFile("Scendata.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL, @@ -1223,82 +1230,476 @@ void start_data_dump() return; } - sprintf((char *)get_text,"Scenario data for %s:\n",scen_strs[0]); + sprintf(get_text,"Scenario data for %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - sprintf((char *)get_text,"\nTerrain types for %s:\n",scen_strs[0]); + sprintf(get_text,"\nTerrain types for %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (i = 0; i < 256; i++) { - sprintf((char *)get_text," Terrain type %d: %s\n",i,scen_item_list.ter_names[i]); + sprintf(get_text," Terrain type %d: %s\n",i,scen_item_list.ter_names[i]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); } - sprintf((char *)get_text,"\nMonster types for %s:\n",scen_strs[0]); + sprintf(get_text,"\nMonster types for %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (i = 0; i < 256; i++) { - sprintf((char *)get_text," Monster type %d: %s\n",i,scen_item_list.monst_names[i]); + sprintf(get_text," Monster type %d: %s\n",i,scen_item_list.monst_names[i]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); } - sprintf((char *)get_text,"\nItem types for %s:\n",scen_strs[0]); + sprintf(get_text,"\nItem types for %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (i = 0; i < 400; i++) { - sprintf((char *)get_text," Item type %d: %s\n",i,scen_item_list.scen_items[i].full_name); + sprintf(get_text," Item type %d: %s\n",i,scen_item_list.scen_items[i].full_name); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - } - sprintf((char *)get_text,"\n\nNames of the Outdoor Sections in %s:\n",scen_strs[0]); + if(scen_item_list.scen_items[i].special_class > 0){ + sprintf(get_text," Item special class: %d\n",scen_item_list.scen_items[i].special_class); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + } + sprintf(get_text,"\n\nNames of the Outdoor Sections in %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (out_sec.y = 0; out_sec.y < scenario.out_height ; out_sec.y++) for (out_sec.x = 0; out_sec.x < scenario.out_width ; out_sec.x++) { load_outdoors(out_sec,0); - sprintf((char *)get_text," Section X = %d, Y = %d: %s \n",(short) out_sec.x,(short) out_sec.y,data_store->out_strs[0]); + sprintf(get_text," Section X = %d, Y = %d: %s \n",(short) out_sec.x,(short) out_sec.y,data_store->out_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); } - sprintf((char *)get_text,"\nNames of the towns in %s:\n",scen_strs[0]); + sprintf(get_text,"\nNames of the towns in %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (j = 0; j < scenario.num_towns; j++) { load_town(j); - sprintf((char *)get_text," Town %d: %s\n",j,town_strs[0]); + sprintf(get_text," Town %d: %s\n",j,town_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); } - sprintf((char *)get_text,"\n Outdoor Start Zone: X = %d, Y = %d\n",scenario.out_sec_start.x,scenario.out_sec_start.y); + sprintf(get_text,"\n Outdoor Start Zone: X = %d, Y = %d\n",scenario.out_sec_start.x,scenario.out_sec_start.y); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - sprintf((char *)get_text," Outdoor Start Location: X = %d, Y = %d\n",scenario.out_start.x,scenario.out_start.y); + sprintf(get_text," Outdoor Start Location: X = %d, Y = %d\n",scenario.out_start.x,scenario.out_start.y); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - sprintf((char *)get_text," Starting Town: = %d\n",scenario.which_town_start); + sprintf(get_text," Starting Town: = %d\n",scenario.which_town_start); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - sprintf((char *)get_text," Starting Town Location: X = %d, Y = %d\n",scenario.where_start.x,scenario.where_start.y); + sprintf(get_text," Starting Town Location: X = %d, Y = %d\n",scenario.where_start.x,scenario.where_start.y); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - sprintf((char *)get_text," Last Outdoor Zone Edited: X = %d, Y = %d\n",scenario.last_out_edited.x,scenario.last_out_edited.y); + sprintf(get_text," Last Outdoor Zone Edited: X = %d, Y = %d\n",scenario.last_out_edited.x,scenario.last_out_edited.y); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - sprintf((char *)get_text," Last Town Edited: = %d\n\n\n",scenario.last_town_edited); + sprintf(get_text," Last Town Edited: = %d\n\n\n",scenario.last_town_edited); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); - sprintf((char *)get_text,"Names of the Special Items in %s:\n",scen_strs[0]); + sprintf(get_text,"Names of the Special Items in %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (short i = 0; i < 50; i++) { - sprintf((char *)get_text,"Special Item \"%d \"%s \"%s\n",i,scen_strs[60 + i * 2],scen_strs[61 + i * 2]); + sprintf(get_text,"Special Item \"%d \"%s \"%s\n",i,scen_strs[60 + i * 2],scen_strs[61 + i * 2]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); } - sprintf((char *)get_text,"\n\nLocations of Town Entrances in %s:\n",scen_strs[0]); + sprintf(get_text,"\n\nLocations of Town Entrances in %s:\n",scen_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (out_sec.y = 0; out_sec.y < scenario.out_height ; out_sec.y++) for (out_sec.x = 0; out_sec.x < scenario.out_width ; out_sec.x++) { load_outdoors(out_sec,0); - sprintf((char *)get_text,"\n\n Section X = %d, Y = %d: %s\n",(short) out_sec.x,(short) out_sec.y,data_store->out_strs[0]); + sprintf(get_text,"\n\n Section X = %d, Y = %d: %s\n",(short) out_sec.x,(short) out_sec.y,data_store->out_strs[0]); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); for (short i = 0; i < 8; i++) { if ((current_terrain.exit_locs[i].x != 100) && (current_terrain.exit_locs[i].y != 0)) { - sprintf((char *)get_text,"Town entrance %d, town %d, x = %d, y = %d\n",i,current_terrain.exit_dests[i],current_terrain.exit_locs[i].x,current_terrain.exit_locs[i].y); + sprintf(get_text,"Town entrance %d, town %d, x = %d, y = %d\n",i,current_terrain.exit_dests[i],current_terrain.exit_locs[i].x,current_terrain.exit_locs[i].y); WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); } } } - load_outdoors(last_out,0); - load_town(last_town); + + sprintf(get_text,"\n -------- End of file."); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + load_outdoors(last_out,0); + load_town(last_town); CloseHandle(data_dump_file_id); } +void start_monst_data_dump(){ + + short i,j,last_town = cur_town; + char get_text[280]; + HANDLE data_dump_file_id; + DWORD dwByteRead; + location out_sec,last_out = cur_out; + + data_dump_file_id = CreateFile("Monstdata.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (data_dump_file_id == INVALID_HANDLE_VALUE) + { + oops_error(28); + beep(); + return; + } + + sprintf(get_text,"Monsters data dump for %s :\n\n",scen_strs[0]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + sprintf(get_text,"Outdoor Monsters :\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for (out_sec.x = 0; out_sec.x < scenario.out_width ; (out_sec.x)++) + for (out_sec.y = 0; out_sec.y < scenario.out_height ; (out_sec.y)++) { + load_outdoors(out_sec,0); + sprintf(get_text,"\n Section X = %d, Y = %d: %s \n",(short) out_sec.x,(short) out_sec.y,data_store->out_strs[0]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Outdoor Special Encounters :\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + for(i=0;i<4;i++){ + sprintf(get_text,"\n Encounter %d :\n",i); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Hostiles :\n\n 15-30 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].monst[0]],current_terrain.special_enc[i].monst[0]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 7-10 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].monst[1]],current_terrain.special_enc[i].monst[1]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 4-6 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].monst[2]],current_terrain.special_enc[i].monst[2]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 3-5 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].monst[3]],current_terrain.special_enc[i].monst[3]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 2-3 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].monst[4]],current_terrain.special_enc[i].monst[4]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1-2 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].monst[5]],current_terrain.special_enc[i].monst[5]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].monst[6]],current_terrain.special_enc[i].monst[6]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Friendly :\n\n 7-10 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].friendly[0]],current_terrain.special_enc[i].friendly[0]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 2-4 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].friendly[1]],current_terrain.special_enc[i].friendly[1]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1 %s (number %d)\n",scen_item_list.monst_names[current_terrain.special_enc[i].friendly[2]],current_terrain.special_enc[i].friendly[2]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + } + for(i=0;i<4;i++){ + sprintf(get_text,"\n Wandering %d :\n",i); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Hostiles :\n\n 15-30 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].monst[0]],current_terrain.wandering[i].monst[0]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 7-10 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].monst[1]],current_terrain.wandering[i].monst[1]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 4-6 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].monst[2]],current_terrain.wandering[i].monst[2]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 3-5 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].monst[3]],current_terrain.wandering[i].monst[3]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 2-3 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].monst[4]],current_terrain.wandering[i].monst[4]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1-2 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].monst[5]],current_terrain.wandering[i].monst[5]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].monst[6]],current_terrain.wandering[i].monst[6]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Friendly :\n\n 7-10 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].friendly[0]],current_terrain.wandering[i].friendly[0]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 2-4 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].friendly[1]],current_terrain.wandering[i].friendly[1]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1 %s (number %d)\n",scen_item_list.monst_names[current_terrain.wandering[i].friendly[2]],current_terrain.wandering[i].friendly[2]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + } + sprintf(get_text,"\n---------------------------------------------------\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + + sprintf(get_text,"\n*****************************************************\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\nTown Monsters :\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for (j = 0; j < scenario.num_towns; j++) { + load_town(j); + sprintf((char *)get_text,"\n Town %d : %s\n",j,town_strs[0]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for(i=0;i<4;i++){ + sprintf(get_text,"\n Wandering %d :\n",i); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1 %s (number %d)\n",scen_item_list.monst_names[town.wandering[i].monst[0]],town.wandering[i].monst[0]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1 %s (number %d)\n",scen_item_list.monst_names[town.wandering[i].monst[1]],town.wandering[i].monst[1]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1 %s (number %d)\n",scen_item_list.monst_names[town.wandering[i].monst[2]],town.wandering[i].monst[2]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n 1-2 %s (number %d)\n",scen_item_list.monst_names[town.wandering[i].monst[3]],town.wandering[i].monst[3]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + } + + for(i=0;i<60;i++){ + sprintf(get_text,"\n Monster %d :\n\n",i); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Number : %d, Type : %s\n", t_d.creatures[i].number,scen_item_list.monst_names[t_d.creatures[i].number]); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + switch(t_d.creatures[i].start_attitude){ + case 0: + sprintf(get_text," Start Attitude : Friendly, Docile\n"); + break; + case 1: + sprintf(get_text," Start Attitude : Hostile Type A\n"); + break; + case 2: + sprintf(get_text," Start Attitude : Friendly, Will Fight\n"); + break; + case 3: + sprintf(get_text," Start Attitude : Hostile Type B\n"); + break; + } + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + if(t_d.creatures[i].mobile == TRUE) + sprintf(get_text," Monster can move : Yes\n"); + else + sprintf(get_text," Monster can move : No\n"); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Personality : %d\n",t_d.creatures[i].personality); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Facial Graphic : %d\n",t_d.creatures[i].facial_pic); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + switch(t_d.creatures[i].time_flag){ + case 0: + sprintf(get_text," Timing : Always Here\n"); + break; + case 1: + sprintf(get_text," Timing : Appear on day %d\n",t_d.creatures[i].monster_time); + break; + case 2: + sprintf(get_text," Timing : Disappear on day %d\n",t_d.creatures[i].monster_time); + break; + //case 3 doesn't exist + case 4: + sprintf(get_text," Timing : Sometimes here A\n"); + break; + case 5: + sprintf(get_text," Timing : Sometimes here B\n"); + break; + case 6: + sprintf(get_text," Timing : Sometimes here C\n"); + break; + case 7: + sprintf(get_text," Timing : Appear when event %d\n",t_d.creatures[i].time_code); + break; + case 8: + sprintf(get_text," Timing : Disappear when event %d\n",t_d.creatures[i].time_code); + break; + } + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Event Code : %d\n", t_d.creatures[i].time_code); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Part of Special Encounter : %d\n",t_d.creatures[i].spec_enc_code); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Special to call on death : %d\n", t_d.creatures[i].special_on_kill); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Life Flag 1 : %d\n",t_d.creatures[i].spec1); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Life Flag 2 : %d\n",t_d.creatures[i].spec2); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Start Location : x=%d, y=%d\n",t_d.creatures[i].start_loc.x,t_d.creatures[i].start_loc.y); + WriteFile(data_dump_file_id, get_text, strlen(get_text),&dwByteRead,NULL); + } + sprintf(get_text,"\n---------------------------------------------------\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + + sprintf(get_text,"\n -------- End of file."); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + load_town(last_town); + load_outdoors(last_out,0); + CloseHandle(data_dump_file_id); +} + +void start_spec_data_dump(){ + + short i,j,count=0,last_town = cur_town; + char get_text[280]; + HANDLE data_dump_file_id; + DWORD dwByteRead; + location out_sec,last_out = cur_out; + + data_dump_file_id = CreateFile("Specdata.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (data_dump_file_id == INVALID_HANDLE_VALUE) + { + oops_error(28); + beep(); + return; + } + + sprintf(get_text,"Specials data dump for %s :\n\n",scen_strs[0]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + sprintf(get_text,"Scenario Specials :\n\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for(i=0;i < 256 ; i++){ + if(scenario.scen_specials[i].type != 0){ + sprintf(get_text," Node Number : %d\n\n",i); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Node Type : "); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + get_str(get_text,22,scenario.scen_specials[i].type + 1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Stuff Done Flag Part A : %d,",scenario.scen_specials[i].sd1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Part B : %d\n",scenario.scen_specials[i].sd2); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Message Part 1 : %d\n",scenario.scen_specials[i].m1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Message Part 2 : %d\n",scenario.scen_specials[i].m2); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Picture : %d\n",scenario.scen_specials[i].pic); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 1a : %d\n",scenario.scen_specials[i].ex1a); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 1b : %d\n",scenario.scen_specials[i].ex1b); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 2a : %d\n",scenario.scen_specials[i].ex2a); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 2b : %d\n",scenario.scen_specials[i].ex2b); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Special to Jump to : %d\n\n",scenario.scen_specials[i].jumpto); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + } + + sprintf(get_text,"\n---------------------------------------------------\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"Scenario Timers :\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for(i= 0;i < 20 ;i++){ + if(scenario.scenario_timer_times[i] > 0){ + count++; + sprintf(get_text," \nTimer Number : %d\n\n",i); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Moves between calls : %d\n",scenario.scenario_timer_times[i]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Scenario Special to call : %d\n",scenario.scenario_timer_specs[i]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + } + + if(count == 0){ + sprintf(get_text,"\nNo Scenario Timers.\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + + sprintf(get_text,"\n*****************************************************\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"Outdoor Specials :\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for (out_sec.x = 0; out_sec.x < scenario.out_width ; (out_sec.x)++) + for (out_sec.y = 0; out_sec.y < scenario.out_height ; (out_sec.y)++) { + load_outdoors(out_sec,0); + sprintf(get_text,"\n Section X = %d, Y = %d: %s \n",(short) out_sec.x,(short) out_sec.y,data_store->out_strs[0]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for(i=0;i < 60 ; i++){ + if(current_terrain.specials[i].type != 0){ + sprintf(get_text," \n Node Number : %d\n\n",i); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Node Type : "); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + get_str(get_text,22,current_terrain.specials[i].type + 1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Stuff Done Flag Part A : %d,",current_terrain.specials[i].sd1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Part B : %d\n",current_terrain.specials[i].sd2); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Message Part 1 : %d\n",current_terrain.specials[i].m1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Message Part 2 : %d\n",current_terrain.specials[i].m2); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Picture : %d\n",current_terrain.specials[i].pic); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 1a : %d\n",current_terrain.specials[i].ex1a); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 1b : %d\n",current_terrain.specials[i].ex1b); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 2a : %d\n",current_terrain.specials[i].ex2a); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 2b : %d\n",current_terrain.specials[i].ex2b); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Special to Jump to : %d\n",current_terrain.specials[i].jumpto); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + } + + sprintf(get_text,"\n---------------------------------------------------\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + + sprintf(get_text,"\n*****************************************************\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\nTown Specials :\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for (j = 0; j < scenario.num_towns; j++) { + load_town(j); + sprintf((char *)get_text,"\n Town %d : %s\n",j,town_strs[0]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + for(i=0;i < 100 ; i++){ + if(town.specials[i].type != 0){ + sprintf(get_text," \n Node Number : %d\n\n",i); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Node Type : "); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + get_str(get_text,22,town.specials[i].type + 1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"\n Stuff Done Flag Part A : %d,",town.specials[i].sd1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Part B : %d\n",town.specials[i].sd2); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Message Part 1 : %d\n",town.specials[i].m1); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Message Part 2 : %d\n",town.specials[i].m2); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Picture : %d\n",town.specials[i].pic); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 1a : %d\n",town.specials[i].ex1a); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 1b : %d\n",town.specials[i].ex1b); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 2a : %d\n",town.specials[i].ex2a); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Extra 2b : %d\n",town.specials[i].ex2b); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Special to Jump to : %d\n",town.specials[i].jumpto); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + } + + sprintf(get_text,"\n---------------------------------------------------\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text,"Town Timers :\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + count = 0; + + for(i= 0;i < 8 ;i++){ + if(town.timer_spec_times[i] > 0){ + count++; + sprintf(get_text," \nTimer Number : %d\n\n",i); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Moves between calls : %d\n",town.timer_spec_times[i]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + sprintf(get_text," Town Special to call : %d\n",town.timer_specs[i]); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + } + + if(count == 0){ + sprintf(get_text,"\nNo Town Timers.\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + + sprintf(get_text,"\n---------------------------------------------------\n"); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + } + + sprintf(get_text,"\n -------- End of file."); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + load_town(last_town); + load_outdoors(last_out,0); + CloseHandle(data_dump_file_id); +} + void start_shopping_data_dump() { short i,j,last_town = cur_town,count; @@ -1607,8 +2008,12 @@ void scen_text_dump() WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); } // out_sec.y = scenario.last_out_edited.y; - load_outdoors(last_out,0); - load_town(last_town); + + sprintf(get_text,"\n -------- End of file."); + WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL); + + load_outdoors(last_out,0); + load_town(last_town); CloseHandle(data_dump_file_id); diff --git a/Win32/Scenarios Editor/TFILEIO.H b/Win32/Scenarios Editor/TFILEIO.H index ec264395..fb05de71 100644 --- a/Win32/Scenarios Editor/TFILEIO.H +++ b/Win32/Scenarios Editor/TFILEIO.H @@ -13,6 +13,8 @@ void import_town(short which_town); void oops_error(short error); void start_data_dump(); void start_shopping_data_dump(); +void start_monst_data_dump(); +void start_spec_data_dump(); void scen_text_dump(); void port_talk_nodes(); void port_town(); diff --git a/Win32/Scenarios Editor/townout.cpp b/Win32/Scenarios Editor/townout.cpp index 09570604..7d214414 100644 --- a/Win32/Scenarios Editor/townout.cpp +++ b/Win32/Scenarios Editor/townout.cpp @@ -57,7 +57,7 @@ void init_town(short size) { short i,j,s; location d_loc = {100,0}; - RECT d_rect = {0,0,0,0}; + RECT d_rect = {-1,-1,-1,-1}; wandering_type d_wan = {0,0,0,0}; creature_start_type dummy_creature = {0,0,{0,0},0,0,0,0,0,0,0,0,0,0,0,0}; preset_item_type null_item = {{0,0},-1,0,0,0,0,0}; @@ -167,7 +167,7 @@ void init_out() short i,j; location d_loc = {100,0}; out_wandering_type d_monst = {{0,0,0,0,0,0,0},{0,0,0},-1,-1,-1,0,-1,-1}; - RECT d_rect = {0,0,0,0}; + RECT d_rect = {-1,-1,-1,-1}; location locs[4] = {{8,8},{32,8},{8,32},{32,32}}; Str255 temp_str; @@ -581,7 +581,7 @@ Boolean save_out_strs() CDGT(850,2 + i,(char *) str); sprintf((char *)data_store->out_strs[i + 1],"%-29.29s",str); if (str_do_delete[i] > 0) - current_terrain.info_rect[i].right = 0; + current_terrain.info_rect[i].right = -1; } return TRUE; } @@ -592,7 +592,7 @@ void put_out_strs_in_dlog() short i; for (i = 0; i < 8; i++) { - if ((current_terrain.info_rect[i].right == 0) || (str_do_delete[i] > 0)) { + if ((current_terrain.info_rect[i].right == -1) || (str_do_delete[i] > 0)) { sprintf((char *) str,"Not yet placed."); cd_activate_item(850,25 + i,0); } @@ -657,7 +657,7 @@ Boolean save_town_strs() CDGT(839,2 + i,(char *) str); sprintf((char *)town_strs[i + 1],"%-29.29s",str); if (str_do_delete[i] > 0) - t_d.room_rect[i].right = 0; + t_d.room_rect[i].right = -1; } return TRUE; } @@ -668,7 +668,7 @@ void put_town_strs_in_dlog() short i; for (i = 0; i < 16; i++) { - if ((t_d.room_rect[i].right == 0) || (str_do_delete[i] > 0)) { + if ((t_d.room_rect[i].right == -1) || (str_do_delete[i] > 0)) { sprintf((char *) str,"Not yet placed."); cd_activate_item(839,41 + i,0); }