summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/main.c10
-rw-r--r--src/player.h3
2 files changed, 8 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 4b6bd66..3c92fce 100644
--- a/src/main.c
+++ b/src/main.c
@@ -53,7 +53,7 @@ Rectangle dst={0.0f,0.0f,32.0f,32.0f};
Player player_one = {
.position = { 0 },
.direction = { 1, 0, 0 },
- .speed = 0
+ .speed = 1.0f/60.0f
};
//------------------------------------------------------------------------------------
@@ -98,6 +98,8 @@ int main(void)
//-----------------------------------------------------
updateController();
+ movePlayer(&player_one);
+
// Update
//----------------------------------------------------------------------------------
//UpdateCamera(&camera, CAMERA_ORBITAL);
@@ -107,15 +109,13 @@ int main(void)
//----------------------------------------------------------------------------------
BeginDrawing();
- ClearBackground(BLACK);
+ ClearBackground(DARKGRAY);
BeginMode3D(camera);
drawPlayer(&player_one);
- //DrawModel(model, position, 2.0f, WHITE);
-
- // Draw cube with an applied texture
+ // Draw cube with an applied texture
//test();
// Draw cube with an applied texture, but only a defined rectangle piece of the texture
//DrawCubeTextureRec(texture, (Rectangle){ 0, texture.height/2, texture.width/2, texture.height/2 },
diff --git a/src/player.h b/src/player.h
index 4fea483..e6d8f66 100644
--- a/src/player.h
+++ b/src/player.h
@@ -12,3 +12,6 @@ Player;
void
drawPlayer(Player *player);
+
+void
+movePlayer(Player *player);