diff --git a/GameObjectManager.cpp b/GameObjectManager.cpp index 3aab78d..7161a14 100644 --- a/GameObjectManager.cpp +++ b/GameObjectManager.cpp @@ -131,34 +131,40 @@ void GameObjectManager::initialize() { cubeForFirstRoomM.activeObjectScreenMeshMutable.RefreshVBO(); cubeForFirstRoomM.inventoryIconTexturePtr = std::make_shared(CreateTextureDataFromBmp32("./textures/inventory_objects/cubic_M_icon.bmp32")); - ActiveObject lampe; - lampe.name = "lampe"; - lampe.activeObjectMesh = ZL::LoadFromTextFile("./book001.txt"); // Add ZL:: namespace - lampe.activeObjectMesh.Scale(4); - lampe.activeObjectMeshMutable.AssignFrom(lampe.activeObjectMesh); - lampe.activeObjectMeshMutable.RefreshVBO(); - lampe.objectPos = Vector3f{ 51, 0, 315 }; - lampe.activeObjectTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./book03.bmp")); - lampe.activeObjectScreenTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./aoscreen01.bmp")); - lampe.activeObjectScreenMesh = CreateRect2D({ 0.f, 0.f }, { 64.f, 64.f }, 0.5); - lampe.activeObjectScreenMeshMutable.AssignFrom(lampe.activeObjectScreenMesh); - lampe.activeObjectScreenMeshMutable.RefreshVBO(); - lampe.inventoryIconTexturePtr = std::make_shared(CreateTextureDataFromBmp32("./textures/inventory_objects/battery.bmp32")); + ActiveObject ao2; + ao2.name = "lampe"; + ao2.activeObjectMesh = ZL::LoadFromTextFile("./lighter.txt"); // Add ZL:: namespace + ao2.activeObjectMesh.Scale(7); + ao2.activeObjectMeshMutable.AssignFrom(ao2.activeObjectMesh); + ao2.activeObjectMeshMutable.RefreshVBO(); + ao2.objectPos = Vector3f{ 85, 30, 43 }; + ao2.activeObjectTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./temno.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")); + ActiveObject carToy; carToy.name = "carToy"; carToy.activeObjectMesh = ZL::LoadFromTextFile("./car.txt"); // Add ZL:: namespace - carToy.activeObjectMesh.Scale(15); + carToy.activeObjectMesh.Scale(12); carToy.activeObjectMeshMutable.AssignFrom(carToy.activeObjectMesh); carToy.activeObjectMeshMutable.RefreshVBO(); - carToy.objectPos = Vector3f{ 291, 0, 315 }; + carToy.objectPos = Vector3f{ 300, 0, 315 }; carToy.activeObjectTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./Material.001_Base_color_1001_5.bmp")); carToy.activeObjectScreenTexturePtr = std::make_shared(CreateTextureDataFromBmp24("./aoscreen01.bmp")); carToy.activeObjectScreenMesh = CreateRect2D({ 0.f, 0.f }, { 64.f, 64.f }, 0.5); carToy.activeObjectScreenMeshMutable.AssignFrom(carToy.activeObjectScreenMesh); carToy.activeObjectScreenMeshMutable.RefreshVBO(); - carToy.inventoryIconTexturePtr = std::make_shared(CreateTextureDataFromBmp32("./textures/inventory_objects/battery.bmp32")); + carToy.inventoryIconTexturePtr = std::make_shared(CreateTextureDataFromBmp32("./textures/inventory_objects/cubic_T_icon.bmp32")); + + + + + Room room_1; @@ -166,7 +172,7 @@ void GameObjectManager::initialize() { room_1.objects.push_back(cubeForFirstRoomT); room_1.objects.push_back(cubeForFirstRoomO); room_1.objects.push_back(cubeForFirstRoomM); - room_1.sound_name = "Symphony No.6 (1st movement).ogg"; + room_1.sound_name = "lullaby-music-vol20-186394--online-audio-convert.com.ogg"; room_1.roomLogic = createRoom1Logic(); room_1.textMesh = preloadedRoomMeshArr[0]; room_1.textMeshMutable.AssignFrom(room_1.textMesh); @@ -184,9 +190,9 @@ void GameObjectManager::initialize() { Room room_2; room_2.roomTexture = std::make_shared(CreateTextureDataFromBmp24("./seconroom.bmp")); - room_2.objects.push_back(lampe); + room_2.objects.push_back(ao2); room_2.objects.push_back(carToy); - room_2.sound_name = "Symphony No.6 (1st movement).ogg"; + room_2.sound_name = "unholy-choir-1-279337--online-audio-convert.com.ogg"; room_2.roomLogic = createRoom2Logic(); room_2.textMesh = preloadedRoomMeshArr[1]; room_2.textMeshMutable.AssignFrom(room_2.textMesh); @@ -194,7 +200,7 @@ void GameObjectManager::initialize() { room_2.collisionMgr.addCollider(std::make_shared(Vector3f{ -227, 0, -166 }, Vector3f{ 398, 0, -154 })); room_2.collisionMgr.addCollider(std::make_shared(Vector3f{ -328, 0, 182 }, Vector3f{ -216, 0, 332 })); room_2.collisionMgr.addCollider(std::make_shared(Vector3f{ -227, 0, -400 }, Vector3f{ -208, 0, -165})); - room_2.collisionMgr.addCollider(std::make_shared(Vector3f{ 263, 0, 305 }, Vector3f{ 305, 0, 340 })); + room_2.collisionMgr.addCollider(std::make_shared(Vector3f{ 263, 0, 295 }, Vector3f{ 303, 0, 335 })); rooms.push_back(room_2); activeObjects = rooms[current_room_index].objects; @@ -352,7 +358,7 @@ void GameObjectManager::handleEvent(const SDL_Event& event) { // animationCounter += 2; } } -gi + else if (event.type == SDL_MOUSEWHEEL) { static const float zoomstep = 1.0f; if (event.wheel.y > 0) { diff --git a/lighter.txt b/lighter.txt new file mode 100644 index 0000000..522dd11 --- /dev/null +++ b/lighter.txt @@ -0,0 +1,261 @@ +===Vertices: 20 +Vertex 0: +Vertex 1: +Vertex 2: +Vertex 3: +Vertex 4: +Vertex 5: +Vertex 6: +Vertex 7: +Vertex 8: +Vertex 9: +Vertex 10: +Vertex 11: +Vertex 12: +Vertex 13: +Vertex 14: +Vertex 15: +Vertex 16: +Vertex 17: +Vertex 18: +Vertex 19: +===UV Coordinates: +Face count: 36 +Face 0 +UV Count: 3 + UV + UV + UV +Face 1 +UV Count: 3 + UV + UV + UV +Face 2 +UV Count: 3 + UV + UV + UV +Face 3 +UV Count: 3 + UV + UV + UV +Face 4 +UV Count: 3 + UV + UV + UV +Face 5 +UV Count: 3 + UV + UV + UV +Face 6 +UV Count: 3 + UV + UV + UV +Face 7 +UV Count: 3 + UV + UV + UV +Face 8 +UV Count: 3 + UV + UV + UV +Face 9 +UV Count: 3 + UV + UV + UV +Face 10 +UV Count: 3 + UV + UV + UV +Face 11 +UV Count: 3 + UV + UV + UV +Face 12 +UV Count: 3 + UV + UV + UV +Face 13 +UV Count: 3 + UV + UV + UV +Face 14 +UV Count: 3 + UV + UV + UV +Face 15 +UV Count: 3 + UV + UV + UV +Face 16 +UV Count: 3 + UV + UV + UV +Face 17 +UV Count: 3 + UV + UV + UV +Face 18 +UV Count: 3 + UV + UV + UV +Face 19 +UV Count: 3 + UV + UV + UV +Face 20 +UV Count: 3 + UV + UV + UV +Face 21 +UV Count: 3 + UV + UV + UV +Face 22 +UV Count: 3 + UV + UV + UV +Face 23 +UV Count: 3 + UV + UV + UV +Face 24 +UV Count: 3 + UV + UV + UV +Face 25 +UV Count: 3 + UV + UV + UV +Face 26 +UV Count: 3 + UV + UV + UV +Face 27 +UV Count: 3 + UV + UV + UV +Face 28 +UV Count: 3 + UV + UV + UV +Face 29 +UV Count: 3 + UV + UV + UV +Face 30 +UV Count: 3 + UV + UV + UV +Face 31 +UV Count: 3 + UV + UV + UV +Face 32 +UV Count: 3 + UV + UV + UV +Face 33 +UV Count: 3 + UV + UV + UV +Face 34 +UV Count: 3 + UV + UV + UV +Face 35 +UV Count: 3 + UV + UV + UV +===Normals: +Vertex 0: Normal +Vertex 1: Normal +Vertex 2: Normal +Vertex 3: Normal +Vertex 4: Normal +Vertex 5: Normal +Vertex 6: Normal +Vertex 7: Normal +Vertex 8: Normal +Vertex 9: Normal +Vertex 10: Normal +Vertex 11: Normal +Vertex 12: Normal +Vertex 13: Normal +Vertex 14: Normal +Vertex 15: Normal +Vertex 16: Normal +Vertex 17: Normal +Vertex 18: Normal +Vertex 19: Normal +===Triangles: 36 +Triangle: [0, 1, 10] +Triangle: [12, 13, 10] +Triangle: [5, 1, 7] +Triangle: [3, 7, 2] +Triangle: [3, 8, 9] +Triangle: [5, 3, 1] +Triangle: [9, 8, 15] +Triangle: [15, 18, 19] +Triangle: [12, 16, 17] +Triangle: [6, 17, 4] +Triangle: [6, 4, 18] +Triangle: [15, 3, 9] +Triangle: [19, 4, 15] +Triangle: [16, 12, 4] +Triangle: [11, 1, 12] +Triangle: [12, 1, 4] +Triangle: [1, 3, 4] +Triangle: [3, 15, 4] +Triangle: [10, 13, 0] +Triangle: [10, 11, 12] +Triangle: [15, 8, 14] +Triangle: [18, 15, 14] +Triangle: [17, 13, 12] +Triangle: [17, 16, 4] +Triangle: [10, 1, 11] +Triangle: [18, 4, 19] +Triangle: [7, 1, 0] +Triangle: [7, 3, 5] +Triangle: [8, 3, 2] +Triangle: [7, 0, 2] +Triangle: [8, 2, 14] +Triangle: [18, 14, 6] +Triangle: [17, 6, 13] +Triangle: [13, 6, 0] +Triangle: [14, 2, 6] +Triangle: [2, 0, 6] diff --git a/sounds/Symphony No.6 (1st movement).ogg b/sounds/Symphony No.6 (1st movement).ogg deleted file mode 100644 index d527c9c..0000000 Binary files a/sounds/Symphony No.6 (1st movement).ogg and /dev/null differ diff --git a/sounds/file_example_OOG_5MG.ogg b/sounds/file_example_OOG_5MG.ogg deleted file mode 100644 index 2a9b95d..0000000 Binary files a/sounds/file_example_OOG_5MG.ogg and /dev/null differ diff --git a/sounds/lullaby-music-vol20-186394--online-audio-convert.com.ogg b/sounds/lullaby-music-vol20-186394--online-audio-convert.com.ogg new file mode 100644 index 0000000..f22a04e Binary files /dev/null and b/sounds/lullaby-music-vol20-186394--online-audio-convert.com.ogg differ diff --git a/sounds/unholy-choir-1-279337--online-audio-convert.com.ogg b/sounds/unholy-choir-1-279337--online-audio-convert.com.ogg new file mode 100644 index 0000000..9d5d003 Binary files /dev/null and b/sounds/unholy-choir-1-279337--online-audio-convert.com.ogg differ diff --git a/sounds/unseen-danger-fss-no-copyright-music-252588--online-audio-convert.com.ogg b/sounds/unseen-danger-fss-no-copyright-music-252588--online-audio-convert.com.ogg new file mode 100644 index 0000000..0d71678 Binary files /dev/null and b/sounds/unseen-danger-fss-no-copyright-music-252588--online-audio-convert.com.ogg differ diff --git a/temno.bmp b/temno.bmp new file mode 100644 index 0000000..b1c99b3 Binary files /dev/null and b/temno.bmp differ