diff options
Diffstat (limited to 'tools/mapedit/src/widget.cpp')
| -rw-r--r-- | tools/mapedit/src/widget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
| diff --git a/tools/mapedit/src/widget.cpp b/tools/mapedit/src/widget.cpp index 53249c7..9c8dae3 100644 --- a/tools/mapedit/src/widget.cpp +++ b/tools/mapedit/src/widget.cpp | |||
| @@ -48,7 +48,7 @@ void MapeditWidget::OnPaint(wxPaintEvent& event) | |||
| 48 | { | 48 | { |
| 49 | for (int x=0; x<MAP_WIDTH; x++) | 49 | for (int x=0; x<MAP_WIDTH; x++) |
| 50 | { | 50 | { |
| 51 | int tile = map->mapdata[x+y*MAP_WIDTH]; | 51 | int tile = map->getTileAt(x, y); |
| 52 | dc.StretchBlit(x*TILE_WIDTH*scale-vX, y*TILE_HEIGHT*scale-vY, TILE_WIDTH*scale, TILE_HEIGHT*scale, &tiles_dc, tile%8*TILE_WIDTH, tile/8*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT); | 52 | dc.StretchBlit(x*TILE_WIDTH*scale-vX, y*TILE_HEIGHT*scale-vY, TILE_WIDTH*scale, TILE_HEIGHT*scale, &tiles_dc, tile%8*TILE_WIDTH, tile/8*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT); |
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| @@ -76,7 +76,7 @@ void MapeditWidget::SetTile(wxPoint pos) | |||
| 76 | int x = (pos.x + vX) / (TILE_WIDTH * scale); | 76 | int x = (pos.x + vX) / (TILE_WIDTH * scale); |
| 77 | int y = (pos.y + vY) / (TILE_HEIGHT * scale); | 77 | int y = (pos.y + vY) / (TILE_HEIGHT * scale); |
| 78 | 78 | ||
| 79 | map->mapdata[x+y*MAP_WIDTH] = tileWidget->getSelected(); | 79 | map->setTileAt(x, y, tileWidget->getSelected()); |
| 80 | Refresh(); | 80 | Refresh(); |
| 81 | } | 81 | } |
| 82 | 82 | ||
