This is my FDF project at 42. The project requires the MLX42 library, GLFW, and specific configuration steps to run successfully.
Before running this project, ensure that you have the following dependencies:
- MLX42 library (clone from GitHub or
git clone https://github.com/codam-coding-college/MLX42.git
) - GLFW library (install via
brew install glfw
)
To install the necessary dependencies, follow these steps:
-
Clone the MLX42 library into the project repository by either of the following methods:
- Download and build MLX42
- Run
git clone https://github.com/codam-coding-college/MLX42.git
-
Install GLFW library using Homebrew by running the following command:
brew install glfw
After installing the required dependencies, you need to configure the project by editing the path to your Homebrew installation in the makefile. Follow the steps below:
- Locate the makefile in the root directory of the project.
- Change the path to the headerfiles of MLX42 in l.27
<INCLUDES>
. - Change the path to the GLFW lib in l.31
<GLFW>
. - Change the path to the MLX archive in l.33
<MLX>
. - Save and close the makefile.
To build the project, navigate to the root directory of the project in the terminal and run make
To execute the program, use the following command:
./fdf <path_to_map_file>
Replace <path_to_map_file>
with the path to the map file you want to visualize. For example:
./fdf maps/10-2.fdf
Maps are located in the maps folder
Make sure to provide a valid path to an existing map file as a parameter when running the program.
Use the following controls to interact with the projection:
Numpad 9
: Rotate clockwiseNumpad 7
: Rotate counterclockwiseWASD
: Move the projection around=
: Increase the 'Z' height/
: Decrease the 'Z' heightNumpad 1
: Reset to isometric formNumpad 3
: Reset to parallel formNumpad 4
: Tilt to the left sideNumpad 6
: Tilt to the right sideNumpad 8
: Forward tiltingNumpad 2
: Backward tilting+
: Zoom in-
: Zoom outEsc
: Quit the program