From db86e373352097ddcc382eb65512085afff98a24 Mon Sep 17 00:00:00 2001 From: xiaodao Date: Mon, 12 Aug 2024 00:56:02 +0800 Subject: [PATCH] Refactor: remove GetEventsXY() since the code is broken and never been used now. --- src/game_map.cpp | 8 -------- src/game_map.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/src/game_map.cpp b/src/game_map.cpp index 51e7cdc01e..127ff90abe 100644 --- a/src/game_map.cpp +++ b/src/game_map.cpp @@ -981,14 +981,6 @@ int Game_Map::GetTerrainTag(int x, int y) { return terrain_data[chip_index]; } -void Game_Map::GetEventsXY(std::vector& events, int x, int y) { - for (Game_Event& ev : GetEvents()) { - if (ev.IsInPosition(x, y) && ev.IsActive()) { - events.push_back(&ev); - } - } -} - Game_Event* Game_Map::GetEventAt(int x, int y, bool require_active) { auto& events = GetEvents(); for (auto iter = events.rbegin(); iter != events.rend(); ++iter) { diff --git a/src/game_map.h b/src/game_map.h index e9ea966e28..eb35fa7271 100644 --- a/src/game_map.h +++ b/src/game_map.h @@ -577,8 +577,6 @@ namespace Game_Map { */ std::vector& GetCommonEvents(); - void GetEventsXY(std::vector& events, int x, int y); - /** * @param x x position on the map * @param y y position on the map