about summary refs log tree commit diff stats
path: root/data/maps/the_bearer/rooms/Overlook.txtpb
blob: 9eadf8f37ccbe877107feeeb204a9ad3328b4e96 (plain) (blame)
1
name: "Overlook"
g.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include "options_pane.h"

#include "ap_state.h"

namespace {

const char* kDoorShuffleLabels[] = {"None", "Panels", "Doors"};
const char* kLocationChecksLabels[] = {"Normal", "Reduced", "Insanity"};
const char* kPanelShuffleLabels[] = {"None", "Rearrange"};
const char* kVictoryConditionLabels[] = {"The End", "The Master", "Level 2",
                                         "Pilgrimage"};
const char* kSunwarpAccessLabels[] = {"Normal", "Disabled", "Unlock",
                                      "Individual", "Progressive"};

void AddRow(wxDataViewListCtrl* list, const std::string& text) {
  wxVector<wxVariant> data;
  data.push_back(wxVariant{text + ": "});
  data.push_back(wxVariant{""});
  list->AppendItem(data);
}

}  // namespace

OptionsPane::OptionsPane(wxWindow* parent)
    : wxDataViewListCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
                         wxDV_ROW_LINES) {
  AppendTextColumn("Name", wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE);
  AppendTextColumn("Value");
  AddRow(this, "Shuffle Doors");
  AddRow(this, "Group Doors");
  AddRow(this, "Location Checks");
  AddRow(this, "Shuffle Colors");
  AddRow(this, "Shuffle Panels");
  AddRow(this, "Shuffle Paintings");
  AddRow(this, "Victory Condition");
  AddRow(this, "Early Color Hallways");
  AddRow(this, "Shuffle Postgame");
  AddRow(this, "Enable Pilgrimage");
  AddRow(this, "Pilgrimage Roof Access");
  AddRow(this, "Pilgrimage Paintings");
  AddRow(this, "Sunwarp Access");
  AddRow(this, "Shuffle Sunwarps");
  AddRow(this, "Mastery Achievements");
  AddRow(this, "Level 2 Requirement");
}

void OptionsPane::OnConnect() {
  SetTextValue(kDoorShuffleLabels[static_cast<size_t>(AP_GetDoorShuffleMode())],
               0, 1);
  SetTextValue(AP_AreDoorsGrouped() ? "Yes" : "No", 1, 1);
  SetTextValue(
      kLocationChecksLabels[static_cast<size_t>(AP_GetLocationsChecks())], 2,
      1);
  SetTextValue(AP_IsColorShuffle() ? "Yes" : "No", 3, 1);
  SetTextValue(
      kPanelShuffleLabels[static_cast<size_t>(AP_GetPanelShuffleMode())], 4, 1);
  SetTextValue(AP_IsPaintingShuffle() ? "Yes" : "No", 5, 1);
  SetTextValue(
      kVictoryConditionLabels[static_cast<size_t>(AP_GetVictoryCondition())], 6,
      1);
  SetTextValue(AP_HasEarlyColorHallways() ? "Yes" : "No", 7, 1);
  SetTextValue(AP_IsPostgameShuffle() ? "Yes" : "No", 8, 1);
  SetTextValue(AP_IsPilgrimageEnabled() ? "Yes" : "No", 9, 1);
  SetTextValue(AP_DoesPilgrimageAllowRoofAccess() ? "Yes" : "No", 10, 1);
  SetTextValue(AP_DoesPilgrimageAllowPaintings() ? "Yes" : "No", 11, 1);
  SetTextValue(kSunwarpAccessLabels[static_cast<size_t>(AP_GetSunwarpAccess())],
               12, 1);
  SetTextValue(AP_IsSunwarpShuffle() ? "Yes" : "No", 13, 1);
  SetTextValue(std::to_string(AP_GetMasteryRequirement()), 14, 1);
  SetTextValue(std::to_string(AP_GetLevel2Requirement()), 15, 1);
}