prepared to integrate dialog

This commit is contained in:
maka70vv committed 2025-03-03 05:51:14 +06:00
1 parent 5c0b7f9761
commit 86523fa5bb
5 files changed
+10 -3

No files matched your search

+2 -3
View File
@@ -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<Texture>(CreateTextureDataFromBmp24("base_Base_color_1001.bmp"));
// ao->activeObjectTexturePtr = std::make_shared<Texture>(CreateTextureDataFromBmp24("base_Base_color_1001.bmp"));
gInventoryMap.erase(item->name);
objects_in_inventory--;
break;
+3
View File
@@ -71,6 +71,9 @@ public:
//ActiveObjectManager aoMgr;
int objects_in_inventory;
std::shared_ptr<Texture> dialog;
bool isDialogActive = true;
std::shared_ptr<ZL::Texture> loadingScreenTexturePtr;
+4
View File
@@ -401,4 +401,8 @@ void RenderSystem::drawObjects(GameObjectManager& gameObjects){
}
}
void RenderSystem::drawDialog(GameObjectManager& gameObjects){
}
} // namespace ZL
+1
View File
@@ -20,6 +20,7 @@ public:
int& screenX, int& screenY);
void drawObjects(GameObjectManager& gameObjects);
void drawDialog(GameObjectManager& gameObjects);
private:
void drawWorld(GameObjectManager& gameObjects);
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB