- added a system to display one or two strings and/or call a special the first time the party sees a particular type of monster
- added ambient sound, both outdoor ambient sound and monster vocalizing ambient sound (eg cat meowing when in sight) - fixed an inconsistency whereby two sounds were swapped relative to their original Mac versions - added (but haven't yet used much) a few more typedefs for clarity git-svn-id: http://openexile.googlecode.com/svn/trunk@86 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -44,6 +44,23 @@
|
||||
2BF04DE90BF7A6FE006C0831 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BF04DE80BF7A6FE006C0831 /* Carbon.framework */; };
|
||||
9122832E0FCF6C7200B21642 /* busywork.exs in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9122832D0FCF6C7200B21642 /* busywork.exs */; };
|
||||
912283C90FD0E16C00B21642 /* undo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 912283C80FD0E16C00B21642 /* undo.cpp */; };
|
||||
912286F80FD330E500B21642 /* dlogutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBADA0FB91D2A001E34EA /* dlogutil.cpp */; };
|
||||
912286F90FD330EA00B21642 /* button.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA890FB8EC57001E34EA /* button.cpp */; };
|
||||
912286FA0FD330EA00B21642 /* control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA3C0FB8DA8E001E34EA /* control.cpp */; };
|
||||
912286FB0FD330EB00B21642 /* dialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA180FB8BECA001E34EA /* dialog.cpp */; };
|
||||
912286FC0FD330EB00B21642 /* dlogutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBADA0FB91D2A001E34EA /* dlogutil.cpp */; };
|
||||
912286FD0FD330EC00B21642 /* field.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBAB50FB91A26001E34EA /* field.cpp */; };
|
||||
912286FE0FD330EC00B21642 /* message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBAB90FB91ADB001E34EA /* message.cpp */; };
|
||||
912286FF0FD330ED00B21642 /* pict.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBAA90FB8F733001E34EA /* pict.cpp */; };
|
||||
912287000FD330F100B21642 /* button.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA890FB8EC57001E34EA /* button.cpp */; };
|
||||
912287010FD330F100B21642 /* control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA3C0FB8DA8E001E34EA /* control.cpp */; };
|
||||
912287020FD330F200B21642 /* dialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBA180FB8BECA001E34EA /* dialog.cpp */; };
|
||||
912287030FD330F200B21642 /* dlogutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBADA0FB91D2A001E34EA /* dlogutil.cpp */; };
|
||||
912287040FD330F300B21642 /* field.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBAB50FB91A26001E34EA /* field.cpp */; };
|
||||
912287050FD330F300B21642 /* message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBAB90FB91ADB001E34EA /* message.cpp */; };
|
||||
912287060FD330F300B21642 /* pict.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910BBAA90FB8F733001E34EA /* pict.cpp */; };
|
||||
912287280FD3358A00B21642 /* libticpp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9141DAB50FCB94900047D3A3 /* libticpp.dylib */; };
|
||||
912287290FD3359300B21642 /* libticpp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9141DAB50FCB94900047D3A3 /* libticpp.dylib */; };
|
||||
9127903E0F9B7F49007B0D52 /* boe.actions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BF04ACF0BF51923006C0831 /* boe.actions.cpp */; };
|
||||
9127903F0F9B7F50007B0D52 /* boe.graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BF04AD30BF51923006C0831 /* boe.graphics.cpp */; };
|
||||
912793640F9C107B007B0D52 /* viewdlog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91B3EEF80F969BA700BF5B67 /* viewdlog.cpp */; };
|
||||
@@ -188,6 +205,20 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
9122870E0FD3339F00B21642 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2BF04AA10BF51845006C0831 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 9141DAB40FCB94900047D3A3 /* ticpp */;
|
||||
remoteInfo = ticpp;
|
||||
};
|
||||
912287110FD333AE00B21642 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2BF04AA10BF51845006C0831 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 9141DAB40FCB94900047D3A3 /* ticpp */;
|
||||
remoteInfo = ticpp;
|
||||
};
|
||||
9141DABB0FCB95030047D3A3 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2BF04AA10BF51845006C0831 /* Project object */;
|
||||
@@ -452,6 +483,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
912287290FD3359300B21642 /* libticpp.dylib in Frameworks */,
|
||||
2BF04DE90BF7A6FE006C0831 /* Carbon.framework in Frameworks */,
|
||||
913D02690FA0EB0300184C18 /* QuickTime.framework in Frameworks */,
|
||||
);
|
||||
@@ -477,6 +509,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
912287280FD3358A00B21642 /* libticpp.dylib in Frameworks */,
|
||||
91B3EF1E0F969C4B00BF5B67 /* Carbon.framework in Frameworks */,
|
||||
913D026B0FA0EB0500184C18 /* QuickTime.framework in Frameworks */,
|
||||
);
|
||||
@@ -929,6 +962,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
912287120FD333AE00B21642 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Blades of Exile";
|
||||
productName = "Blades of Exile";
|
||||
@@ -981,6 +1015,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
9122870F0FD3339F00B21642 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Blades of Exile Character Editor";
|
||||
productName = "Blades of Exile Character Editor";
|
||||
@@ -1126,6 +1161,13 @@
|
||||
91AC60A80FA26C1B00EEAE67 /* tmpltown.cpp in Sources */,
|
||||
91AC61C60FA2729900EEAE67 /* universe.cpp in Sources */,
|
||||
91AC620B0FA2853700EEAE67 /* creatlist.cpp in Sources */,
|
||||
912287000FD330F100B21642 /* button.cpp in Sources */,
|
||||
912287010FD330F100B21642 /* control.cpp in Sources */,
|
||||
912287020FD330F200B21642 /* dialog.cpp in Sources */,
|
||||
912287030FD330F200B21642 /* dlogutil.cpp in Sources */,
|
||||
912287040FD330F300B21642 /* field.cpp in Sources */,
|
||||
912287050FD330F300B21642 /* message.cpp in Sources */,
|
||||
912287060FD330F300B21642 /* pict.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1189,6 +1231,13 @@
|
||||
91AC60AA0FA26C1B00EEAE67 /* tmpltown.cpp in Sources */,
|
||||
91AC620D0FA2853700EEAE67 /* creatlist.cpp in Sources */,
|
||||
91AC65AD0FA34AC600EEAE67 /* universe.cpp in Sources */,
|
||||
912286F90FD330EA00B21642 /* button.cpp in Sources */,
|
||||
912286FA0FD330EA00B21642 /* control.cpp in Sources */,
|
||||
912286FB0FD330EB00B21642 /* dialog.cpp in Sources */,
|
||||
912286FC0FD330EB00B21642 /* dlogutil.cpp in Sources */,
|
||||
912286FD0FD330EC00B21642 /* field.cpp in Sources */,
|
||||
912286FE0FD330EC00B21642 /* message.cpp in Sources */,
|
||||
912286FF0FD330ED00B21642 /* pict.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1237,12 +1286,23 @@
|
||||
91C1FCAA0FCB6F7200EBAA65 /* message.cpp in Sources */,
|
||||
91C1FCAB0FCB6F7300EBAA65 /* pict.cpp in Sources */,
|
||||
912283C90FD0E16C00B21642 /* undo.cpp in Sources */,
|
||||
912286F80FD330E500B21642 /* dlogutil.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
9122870F0FD3339F00B21642 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 9141DAB40FCB94900047D3A3 /* ticpp */;
|
||||
targetProxy = 9122870E0FD3339F00B21642 /* PBXContainerItemProxy */;
|
||||
};
|
||||
912287120FD333AE00B21642 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 9141DAB40FCB94900047D3A3 /* ticpp */;
|
||||
targetProxy = 912287110FD333AE00B21642 /* PBXContainerItemProxy */;
|
||||
};
|
||||
9141DABC0FCB95030047D3A3 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 9141DAB40FCB94900047D3A3 /* ticpp */;
|
||||
@@ -1366,6 +1426,10 @@
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
|
||||
INFOPLIST_FILE = "Blades of Exile-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Carbon,
|
||||
@@ -1395,6 +1459,10 @@
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
|
||||
INFOPLIST_FILE = "Blades of Exile-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Carbon,
|
||||
@@ -1515,6 +1583,10 @@
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
|
||||
INFOPLIST_FILE = "Blades of Exile Char Editor/Blades of Exile Character Editor-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Carbon,
|
||||
@@ -1546,6 +1618,10 @@
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
|
||||
INFOPLIST_FILE = "Blades of Exile Char Editor/Blades of Exile Character Editor-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Carbon,
|
||||
|
||||
@@ -1312,6 +1312,7 @@ bool handle_action(EventRecord event)
|
||||
// Handle non-PC stuff (like monsters) if the party actually did something
|
||||
if (did_something == true) {
|
||||
draw_map(modeless_dialogs[5],5);
|
||||
play_ambient_sound();
|
||||
|
||||
if ((overall_mode >= MODE_COMBAT) && (overall_mode < MODE_TALKING)) {
|
||||
if (no_pcs_left() == true) {
|
||||
|
||||
@@ -1188,7 +1188,7 @@ void do_combat_cast(location target)////
|
||||
case 7: // monster info
|
||||
store_m_type = -1;
|
||||
play_sound(52);
|
||||
univ.party.m_seen[cur_monst->number] = true;
|
||||
univ.party.m_noted[cur_monst->number] = true;
|
||||
adjust_monst_menu();
|
||||
display_monst(0,cur_monst,0);
|
||||
break;
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
#include "boe.graphics.h"
|
||||
#include "boe.infodlg.h"
|
||||
#include "boe.monster.h"
|
||||
#include "boe.specials.h"
|
||||
#include "dlgtool.h"
|
||||
//#include "soundtool.h"
|
||||
#include "soundtool.h"
|
||||
#include "graphtool.h"
|
||||
#include "mathutil.h"
|
||||
#include "dlgutil.h"
|
||||
@@ -77,7 +78,7 @@ extern GWorldPtr spec_scen_g;
|
||||
|
||||
Rect boat_rects[4] = {{0,0,36,28}, {0,28,36,56},{0,56,36,84},{0,84,36,112}};
|
||||
bool gave_no_g_error = false;
|
||||
|
||||
eAmbientSound ambient_sound;
|
||||
//unsigned char m_pic_index[200] = {////
|
||||
//1,2,3,4,5,6,7,8,9,10,
|
||||
//11,12,13,14,15,16,17,18,19,20,
|
||||
@@ -368,8 +369,21 @@ void draw_monsters() ////
|
||||
}
|
||||
}
|
||||
|
||||
void play_see_monster_str(unsigned short m) // TODO: Seems like this would be worth reviving
|
||||
{}
|
||||
void play_see_monster_str(unsigned short m){
|
||||
short str1, str2, pic, type, snd, spec, s1 = 0, s2 = 0, s3 = 0;
|
||||
str1 = scenario.scen_monsters[m].see_str1;
|
||||
str2 = scenario.scen_monsters[m].see_str2;
|
||||
pic = scenario.scen_monsters[m].picture_num;
|
||||
type = get_monst_pictype(m);
|
||||
snd = scenario.scen_monsters[m].see_sound;
|
||||
spec = scenario.scen_monsters[m].see_spec;
|
||||
// First display strings, if any
|
||||
display_strings(str1 ? scenario.monst_strs[str1] : NULL, str2 ? scenario.monst_strs[str2] : NULL, "", snd, pic,type, 0);
|
||||
// Then run the special, if any
|
||||
if(spec > -1)
|
||||
run_special(18, 0, spec, loc(0,0), &s1, &s2, &s3);
|
||||
// TODO: may need to check s3 to determine if redraw is needed
|
||||
}
|
||||
|
||||
void draw_pcs(location center,short mode)
|
||||
//short mode; // 0 - put pcs in gworld 1 - only rectangle around active pc
|
||||
@@ -1014,18 +1028,38 @@ char get_fluid_trim(location where,ter_num_t ter_type)
|
||||
return to_return;
|
||||
}
|
||||
|
||||
// Sees if party has seen a monster of this sort, updates menu and gives
|
||||
// special messages as necessary
|
||||
void check_if_monst_seen(unsigned short m_num)
|
||||
{
|
||||
// this rule has been changed
|
||||
return; // TODO: Bring this back?
|
||||
if (univ.party.m_seen[m_num] == 0) {
|
||||
univ.party.m_seen[m_num] = 1;
|
||||
switch (m_num) {
|
||||
|
||||
// Sees if party has seen a monster of this sort, gives special messages as necessary
|
||||
void check_if_monst_seen(unsigned short m_num) {
|
||||
// Give special messages if necessary
|
||||
if (!univ.party.m_seen[m_num]) {
|
||||
univ.party.m_seen[m_num] = true;
|
||||
play_see_monster_str(m_num);
|
||||
}
|
||||
adjust_monst_menu();
|
||||
// Make the monster vocalize if applicable
|
||||
snd_num_t sound = scenario.scen_monsters[m_num].ambient_sound;
|
||||
if(get_ran(1,1,100) < 10) play_sound(-sound);
|
||||
}
|
||||
|
||||
void play_ambient_sound(){ // TODO: Maybe add a system for in-town ambient sounds
|
||||
static const short drip[2] = {78,79}, bird[3] = {76,77,91};
|
||||
if(overall_mode != MODE_OUTDOORS) return; // ambient sounds are outdoors only at the moment
|
||||
if(get_ran(1,1,100) > 10) return; // 10% chance per move of playing a sound
|
||||
short sound_to_play;
|
||||
switch(ambient_sound){
|
||||
case AMBIENT_DRIP:
|
||||
sound_to_play = get_ran(1,0,1);
|
||||
play_sound(-drip[sound_to_play]);
|
||||
break;
|
||||
case AMBIENT_BIRD:
|
||||
sound_to_play = get_ran(1,0,2);
|
||||
play_sound(-bird[sound_to_play]);
|
||||
break;
|
||||
case AMBIENT_CUSTOM:
|
||||
sound_to_play = univ.out_sound;
|
||||
play_sound(-sound_to_play);
|
||||
break;
|
||||
case AMBIENT_NONE:
|
||||
break; // obviously, do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1042,7 +1076,7 @@ void adjust_monst_menu()
|
||||
on_monst_menu[i] = -1;
|
||||
}
|
||||
for (i = 1; i < 256; i++)
|
||||
if ((i == 1) || (univ.party.m_seen[i] > 0)) {
|
||||
if ((i == 1) || (univ.party.m_noted[i] > 0)) {
|
||||
on_monst_menu[monst_pos] = i;
|
||||
monst_pos++;
|
||||
}
|
||||
|
||||
@@ -25,3 +25,4 @@ bool is_ground(ter_num_t ter_type);
|
||||
char get_fluid_trim(location where,ter_num_t ter_type);
|
||||
void check_if_monst_seen(unsigned short m_num);
|
||||
void adjust_monst_menu();
|
||||
void play_ambient_sound();
|
||||
|
||||
@@ -232,7 +232,7 @@ void init_party(short mode)
|
||||
for (i = 0; i < 4; i++)
|
||||
univ.party.imprisoned_monst[i] = 0;
|
||||
for (i = 0; i < 256; i++)
|
||||
univ.party.m_seen[i] = 0;
|
||||
univ.party.m_seen[i] = univ.party.m_noted[i] = 0;
|
||||
// for (i = 0; i < 50; i++)
|
||||
// univ.party.journal_str[i] = -1;
|
||||
// for (i = 0; i < 140; i++)
|
||||
@@ -376,7 +376,7 @@ void init_party_scen_data()
|
||||
for (i = 0; i < 4; i++)
|
||||
univ.party.imprisoned_monst[i] = 0;
|
||||
for (i = 0; i < 256; i++)
|
||||
univ.party.m_seen[i] = 0;
|
||||
univ.party.m_seen[i] = univ.party.m_noted[i] = 0;
|
||||
// for (i = 0; i < 50; i++)
|
||||
// univ.party.journal_str[i] = -1;
|
||||
// for (i = 0; i < 140; i++)
|
||||
@@ -2019,7 +2019,7 @@ void cast_town_spell(location where) ////
|
||||
targ = monst_there(where);
|
||||
if (targ < univ.town->max_monst()) {
|
||||
if (town_spell == 7) {
|
||||
univ.party.m_seen[univ.town.monst[targ].number] = true;
|
||||
univ.party.m_noted[univ.town.monst[targ].number] = true;
|
||||
adjust_monst_menu();
|
||||
display_monst(0,&univ.town.monst[targ],0);
|
||||
}
|
||||
|
||||
@@ -1671,7 +1671,7 @@ void special_increase_age()
|
||||
// 0 - out moving (a - 1 if blocked)
|
||||
// 1 - town moving (a - 1 if blocked)
|
||||
// 2 - combat moving (a - 1 if blocked)
|
||||
// 3 - out looking (a - 1 if don't get items inside) NOT USED!!!
|
||||
// 3 - out looking (a - 1 if don't get items inside) TODO: NOT USED!!!
|
||||
// 4 - town looking (a - 1 if don't get items inside)
|
||||
// 5 - entering town
|
||||
// 6 - leaving town
|
||||
@@ -1684,8 +1684,9 @@ void special_increase_age()
|
||||
// 13 - encountering outdoor enc (a - 1 if no fight)
|
||||
// 14 - winning outdoor enc
|
||||
// 15 - fleeing outdoor enc
|
||||
// 16 - ritual of sanct
|
||||
// 16 - ritual of sanct TODO: This will become "target space", hopefully
|
||||
// 17 - using space
|
||||
// 18 - seeing monster TODO: This is currently unused
|
||||
// which_type - 0 - scen 1 - out 2 - town
|
||||
// start spec - the number of the first spec to call
|
||||
// a,b - 2 values that can be returned
|
||||
|
||||
@@ -8,13 +8,22 @@
|
||||
*
|
||||
*/
|
||||
|
||||
typedef unsigned short str_num_t;
|
||||
|
||||
//class sbyte {
|
||||
// signed char c;
|
||||
//public:
|
||||
// operator int() {return c;}
|
||||
// sbyte(signed char k) : c(k) {}
|
||||
//}
|
||||
|
||||
#include "location.h"
|
||||
#include "terrain.h"
|
||||
#include "vehicle.h"
|
||||
#include "monster.h"
|
||||
#include "special.h"
|
||||
#include "talking.h"
|
||||
#include "item.h"
|
||||
#include "special.h"
|
||||
#include "monster.h"
|
||||
#include "talking.h"
|
||||
#include "town.h"
|
||||
#include "regtown.h"
|
||||
#include "tmpltown.h"
|
||||
|
||||
@@ -187,6 +187,8 @@ enum eItemAbil {
|
||||
ITEM_MISSILE_HEAL_TARGET = 176,
|
||||
};
|
||||
|
||||
typedef signed short item_num_t;
|
||||
|
||||
class cItemRec {
|
||||
public:
|
||||
eItemType variety;
|
||||
|
||||
@@ -164,19 +164,38 @@ public:
|
||||
m_num_t m_num; // TODO: This probably shouldn't be necessary. Consider why it is, and determine if it can be removed
|
||||
unsigned char level;
|
||||
std::string m_name;
|
||||
short health,m_health,mp,max_mp; // TODO: Move health and mp to cCreature
|
||||
unsigned char armor,skill;
|
||||
short health; // TODO: Move health, mp and max_mp to cCreature
|
||||
short m_health;
|
||||
short mp;
|
||||
short max_mp;
|
||||
unsigned char armor;
|
||||
unsigned char skill;
|
||||
cAttack a[3];
|
||||
unsigned char a1_type,a23_type; // TODO: Delete in favour of type field of cAttack
|
||||
eMonsterType m_type;
|
||||
unsigned char speed,ap,mu,cl,breath,breath_type,treasure,spec_skill,poison; // TODO: Move ap to cCreature
|
||||
unsigned char speed;
|
||||
unsigned char ap; // TODO: Move ap to cCreature
|
||||
unsigned char mu;
|
||||
unsigned char cl;
|
||||
unsigned char breath;
|
||||
unsigned char breath_type;
|
||||
unsigned char treasure;
|
||||
unsigned char spec_skill;
|
||||
unsigned char poison;
|
||||
short morale,m_morale; // TODO: Move to cCreature (since these are calculated in-game based on the level)
|
||||
short corpse_item,corpse_item_chance;
|
||||
item_num_t corpse_item;
|
||||
short corpse_item_chance;
|
||||
short status[15]; // TODO: Move to cCreature
|
||||
unsigned char direction,immunities,x_width,y_width,radiate_1; // TODO: Move direction to cCreature
|
||||
unsigned char direction; // TODO: Move direction to cCreature
|
||||
unsigned char immunities;
|
||||
unsigned char x_width,y_width;
|
||||
unsigned char radiate_1;
|
||||
unsigned short radiate_2; // I THINK this is the extra field for the second ability
|
||||
unsigned char default_attitude,summon_type,default_facial_pic,res1,res2,res3;
|
||||
short picture_num;
|
||||
str_num_t see_str1, see_str2;
|
||||
snd_num_t see_sound, ambient_sound; // ambient_sound has a
|
||||
spec_num_t see_spec;
|
||||
|
||||
cMonster& operator = (legacy::monster_record_type& old);
|
||||
void writeTo(std::ostream& file, std::string prefix);
|
||||
|
||||
@@ -60,7 +60,7 @@ cParty& cParty::operator = (legacy::party_record_type& old){
|
||||
magic_store_items[j][i] = old.magic_store_items[j][i];
|
||||
}
|
||||
for(i = 0; i < 256; i++)
|
||||
m_seen[i] = old.m_seen[i];
|
||||
m_noted[i] = old.m_seen[i];
|
||||
journal.reserve(50);
|
||||
for(i = 0; i < 50; i++){
|
||||
cJournal j;
|
||||
@@ -241,8 +241,11 @@ void cParty::writeTo(std::ostream& file){
|
||||
magic_store_items[i][j].writeTo(file, sout.str());
|
||||
}
|
||||
for(int i = 0; i < 256; i++)
|
||||
if(m_seen[i])
|
||||
if(m_noted[i])
|
||||
file << "ROSTER " << i << std::endl;
|
||||
for(int i = 0; i < 256; i++)
|
||||
if(m_seen[i])
|
||||
file << "SEEN " << i << std::endl;
|
||||
for(int i = 0; i < 10; i++)
|
||||
if(out_c[i].exists){
|
||||
file << "ENCOUNTER " << i << " DIRECTION " << out_c[i].direction << std::endl;
|
||||
@@ -364,6 +367,10 @@ void cParty::readFrom(std::istream& file){
|
||||
sin >> i >> j >> cur;
|
||||
magic_store_items[i][j].readAttrFrom(cur,sin);
|
||||
}else if(cur == "ROSTER"){
|
||||
int i;
|
||||
sin >> i;
|
||||
m_noted[i] = true;
|
||||
}else if(cur == "SEEN"){
|
||||
int i;
|
||||
sin >> i;
|
||||
m_seen[i] = true;
|
||||
|
||||
@@ -70,7 +70,8 @@ public:
|
||||
cOutdoors::cCreature out_c[10];
|
||||
cItemRec magic_store_items[5][10];
|
||||
short imprisoned_monst[4]; // Soul Crystal?
|
||||
char m_seen[256];
|
||||
char m_noted[256]; // has the monster been scried?
|
||||
char m_seen[256]; // has the monster ever been seen? (this used to have the above meaning)
|
||||
std::vector<cJournal> journal;
|
||||
std::vector<cEncNote> special_notes;
|
||||
std::vector<cConvers> talk_save;
|
||||
|
||||
@@ -87,6 +87,7 @@ public:
|
||||
char spec_item_names[50][256];
|
||||
char spec_item_strs[50][256];
|
||||
char spec_strs[100][256];
|
||||
char monst_strs[100][256];
|
||||
FSSpec scen_file; // transient
|
||||
cOutdoors* outdoors;
|
||||
cTown* towns;
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
namespace legacy { struct special_node_type; };
|
||||
|
||||
typedef signed short spec_num_t;
|
||||
|
||||
class cSpecial {
|
||||
public:
|
||||
short type;
|
||||
|
||||
@@ -128,6 +128,13 @@ public:
|
||||
void readFrom(std::istream& file);
|
||||
};
|
||||
|
||||
enum eAmbientSound {
|
||||
AMBIENT_NONE,
|
||||
AMBIENT_DRIP,
|
||||
AMBIENT_BIRD,
|
||||
AMBIENT_CUSTOM,
|
||||
};
|
||||
|
||||
class cUniverse{
|
||||
public:
|
||||
cParty party;
|
||||
@@ -135,6 +142,7 @@ public:
|
||||
char town_maps[200][8][64]; // formerly stored_town_maps_type
|
||||
cCurOut out;
|
||||
char out_maps[100][6][48]; // formerly stored_outdoor_maps_type
|
||||
snd_num_t out_sound;
|
||||
FSSpec file;
|
||||
|
||||
void append(legacy::stored_town_maps_type& old);
|
||||
|
||||
@@ -11,6 +11,7 @@ struct m_pic_index_t {
|
||||
unsigned char i, x, y;
|
||||
};
|
||||
|
||||
typedef unsigned short pic_num_t;
|
||||
void init_graph_tool(void (*redraw_callback)(),Point* p);
|
||||
GWorldPtr load_pict(int picture_to_get);
|
||||
GWorldPtr load_bmp(unsigned char *data, unsigned long length);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#define NUM_SOUNDS 99
|
||||
|
||||
typedef unsigned short snd_num_t;
|
||||
void init_snd_tool();
|
||||
void play_sound(short which, short how_many_times = 1);
|
||||
void one_sound(short which);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user