- Made add_string_to_buf accept a string rather than a char*, and began to take advantage of this.
- Added an operator[] to cParty; I intend to get rid of the ADVEN macro eventually in favour of accessing PCs with the operator - Added using cMonster::operator= to cCreature, because this will be needed once I rearrange these two structures. - Added an operator= to the cPopulation type, so that the "monst.dudes[...]" redundancy can be avoide. - Added outdoors and towns members to the scenario class for future use (they will old all the outdoor sections and towns, respectively, from the current scenario) git-svn-id: http://openexile.googlecode.com/svn/trunk@81 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
@@ -457,3 +457,8 @@ void cParty::readFrom(std::istream& file){
|
||||
for(int k = 0; k < 64; k++)
|
||||
bin >> setup[i][j][k];
|
||||
}
|
||||
|
||||
cPlayer& cParty::operator[](unsigned short n){
|
||||
if(n >= 6) throw std::out_of_range("Attempt to access a player that doesn't exist.");
|
||||
return adven[n];
|
||||
}
|
||||
|
Reference in New Issue
Block a user