Get the edit monster abilities dialog all working and updated (except for editing individual abilities)

Game changes:
- Remove support for playing a sound and displaying strings when a monster is first seen, since these behaviours can easily be obtained by using the special node called in the same context.
Dialog engine changes:
- Support for changing the font size of LEDs
- When setting the page, a stack now applies a default value if the map is missing the required data
- Add utility "addPage" method to stacks
- If reducing the page count means the current page is deleted, a stack now switches to the last page
This commit is contained in:
2015-01-18 17:25:08 -05:00
parent 1441f6bfe9
commit 7084991e55
14 changed files with 157 additions and 80 deletions

View File

@@ -132,8 +132,6 @@ void cMonster::append(legacy::monster_record_type& old){
picture_num = old.picture_num;
if(picture_num == 122) picture_num = 119;
see_spec = -1;
see_str1 = see_str2 = -1;
see_sound = 0;
ambient_sound = 0;
}
@@ -371,8 +369,6 @@ void cMonster::addAbil(eMonstAbilTemplate what, int param) {
cMonster::cMonster(){
magic_res = poison_res = fire_res = cold_res = 100;
// TODO: Fill in
see_str1 = -1;
see_str2 = -1;
see_spec = -1;
}
@@ -792,17 +788,14 @@ void cMonster::writeTo(std::ostream& file) const {
}
void cMonster::readFrom(std::istream& file) {
// On-see event is not exported, so make sure the fields are not filled with garbage data
see_sound = 0;
see_str1 = -1;
see_str2 = -1;
// On-see event is not exported, so make sure the field ise not filled with garbage data
see_spec = -1;
std::istringstream bin;
std::string cur;
getline(file, cur, '\f');
bin.str(cur);
while(bin) {
int temp1, temp2, temp3;
int temp1, temp2;
getline(bin, cur);
std::istringstream line(cur);
line >> cur;

View File

@@ -140,8 +140,7 @@ public:
unsigned char summon_type;
pic_num_t default_facial_pic;
pic_num_t picture_num;
str_num_t see_str1, see_str2;
snd_num_t see_sound, ambient_sound; // ambient_sound has a chance of being played every move
snd_num_t ambient_sound; // has a chance of being played every move
spec_num_t see_spec;
public: