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:
@@ -31,6 +31,7 @@ void cPict::init(){
|
||||
drawPict[PIC_DLOG_LG] = drawPresetDlogLg;
|
||||
drawPict[PIC_SCEN_LG] = drawPresetScenLg;
|
||||
drawPict[PIC_TER_MAP] = drawPresetTerMap;
|
||||
drawPict[PIC_TER_MAP] = drawStatusIcon;
|
||||
drawPict[PIC_MONST_WIDE] = drawPresetMonstWide;
|
||||
drawPict[PIC_MONST_TALL] = drawPresetMonstTall;
|
||||
drawPict[PIC_MONST_LG] = drawPresetMonstLg;
|
||||
@@ -173,6 +174,9 @@ void cPict::setSheet(eSheetType type, short n, GWorldPtr sheet){
|
||||
case SHEET_HEADER:
|
||||
header = sheet;
|
||||
break;
|
||||
case SHEET_STATUS:
|
||||
status = sheet;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,16 +222,26 @@ bool cPict::isSheetSet(eSheetType type, size_t num){
|
||||
else return customSheets[num];
|
||||
case SHEET_HEADER:
|
||||
return header;
|
||||
case SHEET_STATUS:
|
||||
return status;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cPict::setPict(short num, ePicType type){
|
||||
void cPict::setPict(pic_num_t num, ePicType type){
|
||||
picNum = num;
|
||||
picType = type;
|
||||
if(isVisible()) draw();
|
||||
}
|
||||
|
||||
pic_num_t cPict::getPicNum(){
|
||||
return picNum;
|
||||
}
|
||||
|
||||
ePicType cPict::getPicType(){
|
||||
return picType;
|
||||
}
|
||||
|
||||
cPict::cPict(cDialog* parent) : cControl(parent,CTRL_PICT) {}
|
||||
|
||||
bool cPict::isClickable(){
|
||||
@@ -480,7 +494,7 @@ ePicType& operator-= (ePicType& lhs, ePicTypeMod rhs){
|
||||
|
||||
GWorldPtr cPict::teranim = NULL, cPict::dlog = NULL, cPict::talk = NULL, cPict::scen = NULL, cPict::largeScen = NULL;
|
||||
GWorldPtr cPict::item = NULL, cPict::tinyItem = NULL, cPict::pc = NULL, cPict::field = NULL, cPict::boom = NULL;
|
||||
GWorldPtr cPict::missile = NULL, cPict::save = NULL, cPict::header = NULL, cPict::map = NULL;
|
||||
GWorldPtr cPict::missile = NULL, cPict::save = NULL, cPict::header = NULL, cPict::map = NULL, cPict::status = NULL;
|
||||
std::vector<GWorldPtr> cPict::ter, cPict::monst, cPict::customSheets;
|
||||
std::map<size_t,GWorldPtr> cPict::largeSheets;
|
||||
std::map<ePicType,void(*)(short,GWorldPtr,Rect)> cPict::drawPict;
|
||||
@@ -752,6 +766,15 @@ void cPict::drawPresetTerMap(short num, GWorldPtr to_gw, Rect to_rect){
|
||||
rect_draw_some_item(from_gw, from_rect, to_gw, to_rect, 0, 0);
|
||||
}
|
||||
|
||||
void cPict::drawStatusIcon(short num, GWorldPtr to_gw, Rect to_rect){
|
||||
Rect from_rect = {0,0,12,12};
|
||||
GWorldPtr from_gw = status;
|
||||
to_rect.right = to_rect.left + 12;
|
||||
to_rect.bottom = to_rect.top + 12;
|
||||
OffsetRect(&from_rect,12 * (num % 3), 12 * (num / 3));
|
||||
rect_draw_some_item(from_gw, from_rect, to_gw, to_rect, 0, 0);
|
||||
}
|
||||
|
||||
void cPict::drawCustomTer(short num, GWorldPtr to_gw, Rect to_rect){
|
||||
printf("Drawing graphic %i as a custom terrain pic.\n",num);
|
||||
to_rect.right = to_rect.left + 28;
|
||||
|
Reference in New Issue
Block a user