1 ----------------------------------------------------------------------------
3 Fatal Error Listing Library (FELL) documentation
5 ----------------------------------------------------------------------------
10 A simple system for handing different types of list displays, like the
11 inventory screen of the game or a high score list.
19 A class that loads, saves and handles highscore files.
21 highscore(std::string File = "HScore.dat")
23 Creates the class and loads a highscore file with specified
26 Add(long NewScore, std::string NewEntry)
28 Adds a new score entry. The class automatically places the
29 current score to its appropriate position in the list and
30 resizes the list size to one hundred if its longer than that.
31 NewEntry should contain the name of player and the cause of
37 HScore.Add(-1234, "Bill, died of bloodloss after Perttu ate his nuts");
41 Result: Bill is (most likely) placed at the bottom of the score list
42 and the list is drawn onto the screen.
46 Draws the highscore list and waits for keypress.
48 Save(std::string File)
50 Saves the highscore list.
52 Load(std::string File)
54 Loads a highscore list. Normally called only by the constructor.
59 A simple list class containing list data and draw-to-screen functions.
63 Creates an empty list with no topic.
65 list(std::string Topic)
67 Creates an empty list with topic Topic.
69 AddString(std::string S)
71 Adds an element to the list.
73 AddDescription(std::string S)
75 Adds a description to the list. Descriptions are drawn above other
76 list items and they cannot be selected by alphabet keys. Topic
77 counts as the first description.
79 std::string GetString(ushort Index)
81 Returns a previously added element of the list.
85 Returns the total amount of previously added elements.
87 dynarray<std::string>* CString()
89 Returns a pointer to the dynamic element array.
91 ushort Draw(bool WillDrawNumbers)
93 Draws the list onto the screen above the current DoubleBuffer in
94 20 element sections and waits for keypress. WillDrawNumbers
95 determines whether individual alphabet letters are drawn before
96 every element. Pressing the key of element's letter causes the
97 function to terminate and return the index of the element selected,
98 or 0xFFFE if '-' was pressed, 0xFFFD if Escape was pressed and
99 0xFFFF if an illegal key (not of any element nor '-' or Esc) was
104 list List("Choose your lord:");
107 List.Add("Santa Claus");
110 ADD_MESSAGE("Suddenly the dungeon just crashes.");
111 game::CPlayer()->CHP(-98);
112 game::CPlayer()->CheckDeath("crashed horribly");
119 Draws the description strings. Only used by Draw().
123 Removes all previously added string elements from the list.
124 Descriptions, however, are not affected.
126 ----------------------------------------------------------------------------