fragglet / sdl-sopwith

Classic bi-plane shoot-'em up
https://fragglet.github.io/sdl-sopwith
GNU General Public License v2.0
66 stars 13 forks source link

Add color palette selection to menu and configuration #29

Closed techknight closed 7 months ago

techknight commented 7 months ago

Summary

When I saw the #IFDEF LCD preprocessor directive in video.c, I got interested in adding a color palette that similarly replicates my own original experience with Sopwith, except on an amber monochrome CGA monitor.

Idea

If it's not too big of a change, I'd like to promote that color palette option from preprocessor directive to full configuration option in the menu.

Example

I roughed together a quick example of what this feature could look like, by adding a new configuration option with a new type:

    {"conf_video_palette",  CONF_INT, {&conf_video_palette}},

sopwith-colors (press the play button to see the colour palette change)

Questions

  1. Would it be more in-line with the spirit of things to simply add my own preprocessor directive instead?
  2. If added, is implementing a CONF_INT the best way to do it?
  3. Since the configuration menu is filling up in terms of numbered options, would a submenu accessed using a letter be preferable? (Similar to how keybindings has its own submenu)
fragglet commented 7 months ago

Nice :) I approve. To answer your questions:

  1. No #defines, please just add it as a full feature.
  2. Yes, CONF_INT is fine.
  3. No, let's stick with the one menu for now - there's plenty more screen space for more options for the time being, and we can always use other keys beyond the numbers. Though I do want to be selective about the features we add.

A few thoughts:

Thanks!