diff options
| author | realtradam <[email protected]> | 2024-05-12 18:06:59 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2024-05-12 18:06:59 -0400 |
| commit | b3de05173338e83f2473976e4ad6f8331202c485 (patch) | |
| tree | bc88c331f3ae8cceb6f163830b3b1b948acea8e0 | |
| parent | 9f0296d34c948b11619887185b01f2928fbb33a5 (diff) | |
| download | tojam2024-b3de05173338e83f2473976e4ad6f8331202c485.tar.gz tojam2024-b3de05173338e83f2473976e4ad6f8331202c485.zip | |
.
| -rw-r--r-- | src/bullet.c | 8 | ||||
| -rw-r--r-- | src/main.c | 6 | ||||
| -rw-r--r-- | src/render.c | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/bullet.c b/src/bullet.c index 6fca87e..7bd16c5 100644 --- a/src/bullet.c +++ b/src/bullet.c @@ -12,6 +12,8 @@ struct } Bullet; +float bullet_speed = 0.5; + Bullet bullets[100]; void @@ -69,9 +71,9 @@ bullet_collision_check(void) { bullets[i].team = 0; } - bullets[i].position.x += bullets[i].direction.x * 0.25; - bullets[i].position.y += bullets[i].direction.y * 0.25; - bullets[i].position.z += bullets[i].direction.z * 0.25; + bullets[i].position.x += bullets[i].direction.x * bullet_speed; + bullets[i].position.y += bullets[i].direction.y * bullet_speed; + bullets[i].position.z += bullets[i].direction.z * bullet_speed; Vector3 enemypos = { 0 }; if (bullets[i].team == 1) { @@ -58,7 +58,7 @@ World world = { { .position = { 0 }, .direction = { 1, 0, 0 }, - .speed = 1.0f/30.0f, + .speed = 1.0f/25.0f, .color = DARKBLUE, .camera_mode = 1, }, @@ -167,7 +167,7 @@ int main(void) //---------------------------------------------------------------------------------- BeginDrawing(); - ClearBackground(DARKGRAY); + ClearBackground(BLACK); BeginScissorMode(0, 0, 320/2, 240); rlViewport(0, 0, 320/2, 240); @@ -179,7 +179,7 @@ int main(void) EndScissorMode(); rlViewport(0, 0, 320, 240); - DrawRectangle((320/2)-4, 0, 2, 240, BLACK); // split screen line + DrawRectangle((320/2)-4, 0, 2, 240, DARKGRAY); // split screen line // Draw cube with an applied texture //test(); diff --git a/src/render.c b/src/render.c index 7086ac8..b6efa34 100644 --- a/src/render.c +++ b/src/render.c @@ -150,7 +150,7 @@ renderWorld(World* world, Camera camera) rlPushMatrix(); rlTranslatef(0,0,-space); - drawGrid((Vector3){0}, 5, 1, BLACK); + drawGrid((Vector3){0}, 5, 1, RAYWHITE); rlPopMatrix(); rlPushMatrix(); |
