Fixed loader, main menu and level selector
This commit is contained in:
@ -69,6 +69,13 @@ public:
|
||||
void addLoadingTask(const LoadingTask& task);
|
||||
void executeLoadingTasks(std::function<void(float)> progressCallback = nullptr);
|
||||
void clearLoadingTasks();
|
||||
void update(float deltaTime); // New: Progressive loading update
|
||||
|
||||
// Loading progress tracking
|
||||
bool isLoadingComplete() const;
|
||||
float getLoadingProgress() const;
|
||||
size_t getTotalLoadingTasks() const { return m_totalLoadingTasks; }
|
||||
size_t getCompletedLoadingTasks() const { return m_completedLoadingTasks; }
|
||||
|
||||
// Resource queries
|
||||
size_t getTextureCount() const { return m_textures.size(); }
|
||||
@ -88,6 +95,18 @@ private:
|
||||
std::unordered_map<std::string, SDL_Texture*> m_textures;
|
||||
std::unordered_map<std::string, std::unique_ptr<FontAtlas>> m_fonts;
|
||||
std::vector<LoadingTask> m_loadingTasks;
|
||||
|
||||
// Loading progress tracking
|
||||
size_t m_totalLoadingTasks = 0;
|
||||
size_t m_completedLoadingTasks = 0;
|
||||
bool m_loadingComplete = false;
|
||||
|
||||
// Progressive loading state
|
||||
bool m_isProgressiveLoading = false;
|
||||
size_t m_currentTaskIndex = 0;
|
||||
Uint64 m_lastLoadTime = 0;
|
||||
bool m_musicLoadingStarted = false;
|
||||
float m_musicLoadingProgress = 0.0f;
|
||||
|
||||
// System references
|
||||
SDL_Renderer* m_renderer;
|
||||
|
||||
Reference in New Issue
Block a user