~ubuntu-branches/ubuntu/precise/lordsawar/precise

« back to all changes in this revision

Viewing changes to src/FogMap.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2007-10-29 15:38:06 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071029153806-z2j47adhmdjc7wae
Tags: 0.0.4-1
* New upstream release
* Add desktop file and simple manpage for new binary lordsawar-army-editor
* Syntax fixes on manpages
* Move manpages to correct section (6)

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
    }
121
121
}
122
122
 
 
123
void FogMap::alterFogRectangle(Vector<int> pt, int height, int width, FogType new_type)
 
124
{
 
125
    int x = pt.x;
 
126
    int y = pt.y;
 
127
    for (int i = 0; i < height; i++)
 
128
    {
 
129
        for (int j = 0; j < width; j++)
 
130
        {
 
131
            if ((x+i) < 0 || (y+j) < 0 || (x+i) >= d_width || (y+j) >= d_height)
 
132
                continue;
 
133
            d_fogmap[(y+j)*d_width + (x+i)] = new_type;
 
134
        }
 
135
    }
 
136
}
 
137
 
123
138
bool FogMap::isLoneFogTile(Vector<int> pos)
124
139
{
125
140
  bool west_open = false;