summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stash.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-12-14 15:56:54 +0100
committerAdam Borowski <kilobyte@angband.pl>2010-12-16 16:53:02 +0100
commit28b815a469419b7ab6ac7d88e7ce41aac34d83da (patch)
tree212289174f5b51699ef06df8e1533d15eac02e30 /crawl-ref/source/stash.h
parent1e52b0fc52905ca92e10a42eafd8fce40e321ed6 (diff)
downloadcrawl-ref-28b815a469419b7ab6ac7d88e7ce41aac34d83da.tar.gz
crawl-ref-28b815a469419b7ab6ac7d88e7ce41aac34d83da.zip
Convert ofstream to fprintf() for stash dumps. Translate charsets.
Using ofstream requires huge hacks on Polish/Russian/etc Windows, and is outright impossible on Vietnamese.
Diffstat (limited to 'crawl-ref/source/stash.h')
-rw-r--r--crawl-ref/source/stash.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/crawl-ref/source/stash.h b/crawl-ref/source/stash.h
index 1138305b31..8b3148bad5 100644
--- a/crawl-ref/source/stash.h
+++ b/crawl-ref/source/stash.h
@@ -10,7 +10,6 @@
#include "shopping.h"
#include <string>
-#include <iostream>
#include <map>
#include <vector>
@@ -68,7 +67,7 @@ public:
stash_search_result &res)
const;
- void write(std::ostream &os, int refx = 0, int refy = 0,
+ void write(FILE *f, int refx = 0, int refy = 0,
std::string place = "",
bool identify = false) const;
@@ -138,7 +137,7 @@ public:
bool show_menu(const level_pos &place, bool can_travel) const;
bool is_visited() const { return items.size() || visited; }
- void write(std::ostream &os, bool identify = false) const;
+ void write(FILE *f, bool identify = false) const;
void reset() { items.clear(); visited = true; }
void set_name(const std::string& s) { name = s; }
@@ -210,8 +209,6 @@ struct stash_search_result
}
};
-extern std::ostream &operator << (std::ostream &, const Stash &);
-
class LevelStashes
{
public:
@@ -253,7 +250,7 @@ public:
void save(writer&) const;
void load(reader&);
- void write(std::ostream &os, bool identify = false) const;
+ void write(FILE *f, bool identify = false) const;
std::string level_name() const;
std::string short_level_name() const;
@@ -280,8 +277,6 @@ public:
friend class ST_ItemIterator;
};
-extern std::ostream &operator << (std::ostream &, const LevelStashes &);
-
class StashTracker
{
public:
@@ -336,7 +331,7 @@ public:
void save(writer&) const;
void load(reader&);
- void write(std::ostream &os, bool identify = false) const;
+ void write(FILE *f, bool identify = false) const;
void dump(const char *filename, bool identify = false) const;