about summary refs log tree commit diff stats
path: root/data/maps/the_relentless/metadata.txtpb
blob: 95151456a4b9b24543f600085803225c659a8105 (plain) (blame)
1
display_name: "The Relentless"
eral.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 */
#ifndef SUBWAY_MAP_H_BD2D843E
#define SUBWAY_MAP_H_BD2D843E

#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>

#include <quadtree/Quadtree.h>

#include "game_data.h"
#include "network_set.h"

class SubwayMap : public wxPanel {
 public:
  SubwayMap(wxWindow *parent);

  void OnConnect();
  void UpdateIndicators();
  void UpdateSunwarp(SubwaySunwarp from_sunwarp, SubwaySunwarp to_sunwarp);

 private:
  void OnPaint(wxPaintEvent &event);
  void OnMouseMove(wxMouseEvent &event);

  void Redraw();

  wxPoint MapPosToRenderPos(wxPoint pos) const;
  wxPoint RenderPosToMapPos(wxPoint pos) const;

  wxImage map_image_;
  wxImage owl_image_;
  wxBitmap unchecked_eye_;
  wxBitmap checked_eye_;

  wxBitmap rendered_;
  int render_x_ = 0;
  int render_y_ = 0;
  int render_width_ = 0;
  int render_height_ = 0;

  struct GetItemBox {
    quadtree::Box<float> operator()(const int &id) const;
  };
  
  std::unique_ptr<quadtree::Quadtree<int, GetItemBox>> tree_;
  std::optional<int> hovered_item_;

  NetworkSet networks_;
  std::set<std::string> checked_paintings_;
};

#endif /* end of include guard: SUBWAY_MAP_H_BD2D843E */