Update to v094r37 release.

byuu says:

Changelog:
- synchronizes lots of nall changes
- changes displayed program title from tomoko to higan(*)
- browser dialog sort is case-insensitive
- .sys folders look at user-selected library path; no longer hard-coded

Tried to get rid of the file modes from the Windows browser dialog, but
it was being a bitch so I left it on for now.

- The storage locations and binary still use tomoko. I'm not really sure
  what to do here. The idea is there may be more than one "higan" UI in
  the future, but I don't want people to go around calling the entire
  program by the UI name. For official Windows releases, I can rename
  the binaries to "higan-{profile}.exe", and by putting the config files
  with the binary, they won't ever see the tomoko folder. Linux is of
  course trickier.

Note: Windows users will need to edit hiro/components.hpp and comment
out these lines:

 #define Hiro_Console
 #define Hiro_IconView
 #define Hiro_SourceView
 #define Hiro_TreeView

I forgot to do that, and too lazy to upload another WIP.
This commit is contained in:
Tim Allen
2015-07-14 19:32:43 +10:00
parent ecb35cac33
commit 092cac9073
81 changed files with 1670 additions and 1467 deletions

View File

@@ -9,45 +9,47 @@ template<typename T, typename U> struct map {
struct node_t {
T key;
U value;
bool operator< (const node_t& source) const { return key < source.key; }
bool operator==(const node_t& source) const { return key == source.key; }
node_t() = default;
node_t(const T& key) : key(key) {}
node_t(const T& key, const U& value) : key(key), value(value) {}
auto operator< (const node_t& source) const -> bool { return key < source.key; }
auto operator==(const node_t& source) const -> bool { return key == source.key; }
};
maybe<U&> find(const T& key) const {
auto find(const T& key) const -> maybe<U&> {
if(auto node = root.find({key})) return node().value;
return nothing;
}
void insert(const T& key, const U& value) { root.insert({key, value}); }
void remove(const T& key) { root.remove({key}); }
unsigned size() const { return root.size(); }
void reset() { root.reset(); }
auto insert(const T& key, const U& value) -> void { root.insert({key, value}); }
auto remove(const T& key) -> void { root.remove({key}); }
auto size() const -> unsigned { return root.size(); }
auto reset() -> void { root.reset(); }
typename set<node_t>::iterator begin() { return root.begin(); }
typename set<node_t>::iterator end() { return root.end(); }
const typename set<node_t>::iterator begin() const { return root.begin(); }
const typename set<node_t>::iterator end() const { return root.end(); }
auto begin() -> typename set<node_t>::iterator { return root.begin(); }
auto end() -> typename set<node_t>::iterator { return root.end(); }
auto begin() const -> const typename set<node_t>::iterator { return root.begin(); }
auto end() const -> const typename set<node_t>::iterator { return root.end(); }
protected:
set<node_t> root;
};
template<typename T, typename U> struct bimap {
maybe<U&> find(const T& key) const { return tmap.find(key); }
maybe<T&> find(const U& key) const { return umap.find(key); }
void insert(const T& key, const U& value) { tmap.insert(key, value); umap.insert(value, key); }
void remove(const T& key) { if(auto p = tmap.find(key)) { umap.remove(p().value); tmap.remove(key); } }
void remove(const U& key) { if(auto p = umap.find(key)) { tmap.remove(p().value); umap.remove(key); } }
unsigned size() const { return tmap.size(); }
void reset() { tmap.reset(); umap.reset(); }
auto find(const T& key) const -> maybe<U&> { return tmap.find(key); }
auto find(const U& key) const -> maybe<T&> { return umap.find(key); }
auto insert(const T& key, const U& value) -> void { tmap.insert(key, value); umap.insert(value, key); }
auto remove(const T& key) -> void { if(auto p = tmap.find(key)) { umap.remove(p().value); tmap.remove(key); } }
auto remove(const U& key) -> void { if(auto p = umap.find(key)) { tmap.remove(p().value); umap.remove(key); } }
auto size() const -> unsigned { return tmap.size(); }
auto reset() -> void { tmap.reset(); umap.reset(); }
typename set<typename map<T, U>::node_t>::iterator begin() { return tmap.begin(); }
typename set<typename map<T, U>::node_t>::iterator end() { return tmap.end(); }
const typename set<typename map<T, U>::node_t>::iterator begin() const { return tmap.begin(); }
const typename set<typename map<T, U>::node_t>::iterator end() const { return tmap.end(); }
auto begin() -> typename set<typename map<T, U>::node_t>::iterator { return tmap.begin(); }
auto end() -> typename set<typename map<T, U>::node_t>::iterator { return tmap.end(); }
auto begin() const -> const typename set<typename map<T, U>::node_t>::iterator { return tmap.begin(); }
auto end() const -> const typename set<typename map<T, U>::node_t>::iterator { return tmap.end(); }
protected:
map<T, U> tmap;