Chris Dourisdigitalcreations.hashnode.dev·May 12, 2024Day 88/100 100 Days of CodeI started working on the button but couldn't do much today because I was quite busy. I always try to squeeze in as much programming time as possible. Button Structure struct StartButton { int x; int y; float width; float height; }; G...Discuss100 Days of CodeC
Chris Dourisdigitalcreations.hashnode.dev·May 12, 2024Day 87/100 100 Days of CodeI worked on creating the ball. SDL alone can't generate circles. I used the solution from this post to draw it. Ball structure struct Ball { float x; float y; float radius; }; Generate Ball void GenerateBall(struct Ball ball, SDL_Rendere...Discuss100 Days of CodeC
Chris Dourisdigitalcreations.hashnode.dev·May 10, 2024Day 86/100 100 Days of CodeOne more session working on the text box. I think it is ready. I created a new TTF_Font variable named textboxFont and changed the position of the interiorTextBox . TTF_Font *textboxFont; textboxFont = TTF_OpenFont(fontResource.location, 50); TTF_Se...Discuss100 Days of CodeC
Chris Dourisdigitalcreations.hashnode.dev·May 10, 2024Day 85/100 100 Days of CodeI kept working on the text box. When clicked, it lets the user enter only digits; letters are not accepted, and the value cannot exceed three digits. After exiting edit mode, the cursor is disabled, and the value is displayed. The only thing left is ...Discuss100 Days of CodeC
Chris Dourisdigitalcreations.hashnode.dev·May 8, 2024Day 84/100 100 Days of CodeI worked on the application's text box, creating two new structures to manage the interior and exterior areas of the box. The exterior is a simple static rectangle with colored borders. The interior will expand or contract depending on the number of ...Discuss100 Days of CodeC
Chris Dourisdigitalcreations.hashnode.dev·May 6, 2024Day 82/100 100 Days or CodeAfter a lot of work, I managed to completely refactor the codebase. I am very happy with the result. The code has been divided into multiple source files and can now be scaled or edited very easily. I received two replies on my post about my constexp...Discuss100 Days of CodeC++
Chris Dourisdigitalcreations.hashnode.dev·May 6, 2024Day 81/100 100 Days of CodeI began refactoring the entire codebase. I eliminated all the template classes and created multiple source and header files to shift the code away from the game.cpp file. It still needs a bit of work, but it's progressing.Discuss100 Days of CodeC++
Chris Dourisdigitalcreations.hashnode.dev·May 2, 2024Day 79/100 100 Days of CodeThis session was all about creating a Mac executable file and move the resources inside it. I updated the CMakeLists.txt file to create a MacOS bundle file during the build process and copy the app's resources into the container. add_subdirectory("${...Discuss100 Days of CodeC
Chris Dourisdigitalcreations.hashnode.dev·May 1, 2024Day 78/100 100 Days of CodeCombined the Resource struct and the FindResource function to generate a path to the font file. To create the path, I switched from using getBundlePath to getExecutablePath because I am not making a .app executable. char* FindResource(char *fileLocat...Discuss100 Days of CodeC
Chris Dourisdigitalcreations.hashnode.dev·Apr 30, 2024Day 77/100 100 Days of CodeHey! I figured out what I should name the project. The original name was "jumping_physics" but I didn't really like it. Jumping Ball is much better. I made a lot of changes to the project and removed every line of code that was relative to C++. Now, ...Discuss100 Days of CodeC