Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor sa2's settingshelper so that the slot/card configs can be shared with PreferencesViewController #49

Open
sh95014 opened this issue Dec 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sh95014
Copy link
Owner

sh95014 commented Dec 28, 2024

Describe the bug

settingshelper.cpp:

  const std::map<size_t, std::vector<SS_CARDTYPE>> cardsForSlots =
    {
      {0, {CT_Empty, CT_LanguageCard, CT_Saturn128K}},
      {1, {CT_Empty, CT_GenericPrinter, CT_Uthernet2}},
      {2, {CT_Empty, CT_SSC, CT_Uthernet2}},
      {3, {CT_Empty, CT_Uthernet, CT_Uthernet2, CT_VidHD}},
      {4, {CT_Empty, CT_MockingboardC, CT_MegaAudio, CT_SDMusic, CT_MouseInterface, CT_Phasor, CT_Uthernet2}},
      {5, {CT_Empty, CT_MockingboardC, CT_MegaAudio, CT_SDMusic, CT_Disk2, CT_GenericHDD, CT_Phasor, CT_Uthernet2, CT_Z80, CT_SAM, CT_FourPlay, CT_SNESMAX}},
      {6, {CT_Empty, CT_Disk2, CT_Uthernet2}},
      {7, {CT_Empty, CT_GenericHDD, CT_Uthernet2}},
    };

    const std::vector<SS_CARDTYPE> expansionCards =
      {CT_Empty, CT_LanguageCard, CT_Extended80Col, CT_Saturn128K, CT_RamWorksIII};

PreferencesViewController.mm:

const SS_CARDTYPE slot0Types[] = { CT_LanguageCard, CT_Saturn128K, CT_Empty };
const SS_CARDTYPE slot1Types[] = { CT_GenericPrinter, CT_Uthernet2, CT_Empty };
const SS_CARDTYPE slot2Types[] = { CT_SSC, CT_Uthernet2, CT_Empty };
const SS_CARDTYPE slot3Types[] = { CT_Uthernet, CT_Uthernet2, CT_VidHD, CT_Empty };
const SS_CARDTYPE slot4Types[] = { CT_MockingboardC, CT_MegaAudio, CT_SDMusic, CT_MouseInterface, CT_Phasor, CT_Uthernet2, CT_Empty };
const SS_CARDTYPE slot5Types[] = { CT_MockingboardC, CT_MegaAudio, CT_SDMusic, CT_Z80, CT_SAM, CT_Disk2, CT_Phasor, CT_FourPlay, CT_SNESMAX, CT_Uthernet2, CT_Empty };
const SS_CARDTYPE slot6Types[] = { CT_Disk2, CT_Uthernet2, CT_Empty };
const SS_CARDTYPE slot7Types[] = { CT_GenericHDD, CT_Uthernet2, CT_Empty };
const SS_CARDTYPE *slotTypes[] = {
    slot0Types, slot1Types, slot2Types, slot3Types, slot4Types, slot5Types,
    slot6Types, slot7Types,
};

const SS_CARDTYPE expansionSlotTypes[] = { CT_LanguageCard, CT_Extended80Col, CT_Saturn128K, CT_RamWorksIII, CT_Empty };
@sh95014 sh95014 added the enhancement New feature or request label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant