summaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-05-11 17:45:52 -0400
committerrealtradam <[email protected]>2024-05-11 17:45:52 -0400
commit918e33f8cf77036b0b87ca03aa10d9954b6569e1 (patch)
tree87b3c1ab8aaadb52ae69cf8200feee868500139f /src/main.c
parentb34e7bd903f7c20912cfe696947641a7f37e029d (diff)
downloadtojam2024-918e33f8cf77036b0b87ca03aa10d9954b6569e1.tar.gz
tojam2024-918e33f8cf77036b0b87ca03aa10d9954b6569e1.zip
player moves on their own
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 5 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 },