summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg.h
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-18 13:46:12 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-18 13:46:12 +0000
commit1f0b02a561dc32e9d8781e7503cc6258bad2cd02 (patch)
treea0ad43341b4dea0356f0a80d9204bafc3dbeda1b /crawl-ref/source/tilereg.h
parentcec34e68c2361ea28ceca489acd73e41d6a473c7 (diff)
downloadcrawl-ref-1f0b02a561dc32e9d8781e7503cc6258bad2cd02.tar.gz
crawl-ref-1f0b02a561dc32e9d8781e7503cc6258bad2cd02.zip
Reimplementing playing with dolls ('-' command). Keys are mostly the same as the 0.4 version and are documented.
Dolls are no longer limited in what features they can force, so your character can always look like a flaming centaur with wings if that's how you want to present yourself. This shouldn't cause any major breakage with save games or dolls.txt files, although expect some weirdness. Sorry. Also, fixed a bug where barding wasn't appearing on nagas or centaurs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10568 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilereg.h')
-rw-r--r--crawl-ref/source/tilereg.h57
1 files changed, 56 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg.h b/crawl-ref/source/tilereg.h
index f6f687b84c..3ea855a493 100644
--- a/crawl-ref/source/tilereg.h
+++ b/crawl-ref/source/tilereg.h
@@ -424,13 +424,21 @@ protected:
bool m_far_view;
};
-class TitleRegion : public Region
+// An abstract tiles-only region that takes control over all input.
+class ControlRegion : public Region
+{
+public:
+ virtual void run() = 0;
+};
+
+class TitleRegion : public ControlRegion
{
public:
TitleRegion(int width, int height);
virtual void render();
virtual void clear() {};
+ virtual void run();
virtual int handle_mouse(MouseEvent &event) { return 0; }
@@ -440,5 +448,52 @@ protected:
GenericTexture m_img;
VertBuffer<PTVert> m_buf;
};
+
+enum tile_doll_mode
+{
+ TILEP_MODE_EQUIP = 0, // draw doll based on equipment
+ TILEP_MODE_LOADING = 1, // draw doll based on dolls.txt definitions
+ TILEP_MODE_DEFAULT = 2, // draw doll based on job specific definitions
+ TILEP_MODE_MAX
+};
+
+class DollEditRegion : public ControlRegion
+{
+public:
+ DollEditRegion(ImageManager *im, FTFont *font);
+
+ virtual void render();
+ virtual void clear();
+ virtual void run();
+
+ virtual int handle_mouse(MouseEvent &event);
+protected:
+ virtual void on_resize() {}
+
+ // Currently edited doll index.
+ int m_doll_idx;
+ // Currently edited category of parts.
+ int m_cat_idx;
+ // Current part in current category.
+ int m_part_idx;
+
+ // Set of loaded dolls.
+ dolls_data m_dolls[NUM_MAX_DOLLS];
+
+ dolls_data m_player;
+ dolls_data m_job_default;
+ dolls_data m_doll_copy;
+ bool m_copy_valid;
+
+ tile_doll_mode m_mode;
+
+ FTFont *m_font;
+
+ ShapeBuffer m_shape_buf;
+ FontBuffer m_font_buf;
+ TileBuffer m_tile_buf;
+ TileBuffer m_cur_buf;
+};
+
#endif
#endif