- Merged two classes (cPopulation::cCreature and cTown::cCreature)

- Changes some C-strings to STL-strings
- Fixed the problem where the spiderweb logo would not fully appear if ShowStartupSplash is disabled

git-svn-id: http://openexile.googlecode.com/svn/trunk@54 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-05-07 02:50:16 +00:00
parent 68dcf3cdef
commit 4dc75d51c0
46 changed files with 932 additions and 831 deletions

View File

@@ -14,7 +14,7 @@ cMonster& cMonster::operator = (legacy::monster_record_type& old){
int i;
m_num = old.m_num;
level = old.level;
strcpy((char*)m_name,(char*)old.m_name);
//m_name = old.m_name;
health = old.health;
m_health = old.m_health;
mp = old.mp;
@@ -54,3 +54,65 @@ cMonster& cMonster::operator = (legacy::monster_record_type& old){
picture_num = old.picture_num;
return *this;
}
cCreature::cCreature(){
// short personality;
// short special_on_kill,facial_pic;
//{-1,-1,-1}
id = number = active = attitude = start_attitude = 0;
start_loc.x = start_loc.y = cur_loc.x = cur_loc.y = targ_loc.x = targ_loc.y = 80;
mobility = 1;
time_flag = summoned = extra1 = extra2 = 0;
spec1 = spec2 = spec_enc_code = time_code = monster_time = 0;
personality = special_on_kill = facial_pic = -1;
target = 6;
}
cCreature& cCreature::operator = (legacy::creature_start_type old){
number = old.number;
start_attitude = old.start_attitude;
start_loc.x = old.start_loc.x;
start_loc.y = old.start_loc.y;
mobility = old.mobile;
time_flag = old.time_flag;
extra1 = old.extra1;
extra2 = old.extra2;
spec1 = old.spec1;
spec2 = old.spec2;
spec_enc_code = old.spec_enc_code;
time_code = old.time_code;
monster_time = old.monster_time;
personality = old.personality;
special_on_kill = old.special_on_kill;
facial_pic = old.facial_pic;
return *this;
}
__attribute__((deprecated))
cCreature& cCreature::operator = (legacy::creature_data_type old){
active = old.active;
attitude = old.attitude;
number = old.number;
cur_loc.x = old.m_loc.x;
cur_loc.y = old.m_loc.y;
m_d = old.m_d;
mobility = old.mobile;
summoned = old.summoned;
number = old.monst_start.number;
start_attitude = old.monst_start.start_attitude;
start_loc.x = old.monst_start.start_loc.x;
start_loc.y = old.monst_start.start_loc.y;
mobility = old.monst_start.mobile;
time_flag = old.monst_start.time_flag;
extra1 = old.monst_start.extra1;
extra2 = old.monst_start.extra2;
spec1 = old.monst_start.spec1;
spec2 = old.monst_start.spec2;
spec_enc_code = old.monst_start.spec_enc_code;
time_code = old.monst_start.time_code;
monster_time = old.monst_start.monster_time;
personality = old.monst_start.personality;
special_on_kill = old.monst_start.special_on_kill;
facial_pic = old.monst_start.facial_pic;
return *this;
}