Code:
/* Use a slightly unusual include method to create effect_list[] */ static const char *effect_list[] = { #define EFFECT(x, y, r, z) #x, #include "list-effects.h" #undef EFFECT };
Code:
EFFECT(XXX, FALSE, 0, NULL) EFFECT(POISON, FALSE, 0, "poisons you for 2d7+10 turns") EFFECT(BLIND, FALSE, 0, "blinds you for 4d25+75 turns") EFFECT(SCARE, FALSE, 0, "induces fear in you for 1d10+10 turns")
My problem is that I don't know exactly what "#define EFFECT(x, y, r, z) #x," does and I need to change it because the "XXX" etc. are being treated as narrow text strings (8bit) and I either need to make them wide (16bit) or work out how to get it to compile while they are still narrow.
So I'd really like to know what the "slightly unusual include method" is.
Comment