From 7ecebb5dd6403e43d4132d0c526447fd2470e6f8 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Sun, 24 May 2026 22:01:29 -0400 Subject: [PATCH] Corrected a stupid omission to set the plane hint during a search in "extresist", which when missing causes the plane to be searched repeatedly from the same point instead of from the last place searched. Can knock down the "extresist" time by up to 50%. --- resis/ResMain.c | 4 ++++ resis/ResUtils.c | 1 + 2 files changed, 5 insertions(+) diff --git a/resis/ResMain.c b/resis/ResMain.c index ce2569af..af2d06dc 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -449,6 +449,7 @@ ResFindNewContactTiles(contacts) tile = PlaneGetHint(ResDef->cd_planes[pNum]); GOTOPOINT(tile, &(contacts->cp_center)); + PlaneSetHint(ResDef->cd_planes[pNum], tile); #ifdef PARANOID if (tile == (Tile *) NULL) { @@ -1412,6 +1413,7 @@ FindStartTile(resisdata, SourcePoint) { tile = PlaneGetHint(ResUse->cu_def->cd_planes[pnum]); GOTOPOINT(tile, &workingPoint); + PlaneSetHint(ResUse->cu_def->cd_planes[pnum], tile); SourcePoint->p_x = workingPoint.p_x; SourcePoint->p_y = workingPoint.p_y; @@ -1445,6 +1447,7 @@ FindStartTile(resisdata, SourcePoint) tile = PlaneGetHint(ResUse->cu_def->cd_planes[pnum]); GOTOPOINT(tile, &workingPoint); + PlaneSetHint(ResUse->cu_def->cd_planes[pnum], tile); if (IsSplit(tile)) { @@ -1796,6 +1799,7 @@ ResGetDevice(pt, type) tile = PlaneGetHint(ResUse->cu_def->cd_planes[pnum]); GOTOPOINT(tile, &workingPoint); + PlaneSetHint(ResUse->cu_def->cd_planes[pnum], tile); const ClientData ticlient = TiGetClient(tile); if (IsSplit(tile)) diff --git a/resis/ResUtils.c b/resis/ResUtils.c index 3a8cd8bb..cb3deee2 100644 --- a/resis/ResUtils.c +++ b/resis/ResUtils.c @@ -733,6 +733,7 @@ ResPreProcessDevices(TileList, DeviceList, Def) tile = PlaneGetHint(Def->cd_planes[pNum]); GOTOPOINT(tile, &(TileList->area.r_ll)); + PlaneSetHint(Def->cd_planes[pNum], tile); tt = TiGetType(tile); tstruct = (resInfo *) TiGetClientPTR(tile);