- Added simpletypes.h header to hold the enums and typedefs related to the main class headers

- Made boom drawing take from the new boom gworld rather than from the field gworld
- Added enum for monster abilities (will be used for both of a monster's abilities, but isn't used yet)
- Added supporting member functions for the new abilities (not used yet): get ability name and has ability
- Added SDF pointer storage to the party structure together with supporting member functions (not used yet)
- Deleted the "reserved" fields res1, res2, res3 in the monster struct

git-svn-id: http://openexile.googlecode.com/svn/trunk@87 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-06-01 15:38:23 +00:00
parent 48210becd9
commit 715aab7a3c
18 changed files with 838 additions and 464 deletions

View File

@@ -464,3 +464,22 @@ 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];
}
void cParty::set_ptr(short p, unsigned short sdfx, unsigned short sdfy){ // This function is not used for setting the reserved pointers
if(p >= -199 && p <= -100){ // must be a mutable pointer
if(sdfx >= 300) throw std::range_error("SDF x-coordinate out of range (0..299)");
if(sdfy >= 50) throw std::range_error("SDF y-coordinate out of range (0..49)");
pointers[p] = std::make_pair(sdfx,sdfy);
}
else throw std::range_error("Pointer out of range (-199 to -100)");
}
void cParty::force_ptr(short p, unsigned short sdfx, unsigned short sdfy){
pointers[p] = std::make_pair(sdfx,sdfy);
}
unsigned char cParty::get_ptr(short p){
ptrIter iter = pointers.find(p);
if(iter == pointers.end()) return 0;
return stuff_done[iter->second.first][iter->second.second];
}