From 8d61db9558b9a29e031efddc2ba6e922b34a2296 Mon Sep 17 00:00:00 2001 From: maka70vv <25.makarovv@gmail.com> Date: Mon, 3 Mar 2025 01:45:38 +0600 Subject: [PATCH] second room object --- GameObjectManager.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/GameObjectManager.cpp b/GameObjectManager.cpp index fd8eb62..33f4eb4 100644 --- a/GameObjectManager.cpp +++ b/GameObjectManager.cpp @@ -96,22 +96,20 @@ void GameObjectManager::initialize() { ao1.activeObjectScreenMeshMutable.RefreshVBO(); ao1.inventoryIconTexturePtr = std::make_shared(CreateTextureDataFromBmp32("./textures/inventory_objects/cubic_T_icon.bmp32")); - /* + ActiveObject ao2; - ao2.name = "superchair001"; - ao2.activeObjectMesh = ZL::LoadFromTextFile("./superchair001.txt"); // Add ZL:: namespace - ao2.activeObjectMesh.Scale(400); - ao2.activeObjectMesh.SwapZandY(); + ao2.name = "book"; + ao2.activeObjectMesh = ZL::LoadFromTextFile("./book001.txt"); // Add ZL:: namespace + ao2.activeObjectMesh.Scale(4); ao2.activeObjectMeshMutable.AssignFrom(ao2.activeObjectMesh); ao2.activeObjectMeshMutable.RefreshVBO(); - ao2.objectPos = Vector3f{ 0, 0, 0 }; - ao2.activeObjectTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./chair_01_Base_Color.bmp")); - + ao2.objectPos = Vector3f{ 50, 0, -300 }; + ao2.activeObjectTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./book03.bmp")); ao2.activeObjectScreenTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./aoscreen01.bmp")); ao2.activeObjectScreenMesh = CreateRect2D({ 0.f, 0.f }, { 64.f, 64.f }, 0.5); ao2.activeObjectScreenMeshMutable.AssignFrom(ao2.activeObjectScreenMesh); ao2.activeObjectScreenMeshMutable.RefreshVBO(); - */ + ao2.inventoryIconTexturePtr = std::make_shared(CreateTextureDataFromBmp32("./textures/inventory_objects/cubic_T_icon.bmp32")); @@ -136,6 +134,7 @@ void GameObjectManager::initialize() { Room room_2; room_2.roomTexture = std::make_shared(CreateTextureDataFromBmp24("./seconroom.bmp")); + room_2.objects.push_back(ao2); room_2.sound_name = "Symphony No.6 (1st movement).ogg"; room_2.roomLogic = createRoom2Logic(); room_2.textMesh = preloadedRoomMeshArr[1];