]> git.lizzy.rs Git - shadowclad.git/blobdiff - src/game/level.c
Rename `Vector3D` to `Vector`
[shadowclad.git] / src / game / level.c
index fd7f8ac548a475aceb0c8f950bf5d4d03d249f94..fade95bf45ba018fadc5f49b5ded8a804c826784 100644 (file)
@@ -28,9 +28,9 @@ static inline void setBlockInGrid(BlockGrid grid, size_t x, size_t z, Block* blo
 
 void initLevel() {
        playerSpawnTransform = identity();
-       translate(&playerSpawnTransform, (Vector3D) { .x = -BLOCKGRID_CELL_SIZE,
-                                                     .y = 0.0f,
-                                                     .z = -BLOCKGRID_CELL_SIZE });
+       translate(&playerSpawnTransform, (Vector) { .x = -BLOCKGRID_CELL_SIZE,
+                                                   .y = 0.0f,
+                                                   .z = -BLOCKGRID_CELL_SIZE });
 
        blockWall01.solid = importSolid("assets/wall01.3ds");
 
@@ -41,9 +41,9 @@ void initLevel() {
        for (size_t z = 0; z < levelGrid.depth; ++z) {
                for (size_t x = 0; x < levelGrid.width; ++x) {
                        Scene* blockScene = newScene();
-                       translate(&blockScene->transform, (Vector3D) { .x = x * BLOCKGRID_CELL_SIZE,
-                                                                      .y = 0.0f,
-                                                                      .z = z * BLOCKGRID_CELL_SIZE });
+                       translate(&blockScene->transform, (Vector) { .x = x * BLOCKGRID_CELL_SIZE,
+                                                                    .y = 0.0f,
+                                                                    .z = z * BLOCKGRID_CELL_SIZE });
                        blockScene->solid = getBlockFromGrid(levelGrid, x, z)->solid;
                        insertChildScene(levelScene, blockScene);
                }
@@ -87,9 +87,9 @@ static void buildLevelFromImage(const TgaImage* image) {
                                case 0xFF00FFFF:
                                        block = &blockEmpty;
                                        playerSpawnTransform = identity();
-                                       translate(&playerSpawnTransform, (Vector3D) { .x = x * BLOCKGRID_CELL_SIZE,
-                                                                                     .y = 0.0f,
-                                                                                     .z = z * BLOCKGRID_CELL_SIZE });
+                                       translate(&playerSpawnTransform, (Vector) { .x = x * BLOCKGRID_CELL_SIZE,
+                                                                                   .y = 0.0f,
+                                                                                   .z = z * BLOCKGRID_CELL_SIZE });
                                        break;
                                default:
                                        block = &blockEmpty;