summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-09 00:42:12 +0100
committerAki <please@ignore.pl>2022-03-09 00:42:12 +0100
commitaf4e8e1717405963ff89a114832d376f937786da (patch)
treee23aad2f78d8e84148f4e05db83cb228521a2628
parent861995c88ef312beb4bc1b7920d612bd52590303 (diff)
downloadstarshatter-af4e8e1717405963ff89a114832d376f937786da.zip
starshatter-af4e8e1717405963ff89a114832d376f937786da.tar.gz
starshatter-af4e8e1717405963ff89a114832d376f937786da.tar.bz2
Changed to use Video's cache invalidation method directly
-rw-r--r--Stars45/Sim.cpp6
-rw-r--r--Stars45/Starshatter.cpp9
-rw-r--r--Stars45/Starshatter.h2
3 files changed, 3 insertions, 14 deletions
diff --git a/Stars45/Sim.cpp b/Stars45/Sim.cpp
index 3933855..9e193b9 100644
--- a/Stars45/Sim.cpp
+++ b/Stars45/Sim.cpp
@@ -268,9 +268,9 @@ Sim::UnloadMission()
RadioTraffic::DiscardMessages();
// release texture memory for 2D screens:
- Starshatter* stars = Starshatter::GetInstance();
- if (stars)
- stars->InvalidateTextureCache();
+ Video* video = Video::GetInstance();
+ if (video)
+ video->InvalidateCache();
cam_dir = CameraDirector::GetInstance();
if (cam_dir)
diff --git a/Stars45/Starshatter.cpp b/Stars45/Starshatter.cpp
index 19cbb64..8572169 100644
--- a/Stars45/Starshatter.cpp
+++ b/Stars45/Starshatter.cpp
@@ -2635,15 +2635,6 @@ Starshatter::SaveVideoConfig(const char* filename)
// +--------------------------------------------------------------------+
void
-Starshatter::InvalidateTextureCache()
-{
- if (video)
- video->InvalidateCache();
-}
-
-// +--------------------------------------------------------------------+
-
-void
Starshatter::ExecCutscene(const char* msn_file, const char* path)
{
if (InCutscene() || !msn_file || !*msn_file) return;
diff --git a/Stars45/Starshatter.h b/Stars45/Starshatter.h
index 41e7ccd..2d26b00 100644
--- a/Stars45/Starshatter.h
+++ b/Stars45/Starshatter.h
@@ -108,8 +108,6 @@ public:
int GetLoadProgress() { return load_progress; }
const char* GetLoadActivity() { return load_activity; }
- void InvalidateTextureCache();
-
int GetChatMode() const { return chat_mode; }
void SetChatMode(int c);
const char* GetChatText() const { return chat_text.data(); }