diff --git a/Win32/Blades of Exile/GAMEDLOG.RC b/Win32/Blades of Exile/GAMEDLOG.RC index ca8b0142..6d6d5c0e 100644 --- a/Win32/Blades of Exile/GAMEDLOG.RC +++ b/Win32/Blades of Exile/GAMEDLOG.RC @@ -1168,7 +1168,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 build_26.11.2010 | 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 build 09.01.2011 | 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 @@ -1626,6 +1626,7 @@ STYLE WS_POPUP | WS_DLGFRAME LTEXT "2_0", 60, 53, 480,17,18 LTEXT "*Ask About text box in talking mode",61,72,476,340,16 } + 1100 DIALOG 10, 10, 450, 451 STYLE WS_POPUP | WS_DLGFRAME { @@ -1648,4 +1649,6 @@ STYLE WS_POPUP | WS_DLGFRAME LTEXT "2_0", 17, 49, 166, 17, 18 LTEXT "Special Timers are checked when resting outdoor/in inn", 18, 70 ,182 ,182 ,17 LTEXT "2_0", 19, 49, 186, 17, 18 + LTEXT "Specials are triggered when in a boat", 20, 70 ,202 ,182 ,17 + LTEXT "2_0", 21, 49, 206, 17, 18 } diff --git a/Win32/Blades of Exile/GAMESTR.RC b/Win32/Blades of Exile/GAMESTR.RC index 801717ba..e88ca73a 100644 --- a/Win32/Blades of Exile/GAMESTR.RC +++ b/Win32/Blades of Exile/GAMESTR.RC @@ -811,8 +811,8 @@ STRINGTABLE 3063, "Your health is a measure of how much punishment you can take before dying - the more the better. Whenever you get hit, you lose some health. Taking damage when your health is down to 0 will kill you." 3064, "Your spell points are what you expend to cast spells. Each spell drains away some of your spell points. Time and rest restore them. When creating a character, you get 3 bonus spell points for every level of Mage and Priest Spells skill you buy." 3065, "Some doors can't be opened no matter what you try. For example, portcullises can almost never be opened by picking locks or bashing." - 3110, "This is a temporary menu with some legacy compatibility options. Its main purpose is to test several changes introduces with code revisions.|Compatibilities options can be set anytime, anywhere and reverted back the same." - 3111, "Should you find a legacy compatibility breaking, please report it to the Irony Central board." + /*3070, "This is a temporary menu with some legacy compatibility options. Its main purpose is to test several changes introduces with code revisions.|Compatibilities options can be set anytime, anywhere and reverted back the same." + 3071, "Should you find a legacy compatibility breaking, please report it to the Spiderweb Software board."*/ 3301, "Can cast everywhere." 3302, "Combat only." 3303, "Town only." @@ -1102,7 +1102,7 @@ STRINGTABLE 7520, "Strong Healing Potion | Min. Skill - 12 |Need graymold and comfrey root. Provides excellent healing." 7521, "Killer Poison | Min. Skill - 12 |Need mandrake root. The strongest poison." 7522, "Resurrection Balm | Min. Skill - 9 |Need ember flowers. Necessary to cast Raise Dead or Resurrection." - 7523, "Medium Power Potion | Min. Skill - 14 |Need mandrake root and asptongue mold. Restores a fair amount of spell points." + 7523, "Medium Energy Potion | Min. Skill - 14 |Need mandrake root and asptongue mold. Restores a fair amount of spell points." 7524, "Knowledge Brew | Min. Skill - 19 |This most powerful of potions requires Mandrake and Ember Flowers for its creation." 7525, "Strength Potion | Min. Skill - 10 |This brew is a great aid in combat. Making it requires ember flowers and glowing nettle." 7526, "Bliss | Min. Skill - 16 |Combining the best elements of healing and strength potions, bliss potions contain asptongue mold and graymold." @@ -1176,7 +1176,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" @@ -1185,15 +1185,15 @@ STRINGTABLE 11506, "Strong Curing" 11507, "Medium Speed" 11508, "Graymold Salve" - 11509, "Weak Power" + 11509, "Weak Energy" 11510, "Potion of Clarity" 11511, "Strong Poison" 11512, "Strong Healing" 11513, "Killer Poison" 11514, "Resurrection Balm" - 11515, "Medium Power" + 11515, "Medium Energy" 11516, "Knowledge Brew" 11517, "Strong Strength" 11518, "Bliss" - 11519, "Strong Power" + 11519, "Strong Energy" } diff --git a/Win32/Blades of Exile/boe.actions.cpp b/Win32/Blades of Exile/boe.actions.cpp index 149ad6eb..06cf284e 100644 --- a/Win32/Blades of Exile/boe.actions.cpp +++ b/Win32/Blades of Exile/boe.actions.cpp @@ -176,7 +176,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) short find_direction_from,ter_looked_at,button_hit = 12; short store_sp[6]; - char str[60]; + char str[60], id_name[256]; POINT point_in_area; Boolean right_button = false; Boolean ctrl_key = false; @@ -1039,6 +1039,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) if ((overall_mode != MODE_TOWN_TARGET) && (overall_mode != MODE_SPELL_TARGET)) did_something = true; take_ap(3); + need_redraw = true; break; case 2: // give adven[stat_window].giveThing(item_hit); @@ -1071,9 +1072,13 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam ) ASB("Identify: You don't have the gold."); else { play_sound(68); - ASB("Your item is identified."); + sprintf(id_name, "Your item is identified. (%s)",adven[stat_window].items[item_hit].full_name); + ASB(id_name); + /*ASB("Your item is identified."); + ASB(adven[stat_window].items[item_hit].full_name);*/ adven[stat_window].items[item_hit].item_properties = adven[stat_window].items[item_hit].item_properties | 1; + adven[stat_window].combineThings(); } break; case 3: case 4: case 5: // various selling @@ -2416,40 +2421,51 @@ void switch_pc(short which) void handle_death() { - short choice; + short choice, i; + bool done = false; - in_startup_mode = true; - - while (in_startup_mode == true) + while (done == false) { - // Use death (or leave Exile) dialog - in_startup_mode = false; - + // Use death (or leave Exile) dialog choice = FCD(1069,0); //// FCD hates it when it gets called in startup mode // and startup graphics aren't loaded. - in_startup_mode = true; + done = true; - if (choice == 1) { - in_startup_mode = false; + if (choice == 1) {//restore load_file(); if (party_toast() == false) { if (in_startup_mode == false) post_load(); else return; } - else in_startup_mode = true; + else + done = false; } - if (choice == 2) - start_new_game(); + if (choice == 2){//restart - if (choice == 3) { - in_startup_mode = false; - All_Done = true; + i = FCD(1091,0);//"are you sure ?" dialog + + if(i == 1)//cancel button hit + done = false; + else{ + for (i = 0; i < 6; i++) + adven[i].main_status = MAIN_STATUS_ABSENT; + party_in_memory = false; + reload_startup(); + in_startup_mode = true; + draw_startup(0); + start_new_game(); + draw_startup(0); + } + } + + if (choice == 3) {//quit + done = true; + All_Done = true; } - } } @@ -2537,7 +2553,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 (in_scen_debug && ghost_mode) forced = true; - if (spec_num == 50) forced = true; + /*if (spec_num == 50) forced = true;*/ //if it's the number 50 special node, then force movement... // If not blocked and not put in town by a special, process move if ((keep_going == true) && (overall_mode == MODE_OUTDOORS)) { @@ -2595,7 +2611,7 @@ Boolean outd_move_party(location destination,Boolean forced) return false; else if ((outd_is_blocked(real_dest) == false) && (scenario.ter_types[ter].boat_over == true) - && (scenario.ter_types[ter].special != TER_SPEC_TOWN_ENTRANCE) && ter != 75 && ter!=76) {//75-76=> lava is hardcoded... to change + && (scenario.ter_types[ter].special != TER_SPEC_TOWN_ENTRANCE) && (ter != 75) && (ter != 76)) {//75-76=> lava is hardcoded... to change if ((fancy_choice_dialog(1086,0)) == 1) forced = true; else { @@ -2755,9 +2771,12 @@ Boolean town_move_party(location destination,short forced) 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; - if (spec_num == 50) 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; + /*if (spec_num == 50) forced = true;*/ //if it's the number 50 special node, then force movement... + ter = t_d.terrain[destination.x][destination.y]; if (keep_going == true) { @@ -2823,7 +2842,7 @@ Boolean town_move_party(location destination,short forced) return true; } - else if ((is_blocked(destination) == false) || (forced == 1)) { + else if ((is_blocked(destination) == false) || (forced == true)) { if (party.in_horse >= 0) { if ((scenario.ter_types[ter].special >= TER_SPEC_DOES_FIRE_DAMAGE) && (scenario.ter_types[ter].special <= TER_SPEC_DOES_MAGIC_DAMAGE)) { ASB("Your horses quite sensibly refuse."); diff --git a/Win32/Blades of Exile/boe.combat.cpp b/Win32/Blades of Exile/boe.combat.cpp index 45d27e15..d1d79740 100644 --- a/Win32/Blades of Exile/boe.combat.cpp +++ b/Win32/Blades of Exile/boe.combat.cpp @@ -1289,7 +1289,8 @@ void fire_missile(location target) if (adven[missile_firer].items[ammo_inv_slot].variety != ITEM_TYPE_MISSILE_NO_AMMO) {//in case someone has been killed and current_pc is not the firer anymore if (adven[missile_firer].items[ammo_inv_slot].ability != ITEM_MISSILE_RETURNING) adven[missile_firer].items[ammo_inv_slot].charges--; - else adven[missile_firer].items[ammo_inv_slot].charges = 1; + else + adven[missile_firer].items[ammo_inv_slot].charges = 1; if ((adven[missile_firer].hasAbilEquip(ITEM_DRAIN_MISSILES) < 24) && (adven[missile_firer].items[ammo_inv_slot].ability != ITEM_MISSILE_RETURNING)) adven[missile_firer].items[ammo_inv_slot].charges--; if (adven[missile_firer].items[ammo_inv_slot].charges <= 0) @@ -1317,6 +1318,11 @@ Boolean combat_next_step() while (pick_next_pc() == true) { combat_run_monst(); set_pc_moves(); + if((combat_active_pc < 6) && (pc_moves[combat_active_pc] == 0)){ + combat_active_pc = 6; + ASB(">The active character is unable to act!"); + ASB(">The whole party is now active."); + } to_return = true; // Safety valve if (party_toast() == true) @@ -1336,9 +1342,9 @@ Boolean combat_next_step() adjust_spell_menus(); if ((combat_active_pc == 6) && (current_pc != store_pc)) { - sprintf((char *)create_line, "Active: %s (#%d, %d ap.) ", + sprintf(create_line, "Active: %s (#%d, %d ap.) ", adven[current_pc].name,current_pc + 1,pc_moves[current_pc]); - add_string_to_buf((char *)create_line); + add_string_to_buf(create_line); print_buf(); } if ((current_pc != store_pc) || (to_return == true)) { @@ -2968,7 +2974,7 @@ Boolean monst_cast_priest(creature_data_type *caster,short targ) //emergency spells level 5 (summon host, flamestrike, major heal) {SPELL_MONST_PRIEST_NO_SPELL,SPELL_MONST_PRIEST_SUMMON_HOST,SPELL_MONST_PRIEST_FLAMESTRIKE,SPELL_MONST_PRIEST_MAJOR_HEAL}, //emergency spells level 6 (summon host, flamestrike, full heal) - {SPELL_MONST_PRIEST_NO_SPELL,SPELL_MONST_PRIEST_SUMMON_HOST,SPELL_MONST_PRIEST_FLAMESTRIKE,SPELL_MONST_PRIEST_HEAL_ALL}, + {SPELL_MONST_PRIEST_NO_SPELL,SPELL_MONST_PRIEST_SUMMON_HOST,SPELL_MONST_PRIEST_FLAMESTRIKE,SPELL_MONST_PRIEST_REVIVE_SELF}, //emergency spells level 7 (avatar, divine thud, revive all) {SPELL_MONST_PRIEST_AVATAR,SPELL_MONST_PRIEST_AVATAR,SPELL_MONST_PRIEST_DIVINE_THUD,SPELL_MONST_PRIEST_REVIVE_ALL}}; @@ -3023,7 +3029,7 @@ Boolean monst_cast_priest(creature_data_type *caster,short targ) // snuff heals if unwounded if ((caster->m_d.health == caster->m_d.m_health) && - ((spell == SPELL_MONST_PRIEST_MAJOR_HEAL) || (spell == SPELL_MONST_PRIEST_HEAL_ALL) || (spell = SPELL_MONST_PRIEST_LIGHT_HEAL) || (spell = SPELL_MONST_PRIEST_HEAL))) + ((spell == SPELL_MONST_PRIEST_MAJOR_HEAL) || (spell == SPELL_MONST_PRIEST_REVIVE_SELF) || (spell = SPELL_MONST_PRIEST_LIGHT_HEAL) || (spell = SPELL_MONST_PRIEST_HEAL))) spell--; l = caster->m_loc; @@ -3155,20 +3161,20 @@ Boolean monst_cast_priest(creature_data_type *caster,short targ) } break; - case SPELL_MONST_PRIEST_LIGHT_HEAL: case SPELL_MONST_PRIEST_HEAL: case SPELL_MONST_PRIEST_MAJOR_HEAL: case SPELL_MONST_PRIEST_HEAL_ALL: // heals + case SPELL_MONST_PRIEST_LIGHT_HEAL: case SPELL_MONST_PRIEST_HEAL: case SPELL_MONST_PRIEST_MAJOR_HEAL: case SPELL_MONST_PRIEST_REVIVE_SELF: // heals play_sound(24); switch(spell) { case SPELL_MONST_PRIEST_LIGHT_HEAL: r1 = get_ran(2,1,4) + 2; break; case SPELL_MONST_PRIEST_HEAL: r1 = get_ran(3,1,6); break; case SPELL_MONST_PRIEST_MAJOR_HEAL: r1 = get_ran(5,1,6) + 3; break; - case SPELL_MONST_PRIEST_HEAL_ALL: r1 = 50; break; + case SPELL_MONST_PRIEST_REVIVE_SELF: r1 = 50; break; } caster->m_d.health = min(caster->m_d.health + r1, caster->m_d.m_health); break; case SPELL_MONST_PRIEST_BLESS_ALL: case SPELL_MONST_PRIEST_REVIVE_ALL:// bless all,revive all play_sound(24); r1 = get_ran(2,1,4); - r2 = get_ran(3,1,6); + r2 = get_ran(3,1,6);// <= shouldn't it be the "revive all" roll ? for (i = 0; i < T_M; i++) if ((monst_near(i,caster->m_loc,8,0)) && (caster->attitude == c_town.monst.dudes[i].attitude)) { @@ -3176,7 +3182,7 @@ Boolean monst_cast_priest(creature_data_type *caster,short targ) if (spell == SPELL_MONST_PRIEST_BLESS_ALL) affected->m_d.status[STATUS_BLESS_CURSE] = min(8,affected->m_d.status[STATUS_BLESS_CURSE] + r1); if (spell == SPELL_MONST_PRIEST_REVIVE_ALL) - affected->m_d.health += r1; + affected->m_d.health += r1; //<= here } play_sound(4); break; @@ -4060,7 +4066,7 @@ Boolean combat_cast_priest_spell() if (target < 6) { store_sound = 4; adven[current_pc].cur_sp -= s_cost[1][spell_num]; - adven[target].status[STATUS_BLESS_CURSE ] += (spell_num == SPELL_PRIEST_MINOR_BLESS) ? 2 : + adven[target].status[STATUS_BLESS_CURSE] += (spell_num == SPELL_PRIEST_MINOR_BLESS) ? 2 : max(2,(adven[current_pc].level * 3) / 4 + 1 + bonus); sprintf (c_line, " %s blessed. ", adven[target].name); @@ -4073,7 +4079,7 @@ Boolean combat_cast_priest_spell() adven[current_pc].cur_sp -= s_cost[1][spell_num]; for (i = 0; i < 6; i++) if (adven[i].isAlive()) { - adven[i].status[STATUS_BLESS_CURSE ] += adven[current_pc].level / 3; + adven[i].status[STATUS_BLESS_CURSE] += adven[current_pc].level / 3; add_missile(pc_pos[i],8,0,0,0); } sprintf (c_line, " Party blessed. "); diff --git a/Win32/Blades of Exile/boe.dlgutil.cpp b/Win32/Blades of Exile/boe.dlgutil.cpp index 3f43d057..4509a0e7 100644 --- a/Win32/Blades of Exile/boe.dlgutil.cpp +++ b/Win32/Blades of Exile/boe.dlgutil.cpp @@ -84,10 +84,10 @@ void end_shop_mode() ShowScrollBar(shop_sbar,SB_CTL,false); if (store_pre_shop_mode == 20) { - sprintf((char *)old_str1,"You conclude your business."); - sprintf((char *)old_str2,""); - sprintf((char *)one_back1,"You conclude your business."); - sprintf((char *)one_back2,""); + sprintf(old_str1,"You conclude your business."); + sprintf(old_str2,""); + sprintf(one_back1,"You conclude your business."); + sprintf(one_back2,""); strnum1 = strnum2 = oldstrnum1 = oldstrnum2 = 0; place_talk_str((char *)old_str1,"",0,dummy_rect); @@ -1210,9 +1210,10 @@ Boolean compatibility_event_filter (short item_hit) break; - case 7: case 9: case 11: case 13: case 15: case 17: case 19: + case 7: case 9: case 11: case 13: case 15: case 17: case 19: case 21: cd_set_led(1100,item_hit,1 - cd_get_led(1100,item_hit)); break; + break; } if (done_yet== true) { @@ -1224,6 +1225,7 @@ Boolean compatibility_event_filter (short item_hit) party.stuff_done[SDF_COMPATIBILITY_SPECIALS_INTERRUPT_REST]=cd_get_led(1100,15); party.stuff_done[SDF_COMPATIBILITY_ANYTIME_STAIRWAY_NODES]=cd_get_led(1100,17); party.stuff_done[SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING]=cd_get_led(1100,19); + party.stuff_done[SDF_COMPATIBILITY_TRIGGER_SPECIALS_ON_BOAT]=cd_get_led(1100,21); } build_data_file(1); } @@ -1245,16 +1247,18 @@ void pick_compatibility() cd_set_led(1100,15,(party.stuff_done[SDF_COMPATIBILITY_SPECIALS_INTERRUPT_REST] != 0) ? 1 : 0);// party.stuff_done[309][4] special_interrupt cd_set_led(1100,17,(party.stuff_done[SDF_COMPATIBILITY_ANYTIME_STAIRWAY_NODES] != 0) ? 1 : 0);// party.stuff_done[309][5] stairway_everywhere cd_set_led(1100,19,(party.stuff_done[SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING] != 0) ? 1 : 0);// party.stuff_done[309][6] resting_checks_timers + cd_set_led(1100,21,(party.stuff_done[SDF_COMPATIBILITY_TRIGGER_SPECIALS_ON_BOAT] != 0) ? 1 : 0);// party.stuff_done[309][7] trigger_special_on_boat - if (party.help_received[110] == 0) { + /*if (party.help_received[70] == 0) { cd_initial_draw(1100); - give_help(110,111,1100); - } + give_help(70,71,1100); + }*/ while (dialog_not_toast) ModalDialog(); + cd_kill_dialog(1100,0); - adjust_window_mode(); + //adjust_window_mode(); } void put_party_stats() diff --git a/Win32/Blades of Exile/boe.fileio.cpp b/Win32/Blades of Exile/boe.fileio.cpp index accef490..bdb910f7 100644 --- a/Win32/Blades of Exile/boe.fileio.cpp +++ b/Win32/Blades of Exile/boe.fileio.cpp @@ -597,6 +597,9 @@ void load_file() party_in_memory = true; + if(overall_mode == MODE_SHOPPING)//if loading while shopping, clean the shop items scroll bar + ShowScrollBar(shop_sbar,SB_CTL,false); + // now if not in scen, this is it. if (in_scen == false) { @@ -628,6 +631,10 @@ void load_file() erase_out_specials(); belt_present = false; + //turn off the debug mode... + in_scen_debug = false; + ghost_mode = false; + //...in case it was on if (town_restore == false) { center = party.p_loc; @@ -1743,6 +1750,8 @@ void get_reg_data() party.stuff_done[SDF_COMPATIBILITY_ANYTIME_STAIRWAY_NODES] = atoi(buffer); GetPrivateProfileString(section, "resting_checks_timers", "0", buffer, BUFFER_LEN, iniFile); party.stuff_done[SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING] = atoi(buffer); + GetPrivateProfileString(section, "trigger_special_on_boat", "0", buffer, BUFFER_LEN, iniFile); + party.stuff_done[SDF_COMPATIBILITY_TRIGGER_SPECIALS_ON_BOAT] = atoi(buffer); } @@ -1769,6 +1778,7 @@ void build_data_file(short which) // 1 - compatibility ; 2 - preferences WritePrivateProfileString(section, "special_interrupt", (party.stuff_done[SDF_COMPATIBILITY_SPECIALS_INTERRUPT_REST] == 0)? "0" : "1", iniFile); WritePrivateProfileString(section, "stairway_everywhere", (party.stuff_done[SDF_COMPATIBILITY_ANYTIME_STAIRWAY_NODES] == 0)? "0" : "1", iniFile); WritePrivateProfileString(section, "resting_checks_timers", (party.stuff_done[SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING] == 0)? "0" : "1", iniFile); + WritePrivateProfileString(section, "trigger_special_on_boat", (party.stuff_done[SDF_COMPATIBILITY_TRIGGER_SPECIALS_ON_BOAT] == 0)? "0" : "1", iniFile); } } diff --git a/Win32/Blades of Exile/boe.infodlg.cpp b/Win32/Blades of Exile/boe.infodlg.cpp index 46baffbf..5b85cccd 100644 --- a/Win32/Blades of Exile/boe.infodlg.cpp +++ b/Win32/Blades of Exile/boe.infodlg.cpp @@ -631,7 +631,7 @@ void display_alchemy() "Knowledge Brew (19)", "Strong Strength (10)", "Bliss (16)", - "Strong Power (20)" + "Strong Energy Ptn. (20)" }; SetCursor(sword_curs); @@ -1203,7 +1203,7 @@ void display_strings_event_filter (short item_hit) } } -// str_label_1 & str_label_2 uysed for saving button for journal +// str_label_1 & str_label_2 used for saving button for journal // 1000 + x scen 2000 + x out 3000 + x town void display_strings(char *text1, char *text2,short str_label_1,short str_label_2,short str_label_1b, short str_label_2b, diff --git a/Win32/Blades of Exile/boe.items.cpp b/Win32/Blades of Exile/boe.items.cpp index 3cf65bfa..0921a75d 100644 --- a/Win32/Blades of Exile/boe.items.cpp +++ b/Win32/Blades of Exile/boe.items.cpp @@ -349,24 +349,24 @@ void put_item_graphics() if (item_array[i + first_item_shown] != 200) { // display an item in window item = t_i.items[item_array[i + first_item_shown]]; - sprintf ((char *) message, "%s", + sprintf (message, "%s", (item.isIdent()) ? (char *) item.full_name : (char *) item.name); csit(987,21 + i * 4,(char *) message); if (item.graphic_num >= 150)//custom item graphic? csp(987,20 + i * 4,3000 + 2000 + item.graphic_num - 150); else csp(987,20 + i * 4,4800 + item.graphic_num);//// - get_item_interesting_string(item,(char *) message); - csit(987,22 + i * 4,(char *) message); + get_item_interesting_string(item, message); + csit(987,22 + i * 4, message); storage = item_weight(item); - sprintf ((char *) message, "Weight: %d",storage); - csit(987,53 + i,(char *) message); + sprintf (message, "Weight: %d",storage); + csit(987,53 + i, message); } else { // erase the spot - sprintf ((char *) message, ""); - csit(987,21 + i * 4,(char *) message); - csit(987,22 + i * 4,(char *) message); - csit(987,53 + i,(char *) message); + sprintf (message, ""); + csit(987,21 + i * 4, message); + csit(987,22 + i * 4, message); + csit(987,53 + i, message); } } diff --git a/Win32/Blades of Exile/boe.main.cpp b/Win32/Blades of Exile/boe.main.cpp index 837355bc..6b1f14fb 100644 --- a/Win32/Blades of Exile/boe.main.cpp +++ b/Win32/Blades of Exile/boe.main.cpp @@ -176,7 +176,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmd RegisterClass(&wndclass2); - mainPtr = CreateWindow (szAppName, "Classic Blades of Exile build_26.11.2010", + mainPtr = CreateWindow (szAppName, "Classic Blades of Exile build_09.01.2011", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, diff --git a/Win32/Blades of Exile/boe.party.cpp b/Win32/Blades of Exile/boe.party.cpp index 15049829..d8442979 100644 --- a/Win32/Blades of Exile/boe.party.cpp +++ b/Win32/Blades of Exile/boe.party.cpp @@ -1233,7 +1233,8 @@ void do_priest_spell(short pc_num,short spell_num) case SPELL_PRIEST_LIGHT: adven[pc_num].cur_sp -= spell_cost[1][spell_num]; - party.light_level += 210; + //party.light_level += 210; + increase_light(210); break; case SPELL_PRIEST_SUMMON_SPIRIT: @@ -1660,7 +1661,7 @@ void cast_town_spell(location where) switch (scenario.ter_types[ter].special) { //// case TER_SPEC_UNLOCKABLE_TERRAIN: case TER_SPEC_UNLOCKABLE_BASHABLE: r1 = get_ran(1,0,100) - 5 * adven[who_cast].statAdj(SKILL_INTELLIGENCE) + 5 * c_town.difficulty; - r1 += scenario.ter_types[ter].flag2 * 7; + r1 += scenario.ter_types[ter].flag2 * 7; //unlock_adjust (door resistance) if (scenario.ter_types[ter].flag2 == 10) r1 = 10000; if (r1 < (135 - combat_percent[min(19,adven[who_cast].level)])) { @@ -2343,8 +2344,10 @@ void do_alchemy() short pc_num; item_record_type store_i = {7,0, 0,0,0,1,0,0, 50,0,0,0,0,0, 0, 8,0, location(),"Potion","Potion",0,5,0,0}; - short potion_abils[20] = {72,87,70,73,70, 87,72,73,77,88, - 79,70,87,70,160, 88,86,71,84,88}; + short potion_abils[20] = {ITEM_AFFECT_POISON,ITEM_AFFECT_HEALTH,ITEM_POISON_WEAPON,ITEM_HASTE_SLOW,ITEM_POISON_WEAPON, + ITEM_AFFECT_HEALTH,ITEM_AFFECT_POISON,ITEM_HASTE_SLOW,ITEM_AFFECT_DISEASE,ITEM_AFFECT_SPELL_POINTS, + ITEM_AFFECT_DUMBFOUND,ITEM_POISON_WEAPON,ITEM_AFFECT_HEALTH,ITEM_POISON_WEAPON,ITEM_RESSURECTION_BALM, + ITEM_AFFECT_SPELL_POINTS,ITEM_AFFECT_SKILL_POINTS,ITEM_BLESS_CURSE,ITEM_BLISS,ITEM_AFFECT_SPELL_POINTS}; short potion_strs[20] = {2,2,2,2,4, 5,8,5,4,2, 8,6,8,8,0, 5,2,8,5,8}; short potion_val[20] = {40,60,15,50,50, 180,200,100,150,100, diff --git a/Win32/Blades of Exile/boe.specials.cpp b/Win32/Blades of Exile/boe.specials.cpp index 8b09be8b..d1502f67 100644 --- a/Win32/Blades of Exile/boe.specials.cpp +++ b/Win32/Blades of Exile/boe.specials.cpp @@ -82,6 +82,8 @@ Boolean handle_wandering_specials (short mode) if ((mode == 2) && (store_wandering_special.spec_on_flee >= 0)) {// After fleeing like a buncha girly men run_special(SPEC_FLEE_ENCOUNTER,1,store_wandering_special.spec_on_flee,null_loc,&s1,&s2,&s3); } + if(s3 > 0) + initiate_redraw(); return true; } @@ -169,8 +171,9 @@ Boolean check_special_terrain(location where_check,short mode,short which_pc,sho *forced = true; } *spec_num = c_town.town.spec_id[i]; - if ((is_blocked(where_check) == false) || (ter_special == TER_SPEC_CHANGE_WHEN_STEP_ON) - || (ter_special == TER_SPEC_CALL_LOCAL_SPECIAL) || (ter_special == TER_SPEC_CALL_SCENARIO_SPECIAL)) { + if ((is_blocked(where_check) == false) || (ter_special == TER_SPEC_CHANGE_WHEN_STEP_ON) //is_blocked doesn't check if aboard a boat... + || (ter_special == TER_SPEC_CALL_LOCAL_SPECIAL) || (ter_special == TER_SPEC_CALL_SCENARIO_SPECIAL) + || ((PSD[SDF_COMPATIBILITY_TRIGGER_SPECIALS_ON_BOAT] == true) && (party.in_boat >= 0) && (scenario.ter_types[ter].boat_over == true))) { //...so, check if in boat and terrain allows to boat over give_help(54,0,0); run_special(mode,2,c_town.town.spec_id[i],where_check,&s1,&s2,&s3); if (s1 > 0) @@ -351,6 +354,9 @@ Boolean check_special_terrain(location where_check,short mode,short which_pc,sho if (is_combat()) update_explored(pc_pos[current_pc]); + if (s3 > 0) + initiate_redraw(); + return can_enter; } @@ -986,8 +992,11 @@ Boolean adj_town_look(location where) for (i = 0; i < 50; i++) if (same_point(where,c_town.town.special_locs[i]) == true) { run_special(SPEC_TOWN_LOOK,2,c_town.town.spec_id[i],where,&s1,&s2,&s3); - if (s1 > 0) can_open = false; + if (s1 > 0) + can_open = false; got_special = true; + if (s3 > 0) + initiate_redraw(); } put_item_screen(stat_window,0); } @@ -2041,7 +2050,7 @@ void oneshot_spec(short which_mode,special_node_type cur_node,short cur_spec_typ else j = adven[tmp].runTrap(spec.ex1a,spec.ex1b,spec.ex2a); } - if (j == 0) + if (j == 0 || (party_toast() == true))//maybe party has been killed by the traps... { *a = 1; set_sd = false; diff --git a/Win32/Blades of Exile/classes/consts.h b/Win32/Blades of Exile/classes/consts.h index 6ed4991e..66136a15 100644 --- a/Win32/Blades of Exile/classes/consts.h +++ b/Win32/Blades of Exile/classes/consts.h @@ -53,7 +53,8 @@ #define SDF_COMPATIBILITY_FULL_TRIMS 309][3 #define SDF_COMPATIBILITY_SPECIALS_INTERRUPT_REST 309][4 #define SDF_COMPATIBILITY_ANYTIME_STAIRWAY_NODES 309][5 -#define SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING 309][6 +#define SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING 309][6 +#define SDF_COMPATIBILITY_TRIGGER_SPECIALS_ON_BOAT 309][7 #define INVALID_TOWN 200 @@ -1082,7 +1083,7 @@ enum eMonstersPriestSpells { SPELL_MONST_PRIEST_MAJOR_HEAL = 17, SPELL_MONST_PRIEST_FLAMESTRIKE = 18, SPELL_MONST_PRIEST_SUMMON_HOST = 19, - SPELL_MONST_PRIEST_HEAL_ALL = 20,// !!! this isn't a mass spell !!! it's the most reliable self-heal spell a monster can cast (heal 50 health each cast) + SPELL_MONST_PRIEST_REVIVE_SELF = 20,// renamed from heal all, to avoid confusion (this isn't a mass spell !) SPELL_MONST_PRIEST_UNHOLY_RAVAGING = 21, SPELL_MONST_PRIEST_SUMMON_GUARDIAN = 22, SPELL_MONST_PRIEST_PESTILENCE = 23, diff --git a/Win32/Blades of Exile/classes/pc.cpp b/Win32/Blades of Exile/classes/pc.cpp index b80bea96..f19ea18c 100644 --- a/Win32/Blades of Exile/classes/pc.cpp +++ b/Win32/Blades of Exile/classes/pc.cpp @@ -69,16 +69,16 @@ void pc_record_type::kill(short type) play_sound(21); if(type == 4){ play_sound(43); - sprintf ((char *) create_line, " %s is turned to stone. ",(char *) name); - add_string_to_buf((char *) create_line); + sprintf (create_line, " %s is turned to stone. ",(char *) name); + add_string_to_buf(create_line); } main_status = type; pc_moves[which_pc] = 0; } else { if (type == 4) { - sprintf ((char *) create_line, " %s is immune to petrification. ",(char *) name); - add_string_to_buf((char*) create_line); //inform of what has happened + sprintf (create_line, " %s is immune to petrification. ",(char *) name); + add_string_to_buf(create_line); //inform of what has happened } else{ add_string_to_buf(" Life saved! "); @@ -499,8 +499,8 @@ void pc_record_type::acid(short how_much) } status[STATUS_ACID] += how_much; - sprintf ((char *) c_line, " %s covered with acid!",(char *) name); - add_string_to_buf((char *) c_line); + sprintf (c_line, " %s covered with acid!",(char *) name); + add_string_to_buf(c_line); one_sound(42); put_pc_screen(); diff --git a/Win32/Blades of Exile/globvar.cpp b/Win32/Blades of Exile/globvar.cpp index 9eaf4455..0d6e04b8 100644 --- a/Win32/Blades of Exile/globvar.cpp +++ b/Win32/Blades of Exile/globvar.cpp @@ -784,7 +784,7 @@ char *alch_names[] = {"Weak Curing Potion (1)","Weak Healing Potion (1)","Weak P "Graymold Salve (7)","Weak Energy Potion (9)", "Potion of Clarity (9)","Strong Poison (10)","Strong Heal Potion (12)","Killer Poison (12)", "Resurrection Balm (9)","Medium Energy Ptn. (14)","Knowledge Brew (19)" , - "Strong Strength (10)","Bliss (16)","Strong Power (20)" + "Strong Strength (10)","Bliss (16)","Strong Energy Ptn. (20)" }; char *alch_names_short[] = {"Weak Curing Potion","Weak Healing Potion","Weak Poison", "Weak Speed Potion","Medium Poison", @@ -792,7 +792,7 @@ char *alch_names_short[] = {"Weak Curing Potion","Weak Healing Potion","Weak Poi "Graymold Salve","Weak Energy Potion", "Potion of Clarity","Strong Poison","Strong Heal Potion","Killer Poison", "Resurrection Bal","Medium Energy Ptn.","Knowledge Brew", - "Strong Strength","Bliss","Strong Power" + "Strong Strength","Bliss","Strong Energy Ptn." }; short spell_w_cast[2][62] = {{0,1,1,1,1,1,3,4,1,2, 1,1,1,1,1,1,4,1,4,1, 2,1,1,0,1,1,4,1,1,0, 1,1,1,2,4,1,1,1, 2,1,1,2,4,4,1,1, 1,1,1,1,4,4,1,5, 1,4,1,4,4,4,4,1}, @@ -875,7 +875,7 @@ char *m_mage_sp[] = {"Spark","Minor Haste","Strength","Flame Cloud","Flame", char *m_priest_sp[] = {"Minor Bless","Light Heal","Wrack","Stumble","Bless", "Curse","Wound","Summon Spirit","Disease","Heal", "Holy Scourge","Smite","Curse All","Sticks to Snakes","Martyr's Shield", - "Bless All","Major Heal","Flamestrike","Summon Host","Full Heal", + "Bless All","Major Heal","Flamestrike","Summon Host","Revive Self", "Unholy Ravaging","Summon Guardian","Pestilence","Revive All","Avatar", "Divine Thud"}; // extra devices for maps diff --git a/Win32/Scenario Editor/GAMEDLOG.RC b/Win32/Scenario Editor/GAMEDLOG.RC index a618e4b0..739e1cf4 100644 --- a/Win32/Scenario Editor/GAMEDLOG.RC +++ b/Win32/Scenario Editor/GAMEDLOG.RC @@ -2053,7 +2053,7 @@ STYLE WS_POPUP | WS_DLGFRAME LTEXT "The easiest way to release a scenario is to send it over to Spiderweb Software. Go to www.spidweb.com. There's a scenario upload area there. Alternately, mail it to us on disk (PO Box 85659, Seattle, WA 98145-1659, USA).", 4, 50, 89, 414, 64 LTEXT "Before you send a scenario, however, be sure to read the License Agreement (in the file Blades of Exile License). It says a lot of big no-no's and describes your (and our) rights for your scenario.", 5, 50, 154, 412, 50 LTEXT "If you need help, be sure to check the Blades of Exile forum in the Spiderweb Software community boards.", 6, 50, 205, 417, 50 - LTEXT "There are quite a few databases to upload your scenario to, see the list in the Blades of Exile forum.", 7, 50, 251, 418, 62 + LTEXT "There are quite a few databases to upload your scenario to, see the list in the Blades of Exile forum.", 7, 50, 251, 418, 27 LTEXT "BLADES OF EXILE - DISTRIBUTING YOUR SCENARIO", 8, 50, 4, 312, 16 DEFPUSHBUTTON "", 9, 255,323, 31, 10 } @@ -2063,7 +2063,7 @@ STYLE WS_POPUP | WS_DLGFRAME { LTEXT "1_63", 1, 435, 303, 61, 16 LTEXT "5_716", 2, 6, 6, 36, 36 - LTEXT "Classic Blades of Exile Scenario Editor version 26.11.2010 | 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 build 09.01.2011 | 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/Scenario Editor/STRINGS.RC b/Win32/Scenario Editor/STRINGS.RC index 449049f6..4ecd4d2c 100644 --- a/Win32/Scenario Editor/STRINGS.RC +++ b/Win32/Scenario Editor/STRINGS.RC @@ -346,7 +346,9 @@ STRINGTABLE 6912, "Drain Missiles" 6913, "Weak Weapon" 6914, "Causes Fear" - 6915, "Poisoned Weapon" + 6915, "Poisoned Weapon" + 6920, "No ability" + 6921, "Drain Missiles" 6931, "Protection" 6932, "Full Protection" 6933, "Fire Protection" diff --git a/Win32/Scenario Editor/blscened.cpp b/Win32/Scenario Editor/blscened.cpp index 1597fc8c..e42e69b1 100644 --- a/Win32/Scenario Editor/blscened.cpp +++ b/Win32/Scenario Editor/blscened.cpp @@ -16,7 +16,7 @@ #include "townout.h" #include "scenario.h" #include "keydlgs.h" -#include "graphutl.h" +#include "graphutl.h" void check_game_done(); @@ -30,8 +30,8 @@ short cur_viewing_mode = 0; extern unsigned long anim_ticks; extern terrain_type_type store_ter; extern BOOL do_choose_anim; -extern BOOL custom_pic; -extern BOOL play_anim; +extern BOOL play_anim; +extern short custom_type[500]; /* Mac stuff globals */ Boolean All_Done = FALSE; @@ -164,7 +164,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR, int nCmd } mainPtr = CreateWindow (szAppName, - "Classic BoE Scenario Editor build_26.11.2010", + "Classic BoE Scenario Editor build_09.01.2011", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, @@ -341,15 +341,11 @@ RECT r; draw_terrain(); } 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); - } + if(store_ter.picture >= 2000) + csp(813,14,store_ter.picture - 2000, 5); + else if (store_ter.picture >= 400 && store_ter.picture < 1000) + csp(813,14,store_ter.picture - 100, 0); + if(do_choose_anim == TRUE){ put_choice_pics(); } diff --git a/Win32/Scenario Editor/dlogtool.cpp b/Win32/Scenario Editor/dlogtool.cpp index 8091eb3d..56f96640 100644 --- a/Win32/Scenario Editor/dlogtool.cpp +++ b/Win32/Scenario Editor/dlogtool.cpp @@ -33,7 +33,6 @@ extern unsigned char m_pic_index_x[200]; extern unsigned char m_pic_index_y[200]; extern unsigned long anim_ticks; extern terrain_type_type store_ter; -extern short custom_pic; extern HBITMAP spec_scen_g; extern HACCEL accel; @@ -54,7 +53,8 @@ short item_flag[NI]; char item_active[NI]; char item_key[NI]; short item_label[NI]; -short item_label_loc[NI]; +short item_label_loc[NI]; +short custom_type[NI];//0 - not custom, 1 - 1x1, 2 - 2x1, 3 - 1x2, 4 - 2x2, 5 - animated custom char text_long_str[10][256]; char text_short_str[140][40]; @@ -715,7 +715,7 @@ void cd_attach_key(short dlog_num,short item_num,char key) item_key[item_index] = key; } -void cd_set_pict(short dlog_num, short item_num, short pict_num) +void cd_set_pict(short dlog_num, short item_num, short pict_num, short custom_pic_type) { short dlg_index,item_index; if (cd_get_indices(dlog_num,item_num,&dlg_index,&item_index) < 0) @@ -724,12 +724,13 @@ void cd_set_pict(short dlog_num, short item_num, short pict_num) beep(); return; } - item_flag[item_index] = pict_num; + item_flag[item_index] = pict_num; + custom_type[item_index] = custom_pic_type; if (pict_num == -1) cd_erase_item(dlog_num,item_num); else cd_draw_item(dlog_num,item_num); } - + void cd_activate_item(short dlog_num, short item_num, short status) { short dlg_index,item_index; @@ -828,7 +829,7 @@ void cd_set_text_edit_num(short dlog_num, short item_num, short num, bool highli && (edit_box[i] != NULL)){ SetWindowText(edit_box[i],store_ptr); if(highlight) - SendMessage(edit_box[i],EM_SETSEL,0,-1); + SendMessage(edit_box[i],EM_SETSEL,0,-1); } } @@ -841,11 +842,11 @@ void csit(short dlog_num, short item_num, char *str) { cd_set_item_text( dlog_num, item_num, str); } -void csp(short dlog_num, short item_num, short pict_num) +void csp(short dlog_num, short item_num, short pict_num, short custom_pic_type) { - cd_set_pict( dlog_num, item_num, pict_num); -} - + cd_set_pict( dlog_num, item_num, pict_num, custom_pic_type); +} + void cd_set_item_text(short dlog_num, short item_num, char *str) { short dlg_index,item_index,i; @@ -990,7 +991,6 @@ void cd_add_label(short dlog_num, short item_num, char *label, short label_flag) cd_draw_item(dlog_num,item_num); } - void cd_draw_item(short dlog_num,short item_num) { short dlg_index,item_index,store_label; @@ -1086,10 +1086,10 @@ void cd_draw_item(short dlog_num,short item_num) case 5: if (item_flag[item_index] == -1) cd_erase_item(dlog_num,item_num); - else if(custom_pic > 0){ - draw_custom_dialog_graphic(dlgs[dlg_index], item_rect[item_index], - item_flag[item_index], TRUE,0); - } + else if(custom_type[item_index] > 0){ + draw_custom_dialog_graphic(dlgs[dlg_index], item_rect[item_index], + item_flag[item_index], TRUE,0, custom_type[item_index]); + } else draw_dialog_graphic(dlgs[dlg_index], item_rect[item_index], item_flag[item_index],(item_flag[item_index] >= 2000) ? FALSE : TRUE,0); break; @@ -1479,7 +1479,7 @@ void frame_dlog_rect(HWND hDlg, RECT rect, short val) DeleteObject(lpen); } -void draw_custom_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,short win_or_gworld){ +void draw_custom_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,short win_or_gworld, short custom_pic){ RECT from_rect = {0,0,28, 36}; @@ -1633,7 +1633,6 @@ if ((win_or_gworld == 0) && (dlg_force_dc == NULL)) rect.right--; rect.bottom--; frame_dlog_rect(hDlg,rect,3); } -custom_pic = 0; } void draw_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,short win_or_gworld) diff --git a/Win32/Scenario Editor/dlogtool.h b/Win32/Scenario Editor/dlogtool.h index d88a9fb1..3f999372 100644 --- a/Win32/Scenario Editor/dlogtool.h +++ b/Win32/Scenario Editor/dlogtool.h @@ -3,7 +3,7 @@ short cd_get_led_range(short dlog_num,short first_led,short last_led) ; void cd_hit_led_range(short dlog_num,short first_led,short last_led,short which_to_set); void cd_set_led_range(short dlog_num,short first_led,short last_led,short which_to_set); -void cd_flip_led(short dlog_num,short item_num,short item_hit); +void cd_flip_led(short dlog_num,short item_num,short item_hit); short cd_get_led(short dlog_num,short item_num); void frame_di(HWND hDlg, short item_num, short val); void cd_kill_dc(short which_slot,HDC hdc); @@ -19,7 +19,7 @@ short cd_process_syskeystroke(HWND window,WPARAM wparam, LPARAM lparam,short *it short cd_process_keystroke(HWND window,WPARAM wparam, LPARAM lparam,short *item); void cd_attach_key(short dlog_num,short item_num,char key); -void cd_set_pict(short dlog_num, short item_num, short pict_num); +void cd_set_pict(short dlog_num, short item_num, short pict_num, short custom_pic_type); void cd_activate_item(short dlog_num, short item_num, short status); void cd_get_item_text(short dlog_num, short item_num, char *str); void cd_set_item_text(short dlog_num, short item_num, char *str); @@ -47,9 +47,9 @@ void draw_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,s void showcursor(Boolean a); void cd_get_text_edit_str(short dlog_num, char *str); -void cdsin(short dlog_num, short item_num, short num); +void cdsin(short dlog_num, short item_num, short num); void csit(short dlog_num, short item_num, char *str); -void csp(short dlog_num, short item_num, short pict_num); +void csp(short dlog_num, short item_num, short pict_num, short custom_pic_type); void ModalDialog(); RECT calc_rect(short i, short j); @@ -59,4 +59,4 @@ short cd_retrieve_text_edit_num(short dlog_num, short item_num) ; void cd_set_text_edit_str(short dlog_num, short item_num, char *str) ; void cd_set_text_edit_num(short dlog_num, short item_num, short num, bool highlight = false); void InsetRect(RECT *rect,short x, short y); -void draw_custom_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,short win_or_gworld); +void draw_custom_dialog_graphic(HWND hDlg, RECT rect, short which_g, Boolean do_frame,short win_or_gworld, short custom_pic); diff --git a/Win32/Scenario Editor/global.cpp b/Win32/Scenario Editor/global.cpp index 0c32fec6..5193f079 100644 --- a/Win32/Scenario Editor/global.cpp +++ b/Win32/Scenario Editor/global.cpp @@ -11,7 +11,6 @@ extern char town_strs[180][256]; extern Boolean give_delays; unsigned long anim_ticks = 0; BOOL do_choose_anim = FALSE; -short custom_pic = 0; BOOL play_anim=FALSE; RECT RECT16::rect32() diff --git a/Win32/Scenario Editor/keydlgs.cpp b/Win32/Scenario Editor/keydlgs.cpp index cb670140..4b5674b4 100644 --- a/Win32/Scenario Editor/keydlgs.cpp +++ b/Win32/Scenario Editor/keydlgs.cpp @@ -236,7 +236,7 @@ void display_strings(char *text1, char *text2, store_which_string_dlog++; cd_create_dialog_parent_num(store_which_string_dlog,parent_num); - csp(store_which_string_dlog,store_which_string_dlog,graphic_num); + csp(store_which_string_dlog,store_which_string_dlog,graphic_num, 0); csit(store_which_string_dlog,4,(char *) text1); if (text2 != NULL) { @@ -244,7 +244,7 @@ void display_strings(char *text1, char *text2, } if (strlen(title) > 0) csit(store_which_string_dlog,6,title); - csp(store_which_string_dlog,3,graphic_num); + csp(store_which_string_dlog,3,graphic_num, 0); while (dialog_not_toast) ModalDialog(); @@ -293,11 +293,11 @@ void put_choice_pics() for (i = 0; i < 36; i++) { if (store_first_g + which_page * 36 + i > store_last_g) { - csp(819,41 + i,950); + csp(819,41 + i,950, 0); cd_activate_item(819,5 + i,0); } else { - csp(819,41 + i,store_first_g + 36 * which_page + i); + csp(819,41 + i,store_first_g + 36 * which_page + i, 0); cd_activate_item(819,5 + i,1); } if (which_page * 36 + i == store_cur_pic - store_first_g) @@ -1237,7 +1237,7 @@ void edit_scen_intro_event_filter (short item_hit) i = choose_graphic(1600,1629,1600 + i,804); if (i >= 0) { CDSN(804,8,i - 1600); - csp(804,11,i ); + csp(804,11,i ,0); } break; } @@ -1252,7 +1252,7 @@ void edit_scen_intro() CDSN(804,8,scenario.intro_pic); for (i = 0; i < 6; i++) CDST(804, 2 + i,scen_strs[4 + i]); - csp(804,11,scenario.intro_pic + 1600); + csp(804,11,scenario.intro_pic + 1600, 0); while (dialog_not_toast) ModalDialog(); diff --git a/Win32/Scenario Editor/scenario.cpp b/Win32/Scenario Editor/scenario.cpp index 7b66c4be..3e8f3ef5 100644 --- a/Win32/Scenario Editor/scenario.cpp +++ b/Win32/Scenario Editor/scenario.cpp @@ -30,7 +30,7 @@ extern char scen_strs2[110][256]; extern char talk_strs[170][256]; extern char town_strs[180][256]; extern BOOL do_choose_anim; -extern short custom_pic; +extern short custom_type[500]; extern location cur_out; extern scen_item_data_type scen_item_list; @@ -927,27 +927,24 @@ void put_ter_info_in_dlog() cd_set_led_range(813,28,31,store_ter.step_sound); str[0] = store_ter.shortcut_key; str[1] = 0; - CDST(813,3,(char *) str); + CDST(813,3, str); CDSN(813,4,store_ter.trans_to_what); CDSN(813,8,store_ter.light_radius); cd_set_led_range(813,32,55,store_ter.special); CDSN(813,6,store_ter.flag1); CDSN(813,7,store_ter.flag2); get_str(str,21,40 + store_ter.special); - csit(813,67,(char *) str); + csit(813,67, str); get_str(str,21,80 + store_ter.special); - csit(813,68,(char *) str); - 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); - } + csit(813,68, str); + if (store_ter.picture >= 2000) + csp(813,14,store_ter.picture-2000, 5); + else if (store_ter.picture >= 1000) + csp(813,14,store_ter.picture-1000, 1); else if (store_ter.picture >= 400) - csp(813,14,store_ter.picture - 100); - else csp(813,14,store_ter.picture); + csp(813,14,store_ter.picture - 100, 0); + else + csp(813,14,store_ter.picture, 0); } @@ -1048,27 +1045,24 @@ void edit_ter_type_event_filter (short item_hit) i = choose_graphic(300,313,store_ter.picture,813); // Animated } if (i >= 0) { - if (i >= 300) i += 100; - store_ter.picture = i; - custom_pic = store_ter.picture / 1000; + if (i >= 300) + i += 100; + store_ter.picture = i; } - else { - custom_pic = store_ter.picture / 1000; - break; - } + else + break; + CDSN(813,5,store_ter.picture); - if(store_ter.picture >= 2000){ - 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 >= 2000) + csp(813,14,store_ter.picture-2000, 2); + else if (store_ter.picture >= 1000) + csp(813,14,store_ter.picture-1000, 1); + else { if (store_ter.picture >= 400) - csp(813,14,store_ter.picture - 100); - else csp(813,14,store_ter.picture); + csp(813,14,store_ter.picture - 100, 0); + else + csp(813,14,store_ter.picture, 0); } break; @@ -1126,20 +1120,18 @@ void put_monst_info_in_dlog() { char str[256]; - if (store_monst.picture_num < 1000){ - csp(814,34,400 + store_monst.picture_num); - } - else{ - custom_pic = (store_monst.picture_num) / 1000; - csp(814,34,store_monst.picture_num - custom_pic * 1000); - } + if (store_monst.picture_num < 1000) + csp(814,34,400 + store_monst.picture_num, 0); + else + csp(814,34,store_monst.picture_num % 1000, store_monst.picture_num / 1000); + cdsin(814,33,store_which_monst); CDST(814,2,scen_item_list.monst_names[store_which_monst]); CDSN(814,3,store_monst.picture_num); - sprintf((char *) str,"Width = %d",store_monst.x_width); - csit(814,40,(char *) str); - sprintf((char *) str,"Height = %d",store_monst.y_width); - csit(814,41,(char *) str); + sprintf(str,"Width = %d",store_monst.x_width); + csit(814,40, str); + sprintf(str,"Height = %d",store_monst.y_width); + csit(814,41, str); CDSN(814,4,store_monst.level); CDSN(814,5,store_monst.health); CDSN(814,6,store_monst.armor); @@ -1159,11 +1151,11 @@ void put_monst_info_in_dlog() cd_set_led_range(814,29,32,store_monst.default_attitude); get_str(str,20,150 + store_monst.m_type); - csit(814,42,(char *) str); + csit(814,42, str); get_str(str,20,130 + store_monst.a1_type); - csit(814,43,(char *) str); + csit(814,43, str); get_str(str,20,130 + store_monst.a23_type); - csit(814,44,(char *) str); + csit(814,44, str); } Boolean save_monst_info() @@ -1254,7 +1246,6 @@ void edit_monst_type_event_filter (short item_hit) temp_monst = edit_monst_abil(store_monst,814); store_monst = temp_monst; put_monst_info_in_dlog(); - custom_pic = (store_monst.picture_num) / 1000; break; case 21://previous monster if (save_monst_info() == FALSE) break; @@ -1262,7 +1253,6 @@ void edit_monst_type_event_filter (short item_hit) store_which_monst--; if (store_which_monst < 1) store_which_monst = 255; store_monst = scenario.scen_monsters[store_which_monst]; - custom_pic = (store_monst.picture_num) / 1000; put_monst_info_in_dlog(); break; case 22://next monster @@ -1271,7 +1261,6 @@ void edit_monst_type_event_filter (short item_hit) store_which_monst++; if (store_which_monst > 255) store_which_monst = 1; store_monst = scenario.scen_monsters[store_which_monst]; - custom_pic = (store_monst.picture_num) / 1000; put_monst_info_in_dlog(); break; case 24: // picture @@ -1282,13 +1271,11 @@ void edit_monst_type_event_filter (short item_hit) } 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; @@ -1297,7 +1284,6 @@ void edit_monst_type_event_filter (short item_hit) store_monst.m_type = i - 150; } put_monst_info_in_dlog(); - custom_pic = (store_monst.picture_num) / 1000; break; case 26: // att type 1 if (save_monst_info() == FALSE) break; @@ -1306,7 +1292,6 @@ void edit_monst_type_event_filter (short item_hit) store_monst.a1_type = i - 130; } put_monst_info_in_dlog(); - custom_pic = (store_monst.picture_num) / 1000; break; case 27: // att type 23 if (save_monst_info() == FALSE) break; @@ -1315,7 +1300,6 @@ void edit_monst_type_event_filter (short item_hit) store_monst.a23_type = i - 130; } put_monst_info_in_dlog(); - custom_pic = (store_monst.picture_num) / 1000; break; case 28: // talk pic if (save_monst_info() == FALSE) break; @@ -1325,11 +1309,9 @@ void edit_monst_type_event_filter (short item_hit) } 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); @@ -1505,13 +1487,10 @@ void put_item_info_in_dlog() cdsin(818,52,store_which_item); CDST(818,2,store_item.full_name); CDST(818,3,store_item.name); - if (store_item.graphic_num >= 150){ //150 ?? should be 122 ... - custom_pic = 1; - csp(818,49,store_item.graphic_num - 150); - } - else{ - csp(818,49,1800 + store_item.graphic_num); - } + if (store_item.graphic_num >= 150) //150 is too large if the base item bitmap is not expanded, should be 122 ... + csp(818,49, store_item.graphic_num - 150, 1); + else + csp(818,49,1800 + store_item.graphic_num, 0); CDSN(818,4,store_item.graphic_num); cd_set_led_range(818,18,45,store_item.variety); CDSN(818,5,store_item.item_level); @@ -1615,7 +1594,6 @@ void edit_item_type_event_filter (short item_hit) store_item.graphic_num = i - 1800; } put_item_info_in_dlog(); - custom_pic = (store_item.graphic_num >= 150) ? 1 : 0; break; case 69: if (store_item.variety == 0) { @@ -1631,7 +1609,6 @@ void edit_item_type_event_filter (short item_hit) 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); @@ -1728,13 +1705,21 @@ void edit_item_abil_event_filter (short item_hit) break; case 17: if (save_item_abils() == FALSE) break; - if (store_item.variety > 2) { - give_error("You can only give an ability of this sort to a melee weapon.","",824); - break; - } - i = choose_text_res(23,1,15,store_item2.ability + 1,824,"Choose Weapon Ability (inherent)"); - if (i >= 0) store_item2.ability = i - 1; - put_item_abils_in_dlog(); + if((store_item.variety == 4) || (store_item.variety == 23)){//bow and crossbow special case + i = choose_text_res(23,20,21,((store_item2.ability == 0) ? 20 : 21),824,"Choose Ranged Weapon Ability (inherent)"); + if(i >= 0) + store_item2.ability = ((i==20) ? 0 : 11); + put_item_abils_in_dlog(); + } + else{ + if (store_item.variety > 2) { + give_error("You can only give an ability of this sort to a melee or ranged weapon.","",824); + break; + } + i = choose_text_res(23,1,15,store_item2.ability + 1,824,"Choose Weapon Ability (inherent)"); + if (i >= 0) store_item2.ability = i - 1; + put_item_abils_in_dlog(); + } break; case 35: if (save_item_abils() == FALSE) break; diff --git a/Win32/Scenario Editor/townout.cpp b/Win32/Scenario Editor/townout.cpp index bf70df9b..d09feeae 100644 --- a/Win32/Scenario Editor/townout.cpp +++ b/Win32/Scenario Editor/townout.cpp @@ -216,8 +216,8 @@ void put_placed_monst_in_dlog() CDSN(837,2,store_placed_monst.personality); CDSN(837,3,store_placed_monst.facial_pic); if ((store_placed_monst.facial_pic < 1) || (store_placed_monst.facial_pic >= 1000)) - csp(837,11,950); - else csp(837,11,store_placed_monst.facial_pic + 1000); + csp(837,11,950,0); + else csp(837,11,store_placed_monst.facial_pic + 1000,0); } Boolean get_placed_monst_in_dlog() { @@ -401,8 +401,8 @@ void put_placed_item_in_dlog() short i; cdsin(836,17,store_which_placed_item); - sprintf((char *) str,"X = %d, Y = %d",store_placed_item.item_loc.x,store_placed_item.item_loc.y); - csit(836,22,(char *) str); + sprintf(str,"X = %d, Y = %d",store_placed_item.item_loc.x,store_placed_item.item_loc.y); + csit(836,22, str); csit(836,15,scen_item_list.scen_items[store_placed_item.item_code].full_name); CDSN(836,2,store_placed_item.ability); if (store_placed_item.always_there == TRUE) @@ -416,9 +416,11 @@ void put_placed_item_in_dlog() else cd_set_led(836,14,0); i = scen_item_list.scen_items[store_placed_item.item_code].graphic_num; - if (i >= 1000) - csp(836,4,950); - else csp(836,4,1800 + i); + if (i >= 150)//custom icon + csp(836,4, i - 150, 1); + else + csp(836,4,1800 + i, 0); + } Boolean get_placed_item_in_dlog() { @@ -524,10 +526,10 @@ void edit_sign(short which_sign,short picture) cd_create_dialog_parent_num(831,0); if (picture >= 1000) - csp(831,6,950); + csp(831,6,950,0); else if (picture >= 400) - csp(831,6,picture - 100); - else csp(831,6,picture); + csp(831,6,picture - 100,0); + else csp(831,6,picture,0); cdsin(831,5,store_which_sign); if (editing_town == FALSE)