Fermer2
Mega ShockedLe 17/08/2018 à 03:15
This compiles fine....of course just some standard defines...

#define PLAYER1_NAME KEN #define PLAYER1_JOY JoystickKEN #define PLAYER1_GFX (spriteInfo*)KEN #define PLAYER1_PAL (paletteInfo*)KEN_Palettes
Curious if something like this is possible...I believe the syntax is right but I can't compile it via NeoDev

#define PLAYER1_NAME KEN #define PLAYER1_JOY Joystick##PLAYER1_NAME #define PLAYER1_GFX (spriteInfo*)PLAYER1_NAME #define PLAYER1_PAL (paletteInfo*)PLAYER1_NAME##_Palettes
The point is to just declare a character name and the prepocessor does the rest.