From 049754ea27a5a7aa1c8fd1b779c7f697f59b8307 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 28 Apr 2009 13:00:21 +0000 Subject: [PATCH] - Added code to the missile firing so that missiles that heal the target also work if they hit a PC. - Added fields to the terrain class in preparation for new scenario format. - Same with the party class, plus refactored it to use vectors and strings. - Fixed a potential divide-by-zero error in get_ran. git-svn-id: http://openexile.googlecode.com/svn/trunk@41 4ebdad44-0ea0-11de-aab3-ff745001d230 --- osx/Scenario Editor/Blades of Exile Graphics | Bin 3923645 -> 4154607 bytes osx/boe.actions.cpp | 2 +- osx/boe.combat.cpp | 5 +- osx/boe.dlgutil.cpp | 35 ++--- osx/boe.infodlg.cpp | 134 ++++++++----------- osx/boe.party.cpp | 57 ++++---- osx/boe.specials.cpp | 42 ++---- osx/boe.startup.cpp | 2 +- osx/boe.town.cpp | 23 ++-- osx/misc/fileio.cpp | 2 +- osx/misc/mathutil.cpp | 2 + osx/outdoors.h | 2 +- osx/party.cpp | 66 +++++++-- osx/party.h | 58 ++++++-- osx/terrain.cpp | 3 - osx/terrain.h | 11 +- 16 files changed, 252 insertions(+), 192 deletions(-) diff --git a/osx/Scenario Editor/Blades of Exile Graphics b/osx/Scenario Editor/Blades of Exile Graphics index 805ef13e536b09be2b54d24fb70a38d2de815ebb..c704dd52ceb8340b944ccfb974a1af03c473edb9 100644 GIT binary patch delta 81316 zcmcedG9|vWRjU=lFTr-%uF(u%r%#pWHQO@;S$14K#)sB!~z0A7zHnY7ogU< z;ZSXAQQ#mf##0r%RK;7U)`%!Vt5tNWP)mQcr>S^5tyNLlYSmMm-{<|T^?di*ljNM& z@1Nf{S+l<1^wDRIf8h&1EB);8=St0Wb)~wx-4}hLZujqeqONYmNq4q9 zduyrmhb1dZR3D|XRHa^JnaXmN29-vY6)G!Lnp9S)tX5g0(yY>=a{OXnDXYw=9HVmVfl}$XFMR8STfbKqx1qZ4*0n5IXsTQIts2fqg>#%? z>y^D$*q&Pcn|3Oj!UL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ssa!nlkX6}NaK=!xun zgDntd0aaIju3~DF{Pr`2L0G!wQc~L8UzlZ}*|R|mc(r~8@}#z`2A0x!j5NoIsT_fc zTUje{zc(FV90&6>&y-*4Pmxy;dgUB`qLi8iR+FD>Lpczo5#H!G>^QbeM4#Uk-z;tv zR)ODgeAjuk7KA`xODkCCYx=pr{Zv8@&>j4kq#+dZLn zvlMSw&P|yIE$H(f2Ujr2Eu-C((1~v1)Ge8-@$OYPsAZ?U!FAqWOO|ADpderfM>a&( z%=ha{yKgUpAgy2#Y#eE)Ft1_XN&Oq|tqrEZMlXDkAA<`TLk5X~?mCg{vD3XqHi77< zG0u&`Kr#_W>^a)Dq8p~aLXFW?v$duNiC6<%{7iP!-4gVy)Cd7HHg`pngmBV5#ml3eLbqO1%JE9_*XprvGN_ zo%lQ9GYBF`;@T(alqmV7-<+SmxSr5|Rt>JH(@dfi>mfCJ{w?n*YyzgAFH zD-x`w#jndvoYP0-sp)@4KaZ&>){18!fmCE@kWe3;GW2#jh=>p*1YkPl`H1p~;(e}I zu@!_Pyx*+e4{tjSys)Q}PC;MlL~r++iH}R|bFAsess~nZp{eZdCZpXD6@01lJGW%; z=2(l?(Y-dYqi9^~^YcJ|v<}{^I<18a$_kTt=i%r*%yUbaN%Aug>5aNvCzjQ-+b+@w=TWeTk3814)0w5 z_Y)6KE%$r9CqMt4-jgqXr`NmVsovXvKfmucd%fQL-e2wYx1N3aT<;6LyDne8_|@KE z>Xn^;`|-);sf9g{PyI>n0hN9WT! lGe0@`?%w$WZ(h3i>RXSz^2X(TZ*5=Uc;J;wm)>y8{{zV=N7YU7Df1ToI;b)|&4^6FT2tbE{AWUpv z6CrFNj0mELA&vx+NFj|3wvojScCm*XEbQX|c@%JnB92hPF-}lM1*bT}Ic!{@ic4If zhHKp57I&zlfhJmLdzy0mslC>q 0) { - switch (univ.party.special_notes_str[i][0] / 1000) { + if (univ.party.special_notes.size() > i) { + switch (univ.party.special_notes[i].str_num / 1000) { case 0: - strcpy((char *) place_str,scenario.scen_strs(univ.party.special_notes_str[i][0] % 1000)); break; + strcpy((char *) place_str,scenario.scen_strs(univ.party.special_notes[i].str_num % 1000)); break; case 1: - load_outdoor_str(loc(univ.party.special_notes_str[i][1] % scenario.out_width, - univ.party.special_notes_str[i][1] / scenario.out_width),univ.party.special_notes_str[i][0] % 1000,(char *)place_str); + load_outdoor_str(loc(univ.party.special_notes[i].where % scenario.out_width, + univ.party.special_notes[i].where / scenario.out_width),univ.party.special_notes[i].str_num % 1000,(char *)place_str); break; case 2: - load_town_str(univ.party.special_notes_str[i][1],univ.party.special_notes_str[i][0],(char *)place_str); break; + load_town_str(univ.party.special_notes[i].where,univ.party.special_notes[i].str_num,(char *)place_str); break; } - get_str(place_str,univ.party.special_notes_str[i][0],univ.party.special_notes_str[i][1]); + get_str(place_str,univ.party.special_notes[i].str_num,univ.party.special_notes[i].where); csit(961,3 + i,(char *) place_str); cd_activate_item(961,9 + i,1); } else cd_activate_item(961,9 + i,0); } for (i = store_page_on * 3; i < (store_page_on * 3) + 3; i++) { - if (univ.party.special_notes_str[i][0] > 0) { - switch (univ.party.special_notes_str[i][0] / 1000) { + if (univ.party.special_notes.size() > i) { + switch (univ.party.special_notes[i].str_num / 1000) { case 0: - strcpy((char *) place_str,scenario.scen_strs(univ.party.special_notes_str[i][0] % 1000)); break; + strcpy((char *) place_str,scenario.scen_strs(univ.party.special_notes[i].str_num % 1000)); break; case 1: - load_outdoor_str(loc(univ.party.special_notes_str[i][1] % scenario.out_width, - univ.party.special_notes_str[i][1] / scenario.out_width), univ.party.special_notes_str[i][0] % 1000,(char *)place_str); + load_outdoor_str(loc(univ.party.special_notes[i].where % scenario.out_width, + univ.party.special_notes[i].where / scenario.out_width), univ.party.special_notes[i].str_num % 1000,(char *)place_str); break; case 2: - load_town_str(univ.party.special_notes_str[i][1],univ.party.special_notes_str[i][0] % 1000,(char *)place_str); break; + load_town_str(univ.party.special_notes[i].where,univ.party.special_notes[i].str_num % 1000,(char *)place_str); break; } @@ -1020,9 +1024,9 @@ void adventure_notes() Str255 place_str; store_num_i = 0; - for (i = 0; i < 140; i++) - if (univ.party.special_notes_str[i][0] > 0) - store_num_i = i + 1; + //for (i = 0; i < 140; i++) + //if (univ.party.special_notes_str[i][0] > 0) + store_num_i = univ.party.special_notes.size(); //i + 1; store_page_on = 0; if (store_num_i == 0) { ASB("Nothing in your journal."); @@ -1035,16 +1039,16 @@ void adventure_notes() cd_create_dialog_parent_num(961,0); for (i = 0; i < 3; i++) { - if (univ.party.special_notes_str[i][0] > 0) { - switch (univ.party.special_notes_str[i][0] / 1000) { + if (univ.party.special_notes.size() > i) { + switch (univ.party.special_notes[i].str_num / 1000) { case 0: - strcpy((char *) place_str,scenario.scen_strs(univ.party.special_notes_str[i][0] % 1000)); break; + strcpy((char *) place_str,scenario.scen_strs(univ.party.special_notes[i].str_num % 1000)); break; case 1: - load_outdoor_str(loc(univ.party.special_notes_str[i][1] % scenario.out_width, - univ.party.special_notes_str[i][1] / scenario.out_width), univ.party.special_notes_str[i][0] % 1000,(char *)place_str); + load_outdoor_str(loc(univ.party.special_notes[i].where % scenario.out_width, + univ.party.special_notes[i].where / scenario.out_width), univ.party.special_notes[i].str_num % 1000,(char *)place_str); break; case 2: - load_town_str(univ.party.special_notes_str[i][1],univ.party.special_notes_str[i][0] % 1000,(char *)place_str); break; + load_town_str(univ.party.special_notes[i].where,univ.party.special_notes[i].str_num % 1000,(char *)place_str); break; } csit(961,3 + i,(char *) place_str); @@ -1084,29 +1088,29 @@ void put_talk() //get_str(place_str,120 + ((personality - 1) / 10),((personality - 1) % 10) + 1); csit(960,7,univ.town.cur_talk->talk_strs[personality % 10]); - if (univ.party.talk_save[store_page_on].str1 >= 1000) { - if (univ.party.talk_save[store_page_on].str1 >= 3000) - csit(960,3,scenario.scen_strs(univ.party.talk_save[store_page_on].str1 - 3000)); + if (univ.party.talk_save[store_page_on].str_num1 >= 1000) { + if (univ.party.talk_save[store_page_on].str_num1 >= 3000) + csit(960,3,scenario.scen_strs(univ.party.talk_save[store_page_on].str_num1 - 3000)); else { load_town_str(univ.party.talk_save[store_page_on].town_num, - univ.party.talk_save[store_page_on].str1 - 2000 ,(char *) place_str); + univ.party.talk_save[store_page_on].str_num1 - 2000 ,(char *) place_str); csit(960,3,(char *) place_str); } } - else if (univ.party.talk_save[store_page_on].str1 > 0) - csit(960,3,univ.town.cur_talk->talk_strs[univ.party.talk_save[store_page_on].str1]); + else if (univ.party.talk_save[store_page_on].str_num1 > 0) + csit(960,3,univ.town.cur_talk->talk_strs[univ.party.talk_save[store_page_on].str_num1]); - if (univ.party.talk_save[store_page_on].str2 >= 1000) { - if (univ.party.talk_save[store_page_on].str2 >= 3000) - csit(960,5,scenario.scen_strs(univ.party.talk_save[store_page_on].str2 - 3000 + 160)); + if (univ.party.talk_save[store_page_on].str_num2 >= 1000) { + if (univ.party.talk_save[store_page_on].str_num2 >= 3000) + csit(960,5,scenario.scen_strs(univ.party.talk_save[store_page_on].str_num2 - 3000 + 160)); else { load_town_str(univ.party.talk_save[store_page_on].town_num, - univ.party.talk_save[store_page_on].str2 - 2000/* + 20*/,(char *) place_str); + univ.party.talk_save[store_page_on].str_num2 - 2000/* + 20*/,(char *) place_str); csit(960,5,(char *) place_str); } } - else if (univ.party.talk_save[store_page_on].str2 > 0) - csit(960,5,univ.town.cur_talk->talk_strs[univ.party.talk_save[store_page_on].str2]); + else if (univ.party.talk_save[store_page_on].str_num2 > 0) + csit(960,5,univ.town.cur_talk->talk_strs[univ.party.talk_save[store_page_on].str_num2]); } } @@ -1194,10 +1198,10 @@ void journal_event_filter (short item_hit) } for (i = 0; i < 3; i++) { - if (univ.party.journal_str[i + (store_page_on * 3)] > 0) { + if (univ.party.journal.size() > i + (store_page_on * 3)) { ////get_str(place_str,17,univ.party.journal_str[i + (store_page_on * 3)]); - csit(962,3 + i,scenario.scen_strs(univ.party.journal_str[i] + 10)); - sprintf((char *)place_str,"Day: %d",univ.party.journal_day[i + (store_page_on * 3)]); + csit(962,3 + i,scenario.scen_strs(univ.party.journal[i].str_num + 10)); + sprintf((char *)place_str,"Day: %d",univ.party.journal[i + (store_page_on * 3)].day); csit(962,9 + i,(char *)place_str); } else {csit(962,3 + i,"");csit(962,9 + i,"");} @@ -1212,9 +1216,9 @@ void journal() Str255 place_str; store_num_i = 0; - for (i = 0; i < 120; i++) - if (univ.party.journal_str[i] > 0) - store_num_i = i + 1; + //for (i = 0; i < 120; i++) + //if (univ.party.journal[i].str_num > 0) + store_num_i = univ.party.journal.size();//i + 1; store_page_on = 0; make_cursor_sword(); @@ -1222,10 +1226,10 @@ void journal() cd_create_dialog_parent_num(962,0); for (i = 0; i < 3; i++) { - if (univ.party.journal_str[i] > 0) { + if (univ.party.journal.size() > i) { ////get_str(place_str,17,univ.party.journal_str[i]); - csit(962,3 + i,scenario.scen_strs(univ.party.journal_str[i] + 10)); - sprintf((char *)place_str,"Day: %d",univ.party.journal_day[i]); + csit(962,3 + i,scenario.scen_strs(univ.party.journal[i].str_num + 10)); + sprintf((char *)place_str,"Day: %d",univ.party.journal[i].day); csit(962,9 + i,(char *)place_str); } } @@ -1242,13 +1246,8 @@ void add_to_journal(short event) { short i; - for (i = 0; i < 120; i++) - if (univ.party.journal_str[i] == 0) { - univ.party.journal_str[i] = event; - univ.party.journal_day[i] = calc_day(); - i = 120; - } - ASB("Something was added to your journal."); + if(univ.party.add_to_journal(event, calc_day())) + ASB("Something was added to your journal."); } @@ -1301,34 +1300,19 @@ void record_display_strings(){ bool had1 = false, had2 = false; int i; play_sound(0); - for (i = 0; i < 140; i++) - if ((store_str_label_1 == univ.party.special_notes_str[i][0]) && - (store_str_label_1b == univ.party.special_notes_str[i][1])) + for (i = 0; i < univ.party.special_notes.size(); i++) + if ((store_str_label_1 == univ.party.special_notes[i].str_num) && + (store_str_label_1b == univ.party.special_notes[i].where)) had1 = true; if (!had1) { - //give_help(58,0,store_which_string_dlog); - for (i = 0; i < 140; i++) - if (univ.party.special_notes_str[i][0] <= 0) { - univ.party.special_notes_str[i][0] = store_str_label_1; - univ.party.special_notes_str[i][1] = store_str_label_1b; - //univ.party.special_notes_str[i][1] = store_str1b; - ASB("Info added to Encounter Notes."); - i = 140; - } - + give_help(58,0,store_which_string_dlog); + univ.party.record(store_str_label_1, store_str_label_1b); } - for (i = 0; i < 140; i++) - if ((store_str_label_2 == univ.party.special_notes_str[i][0]) && - (store_str_label_2b == univ.party.special_notes_str[i][1])) + for (i = 0; i < univ.party.special_notes.size(); i++) + if ((store_str_label_2 == univ.party.special_notes[i].str_num) && + (store_str_label_2b == univ.party.special_notes[i].where)) had2 = true; if (!had2) { - for (i = 0; i < 140; i++) - if (univ.party.special_notes_str[i][0] <= 0) { - univ.party.special_notes_str[i][0] = store_str_label_2; - univ.party.special_notes_str[i][1] = store_str_label_2b; - //univ.party.special_notes_str[i][1] = store_str2b; - i = 140; - } - + univ.party.record(store_str_label_2,store_str_label_2b); } } \ No newline at end of file diff --git a/osx/boe.party.cpp b/osx/boe.party.cpp index ad6416d6..20d2b99b 100644 --- a/osx/boe.party.cpp +++ b/osx/boe.party.cpp @@ -232,13 +232,16 @@ void init_party(short mode) univ.party.imprisoned_monst[i] = 0; for (i = 0; i < 256; i++) univ.party.m_seen[i] = 0; - for (i = 0; i < 50; i++) - univ.party.journal_str[i] = -1; - for (i = 0; i < 140; i++) - for (j = 0; j < 2; j++) - univ.party.special_notes_str[i][j] = 0; - for (i = 0; i < 120; i++) - univ.party.talk_save[i].personality = -1; +// for (i = 0; i < 50; i++) +// univ.party.journal_str[i] = -1; +// for (i = 0; i < 140; i++) +// for (j = 0; j < 2; j++) +// univ.party.special_notes_str[i][j] = 0; +// for (i = 0; i < 120; i++) +// univ.party.talk_save[i].personality = -1; + univ.party.journal.clear(); + univ.party.special_notes.clear(); + univ.party.talk_save.clear(); univ.party.total_m_killed = 0; univ.party.total_dam_done = 0; @@ -252,16 +255,17 @@ void init_party(short mode) univ.party.can_find_town[i] = 0; for (i = 0; i < 20; i++) univ.party.key_times[i] = 30000; - for (i = 0; i < 30; i++) - univ.party.party_event_timers[i] = 0; +// for (i = 0; i < 30; i++) +// univ.party.party_event_timers[i] = 0; + univ.party.party_event_timers.clear(); for (i = 0; i < 50; i++) univ.party.spec_items[i] = 0; for (i = 0; i < 120; i++) { - univ.party.help_received[i] = 0; - } + univ.party.help_received[i] = 0; + } for (i = 0; i < 200; i++) - univ.party.m_killed[i] = 0; - sprintf((char *) univ.party.scen_name,""); + univ.party.m_killed[i] = 0; + univ.party.scen_name = ""; for (i = 0; i < 200; i++) for (j = 0; j < 8; j++) @@ -371,13 +375,16 @@ void init_party_scen_data() univ.party.imprisoned_monst[i] = 0; for (i = 0; i < 256; i++) univ.party.m_seen[i] = 0; - for (i = 0; i < 50; i++) - univ.party.journal_str[i] = -1; - for (i = 0; i < 140; i++) - for (j = 0; j < 2; j++) - univ.party.special_notes_str[i][j] = 0; - for (i = 0; i < 120; i++) - univ.party.talk_save[i].personality = -1; +// for (i = 0; i < 50; i++) +// univ.party.journal_str[i] = -1; +// for (i = 0; i < 140; i++) +// for (j = 0; j < 2; j++) +// univ.party.special_notes_str[i][j] = 0; +// for (i = 0; i < 120; i++) + // univ.party.talk_save[i].personality = -1; + univ.party.journal.clear(); + univ.party.special_notes.clear(); + univ.party.talk_save.clear(); univ.party.direction = 0; univ.party.at_which_save_slot = 0; @@ -385,8 +392,9 @@ void init_party_scen_data() univ.party.can_find_town[i] = 1 - scenario.town_hidden[i]; for (i = 0; i < 20; i++) univ.party.key_times[i] = 30000; - for (i = 0; i < 30; i++) - univ.party.party_event_timers[i] = 0; +// for (i = 0; i < 30; i++) +// univ.party.party_event_timers[i] = 0; + univ.party.party_event_timers.clear(); for (i = 0; i < 50; i++) univ.party.spec_items[i] = (scenario.special_items[i] >= 10) ? 1 : 0; @@ -474,8 +482,9 @@ void put_party_in_scen(string scen_name) univ.party.age = 0; for (i = 0; i < 200; i++) univ.party.m_killed[i] = 0; - for (i = 0; i < 30; i++) - univ.party.party_event_timers[i] = 0; +// for (i = 0; i < 30; i++) +// univ.party.party_event_timers[i] = 0; + univ.party.party_event_timers.clear(); FSRef file_ref; diff --git a/osx/boe.specials.cpp b/osx/boe.specials.cpp index aeb76de6..1b82a956 100644 --- a/osx/boe.specials.cpp +++ b/osx/boe.specials.cpp @@ -1554,19 +1554,18 @@ void special_increase_age() if (s3 > 0) redraw = true; } - for (i = 0; i < 30; i++) - if (univ.party.party_event_timers[i] > 0) { - if (univ.party.party_event_timers[i] == 1) { - if (univ.party.global_or_town[i] == 0) - run_special(11,0,univ.party.node_to_call[i],null_loc,&s1,&s2,&s3); - else run_special(11,2,univ.party.node_to_call[i],null_loc,&s1,&s2,&s3); - univ.party.party_event_timers[i] = 0; + for (i = 0; i < univ.party.party_event_timers.size(); i++) { + if (univ.party.party_event_timers[i].time == 1) { + if (univ.party.party_event_timers[i].global_or_town == 0) + run_special(11,0,univ.party.party_event_timers[i].node_to_call,null_loc,&s1,&s2,&s3); + else run_special(11,2,univ.party.party_event_timers[i].node_to_call,null_loc,&s1,&s2,&s3); + univ.party.party_event_timers[i].time = 0; stat_area = true; if (s3 > 0) redraw = true; } - else univ.party.party_event_timers[i]--; - } + else univ.party.party_event_timers[i].time--; + } if (stat_area == true) { put_pc_screen(); put_item_screen(stat_window,0); @@ -1770,13 +1769,7 @@ void general_spec(short which_mode,cSpecial cur_node,short cur_spec_type, break; case 13: check_mess = true; - for (i = 0; i < 30; i++) - if (univ.party.party_event_timers[i] == 0) { - univ.party.party_event_timers[i] = spec.ex1a; - univ.party.node_to_call[i] = spec.ex1b; - univ.party.global_or_town[i] = 0; - i = 30; - } + univ.party.start_timer(spec.ex1a, spec.ex1b, 0); break; case 14: play_sound(spec.ex1a); @@ -1784,26 +1777,26 @@ void general_spec(short which_mode,cSpecial cur_node,short cur_spec_type, case 15: check_mess = true; if (spec.ex1a != minmax(0,29,spec.ex1a)) - give_error("Horse univ.out.out of range.","",0); + give_error("Horse out of range.","",0); else univ.party.horses[spec.ex1a].property = (spec.ex2a == 0) ? 1 : 0; break; case 16: check_mess = true; if (spec.ex1a != minmax(0,29,spec.ex1a)) - give_error("Boat univ.out.out of range.","",0); + give_error("Boat out of range.","",0); else univ.party.boats[spec.ex1a].property = (spec.ex2a == 0) ? 1 : 0; break; case 17: check_mess = true; if (spec.ex1a != minmax(0,scenario.num_towns - 1,spec.ex1a)) - give_error("Town univ.out.out of range.","",0); + give_error("Town out of range.","",0); else univ.party.can_find_town[spec.ex1a] = (spec.ex1b == 0) ? 0 : 1; *redraw = true; break; case 18: check_mess = true; if (spec.ex1a != minmax(1,10,spec.ex1a)) - give_error("Event code univ.out.out of range.","",0); + give_error("Event code out of range.","",0); else if (univ.party.key_times[spec.ex1a] == 30000) univ.party.key_times[spec.ex1a] = calc_day(); break; @@ -2784,14 +2777,7 @@ void townmode_spec(short which_mode,cSpecial cur_node,short cur_spec_type, end_split(spec.ex1a); break; case 195: - for (i = 0; i < 30; i++) - if (univ.party.party_event_timers[i] == 0) { - univ.party.party_event_timers[i] = spec.ex1a; - univ.party.node_to_call[i] = spec.ex1b; - univ.party.global_or_town[i] = 1; - i = 30; - } - break; + univ.party.start_timer(spec.ex1a, spec.ex1b, 1); break; } if (check_mess == true) { handle_message(which_mode,cur_spec_type,cur_node.m1,cur_node.m2,a,b); diff --git a/osx/boe.startup.cpp b/osx/boe.startup.cpp index 0e9efb58..175b306c 100644 --- a/osx/boe.startup.cpp +++ b/osx/boe.startup.cpp @@ -123,7 +123,7 @@ void startup_load()//// if(load_party(*file_to_load)){ party_in_memory = true; update_pc_graphics(); - in_startup_mode = strlen(univ.party.scen_name); + in_startup_mode = univ.party.scen_name.length(); } if (!in_startup_mode) { //end_anim(); diff --git a/osx/boe.town.cpp b/osx/boe.town.cpp index 77c4c7a5..ac71d7c7 100644 --- a/osx/boe.town.cpp +++ b/osx/boe.town.cpp @@ -647,9 +647,12 @@ location end_town_mode(short switching_level,location destination) // returns n to_return = univ.party.p_loc; - for (i = 0; i < 30; i++) - if ((univ.party.party_event_timers[i] > 0) && (univ.party.global_or_town[i] == 1)) - univ.party.party_event_timers[i] = 0; + for (i = univ.party.party_event_timers.size() - 1; i >= 0; i++) + if (univ.party.party_event_timers[i].global_or_town == 1) { + cParty::timerIter iter = univ.party.party_event_timers.begin(); + iter += i; + univ.party.party_event_timers.erase(iter); + } } @@ -907,13 +910,13 @@ void create_out_combat_terrain(short type,short num_walls,short spec_code) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 13 - stalagmites 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 14 - cave road (proposed) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,/* 150 */ // 15 - surface road (proposed) - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 16 - crops (proposed) - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 17 - cave fumarole (proposed) - 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, // 18 - surface fumarole (proposed) - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, // (note: fumaroles would have lava.) - 0, 0, 1, 0, 2, 0, 0, 1, 1, 1,/* 200 */ // the numbers in this array are indices into the other arrays - 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, // (ter_base, ground_type, and terrain_odds first index) - 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 16 - hills road (proposed) + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 17 - crops (proposed) + 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, // 18 - cave fumarole (proposed) + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, // 19 - surface fumarole (proposed) + 0, 0, 1, 0, 2, 0, 0, 1, 1, 1,/* 200 */ // (note: fumaroles would have lava.) + 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, // the numbers in this array are indices into the other arrays + 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, // (ter_base, ground_type, and terrain_odds first index) 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 */ diff --git a/osx/misc/fileio.cpp b/osx/misc/fileio.cpp index edac53a6..71f6ac97 100644 --- a/osx/misc/fileio.cpp +++ b/osx/misc/fileio.cpp @@ -1087,7 +1087,7 @@ bool load_party(FSSpec file_to_load){ return false; univ.file = file_spec; }else{ - strcpy(univ.party.scen_name,""); + univ.party.scen_name = ""; } // Compatibility flags diff --git a/osx/misc/mathutil.cpp b/osx/misc/mathutil.cpp index 6ef985f0..5e3f2461 100644 --- a/osx/misc/mathutil.cpp +++ b/osx/misc/mathutil.cpp @@ -13,6 +13,8 @@ short get_ran (short times,short min,short max){ long int store; short i, to_ret = 0; + if(max < min) max = min; + for (i = 1; i < times + 1; i++) { store = rand(); to_ret += min + (store % (max - min + 1));//min + (((store + 32767) * (max - min + 1)) / 65536); diff --git a/osx/outdoors.h b/osx/outdoors.h index eec81f76..8705dd81 100644 --- a/osx/outdoors.h +++ b/osx/outdoors.h @@ -30,7 +30,7 @@ public: bool exists; short direction; cWandering what_monst; - location which_sector,m_loc; + location which_sector,m_loc,home_sector; // home_sector is the sector it was spawned in cCreature& operator = (legacy::outdoor_creature_type old); }; diff --git a/osx/party.cpp b/osx/party.cpp index 3e373bad..b85050f8 100644 --- a/osx/party.cpp +++ b/osx/party.cpp @@ -33,9 +33,9 @@ cParty& cParty::operator = (legacy::party_record_type& old){ for(i = 0; i < 30; i++){ boats[i] = old.boats[i]; horses[i] = old.horses[i]; - party_event_timers[i] = old.party_event_timers[i]; - global_or_town[i] = old.global_or_town[i]; - node_to_call[i] = old.node_to_call[i]; + party_event_timers[i].time = old.party_event_timers[i]; + party_event_timers[i].global_or_town = old.global_or_town[i]; + party_event_timers[i].node_to_call = old.node_to_call[i]; } for(i = 0; i < 4; i++){ creature_save[i] = old.creature_save[i]; @@ -51,13 +51,13 @@ cParty& cParty::operator = (legacy::party_record_type& old){ for(i = 0; i < 256; i++) m_seen[i] = old.m_seen[i]; for(i = 0; i < 50; i++){ - journal_str[i] = old.journal_str[i]; - journal_day[i] = old.journal_day[i]; + journal[i].str_num = old.journal_str[i]; + journal[i].day = old.journal_day[i]; spec_items[i] = old.spec_items[i]; } for(i = 0; i < 140; i++){ - special_notes_str[i][0] = old.special_notes_str[i][0]; - special_notes_str[i][1] = old.special_notes_str[i][1]; + special_notes[i].str_num = old.special_notes_str[i][0]; + special_notes[i].where = old.special_notes_str[i][1]; } for(i = 0; i < 120; i++){ talk_save[i] = old.talk_save[i]; @@ -77,7 +77,7 @@ cParty& cParty::operator = (legacy::party_record_type& old){ total_dam_done = old.total_dam_done; total_xp_gained = old.total_xp_gained; total_dam_taken = old.total_dam_taken; - strcpy(scen_name,old.scen_name); + scen_name = old.scen_name; } __attribute__((deprecated)) @@ -90,8 +90,8 @@ __attribute__((deprecated)) cParty::cConvers& cParty::cConvers::operator = (legacy::talk_save_type old){ personality = old.personality; town_num = old.town_num; - str1 = old.str1; - str2 = old.str2; + str_num1 = old.str1; + str_num2 = old.str2; } __attribute__((deprecated)) @@ -110,3 +110,49 @@ void cParty::add_pc(cPlayer new_pc){ break; } } + +bool cParty::has_talk_save(short who, short str1, short str2){ + for (int j = 0; j < talk_save.size(); j++) + if ((talk_save[j].personality == who) && (talk_save[j].str_num1 == str1) && (talk_save[j].str_num2 == str2)) + return true; + return false; +} + +bool cParty::save_talk(short who, unsigned char where, short str1, short str2){ + if(talk_save.size() == talk_save.max_size()) return false; // This is extremely unlikely + cConvers talk; + talk.personality = who; + talk.town_num = where; + talk.str_num1 = str1; + talk.str_num2 = str2; + // TODO: locate the strings and store them in the record. + talk_save.push_back(talk); + return true; +} + +bool cParty::add_to_journal(short event, short day){ + if(journal.size() == journal.max_size()) return false; // Practically impossible + cJournal entry; + entry.str_num = event; + entry.day = day; + journal.push_back(entry); + return true; +} + +bool cParty::record(short what, short where){ + if(special_notes.size() == special_notes.max_size()) return false; // Never happen + cEncNote note; + note.str_num = what; + note.where = where; + special_notes.push_back(note); + return true; +} + +bool cParty::start_timer(short time, short node, short type){ + if(party_event_timers.size() == party_event_timers.max_size()) return false; // Shouldn't be reached + cTimer t; + t.time = time; + t.global_or_town = type; + t.node_to_call = node; + party_event_timers.push_back(t); +} diff --git a/osx/party.h b/osx/party.h index 22d92f02..cf7ab00e 100644 --- a/osx/party.h +++ b/osx/party.h @@ -6,6 +6,10 @@ * */ +#include +#include +using namespace std; + namespace legacy { struct party_record_type; struct big_tr_type; @@ -21,15 +25,33 @@ public: public: short personality; short town_num; - short str1, str2; + short str_num1, str_num2; + string who_said, in_town, the_str1, the_str2, in_scen; // the actual strings; not always saved, like maps cConvers& operator = (legacy::talk_save_type old); }; + class cJournal { + public: + unsigned short str_num; + unsigned short day; + string the_str, in_scen; // the actual strings; not always saved, like maps + }; + class cEncNote { + public: + unsigned short str_num, where; + string the_str1, the_str2, in_scen; // the actual strings; not always saved, like maps + }; + class cTimer { + public: + short time; + short global_or_town; + short node_to_call; + }; // formerly party_record_type long age; unsigned short gold; unsigned short food; - unsigned char stuff_done[310][10]; + unsigned char stuff_done[310][50]; unsigned char item_taken[200][8]; short light_level; location outdoor_corner; @@ -45,32 +67,46 @@ public: cItemRec magic_store_items[5][10]; short imprisoned_monst[4]; // Soul Crystal? char m_seen[256]; - char journal_str[50]; - short journal_day[50]; - short special_notes_str[140][2]; - cConvers talk_save[120]; + vector journal; + vector special_notes; + vector talk_save; short direction; short at_which_save_slot; char alchemy[20]; bool can_find_town[200]; short key_times[100]; - short party_event_timers[30]; - short global_or_town[30]; - short node_to_call[30]; + vector party_event_timers; + //short global_or_town[30]; + //short node_to_call[30]; char spec_items[50]; char help_received[120]; - short m_killed[300]; // monsters killed per town, I think + short m_killed[200]; // monsters killed per town, I think long long total_m_killed, total_dam_done, total_xp_gained, total_dam_taken; - char scen_name[256]; + string scen_name; cPlayer adven[6]; cItemRec stored_items[3][115]; // formerly stored_items_list_type + string graphicsFile; // the name of the png file holding this party's custom item, pc, and summonable monster graphics + cMonster summons; // an array of monsters which can be summoned by the parties items yet don't originate from this scenario + bool graphicUsed[250]; // whether each custom graphics slot on the party's sheet is actually used; needed to place new custom graphics on the sheet. + unsigned short scen_won, scen_played; // numbers of scenarios won and played respectively by this party + cParty& operator = (legacy::party_record_type& old); void append(legacy::big_tr_type& old); void append(legacy::stored_items_list_type& old,short which_list); void add_pc(legacy::pc_record_type old); void add_pc(cPlayer new_pc); + bool has_talk_save(short who, short str1, short str2); + bool save_talk(short who, unsigned char where, short str1, short str2); + bool add_to_journal(short event, short day); + bool record(short what, short where); + bool start_timer(short time, short node, short type); + + typedef vector::iterator encIter; + typedef vector::iterator journalIter; + typedef vector::iterator talkIter; + typedef vector::iterator timerIter; }; diff --git a/osx/terrain.cpp b/osx/terrain.cpp index 8e6a3961..21d26697 100644 --- a/osx/terrain.cpp +++ b/osx/terrain.cpp @@ -23,7 +23,4 @@ cTerrain& cTerrain::operator = (legacy::terrain_type_type& old){ light_radius = old.light_radius; step_sound = old.step_sound; shortcut_key = old.shortcut_key; - res1 = old.res1; - res2 = old.res2; - res3 = old.res3; } \ No newline at end of file diff --git a/osx/terrain.h b/osx/terrain.h index 6087afab..7e47fadc 100644 --- a/osx/terrain.h +++ b/osx/terrain.h @@ -21,10 +21,13 @@ public: unsigned char block_horse; unsigned char light_radius; unsigned char step_sound; - unsigned char shortcut_key; - unsigned char res1; - unsigned char res2; - unsigned char res3; + unsigned char shortcut_key; // for editor use only + unsigned char obj_num; // ditto (formerly res1) + unsigned char ground_type; // ditto (formerly res2) + unsigned char trim_type; // ditto, mostly (formerly res3) + unsigned short trim_ter; // ditto + unsigned short combat_arena; + location obj_pos; // editor use only cTerrain& operator = (legacy::terrain_type_type& old); }; \ No newline at end of file