-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge parsing onto merge #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A new header file, parsing.h, was created to help organize and modularize the parsing functionality of the application. This file was included in the cub.h header to make the new parsing functions widely available across the codebase. The added files were also reflected in the Makefile and sources.mk. This change aims to enhance code readability and maintainability."
A new header file, parsing.h, was created to help organize and modularize the parsing functionality of the application. This file was included in the cub.h header to make the new parsing functions widely available across the codebase. The added files were also reflected in the Makefile and sources.mk. This change aims to enhance code readability and maintainability."
Added the libft library as a submodule and its inclusion in the header file. The libft library contains reusable C function which is already used by many projects. Their addition in the Makefile allows these functions to be compiled and linked into the executable. This will make developing new features easier and faster because we have a robust set of tools readily available. The .gitmodules file ensures that this library is cloned whenever this repository is cloned. This makes it easier for new developers to set up their development environments.
The change introduces error messages for invalid command line arguments used in the cub3D project. The error messages include definitions for wrong usage, incorrect file extension, and inaccessible map file. This improves the traceability of error sources, aiding in future debugging efforts.
Added a new parsing.c file and started implementing the logic in it. It includes some basic error checks like verifying the number of arguments and validating the file extension. This is the start of building the parsing functionality for the application. In addition, the printf.h library was added to the cub.h file to support the printf function.
# Conflicts: # Makefile # incs/parsing.h
updated gitignore
The program will now start by launching the parsing code. If anything goes wrong during this step, the program now exit properly.
The 'all' rule in the Makefile has been updated to initialize and update any git submodules before building the project. This change ensures that any dependencies managed as submodules are correctly set up before attempting the build, preventing potential build failures due to missing or outdated dependencies.
Simplified the logic used for validating the suffix of a parsed map file. Initial implementation was manually checking each character of the suffix by hardcoded indices. This was refactored to use the `ft_strncmp` function to compare the last 4 characters to the expected suffix ".cub". This simplifies the code, improves readability, and reduces the probability of off-by-one errors in the indexing.
BenoitRoux0
approved these changes
Aug 31, 2023
BenoitRoux0
approved these changes
Aug 31, 2023
BenoitRoux0
approved these changes
Aug 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code propre et lisible. GL pour la suite.
BenoitRoux0
approved these changes
Aug 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code propre et lisible. GL pour la suite.
This was referenced Oct 10, 2023
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parsing logic is implemented in the code, No other change has been made to the render part, it will just check if the argv[1] is a valid .cub file before continuing.
Now with 100% less submodule and a use of strncmp !