Implement two-part drawing for force cages
- Also a missing check for them
This commit is contained in:
@@ -809,6 +809,8 @@ ter_num_t get_ter_from_ground(unsigned char ground){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<location> forcecage_locs;
|
||||||
|
|
||||||
void draw_terrain(short mode)
|
void draw_terrain(short mode)
|
||||||
//mode ... if 1, don't place on screen after redoing
|
//mode ... if 1, don't place on screen after redoing
|
||||||
// if 2, only redraw over active monst
|
// if 2, only redraw over active monst
|
||||||
@@ -1029,6 +1031,10 @@ void draw_terrain(short mode)
|
|||||||
draw_party_symbol(center);
|
draw_party_symbol(center);
|
||||||
else if (overall_mode != MODE_LOOK_TOWN)
|
else if (overall_mode != MODE_LOOK_TOWN)
|
||||||
draw_pcs(center,0);
|
draw_pcs(center,0);
|
||||||
|
// Draw top half of forcecages (this list is populated by draw_fields)
|
||||||
|
// TODO: Move into the above loop to eliminate global variable
|
||||||
|
for(location fc_loc : forcecage_locs)
|
||||||
|
Draw_Some_Item(fields_gworld,calc_rect(2,0),terrain_screen_gworld,fc_loc,1,0);
|
||||||
|
|
||||||
// Now do the light mask thing
|
// Now do the light mask thing
|
||||||
apply_light_mask(false);
|
apply_light_mask(false);
|
||||||
|
@@ -471,6 +471,8 @@ void draw_town_boat(location center)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern std::vector<location> forcecage_locs;
|
||||||
|
|
||||||
void draw_fields(location where){
|
void draw_fields(location where){
|
||||||
if(!point_onscreen(center,where)) return;
|
if(!point_onscreen(center,where)) return;
|
||||||
if(party_can_see(where) >= 6) return;
|
if(party_can_see(where) >= 6) return;
|
||||||
@@ -525,8 +527,10 @@ void draw_fields(location where){
|
|||||||
Draw_Some_Item(fields_gworld,calc_rect(6,3),terrain_screen_gworld,where_draw,1,0);
|
Draw_Some_Item(fields_gworld,calc_rect(6,3),terrain_screen_gworld,where_draw,1,0);
|
||||||
if(univ.town.is_rubble(where.x,where.y))
|
if(univ.town.is_rubble(where.x,where.y))
|
||||||
Draw_Some_Item(fields_gworld,calc_rect(7,3),terrain_screen_gworld,where_draw,1,0);
|
Draw_Some_Item(fields_gworld,calc_rect(7,3),terrain_screen_gworld,where_draw,1,0);
|
||||||
if(univ.town.is_force_cage(where.x,where.y))
|
if(univ.town.is_force_cage(where.x,where.y)) {
|
||||||
Draw_Some_Item(fields_gworld,calc_rect(2,0),terrain_screen_gworld,where_draw,1,0);
|
Draw_Some_Item(fields_gworld,calc_rect(1,0),terrain_screen_gworld,where_draw,1,0);
|
||||||
|
forcecage_locs.push_back(where_draw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_party_symbol(location center) {
|
void draw_party_symbol(location center) {
|
||||||
|
@@ -891,6 +891,8 @@ short do_look(location space)
|
|||||||
add_string_to_buf(" Ice Wall ");
|
add_string_to_buf(" Ice Wall ");
|
||||||
if (univ.town.is_blade_wall(space.x,space.y))
|
if (univ.town.is_blade_wall(space.x,space.y))
|
||||||
add_string_to_buf(" Blade Wall ");
|
add_string_to_buf(" Blade Wall ");
|
||||||
|
if (univ.town.is_force_cage(space.x,space.y))
|
||||||
|
add_string_to_buf(" Force Cage ");
|
||||||
|
|
||||||
if (univ.town.is_sm_blood(space.x,space.y))
|
if (univ.town.is_sm_blood(space.x,space.y))
|
||||||
add_string_to_buf(" Blood stain ");
|
add_string_to_buf(" Blood stain ");
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.4 KiB |
Reference in New Issue
Block a user