I am making a c++ sdl based game engine, wrapping every functionality of SDL library…
Jump to turn (16)
- 1I am making a c++ sdl based game engine, wrapping every functionality of SDL lib
- 2I read your suggestions and understood your logic, but utility functions inside
- 3Your first suggestion I think is wrong, since passing a vector in a return would
- 4That was genius, thanks for the fixing, now I got it! So every time I need to us
- 5I got this error, can you help me solve it and explain to me why does this happe
- 6OK I got it thanks, my error was thinking that a void method didn't/shouldn't ha
- 7Why didn't you use the point vector to do it? Is this a better way or you forget
- 8is this decisionOver2 an error? In the midpoint algorithm there is a similar sec
- 9Thanks, I get it now. Let's move to C++ now, I have several methods that have ou
- 10OK, it works, now in my drawing method I want to change the color, use it and re
- 11No I want it to make it simpler without creating new classes or anything new, is
- 12but the line restoreColor(); is written twice too
- 13Nevermind, I thought there was a similar keyword like finally in Python, I think
- 14OK perfect, now continuing with the exceptions, If I have a MethodA that calls a
- 15Perfect, it works. Now Going back to the try catch, I found out that I will be r
- 16I see interesting, but where do you define this DrawFunction in this part templa
- User
I am making a c++ sdl based game engine, wrapping every functionality of SDL library into my own engine. Help me deal with problems and questions.
The first one I have is this: I have a Point class based on SDL_Point, and a Renderer class based on SDL_Renderer, I got in a point that I have to convert from std::vector to std::vector<SDL_Point> for some rendering methods. So far I only have to convert the vector in renderer class, but I don't discard I may need it elsewhere. So I am doubtful if adding the converting method as a private method in Renderer or making it static and public in the Point class. I don't know if it will be correct to include an static method that is not directly related to a Point but to a vector of Points. How can I solve this dilema? Does this happen with standard libraries in C++ or C# too?
- Assistant