Store rect descriptions together with their rectangle and remove now-unused string-length members

This commit is contained in:
2015-01-22 15:19:26 -05:00
parent 3e0e3d3b8a
commit 952d81ae5a
18 changed files with 58 additions and 112 deletions

View File

@@ -472,19 +472,19 @@ bool handle_action(location the_point,sf::Event /*event*/) {
else { // MODE_ROOM_RECT
if(editing_town) {
for(x = 0; x < 16; x++)
if(town->room_rect(x).right == 0) {
town->room_rect(x) = working_rect;
town->rect_names[x] = "";
if(town->room_rect[x].right == 0) {
static_cast<rectangle&>(town->room_rect[x]) = working_rect;
town->room_rect[x].descr = "";
if(!edit_area_rect_str(x,1))
town->room_rect(x).right = 0;
town->room_rect[x].right = 0;
x = 500;
}
}
else {
for(x = 0; x < 8; x++)
if(current_terrain->info_rect[x].right == 0) {
current_terrain->info_rect[x] = working_rect;
current_terrain->rect_names[x] = "";
static_cast<rectangle&>(current_terrain->info_rect[x]) = working_rect;
current_terrain->info_rect[x].descr = "";
if(!edit_area_rect_str(x,0))
current_terrain->info_rect[x].right = 0;
x = 500;