Files
oboe/osx/classes/regtown.h
Celtic Minstrel 92bda1c100 - Cleaned out some of the compiler warnings in the scenario editor (removing unused variables mostly).
- Finally removed the grow box in the corner of the scenario editor window.
- Changed #include <iostream> in several headers to #include <iosfwd>, since they were only present for the use of
  the ostream and istream classes, and cout/cin were unneeded.
- Changed bool to Boolean in the old structs, since that's what it was originally.
- Small changes to graphtool, including an overload of get_custom_rect.
- Added gcd function to mathutil; was needed for something in the new dialog engine


git-svn-id: http://openexile.googlecode.com/svn/trunk@71 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-25 03:41:29 +00:00

80 lines
1.7 KiB
C++

/*
* regtown.h
* BoE
*
* Created by Celtic Minstrel on 24/04/09.
*
*/
#ifndef REGTOWN_H
#define REGTOWN_H
#include <iosfwd>
namespace legacy {
struct big_tr_type;
struct ave_tr_type;
struct tiny_tr_type;
};
class cBigTown : public cTown { // formerly big_tr_type
protected:
unsigned short _terrain[64][64];
rectangle _room_rect[16];
cCreature _creatures[60];
unsigned char _lighting[8][64];
public:
void append(legacy::big_tr_type& old);
unsigned short& terrain(size_t x, size_t y);
rectangle& room_rect(size_t i);
cCreature& creatures(size_t i);
unsigned char& lighting(size_t i, size_t r);
short max_dim();
short max_monst();
short max_items();
cBigTown();
void writeTo(std::ostream& file);
};
class cMedTown : public cTown { // formerly ave_tr_type
protected:
unsigned short _terrain[48][48];
rectangle _room_rect[16];
cCreature _creatures[40];
unsigned char _lighting[6][48];
public:
void append(legacy::ave_tr_type& old);
unsigned short& terrain(size_t x, size_t y);
rectangle& room_rect(size_t i);
cCreature& creatures(size_t i);
unsigned char& lighting(size_t i, size_t r);
short max_dim();
short max_monst();
short max_items();
cMedTown();
void writeTo(std::ostream& file);
};
class cTinyTown : public cTown { // formerly tiny_tr_type
protected:
unsigned short _terrain[32][32];
rectangle _room_rect[16];
cCreature _creatures[30];
unsigned char _lighting[4][32];
public:
void append(legacy::tiny_tr_type& old);
unsigned short& terrain(size_t x, size_t y);
rectangle& room_rect(size_t i);
cCreature& creatures(size_t i);
unsigned char& lighting(size_t i, size_t r);
short max_dim();
short max_monst();
short max_items();
cTinyTown();
void writeTo(std::ostream& file);
};
#endif