diff --git a/desktop_version/src/Map.cpp b/desktop_version/src/Map.cpp index 406bee9b..bcac820f 100644 --- a/desktop_version/src/Map.cpp +++ b/desktop_version/src/Map.cpp @@ -82,6 +82,8 @@ mapclass::mapclass(void) cameraseek = 0; minitowermode = false; roomtexton = false; + + nexttowercolour_set = false; } //Areamap starts at 100,100 and extends 20x20 @@ -631,6 +633,13 @@ void mapclass::updatetowerglow(TowerBG& bg_obj) void mapclass::nexttowercolour(void) { + /* Prevent cycling title BG more than once per frame. */ + if (nexttowercolour_set) + { + return; + } + nexttowercolour_set = true; + graphics.titlebg.colstate+=5; if (graphics.titlebg.colstate >= 30) graphics.titlebg.colstate = 0; diff --git a/desktop_version/src/Map.h b/desktop_version/src/Map.h index 796c3833..cf7814d5 100644 --- a/desktop_version/src/Map.h +++ b/desktop_version/src/Map.h @@ -55,6 +55,7 @@ public: void updatetowerglow(TowerBG& bg_obj); void nexttowercolour(void); + bool nexttowercolour_set; void settowercolour(int t); diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index bbf4806c..af7af8c6 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -724,7 +724,7 @@ static void unfocused_run(void) static void focused_begin(void) { - /* no-op. */ + map.nexttowercolour_set = false; } static void focused_end(void)