- Implemented new-style frill drawing using masking (untested)
- Re-implemented walkway drawing in the same way - Tried to fix an STL error - A few other thing, maybe? git-svn-id: http://openexile.googlecode.com/svn/trunk@60 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "boe.consts.h"
|
||||
#include "oldstructs.h"
|
||||
@@ -310,7 +316,7 @@ cItemRec& cItemRec::operator = (legacy::item_record_type& old){
|
||||
special_class = old.special_class;
|
||||
item_loc.x = old.item_loc.x;
|
||||
item_loc.y = old.item_loc.y;
|
||||
full_name = old.full_name;
|
||||
full_name = string(old.full_name);
|
||||
name = old.name;
|
||||
treas_class = old.treas_class;
|
||||
item_properties = old.item_properties;
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -107,7 +107,8 @@ enum eMonsterType {
|
||||
|
||||
class cMonster {
|
||||
public:
|
||||
unsigned char m_num,level;
|
||||
unsigned short m_num;
|
||||
unsigned char level;
|
||||
string m_name;
|
||||
short health,m_health,mp,max_mp;
|
||||
unsigned char armor,skill;
|
||||
@@ -118,7 +119,8 @@ public:
|
||||
short morale,m_morale;
|
||||
short corpse_item,corpse_item_chance;
|
||||
short status[15];
|
||||
unsigned char direction,immunities,x_width,y_width,radiate_1,radiate_2;
|
||||
unsigned char direction,immunities,x_width,y_width,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;
|
||||
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -18,8 +18,8 @@ class cOutdoors {
|
||||
public:
|
||||
class cWandering { // formerly out_wandering_type
|
||||
public:
|
||||
unsigned char monst[7];
|
||||
unsigned char friendly[3];
|
||||
unsigned short monst[7];
|
||||
unsigned short friendly[3];
|
||||
short spec_on_meet,spec_on_win,spec_on_flee,cant_flee;
|
||||
short end_spec1,end_spec2;
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
};
|
||||
unsigned short terrain[48][48];
|
||||
location special_locs[18];
|
||||
unsigned char special_id[18];
|
||||
unsigned short special_id[18];
|
||||
location exit_locs[8];
|
||||
char exit_dests[8];
|
||||
location sign_locs[8];
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
@@ -122,6 +128,6 @@ char(& cScenario::scen_strs(short i))[256]{
|
||||
if(i % 2 == 0) return spec_item_names[(i - 60) / 2];
|
||||
else return spec_item_strs[(i - 60) / 2];
|
||||
}
|
||||
if(i >= 160 && i < 260) return spec_strs[i];
|
||||
if(i >= 160 && i < 260) return spec_strs[i - 100];
|
||||
return journal_strs[6]; // random unused slot
|
||||
}
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
#include "boe.consts.h" // TODO: Put these constants in a global file
|
||||
|
@@ -102,11 +102,11 @@ public:
|
||||
string name;
|
||||
short picture;
|
||||
unsigned char blockage;
|
||||
unsigned char flag1;
|
||||
unsigned char flag2;
|
||||
unsigned char flag3; // new additional flag for special properties
|
||||
unsigned short flag1;
|
||||
unsigned short flag2;
|
||||
unsigned short flag3; // new additional flag for special properties
|
||||
eTerSpec special;
|
||||
unsigned char trans_to_what;
|
||||
unsigned short trans_to_what;
|
||||
unsigned char fly_over;
|
||||
unsigned char boat_over;
|
||||
unsigned char block_horse;
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
|
||||
unsigned short& cBigTemplTown::terrain(size_t x, size_t y){
|
||||
|
@@ -19,7 +19,7 @@ public:
|
||||
class cTerRect { // formerly city_ter_rect_type
|
||||
public:
|
||||
rectangle rect;
|
||||
unsigned char ter_type;
|
||||
unsigned short ter_type;
|
||||
unsigned char hollow;
|
||||
};
|
||||
cCityBlock blocks[15];
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
// };
|
||||
class cWandering { // formerly wandering_type
|
||||
public:
|
||||
unsigned char monst[4];
|
||||
unsigned short monst[4];
|
||||
|
||||
cWandering& operator = (legacy::wandering_type old);
|
||||
};
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
cWandering wandering[4];
|
||||
location wandering_locs[4];
|
||||
location special_locs[50];
|
||||
unsigned char spec_id[50];
|
||||
unsigned short spec_id[50];
|
||||
location sign_locs[15];
|
||||
short lighting_type;
|
||||
location start_locs[4];
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
#include "mathutil.h"
|
||||
@@ -238,6 +244,11 @@ bool cCurTown::is_rubble(char x, char y) const{
|
||||
return fields[x][y] & 8388608L;
|
||||
}
|
||||
|
||||
//bool cCurTown::is_trim(char x, char y, char t){
|
||||
// unsigned char bit = 1 << t;
|
||||
// return trim[x][y] & bit;
|
||||
//}
|
||||
|
||||
bool cCurTown::set_explored(char x, char y, bool b){
|
||||
if(x > record->max_dim() || y > record->max_dim()) return false;
|
||||
if(b) fields[x][y] |= 1L;
|
||||
@@ -608,6 +619,35 @@ bool cCurTown::set_rubble(char x, char y, bool b){
|
||||
return true;
|
||||
}
|
||||
|
||||
//bool cCurTown::set_trim(char x, char y, char t, bool b){
|
||||
// unsigned char bit = 1 << t;
|
||||
// if(b){
|
||||
// switch(t){
|
||||
// case 0:
|
||||
// set_trim(x,y,1,false);
|
||||
// break;
|
||||
// case 1:
|
||||
// if(!is_trim(x,y,3)) break;
|
||||
// set_trim(x,y,3,false);
|
||||
// set_trim(x,y,5,false);
|
||||
// break;
|
||||
// case 2:
|
||||
// set_trim(x,y,1,false);
|
||||
// set_trim(x,y,3,false);
|
||||
// break;
|
||||
// case 3:
|
||||
// if(!is_trim(x,y,1)) break;
|
||||
// set_trim(x,y,3,false);
|
||||
// set_trim(x,y,5,false);
|
||||
// break;
|
||||
// case 6:
|
||||
// set_trim(x,y,5,false);
|
||||
// break;
|
||||
// }
|
||||
// trim[x][y] |= bit;
|
||||
// }else trim[x][y] &= ~bit;
|
||||
//}
|
||||
|
||||
unsigned char cCurTown::explored(char x,char y) const{
|
||||
if(x > record->max_dim() || y > record->max_dim()) return 0;
|
||||
return fields[x][y] & 0x000000FF;
|
||||
|
@@ -34,6 +34,7 @@ public:
|
||||
//unsigned short template_terrain[64][64];
|
||||
unsigned long fields[64][64];
|
||||
bool special_spot[64][64];
|
||||
// unsigned char trim[64][64]; // transient
|
||||
|
||||
void append(legacy::current_town_type& old,short which_size);
|
||||
void append(legacy::town_item_list& old);
|
||||
@@ -74,6 +75,7 @@ public:
|
||||
bool is_ash(char x, char y) const;
|
||||
bool is_bones(char x, char y) const;
|
||||
bool is_rubble(char x, char y) const;
|
||||
// bool is_trim(char x, char y, char t) const;
|
||||
bool set_explored(char x, char y, bool b);
|
||||
bool set_force_wall(char x, char y, bool b);
|
||||
bool set_fire_wall(char x, char y, bool b);
|
||||
@@ -99,6 +101,7 @@ public:
|
||||
bool set_ash(char x, char y, bool b);
|
||||
bool set_bones(char x, char y, bool b);
|
||||
bool set_rubble(char x, char y, bool b);
|
||||
// bool set_trim(char x, char y, char t, bool b);
|
||||
void writeTo(ostream& file);
|
||||
void readFrom(istream& file);
|
||||
};
|
||||
|
@@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
|
Reference in New Issue
Block a user