mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-01 09:45:42 +00:00
try explicit conversion
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <raylib.h>
|
||||
|
||||
namespace RAY {
|
||||
|
||||
typedef ::Vector2 Vector2;
|
||||
typedef ::Vector3 Vector3;
|
||||
typedef ::Vector4 Vector4;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
** EPITECH PROJECT, 2021
|
||||
** Bomberman
|
||||
** File description:
|
||||
** Vector
|
||||
*/
|
||||
|
||||
#include "Vector.hpp"
|
||||
#include "Models/Vector3.hpp"
|
||||
|
||||
RAY::Vector3 toRAY(const WAL::Vector3<float> &wal)
|
||||
{
|
||||
return (RAY::Vector3){wal.x, wal.y, wal.y};
|
||||
}
|
||||
+3
-3
@@ -25,8 +25,8 @@ int main()
|
||||
|
||||
RAY::Vector2 ballPosition = { (float)screenWidth/2, (float)screenHeight/2 };
|
||||
RAY::Window &window = RAY::Window::getInstance(screenWidth, screenHeight, "Ta mère en slip");
|
||||
RAY::Camera::Camera3D camera((Vector3){ 30.0f, 20.0f, 30.0f }, (Vector3){ 0.0f, 0.0f, 0.0f },
|
||||
(Vector3){ 0.0f, 1.0f, 0.0f }, 70.0, CAMERA_PERSPECTIVE);
|
||||
RAY::Camera::Camera3D camera((RAY::Vector3){ 30.0f, 20.0f, 30.0f }, (RAY::Vector3){ 0.0f, 0.0f, 0.0f },
|
||||
(RAY::Vector3){ 0.0f, 1.0f, 0.0f }, 70.0, CAMERA_PERSPECTIVE);
|
||||
RAY::Drawables::Drawables3D::Grid grid(10, 5.0f);
|
||||
RAY::Drawables::Drawables3D::Cube cube({0}, {0}, {0});
|
||||
|
||||
@@ -75,7 +75,7 @@ int main()
|
||||
float scatter = sinf(blockScale*20.0f + (float)(time*4.0f));
|
||||
|
||||
// Calculate the cube position
|
||||
cube.setPosition({
|
||||
cube.setPosition((RAY::Vector3){
|
||||
(float)(x - numBlocks/2)*(scale*3.0f) + scatter,
|
||||
(float)(y - numBlocks/2)*(scale*2.0f) + scatter,
|
||||
(float)(z - numBlocks/2)*(scale*3.0f) + scatter
|
||||
|
||||
Reference in New Issue
Block a user