diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 08:41:20 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 08:41:20 +0000 |
commit | 1d0f57cbceb778139ca215cc4fcfd1584951f6dd (patch) | |
tree | cafd60c944c51fcce778aa5d6912bc548c518339 /crawl-ref/source/notes.h | |
parent | 6f5e187a9e5cd348296dba2fd89d2e206e775a01 (diff) | |
download | crawl-ref-1d0f57cbceb778139ca215cc4fcfd1584951f6dd.tar.gz crawl-ref-1d0f57cbceb778139ca215cc4fcfd1584951f6dd.zip |
Merged stone_soup r15:451 into trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/notes.h')
-rw-r--r-- | crawl-ref/source/notes.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/crawl-ref/source/notes.h b/crawl-ref/source/notes.h new file mode 100644 index 0000000000..882fe81250 --- /dev/null +++ b/crawl-ref/source/notes.h @@ -0,0 +1,67 @@ +/* + * File: notes.cc + * Summary: Notetaking stuff + * Written by: Haran Pilpel + * + * Change History (most recent first): + * + * <1> -/--/-- PH Created + */ + +#ifndef NOTES_H +#define NOTES_H + +#include <string> +#include <vector> +#include <stdio.h> + +enum NOTE_TYPES { + NOTE_HP_CHANGE = 0, /* needs: new hp, max hp */ + NOTE_MAXHP_CHANGE, /* needs: new maxhp */ + NOTE_MP_CHANGE, /* needs: new mp, max mp */ + NOTE_MAXMP_CHANGE, /* needs: new maxmp */ + NOTE_XP_LEVEL_CHANGE, /* needs: new xplevel */ + NOTE_DUNGEON_LEVEL_CHANGE, /* needs: branch, subdepth */ + NOTE_LEARN_SPELL, /* needs: spell idx */ + NOTE_GET_GOD, /* needs: god id */ + NOTE_GOD_GIFT, /* needs: god id */ + NOTE_GOD_POWER, /* needs: god id, idx */ + NOTE_GET_MUTATION, /* needs: mutation idx */ + NOTE_LOSE_MUTATION, /* needs: mutation idx */ + NOTE_ID_ITEM, /* needs: item name (string) */ + /* NOT HOOKED YET */ + NOTE_GET_ITEM, /* needs: item name (string) */ + NOTE_GAIN_SKILL, /* needs: skill id, level */ + NOTE_SEEN_MONSTER, /* needs: monster name (string) */ + NOTE_KILL_MONSTER, /* needs: monster name (string) */ + NOTE_POLY_MONSTER, /* needs: monster name (string) */ + NOTE_USER_NOTE, /* needs: description string */ + NOTE_MESSAGE, /* needs: message string */ + NOTE_LOSE_GOD, /* needs: god id */ + NOTE_NUM_TYPES +}; + +struct Note { + Note(); + Note( NOTE_TYPES t, int f = 0, int s = 0, const char* n = 0, + const char* d = 0); + NOTE_TYPES type; + int first, second; + long turn; + unsigned short packed_place; + std::string name; + std::string desc; + void load( FILE* fp ); + void save( FILE* fp ) const; +}; + +extern std::vector<Note> note_list; +std::string describe_note( const Note& note ); +void activate_notes( bool active ); +bool notes_are_active(); +void take_note( const Note& note ); +void save_notes( FILE* fp ); +void load_notes( FILE* fp ); +void make_user_note(); + +#endif |