Click here to Skip to main content
15,908,111 members

Comments by robvleugel (Top 6 by date)

robvleugel 3-Feb-23 12:47pm View    
Yes namespace::RegisterFunction(SomeFunc, SomeFunc).

In the execution part, I haven't changed anything. Except the Script:: part is now from the namespace, instead of the class name. You can call a function by Namepace::func() or a static member function by Classname::func() likewise.

There is not so much I changed in the code, which is why I don't understand this won't work when I put the code in a namespace instead of a class with static member functions that I never instantiate.
robvleugel 5-May-19 13:30pm View    
Got it working, thanks a lot Richard!
robvleugel 5-May-19 12:59pm View    
Overlooked that one, since it uses the va list this might just work. Ill check it out, thanks Richard!
robvleugel 5-May-19 12:27pm View    
Thanks for the suggestion Richard.

There is one more downside to this: I'd have to include the SDL.h file in every code file that uses the GameLog function.
robvleugel 5-May-19 10:53am View    
I've given it, its:

void SDL_Log(const char* fmt, ...)

The ... means variable number of arguments. That's what makes this a pain in the ass for me.