Fix up all the mini-map stuff!
- Preset animated graphics now start at 960 instead of 400, due to all the new preset terrains from the previous commit running into their range. - Tore out some optimization in the automap drawing, because it made it harder to figure out why it wasn't working - Both game and editor now use the larger 12x12 map graphics, and fall back to shrinking down the 28x36 terrain graphic if no map graphic is set - Upon loading an old scenario, map graphic is automatically set the same as the main graphic if it's a preset graphic; for custom graphics it's set to none - Scenario now has three zoom levels for mini-map - the original in which the entire town is visible, a slightly closer one that matches the in-game view, and a large one using the 12x12 map graphics at full size. - Fix some map patterns having the wrong bounding rect - Graphics (and sounds) now included in the project by folder reference, so that I don't need to manually every new sheet to the project
This commit is contained in:
@@ -312,10 +312,10 @@ static void fill_ter_info(cDialog& me, short ter){
|
||||
{
|
||||
cPict& pic_ctrl = dynamic_cast<cPict&>(me["graphic"]);
|
||||
pic_num_t pic = ter_type.picture;
|
||||
if(pic < 400)
|
||||
if(pic < 960)
|
||||
pic_ctrl.setPict(pic, PIC_TER);
|
||||
else if(pic < 1000)
|
||||
pic_ctrl.setPict(pic % 400, PIC_TER_ANIM);
|
||||
pic_ctrl.setPict(pic - 960, PIC_TER_ANIM);
|
||||
else if(pic < 2000)
|
||||
pic_ctrl.setPict(pic % 1000, PIC_CUSTOM_TER);
|
||||
else
|
||||
@@ -430,7 +430,7 @@ short edit_ter_type(ter_num_t which_ter) {
|
||||
// Attach handlers
|
||||
ter_dlg["pict"].attachFocusHandler(std::bind(check_range,_1,_2,_3,0,2999,"terrain graphic"));
|
||||
ter_dlg["pickpict"].attachClickHandler(std::bind(pick_picture,PIC_TER,_1,"pict","graphic",0));
|
||||
ter_dlg["pickanim"].attachClickHandler(std::bind(pick_picture,PIC_TER_ANIM,_1,"pict","graphic",400));
|
||||
ter_dlg["pickanim"].attachClickHandler(std::bind(pick_picture,PIC_TER_ANIM,_1,"pict","graphic",960));
|
||||
ter_dlg["light"].attachFocusHandler(std::bind(check_range,_1,_2,_3,0,255,"light radius"));
|
||||
ter_dlg["trans"].attachFocusHandler(std::bind(check_range,_1,_2,_3,0,65535,"\"transform to what?\""));
|
||||
ter_dlg["ground"].attachFocusHandler(std::bind(check_range,_1,_2,_3,0,255,"ground type"));
|
||||
|
Reference in New Issue
Block a user