Initial cleanup for the help print-outs

This commit is contained in:
dingusdev 2020-10-13 20:20:44 -07:00
parent 90b2eb712a
commit 4c0c32c02c
2 changed files with 8 additions and 18 deletions

View File

@ -33,6 +33,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <fstream> #include <fstream>
#include <functional> #include <functional>
#include <iostream> #include <iostream>
#include <iomanip>
#include <map> #include <map>
#include <memory> #include <memory>
#include <vector> #include <vector>
@ -67,11 +68,11 @@ static const map<uint32_t, std::tuple<string, const char*>> rom_identity = {
static const PropMap GossamerSettings = { static const PropMap GossamerSettings = {
{"rambank1_size", {"rambank1_size",
new IntProperty(256, vector<uint32_t>({8, 16, 64, 128, 256}))}, new IntProperty(256, vector<uint32_t>({8, 16, 32, 64, 128, 256}))},
{"rambank2_size", {"rambank2_size",
new IntProperty( 0, vector<uint32_t>({0, 8, 16, 64, 128, 256}))}, new IntProperty( 0, vector<uint32_t>({0, 8, 16, 32, 64, 128, 256}))},
{"rambank3_size", {"rambank3_size",
new IntProperty( 0, vector<uint32_t>({0, 8, 16, 64, 128, 256}))}, new IntProperty( 0, vector<uint32_t>({0, 8, 16, 32, 64, 128, 256}))},
{"gfxmem_size", {"gfxmem_size",
new IntProperty( 2, vector<uint32_t>({2, 4, 6}))}, new IntProperty( 2, vector<uint32_t>({2, 4, 6}))},
}; };
@ -84,7 +85,7 @@ static const map<string, string> PropHelp = {
}; };
static const map<string, tuple<PropMap, function<int(void)>, string>> machines = { static const map<string, tuple<PropMap, function<int(void)>, string>> machines = {
{"pmg3", {GossamerSettings, create_gossamer, "PowerMacintosh G3 (Beige)"}}, {"pmg3", {GossamerSettings, create_gossamer, "Power Macintosh G3 (Beige)"}},
}; };
string machine_name_from_rom(string& rom_filepath) { string machine_name_from_rom(string& rom_filepath) {
@ -180,7 +181,7 @@ void list_machines() {
cout << endl << "Supported machines:" << endl << endl; cout << endl << "Supported machines:" << endl << endl;
for (auto& mach : machines) { for (auto& mach : machines) {
cout << mach.first << "\t\t" << get<2>(mach.second) << endl; cout << setw(13) << mach.first << "\t\t" << get<2>(mach.second) << endl;
} }
cout << endl; cout << endl;
@ -190,10 +191,10 @@ void list_properties() {
cout << endl; cout << endl;
for (auto& mach : machines) { for (auto& mach : machines) {
cout << get<2>(mach.second) << " properties:" << endl << endl; cout << get<2>(mach.second) << " supported properties:" << endl << endl;
for (auto& p : get<0>(mach.second)) { for (auto& p : get<0>(mach.second)) {
cout << p.first << "\t\t" << PropHelp.at(p.first) << endl << endl; cout << setw(13) << p.first << "\t\t" << PropHelp.at(p.first) << endl << endl;
} }
} }

View File

@ -47,17 +47,6 @@ static string appDescription = string(
"\n" "\n"
); );
void display_recognized_machines() {
std::cout << " " << endl;
std::cout << "The following machines are supported by DingusPPC: " << endl;
std::cout << "___________________________________________________" << endl;
std::cout << "| COMMAND | MACHINE RECOGNIZED |" << endl;
std::cout << "___________________________________________________" << endl;
std::cout << " pmg3 | Power Mac G3 Beige " << endl;
std::cout << " pm6100 | Power Mac 6100 " << endl;
std::cout << " " << endl;
}
int main(int argc, char** argv) { int main(int argc, char** argv) {
/* /*
Execution Type: Execution Type: