We are currently in the process of converting the website to the new design. Some pages, like this one, are still broken. We appreciate your patience.
Mox
It was cool to see that after my quick question pre-stream, you actually devoted half the episode…
»
Casey Muratori
jon_valdes Well, it's just 1 line of code regardless of how many possible scenes you have. A swit…
»
Jon Valdes
Oh, yes, I meant the dll init function does it automatically, I'm not doing anything manually :)
»
Mārtiņš Možeiko
The dll, on load, makes sure the global function pointers array is initialized every time You do…
»
Jon Valdes
Wow, relax, everyone! No need to fight over this :) The functions are in the DLL, and I take fun…
»
Ritchie Brannan
Reading post #3250 by the OP, I'm not entirely clear what the OP is trying to achieve with the fu…
»
Ritchie Brannan
I read the OP question as one of fixing up function pointers. He also wanted a way of avoiding us…
»
Mārtiņš Možeiko
I'm not sure we are talking about same things. OP asked how to patch his C++ pointers in inherit…
»
Ritchie Brannan
Obviously you can do this in both directions, exposing code in the DLL to the engine and vice-versa
»
Ritchie Brannan
That's 21 line instead of 10. How that is far less code? // the only thing that needs patching o…
»
Mārtiņš Možeiko
So you want to write this? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21struct M…
»
Ritchie Brannan
// the interface will look something like this: struct MyDllInterface { virtual bool aFunc…
»
Ritchie Brannan
If I expose a function returning a bool it will return a bool. If I call a function returning a f…
»
Ritchie Brannan
Just call the function directly, so 1 line.
»
Mārtiņš Možeiko
Icabod Basically there is far less code involved if you use a virtual interface. I wrote 10 line…
»
Mārtiņš Možeiko
And how you imagine using such functions with different return types? 1 2 3Object *blah; WhatTy…
»
Ritchie Brannan
Basically there is far less code involved if you use a virtual interface.
»
Ritchie Brannan
..and your functions can all have different return values. The entire function signature can be d…
»
Mārtiņš Možeiko
Well for one thing, your functions can all have different parameter lists. So are functions in OP…
»
Ritchie Brannan
Well for one thing, your functions can all have different parameter lists. From a code stand poi…
»
Mārtiņš Možeiko
How using C++ with virtual interface is simpler than regular C functions? 1 2 3 4 5 6 7 8…
»
Ritchie Brannan
If you are prepared to use a little C++ this can be a lot simpler. Create a pure virtual interfa…
»
Roderic Bos
Thanks for your answer, luckily I have the code, so when you showed the audio stuff I can run fro…
»
Benjamin Kloster
If code verbosity is what you are worried about, pull the switch statement out into its own funct…
»
Jon Valdes
Well, it's just 1 line of code regardless of how many possible scenes you have. A switch statemen…
»
Casey Muratori
Because there is so much to cover making a whole game from scratch, I had to keep the scope reaso…
»
Casey Muratori
OK, so next obligatory question: what makes it "simpler" to use function pointers instead of usin…
»
Jon Valdes
Hi Casey, They're different "update and render" functions for the different "scenes" in the game…
»
Casey Muratori
So, mandatory first question here: what do you mean by "fixing function pointers after a DLL relo…
»
Casey Muratori
Unfortunately v2/v3/v4 are actually not as optimize-able on SSE as one might want, because SSE is…
»