diff --git a/GameObjectManager.cpp b/GameObjectManager.cpp index 308cd04..d70553d 100644 --- a/GameObjectManager.cpp +++ b/GameObjectManager.cpp @@ -268,8 +268,7 @@ void GameObjectManager::switch_room(int index){ void GameObjectManager::handleEvent(const SDL_Event& event) { // debug room switching if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_RIGHT) { -// todo comment this action - switch_room(1); + } else if (event.type == SDL_MOUSEBUTTONDOWN) { const auto highlightedObjects = rooms[current_room_index].findByHighlighted(true); @@ -317,7 +316,7 @@ void GameObjectManager::handleEvent(const SDL_Event& event) { std::cout << highlightedObjects.size() << std::endl; for (auto* ao : highlightedObjects) { if (ao && ao->name == "lampe") { - ao->activeObjectTexturePtr = std::make_shared(CreateTextureDataFromBmp24("base_Base_color_1001.bmp")); +// ao->activeObjectTexturePtr = std::make_shared(CreateTextureDataFromBmp24("base_Base_color_1001.bmp")); gInventoryMap.erase(item->name); objects_in_inventory--; break; diff --git a/GameObjectManager.h b/GameObjectManager.h index 03126a6..0b433f1 100644 --- a/GameObjectManager.h +++ b/GameObjectManager.h @@ -71,6 +71,9 @@ public: //ActiveObjectManager aoMgr; int objects_in_inventory; + std::shared_ptr dialog; + bool isDialogActive = true; + std::shared_ptr loadingScreenTexturePtr; diff --git a/RenderSystem.cpp b/RenderSystem.cpp index 52fe7a4..549f59f 100644 --- a/RenderSystem.cpp +++ b/RenderSystem.cpp @@ -401,4 +401,8 @@ void RenderSystem::drawObjects(GameObjectManager& gameObjects){ } } +void RenderSystem::drawDialog(GameObjectManager& gameObjects){ + +} + } // namespace ZL diff --git a/RenderSystem.h b/RenderSystem.h index 0155829..5654dd0 100644 --- a/RenderSystem.h +++ b/RenderSystem.h @@ -20,6 +20,7 @@ public: int& screenX, int& screenY); void drawObjects(GameObjectManager& gameObjects); + void drawDialog(GameObjectManager& gameObjects); private: void drawWorld(GameObjectManager& gameObjects); diff --git a/start_dialog.bmp b/start_dialog.bmp new file mode 100644 index 0000000..cef6253 Binary files /dev/null and b/start_dialog.bmp differ