In no particular order:

- Added some of the most basic dialogs
- Changed C-style <xxx.h> headers to C++-style <cxxx> headers
- Switched graphics to load from the PNG files in graphics.exd rather than from Blades of Exile Graphics (NOTE: Some graphics still don't work, probably because of incorrect source rects)
- Switched cursors to load from GIF files in graphics.exd rather than from Blades of Exile Graphics
- Moved Niemand's tileImage functions from boe.graphics.cpp to graphtool.cpp, so they can be used by all three programs.
- Added some string lists in .txt files
- Made cursors into an enum
- Rewrote the code for displaying the Edit Terrain dialog to use the new engine (not tested yet)
- Fixed some __attribute__((deprecated)) stuff
- Most graphics are now loaded just after the custom graphics. This means they will be overridden by a file of the same name in the scenario's .exr folder.
- Altered modes a little so that when at the startup screen you are in MODE_STARTUP rather than MODE_OUTDOORS.
- Switched from function pointers to boost::function – the Boost libraries are now required.
- Finished off the new dialog engine and made gess necessary
- Added status icons as another type that can be drawn in dialogs
- C Wrappers for Cocoa cursors based on an Apple example. This is tested, and works perfectly.
- Added a switch in the program for using Windows graphics; however, there is no way as yet to set this flag, and in fact there aren't even any Windows graphics to use.
- Added include guards to graphtool.h
- Made separate mac and win directories within sounds.exa, since the Mac and Windows sounds are mostly subtly different (with two completely different!)

git-svn-id: http://openexile.googlecode.com/svn/trunk@90 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-06-07 18:18:24 +00:00
parent 91f5435b9d
commit 78cd213972
129 changed files with 2919 additions and 1061 deletions

View File

@@ -5,17 +5,50 @@
* Created by Celtic Minstrel on 16/04/09.
*
*/
#ifndef GRAPHTOOL_H
#define GRAPHTOOL_H
#include <string>
#define LINES_IN_TEXT_WIN 11
enum cursor_type {
wand_curs = 0,
eyedropper_curs = 1,
brush_curs = 2,
spray_curs = 3,
eraser_curs = 4,
topleft_curs = 5,
bottomright_curs = 6,
hand_curs = 7,
NW_curs = 8,
N_curs = 9,
NE_curs = 10,
W_curs = 11,
wait_curs = 12,
E_curs = 13,
SW_curs = 14,
S_curs = 15,
SE_curs = 16,
sword_curs = 17,
boot_curs = 18,
drop_curs = 19,
target_curs = 20,
talk_curs = 21,
key_curs = 22,
look_curs = 23,
};
struct m_pic_index_t {
unsigned char i, x, y;
};
typedef unsigned short pic_num_t;
void init_graph_tool(void (*redraw_callback)(),Point* p);
GWorldPtr load_pict(int picture_to_get);
void clean_up_graphtool();
GWorldPtr load_pict(std::string picture_to_get, std::string scen_name = "");
GWorldPtr load_pict(int picture_to_get) __attribute__((deprecated));
GWorldPtr load_bmp(unsigned char *data, unsigned long length);
void set_cursor(short which_curs);
void set_cursor(cursor_type which_curs);
void restore_cursor();
void rect_draw_some_item (GWorldPtr src_gworld,Rect src_rect,GWorldPtr targ_gworld,Rect targ_rect,
char masked,short main_win);
@@ -31,11 +64,15 @@ short get_custom_rect (short which_rect, Rect& store_rect);
void get_str(Str255 str,short i, short j);
GWorldPtr importPictureFileToGWorld(const FSSpec *fileSpec);
void writeGWorldToPNGFile(GWorldPtr gw, const FSSpec *fileSpec);
#ifndef _GRAPHTOOL_CPP
extern short arrow_curs[3][3];
extern short sword_curs, boot_curs, drop_curs, target_curs;
extern short talk_curs, key_curs, look_curs, current_cursor;
void tileImage(Rect area, GWorldPtr img, short mode=0);
void tileImage(Rect area, GWorldPtr img, Rect srcRect, short mode=0);
#ifndef GRAPHTOOL_CPP
extern cursor_type arrow_curs[3][3];
extern cursor_type current_cursor;
extern m_pic_index_t m_pic_index[200];
extern PixPatHandle bg[14];
extern short geneva_font_num,dungeon_font_num;
#endif
#endif