add fps camera
This commit is contained in:
+6
-18
@@ -5,7 +5,8 @@ void DrawLevel00()
|
||||
{
|
||||
const int floorExtent = 25;
|
||||
const float tileSize = 5.0f;
|
||||
|
||||
|
||||
// Draw floor
|
||||
for (int y = -floorExtent; y < floorExtent; y++) {
|
||||
for (int x = -floorExtent; x < floorExtent; x++) {
|
||||
if ((y & 1) ^ (x & 1)) {
|
||||
@@ -14,21 +15,8 @@ void DrawLevel00()
|
||||
}
|
||||
}
|
||||
|
||||
const Vector3 towerSize = (Vector3){ 16.0f, 32.0f, 16.0f };
|
||||
|
||||
Vector3 towerPos = (Vector3){ 16.0f, 16.0f, 16.0f };
|
||||
DrawCubeV(towerPos, towerSize, RED);
|
||||
DrawCubeWiresV(towerPos, towerSize, BLACK);
|
||||
|
||||
towerPos.x *= -1;
|
||||
DrawCubeV(towerPos, towerSize, RED);
|
||||
DrawCubeWiresV(towerPos, towerSize, BLACK);
|
||||
|
||||
towerPos.z *= -1;
|
||||
DrawCubeV(towerPos, towerSize, RED);
|
||||
DrawCubeWiresV(towerPos, towerSize, BLACK);
|
||||
|
||||
towerPos.x *= -1;
|
||||
DrawCubeV(towerPos, towerSize, RED);
|
||||
DrawCubeWiresV(towerPos, towerSize, BLACK);
|
||||
DrawPlane((Vector3){ 0.0f, 0.0f, 0.0f }, (Vector2){ 32.0f, 32.0f }, LIGHTGRAY); // Draw ground
|
||||
DrawCube((Vector3){ -16.0f, 2.5f, 0.0f }, 1.0f, 5.0f, 32.0f, BLUE); // Draw a blue wall
|
||||
DrawCube((Vector3){ 16.0f, 2.5f, 0.0f }, 1.0f, 5.0f, 32.0f, GREEN); // Draw a green wall
|
||||
DrawCube((Vector3){ 0.0f, 2.5f, 16.0f }, 32.0f, 5.0f, 1.0f, YELLOW); // Draw a yellow wall
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user