- Got the new dialog engine into a semi-functional, mostly crash-free state!

- Created constants for the number of monster and terrain sheets, so that we can easily add more.
- Added init_sheets() function to initialize cPict's static variables.
- Moved the code for checking for an interrupt key out into a separate function so that it can be used elsewhere as well.
- Added error checking to make sure a sheet exists before drawing from it. (Note: Will need to catch the exception and draw a blank rather than simply terminating.)
- Fixed bug where status icons were drawn instead of terrain map icons.

git-svn-id: http://openexile.googlecode.com/svn/trunk@99 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-06-20 00:06:55 +00:00
parent 2c5faa51c3
commit e5ac5db275
16 changed files with 446 additions and 259 deletions

View File

@@ -991,12 +991,12 @@ void load_spec_graphics()
dlogpics_gworld = load_pict("dlogpics.png",univ.party.scen_name);
status_gworld = load_pict("staticons.png",univ.party.scen_name);
for (i = 0; i < 11; i++){
for (i = 0; i < NUM_MONST_SHEETS; i++){
std::ostringstream sout;
sout << "monst" << i + 1 << ".png";
monst_gworld[i] = load_pict(sout.str(),univ.party.scen_name);
}
for (i = 0; i < 7; i++){
for (i = 0; i < NUM_TER_SHEETS; i++){
std::ostringstream sout;
sout << "ter" << i + 1 << ".png";
terrain_gworld[i] = load_pict(sout.str(),univ.party.scen_name);

View File

@@ -10,7 +10,10 @@
#define GRAPHTOOL_H
#include <Carbon/Carbon.h>
#include <string>
#define LINES_IN_TEXT_WIN 11
#define LINES_IN_TEXT_WIN 11
#define NUM_TER_SHEETS 7
#define NUM_MONST_SHEETS 11
enum cursor_type {
wand_curs = 0,