—————– Devlog X —————–
I’ve been working on refactoring my project for the last few hours. Part of how I code includes: Comments throughout to explain the code, strict formatting throughout, and trying to help the compiler with “const” and “inline” keywords.
> To recap, my project is a custom made rendering engine that focuses on
> diverse rendering options along with high stylistic control (very
> high-level explanation).
## The process
My process of refactoring usually happens once I finish a new addition, however I haven’t been adding new things for a while. Now that I’ve added a new addition to the project (Event system & LayerStack), I want to go through the entire codebase under the src/ directory (not the glsl shaders).
## Project code stats (src/ directory)
Running the command line utility “cloc” on my src/ directory to count code stats, I get these counts:
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C++ 23 646 464 1930
C/C++ Header 47 506 205 1302
-------------------------------------------------------------------------------
SUM: 70 1152 669 3232
-------------------------------------------------------------------------------
Not very big yet, although that will be increased once I get to redoing the entire rendering engine.
## *What I have done*
Now, back to my refactoring. I got through the basics: removing warnings, double checking the public/private attribute declarations on classes & structs, setting const on functions & params, setting inline on functions.
## *The checklist*
This is my entire checklist for refactors, this is my first project using it, so it is still being worked on:
### Refactor Checklist (src/)
1. [x] Fix warnings
2. [x] Fix public vs. private
3. [x] Make functions const when needed
4. [x] Make function params const when needed
5. [x] Make functions inline when needed
6. [ ] Fix placement of functions
7. [ ] Refactor step by step in code
8. [ ] Rename things
9. [ ] Add comments
10. [ ] Place the \#includes in the right spots
11. [ ] Fix file tree
12. [ ] Run ./fullTest
13. [ ] Update the obsidian canvas & png
14. [ ] Update the website
Eventually I will also need to make one for the shaders too, as they are sometimes more technical on the code side.
## Conclusion
That’s all that I’ve been doing, thanks for reading. Here is my Github repo & landing page for this application:
Source Code: github.com/pkncoder/Engine
Landing Page: pkncoder.github.io/Engine