|
@@ -156,6 +156,7 @@ void Editor::displayMap() {
|
156
|
156
|
displayMapObjects();
|
157
|
157
|
displayMapConnections();
|
158
|
158
|
displayMapBorder();
|
|
159
|
+ displayMapGrid();
|
159
|
160
|
}
|
160
|
161
|
|
161
|
162
|
void Editor::displayMetatiles() {
|
|
@@ -244,6 +245,19 @@ void Editor::displayMapBorder() {
|
244
|
245
|
}
|
245
|
246
|
}
|
246
|
247
|
|
|
248
|
+void Editor::displayMapGrid() {
|
|
249
|
+ int pixelWidth = map->getWidth() * 16;
|
|
250
|
+ int pixelHeight = map->getHeight() * 16;
|
|
251
|
+ for (int i = 0; i <= map->getWidth(); i++) {
|
|
252
|
+ int x = i * 16;
|
|
253
|
+ QGraphicsLineItem *line = scene->addLine(x, 0, x, pixelHeight);
|
|
254
|
+ }
|
|
255
|
+ for (int j = 0; j <= map->getHeight(); j++) {
|
|
256
|
+ int y = j * 16;
|
|
257
|
+ QGraphicsLineItem *line = scene->addLine(0, y, pixelWidth, y);
|
|
258
|
+ }
|
|
259
|
+}
|
|
260
|
+
|
247
|
261
|
void MetatilesPixmapItem::paintTileChanged(Map *map) {
|
248
|
262
|
draw();
|
249
|
263
|
}
|