From: Trent W. <qua...@us...> - 2006-09-22 06:37:45
|
Update of /cvsroot/freesynd/freesynd In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv24417 Modified Files: mission.cpp mission.h Log Message: Grab map bounds and objective from level data. Index: mission.cpp =================================================================== RCS file: /cvsroot/freesynd/freesynd/mission.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mission.cpp 22 Sep 2006 04:22:51 -0000 1.6 +++ mission.cpp 22 Sep 2006 06:37:43 -0000 1.7 @@ -30,7 +30,7 @@ #include "screen.h" #include "app.h" -Mission::Mission() : map_(0) +Mission::Mission() : map_(0), min_x_(0), min_y_(0), max_x_(0), max_y_(0), objective_(0) { memset(&level_data_, 0, sizeof(level_data_)); } @@ -40,6 +40,12 @@ memcpy(&level_data_, levelData, sizeof(level_data_)); map_ = level_data_.u10[0].unkn10[11]; + // TODO: use these + min_x_ = level_data_.u10[0].unkn10[13]; + min_y_ = level_data_.u10[1].unkn10[0]; + max_x_ = level_data_.u10[1].unkn10[2]; + max_y_ = level_data_.u10[1].unkn10[4]; + objective_ = level_data_.u10[1].unkn10[10]; vehicles_.clear(); // TODO: free existing? Index: mission.h =================================================================== RCS file: /cvsroot/freesynd/freesynd/mission.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mission.h 22 Sep 2006 04:22:51 -0000 1.6 +++ mission.h 22 Sep 2006 06:37:43 -0000 1.7 @@ -167,7 +167,8 @@ int info_costs_[3]; int enhance_costs_[3]; std::string briefing_; - int map_; + int map_, min_x_, min_y_, max_x_, max_y_; + int objective_; }; |