Handmade Network»Forums
2 posts
#define and typedef DIRECT_SOUND_CREATE
Why is Casey using a #define for DIRECT_SOUND_CREATE? I can see that with the X_INPUT macros he is saving writing the full definitions twice. But DIRECT_SOUND_CREATE is only used once. Is the #define really necessary?
Mārtiņš Možeiko
2559 posts / 2 projects
#define and typedef DIRECT_SOUND_CREATE
Because he is used to declare function pointers with this kind of macro. It just a habit thing.
2 posts
#define and typedef DIRECT_SOUND_CREATE
But in this case it is not necessary right?
Mārtiņš Možeiko
2559 posts / 2 projects
#define and typedef DIRECT_SOUND_CREATE
It is not necessary in any case. You can always type full function signature in all the places where its needed. And it will work fine.