Added player position and velocity variables

This commit is contained in:
CobaltXII
2018-12-30 15:19:33 -05:00
parent f5f77ededa
commit d63ce2fa1d

View File

@@ -123,7 +123,7 @@ int main(int argc, char** argv)
// Allocate a new world*.
world* the_world = allocate_world(32, 32, 16);
world* the_world = allocate_world(32, 32, 32);
for (int x = 0; x < the_world->x_res; x++)
for (int y = 0; y < the_world->y_res; y++)
@@ -145,6 +145,21 @@ int main(int argc, char** argv)
accessor* the_accessor = allocate_accessor(the_world);
// Define variables to hold the looking direction of the player.
float rot_x_deg = 0.0f;
float rot_y_deg = 0.0f;
// Define variables to hold the position and velocity of the player.
float player_x = float(the_world->x_res) / 2.0f;
float player_y = float(the_world->y_res) / 2.0f;
float player_z = float(the_world->z_res) / 2.0f;
float player_vx = 0.0f;
float player_vy = 0.0f;
float player_vz = 0.0f;
// Create variables to store the position of the mouse pointer and the
// state of the mouse buttons.