Skip to content

Commit

Permalink
Merge pull request flareteam#555 from stefanbeller/master
Browse files Browse the repository at this point in the history
MapRenderer: make compile again.
  • Loading branch information
clintbellanger committed Apr 2, 2013
2 parents aec597e + 6cc0899 commit d0fa5d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/FileParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ FileParser::FileParser()
, val("")
{}

bool FileParser::open(const string& filename, const string &errormessage) {
this->filename = filename;
bool FileParser::open(const string& _filename, const string &errormessage) {
this->filename = _filename;
infile.open(filename.c_str(), ios::in);
bool ret = infile.is_open();
if (!ret && !errormessage.empty())
Expand Down
6 changes: 3 additions & 3 deletions src/MapRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ void MapRenderer::loadEventComponent(FileParser &infile)
e->x = toInt(infile.nextValue()) * UNITS_PER_TILE + UNITS_PER_TILE/2;
e->y = toInt(infile.nextValue()) * UNITS_PER_TILE + UNITS_PER_TILE/2;

string chance = infile.nextValue();
chance = infile.nextValue();
if (chance == "fixed") e->z = 0;
else e->z = toInt(chance);

Expand Down Expand Up @@ -748,7 +748,7 @@ void MapRenderer::renderIsoLayer(SDL_Surface *wheretorender, Point offset, const

// lower right (south east) corner is covered by (j+i-w+1)
// lower left (south west) corner is caught by having 0 in there, so j>0
const int_fast16_t j_end = std::max((j+i-w+1), std::max(j - max_tiles_width, static_cast<int_fast16_t>(0)));
const int_fast16_t j_end = std::max(static_cast<int_fast16_t>(j+i-w+1), std::max(static_cast<int_fast16_t>(j - max_tiles_width), static_cast<int_fast16_t>(0)));

Point p = map_to_screen(i * UNITS_PER_TILE, j * UNITS_PER_TILE, shakycam.x, shakycam.y);
p = center_tile(p);
Expand Down Expand Up @@ -815,7 +815,7 @@ void MapRenderer::renderIsoFrontObjects(vector<Renderable> &r) {
if (d >= 0) {
j -= d; tiles_width += d; i += d;
}
const int_fast16_t j_end = std::max((j+i-w+1), std::max(j - max_tiles_width, static_cast<int_fast16_t>(0)));
const int_fast16_t j_end = std::max(static_cast<int_fast16_t>(j+i-w+1), std::max(static_cast<int_fast16_t>(j - max_tiles_width), static_cast<int_fast16_t>(0)));

// draw one horizontal line
Point p = map_to_screen(i * UNITS_PER_TILE, j * UNITS_PER_TILE, shakycam.x, shakycam.y);
Expand Down

0 comments on commit d0fa5d7

Please sign in to comment.