Cache calls of WALL_IS_DOORWAY
This commit is contained in:
parent
df3f2fe2fe
commit
c057ee57ed
|
@ -677,7 +677,8 @@ int load_mine_data(PHYSFS_file *LoadFile)
|
|||
unsigned short orient;
|
||||
tmap_xlate = Segments[i].sides[j].tmap_num;
|
||||
Segments[i].sides[j].tmap_num = tmap_xlate_table[tmap_xlate];
|
||||
if ((WALL_IS_DOORWAY(&Segments[i],j) & WID_RENDER_FLAG))
|
||||
auto render = (WALL_IS_DOORWAY(&Segments[i],j) & WID_RENDER_FLAG);
|
||||
if (render)
|
||||
if (Segments[i].sides[j].tmap_num < 0) {
|
||||
Int3();
|
||||
Segments[i].sides[j].tmap_num = NumTextures-1;
|
||||
|
@ -687,7 +688,7 @@ int load_mine_data(PHYSFS_file *LoadFile)
|
|||
if (tmap_xlate != 0) {
|
||||
int xlated_tmap = tmap_xlate_table[tmap_xlate];
|
||||
|
||||
if ((WALL_IS_DOORWAY(&Segments[i],j) & WID_RENDER_FLAG))
|
||||
if (render)
|
||||
if (xlated_tmap <= 0) {
|
||||
Int3();
|
||||
Segments[i].sides[j].tmap_num2 = NumTextures-1;
|
||||
|
|
|
@ -502,7 +502,8 @@ static void set_sound_sources()
|
|||
if ((tm=seg->sides[sidenum].tmap_num2) != 0)
|
||||
if ((ec=TmapInfo[tm&0x3fff].eclip_num)!=-1)
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
if (WALL_IS_DOORWAY(seg,sidenum) & WID_RENDER_FLAG)
|
||||
auto wid = WALL_IS_DOORWAY(seg, sidenum);
|
||||
if (wid & WID_RENDER_FLAG)
|
||||
if ((((tm=seg->sides[sidenum].tmap_num2) != 0) && ((ec=TmapInfo[tm&0x3fff].eclip_num)!=-1)) || ((ec=TmapInfo[seg->sides[sidenum].tmap_num].eclip_num)!=-1))
|
||||
#endif
|
||||
if ((sn=Effects[ec].sound_num)!=-1) {
|
||||
|
@ -516,7 +517,7 @@ static void set_sound_sources()
|
|||
//segment.
|
||||
|
||||
if (IS_CHILD(csegnum) && csegnum < segnum) {
|
||||
if (WALL_IS_DOORWAY(seg, sidenum) & (WID_FLY_FLAG+WID_RENDPAST_FLAG)) {
|
||||
if (wid & (WID_FLY_FLAG|WID_RENDPAST_FLAG)) {
|
||||
segment *csegp;
|
||||
int csidenum;
|
||||
|
||||
|
|
|
@ -2062,9 +2062,11 @@ void render_mine(segnum_t start_seg_num,fix eye_offset, int window_num)
|
|||
Automap_visited[segnum]=1;
|
||||
|
||||
for (sn=0; sn<MAX_SIDES_PER_SEGMENT; sn++)
|
||||
if (WALL_IS_DOORWAY(seg,sn) == WID_TRANSPARENT_WALL || WALL_IS_DOORWAY(seg,sn) == WID_TRANSILLUSORY_WALL
|
||||
{
|
||||
auto wid = WALL_IS_DOORWAY(seg, sn);
|
||||
if (wid == WID_TRANSPARENT_WALL || wid == WID_TRANSILLUSORY_WALL
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
|| WALL_IS_DOORWAY(seg,sn) & WID_CLOAKED_FLAG
|
||||
|| (wid & WID_CLOAKED_FLAG)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
@ -2074,6 +2076,7 @@ void render_mine(segnum_t start_seg_num,fix eye_offset, int window_num)
|
|||
}
|
||||
else
|
||||
render_side(seg, sn);
|
||||
}
|
||||
}
|
||||
}
|
||||
visited[segnum]=3;
|
||||
|
@ -2179,12 +2182,15 @@ void render_mine(segnum_t start_seg_num,fix eye_offset, int window_num)
|
|||
Automap_visited[segnum]=1;
|
||||
|
||||
for (sn=0; sn<MAX_SIDES_PER_SEGMENT; sn++)
|
||||
if (WALL_IS_DOORWAY(seg,sn) == WID_TRANSPARENT_WALL || WALL_IS_DOORWAY(seg,sn) == WID_TRANSILLUSORY_WALL
|
||||
{
|
||||
auto wid = WALL_IS_DOORWAY(seg, sn);
|
||||
if (wid == WID_TRANSPARENT_WALL || wid == WID_TRANSILLUSORY_WALL
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
|| WALL_IS_DOORWAY(seg,sn) & WID_CLOAKED_FLAG
|
||||
|| (wid & WID_CLOAKED_FLAG)
|
||||
#endif
|
||||
)
|
||||
render_side(seg, sn);
|
||||
}
|
||||
}
|
||||
}
|
||||
visited[segnum]=3;
|
||||
|
|
Loading…
Reference in a new issue