diff --git a/src/BoE.vsproj/ScenEdit/Scen Editor.rc b/src/BoE.vsproj/ScenEdit/Scen Editor.rc
index 9df5a641..bd359d48 100644
--- a/src/BoE.vsproj/ScenEdit/Scen Editor.rc
+++ b/src/BoE.vsproj/ScenEdit/Scen Editor.rc
@@ -168,42 +168,6 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "Repeat Printing of Last &File\tCtrl+P", 414
END
- POPUP "&I1"
- BEGIN
- MENUITEM "Dummy", 600
- END
- POPUP "&I2"
- BEGIN
- MENUITEM "Dummy", 601
- END
- POPUP "&I3"
- BEGIN
- MENUITEM "Dummy", 602
- END
- POPUP "&I4"
- BEGIN
- MENUITEM "Dummy", 603
- END
- POPUP "&I5"
- BEGIN
- MENUITEM "Dummy", 604
- END
- POPUP "&M1"
- BEGIN
- MENUITEM "Dummy", 608
- END
- POPUP "&M2"
- BEGIN
- MENUITEM "Dummy", 609
- END
- POPUP "&M3"
- BEGIN
- MENUITEM "Dummy", 610
- END
- POPUP "&M4"
- BEGIN
- MENUITEM "Dummy", 611
- END
POPUP "&Help"
BEGIN
MENUITEM "&Index\tF1", IDM_HELP_INDEX
diff --git a/src/classes/town.cpp b/src/classes/town.cpp
index de563a47..0eae8af3 100644
--- a/src/classes/town.cpp
+++ b/src/classes/town.cpp
@@ -259,7 +259,7 @@ cTown::cItem::cItem() {
}
cTown::cItem::cItem(location loc, short num, ::cItem& item) : cItem() {
- loc = loc;
+ this->loc = loc;
code = num;
if(item.variety == eItemType::GOLD || item.variety == eItemType::FOOD)
charges = get_ran(1,4,6);
diff --git a/src/dialogxml/scrollbar.cpp b/src/dialogxml/scrollbar.cpp
index a1f5a24f..dea33fed 100644
--- a/src/dialogxml/scrollbar.cpp
+++ b/src/dialogxml/scrollbar.cpp
@@ -30,7 +30,7 @@ void cScrollbar::setPosition(long newPos) {
}
void cScrollbar::setMaximum(long newMax) {
- max = ::max(1,newMax);
+ max = ::max(0,newMax);
setPosition(pos);
}
@@ -65,6 +65,7 @@ bool cScrollbar::triggerClickHandler(cDialog& me, std::string id, eKeyMod mods)
}
bool cScrollbar::handleClick(location where) {
+ if(max == 0) return false;
sf::Event e;
bool done = false, clicked = false;
inWindow->setActive();
@@ -172,13 +173,15 @@ void cScrollbar::draw() {
}
draw_rect.bottom = top + height;
}
- draw_rect.top = draw_rect.bottom;
- draw_rect.height() = 16;
- from_rect = thumb_rect;
- if(depressed && pressedPart == PART_THUMB)
- from_rect.offset(0,16);
- rect_draw_some_item(scroll_gw, from_rect, *inWindow, draw_rect);
- if(pos < max) {
+ if(max > 0) {
+ draw_rect.top = draw_rect.bottom;
+ draw_rect.height() = 16;
+ from_rect = thumb_rect;
+ if(depressed && pressedPart == PART_THUMB)
+ from_rect.offset(0,16);
+ rect_draw_some_item(scroll_gw, from_rect, *inWindow, draw_rect);
+ }
+ if(pos < max || max == 0) {
from_rect = bar_rect;
int top = draw_rect.bottom, bottom = frame.bottom - 16;
if(depressed && pressedPart == PART_PGDN)
diff --git a/src/scenedit/scen.actions.cpp b/src/scenedit/scen.actions.cpp
index bea297b8..f20f078d 100644
--- a/src/scenedit/scen.actions.cpp
+++ b/src/scenedit/scen.actions.cpp
@@ -26,6 +26,7 @@
extern char current_string[256];
extern short mini_map_scales[3];
+extern eDrawMode draw_mode;
rectangle world_screen;
// border rects order: top, left, bottom, right //
rectangle border_rect[4];
@@ -202,7 +203,6 @@ bool handle_action(location the_point,sf::Event /*event*/) {
current_terrain = scenario.outdoors[cur_out.x][cur_out.y];
overall_mode = MODE_MAIN_SCREEN;
set_up_main_screen();
- update_item_menu();
}
break;
case LB_EDIT_TER:
@@ -309,16 +309,13 @@ bool handle_action(location the_point,sf::Event /*event*/) {
break;
case RB_TER:
edit_ter_type(j);
- update_item_menu();
break;
case RB_MONST:
edit_monst_type(j);
- update_item_menu();
start_monster_editing(1);
break;
case RB_ITEM:
edit_item_type(j);
- update_item_menu();
start_item_editing(1);
break;
case RB_SCEN_SPEC:
@@ -997,7 +994,25 @@ bool handle_action(location the_point,sf::Event /*event*/) {
temp_rect.offset(RIGHT_AREA_UL_X, RIGHT_AREA_UL_Y );
flash_rect(temp_rect);
if(overall_mode < MODE_MAIN_SCREEN) {
- set_new_terrain(i);
+ switch(draw_mode) {
+ case DRAW_TERRAIN:
+ set_new_terrain(i);
+ break;
+ case DRAW_ITEM:
+ if(scenario.scen_items[mode_count].variety == eItemType::NO_ITEM) {
+ giveError("This item has its Variety set to No Item. You can only place items with a Variety set to an actual item type.");
+ break;
+ }
+ overall_mode = MODE_PLACE_ITEM;
+ mode_count = i;
+ set_string("Place the item:",scenario.scen_items[mode_count].full_name.c_str());
+ break;
+ case DRAW_MONST:
+ overall_mode = MODE_PLACE_CREATURE;
+ mode_count = i + 1;
+ set_string("Place the monster:",scenario.scen_monsters[mode_count].m_name.c_str());
+ break;
+ }
}
else {
edit_ter_type(i);
@@ -1274,6 +1289,18 @@ bool handle_action(location the_point,sf::Event /*event*/) {
mode_count = 7;
set_cursor(wand_curs);
break;
+ case 109: // Terrain palette
+ draw_mode = DRAW_TERRAIN;
+ set_up_terrain_buttons(true);
+ break;
+ case 209: // Item palette
+ draw_mode = DRAW_ITEM;
+ set_up_terrain_buttons(true);
+ break;
+ case 309: // Monster palette
+ draw_mode = DRAW_MONST;
+ set_up_terrain_buttons(true);
+ break;
}
}
}
@@ -1317,7 +1344,6 @@ void swap_terrain() {
void set_new_terrain(ter_num_t selected_terrain) {
current_terrain_type = selected_terrain;
- redraw_selected_ter();
// if(selected_terrain < 2)
// current_ground = 0;
// else if(selected_terrain < 5)
diff --git a/src/scenedit/scen.core.cpp b/src/scenedit/scen.core.cpp
index 129f40e4..3509e9ad 100644
--- a/src/scenedit/scen.core.cpp
+++ b/src/scenedit/scen.core.cpp
@@ -3016,7 +3016,6 @@ bool build_scenario() {
}
cur_town = 0;
town = scenario.towns[0];
- update_item_menu();
save_scenario(progDir/filename);
return true;
diff --git a/src/scenedit/scen.graphics.cpp b/src/scenedit/scen.graphics.cpp
index f7547be3..b2b1b8c6 100644
--- a/src/scenedit/scen.graphics.cpp
+++ b/src/scenedit/scen.graphics.cpp
@@ -489,21 +489,27 @@ void set_up_terrain_buttons(bool reset) {
rectangle tiny_from,tiny_to;
rectangle palette_from,palette_to = palette_button_base;
+ int max;
+ switch(draw_mode) {
+ case DRAW_TERRAIN: max = scenario.ter_types.size(); break;
+ case DRAW_ITEM: max = scenario.scen_items.size(); break;
+ case DRAW_MONST: max = scenario.scen_monsters.size(); break;
+ default: return;
+ }
if(reset) pal_sbar->setPosition(0);
- pal_sbar->setMaximum((scenario.ter_types.size() / 16) - 15);
- if(overall_mode != MODE_EDIT_TYPES)
- pal_sbar->setMaximum(pal_sbar->getMaximum() - 1);
+ pal_sbar->setMaximum((max / 16) - 16);
tileImage(terrain_buttons_gworld,terrain_buttons_rect,bg[17]);
frame_rect(terrain_buttons_gworld, terrain_buttons_rect, sf::Color::Black);
int first = pal_sbar->getPosition() * 16;
- int end = min(first + 256, scenario.ter_types.size());
+ if(draw_mode == DRAW_MONST) first++;
+ int end = min(first + 256, max);
// first make terrain buttons
- switch(draw_mode){
- case DRAW_TERRAIN:
- for(i = first; i < end; i++) {
+ for(i = first; i < end; i++) {
+ switch(draw_mode){
+ case DRAW_TERRAIN:
ter_from = ter_from_base;
pic = scenario.ter_types[i].picture;
if(pic >= 1000) {
@@ -536,12 +542,119 @@ void set_up_terrain_buttons(bool reset) {
tiny_to.left = tiny_to.right - 7;
if(small_i > 0 && small_i < 255)
rect_draw_some_item(editor_mixed,tiny_from,terrain_buttons_gworld,tiny_to);
- }
- break;
- case DRAW_MONST:
- break;
- case DRAW_ITEM:
- break;
+ break;
+ case DRAW_MONST:
+ pic = scenario.scen_monsters[i].picture_num;
+ tiny_to = terrain_rects[i - first];
+ frame_rect(terrain_buttons_gworld, tiny_to, sf::Color::Black);
+ if(pic >= 4000) {
+ pic %= 1000;
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(tiny_to.width(), 0);
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(-tiny_to.width(), tiny_to.height());
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(tiny_to.width(), 0);
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ } else if(pic >= 3000) {
+ pic %= 1000;
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(tiny_to.width() / 2, 0);
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(0, tiny_to.height());
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ } else if(pic >= 2000) {
+ pic %= 1000;
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(0, tiny_to.height() / 2);
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(tiny_to.width(), 0);
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ } else if(pic >= 1000) {
+ pic %= 1000;
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic);
+ rect_draw_some_item(*source_gworld, ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ } else {
+ auto pic_info = m_pic_index[pic];
+ pic = pic_info.i;
+ if(pic_info.x == 2 && pic_info.y == 2) {
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(tiny_to.width(), 0);
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(-tiny_to.width(), tiny_to.height());
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(tiny_to.width(), 0);
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ } else if(pic_info.y == 2) {
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(tiny_to.width() / 2, 0);
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(0, tiny_to.height());
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ } else if(pic_info.x == 2) {
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(0, tiny_to.height() / 2);
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ pic++;
+ tiny_to.offset(tiny_to.width(), 0);
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ } else {
+ ter_from = calc_rect(2 * ((pic % 20) / 10), (pic % 20) % 10);
+ rect_draw_some_item(monst_gworld[pic / 20], ter_from, terrain_buttons_gworld, tiny_to, sf::BlendAlpha);
+ }
+ }
+ break;
+ case DRAW_ITEM:
+ pic = scenario.scen_items[i].graphic_num;
+ tiny_to = terrain_rects[i - first];
+ if(pic >= 1000) {
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, ter_from) = spec_scen_g.find_graphic(pic % 1000);
+ rect_draw_some_item(*source_gworld,ter_from,terrain_buttons_gworld,tiny_to,sf::BlendAlpha);
+ } else {
+ tiny_from = {0,0,18,18};
+ tiny_from.offset((pic % 10) * 18,(pic / 10) * 18);
+ rect_draw_some_item(tiny_obj_gworld,tiny_from,terrain_buttons_gworld,tiny_to,sf::BlendAlpha);
+ }
+ break;
+ }
}
if(overall_mode < MODE_MAIN_SCREEN) {
@@ -960,10 +1073,6 @@ void force_tiny_redraw() {
}
-void redraw_selected_ter() {
- // draw_one_terrain_spot(18,8,(unsigned char) current_terrain_type);
-}
-
void draw_one_terrain_spot (short i,short j,ter_num_t terrain_to_draw) {
location where_draw;
rectangle source_rect;
@@ -1220,6 +1329,120 @@ void place_location() {
tiny_from.offset(7 * (small_i % 10),7 * (small_i / 10));
if(small_i > 0 && small_i < 255)
rect_draw_some_item(editor_mixed,tiny_from,terrain_buttons_gworld,tiny_to);
+ if(overall_mode == MODE_PLACE_CREATURE || overall_mode == MODE_PLACE_SAME_CREATURE) {
+ extern short mode_count;
+ picture_wanted = scenario.scen_monsters[mode_count].picture_num;
+ if(picture_wanted >= 4000) {
+ picture_wanted %= 1000;
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(tiny_to.width(), 0);
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(-tiny_to.width(), tiny_to.height());
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(tiny_to.width(), 0);
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ } else if(picture_wanted >= 3000) {
+ picture_wanted %= 1000;
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(tiny_to.width() / 2, 0);
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(0, tiny_to.height());
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ } else if(picture_wanted >= 2000) {
+ picture_wanted %= 1000;
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(0, tiny_to.height() / 2);
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(tiny_to.width(), 0);
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ } else if(picture_wanted >= 1000) {
+ picture_wanted %= 1000;
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted);
+ rect_draw_some_item(*source_gworld, source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ } else {
+ auto pic_info = m_pic_index[picture_wanted];
+ picture_wanted = pic_info.i;
+ if(pic_info.x == 2 && pic_info.y == 2) {
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(tiny_to.width(), 0);
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(-tiny_to.width(), tiny_to.height());
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(tiny_to.width(), 0);
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ } else if(pic_info.y == 2) {
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(tiny_to.width() / 2, 0);
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(0, tiny_to.height());
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ } else if(pic_info.x == 2) {
+ tiny_to.width() = tiny_to.width() / 2;
+ tiny_to.height() = tiny_to.height() / 2;
+ tiny_to.offset(0, tiny_to.height() / 2);
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ picture_wanted++;
+ tiny_to.offset(tiny_to.width(), 0);
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ } else {
+ source_rect = calc_rect(2 * ((picture_wanted % 20) / 10), (picture_wanted % 20) % 10);
+ rect_draw_some_item(monst_gworld[picture_wanted / 20], source_rect, terrain_buttons_gworld, draw_rect, sf::BlendAlpha);
+ }
+ }
+ } else if(overall_mode == MODE_PLACE_ITEM || overall_mode == MODE_PLACE_SAME_ITEM) {
+ extern short mode_count;
+ picture_wanted = scenario.scen_items[mode_count].graphic_num;
+ if(picture_wanted >= 1000) {
+ sf::Texture* source_gworld;
+ graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(picture_wanted % 1000);
+ rect_draw_some_item(*source_gworld,source_rect,terrain_buttons_gworld,draw_rect,sf::BlendAlpha);
+ } else if(picture_wanted < 50) {
+ source_rect = calc_rect(picture_wanted % 5,picture_wanted / 5);
+ rect_draw_some_item(items_gworld,source_rect,terrain_buttons_gworld,draw_rect,sf::BlendAlpha);
+ } else {
+ tiny_to = draw_rect;
+ tiny_to.inset(5, 9);
+ tiny_from = {0,0,18,18};
+ tiny_from.offset((picture_wanted % 10) * 18,(picture_wanted / 10) * 18);
+ rect_draw_some_item(tiny_obj_gworld,tiny_from,terrain_buttons_gworld,tiny_to,sf::BlendAlpha);
+ }
+ }
}
terrain_buttons_gworld.display();
diff --git a/src/scenedit/scen.graphics.h b/src/scenedit/scen.graphics.h
index 9554d619..9c6f327c 100644
--- a/src/scenedit/scen.graphics.h
+++ b/src/scenedit/scen.graphics.h
@@ -17,7 +17,6 @@ void draw_monsts();
rectangle get_item_template_rect (short type_wanted);
void draw_items();
void force_tiny_redraw();
-void redraw_selected_ter();
void draw_one_terrain_spot (short i,short j,ter_num_t terrain_to_draw);
void draw_one_tiny_terrain_spot (short i,short j,ter_num_t terrain_to_draw,short size);
void Draw_Some_Item(sf::Texture& src_gworld,rectangle src_rect,sf::RenderTarget& targ_gworld,location target,sf::BlendMode mode = sf::BlendNone);
diff --git a/src/scenedit/scen.main.cpp b/src/scenedit/scen.main.cpp
index 8e26791a..b7714a3e 100644
--- a/src/scenedit/scen.main.cpp
+++ b/src/scenedit/scen.main.cpp
@@ -205,7 +205,6 @@ void handle_menu_choice(eMenu item_hit) {
current_terrain = scenario.outdoors[cur_out.x][cur_out.y];
overall_mode = MODE_MAIN_SCREEN;
change_made = false;
- update_item_menu();
set_up_main_screen();
}
break;
@@ -497,22 +496,6 @@ void handle_menu_choice(eMenu item_hit) {
cChoiceDlog(helpDlog).show();
}
-void handle_item_menu(int item_hit) {
- if(scenario.scen_items[item_hit].variety == eItemType::NO_ITEM) {
- giveError("This item has its Variety set to No Item. You can only place items with a Variety set to an actual item type.");
- return;
- }
- overall_mode = MODE_PLACE_ITEM;
- set_string("Place the item.","Select item location");
- mode_count = item_hit;
-}
-
-void handle_monst_menu(int item_hit) {
- overall_mode = MODE_PLACE_CREATURE;
- set_string("Place the monster.","Select monster location");
- mode_count = item_hit;
-}
-
static void handleUpdateWhileScrolling(volatile bool& doneScrolling) {
while(!doneScrolling) {
sf::sleep(sf::milliseconds(10));
diff --git a/src/scenedit/scen.menu.xib b/src/scenedit/scen.menu.xib
index 82920e00..9cb0d530 100644
--- a/src/scenedit/scen.menu.xib
+++ b/src/scenedit/scen.menu.xib
@@ -788,131 +788,6 @@
YES
-
-
-
-
-
-
-
-
-
@@ -1701,132 +1567,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-