summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/bullet.c12
-rw-r--r--src/main.c8
-rw-r--r--src/player.h1
3 files changed, 13 insertions, 8 deletions
diff --git a/src/bullet.c b/src/bullet.c
index 12e4ca6..785ce2f 100644
--- a/src/bullet.c
+++ b/src/bullet.c
@@ -43,13 +43,13 @@ render_bullets(void)
continue;
}
else if(bullets[i].team == 1)
- {
- DrawCube(bullets[i].position, 0.25, 0.25, 0.25, DARKBLUE);
- }
+ {
+ DrawCube(bullets[i].position, 0.25, 0.25, 0.25, DARKBLUE);
+ }
else if(bullets[i].team == 2)
- {
- DrawCube(bullets[i].position, 0.25, 0.25, 0.25, DARKPURPLE);
- }
+ {
+ DrawCube(bullets[i].position, 0.25, 0.25, 0.25, DARKPURPLE);
+ }
}
}
diff --git a/src/main.c b/src/main.c
index ce5130c..a1cbc2a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -189,8 +189,12 @@ int main(void)
char text[50];
- sprintf(text, "Joystick %d,%d", inputs_p1.stick_x, inputs_p1.stick_y);
- DrawText(text, 10, 30, 12, GREEN);
+ //sprintf(text, "Joystick %d,%d", inputs_p1.stick_x, inputs_p1.stick_y);
+ //DrawText(text, 10, 30, 12, GREEN);
+ sprintf(text, "Player1: %d", world.players[0].points);
+ DrawText(text, 50, 30, 12, BLUE);
+ sprintf(text, "Player2: %d", world.players[1].points);
+ DrawText(text, 210, 30, 12, VIOLET);
/*
DrawText("Position", 150, 30, 12, GREEN);
DrawText(text, 150, 45, 12, GREEN);
diff --git a/src/player.h b/src/player.h
index 0e94080..63b7b83 100644
--- a/src/player.h
+++ b/src/player.h
@@ -15,6 +15,7 @@ struct
float speed;
Color color;
int camera_mode;
+ int points;
}
Player;