@@ -672,16 +672,26 @@ void Main_Window::update_status(Tile_Tessera *tt) {
672672 sprintf (buffer, " X/Y (%u, %u)" , (uint32_t )tt->col (), (uint32_t )tt->row ());
673673#endif
674674 _hover_xy->copy_label (buffer);
675- if (_tilemap.width () == GAME_BOY_WIDTH && _tilemap.height () == GAME_BOY_HEIGHT &&
676- (Config::format () == Tilemap_Format::FF_END || Config::format () == Tilemap_Format::RLE_NYBBLES ||
677- Config::format () == Tilemap_Format::XY_FLIP)) {
678- size_t lx = tt-> col () * TILE_SIZE + TILE_SIZE / 2 , ly = tt->row () * TILE_SIZE + TILE_SIZE / 2 ; // center of tile
675+ if (_tilemap.width () == GAME_BOY_WIDTH && _tilemap.height () == GAME_BOY_HEIGHT) {
676+ if (Config::format () == Tilemap_Format::FF_END || Config::format () == Tilemap_Format::XY_FLIP) {
677+ size_t lx = tt-> col () * TILE_SIZE + TILE_SIZE / 2 ;
678+ size_t ly = tt->row () * TILE_SIZE + TILE_SIZE / 2 ;
679679#ifdef __GNUC__
680- sprintf (buffer, " Landmark (%zu, %zu)" , lx, ly);
680+ sprintf (buffer, " Landmark (%zu, %zu)" , lx, ly);
681681#else
682- sprintf (buffer, " Landmark (%u, %u)" , (uint32_t )lx, (uint32_t )ly);
682+ sprintf (buffer, " Landmark (%u, %u)" , (uint32_t )lx, (uint32_t )ly);
683683#endif
684- _hover_landmark->copy_label (buffer);
684+ _hover_landmark->copy_label (buffer);
685+ }
686+ else if (Config::format () == Tilemap_Format::RLE_NYBBLES &&
687+ tt->col () >= 2 && tt->col () <= 0xF + 2 && tt->row () >= 1 && tt->row () <= 0xF + 1 ) {
688+ int lx = (int )tt->col () - 2 , ly = (int )tt->row () - 1 ;
689+ sprintf (buffer, " EMAP $%X, $%X" , lx, ly);
690+ _hover_landmark->copy_label (buffer);
691+ }
692+ else {
693+ _hover_landmark->label (" " );
694+ }
685695 }
686696 else {
687697 _hover_landmark->label (" " );
0 commit comments