Reputation: 2059
SDL_Color normColor = {255,255,255};
SDL_Color redColor = {255,0,0};
SDL_Color blackColor = { 0,0,0 };
etc.
What kind of array do I need to do something like:
typeofarray mycolorArray[95] = {normColor, redColor, blackColor..............};
....
mycolorArray[65] = redColor // to change the color
Upvotes: 0
Views: 1841
Reputation:
How about instead of arrays, you use enum
instead?
or Class based example with enum.
Upvotes: 0
Reputation: 2558
SDL_Color sdlColors[] = {normColor, redColor, blackColor..............};
Upvotes: 2