Skip to content

Commit

Permalink
Minor code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Nov 1, 2018
1 parent 2344534 commit 5bf8a36
Show file tree
Hide file tree
Showing 5 changed files with 332 additions and 332 deletions.
6 changes: 3 additions & 3 deletions CGame_Event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void CGame::EventHandling(SDL_Event* Event)
TRIANGLE_INCREASE += 1;
bobMAP* myMap = MapObj->getMap();
myMap->updateVertexCoords();
CSurface::get_nodeVectors(myMap);
CSurface::get_nodeVectors(*myMap);
callback::PleaseWait(WINDOW_QUIT_MESSAGE);
}
break;
Expand All @@ -98,7 +98,7 @@ void CGame::EventHandling(SDL_Event* Event)
TRIANGLE_INCREASE = 5;
bobMAP* myMap = MapObj->getMap();
myMap->updateVertexCoords();
CSurface::get_nodeVectors(myMap);
CSurface::get_nodeVectors(*myMap);
callback::PleaseWait(WINDOW_QUIT_MESSAGE);
}
}
Expand All @@ -112,7 +112,7 @@ void CGame::EventHandling(SDL_Event* Event)
TRIANGLE_INCREASE -= 1;
bobMAP* myMap = MapObj->getMap();
myMap->updateVertexCoords();
CSurface::get_nodeVectors(myMap);
CSurface::get_nodeVectors(*myMap);
callback::PleaseWait(WINDOW_QUIT_MESSAGE);
}
break;
Expand Down
14 changes: 7 additions & 7 deletions CMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void CMap::constructMap(const std::string& filename, int width, int height, int
// load the right MAP0x.LST for all pictures
loadMapPics();

CSurface::get_nodeVectors(map);
CSurface::get_nodeVectors(*map);
#ifdef _EDITORMODE
// for safety recalculate build and shadow data and test if fishes and water is correct
for(int i = 0; i < map->height; i++)
Expand Down Expand Up @@ -367,7 +367,7 @@ void CMap::rotateMap()
modifyBuild(x, y);
modifyShading(x, y);
modifyResource(x, y);
CSurface::update_shading(map, x, y);
CSurface::update_shading(*map, x, y);
}
}

Expand Down Expand Up @@ -400,7 +400,7 @@ void CMap::MirrorMapOnXAxis()
modifyBuild(x, y);
modifyShading(x, y);
modifyResource(x, y);
CSurface::update_shading(map, x, y);
CSurface::update_shading(*map, x, y);
}
}
}
Expand Down Expand Up @@ -429,7 +429,7 @@ void CMap::MirrorMapOnYAxis()
modifyBuild(x, y);
modifyShading(x, y);
modifyResource(x, y);
CSurface::update_shading(map, x, y);
CSurface::update_shading(*map, x, y);
}
}
}
Expand Down Expand Up @@ -1163,7 +1163,7 @@ void CMap::render()
modifyVertex();

if(!map->vertex.empty())
CSurface::DrawTriangleField(Surf_Map, displayRect, map);
CSurface::DrawTriangleField(Surf_Map, displayRect, *map);

// draw pictures to cursor position
#ifdef _EDITORMODE
Expand Down Expand Up @@ -1664,7 +1664,7 @@ void CMap::modifyHeightRaise(int VertexX, int VertexY)
tempP->y -= TRIANGLE_INCREASE;
tempP->z += TRIANGLE_INCREASE;
tempP->h += 0x01;
CSurface::update_shading(map, VertexX, VertexY);
CSurface::update_shading(*map, VertexX, VertexY);

// after (5*TRIANGLE_INCREASE) pixel all vertices around will be raised too
// update first vertex left upside
Expand Down Expand Up @@ -1755,7 +1755,7 @@ void CMap::modifyHeightReduce(int VertexX, int VertexY)
tempP->y += TRIANGLE_INCREASE;
tempP->z -= TRIANGLE_INCREASE;
tempP->h -= 0x01;
CSurface::update_shading(map, VertexX, VertexY);
CSurface::update_shading(*map, VertexX, VertexY);
// after (5*TRIANGLE_INCREASE) pixel all vertices around will be reduced too
// update first vertex left upside
X = VertexX - (even ? 1 : 0);
Expand Down
Loading

0 comments on commit 5bf8a36

Please sign in to comment.